code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
#!/bin/dev python
# coding=utf8
from memory import *
class Hanzi:
def __init__(self,hanzi):
self.mem=None
self.hanzi=hanzi
self.freq=1
self.pinyin=''
self.bihua=1
def setfreq(self, freq):
self.freq = freq
def setpinyin(self, pinyin):
s... | [
[
1,
0,
0.0976,
0.0244,
0,
0.66,
0,
497,
0,
1,
0,
0,
497,
0,
0
],
[
3,
0,
0.4024,
0.5366,
0,
0.66,
0.3333,
169,
0,
5,
0,
0,
0,
0,
3
],
[
2,
1,
0.2317,
0.1463,
1,
0.... | [
"from memory import *",
"class Hanzi:\n def __init__(self,hanzi):\n self.mem=None\n self.hanzi=hanzi\n self.freq=1\n self.pinyin=''\n self.bihua=1",
" def __init__(self,hanzi):\n self.mem=None\n self.hanzi=hanzi\n self.freq=1\n self.pinyin=''\... |
#!/bin/env python
# --*-- coding=utf8 --*--
#
# Author: ablozhou
# E-mail: ablozhou@gmail.com
#
# Copyright 2009 ablozhou
#
# Distributed under the terms of the GPL (GNU Public License)
#
# abcl is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | [
[
1,
0,
0.1806,
0.0069,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.1875,
0.0069,
0,
0.66,
0.125,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.1944,
0.0069,
0,
0... | [
"import datetime",
"import sys",
"import traceback",
"import codecs",
"import types",
"loglevels = {'stdout':['info','debug','warn','error','fatal'],\n 'file':['info','debug','warn','error','fatal']\n }",
"logfile = 'logs.txt'",
"class log4py:\n def __init__(self,modulename='gloabal', logleve... |
#!/bin/env python
#coding=utf8
class User():
def __init(self,name,passwd):
self.name = name
self.passwd = passwd | [
[
3,
0,
0.7857,
0.5714,
0,
0.66,
0,
61,
0,
1,
0,
0,
0,
0,
0
],
[
2,
1,
0.8571,
0.4286,
1,
0.76,
0,
75,
0,
3,
0,
0,
0,
0,
0
],
[
14,
2,
0.8571,
0.1429,
2,
0.77,
... | [
"class User():\n def __init(self,name,passwd):\n self.name = name\n self.passwd = passwd",
" def __init(self,name,passwd):\n self.name = name\n self.passwd = passwd",
" self.name = name",
" self.passwd = passwd"
] |
#!/bin/env python
# coding=utf8
| [] | [] |
#!/bin/env python
#coding:utf8
import modules.log4py as log4py
import modules.char as char
import codecs
import string
import cPickle as pk
import sys
import traceback
log = log4py.log4py('[unihan]')
file_src = '../data/Unihandata.txt'
file_write='../data/unihan3.txt'
'''
0x4E00-0x9FFF CJK 统一字型 常用... | [
[
1,
0,
0.0093,
0.0023,
0,
0.66,
0,
192,
0,
1,
0,
0,
192,
0,
0
],
[
1,
0,
0.0117,
0.0023,
0,
0.66,
0.0189,
143,
0,
1,
0,
0,
143,
0,
0
],
[
1,
0,
0.014,
0.0023,
0,
0... | [
"import modules.log4py as log4py",
"import modules.char as char",
"import codecs",
"import string",
"import cPickle as pk",
"import sys",
"import traceback",
"log = log4py.log4py('[unihan]')",
"file_src = '../data/Unihandata.txt'",
"file_write='../data/unihan3.txt'",
"'''\n0x4E00-0x9FFF CJ... |
#!/bin/env python
#coding:utf8
import modules.log4py as log4py
import modules.char as char
import codecs
import string
import cPickle as pk
import traceback
import sys
WUBI=1
CANGJIE=2
FOURCORNER=3
ZHENGMA=4
'''
0x4E00-0x9FFF CJK 统一字型 常用字 共 20992个(实际只定义到0x9FC3)
0x3400-0x4DFF CJK 统一字... | [
[
1,
0,
0.0144,
0.0036,
0,
0.66,
0,
192,
0,
1,
0,
0,
192,
0,
0
],
[
1,
0,
0.0181,
0.0036,
0,
0.66,
0.0217,
143,
0,
1,
0,
0,
143,
0,
0
],
[
1,
0,
0.0217,
0.0036,
0,
... | [
"import modules.log4py as log4py",
"import modules.char as char",
"import codecs",
"import string",
"import cPickle as pk",
"import traceback",
"import sys",
"WUBI=1",
"CANGJIE=2",
"FOURCORNER=3",
"ZHENGMA=4",
"'''\n0x4E00-0x9FFF CJK 统一字型 常用字 共 20992个(实际只定义到0x9FC3)... |
#!/bin/env python
#coding:utf8
import modules.log4py as log4py
import modules.char as char
import codecs
import string
import cPickle as pk
import sys
import traceback
log = log4py.log4py('[unihan]')
file_src = '../data/Unihandata.txt'
file_write='../data/unihan3.txt'
'''
0x4E00-0x9FFF CJK 统一字型 常用... | [
[
1,
0,
0.0093,
0.0023,
0,
0.66,
0,
192,
0,
1,
0,
0,
192,
0,
0
],
[
1,
0,
0.0117,
0.0023,
0,
0.66,
0.0189,
143,
0,
1,
0,
0,
143,
0,
0
],
[
1,
0,
0.014,
0.0023,
0,
0... | [
"import modules.log4py as log4py",
"import modules.char as char",
"import codecs",
"import string",
"import cPickle as pk",
"import sys",
"import traceback",
"log = log4py.log4py('[unihan]')",
"file_src = '../data/Unihandata.txt'",
"file_write='../data/unihan3.txt'",
"'''\n0x4E00-0x9FFF CJ... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# author ablozhou 周海汉
# ablozhou@gmail.com
# http://blog.csdn.net/ablo_zhou
# 2010.3.14
import chardet
import urllib
import modules.log4py as log4py
import sys
log = log4py.log4py('[encdet]')
def detect(filename, text = '', encoding = None):
defaultenc = sys.getfiles... | [
[
1,
0,
0.1013,
0.0127,
0,
0.66,
0,
475,
0,
1,
0,
0,
475,
0,
0
],
[
1,
0,
0.1139,
0.0127,
0,
0.66,
0.1667,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.1266,
0.0127,
0,
... | [
"import chardet",
"import urllib",
"import modules.log4py as log4py",
"import sys",
"log = log4py.log4py('[encdet]')",
"def detect(filename, text = '', encoding = None):\n\n defaultenc = sys.getfilesystemencoding()\n begin = 0\n if not text:\n try:\n text = file(filename,'rb').r... |
#!/bin/env python
#coding:utf8
import modules.log4py as log4py
import modules.char as char
import codecs
import string
dict={}
spaces=['',' ','\t','\n']
hzlist=[]
log = log4py.log4py('[unihan1]')
file_src = '../data/unihan2.txt'
file_write='../data/wubi.txt'
splitline = []
f=codecs.open(file_src, 'r','utf8')
fw = c... | [
[
1,
0,
0.0741,
0.0185,
0,
0.66,
0,
192,
0,
1,
0,
0,
192,
0,
0
],
[
1,
0,
0.0926,
0.0185,
0,
0.66,
0.0417,
143,
0,
1,
0,
0,
143,
0,
0
],
[
1,
0,
0.1111,
0.0185,
0,
... | [
"import modules.log4py as log4py",
"import modules.char as char",
"import codecs",
"import string",
"dict={}",
"spaces=['',' ','\\t','\\n']",
"hzlist=[]",
"log = log4py.log4py('[unihan1]')",
"file_src = '../data/unihan2.txt'",
"file_write='../data/wubi.txt'",
"splitline = []",
"f=codecs.open(f... |
#!/bin/env python
#coding:utf8
import modules.log4py as log4py
import modules.char as char
import codecs
import string
import cPickle as pk
import traceback
import sys
WUBI=1
CANGJIE=2
FOURCORNER=3
ZHENGMA=4
'''
0x4E00-0x9FFF CJK 统一字型 常用字 共 20992个(实际只定义到0x9FC3)
0x3400-0x4DFF CJK 统一字... | [
[
1,
0,
0.0144,
0.0036,
0,
0.66,
0,
192,
0,
1,
0,
0,
192,
0,
0
],
[
1,
0,
0.0181,
0.0036,
0,
0.66,
0.0217,
143,
0,
1,
0,
0,
143,
0,
0
],
[
1,
0,
0.0217,
0.0036,
0,
... | [
"import modules.log4py as log4py",
"import modules.char as char",
"import codecs",
"import string",
"import cPickle as pk",
"import traceback",
"import sys",
"WUBI=1",
"CANGJIE=2",
"FOURCORNER=3",
"ZHENGMA=4",
"'''\n0x4E00-0x9FFF CJK 统一字型 常用字 共 20992个(实际只定义到0x9FC3)... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# author ablozhou 周海汉
# ablozhou@gmail.com
# http://blog.csdn.net/ablo_zhou
# 2010.3.14
import chardet
import urllib
import modules.log4py as log4py
import sys
log = log4py.log4py('[encdet]')
def detect(filename, text = '', encoding = None):
defaultenc = sys.getfiles... | [
[
1,
0,
0.1013,
0.0127,
0,
0.66,
0,
475,
0,
1,
0,
0,
475,
0,
0
],
[
1,
0,
0.1139,
0.0127,
0,
0.66,
0.1667,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.1266,
0.0127,
0,
... | [
"import chardet",
"import urllib",
"import modules.log4py as log4py",
"import sys",
"log = log4py.log4py('[encdet]')",
"def detect(filename, text = '', encoding = None):\n\n defaultenc = sys.getfilesystemencoding()\n begin = 0\n if not text:\n try:\n text = file(filename,'rb').r... |
#!/bin/env python
#coding:utf8
import modules.log4py as log4py
import modules.char as char
import codecs
import string
dict={}
spaces=['',' ','\t','\n']
hzlist=[]
log = log4py.log4py('[unihan1]')
file_src = '../data/unihan2.txt'
file_write='../data/wubi.txt'
splitline = []
f=codecs.open(file_src, 'r','utf8')
fw = c... | [
[
1,
0,
0.0741,
0.0185,
0,
0.66,
0,
192,
0,
1,
0,
0,
192,
0,
0
],
[
1,
0,
0.0926,
0.0185,
0,
0.66,
0.0417,
143,
0,
1,
0,
0,
143,
0,
0
],
[
1,
0,
0.1111,
0.0185,
0,
... | [
"import modules.log4py as log4py",
"import modules.char as char",
"import codecs",
"import string",
"dict={}",
"spaces=['',' ','\\t','\\n']",
"hzlist=[]",
"log = log4py.log4py('[unihan1]')",
"file_src = '../data/unihan2.txt'",
"file_write='../data/wubi.txt'",
"splitline = []",
"f=codecs.open(f... |
class Phonetic():
''' Process phonetic symbols of Chiese characters
or other languages.
'''
def replace(self,phonestr,tone):
if tone=='5':
return phonestr
arry_a = ['ā', 'á', 'ǎ', 'à']
arry_o = ['ō', 'ó', 'ǒ', 'ò']
arry_e = ['ē', 'é', 'ě', 'è']
arry_... | [
[
3,
0,
0.5278,
0.9722,
0,
0.66,
0,
224,
0,
1,
0,
0,
0,
0,
16
],
[
8,
1,
0.1111,
0.0833,
1,
0.72,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
2,
1,
0.5833,
0.8611,
1,
0.72,
... | [
"class Phonetic():\n ''' Process phonetic symbols of Chiese characters\n or other languages.\n '''\n def replace(self,phonestr,tone):\n\n if tone=='5':\n return phonestr",
" ''' Process phonetic symbols of Chiese characters\n or other languages.\n '''",
" def replace(se... |
#!/bin/dev python
# coding=utf8
#from memory import *
import codecs
import string
import modules.log4py as log4py
log = log4py.log4py('[Char]')
Chinese = 1
Japanese = 3
Korean=5
Vietnamese = 6
English = 8
#sublang
Mandarin = 11
Cantonese = 12
JapaneseOn = 31
JapaneseKun = 32
Hangul = 51
Korean_roman = ... | [
[
1,
0,
0.0165,
0.0033,
0,
0.66,
0,
220,
0,
1,
0,
0,
220,
0,
0
],
[
1,
0,
0.0198,
0.0033,
0,
0.66,
0.0476,
890,
0,
1,
0,
0,
890,
0,
0
],
[
1,
0,
0.0231,
0.0033,
0,
... | [
"import codecs",
"import string",
"import modules.log4py as log4py",
"log = log4py.log4py('[Char]')",
"Chinese = 1",
"Japanese = 3",
"Korean=5",
"Vietnamese = 6",
"English = 8",
"Mandarin = 11",
"Cantonese = 12",
"JapaneseOn = 31",
"JapaneseKun = 32",
"Hangul = 51",
"Korean_roman = 52",
... |
#!/bin/env python
# --*-- coding=utf8 --*--
#
# Author: ablozhou
# E-mail: ablozhou@gmail.com
#
# Copyright 2009 ablozhou
#
# Distributed under the terms of the GPL (GNU Public License)
#
# abcl is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | [
[
1,
0,
0.2955,
0.0114,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
14,
0,
0.3182,
0.0114,
0,
0.66,
0.25,
907,
0,
0,
0,
0,
0,
6,
0
],
[
14,
0,
0.3295,
0.0114,
0,
0.... | [
"import datetime",
"dest = {1:'stdout',2:'stderr',3:'file'} #stdout",
"logs = ['info','debug','warn','error','fatal']",
"class log4py:\n def __init__(self,modulename='gloabal',flag=logs,filename='log4py.txt'):\n self.filename = filename\n self.flag=flag\n self.modulename = modulename\... |
#!/bin/env python
# --*-- coding=utf8 --*--
#
# Author: ablozhou
# E-mail: ablozhou@gmail.com
#
# Copyright 2009 ablozhou
#
# Distributed under the terms of the GPL (GNU Public License)
#
# abcl is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License ... | [
[
1,
0,
0.2955,
0.0114,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
14,
0,
0.3182,
0.0114,
0,
0.66,
0.25,
907,
0,
0,
0,
0,
0,
6,
0
],
[
14,
0,
0.3295,
0.0114,
0,
0.... | [
"import datetime",
"dest = {1:'stdout',2:'stderr',3:'file'} #stdout",
"logs = ['info','debug','warn','error','fatal']",
"class log4py:\n def __init__(self,modulename='gloabal',flag=logs,filename='log4py.txt'):\n self.filename = filename\n self.flag=flag\n self.modulename = modulename\... |
#!/bin/env python
# -*- coding: utf8 -*-
# Author: ablozhou
# E-mail: ablozhou@gmail.com
#
# Copyright 2010 ablozhou
#
# Distributed under the terms of the GPL (GNU Public License)
#
# abcl is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published b... | [
[
1,
0,
0.2248,
0.0078,
0,
0.66,
0,
93,
0,
1,
0,
0,
93,
0,
0
],
[
1,
0,
0.2326,
0.0078,
0,
0.66,
0.25,
143,
0,
1,
0,
0,
143,
0,
0
],
[
14,
0,
0.2481,
0.0078,
0,
0.6... | [
"import zipfile",
"import modules.char as char",
"space=[' ','\\t','\\n']",
"class procdict:\n def __init__(self,zipfile,passwd):\n self.zipfile = zipfile\n self.passwd = passwd\n self.dict = {}\n self.readzipfile(zipfile,passwd)#'../../data/hz1.zip','http://blog.csdn.net/ablo_z... |
#!/bin/env python
# -*- coding: utf8 -*-
# Author: ablozhou
# E-mail: ablozhou@gmail.com
#
# Copyright 2010 ablozhou
#
# Distributed under the terms of the GPL (GNU Public License)
#
# abcl is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published b... | [
[
1,
0,
0.2248,
0.0078,
0,
0.66,
0,
93,
0,
1,
0,
0,
93,
0,
0
],
[
1,
0,
0.2326,
0.0078,
0,
0.66,
0.25,
143,
0,
1,
0,
0,
143,
0,
0
],
[
14,
0,
0.2481,
0.0078,
0,
0.6... | [
"import zipfile",
"import modules.char as char",
"space=[' ','\\t','\\n']",
"class procdict:\n def __init__(self,zipfile,passwd):\n self.zipfile = zipfile\n self.passwd = passwd\n self.dict = {}\n self.readzipfile(zipfile,passwd)#'../../data/hz1.zip','http://blog.csdn.net/ablo_z... |
#!/bin/env python
# -*- coding: utf8 -*-
# Author: ablozhou
# E-mail: ablozhou@gmail.com
#
# Copyright 2010 ablozhou
#
# Distributed under the terms of the GPL (GNU Public License)
#
# HZDQ(Hanzi Daquan) is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public Lice... | [
[
14,
0,
0.6154,
0.0192,
0,
0.66,
0,
898,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.6346,
0.0192,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.6538,
0.0192,
0,
0... | [
"__appname__ = 'hzdq'",
"__author__ = 'ablozhou'",
"__email__='ablozhou@gmail.com'",
"import sys",
"import os",
"import wx",
"import mainui_xrc",
"import hzdqfrm",
"workpath = os.path.dirname(os.path.realpath(sys.argv[0]))",
"os.chdir(workpath)",
"sys.path.insert(0, workpath)",
"if __name__ ==... |
#!/bin/env python
# -*- coding: utf8 -*-
import wx
import mainui_xrc
import wx.xrc as xrc
#import modules.group as group
import modules.log4py as log4py
import string
import procdict
import cPickle as pk
log = log4py.log4py('[hzdqframe]')
class hzdqframe(mainui_xrc.xrcmframe):
def __init__(self,parent):... | [
[
1,
0,
0.0317,
0.0079,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.0397,
0.0079,
0,
0.66,
0.125,
433,
0,
1,
0,
0,
433,
0,
0
],
[
1,
0,
0.0476,
0.0079,
0,
0... | [
"import wx",
"import mainui_xrc",
"import wx.xrc as xrc",
"import modules.log4py as log4py",
"import string",
"import procdict",
"import cPickle as pk",
"log = log4py.log4py('[hzdqframe]')",
"class hzdqframe(mainui_xrc.xrcmframe):\n def __init__(self,parent):\n \n mainui_xrc.xrcmfra... |
#!/bin/env python
# -*- coding: utf8 -*-
# Author: ablozhou
# E-mail: ablozhou@gmail.com
#
# Copyright 2010 ablozhou
#
# Distributed under the terms of the GPL (GNU Public License)
#
# HZDQ(Hanzi Daquan) is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public Lice... | [
[
14,
0,
0.6154,
0.0192,
0,
0.66,
0,
898,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.6346,
0.0192,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.6538,
0.0192,
0,
0... | [
"__appname__ = 'hzdq'",
"__author__ = 'ablozhou'",
"__email__='ablozhou@gmail.com'",
"import sys",
"import os",
"import wx",
"import mainui_xrc",
"import hzdqfrm",
"workpath = os.path.dirname(os.path.realpath(sys.argv[0]))",
"os.chdir(workpath)",
"sys.path.insert(0, workpath)",
"if __name__ ==... |
#!/bin/env python
# -*- coding: utf8 -*-
import wx
import mainui_xrc
import wx.xrc as xrc
#import modules.group as group
import modules.log4py as log4py
import string
import procdict
import cPickle as pk
log = log4py.log4py('[hzdqframe]')
class hzdqframe(mainui_xrc.xrcmframe):
def __init__(self,parent):... | [
[
1,
0,
0.0317,
0.0079,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.0397,
0.0079,
0,
0.66,
0.125,
433,
0,
1,
0,
0,
433,
0,
0
],
[
1,
0,
0.0476,
0.0079,
0,
0... | [
"import wx",
"import mainui_xrc",
"import wx.xrc as xrc",
"import modules.log4py as log4py",
"import string",
"import procdict",
"import cPickle as pk",
"log = log4py.log4py('[hzdqframe]')",
"class hzdqframe(mainui_xrc.xrcmframe):\n def __init__(self,parent):\n \n mainui_xrc.xrcmfra... |
#!/bin/env python
# coding=utf8
| [] | [] |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import wx
import os
import mainui_xrc
import wx.xrc as xrc
import modules.group as group
import modules.log4py as log4py
import string
import codecs
import tools.encdet as encdet
log = log4py.log4py('[abcframe]')
class abcframe(mainui_xrc.xrcmframe):
def __init__(sel... | [
[
1,
0,
0.025,
0.0063,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.0312,
0.0063,
0,
0.66,
0.1,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0375,
0.0063,
0,
0.66... | [
"import wx",
"import os",
"import mainui_xrc",
"import wx.xrc as xrc",
"import modules.group as group",
"import modules.log4py as log4py",
"import string",
"import codecs",
"import tools.encdet as encdet",
"log = log4py.log4py('[abcframe]')",
"class abcframe(mainui_xrc.xrcmframe):\n def __ini... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import wx
import os
import abcxrc
import wx.xrc as xrc
import modules.group as group
import modules.log4py as log4py
import string
import codecs
import tools.encdet as encdet
log = log4py.log4py('[abclfrm]')
class abclfrm(abcxrc.xrcmframe):
def __init__(self,parent):... | [
[
1,
0,
0.0244,
0.0061,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.0305,
0.0061,
0,
0.66,
0.1,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0366,
0.0061,
0,
0.6... | [
"import wx",
"import os",
"import abcxrc",
"import wx.xrc as xrc",
"import modules.group as group",
"import modules.log4py as log4py",
"import string",
"import codecs",
"import tools.encdet as encdet",
"log = log4py.log4py('[abclfrm]')",
"class abclfrm(abcxrc.xrcmframe):\n def __init__(self,p... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import wx
import os
import abcxrc
import wx.xrc as xrc
import modules.group as group
import modules.log4py as log4py
import string
import codecs
import tools.encdet as encdet
log = log4py.log4py('[abclfrm]')
class abclfrm(abcxrc.xrcmframe):
def __init__(self,parent):... | [
[
1,
0,
0.0244,
0.0061,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.0305,
0.0061,
0,
0.66,
0.1,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0366,
0.0061,
0,
0.6... | [
"import wx",
"import os",
"import abcxrc",
"import wx.xrc as xrc",
"import modules.group as group",
"import modules.log4py as log4py",
"import string",
"import codecs",
"import tools.encdet as encdet",
"log = log4py.log4py('[abclfrm]')",
"class abclfrm(abcxrc.xrcmframe):\n def __init__(self,p... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import wx
import os
import mainui_xrc
import wx.xrc as xrc
import modules.group as group
import modules.log4py as log4py
import string
import codecs
import tools.encdet as encdet
log = log4py.log4py('[abcframe]')
class abcframe(mainui_xrc.xrcmframe):
def __init__(sel... | [
[
1,
0,
0.025,
0.0063,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.0312,
0.0063,
0,
0.66,
0.1,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0375,
0.0063,
0,
0.66... | [
"import wx",
"import os",
"import mainui_xrc",
"import wx.xrc as xrc",
"import modules.group as group",
"import modules.log4py as log4py",
"import string",
"import codecs",
"import tools.encdet as encdet",
"log = log4py.log4py('[abcframe]')",
"class abcframe(mainui_xrc.xrcmframe):\n def __ini... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import wx
import sys
import abcxrc
import abclfrm
class AbclApp(wx.App):
def OnInit(self):
self.mainfrm = abclfrm.abclfrm(parent = None)
self.SetTopWindow(self.mainfrm)
self.mainfrm.Show()
return True
def Exit(self):
pass... | [
[
1,
0,
0.129,
0.0323,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.1613,
0.0323,
0,
0.66,
0.1667,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.1935,
0.0323,
0,
0... | [
"import wx",
"import sys",
"import abcxrc",
"import abclfrm",
"class AbclApp(wx.App):\n def OnInit(self):\n\n self.mainfrm = abclfrm.abclfrm(parent = None)\n\n self.SetTopWindow(self.mainfrm)\n self.mainfrm.Show()\n return True",
" def OnInit(self):\n\n self.mainfr... |
#!/bin/env python
#coding=utf8
import wx
import sys
import modules.group
#import modules.char
class MainPanel(wx.Panel):
def __init__(self,parent,id):
wx.Panel.__init__(self,parent,id,style=wx.BORDER_SUNKEN)
leftbox = wx.BoxSizer(wx.VERTICAL)
self.medit = wx.TextCtrl(self,-1,name='med... | [
[
1,
0,
0.1053,
0.0263,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.1316,
0.0263,
0,
0.66,
0.1667,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.1579,
0.0263,
0,
... | [
"import wx",
"import sys",
"import modules.group",
"class MainPanel(wx.Panel):\n \n def __init__(self,parent,id):\n wx.Panel.__init__(self,parent,id,style=wx.BORDER_SUNKEN)\n leftbox = wx.BoxSizer(wx.VERTICAL)\n self.medit = wx.TextCtrl(self,-1,name='medit',style=wx.TE_MULTILINE)\n ... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import wx
import mainui_xrc
import abcframe
class AbclApp(wx.App):
def OnInit(self):
self.mainfrm = abcframe.abcframe(parent = None)
self.SetTopWindow(self.mainfrm)
self.mainfrm.Show()
return True
def Exit(self):
pass
... | [
[
1,
0,
0.1538,
0.0385,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.1923,
0.0385,
0,
0.66,
0.25,
433,
0,
1,
0,
0,
433,
0,
0
],
[
1,
0,
0.2308,
0.0385,
0,
0.... | [
"import wx",
"import mainui_xrc",
"import abcframe",
"class AbclApp(wx.App):\n def OnInit(self):\n\n self.mainfrm = abcframe.abcframe(parent = None)\n\n self.SetTopWindow(self.mainfrm)\n self.mainfrm.Show()\n return True",
" def OnInit(self):\n\n self.mainfrm = abcfr... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import wx
import sys
import abcxrc
import abclfrm
class AbclApp(wx.App):
def OnInit(self):
self.mainfrm = abclfrm.abclfrm(parent = None)
self.SetTopWindow(self.mainfrm)
self.mainfrm.Show()
return True
def Exit(self):
pass... | [
[
1,
0,
0.129,
0.0323,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.1613,
0.0323,
0,
0.66,
0.1667,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.1935,
0.0323,
0,
0... | [
"import wx",
"import sys",
"import abcxrc",
"import abclfrm",
"class AbclApp(wx.App):\n def OnInit(self):\n\n self.mainfrm = abclfrm.abclfrm(parent = None)\n\n self.SetTopWindow(self.mainfrm)\n self.mainfrm.Show()\n return True",
" def OnInit(self):\n\n self.mainfr... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import wx
import mainui_xrc
import abcframe
class AbclApp(wx.App):
def OnInit(self):
self.mainfrm = abcframe.abcframe(parent = None)
self.SetTopWindow(self.mainfrm)
self.mainfrm.Show()
return True
def Exit(self):
pass
... | [
[
1,
0,
0.1538,
0.0385,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.1923,
0.0385,
0,
0.66,
0.25,
433,
0,
1,
0,
0,
433,
0,
0
],
[
1,
0,
0.2308,
0.0385,
0,
0.... | [
"import wx",
"import mainui_xrc",
"import abcframe",
"class AbclApp(wx.App):\n def OnInit(self):\n\n self.mainfrm = abcframe.abcframe(parent = None)\n\n self.SetTopWindow(self.mainfrm)\n self.mainfrm.Show()\n return True",
" def OnInit(self):\n\n self.mainfrm = abcfr... |
#!/bin/env python
#coding=utf8
import wx
import sys
import modules.group
#import modules.char
class MainPanel(wx.Panel):
def __init__(self,parent,id):
wx.Panel.__init__(self,parent,id,style=wx.BORDER_SUNKEN)
leftbox = wx.BoxSizer(wx.VERTICAL)
self.medit = wx.TextCtrl(self,-1,name='med... | [
[
1,
0,
0.1053,
0.0263,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.1316,
0.0263,
0,
0.66,
0.1667,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.1579,
0.0263,
0,
... | [
"import wx",
"import sys",
"import modules.group",
"class MainPanel(wx.Panel):\n \n def __init__(self,parent,id):\n wx.Panel.__init__(self,parent,id,style=wx.BORDER_SUNKEN)\n leftbox = wx.BoxSizer(wx.VERTICAL)\n self.medit = wx.TextCtrl(self,-1,name='medit',style=wx.TE_MULTILINE)\n ... |
#!/bin/dev python
# coding=utf8
import os
import sys
#import hanzi
import codecs
import time
#from modules import *
import modules.group
import ui.mainui
#todo group 要作成迭代器
workpath = os.path.dirname(os.path.realpath(sys.argv[0]))
confpath = os.path.join(workpath, 'conf')
sys.path.insert(0, workpath)
sys.path.insert... | [
[
1,
0,
0.0455,
0.0152,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0606,
0.0152,
0,
0.66,
0.0769,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0909,
0.0152,
0,
... | [
"import os",
"import sys",
"import codecs",
"import time",
"import modules.group",
"import ui.mainui",
"workpath = os.path.dirname(os.path.realpath(sys.argv[0]))",
"confpath = os.path.join(workpath, 'conf')",
"sys.path.insert(0, workpath)",
"sys.path.insert(0, os.path.join(workpath, 'modules'))",
... |
#!/usr/bin/env python
import os,sys
import string
import urllib2
import zipfile
def find_it(x, lines):
ret = []
for line in lines:
if line.find(x)!=-1:
ret.append(line.split(":")[0].strip())
return ret
if __name__ == '__main__':
if len(sys.argv) != 2:
print "Ni hao! Chu cuo le!"
sys.exit(1)
if os.getenv("... | [
[
1,
0,
0.0465,
0.0233,
0,
0.66,
0,
688,
0,
2,
0,
0,
688,
0,
0
],
[
1,
0,
0.0698,
0.0233,
0,
0.66,
0.2,
890,
0,
1,
0,
0,
890,
0,
0
],
[
1,
0,
0.093,
0.0233,
0,
0.66... | [
"import os,sys",
"import string",
"import urllib2",
"import zipfile",
"def find_it(x, lines):\n\tret = []\n\tfor line in lines:\n\t\tif line.find(x)!=-1:\n\t\t\tret.append(line.split(\":\")[0].strip())\n\treturn ret",
"\tret = []",
"\tfor line in lines:\n\t\tif line.find(x)!=-1:\n\t\t\tret.append(line.s... |
#!/bin/env python
#coding=utf8
import wx
import sys
class Panel(wx.Panel):
def __init__(self,parent,id):
wx.Panel.__init__(self,parent,id,style=wx.BORDER_SUNKEN)
class Frame(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,parent,id,title,size = (500,400))
... | [
[
1,
0,
0.1429,
0.0357,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.1786,
0.0357,
0,
0.66,
0.2,
509,
0,
1,
0,
0,
509,
0,
0
],
[
3,
0,
0.3036,
0.1429,
0,
0.6... | [
"import wx",
"import sys",
"class Panel(wx.Panel):\n \n def __init__(self,parent,id):\n wx.Panel.__init__(self,parent,id,style=wx.BORDER_SUNKEN)",
" def __init__(self,parent,id):\n wx.Panel.__init__(self,parent,id,style=wx.BORDER_SUNKEN)",
" wx.Panel.__init__(self,parent,id,sty... |
#!/bin/env python
# coding:utf8
class Fib:
'''生成菲波拉稀数列的迭代器'''
def __init__(self, max):
self.max = max
def __iter__(self):
self.a = 0
self.b = 1
return self
def next(self):
fib = self.a
if fib > self.max:
raise StopIteration
self.a, s... | [
[
3,
0,
0.4783,
0.7391,
0,
0.66,
0,
981,
0,
3,
0,
0,
0,
0,
0
],
[
8,
1,
0.1739,
0.0435,
1,
0.88,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
2,
1,
0.2826,
0.087,
1,
0.88,
0.... | [
"class Fib:\n '''生成菲波拉稀数列的迭代器'''\n\n def __init__(self, max):\n self.max = max\n\n def __iter__(self):\n self.a = 0",
" '''生成菲波拉稀数列的迭代器'''",
" def __init__(self, max):\n self.max = max",
" self.max = max",
" def __iter__(self):\n self.a = 0\n self.... |
#!/bin/env python
#-*- coding=utf8 -*-
import wx
import hello_xrc
app = wx.PySimpleApp()
frame = hello_xrc.xrczframe(parent = None)
frame.Show()
app.MainLoop() | [
[
1,
0,
0.4,
0.1,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.5,
0.1,
0,
0.66,
0.2,
527,
0,
1,
0,
0,
527,
0,
0
],
[
14,
0,
0.7,
0.1,
0,
0.66,
0.4,
4... | [
"import wx",
"import hello_xrc",
"app = wx.PySimpleApp()",
"frame = hello_xrc.xrczframe(parent = None)",
"frame.Show()",
"app.MainLoop()"
] |
#!/usr/bin/python3.0
# -*- coding:utf-8 -*-
# by: Tony
# from: <a href="http://tonychen123.blog.ubuntu.org.cn" target="_blank">Loving Ubuntu</a>
style_dic = {0:'Normal', 1:'Bold', 4:'Underline',
5:'Blink', 7:'Inverse'}
list_sdic = list(style_dic.keys())
for style in list_sdic:
#print... | [
[
14,
0,
0.3571,
0.0952,
0,
0.66,
0,
572,
0,
0,
0,
0,
0,
6,
0
],
[
14,
0,
0.4762,
0.0476,
0,
0.66,
0.5,
682,
3,
1,
0,
0,
430,
10,
2
],
[
6,
0,
0.7857,
0.4762,
0,
0.... | [
"style_dic = {0:'Normal', 1:'Bold', 4:'Underline',\n 5:'Blink', 7:'Inverse'}",
"list_sdic = list(style_dic.keys())",
"for style in list_sdic:\n #print('-'*60)\n #print('Mode: %-12s Code: \\\\033[%s;Foreground;Background\\n' %(style_dic[style], style))\n# for fore in r... |
#!/bin/env python
# coding=utf8
#能将列表封装出迭代器吗?
class Iter():
def __init__(self):
self.item = [1,2,3]
def __iter__(self):
self.i = 0
return self
def next(self):
if self.i < len(self.item):
it = self.item[self.i]
self.i += 1
re... | [
[
3,
0,
0.3485,
0.4848,
0,
0.66,
0,
715,
0,
3,
0,
0,
0,
0,
1
],
[
2,
1,
0.1667,
0.0606,
1,
0.7,
0,
555,
0,
1,
0,
0,
0,
0,
0
],
[
14,
2,
0.1818,
0.0303,
2,
0.1,
... | [
"class Iter():\n def __init__(self):\n self.item = [1,2,3]\n \n def __iter__(self):\n self.i = 0\n return self",
" def __init__(self):\n self.item = [1,2,3]",
" self.item = [1,2,3]",
" def __iter__(self):\n self.i = 0\n return self",
" ... |
#!/bin/env python
# --*-- coding : utf8 --*--
# Programmer: ablozhou
# E-mail: ablozhou@gmail.com
#
# Copyleft 2009 ablozhou
#
# Distributed under the terms of the GPL (GNU Public License)
#
# abcl is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public L... | [] | [] |
#!/bin/env python
#-*- coding=utf8 -*-
import wx
import hello_xrc
app = wx.PySimpleApp()
frame = hello_xrc.xrczframe(parent = None)
frame.Show()
app.MainLoop() | [
[
1,
0,
0.4,
0.1,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.5,
0.1,
0,
0.66,
0.2,
527,
0,
1,
0,
0,
527,
0,
0
],
[
14,
0,
0.7,
0.1,
0,
0.66,
0.4,
4... | [
"import wx",
"import hello_xrc",
"app = wx.PySimpleApp()",
"frame = hello_xrc.xrczframe(parent = None)",
"frame.Show()",
"app.MainLoop()"
] |
#!/bin/env python
#coding=utf8
import wx
import sys
class Panel(wx.Panel):
def __init__(self,parent,id):
wx.Panel.__init__(self,parent,id,style=wx.BORDER_SUNKEN)
class Frame(wx.Frame):
def __init__(self,parent,id,title):
wx.Frame.__init__(self,parent,id,title,size = (500,400))
... | [
[
1,
0,
0.1429,
0.0357,
0,
0.66,
0,
666,
0,
1,
0,
0,
666,
0,
0
],
[
1,
0,
0.1786,
0.0357,
0,
0.66,
0.2,
509,
0,
1,
0,
0,
509,
0,
0
],
[
3,
0,
0.3036,
0.1429,
0,
0.6... | [
"import wx",
"import sys",
"class Panel(wx.Panel):\n \n def __init__(self,parent,id):\n wx.Panel.__init__(self,parent,id,style=wx.BORDER_SUNKEN)",
" def __init__(self,parent,id):\n wx.Panel.__init__(self,parent,id,style=wx.BORDER_SUNKEN)",
" wx.Panel.__init__(self,parent,id,sty... |
#!/bin/env python
# coding:utf8
class Fib:
'''生成菲波拉稀数列的迭代器'''
def __init__(self, max):
self.max = max
def __iter__(self):
self.a = 0
self.b = 1
return self
def next(self):
fib = self.a
if fib > self.max:
raise StopIteration
self.a, s... | [
[
3,
0,
0.4783,
0.7391,
0,
0.66,
0,
981,
0,
3,
0,
0,
0,
0,
0
],
[
8,
1,
0.1739,
0.0435,
1,
0.53,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
2,
1,
0.2826,
0.087,
1,
0.53,
0.... | [
"class Fib:\n '''生成菲波拉稀数列的迭代器'''\n\n def __init__(self, max):\n self.max = max\n\n def __iter__(self):\n self.a = 0",
" '''生成菲波拉稀数列的迭代器'''",
" def __init__(self, max):\n self.max = max",
" self.max = max",
" def __iter__(self):\n self.a = 0\n self.... |
#!/bin/env python
# coding=utf8
#import sys
#sys.path.append('/home/zhouhh/abclearning')
import unittest
import sys
print sys.path
import modules.group
#no module named modules?
gs = modules.group.Groups(2,2)
gs.open('./data/freq_part.txt')
class testgroup(unittest.TestCase):
def testwalk(self):
gs.w... | [
[
1,
0,
0.3,
0.05,
0,
0.66,
0,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.35,
0.05,
0,
0.66,
0.1429,
509,
0,
1,
0,
0,
509,
0,
0
],
[
8,
0,
0.4,
0.05,
0,
0.66,
0.2857... | [
"import unittest",
"import sys",
"print(sys.path)",
"import modules.group",
"gs = modules.group.Groups(2,2)",
"gs.open('./data/freq_part.txt')",
"class testgroup(unittest.TestCase):\n \n def testwalk(self):\n gs.walk()",
" def testwalk(self):\n gs.walk()",
" gs.walk()",... |
#!/usr/bin/env python
import os,sys
import string
import urllib2
import zipfile
def find_it(x, lines):
ret = []
for line in lines:
if line.find(x)!=-1:
ret.append(line.split(":")[0].strip())
return ret
if __name__ == '__main__':
if len(sys.argv) != 2:
print "Ni hao! Chu cuo le!"
sys.exit(1)
if os.getenv("... | [
[
1,
0,
0.0465,
0.0233,
0,
0.66,
0,
688,
0,
2,
0,
0,
688,
0,
0
],
[
1,
0,
0.0698,
0.0233,
0,
0.66,
0.2,
890,
0,
1,
0,
0,
890,
0,
0
],
[
1,
0,
0.093,
0.0233,
0,
0.66... | [
"import os,sys",
"import string",
"import urllib2",
"import zipfile",
"def find_it(x, lines):\n\tret = []\n\tfor line in lines:\n\t\tif line.find(x)!=-1:\n\t\t\tret.append(line.split(\":\")[0].strip())\n\treturn ret",
"\tret = []",
"\tfor line in lines:\n\t\tif line.find(x)!=-1:\n\t\t\tret.append(line.s... |
#!/usr/bin/python3.0
# -*- coding:utf-8 -*-
# by: Tony
# from: <a href="http://tonychen123.blog.ubuntu.org.cn" target="_blank">Loving Ubuntu</a>
style_dic = {0:'Normal', 1:'Bold', 4:'Underline',
5:'Blink', 7:'Inverse'}
list_sdic = list(style_dic.keys())
for style in list_sdic:
#print... | [
[
14,
0,
0.3571,
0.0952,
0,
0.66,
0,
572,
0,
0,
0,
0,
0,
6,
0
],
[
14,
0,
0.4762,
0.0476,
0,
0.66,
0.5,
682,
3,
1,
0,
0,
430,
10,
2
],
[
6,
0,
0.7857,
0.4762,
0,
0.... | [
"style_dic = {0:'Normal', 1:'Bold', 4:'Underline',\n 5:'Blink', 7:'Inverse'}",
"list_sdic = list(style_dic.keys())",
"for style in list_sdic:\n #print('-'*60)\n #print('Mode: %-12s Code: \\\\033[%s;Foreground;Background\\n' %(style_dic[style], style))\n# for fore in r... |
#!/bin/env python
# --*-- coding : utf8 --*--
# Programmer: ablozhou
# E-mail: ablozhou@gmail.com
#
# Copyleft 2009 ablozhou
#
# Distributed under the terms of the GPL (GNU Public License)
#
# abcl is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public L... | [] | [] |
#!/bin/env python
# coding=utf8
#能将列表封装出迭代器吗?
class Iter():
def __init__(self):
self.item = [1,2,3]
def __iter__(self):
self.i = 0
return self
def next(self):
if self.i < len(self.item):
it = self.item[self.i]
self.i += 1
re... | [
[
3,
0,
0.3485,
0.4848,
0,
0.66,
0,
715,
0,
3,
0,
0,
0,
0,
1
],
[
2,
1,
0.1667,
0.0606,
1,
0.62,
0,
555,
0,
1,
0,
0,
0,
0,
0
],
[
14,
2,
0.1818,
0.0303,
2,
0.97,
... | [
"class Iter():\n def __init__(self):\n self.item = [1,2,3]\n \n def __iter__(self):\n self.i = 0\n return self",
" def __init__(self):\n self.item = [1,2,3]",
" self.item = [1,2,3]",
" def __iter__(self):\n self.i = 0\n return self",
" ... |
#!/bin/env python
# coding=utf8
#import sys
#sys.path.append('/home/zhouhh/abclearning')
import unittest
import sys
print sys.path
import modules.group
#no module named modules?
gs = modules.group.Groups(2,2)
gs.open('./data/freq_part.txt')
class testgroup(unittest.TestCase):
def testwalk(self):
gs.w... | [
[
1,
0,
0.3,
0.05,
0,
0.66,
0,
88,
0,
1,
0,
0,
88,
0,
0
],
[
1,
0,
0.35,
0.05,
0,
0.66,
0.1429,
509,
0,
1,
0,
0,
509,
0,
0
],
[
8,
0,
0.4,
0.05,
0,
0.66,
0.2857... | [
"import unittest",
"import sys",
"print(sys.path)",
"import modules.group",
"gs = modules.group.Groups(2,2)",
"gs.open('./data/freq_part.txt')",
"class testgroup(unittest.TestCase):\n \n def testwalk(self):\n gs.walk()",
" def testwalk(self):\n gs.walk()",
" gs.walk()",... |
#!/usr/bin/python2.6
#
# Simple http server to emulate api.playfoursquare.com
import logging
import shutil
import sys
import urlparse
import SimpleHTTPServer
import BaseHTTPServer
class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""Handle playfoursquare.com requests, for testing."""
def do_GET(self... | [
[
1,
0,
0.0588,
0.0118,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0706,
0.0118,
0,
0.66,
0.125,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0824,
0.0118,
0,
0... | [
"import logging",
"import shutil",
"import sys",
"import urlparse",
"import SimpleHTTPServer",
"import BaseHTTPServer",
"class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):\n \"\"\"Handle playfoursquare.com requests, for testing.\"\"\"\n\n def do_GET(self):\n logging.warn('do_GET: %s, %s',... |
#!/usr/bin/python
import os
import subprocess
import sys
BASEDIR = '../main/src/com/joelapenna/foursquare'
TYPESDIR = '../captures/types/v1'
captures = sys.argv[1:]
if not captures:
captures = os.listdir(TYPESDIR)
for f in captures:
basename = f.split('.')[0]
javaname = ''.join([c.capitalize() for c in basena... | [
[
1,
0,
0.1111,
0.037,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.1481,
0.037,
0,
0.66,
0.1429,
394,
0,
1,
0,
0,
394,
0,
0
],
[
1,
0,
0.1852,
0.037,
0,
0.6... | [
"import os",
"import subprocess",
"import sys",
"BASEDIR = '../main/src/com/joelapenna/foursquare'",
"TYPESDIR = '../captures/types/v1'",
"captures = sys.argv[1:]",
"if not captures:\n captures = os.listdir(TYPESDIR)",
" captures = os.listdir(TYPESDIR)",
"for f in captures:\n basename = f.split('... |
#!/usr/bin/python
"""
Pull a oAuth protected page from foursquare.
Expects ~/.oget to contain (one on each line):
CONSUMER_KEY
CONSUMER_KEY_SECRET
USERNAME
PASSWORD
Don't forget to chmod 600 the file!
"""
import httplib
import os
import re
import sys
import urllib
import urllib2
import urlparse
import user
from xml.... | [
[
8,
0,
0.0631,
0.0991,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1261,
0.009,
0,
0.66,
0.05,
2,
0,
1,
0,
0,
2,
0,
0
],
[
1,
0,
0.1351,
0.009,
0,
0.66,
0.... | [
"\"\"\"\nPull a oAuth protected page from foursquare.\n\nExpects ~/.oget to contain (one on each line):\nCONSUMER_KEY\nCONSUMER_KEY_SECRET\nUSERNAME\nPASSWORD",
"import httplib",
"import os",
"import re",
"import sys",
"import urllib",
"import urllib2",
"import urlparse",
"import user",
"from xml.... |
#!/usr/bin/python
import datetime
import sys
import textwrap
import common
from xml.dom import pulldom
PARSER = """\
/**
* Copyright 2009 Joe LaPenna
*/
package com.joelapenna.foursquare.parsers;
import com.joelapenna.foursquare.Foursquare;
import com.joelapenna.foursquare.error.FoursquareError;
import com.joel... | [
[
1,
0,
0.0201,
0.0067,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0268,
0.0067,
0,
0.66,
0.0769,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0336,
0.0067,
0,
... | [
"import datetime",
"import sys",
"import textwrap",
"import common",
"from xml.dom import pulldom",
"PARSER = \"\"\"\\\n/**\n * Copyright 2009 Joe LaPenna\n */\n\npackage com.joelapenna.foursquare.parsers;\n\nimport com.joelapenna.foursquare.Foursquare;",
"BOOLEAN_STANZA = \"\"\"\\\n } else i... |
#!/usr/bin/python
import logging
from xml.dom import minidom
from xml.dom import pulldom
BOOLEAN = "boolean"
STRING = "String"
GROUP = "Group"
# Interfaces that all FoursquareTypes implement.
DEFAULT_INTERFACES = ['FoursquareType']
# Interfaces that specific FoursqureTypes implement.
INTERFACES = {
}
DEFAULT_CLA... | [
[
1,
0,
0.0263,
0.0088,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0439,
0.0088,
0,
0.66,
0.0833,
290,
0,
1,
0,
0,
290,
0,
0
],
[
1,
0,
0.0526,
0.0088,
0,
... | [
"import logging",
"from xml.dom import minidom",
"from xml.dom import pulldom",
"BOOLEAN = \"boolean\"",
"STRING = \"String\"",
"GROUP = \"Group\"",
"DEFAULT_INTERFACES = ['FoursquareType']",
"INTERFACES = {\n}",
"DEFAULT_CLASS_IMPORTS = [\n]",
"CLASS_IMPORTS = {\n# 'Checkin': DEFAULT_CLASS_IMP... |
from djangoappengine.settings_base import *
FACEBOOK_API_KEY = ''
FACEBOOK_APP_ID = ''
FACEBOOK_SECRET_KEY = ''
TWITTER_CONSUMER_KEY = ''
TWITTER_CONSUMER_SECRET_KEY = ''
TWITTER_REQUEST_TOKEN_URL = ''
TWITTER_ACCESS_TOKEN_URL = ''
TWITTER_AUTHORIZATION_URL = ''
SECRET_KEY = '=r-$b*8hglm+858&9t043hlm6-&6-3d3vfc4((7y... | [
[
1,
0,
0.0079,
0.0079,
0,
0.66,
0,
423,
0,
1,
0,
0,
423,
0,
0
],
[
14,
0,
0.0236,
0.0079,
0,
0.66,
0.025,
848,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.0315,
0.0079,
0,
0... | [
"from djangoappengine.settings_base import *",
"FACEBOOK_API_KEY = ''",
"FACEBOOK_APP_ID = ''",
"FACEBOOK_SECRET_KEY = ''",
"TWITTER_CONSUMER_KEY = ''",
"TWITTER_CONSUMER_SECRET_KEY = ''",
"TWITTER_REQUEST_TOKEN_URL = ''",
"TWITTER_ACCESS_TOKEN_URL = ''",
"TWITTER_AUTHORIZATION_URL = ''",
"SECRET_... |
from exceptions import ImportError, ValueError
from django.contrib import admin
from django.db import models
from django.core.exceptions import SuspiciousOperation
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
impor... | [
[
1,
0,
0.0036,
0.0036,
0,
0.66,
0,
63,
0,
2,
0,
0,
63,
0,
0
],
[
1,
0,
0.0073,
0.0036,
0,
0.66,
0.0417,
302,
0,
1,
0,
0,
302,
0,
0
],
[
1,
0,
0.0109,
0.0036,
0,
0.... | [
"from exceptions import ImportError, ValueError",
"from django.contrib import admin",
"from django.db import models",
"from django.core.exceptions import SuspiciousOperation",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from django.contri... |
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
... | [
[
8,
0,
0.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
0,
0.66... | [
"\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_a... |
from django import template
from django import forms
from django.http import HttpResponseRedirect
import datetime,sys
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from tagging.models import Tag, TaggedItem
from pirate_reputation.models import ReputationManager, ... | [
[
1,
0,
0.0028,
0.0028,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0056,
0.0028,
0,
0.66,
0.04,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0083,
0.0028,
0,
0.... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"import datetime,sys",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from tagging.models import Tag, TaggedItem",
"from pirate_repu... |
# Create your views here.
| [] | [] |
from django.db import models
# Create your models here.
from piston.handler import BaseHandler
from myapp.models import Blogpost
class BlogpostHandler(BaseHandler):
allowed_methods = ('GET',)
model = Blogpost
def read(self, request, post_slug): | [
[
1,
0,
0.1,
0.1,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.4,
0.1,
0,
0.66,
0.3333,
729,
0,
1,
0,
0,
729,
0,
0
],
[
1,
0,
0.5,
0.1,
0,
0.66,
0.6667,
... | [
"from django.db import models",
"from piston.handler import BaseHandler",
"from myapp.models import Blogpost",
"class BlogpostHandler(BaseHandler):\n allowed_methods = ('GET',)\n model = Blogpost",
" allowed_methods = ('GET',)",
" model = Blogpost"
] |
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... | [
[
8,
0,
0.2188,
0.375,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5,
0.0625,
0,
0.66,
0.5,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.8438,
0.375,
0,
0.66,
1,... | [
"\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_addition(self):\n \"\... |
from django.conf.urls.defaults import *
from handlers import ContentHandler, UserHandler, VoteHandler, PKHandler
from piston.resource import Resource
content_handler = Resource(ContentHandler)
user_handler = Resource(UserHandler)
vote_handler = Resource(VoteHandler)
pk_handler = Resource(PKHandler)
urlpatterns = pat... | [
[
1,
0,
0.0476,
0.0476,
0,
0.66,
0,
341,
0,
1,
0,
0,
341,
0,
0
],
[
1,
0,
0.0952,
0.0476,
0,
0.66,
0.1429,
183,
0,
4,
0,
0,
183,
0,
0
],
[
1,
0,
0.1429,
0.0476,
0,
... | [
"from django.conf.urls.defaults import *",
"from handlers import ContentHandler, UserHandler, VoteHandler, PKHandler",
"from piston.resource import Resource",
"content_handler = Resource(ContentHandler)",
"user_handler = Resource(UserHandler)",
"vote_handler = Resource(VoteHandler)",
"pk_handler = Resou... |
from piston.handler import BaseHandler
from pirate_forum.models import ForumDimension
from django.contrib.contenttypes.models import ContentType
from django.contrib.auth.models import User
from pirate_profile.models import Profile
from pirate_consensus.models import UpDownVote, RatingVote
from pirate_core.templatetags.... | [
[
1,
0,
0.007,
0.007,
0,
0.66,
0,
729,
0,
1,
0,
0,
729,
0,
0
],
[
1,
0,
0.0141,
0.007,
0,
0.66,
0.0714,
956,
0,
1,
0,
0,
956,
0,
0
],
[
1,
0,
0.0211,
0.007,
0,
0.66... | [
"from piston.handler import BaseHandler",
"from pirate_forum.models import ForumDimension",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.auth.models import User",
"from pirate_profile.models import Profile",
"from pirate_consensus.models import UpDownVote, RatingVote"... |
# Create your views here.
| [] | [] |
from django.db import models
from django.contrib import admin
# Create your models here.
class Register(models.Model):
name = models.CharField(max_length=140, unique = True)
password1 = models.CharField(max_length=600)
password2 = models.CharField(max_length=600)
email = models.CharField(max_length=600... | [
[
1,
0,
0.0455,
0.0455,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0909,
0.0455,
0,
0.66,
0.25,
302,
0,
1,
0,
0,
302,
0,
0
],
[
3,
0,
0.3182,
0.2273,
0,
0.66... | [
"from django.db import models",
"from django.contrib import admin",
"class Register(models.Model):\n name = models.CharField(max_length=140, unique = True)\n password1 = models.CharField(max_length=600)\n password2 = models.CharField(max_length=600)\n email = models.CharField(max_length=600, unique=... |
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
... | [
[
8,
0,
0.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
0,
0.66... | [
"\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_a... |
# Create your views here.
from django.contrib.auth import logout
from django.http import HttpResponseRedirect
from pirate_core import HttpRedirectException, namespace_get, FormMixin
def logout_view(request):
try:goto = request.session['currently_visiting']
except: goto = '/index.html'
logout(request)
r... | [
[
1,
0,
0.2,
0.1,
0,
0.66,
0,
895,
0,
1,
0,
0,
895,
0,
0
],
[
1,
0,
0.3,
0.1,
0,
0.66,
0.3333,
779,
0,
1,
0,
0,
779,
0,
0
],
[
1,
0,
0.4,
0.1,
0,
0.66,
0.6667,
... | [
"from django.contrib.auth import logout",
"from django.http import HttpResponseRedirect",
"from pirate_core import HttpRedirectException, namespace_get, FormMixin",
"def logout_view(request):\n try:goto = request.session['currently_visiting']\n except: goto = '/index.html'\n logout(request)\n retu... |
from dbindexer.api import register_index
from tagging.models import Tag
register_index(MyModel, {'name': 'icontains'})
| [
[
1,
0,
0.25,
0.25,
0,
0.66,
0,
871,
0,
1,
0,
0,
871,
0,
0
],
[
1,
0,
0.5,
0.25,
0,
0.66,
0.5,
438,
0,
1,
0,
0,
438,
0,
0
],
[
8,
0,
1,
0.25,
0,
0.66,
1,
78... | [
"from dbindexer.api import register_index",
"from tagging.models import Tag",
"register_index(MyModel, {'name': 'icontains'})"
] |
from django.db import models
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from pirate_core import HttpRedirectException, namespace_get, FormMixin
from pirate_sources.models import IMGSource
from pirate_social.models import Locati... | [
[
1,
0,
0.04,
0.04,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.08,
0.04,
0,
0.66,
0.125,
302,
0,
1,
0,
0,
302,
0,
0
],
[
1,
0,
0.12,
0.04,
0,
0.66,
0.25,... | [
"from django.db import models",
"from django.contrib import admin",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from pirate_core import HttpRedirectException, namespace_get, FormMixin",
"from pirate_sources.models import IMGSource",
"from... |
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
... | [
[
8,
0,
0.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
0,
0.66... | [
"\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_a... |
from django import template
from django import forms
from django.http import HttpResponseRedirect
import datetime
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from tagging.models import Tag, TaggedItem
from pirate_profile.models import Profile
from pirate_core.h... | [
[
1,
0,
0.0059,
0.0059,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0118,
0.0059,
0,
0.66,
0.05,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0178,
0.0059,
0,
0.... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"import datetime",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from tagging.models import Tag, TaggedItem",
"from pirate_profile.... |
# Create your views here.
| [] | [] |
from django.contrib.contenttypes.models import ContentType
from django.db.models import signals
from django.conf import settings
from django.utils.translation import ugettext_noop as _
from pirate_forum.templatetags.blobtags import get_models
if "pirate_badges" in settings.INSTALLED_APPS:
from pirate_badges.models... | [
[
1,
0,
0.0244,
0.0244,
0,
0.66,
0,
469,
0,
1,
0,
0,
469,
0,
0
],
[
1,
0,
0.0488,
0.0244,
0,
0.66,
0.2,
680,
0,
1,
0,
0,
680,
0,
0
],
[
1,
0,
0.0732,
0.0244,
0,
0.6... | [
"from django.contrib.contenttypes.models import ContentType",
"from django.db.models import signals",
"from django.conf import settings",
"from django.utils.translation import ugettext_noop as _",
"from pirate_forum.templatetags.blobtags import get_models",
"if \"pirate_badges\" in settings.INSTALLED_APPS... |
from exceptions import ImportError, ValueError
from django.contrib import admin
from django.db import models
from django.core.exceptions import SuspiciousOperation
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from ... | [
[
1,
0,
0.008,
0.008,
0,
0.66,
0,
63,
0,
2,
0,
0,
63,
0,
0
],
[
1,
0,
0.016,
0.008,
0,
0.66,
0.0455,
302,
0,
1,
0,
0,
302,
0,
0
],
[
1,
0,
0.024,
0.008,
0,
0.66,
... | [
"from exceptions import ImportError, ValueError",
"from django.contrib import admin",
"from django.db import models",
"from django.core.exceptions import SuspiciousOperation",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from django.contri... |
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
... | [
[
8,
0,
0.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
0,
0.66... | [
"\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_a... |
from django import template
from django import forms
from django.http import HttpResponseRedirect
import datetime
from django.contrib.auth.models import User
from pirate_badges.models import Badge, BadgeDimension, test_badge, BadgeType
from pirate_core import HttpRedirectException, namespace_get, FormMixin
from pirate_... | [
[
1,
0,
0.0104,
0.0104,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0208,
0.0104,
0,
0.66,
0.0476,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0312,
0.0104,
0,
... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"import datetime",
"from django.contrib.auth.models import User",
"from pirate_badges.models import Badge, BadgeDimension, test_badge, BadgeType",
"from pirate_core import HttpRedirectException, na... |
# Create your views here.
| [] | [] |
# -*- coding: latin-1 -*-
"""
========
Fake-PIL
========
By: `UYSRC <http://www.uysrc.com/>`_
Date: Fri, Jan 14, 2011
PIL interface overtop Google Imaging API to enable
Django-nonrel model.ImageField work with
django-filetransfers. Validates whether the file
uploaded is indeed an image.
Released into the public ... | [
[
8,
0,
0.2136,
0.3981,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.4175,
0.0097,
0,
0.66,
0.3333,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.4272,
0.0097,
0,
0.66... | [
"\"\"\"\n========\nFake-PIL\n========\nBy: `UYSRC <http://www.uysrc.com/>`_\nDate: Fri, Jan 14, 2011\n\nPIL interface overtop Google Imaging API to enable",
"import logging",
"from google.appengine.api import images",
"class Image(object):\n __instances = {}\n\n \"\"\"\n Wrapper class around Google I... |
from django.db import models
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
import datetime
import django.dispatch
from django.contrib import admin
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from django.core... | [
[
1,
0,
0.0086,
0.0086,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0172,
0.0086,
0,
0.66,
0.0455,
533,
0,
1,
0,
0,
533,
0,
0
],
[
1,
0,
0.0259,
0.0086,
0,
0.... | [
"from django.db import models",
"from django.contrib.contenttypes import generic",
"from django.contrib.contenttypes.models import ContentType",
"import datetime",
"import django.dispatch",
"from django.contrib import admin",
"from django.utils.translation import ugettext as _",
"from django.contrib.a... |
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
... | [
[
8,
0,
0.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
0,
0.66... | [
"\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_a... |
from django import template
from django import forms
from django.http import HttpResponseRedirect
from pirate_social.models import Subscription,RelationshipEvent
from pirate_core.views import HttpRedirectException, namespace_get
from customtags.decorators import block_decorator
register = template.Library()
block = ... | [
[
1,
0,
0.0167,
0.0167,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0333,
0.0167,
0,
0.66,
0.1111,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.05,
0.0167,
0,
0.... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"from pirate_social.models import Subscription,RelationshipEvent",
"from pirate_core.views import HttpRedirectException, namespace_get",
"from customtags.decorators import block_decorator",
"regist... |
from django import template
from django import forms
from django.http import HttpResponseRedirect
import datetime
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from pirate_core import HttpRedirectException, namespace_get, FormMixin
from pirate_social.models impor... | [
[
1,
0,
0.0323,
0.0323,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0645,
0.0323,
0,
0.66,
0.0769,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0968,
0.0323,
0,
... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"import datetime",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from pirate_core import HttpRedirectException, namespace_get, FormMi... |
from django import template
from django import forms
from django.http import HttpResponseRedirect
import datetime
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from pirate_core import HttpRedirectException, namespace_get, FormMixin
from pirate_social.models impor... | [
[
1,
0,
0.0044,
0.0044,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0088,
0.0044,
0,
0.66,
0.05,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0133,
0.0044,
0,
0.... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"import datetime",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from pirate_core import HttpRedirectException, namespace_get, FormMi... |
# Create your views here.
| [] | [] |
from django.db import models
from django import template
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
#from ModuleDeliberation.models import Comment
from django.utils.translation im... | [
[
1,
0,
0.0087,
0.0087,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0174,
0.0087,
0,
0.66,
0.0455,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0261,
0.0087,
0,
0.... | [
"from django.db import models",
"from django import template",
"from django.contrib import admin",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.contenttypes import generic",
"from django.utils.translation import ugettex... |
from django import forms
from pirate_actions.models import Action
from pirate_topics.models import Topic
from pirate_core.forms import FormMixin
from markitup.widgets import MarkItUpWidget
from pirate_core.widgets import SelectTimeWidget, HorizRadioRenderer
from django.forms.extras import SelectDateWidget
import dateti... | [
[
1,
0,
0.0185,
0.0185,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.037,
0.0185,
0,
0.66,
0.1,
698,
0,
1,
0,
0,
698,
0,
0
],
[
1,
0,
0.0556,
0.0185,
0,
0.66... | [
"from django import forms",
"from pirate_actions.models import Action",
"from pirate_topics.models import Topic",
"from pirate_core.forms import FormMixin",
"from markitup.widgets import MarkItUpWidget",
"from pirate_core.widgets import SelectTimeWidget, HorizRadioRenderer",
"from django.forms.extras im... |
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... | [
[
8,
0,
0.2188,
0.375,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5,
0.0625,
0,
0.66,
0.5,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.8438,
0.375,
0,
0.66,
1,... | [
"\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_addition(self):\n \"\... |
# Create your views here.
| [] | [] |
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.template.loader import render_to_string
from django.shortcuts import render_to_response
from google.appengine.api import memcache
from pirate_ranking.models import get_ranked_list
from pirate_comments.models import get_c... | [
[
1,
0,
0.0041,
0.0041,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0082,
0.0041,
0,
0.66,
0.0455,
469,
0,
1,
0,
0,
469,
0,
0
],
[
1,
0,
0.0123,
0.0041,
0,
0.... | [
"from django.db import models",
"from django.contrib.contenttypes.models import ContentType",
"from django.template.loader import render_to_string",
"from django.shortcuts import render_to_response",
"from google.appengine.api import memcache",
"from pirate_ranking.models import get_ranked_list",
"from ... |
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... | [
[
8,
0,
0.2188,
0.375,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5,
0.0625,
0,
0.66,
0.5,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.8438,
0.375,
0,
0.66,
1,... | [
"\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_addition(self):\n \"\... |
from google.appengine.api import memcache
from django.http import HttpResponse, HttpResponseRedirect, QueryDict
import simplejson
from django.template.loader import render_to_string
from django.contrib.contenttypes.models import ContentType
from google.appengine.ext import deferred
from oa_cache.models import ListCache... | [
[
1,
0,
0.0027,
0.0027,
0,
0.66,
0,
279,
0,
1,
0,
0,
279,
0,
0
],
[
1,
0,
0.0054,
0.0027,
0,
0.66,
0.0526,
779,
0,
3,
0,
0,
779,
0,
0
],
[
1,
0,
0.0082,
0.0027,
0,
... | [
"from google.appengine.api import memcache",
"from django.http import HttpResponse, HttpResponseRedirect, QueryDict",
"import simplejson",
"from django.template.loader import render_to_string",
"from django.contrib.contenttypes.models import ContentType",
"from google.appengine.ext import deferred",
"fr... |
import dselector
from django.views.generic.simple import direct_to_template
from django.views.generic.create_update import delete_object
from django.views.decorators.csrf import csrf_protect
from django.conf.urls.defaults import *
from django.contrib import admin
from pirate_core import redirectable, home_page, welcom... | [
[
1,
0,
0.011,
0.011,
0,
0.66,
0,
198,
0,
1,
0,
0,
198,
0,
0
],
[
1,
0,
0.033,
0.011,
0,
0.66,
0.05,
956,
0,
1,
0,
0,
956,
0,
0
],
[
1,
0,
0.044,
0.011,
0,
0.66,
... | [
"import dselector",
"from django.views.generic.simple import direct_to_template",
"from django.views.generic.create_update import delete_object",
"from django.views.decorators.csrf import csrf_protect",
"from django.conf.urls.defaults import *",
"from django.contrib import admin",
"from pirate_core impo... |
from django.contrib.comments import Comment
from pirate_forum.models import ForumBlob
#from pirate_actions.models import Action
#from pirate_issues.models import Problem, Solution, Policy
FIELD_INDEXES = {
Comment: {'indexed': ['object_pk']},
ForumBlob: {'unindexed': ['description']},
}
| [
[
1,
0,
0.1,
0.1,
0,
0.66,
0,
45,
0,
1,
0,
0,
45,
0,
0
],
[
1,
0,
0.2,
0.1,
0,
0.66,
0.5,
956,
0,
1,
0,
0,
956,
0,
0
],
[
14,
0,
0.85,
0.4,
0,
0.66,
1,
697,... | [
"from django.contrib.comments import Comment",
"from pirate_forum.models import ForumBlob",
"FIELD_INDEXES = {\n Comment: {'indexed': ['object_pk']},\n ForumBlob: {'unindexed': ['description']},\n}"
] |
from django.db import models
from pirate_consensus.models import Consensus, UpDownVote
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
import datetime
from django.utils.translation import ugettext as _
from django.contrib import admin
from pirate_signals.models... | [
[
1,
0,
0.0041,
0.0041,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0082,
0.0041,
0,
0.66,
0.0526,
965,
0,
2,
0,
0,
965,
0,
0
],
[
1,
0,
0.0123,
0.0041,
0,
0.... | [
"from django.db import models",
"from pirate_consensus.models import Consensus, UpDownVote",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.contenttypes import generic",
"import datetime",
"from django.utils.translation import ugettext as _",
"from django.contrib impo... |
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
... | [
[
8,
0,
0.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
0,
0.66... | [
"\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_a... |
#List of ranking tags. These aren't necessarily tags in the classic sense, but shouldn
#be executed when a object's consensus is udpated i.e. when a vote object is created
| [] | [] |
# Create your views here.
| [] | [] |
from django.db import models
from django import template
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django.contrib.comments.signals import comment_was_posted
from pirate_perm... | [
[
1,
0,
0.0068,
0.0068,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0136,
0.0068,
0,
0.66,
0.0526,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0204,
0.0068,
0,
0.... | [
"from django.db import models",
"from django import template",
"from django.contrib import admin",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.contenttypes import generic",
"from django.contrib.comments.signals import ... |
from django import forms
import datetime
class BlobForm(forms.Form):
'''
This form is used to allow creation and modification of issue objects.
It extends FormMixin in order to provide a create() class method, which
is used to process POST, path, and object variables in a consistant way,
and in o... | [
[
1,
0,
0.05,
0.05,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.1,
0.05,
0,
0.66,
0.5,
426,
0,
1,
0,
0,
426,
0,
0
],
[
3,
0,
0.6,
0.85,
0,
0.66,
1,
... | [
"from django import forms",
"import datetime",
"class BlobForm(forms.Form):\n '''\n This form is used to allow creation and modification of issue objects. \n It extends FormMixin in order to provide a create() class method, which\n is used to process POST, path, and object variables in a consistant... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.