Skip to content

Instantly share code, notes, and snippets.

@St-Hakky
Last active January 23, 2018 04:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save St-Hakky/50f6a8235845668a80b3b60c6fa1f4b8 to your computer and use it in GitHub Desktop.
Save St-Hakky/50f6a8235845668a80b3b60c6fa1f4b8 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"toc": "true"
},
"source": [
"# Table of Contents\n",
" <p><div class=\"lev1 toc-item\"><a href=\"#Hello-World\" data-toc-modified-id=\"Hello-World-1\"><span class=\"toc-item-num\">1&nbsp;&nbsp;</span>Hello World</a></div><div class=\"lev1 toc-item\"><a href=\"#Basic-Math\" data-toc-modified-id=\"Basic-Math-2\"><span class=\"toc-item-num\">2&nbsp;&nbsp;</span>Basic Math</a></div>"
]
},
{
"cell_type": "markdown",
"metadata": {
"collapsed": true
},
"source": [
"# Hello World"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2018-01-23T13:10:28.309000Z",
"start_time": "2018-01-23T04:10:27.347Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Hello World\n"
]
}
],
"source": [
"# Hello World\n",
"println(\"Hello World\")"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2018-01-23T13:10:29.005000Z",
"start_time": "2018-01-23T04:10:27.834Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"String"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#=\n",
"Assign String Value to Variable and check type of the value.\n",
"\n",
"This is also the example how to write long comments.\n",
"=#\n",
"hello_world = \"Hello World\"\n",
"typeof(hello_world)"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"end_time": "2018-01-23T13:10:29.046000Z",
"start_time": "2018-01-23T04:10:28.036Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Hello World\n"
]
}
],
"source": [
"# output hello_world\n",
"println(hello_world)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Basic Math"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"ExecuteTime": {
"end_time": "2018-01-23T13:10:30.171000Z",
"start_time": "2018-01-23T04:10:30.011Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"17"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# sum\n",
"a = 10 + 7"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2018-01-23T13:10:30.197000Z",
"start_time": "2018-01-23T04:10:30.194Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"3"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# diff\n",
"b = 10 - 7"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"ExecuteTime": {
"end_time": "2018-01-23T13:10:30.399000Z",
"start_time": "2018-01-23T04:10:30.396Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"70"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# product\n",
"c = 10 * 7"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"ExecuteTime": {
"end_time": "2018-01-23T13:10:31.252000Z",
"start_time": "2018-01-23T04:10:31.014Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"1.4285714285714286"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# quotient\n",
"d = 10 / 7"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"ExecuteTime": {
"end_time": "2018-01-23T13:10:31.260000Z",
"start_time": "2018-01-23T04:10:31.194Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"10000000"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# power\n",
"e = 10 ^ 7"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"ExecuteTime": {
"end_time": "2018-01-23T13:10:31.400000Z",
"start_time": "2018-01-23T04:10:31.397Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"3"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# modulus\n",
"f = 10 % 7"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Julia 0.6.0",
"language": "julia",
"name": "julia-0.6"
},
"language_info": {
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "0.6.0"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
"autocomplete": true,
"bibliofile": "biblio.bib",
"cite_by": "apalike",
"current_citInitial": 1,
"eqLabelWithNumbers": true,
"eqNumInitial": 1,
"hotkeys": {
"equation": "Ctrl-E",
"itemize": "Ctrl-I"
},
"labels_anchors": false,
"latex_user_defs": false,
"report_style_numbering": false,
"user_envs_cfg": false
},
"toc": {
"colors": {
"hover_highlight": "#DAA520",
"navigate_num": "#000000",
"navigate_text": "#333333",
"running_highlight": "#FF0000",
"selected_highlight": "#FFD700",
"sidebar_border": "#EEEEEE",
"wrapper_background": "#FFFFFF"
},
"moveMenuLeft": true,
"nav_menu": {
"height": "4px",
"width": "254px"
},
"navigate_menu": true,
"number_sections": true,
"sideBar": true,
"threshold": 4,
"toc_cell": true,
"toc_section_display": "block",
"toc_window_display": true,
"widenNotebook": false
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment