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
/** | |
* @param {Function} func . | |
* @param {Function} . | |
*/ | |
function decorator(func, begin, end) { | |
return function() { | |
var time = begin(arguments); | |
var result = func.apply(this, arguments); | |
setTimeout(function(){ | |
end(arguments, time); |
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
% cat Makefile | |
compile: | |
make lint | |
make updatedeps | |
make compilejs | |
lint: | |
gjslint --strict -r src/xxx | |
updatedeps: |
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
Tohru, | |
I thought you'd be interested by this: | |
http://stoic.com/javascript | |
It has a quite interesting architecture, and it's entirely written in Javascript. | |
I'd love to get your take on it! |
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
Java のコードを | |
pythonista に持ち込む:まぁ、Java も書けなくはないけどね | |
rubyist に持ち込む:ツマラン、どこかに細工してやろうか・・・ | |
CTO川崎 に持ち込む:出てけゴルァァァァァァァァァァァ!! | |
Python のコードを | |
Java エンジニアに持ち込む:おぅ、Python のコードか | |
rubyist に持ち込む:スクリプト言語の僚友だ、バッチリ直してやるぜ | |
CTO川崎 に持ち込む:けっ、優等生か |
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
#!/usr/bin/env python2 | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
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
while true; do date; curl "http://stocks.finance.yahoo.co.jp/stocks/detail/?code=3632.t" 2>/dev/null | grep 'class="stoksPrice"' | awk 'match($0, /[0-9,]+/) {print substr($0, RSTART, RLENGTH)}'; sleep 60; done; |
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
# -*- coding: utf-8 -*- | |
import pandas | |
import argparse | |
parser = argparse.ArgumentParser(description='xxx') | |
parser.add_argument('csv', type=argparse.FileType('r')) | |
args = parser.parse_args() | |
csv = args.csv |
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
def http_connection_send(): | |
import httplib | |
def patch_send(): | |
old_send= httplib.HTTPConnection.send | |
def new_send(self, data, *args, **kwargs): | |
print(data) | |
body = old_send(self, data, *args, **kwargs) | |
return body | |
httplib.HTTPConnection.send = new_send | |
patch_send() |
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
#https://github.com/gevent/gevent/issues/477#issuecomment-56292848 | |
# # Re-add sslwrap to Python 2.7.9 | |
import inspect | |
__ssl__ = __import__('ssl') | |
try: | |
_ssl = __ssl__._ssl | |
except AttributeError: | |
_ssl = __ssl__._ssl2 |
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
/* Generated by Cython 0.22 */ | |
/* BEGIN: Cython Metadata | |
{ | |
"distutils": {} | |
} | |
END: Cython Metadata */ | |
#define PY_SSIZE_T_CLEAN | |
#ifndef CYTHON_USE_PYLONG_INTERNALS |
OlderNewer