Skip to content

Instantly share code, notes, and snippets.

View nrrb's full-sized avatar
:shipit:
Learning

Nicholas Bennett nrrb

:shipit:
Learning
View GitHub Profile
@nrrb
nrrb / gist:92e7950a27b2b96b52830fa54c09e9c8
Created November 28, 2017 01:24 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@nrrb
nrrb / convert.py
Last active May 16, 2017 18:47 — forked from paulgb/convert.py
Convert the Yelp Academic dataset from JSON to CSV files with Pandas.
'''
Convert Yelp Academic Dataset from JSON to CSV
Requires Pandas (https://pypi.python.org/pypi/pandas)
By Paul Butler, No Rights Reserved
'''
import json
import pandas as pd
#!/usr/bin/python
from __future__ import print_function
from pprint import pprint
# Write a function done_or_not passing a board (list[list_lines]) as parameter.
# If the board is valid return 'Finished!', otherwise return 'Try again!'
# Sudoku rules:
#
# ROWS:
@nrrb
nrrb / face_detect.py
Last active September 14, 2015 02:52 — forked from 46bit/face_detect.py
Face detection using OpenCV. Refactored from https://realpython.com/blog/python/face-recognition-with-python/.
import sys, cv2
# Refactored https://realpython.com/blog/python/face-recognition-with-python/
def cascade_detect(cascade, image):
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
return cascade.detectMultiScale(
gray_image,
scaleFactor = 1.15,
minNeighbors = 5,
#!/bin/sh
# copied from http://zeroset.mnim.org/2013/03/14/sftp-support-for-curl-in-ubuntu-12-10-quantal-quetzal-and-later/
mkdir /tmp/curl
cd /tmp/curl
sudo apt-get update
sudo apt-get install build-essential debhelper libssh2-1-dev
apt-get source curl
sudo apt-get build-dep curl
cd curl-*
dpkg-buildpackage
@nrrb
nrrb / Makefile
Last active November 28, 2018 21:36
Periodic Screenshots (every 10 seconds) on Mac OS X
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " screencap To start recording screencaps and clean up yesterday's captures."
@echo " cleanyesterday Just delete yesterday's captures."
@echo " captoday Just start recording screencaps for today."
screencap:
./remove_yesterday_recording.sh
./start_recording.sh
@nrrb
nrrb / -
Created April 13, 2015 22:32
# BEGIN W3TC Browser Cache
<IfModule mod_deflate.c>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
<IfModule mod_mime.c>
# DEFLATE by extension
AddOutputFilter DEFLATE js css htm html xml
</IfModule>
@nrrb
nrrb / requirements.txt
Created March 13, 2015 20:57
Scrape all the URLs shared in the INN Nerd Newsletters http://nerds.inn.org/category/newsletter/
python-wordpress-xmlrpc==2.3
# http://www.reddit.com/r/beginnerprojects/comments/19kxre/project_99_bottles_of_beer_on_the_wall_lyrics/
# GOAL
# Create a program that prints out every line to the song "99 bottles of beer on the wall." This should be a pretty simple
# program, so to make it a bit harder, here are some rules to follow.
# RULES
# If you are going to use a list for all of the numbers, do not manually type them all in. Instead, use a built in function.
# Besides the phrase "take one down," you may not type in any numbers/names of numbers directly into your song lyrics.
# Remember, when you reach 1 bottle left, the word "bottles" becomes singular.
def amount_of_beer_in_words(bottles):
if bottles == 1:
[
{
"code": "AF",
"value": 53,
"name": "Afghanistan"
},
{
"code": "AL",
"value": 117,