Skip to content

Instantly share code, notes, and snippets.

View joneswan's full-sized avatar

Jones Wan joneswan

View GitHub Profile
@joneswan
joneswan / progress.py
Created August 18, 2017 08:48 — forked from vladignatyev/progress.py
Python command line progress bar in less than 10 lines of code.
# The MIT License (MIT)
# Copyright (c) 2016 Vladimir Ignatev
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the Software
# is furnished to do so, subject to the following conditions:
#
@joneswan
joneswan / darpa-github.ipynb
Created April 26, 2017 14:21 — forked from tonyfast/darpa-github.ipynb
Scraping DARPA project contributions
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@joneswan
joneswan / Resources.md
Created April 26, 2017 14:21 — forked from ICBacon/Resources.md
List of useful resources obtained during the summer
@joneswan
joneswan / internGistActivity.ipynb
Created April 26, 2017 14:20 — forked from ICBacon/internGistActivity.ipynb
Using Bokeh to visualize my gist activity as an intern
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@joneswan
joneswan / gistOverTime.ipynb
Created April 26, 2017 14:16 — forked from tonyfast/gistOverTime.ipynb
Visualizing Gist Activity in Bokeh
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@joneswan
joneswan / Spark Dataframe Cheat Sheet.py
Created April 26, 2017 14:12 — forked from evenv/Spark Dataframe Cheat Sheet.py
Cheat sheet for Spark Dataframes (using Python)
# A simple cheat sheet of Spark Dataframe syntax
# Current for Spark 1.6.1
# import statements
from pyspark.sql import SQLContext
from pyspark.sql.types import *
from pyspark.sql.functions import *
#creating dataframes
df = sqlContext.createDataFrame([(1, 4), (2, 5), (3, 6)], ["A", "B"]) # from manual data
@joneswan
joneswan / Dockerfile
Created April 26, 2017 14:12 — forked from aliciawyy/Dockerfile
config files of a python project using jupyter notebook in docker (server)
## Edited on 21 June, Alice Wang
## To build the docker image
## $ cd .
## $ docker build -t fc .
FROM debian:8.3
RUN DEBIAN_FRONTEND=noninteractive apt-get update --fix-missing
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y python2.7 python2.7-dev pkg-config
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y libxml2-dev libxslt-dev python-lxml
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.