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
# -*- coding: utf-8 -*- | |
''' | |
Simple implementation of mailer based on thread and queues. Early version. | |
copy from https://github.com/marcinc81/quemail/blob/master/quemail.py | |
@author: Marcin Chwalek <marcin@chwalek.pl> | |
Example of use: | |
# at start |
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
#include<stdio.h> | |
#include<stdlib.h> | |
#define MAX 100 | |
int choice=1, count=0; | |
double scores[MAX][6]; | |
int notify() { | |
printf("\nYou can do:\n [1]: Input a Student Score\t[2]: Print Students Scores\t[3]: Sort Students Scores\t[4]:Exit\n>>> "); | |
scanf("%d", &choice); |
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 tornado import ioloop | |
from tornado import iostream | |
import socket | |
class Envelope(object): | |
def __init__(self, sender, rcpt, body, callback): | |
self.sender = sender | |
self.rcpt = rcpt[:] | |
self.body = body | |
self.callback = callback |
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
.animation() { | |
-webkit-animation: @arguments; | |
-moz-animation: @arguments; | |
-ms-animation: @arguments; | |
-o-animation: @arguments; | |
animation: @arguments; | |
} | |
.animation-delay() { | |
-webkit-animation-delay: @arguments; | |
-moz-animation-delay: @arguments; |
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/env python | |
#coding:utf-8 | |
import sys, os, re | |
import logging | |
import socket | |
import urlparse | |
from tornado import iostream, ioloop | |
from tornado.httpserver import HTTPServer | |
from tornado import httputil |
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/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright (c) 2012, lepture.com | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# | |
# * Redistributions of source code must retain the above copyright |
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/env python | |
# -*- coding: utf-8 -*- | |
# | |
# Copyright (c) 2012, lepture.com | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# | |
# * Redistributions of source code must retain the above copyright |
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 urllib | |
def decode_xiami_location(s): | |
totle = int(s[0]) | |
s1 = s[1:] | |
chu = len(s1) / totle | |
yu = len(s1) % totle | |
stor = [] |
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
var find = function(data, word){ | |
if(!word.length) return []; | |
var results = []; | |
var fuzzyResults = []; | |
for (i=0; i<data.length; i++) { | |
var _fuzzy = true; | |
var item = data[i]; | |
if(item.key.toLowerCase().indexOf(word) != -1){ | |
item.order = item.key.toLowerCase().indexOf(word); | |
results.push(item); |
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 livereload.task import Task | |
def delay(): | |
import time | |
time.sleep(10) # 10s | |
Task.add('*', delay) |