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 re | |
from pprint import pprint | |
def parse_request(request_str): | |
pattern = re.compile(r"""(?P<method>.*)\s # method, space | |
(?P<url>.*)\s # url, space | |
(?P<protocol>.*) # protocol | |
""", re.VERBOSE) | |
match = pattern.match(request_str) |
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 datetime | |
import json | |
import requests | |
from random_words import * | |
import random | |
import MySQLdb | |
import MySQLdb.cursors | |
users = [] | |
forums = [] |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Socket.IO chat</title> | |
<style> | |
* { margin: 0; padding: 0; box-sizing: border-box; } | |
body { font: 13px Helvetica, Arial; } | |
form { background: #000; padding: 3px; position: fixed; bottom: 0; width: 100%; } | |
form input { border: 0; padding: 10px; width: 90%; margin-right: .5%; } | |
form button { width: 9%; background: rgb(130, 224, 255); border: none; padding: 10px; } |
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/bash | |
SRC=$1 | |
DEST=$2 | |
i=1 | |
for ph in ${SRC}/*; do | |
filename=$(basename "$ph") | |
ext="${filename##*.}" | |
new_filename="${i}.${ext}" | |
#echo $new_filename |
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
from pprint import pprint | |
import math | |
from scipy.optimize import curve_fit | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import pylab | |
import scipy.stats as stats | |
import sklearn.linear_model | |
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
use 5.010; | |
use strict; | |
use warnings; | |
use AnyEvent; | |
use AnyEvent::Handle; | |
use AnyEvent::Socket; | |
use AnyEvent::Log; | |
use Data::Dumper; |
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 | |
TIMESTAMP=`date +%Y-%m-%d-%H-%M-%S` | |
IMAGEPATH=$HOME/Dropbox/Public/Screenshots/Screenshot_$TIMESTAMP.png | |
gnome-screenshot $1 -f $IMAGEPATH | |
dropbox puburl $IMAGEPATH | xclip -selection clipboard |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<configuration> | |
<system.webServer> | |
<handlers> | |
<add name="httpplatformhandler" path="*" verb="*" modules="httpPlatformHandler" resourceType="Unspecified" /> | |
</handlers> | |
<httpPlatform processPath="d:\home\site\wwwroot\go\bin\go.exe" | |
arguments="run d:\home\site\repository\app.go" | |
startupTimeLimit="60"> | |
<environmentVariables> |
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 tensorflow as tf | |
import tensorflow.examples.tutorials.mnist.input_data | |
import numpy as np | |
mnist = tensorflow.examples.tutorials.mnist.input_data.read_data_sets("MNIST_data/", one_hot=True) | |
image_size = 28 | |
n_labels = 10 | |
def create_w_b(n_prev_layer, n_next_layer): |
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 tensorflow as tf | |
import tensorflow.examples.tutorials.mnist.input_data | |
import numpy as np | |
mnist = tensorflow.examples.tutorials.mnist.input_data.read_data_sets("MNIST_data/", one_hot=True) | |
image_size = 28 | |
n_labels = 10 | |
def create_w_b(n_prev_layer, n_next_layer): |
OlderNewer