Skip to content

Instantly share code, notes, and snippets.

View alaudet's full-sized avatar

Al Audet alaudet

View GitHub Profile
#!/usr/bin/env python
"""
Proof of concept scraper for pinnacle sports
@johanlaidlaw
johanlaidlaw / plotter.py
Created September 20, 2012 19:56
Plot graph from csv file
# python plotter.py test.csv => will produce test.png
# Give it a csv file as argument and it will produce a png image with the same name as the csv file
# It expects the CSV file to be of format '2012-09-20 20:32,1.3,2.1'
# NOTE: This code will show the graph so you need a gui builder. It will fail on a server
# TO make it run on a server use 'Agg'
# import matplotlib
# matplotlib.use('Agg')
# and don't use the show() method
@JSONOrona
JSONOrona / parser.py
Last active January 4, 2021 16:37
Python command line argument example using argparse module
#!/usr/bin/python
''' Python command line argument example using argparse module
Example output:
./parser.py --server=pyserver --port=8080,443,25,22,21 --keyword=pyisgood
Server name: [ pyserver ]
@CamDavidsonPilon
CamDavidsonPilon / 538.json
Last active November 28, 2021 07:37
Use the two files below to mimic graphs on 538. www.dataorigami.net/blogs/fivethirtyeight-mpl
{
"lines.linewidth": 2.0,
"examples.download": true,
"patch.linewidth": 0.5,
"legend.fancybox": true,
"axes.color_cycle": [
"#30a2da",
"#fc4f30",
"#e5ae38",
"#6d904f",
@wkjagt
wkjagt / audio-book-reader.md
Last active April 12, 2024 14:18
How I built an audio book reader for my nearly blind grandfather

#How I built an audio book reader for my nearly blind grandfather

Tweet this - Follow me

Last year, when visiting my family back home in Holland, I also stopped by my grand-parents. My grand-father, now 93 years old, had always been a very active man. However, during the presceding couple of months, he'd gone almost completely blind and now spent his days sitting in a chair. Trying to think of something for him to do, I suggested he try out audio books. After finally convincing him -- he said audio books were for sad old people -- that listening to a well performed recording is actually a wonderful experience, I realized the problem of this idea.

####The problem with audio devices and the newly blind. After my first impulse to jump up and go buy him an

@Geoyi
Geoyi / install virtualenv ubuntu 16.04.md
Created September 16, 2017 12:19 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@bradtraversy
bradtraversy / pipenv_cheat_sheet.md
Last active November 13, 2024 18:53
Pipenv cheat sheet for common commands

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell
@jjmckain
jjmckain / Raspi-Sump InfluxDB and Grafana Integration
Last active March 5, 2020 11:59
Raspi-Sump InfluxDB and Grafana Integration
# This is a change to the project's crontab. As soon as the rsump.py completes, take a brief snooze
(purely for good measure, so the file can be written), then invoke the Telegraf script.
# m h dom mon dow command
*/1 * * * * sudo /usr/local/bin/rsump.py && sleep 2s && sudo /home/pi/raspi-sump/telegraf-logger.sh