Copy and paste from W3School
But I had a problem with WSL with following error:
Unhandled rejection Error: EXDEV: cross-device link not permitted
| import yaml | |
| content = """First line | |
| Second line | |
| Third line""" | |
| print("The following is the content") | |
| print(content) |
| import matplotlib.pyplot as plt | |
| from sklearn.datasets import make_classification | |
| from sklearn.decomposition import PCA | |
| import numpy as np | |
| X1, Y2 = make_classification(n_features=2, n_informative=2, n_redundant=0, | |
| n_classes=1, | |
| n_clusters_per_class=1) | |
| x0 = X1[:,0] |
| { | |
| "train_test_split": { | |
| "raw": [ | |
| "outliers/outlier_removal_regression.py:23:from sklearn.cross_validation import train_test_split", | |
| "regression/finance_regression.py:30:from sklearn.cross_validation import train_test_split", | |
| "pca/eigenfaces.py:26:from sklearn.cross_validation import train_test_split", | |
| "final_project/poi_id.py.bak:52:from sklearn.cross_validation import train_test_split", | |
| "final_project/poi_id.py:67: from sklearn.cross_validation import train_test_split", | |
| "validation/validate_poi.py:32:from sklearn.model_selection import train_test_split", | |
| "evaluation/validate_poi.py:32:from sklearn.model_selection import train_test_split", |
| # Refer to https://developers.google.com/api-client-library/python/ | |
| from apiclient.discovery import build | |
| from httplib2 import Http | |
| from oauth2client import file, client, tools | |
| from googleapiclient.http import MediaFileUpload, MediaIoBaseDownload | |
| import mimetypes, io | |
| from pprint import pprint | |
| class DriveAPI(): | |
| def __init__(self): |
| class MyClass(): | |
| def __init__(self): | |
| self.foo = "foo" | |
| # Ignored. | |
| def __getattr__(self, attribute): | |
| print("__getattr__ for {} called".format(attribute)) | |
| def __getattribute__(self, attribute): | |
| print("__getattribute__ for {} called".format(attribute)) |
| Environment.getExternalStorageDirectory() | |
| - /storage/emulated/0 | |
| Environment.getExternalStoragePublicDirectory("") // Error on `null` | |
| - /storage/emulated/0 | |
| Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) | |
| - /storage/emulated/0/Pictures | |
| getExternalFilesDir(null) // Parameter "" returns the same |
| try: | |
| from xml.etree.cElementTree import XML | |
| except ImportError: | |
| from xml.etree.ElementTree import XML | |
| import zipfile, re | |
| """ | |
| Module that extract text from MS XML Word document (.docx). | |
| (Inspired by python-docx <https://github.com/mikemaccana/python-docx>) |
| import sys, os, json, time | |
| from examine_docx_elements import run as getDocxElements | |
| def main(): | |
| print("Started") | |
| rootdir = sys.argv[1] | |
| before = time.time() | |
| output = run(rootdir) | |
| after = time.time() | |
| print(output) |
| const fs = require("fs"); | |
| function createParser() { | |
| const ArgumentParser = require("argparse").ArgumentParser; | |
| const parser = new ArgumentParser({ }); | |
| parser.addArgument( | |
| ['filepath'], | |
| { | |
| type: String, |
Copy and paste from W3School
But I had a problem with WSL with following error:
Unhandled rejection Error: EXDEV: cross-device link not permitted