Skip to content

Instantly share code, notes, and snippets.

View ParzivalWins's full-sized avatar
💭
Know Thyself

Parzival ParzivalWins

💭
Know Thyself
View GitHub Profile
@ParzivalWins
ParzivalWins / dask-python.md
Created March 26, 2020 21:43
Parallel-Python-Data-Pipeline

‎‎​

@ParzivalWins
ParzivalWins / file import
Created March 28, 2020 19:33
Importing data into Jupyter Notebook
# set parameters here
savepath = 'datasets/aws/chest_xray/pneumonia'
seed = 0
np.random.seed(seed) # Reset the seed so all runs are the same.
random.seed(seed)
MAXVAL = 255 # Range [0 255]
# path to covid-19 dataset from https://github.com/ieee8023/covid-chestxray-dataset
imgpath = 'images'
csvpath = 'metadata.csv'
@ParzivalWins
ParzivalWins / jupyterlab_shortcuts.md
Created April 2, 2020 17:39 — forked from discdiver/jupyterlab_shortcuts.md
Common Jupyter Lab Keyboard Shortcuts

Note, if you are on a Mac, substitute command for control. Don't type the + (it means press both keys at once).

Shortcuts when in either command mode (outside the cells) or edit mode (inside a cell):

  • Shift + Enter run selected cells

  • Ctrl + S save and checkpoint

  • Ctrl + Shift + S save as

  • Ctrl + B toggles hide/show left sidebar

@ParzivalWins
ParzivalWins / oura.py
Created April 3, 2020 23:34
Oura-Flask-Server-API
import requests
import os
import pandas as pd
from flask import Flask, request, redirect, session, url_for
from requests_oauthlib import OAuth2Session
import json
OUTPUT_PATH = 'output/'
@ParzivalWins
ParzivalWins / kaggle_download.py
Created April 9, 2020 19:38 — forked from jayspeidell/kaggle_download.py
Sample script to download Kaggle files
# Info on how to get your api key (kaggle.json) here: https://github.com/Kaggle/kaggle-api#api-credentials
!pip install kaggle
api_token = {"username":"USERNAME","key":"API_KEY"}
import json
import zipfile
import os
with open('/content/.kaggle/kaggle.json', 'w') as file:
json.dump(api_token, file)
!chmod 600 /content/.kaggle/kaggle.json
!kaggle config path -p /content
@ParzivalWins
ParzivalWins / cloudSettings
Last active April 10, 2020 18:30
cloudSettings2-Public
{"lastUpload":"2020-04-10T18:30:10.283Z","extensionVersion":"v3.4.3"}
## Prerequisites
- Hugo > 0.55.0
## Content Management
@ParzivalWins
ParzivalWins / same-Function.md
Created May 25, 2020 00:40
sample function

function definition and declaration

def calculate_sum(a,b): sum = a+b return sum

The below statement is called function call

print(calculate_sum(2,3)) # 5 //TODO @parzival OK

@ParzivalWins
ParzivalWins / index.html
Last active July 13, 2020 19:18
FirstPlayground
Hello

##test #hello ####world