Skip to content

Instantly share code, notes, and snippets.

View marcolussetti's full-sized avatar

Marco Lussetti marcolussetti

View GitHub Profile
@marcolussetti
marcolussetti / BCFerriesCLI.py
Created September 2, 2017 17:19 — forked from Evantm/BCFerriesCLI.py
CLI interface for BC Ferries
import click
import requests
from urllib.parse import urlparse,parse_qs
routes = {'TSA':['30','01','09'],'HSB':['02','03','08'],'LNG':['03'],'SWB':['01','04','05'],'DUK':['30'],'NAN':['02']}
url = 'http://orca.bcferries.com:8080/cc/marqui/sailingDetail.asp?route={0}&dept={1}'
@click.command()
@click.option('-d','--depart', type=click.Choice(['TSA', 'HSB','LNG','SWB','DUK','NAN']), prompt='Departure',
help='Where the ferry is departing.')
@marcolussetti
marcolussetti / 20170920.ipynb
Last active September 20, 2017 20:04
20170920 NLP
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marcolussetti
marcolussetti / 20170908-NLP.ipynb
Created September 20, 2017 20:12
20170908 NLP Notes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marcolussetti
marcolussetti / live_test.py
Last active October 14, 2019 01:30
Quick testing of recipe_scrapers with live data
#!/usr/bin/env python3
"""Quick and dirty check of what's running and what isn't"""
from recipe_scrapers import scrape_me
import pandas as pd
import numpy as np
import logging
log = logging.Logger("")
@marcolussetti
marcolussetti / git-change-commit-messages.md
Created October 29, 2017 21:54 — forked from nepsilon/git-change-commit-messages.md
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@marcolussetti
marcolussetti / Oamar Notes.ipynb
Last active November 29, 2017 19:53
Oamar_Notes.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@marcolussetti
marcolussetti / initial_setup.sh
Created January 15, 2018 17:23
Deploy via Git to cs.tru.ca
# This is meant to be manually run
# First generate a key, see https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa
# GO to your repo on github
@marcolussetti
marcolussetti / pickleViewer.py
Created January 22, 2018 16:59 — forked from mcitron/pickleViewer.py
Viewer for arbitrary pickle files
#!/usr/bin/python
import pickle
from collections import defaultdict
from collections import OrderedDict
import sys
def checkDict(inputData):
return (type(inputData) == dict or type(inputData) == defaultdict\
or type(inputData) == OrderedDict)
// tslint:disable
declare module 'react-lottie' {
/**
* @param loop if the animation must be continue after the animation has fully executed
* @param autoplay if the animation needs to be started when the react component requests rendering
* @param animationData require here the animation data in format JSON
* @param rendererSettings
*/
interface LottieBodymovinOptionProps {
loop?: boolean,
// tslint:disable
declare namespace Lottie {
export interface AnimationItem {
addEventListener(name: string, callback: () => void): void;
// To destroy and release resources.
destroy(): void;
// first param is a numeric value. second param is a boolean that defines time or frames for first param
goToAndPlay(value: number, isFrame: boolean): void;