This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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) |
NewerOlder