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
var write =function(name){console.log(name);}; | |
var gg =0; | |
var z =0; | |
setTimeout(function(){write("bbb")},10); | |
setInterval(function(){write(gg++)},10); | |
for(var i=0;i<1000000;i++)z++; |
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
{ | |
"pop_host" : "host.com", | |
"pop_port" : 110, | |
"pop_userid" : "userid", | |
"pop_passwd" : "passwd" | |
} |
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
function tokenize(str) { | |
str=str.replace(/\(/g,"( "); | |
str=str.replace(/\)/g," )"); | |
arr = str.split(' '); | |
return arr; | |
} | |
function InputToLObject(arr){ | |
var rtn; |
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 python | |
# -*- coding: utf-8 -*- | |
# 改変前ソース | |
# Pythonを使ってgoo.glの短縮URLを得る | TRIVIAL TECHNOLOGIES on CLOUD | |
# http://coreblog.org/ats/pythonic-way-of-obtaining-shorten-url-by-using-goo_gl | |
def google_shorten(url): | |
from re import match | |
from urllib2 import urlopen, Request, HTTPError, quote | |
try: |
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
// user script for efreedom | |
// version 0.01 ALPHA! | |
// 2010-11-05 | |
// First Commit | |
// -------------------------------------------------------------------- | |
// | |
// This is a Greasemonkey user script. | |
// | |
// To install, you need Greasemonkey: http://greasemonkey.mozdev.org/ | |
// Then restart Firefox and revisit this script. |
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
# http://docs.python.org/library/_winreg.html | |
# http://matplotlib.svn.sourceforge.net/viewvc/matplotlib/trunk/matplotlib/lib/matplotlib/font_manager.py?revision=8713&view=markup | |
# LINE 203に以下を追加 | |
#except WindowsError: | |
# continue | |
#local = None |
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
# aodag先生のdir2 | |
# http://d.hatena.ne.jp/a2c/20100504/1272903592 | |
dir2 = lambda y:[x + ("*" if callable(getattr(y, x)) else "") for x in dir(y)] |
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 flask import Flask,request,g | |
#from middleware import SimpleMiddleware | |
app = Flask(__name__) | |
@app.before_request | |
def before_request(): | |
from uamobile import detect | |
g.d = detect({'HTTP_USER_AGENT': request.headers["User-Agent"]}) |
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 python | |
# -*- coding: utf-8 -*- | |
from igo.Tagger import Tagger | |
class ZenraIgo(object): | |
def __init__(self, dataDir, position=u'動詞', text=u'全裸で'): | |
self.dataDir = dataDir | |
self.position = position | |
self.text = text |
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 python | |
# -*- coding: utf-8 -*- | |
def inverted_index(index,no,str): | |
str_arr =str.split(" ") | |
for i in range(len(str_arr)): | |
try: | |
index[str_arr[i]] | |
except KeyError: |