2:43 AM

MAPLE


  • MAPLE is a powerful mathematical software package. 
  • It can be used to obtain both symbolic and numerical solutions of problems in arithmetic, algebra,     and calculus and to generate plots of the solutions it generates. 
  • this tool to perform almost any type of mathematical analysis 
  • to use maple, first we are required to install the software which is licensed.
  • Once Maple has been started, computations can be carried out immediately. 
  • Maple commands are typed to the right of the prompt.
  • End a command by placing a semicolon at the end and then evaluate the command by pressing ENTER. 
  • When you press ENTER, Maple evaluates the command, displays the result, and inserts a prompt after the result. 
  • Shift-ENTER yields a new line 
  • A semicolon (;) or colon (:) must be included at the end of each command.
  • Multiplication is represented by an asterisk, * and Powers are denoted by ˆ symbol.
  • first, we must know hoe to define the function.
Here are the example of commands used in maple;












2:05 AM

OVERVIEW OF C++

Just like Python, C++ is a type of programming language. But, unlike Python in which we have to install Anaconda or Miniconda, in C++ we do not have to install the software as they can be used online.
Here is the software link. https://repl.it/
Just browse it, log in , search for the C++ program and you are ready to use it!!!

For this lectures, we referred to this link, https://padlet.com/azni_astro/KOS1110CPP for the notes.

First, let's explore the basic elements of this programming language. There are:

  • Simple C++ program
  • Statement execution
  • Input/Output operations
  • Data types
  • Arithmetic expressions
  • Additional operators
  • Selection statement
  • Repetition statement
  • Displaying Table.
1) Simple C++ Program 


Enter the command, click run and you will get the output.
This includes executing the statement and stating the input also it's output.

2) Data types
  • floating point numbers - numbers with fraction or decimals
  • integers- exact number without decimal
  • characters- single character, enclosed in single quotes
  • string- group of characters, enclosed in double quotes.
3) Arithmetic expressions
  • the operations are done step by step, the expression can also be used foe division, percentage and rounding off.
4) Additional operators



by using this program, we just insert the formula and introduce the unknowns and finally we will find the answer we desired for.

5) Selection statement
  • we use the if/ else statement in comparing the situation. If we enter our data, the program will show our status in condition that the the status are derived and introduced first.
6) Repetition statement

-3 types of loop statement:
  • ‘while’ statement 
  •  ‘for ’ statement 
  • ‘do-while’ statement 
- 2 types of loop:
  • sentinal loop = loop that gives a specific value marking the end point (eg: determining wavelength)
  • counting loop= representing the number of loops( eg: determining number of car exceeding the speed limit.)
7)Displaying table.
*Credit to Dr. Azni for the notes and the slides.

Let's Learn About Python

12:52 AM





Once Anaconda / Mini Conda has been installed, open up command prompt and type the command:
(1) Please type
conda update conda 
(2) Then create environment using;
Conda create - - name (any name) anaconda
Conda info - -envs
activate envsname    
(3) If conda asks; ‘proceed([y]/n)’ , type ‘y’ which means "yes" to proceed
(4) To launch jupyter notebook, type;
Jupyter notebook
Make sure you press ENTER after ever command.
However, if miniconda is downloaded instead of anaconda, jupyter notebook must be downloaded separately. This version of the jupyter notebook doesn't require the internet.

By using python, you can write your first code. So, you can write anything that you want in the jupyter notebook or in python command line terminal such as below:
print ('Hello World')
Then, when you press ENTER, you can see this output:
Hello World
Python is one of the easiest language to learn and create.


PROGRAM TO ADD TWO NUMBERS
# Add two numbers
num1 = 3
num2 = 5
sum = num1+num2
print(sum)
Next, we proceed with the program that add two numbers.
Line 1: # Add two numbers. Any line starting with # in Python programming is a comment. Comments are used in programming to describe the purpose of the code. This helps you as well as other programmers to understand the intent of the code. Comments are completely ignored by compilers and interpreters.
Line 2: num1 = 3
Here, num1 is a variable. You can store a value in a variable. Here, 3 is stored in this variable.
Line 3: num2 = 5
Similarly, 5 is stored in num2 variable.
Line 4: sum = num1+num2
The variables num1 and num2 are added using + operator. The result of addition is then stored in another variable sum.
Line 5: print(sum)
The print() function prints the output to the screen. In our case, it prints 8 on the screen.
The output display on screen is
8


