Upload tutorial.py with huggingface_hub
Browse files- tutorial.py +66 -0
tutorial.py
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
# coding: utf-8
|
3 |
+
|
4 |
+
# # New Chapter
|
5 |
+
# ## Section
|
6 |
+
# * item *italicised* and **bold**
|
7 |
+
|
8 |
+
# In[3]:
|
9 |
+
|
10 |
+
def f(x):
|
11 |
+
return x**2
|
12 |
+
|
13 |
+
|
14 |
+
# In[2]:
|
15 |
+
|
16 |
+
|
17 |
+
f(3)
|
18 |
+
|
19 |
+
|
20 |
+
# In[4]:
|
21 |
+
|
22 |
+
|
23 |
+
get_ipython().system('jupyter notebook list')
|
24 |
+
|
25 |
+
|
26 |
+
# In[5]:
|
27 |
+
|
28 |
+
|
29 |
+
get_ipython().run_line_magic('lsmagic', '')
|
30 |
+
|
31 |
+
|
32 |
+
# In[6]:
|
33 |
+
|
34 |
+
|
35 |
+
get_ipython().system('pwd')
|
36 |
+
|
37 |
+
|
38 |
+
# In[7]:
|
39 |
+
|
40 |
+
|
41 |
+
get_ipython().run_line_magic('pwd', '')
|
42 |
+
|
43 |
+
|
44 |
+
# In[8]:
|
45 |
+
|
46 |
+
|
47 |
+
pwd
|
48 |
+
|
49 |
+
|
50 |
+
# In[14]:
|
51 |
+
|
52 |
+
|
53 |
+
get_ipython().run_cell_magic('timeit', '', 'for i in range(1000):\n i**2\n')
|
54 |
+
|
55 |
+
|
56 |
+
# In[11]:
|
57 |
+
|
58 |
+
|
59 |
+
get_ipython().run_cell_magic('latex', '', '\\begin{equation}\n x = \\frac{1}{q}\n\\end{equation} \n')
|
60 |
+
|
61 |
+
|
62 |
+
# In[ ]:
|
63 |
+
|
64 |
+
|
65 |
+
|
66 |
+
|