This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python-wordpress-xmlrpc==2.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"code": "AF", | |
"value": 53, | |
"name": "Afghanistan" | |
}, | |
{ | |
"code": "AL", | |
"value": 117, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.