code stringlengths 1 1.72M | language stringclasses 1
value |
|---|---|
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
import urllib2,datetime,re
def cron_check(datetime,cron):
u'''cron表达式
语法:
m[1-24] s[0-59]
参数:
* 通配任意
'''
def _validate(c,s,type):
u'''验证下
'''
if c == "*":
return True
c = int(c)
... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
from django.conf.urls.defaults import patterns, url
urlpatterns = patterns('fetion.views',
url(r'^$', 'index'),
url(r'^login$','login'),
url(r'^logout$','logout'),
url(r'^fetion/login$', 'fetion_login'),
url(r'^fetion/query$', 'fetion... | Python |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from django.template import Library
register = Library()
@register.inclusion_tag('template.html', takes_context = True)
def phone_status(context):
request = context['request']
return request | Python |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
from django.template import Library
register = Library()
@register.inclusion_tag('template.html', takes_context = True)
def phone_status(context):
request = context['request']
return request | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
from django.core.management.base import BaseCommand
from django.conf import settings
from fetion.webim import FetionWebIM
import SimpleXMLRPCServer
import logging
logger = logging.getLogger('fetion')
HOST_IP = "localhost"
HOST_PORT = settings.RPC_PO... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
from django.core.management.base import BaseCommand
from django.conf import settings
from fetion.webim import FetionWebIM
import SimpleXMLRPCServer
import logging
logger = logging.getLogger('fetion')
HOST_IP = "localhost"
HOST_PORT = settings.RPC_PO... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
'''
Created on 2011-12-31
@author: fredzhu.com
'''
u'''
程序基于https://webim.feixin.10086.cn/login.aspx发送消息.不记录密码
'''
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponse,HttpResponseRedire... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
import datetime
def cron_check(datetime,cron):
u'''cron表达式
语法:
d[1-12] D[1-31] m[1-24] s[0-59]
参数:
* 通配任意
'''
def _validate(c,s,type):
u'''验证下
'''
if c == "*":
return True
c ... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
#设置服务器,用户名、口令以及邮箱的后缀
mail_host="smtp.gmail.com"
mail_user="ad@fengsage.com"
mail_pass="sd145914sd"
def send_mail(to, subject, text):
msg = MIMEMult... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
CITY_LIST = (
('101210301',u'嘉兴'),
('101020100',u'上海')
)
def weather(city):
u'''天气预报
'''
import urllib2,json
API = u'http://m.weather.com.cn/data/%s.html'%city
resp = urllib2.urlopen(API)
if resp.getcode()!=200:
... | Python |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import os
PRJ_PATH=os.path.realpath(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
if DEBUG:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends... | Python |
#!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized t... | Python |
from django.conf.urls.defaults import patterns, include, url
urlpatterns = patterns('',
url(r'^', include('fetion.urls')),
url(r'^api/', include('api.urls')),
)
| Python |
#!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized t... | Python |
"""Classes related to saving data such as user ID and API key and the
Skill Tree as a Python pickle to remember data between sessions."""
from cPickle import load, dump
import sys
class Pickle():
"""Parent class for things that need pickling. Shouldn't be used
directly."""
def __init__(self, filename)... | Python |
#!/usr/bin/python
import signal
import urllib
import time
import atexit
import sys
import os
import time, datetime
import fetch, character, pickle, util
def cleanup(thread):
print "atexit cleanup() called"
thread.kill()
sys.exit(0)
def main():
config = pickle.ConfigPickle()
apik... | Python |
#!/usr/bin/python
import signal
import urllib
import fetch
import time
import atexit
import sys
import character
def cleanup(thread):
thread.kill()
def fetchtest():
pool = fetch.PoolThread(2, 5)
# Cleanup properly on kill and program exit
atexit.register(cleanup, pool)
signal... | Python |
#!/usr/bin/python
import signal
import urllib
import time
import atexit
import sys
import os
import time, datetime
import fetch, character, pickle, util
def cleanup(thread):
print "atexit cleanup() called"
thread.kill()
sys.exit(0)
def main():
config = pickle.ConfigPickle()
apik... | Python |
#!/usr/bin/python
import signal
import urllib
import fetch
import time
import atexit
import sys
import character
def cleanup(thread):
thread.kill()
def fetchtest():
pool = fetch.PoolThread(2, 5)
# Cleanup properly on kill and program exit
atexit.register(cleanup, pool)
signal... | Python |
"""Classes related to downloading data from the Eve API."""
import os
import httplib, urllib
import threading, Queue
import time
import util
FETCH_PERIODIC = 1
FETCH_NEVER = 2
FETCH_TYPES = (FETCH_PERIODIC, FETCH_NEVER)
class PoolThread(threading.Thread):
"""Thread that manages a number of FetchThre... | Python |
"""Miscellaneous helper functions that don't belong in the client code."""
import time
from datetime import datetime
def xmlpath(prefix, url, params=None):
"""Turns a URL of form /account/Characters.xml.aspx into a path
like 12345/12345/Characters.xml."""
parts = [prefix]
if params: # This file mig... | Python |
"""Contains classes for character specific data, like attributes,
skills, wallet, and corporation. Parsing makes use of the great
cElementTree module availble standard in Python 2.5."""
import xml.etree.cElementTree as ET
ATTRIBUTES = (
"memory",
"perception",
"intelligence",
... | Python |
"""PyRSS2Gen - A Python library for generating RSS 2.0 feeds."""
__name__ = "PyRSS2Gen"
__version__ = (1, 0, 0)
__author__ = "Andrew Dalke <dalke@dalkescientific.com>"
_generator_name = __name__ + "-" + ".".join(map(str, __version__))
import datetime
# Could make this the base class; will need to add 'publish'
clas... | Python |
#coding=utf-8
'''
从sis读取数据并保存到目录
fid
yyyymm
dd
文件:
pid.post
[
{author: '', content: ''},
...
]
pid.index, pid.comment.index
word,flag,count
执行:
crawl:
1) 读取帖子内容
2) 写入.post文件, 写入.index文件
... | Python |
"""Beautiful Soup
Elixir and Tonic
"The Screen-Scraper's Friend"
http://www.crummy.com/software/BeautifulSoup/
Beautiful Soup parses a (possibly invalid) XML or HTML document into a
tree representation. It provides methods and Pythonic idioms that make
it easy to navigate, search, and modify the tree.
A well-formed X... | Python |
#coding=utf-8
'''
Created on 2011-8-30
@author: chris
'''
import sys
import urllib2
import urllib
import cookielib
from ripper.core import EncodingConvert
from ripper.core.Utils import enable_proxy #@UnresolvedImport
from ripper.core.Utils import disable_proxy #@UnresolvedImport
import json
import urlp... | Python |
#coding=utf-8
'''
Created on 2011-8-30
http相关, dom解析相关
@author: chris
'''
from ripper.core.Exceptions import ParseException, DownloadException
import urllib, os
import cookielib
from ripper.core.EncodingConvert import zh2gbk, zh2utf8, zh218030
from cookielib import FileCookieJar
try:
from bs4 import... | Python |
#coding=utf-8
'''
Created on 2011-8-30
@author: chris
'''
import sys
sys.path.append('/harvester/newRipper/ripper/src/')
import urllib2
import urllib
import cookielib
from ripper.core import EncodingConvert
from ripper.core.Utils import enable_proxy #@UnresolvedImport
from ripper.core.Utils import disab... | Python |
# | Python |
# coding=utf-8
# The contents of this file are subject to the BitTorrent Open Source License
# Version 1.1 (the License). You may not copy or use this file, in either
# source code or executable form, except in compliance with the License. You
# may obtain a copy of the License at http://www.bittorrent.com/l... | Python |
# coding=UTF-8
import sys
import os
try:
import Image # request PIL 1.1.6
import ImageOps
except ImportError:
print 'PIL 1.1.6 required'
class Thumbnail:
def __init__(self,orgImg,destDir,destName=None): # orginal img filename with full-path
self.org = orgImg
self... | Python |
#coding=utf-8
from ripper.core import EncodingConvert
from ripper.core.Exceptions import DownloadException
import uuid
import urllib,sys,os,re,time
from ripper.core.Utils import enable_proxy, disable_proxy #@UnresolvedImport
from ripper.core.Utils import clear_url #@UnresolvedImport
import socket
import url... | Python |
#coding=utf-8
import urllib,urllib2,cookielib,re,datetime,socket
import EncodingConvert as ec
import time, threading, traceback, os, sys, uuid
from ripper.handler import socks
'''
Discuz论坛爬虫,带附件下载
原作http://www.colordancer.net/blog/?p=325
修改chris
2010-09-18
'''
gheaders = None
SITE_D... | Python |
#coding=utf-8
'''
Created on 2011-8-30
@author: chris
'''
class RipperException(Exception):
'''
严重异常, 中断执行
'''
def __init__(self, msg):
'''
Constructor
'''
self.msg = msg
print msg
class ParseException(RipperException... | Python |
#coding=utf-8
'''
Created on 2013-2-8
@author: Administrator
'''
sync_db_host = 'fuckavmm.com'
sync_db_user = 'ihamster'
sync_db_pwd = '123z123'
sync_db_name = 'ihamster_harvester'
#sync_db_host = '127.0.0.1'
#sync_db_user = 'root'
#sync_db_pwd = ''
#sync_db_name = 'harvester'
| Python |
#coding=utf-8
'''
分析
~35k posts, costs ~ 45m
'''
#import jieba
#import jieba.posseg as pseg
from optparse import OptionParser
import os, sys
import json
import re
sys.path.append(os.path.abspath(os.path.dirname(os.path.join(__file__, '../../'))))
from ripper.syncconfig import sync_db_host, sync_db_user, s... | Python |
# coding=UTF-8
import sys
import os
try:
import Image # request PIL 1.1.6
import ImageOps
except ImportError:
print 'PIL 1.1.6 required'
class Thumbnail:
def __init__(self,orgImg,destDir,destName=None): # orginal img filename with full-path
self.org = orgImg
self... | Python |
# -*- coding: utf-8 -*-
# copy fom wikipedia
zh2Hant = {
u'呆': u'獃',
u"打印机": u"印表機",
u'帮助文件': u'說明檔案',
u"画": u"畫",
u"板": u"板",
u"表": u"表",
u"才": u"才",
u"丑": u"醜",
u"出": u"出",
u"淀": u"澱",
u"冬": u"冬",
u"范": u"範",
u"丰": u"豐",
u"刮": u"刮",
u"后": u"後",
u"胡": u"胡",
u"回": u"回",
u"伙": u"夥",
u"姜": u"薑",
u"借": u"借",
u"克": u"克",
... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from unittest import TestCase
from langconv import *
class ConvertMapTest(TestCase):
def test_map(self):
mapping = {'a': 'b', 'b': 'a', 'abc': 'cba', 'cb': 'bb'}
cm = ConvertMap('test', mapping)
self.assertEqual(len(cm), 6) # with switch node:... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from copy import deepcopy
import re
try:
import psyco
psyco.full()
except:
pass
from zh_wiki import zh2Hant, zh2Hans
# states
(START, END, FAIL, WAIT_TAIL) = range(4)
# conditions
(TAIL, ERROR, MATCHED_SWITCH, UNMATCHED_SWITCH, CONNECTOR) = range(5)
MAPS = ... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from copy import deepcopy
import re
try:
import psyco
psyco.full()
except:
pass
from zh_wiki import zh2Hant, zh2Hans
# states
(START, END, FAIL, WAIT_TAIL) = range(4)
# conditions
(TAIL, ERROR, MATCHED_SWITCH, UNMATCHED_SWITCH, CONNECTOR) = range(5)
MAPS = ... | Python |
#coding=utf-8
from ripper.core import EncodingConvert
from ripper.core.Exceptions import DownloadException
import uuid
import urllib,sys,os,re,time
from ripper.core.Utils import enable_proxy, disable_proxy #@UnresolvedImport
from ripper.core.Utils import clear_url #@UnresolvedImport
import socket
import url... | Python |
#coding=utf-8
import os, re
from ripper.handler.Policy import torrentProxyPolicy
from ripper.core.Utils import getId, enable_proxy, disable_proxy #@UnresolvedImport
from ripper.core.Utils import clear_url
from urllib import urlopen, urlencode
CODE_MAP = {
'http://www.haoseed.com/' : 'ref',
... | Python |
torrentProxyPolicy = {
'http://www.jandown.com/' : False,
'http://www.haoseed.com/' : False,
'http://www.mimima.com/' : True
}
| Python |
import re
import mechanize
import mimetypes
import sys
import os
import getpass
from optparse import OptionParser
from CompressURL import Compress
# _____ _____ _ _ _ _
# | ___| ____| | | |_ __ _ _| | ___ __ _ __| |
# | |_ | _| | | | | '_ \| | | | | / _ \ / _` |/ _` |
#... | Python |
import re
import mechanize
def Compress(url):
LINK = "http://is.gd"
browser = mechanize.Browser()
browser.open(LINK)
browser.select_form(nr=0)
browser["URL"] = url
browser.submit()
for link in browser.links():
if link.url == link.text:
return link.url
| Python |
#!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# chromium_extension.py
import array
import hashlib
import logging
import optparse
import os
import random
import re
import shuti... | Python |
#!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# chromium_extension.py
import array
import hashlib
import logging
import optparse
import os
import random
import re
import shuti... | Python |
#!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# chromium_extension.py
import array
import hashlib
import logging
import optparse
import os
import random
import re
import shuti... | Python |
#!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# chromium_extension.py
import array
import hashlib
import logging
import optparse
import os
import random
import re
import shuti... | Python |
#!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# chromium_extension.py
import array
import hashlib
import logging
import optparse
import os
import random
import re
import shuti... | Python |
#!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# chromium_extension.py
import array
import hashlib
import logging
import optparse
import os
import random
import re
import shuti... | Python |
#!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# chromium_extension.py
import array
import hashlib
import logging
import optparse
import os
import random
import re
import shuti... | Python |
#!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# chromium_extension.py
import array
import hashlib
import logging
import optparse
import os
import random
import re
import shuti... | Python |
#!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# chromium_extension.py
import array
import hashlib
import logging
import optparse
import os
import random
import re
import shuti... | Python |
#!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# chromium_extension.py
import array
import hashlib
import logging
import optparse
import os
import random
import re
import shuti... | Python |
#!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# chromium_extension.py
import array
import hashlib
import logging
import optparse
import os
import random
import re
import shuti... | Python |
#!/usr/bin/python
# Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# chromium_extension.py
import array
import hashlib
import logging
import optparse
import os
import random
import re
import shuti... | Python |
#! python
from elixir import *
from model import *
import datetime
class Hub(object):
def __init__(self, name):
self.name = name
def pop_entite(self):
## SRA la racine
e = Entite()
e.codent = u"SRA"
e.nom = u"SRA INFORMATIQUE"
e.typ = u'ROOT'
session.c... | Python |
from elixir import *
import datetime
metadata.bind = "sqlite:///fex.dbf"
metadata.bind.echo = False
class Entite(Entity):
using_options(tablename=u'ENTITE')
codent = Field(Unicode(10))
nom = Field(Unicode(30))
description = Field(UnicodeText, default=u"" )
typ = Field(Unicode(10), default=u'CLIENT... | Python |
import os
import sys
import warnings
import opcode # opcode is not a virtualenv module, so we can use it to find the stdlib
# Important! To work on pypy, this must be a module that resides in the
# lib-python/modified-x.y.z directory
dirname = os.path.dirname
distutils_path = os.path.join... | Python |
"""Append module search paths for third-party packages to sys.path.
****************************************************************
* This module is automatically imported during initialization. *
****************************************************************
In earlier versions of Python (up to 1.5a3), scripts or... | Python |
#!/bin/python
#
# Copyright (C) 2012 Gedare Bloom
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge... | Python |
#!/bin/python
#
# Copyright (C) 2012 Gedare Bloom
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for internet
Copyright (C) 2003-2006 Frederico Caldeira Knabben
Licensed under the terms of the GNU Lesser General Public License:
http://www.opensource.org/licenses/lgpl-license.php
For further information visit:
http://www.fckeditor.net/
"Suppo... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for internet
Copyright (C) 2003-2006 Frederico Caldeira Knabben
Licensed under the terms of the GNU Lesser General Public License:
http://www.opensource.org/licenses/lgpl-license.php
For further information visit:
http://www.fckeditor.net/
"Suppo... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or l... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http:... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | Python |
#!/usr/bin/env python
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
h... | Python |
#!/usr/bin/env python
"""
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
* Copyright (C) 2003-2008 Frederico Caldeira Knabben
*
* == BEGIN LICENSE ==
*
* Licensed under the terms of any of the following licenses at your
* choice:
*
* - GNU General Public License Version 2 or l... | Python |
"""
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2008 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.org/license... | Python |
#!/usr/bin/python
import datetime
import libxml2
import sys
name = "test-1200K.xml"
if len(sys.argv) > 1:
name = sys.argv[1]
else:
print "no input file use 'test-1200K.xml'"
doc = open(name)
doc.seek(0, 2)
size = doc.tell()
t1=datetime.datetime.now()
doc = libxml2.parseFile(name)
t2=datetime.datetime.now()
ctxt ... | Python |
#!/usr/bin/env python
################################################################################
##
## Photivo
##
## Copyright (C) 2013 Sergey Salnikov <salsergey@gmail.com>
##
## This file is part of Photivo.
##
## Photivo is free software: you can redistribute it and/or modify
## it under the terms of the GNU ... | Python |
#!/usr/bin/env python
#
# scons-time - run SCons timings and collect statistics
#
# A script for running a configuration through SCons with a standard
# set of invocations to collect timing and memory statistics and to
# capture the results in a consistent set of output files for display
# and analysis.
#
#
# Copyrigh... | Python |
################################################################################
##
## Photivo
##
## Copyright (C) 2013 Jos De Laender <jos@de-laender.be>
##
## This file is part of Photivo.
##
## Photivo is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License ver... | Python |
#! /usr/bin/env python
#
# SCons - a Software Constructor
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"... | Python |
################################################################################
##
## photivo
##
## Copyright (C) 2013 Jos De Laender <jos@de-laender.be>
##
## This file is part of photivo.
##
## photivo is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License ver... | Python |
#! /usr/bin/env python
#
# SCons - a Software Constructor
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"... | Python |
"""SCons.Tool.qt4
Tool-specific initialization for Qt4.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001-7,2010 The SCons Foundation
#
# Permission is hereby granted, free of charge, t... | Python |
#! /usr/bin/env python
import os
from os.path import exists
import shutil
#name of photivo directory
photivo_dir='photivo-s'
home_dir = os.getenv("HOME")
source_dir=home_dir +'/'+photivo_dir
target_dir = home_dir +'/'+photivo_dir + "/Photivo.app/Contents"
AppBundle= home_dir + '/' + photivo_dir + "/Photivo.app"
os... | Python |
################################################################################
##
## Photivo
##
## Copyright (C) 2013 Jos De Laender <jos@de-laender.be>
##
## This file is part of Photivo.
##
## Photivo is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License ver... | Python |
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
... | Python |
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
... | Python |
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
... | Python |
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
... | Python |
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
... | Python |
Subsets and Splits
SQL Console for ajibawa-2023/Python-Code-Large
Provides a useful breakdown of language distribution in the training data, showing which languages have the most samples and helping identify potential imbalances across different language groups.