Skip to content

Instantly share code, notes, and snippets.

@sizhky
sizhky / GitCommitEmoji.md
Last active November 11, 2021 09:57 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@sizhky
sizhky / classes
Created August 22, 2021 10:34
coco-things
background
person
bicycle
car
motorcycle
airplane
bus
train
truck
boat
AtBat Hits HmRun Runs RBI Walks Years CAtBat CHits CHmRun CRuns CRBI CWalks League Division PutOuts Assists Errors Salary NewLeague
293 66 1 30 29 14 1 293 66 1 30 29 14 A E 446 33 20 NA A
315 81 7 24 38 39 14 3449 835 69 321 414 375 N W 632 43 10 475 N
479 130 18 66 72 76 3 1624 457 63 224 266 263 A W 880 82 14 480 A
496 141 20 65 78 37 11 5628 1575 225 828 838 354 N E 200 11 3 500 N
321 87 10 39 42 30 2 396 101 12 48 46 33 N E 805 40 4 91.5 N
594 169 4 74 51 35 11 4408 1133 19 501 336 194 A W 282 421 25 750 A
185 37 1 23 8 21 2 214 42 1 30 9 24 N E 76 127 7 70 A
298 73 0 24 24 7 3 509 108 0 41 37 12 A W 121 283 9 100 A
323 81 6 26 32 8 2 341 86 6 32 34 8 N W 143 290 19 75 N
sepal.length sepal.width petal.length petal.width Name
5.1 3.5 1.4 .2 Setosa
4.9 3 1.4 .2 Setosa
4.7 3.2 1.3 .2 Setosa
4.6 3.1 1.5 .2 Setosa
5 3.6 1.4 .2 Setosa
5.4 3.9 1.7 .4 Setosa
4.6 3.4 1.4 .3 Setosa
5 3.4 1.5 .2 Setosa
4.4 2.9 1.4 .2 Setosa
@sizhky
sizhky / data.csv
Created July 4, 2021 06:36
Breast cancer dataset
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 33 columns, instead of 32 in line 1.
"id","diagnosis","radius_mean","texture_mean","perimeter_mean","area_mean","smoothness_mean","compactness_mean","concavity_mean","concave points_mean","symmetry_mean","fractal_dimension_mean","radius_se","texture_se","perimeter_se","area_se","smoothness_se","compactness_se","concavity_se","concave points_se","symmetry_se","fractal_dimension_se","radius_worst","texture_worst","perimeter_worst","area_worst","smoothness_worst","compactness_worst","concavity_worst","concave points_worst","symmetry_worst","fractal_dimension_worst",
842302,M,17.99,10.38,122.8,1001,0.1184,0.2776,0.3001,0.1471,0.2419,0.07871,1.095,0.9053,8.589,153.4,0.006399,0.04904,0.05373,0.01587,0.03003,0.006193,25.38,17.33,184.6,2019,0.1622,0.6656,0.7119,0.2654,0.4601,0.1189
842517,M,20.57,17.77,132.9,1326,0.08474,0.07864,0.0869,0.07017,0.1812,0.05667,0.5435,0.7339,3.398,74.08,0.005225,0.01308,0.0186,0.0134,0.01389,0.003532,24.99,23.41,158.8,1956,0.1238,0.1866,0.2416,0.186,0.275,0.08902
84300903,M,19.69,21.25,130,1203,0.1096,0.1599,0.1974,0.1279,
@sizhky
sizhky / spec.json
Created July 4, 2021 05:26
Vega-Lite spec from Sun Jul 04 2021
{
"config": {"view": {"continuousWidth": 400, "continuousHeight": 300}},
"layer": [
{
"mark": {"type": "line", "interpolate": "basis"},
"encoding": {
"color": {"type": "nominal", "field": "category"},
"x": {"type": "quantitative", "field": "th"},
"y": {"type": "quantitative", "field": "y"}
},
@sizhky
sizhky / remove_jupyter_notebook_cells_output.py
Last active January 5, 2023 14:18 — forked from damianavila/remove_output.py
Remove output from Jupyter notebook from the command line (dev version 1.0)
import sys
import io
import os
from IPython.nbformat.current import read, write
def remove_outputs(nb):
"""remove the outputs from a notebook"""
for ws in nb.worksheets:
for cell in ws.cells:
if cell.cell_type == 'code':
@sizhky
sizhky / eng.testa
Created January 24, 2021 08:24
CoNLL2003 NER Tagging Datasets
CRICKET O
- O
LEICESTERSHIRE I-ORG
TAKE O
OVER O
AT O
TOP O
AFTER O
INNINGS O
VICTORY O
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/Untitled.ipynb (unless otherwise specified).
__all__ = ['iou', 'patch', 'multi_patch']
# Cell
#export
from torch_snippets import *
def iou(A,B):
A = np.array(A)
B = np.array(B)
import requests
import getpass
import sys
LOGIN_URL = "http://zeus.robots.ox.ac.uk/vgg_face2/login/"
FILE_URL = "http://zeus.robots.ox.ac.uk/vgg_face2/get_file?fname=vggface2_test.tar.gz"
print('Please enter your VGG Face 2 credentials:')
user_string = input(' User: ')
password_string = getpass.getpass(prompt=' Password: ')