update examples
Browse files- utils/examples.json +10 -5
utils/examples.json
CHANGED
|
@@ -4,6 +4,16 @@
|
|
| 4 |
"value": "def print_hello_world():\n \"\"\"Print 'Hello World!'.\"\"\"",
|
| 5 |
"length": 8
|
| 6 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
{
|
| 8 |
"name": "Filesize",
|
| 9 |
"value": "def get_file_size(filepath):",
|
|
@@ -20,11 +30,6 @@
|
|
| 20 |
"length": 64
|
| 21 |
|
| 22 |
},
|
| 23 |
-
{
|
| 24 |
-
"name": "Scikit-Learn",
|
| 25 |
-
"value": "import numpy as np\nfrom sklearn.ensemble import RandomForestClassifier\n\n# create training data\nX = np.random.randn(100, 100)\ny = np.random.randint(0, 1, 100)\n\n# setup train test split",
|
| 26 |
-
"length": 96
|
| 27 |
-
},
|
| 28 |
{
|
| 29 |
"name": "Pandas",
|
| 30 |
"value": "# load dataframe from csv\ndf = pd.read_csv(filename)\n\n# columns: \"age_group\", \"income\"\n# calculate average income per age group",
|
|
|
|
| 4 |
"value": "def print_hello_world():\n \"\"\"Print 'Hello World!'.\"\"\"",
|
| 5 |
"length": 8
|
| 6 |
},
|
| 7 |
+
{
|
| 8 |
+
"name": "Is_in_list",
|
| 9 |
+
"value": "def is_in_list(L, e):\n \"\"\"Find if list L contains the element e.\"\"\"",
|
| 10 |
+
"length": 36
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"name": "Scikit-Learn",
|
| 14 |
+
"value": "import numpy as np\nfrom sklearn.ensemble import RandomForestClassifier\n\n# create training data\nX = np.random.randn(100, 100)\ny = np.random.randint(0, 1, 100)\n\n# setup train test split",
|
| 15 |
+
"length": 96
|
| 16 |
+
},
|
| 17 |
{
|
| 18 |
"name": "Filesize",
|
| 19 |
"value": "def get_file_size(filepath):",
|
|
|
|
| 30 |
"length": 64
|
| 31 |
|
| 32 |
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
{
|
| 34 |
"name": "Pandas",
|
| 35 |
"value": "# load dataframe from csv\ndf = pd.read_csv(filename)\n\n# columns: \"age_group\", \"income\"\n# calculate average income per age group",
|