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
<?php | |
$query = "SELECT * FROM members WHERE login='$login'"; | |
$result = mysql_query($query) or die(mysql_error()); | |
if ( mysql_num_rows($result) < 1 ) die("Invalid user?"); | |
$record = mysql_fetch_assoc($result); | |
$hash = hash('sha256', $record['salt'] . $_POST['password']); |
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 | |
# This makes Python use the newer print() syntax. | |
import socket | |
import time | |
import sys | |
import twitter |
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
def one(iterable, condition=bool): | |
found = False | |
for i in iterable: | |
if not condition(i): continue | |
if found: return False | |
found = True | |
return found |
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 itertools | |
import random | |
import sys | |
import timeit | |
from collections import defaultdict | |
from pymongo import version as pymongo_version | |
from distutils.version import StrictVersion | |
import mongoengine as db | |
from pycallgraph.output.graphviz import GraphvizOutput |
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
class Helper: | |
encoding = 'utf-8' | |
def __init__(self, udid, it_pro): | |
self.udid = udid | |
self.itpro = it_pro | |
def employee_id(self): | |
sql = "select emplid from emplid_to_alphaname where alphaname = (%s);", (self.udid, ) |
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 html import tag as H | |
def app(environ, start_response): | |
start_response('200 OK', []) | |
page = H.html [ | |
H.title("Transvoice App"), # I use double quotes for human text, single for machine. | |
H.style("…"), | |
H.article(data_layout='twin') [ | |
H.header [ H.h3 [ "Main Language" ] ], |