PYTHON VARIABLES


A variable is a location in memory used to store some data (value).They are given unique names to differentiate between different memory locations. In Python, we simply assign a value to a variable and it will exist. We don't even have to declare the type of the variable. This is handled internally according to the type of value we assign to the variable. We use the assignment operator (=) to assign values to a variable. Any type of value can be assigned to any valid variable.
a = 5
b = 3.2
c = "Hello"
In Python, multiple assignments can be made in a single statement as follows:
a, b, c = 5, 3.2, "Hello"

  • If we want to assign the same value to multiple variables at once, we can do this as
x = y = z = 1


DATA TYPES

There are various data types in Python. Some of the important types are listed below.

1 .Python Numbers

Integers, floating point numbers and complex numbers falls under Python numbers category. They are defined as int, float and complex class in Python.
Integers can be of any length, it is only limited by the memory available.
A floating point number is accurate up to 15 decimal places. Integer and floating points are separated by decimal points. 1 is integer, 1.0 is floating point number.
Complex numbers are written in the form, x + yj, where x is the real part and y is the imaginary part. Here are some examples.
a = 1234567890123456789
b = 0.1234567890123456789
c = 1+2j

2. String

String is sequence of Unicode characters. We can use single quotes or double quotes to represent strings. Multi-line strings can be denoted using triple quotes, ''' or " " ".
s = "This is a string"
s = '''a multiline

3. List

List is an ordered sequence of items. It is one of the most used datatype in Python and is very flexible. All the items in a list do not need to be of the same type.
Declaring a list is pretty straight forward. Items separated by commas are enclosed within brackets [ ].
a = [1, 2.2, 'python']
We can use the slicing operator [ ] to extract an item or a range of items from a list. Index starts form 0 in Python.
a = [5,10,15,20,25,30,35,40]

# a[2] = 15
print("a[2] = ", a[2])
Output : a[2] = 15
# a[0:3] = [5, 10, 15]
print("a[0:3] = ", a[0:3])
Output : a[0:3] = [5, 10, 15]
# a[5:] = [30, 35, 40]
print("a[5:] = ", a[5:])
Output : a[5:] = [30, 35, 40]
colors = ['red', 'blue', 'green']
  print colors[0]    ## red
  print colors[2]    ## green
  print len(colors)  ## 3
Output:
red
green
3

4. Dictionary

Dictionary is an unordered collection of key-value pairs.
It is generally used when we have a huge amount of data. Dictionaries are optimised for retrieving data. We must know the key to retrieve the value.
In Python, dictionaries are defined within braces {} with each item being a pair in the form key:value. Key and value can be of any type.
d = {1:'value','key':2}
print(type(d))
Output : <class 'dict'>
print("d[1] = ", d[1]);
Output : d[1] = value
print("d['key'] = ", d['key']);
Output : d['key'] = 2
# Generates error
print("d[2] = ", d[2]);

5. Set

Set is an unordered collection of unique items. Set is defined by values separated by comma inside braces { }. Items in a set are not ordered.
a = {5,2,3,1,4}

# printing set variable
print("a = ", a)

# data type of variable a
print(type(a))


CONVERSION BETWEEN DATA TYPES

We can convert between different data types by using different type conversion functions like int(), float(), str() etc.
float(5)
Output : 5.0
int(10.6)
Output: 10
str(25)
Output : '25'
set([1,2,3])
Output : {1, 2, 3}
tuple({5,6,7})
Output : (5, 6, 7)
list('hello')
Output : ['h', 'e', 'l', 'l', 'o']
For more details, we can learn this program in the tutorial in Software Carpentry
Last but not least, download python-novice-inflammation-data.zip and extract the files.




REPEATING ACTION WITH LOOPS

The loop variable was given the name char as a mnemonic; it is short for ‘character’. ‘ Char is not a keyword in Python that pulls the characters from words or strings.
list = ['oxygen','nitrogen','argon']
for char in list:
   print(char)

oxygen
nitrogen
argon

We can choose any name we want for variables.We might just as easily have chosen the name banana for the loop variable.It is a good idea to choose variable names that are meaningful so that it is easier to understand what the loop is doing.
word = 'oxygen'
for banana in word:
    print(banana)
o
x
y
g
e
n

Here is another loop that repeatedly updates a variable:
length = 0
for vowel in 'aeiou':
    length = length + 1
print('There are', length, 'vowels')
There are 5 vowels

The loop variable is still exists even after the loop is over and we can re-use variables previously defined as loop variables as well:
letter = 'z'
for letter in 'abc':
    print(letter)
print('after the loop, letter is', letter)

a
b
c
after the loop, letter is c

Python

9:27 AM

Image result for python cartoon 
Last week we received a new lecturer and we learnt about Python which is a coding programme. It is a widely used high-level programming language for general purpose programming, created by Guido van Rossum and first released in 1991.


(slides credits to: Dr KB)



SMILES

7:23 PM

Image result for smile picture tumblr

We learnt a new topic last week and the topic is about SMILES. What is SMILES? SMILES is short form for Simplified Molecular Input Line Entry System. It is used to translate a chemical's three-dimensional structure into a string of symbol that is easily understood by computer software. The purpose of SMILES is to translate the structure into a linear representation so that a computer program can understand the structure. We also learned how to name chemical structures using IUPAC format in detail.

The pictures below are SMILES Specification Rules- as in rules on how to convert the chemical compound structures into SMILES notation;





 

( slides credits to: Dr Azran)

Psychology of Color

6:53 AM

Image result for psychology of color

Colours, without us realizing it, plays a huge role in our life. The colours we choose actually defines our personality and moods. In our last class with Dr. Azran, he explained about the psychology of color and how colors actually play a major role- especially for presentations. It is very important to choose the right colour for powerpoints as they reflect what we feel. For example, the colour blue might reflect that the presenters are feeling calm and collected. So, to conclude, it is important to choose the right colour to get an excellent presentation and impression from the audience. 

Image result for psychology of color

Image result for psychology of color

NCBI

11:39 PM

Image result for internet picture tumblr
We learnt how to use the NCBI site last week. NCBI actually stands for National Center for Biotechnology Information and it is a site that houses a series of databases relevant to biotechnology and biomedicine and is an important resource for bioinformatics tools and services. Major databases include GenBank for DNA sequences and PubMed a bibliographic database for the biomedical literature.

The reason to us learning how to use the NCBI site is because our second assignment, after this blog assignment is to do a research on a given gene assigned to our groups by Dr. Azran using the NCBI site and even search for journals from that site.

Firstly we learnt how to search data (article and gene) using the search tool. The options are Nucleotide, Blast, Gene, PubMed and DNA and RNA. The nucleotide database is a collection of sequences. Blast consists of protein Blast- Blastx- Tblastin- Recent results- Tblastx. For gene, a portal to gene-specific content based on NCBI's RefSeq project. PubMed comprises more than twenty million citations for biomedical. For DNA&RNA: GeneBank- Nucleotide-Assembly-BioSample.

We learnt that we can search for article using PubMed using different keywords. For example if we use the keyword Yamanaka (full name: Shinhya Yamanaka, a Japanese Nobel Prize-winnin stem cell researcher) to search for data we will get a different data, maybe more results compared to when we search using the keyword Yamanaka S. We can also specifically search using keyword Yamanaka s AND Cell to specifically search for articles on Shinhya Yamanaka's cell articles.

Thank you.

PLOTTING GRAPH IN EXCEL

11:25 PM

To calculate the average , insert the formula 
=AVERAGE(insert the data required),and then enter for the result.


                                     
To calculate the variance , insert the formula 
=VAR(insert the data required),and then enter for the result.

To calculate the standard deviation , insert the formula 
=STDEV(insert the data required),and then enter for the result.

Select the data required and select 'scattered' graph from the 
icons

Adjust the axis to suit the size of the graph


Right click at any point in the graph,choose 'trendline' and select linear
to get the straight line axis

 tick the boxes for the formula that you need! Done!










1:16 AM

INTERNET

WHAT IS THE "VICTORIAN INTERNET"???
  • THE TELEGRAPH
  • INVENTED IN 1840'S
  • MORSE CODE WAS DOTS AND DASHES, OR SHORT SIGNALS AND LONG SIGNALS
WHAT IS THE INTERNET???
  • THE LARGEST NETWORK OF NETWORKS IN THE WORLD
  • USES TCP/IP PROTOCOLS
HISTORY OF INTERNET



EVOLUTION OF INTERNET




             

Lumos

Lumos

Lumos

Lumos

Lumos

Lumos