text
stringlengths
0
1.05M
meta
dict
# With credit to DanielKO from lxml import etree import datetime, re import asyncio, aiohttp NINTENDO_LOGIN_PAGE = "https://id.nintendo.net/oauth/authorize" SPLATNET_CALLBACK_URL = "https://splatoon.nintendo.net/users/auth/nintendo/callback" SPLATNET_CLIENT_ID = "12af3d0a3a1f441eb900411bb50a835a" SPLATNET_SCHEDULE_U...
{ "repo_name": "haitaka/DroiTaka", "path": "cogs/utils/maps.py", "copies": "1", "size": "5336", "license": "mit", "hash": -5921231572498705000, "line_mean": 34.5733333333, "line_max": 122, "alpha_frac": 0.5929535232, "autogenerated": false, "ratio": 3.2816728167281672, "config_test": false, "h...
# With credit to DanielKO from lxml import etree import datetime, re import asyncio NINTENDO_LOGIN_PAGE = "https://id.nintendo.net/oauth/authorize" SPLATNET_CALLBACK_URL = "https://splatoon.nintendo.net/users/auth/nintendo/callback" SPLATNET_CLIENT_ID = "12af3d0a3a1f441eb900411bb50a835a" SPLATNET_SCHEDULE_URL = "htt...
{ "repo_name": "Rapptz/RoboDanny", "path": "cogs/utils/maps.py", "copies": "1", "size": "5463", "license": "mit", "hash": 5818031861229565000, "line_mean": 36.1632653061, "line_max": 122, "alpha_frac": 0.5859417902, "autogenerated": false, "ratio": 3.3351648351648353, "config_test": false, "ha...
#!/bin/env python """ write_ARFI_index_IOS.py Write individual ARFI index lesion IOS files in each patient directory to do additional analysis instead of Zach's spreadsheets that challenges plot generation, etc. This should be a one-time-use script, with a follow-on script to collect all of the data for downstream an...
{ "repo_name": "Guokr1991/ProstateSensitivityAnalysis", "path": "write_ARFI_index_IOS.py", "copies": "1", "size": "1474", "license": "apache-2.0", "hash": 696187829588009100, "line_mean": 28.48, "line_max": 79, "alpha_frac": 0.5807327001, "autogenerated": false, "ratio": 2.74487895716946, "confi...
#!/bin/env python """ write_histology.py Write individual histology lesion metric files in each patient directory to do additional analysis instead of Zach's spreadsheets that challenges plot generation, etc. This should be a one-time-use script, with a follow-on script to collect all of the data for downstream analy...
{ "repo_name": "Guokr1991/ProstateSensitivityAnalysis", "path": "write_histology.py", "copies": "1", "size": "1570", "license": "apache-2.0", "hash": 3253887043899275000, "line_mean": 29.7843137255, "line_max": 80, "alpha_frac": 0.5694267516, "autogenerated": false, "ratio": 2.8442028985507246, ...
#!/bin/env python """ write_MRI_index.py Write individual MRI index lesion files in each patient directory to do additional analysis instead of Zach's spreadsheets that challenges plot generation, etc. This should be a one-time-use script, with a follow-on script to collect all of the data for downstream analysis. ""...
{ "repo_name": "Guokr1991/ProstateSensitivityAnalysis", "path": "write_MRI_index.py", "copies": "1", "size": "2356", "license": "apache-2.0", "hash": -7959956887006583000, "line_mean": 35.2461538462, "line_max": 80, "alpha_frac": 0.6090831919, "autogenerated": false, "ratio": 2.963522012578616, ...
""" xls_output.py Functions for outputting analysis results to XLSX spreadsheet """ import datetime import xlsxwriter import io import re from . import output from . import utils # Regular expressions for styling tags RE_STYLE = re.compile(r"^<style +([^>]*)>(.*)</style>$") # Notes text NOTES = dict() NOTES['preamb...
{ "repo_name": "fls-bioinformatics-core/RnaChipIntegrator", "path": "rnachipintegrator/xls_output.py", "copies": "1", "size": "9001", "license": "artistic-2.0", "hash": 1231638843816951600, "line_mean": 30.6936619718, "line_max": 81, "alpha_frac": 0.509276747, "autogenerated": false, "ratio": 4.38...
#!/bin/env python """Parses given arguments""" import random import os from .decrypter import decrypt_files from .encrypter import encrypt_files from .uploader import upload_files from .hostlist import generate_host_string def check_max_filesize(chosen_file, max_size): """ Checks file sizes for host """ ...
{ "repo_name": "lc-guy/limf", "path": "limf/parse_arguments.py", "copies": "2", "size": "3418", "license": "mit", "hash": -1315134562105453600, "line_mean": 39.6904761905, "line_max": 107, "alpha_frac": 0.5008777063, "autogenerated": false, "ratio": 4.545212765957447, "config_test": false, "ha...
#!/bin/env python # Polls the Condor collector for fsurf jobs and outputs stats for graphite import socket import time import sys import htcondor # requires condor 7.9.5+ JOB_STATUS = {0: 'Unexpanded', 1: 'Idle', 2: 'Running', 3: 'Removed', 4: 'Completed', ...
{ "repo_name": "OSGConnect/freesurfer_workflow", "path": "monitoring/collect-fsurf.py", "copies": "1", "size": "6816", "license": "apache-2.0", "hash": -2958368533910351400, "line_mean": 38.1724137931, "line_max": 76, "alpha_frac": 0.5249413146, "autogenerated": false, "ratio": 3.7951002227171493,...
#!/bin/env python """Prints the price of our car.""" import collections #pylint: disable=superfluous-parens def main(): """Calculates the price of our car.""" item_to_price = { 'Tamiya Grasshopper RC Car': 89.41, '7.2V Tenergy 3800mAh NiMH battery': 26.99, 'Raspberry Pi 2': 39.95, ...
{ "repo_name": "bskari/sparkfun-avc", "path": "setup/price.py", "copies": "1", "size": "1431", "license": "mit", "hash": -510625700310966340, "line_mean": 27.62, "line_max": 77, "alpha_frac": 0.5856044724, "autogenerated": false, "ratio": 3.110869565217391, "config_test": false, "has_no_keywor...
#! /bin/env python # pylint: disable=superfluous-parens # pylint: disable=broad-except import argparse import logging import os import sys from rdr_service.services.system_utils import setup_logging, setup_i18n from rdr_service.tools.tool_libs import GCPProcessContext from rdr_service.services.jira_utils import JiraTic...
{ "repo_name": "all-of-us/raw-data-repository", "path": "rdr_service/tools/tool_libs/test_jira.py", "copies": "1", "size": "4445", "license": "bsd-3-clause", "hash": -887865486268975000, "line_mean": 35.1382113821, "line_max": 116, "alpha_frac": 0.5919010124, "autogenerated": false, "ratio": 3.570...
#! /bin/env python """PyMT interface to ESMPy grids. **Examples** Create a grid that looks like this, :: (3) --- (4) --- (5) | | | | 0 | 1 | | | | (0) --- (1) --- (2) >>> import ESMF >>> mngr = ESMF.Manager() >>> mngr.local_pet 0 >>> mngr.pet_count 1 Represe...
{ "repo_name": "csdms/coupling", "path": "pymt/grids/esmp.py", "copies": "2", "size": "10695", "license": "mit", "hash": 3144079863739992000, "line_mean": 27.2936507937, "line_max": 125, "alpha_frac": 0.5829827022, "autogenerated": false, "ratio": 2.735993860322333, "config_test": false, "has_...
#! /bin/env python # queue a job on the rq queue import sys import datetime import time from redis import Redis from redis.exceptions import ConnectionError as RedisConnectionError from rq import Queue from harvester.config import config from harvester.config import RQ_Q_LIST ID_EC2_INGEST = '' ID_EC2_SOLR_BUILD = ''...
{ "repo_name": "ucldc/harvester", "path": "scripts/queue_harvest.py", "copies": "3", "size": "3969", "license": "bsd-3-clause", "hash": -3946034483007258000, "line_mean": 31.2682926829, "line_max": 79, "alpha_frac": 0.6215671454, "autogenerated": false, "ratio": 3.7058823529411766, "config_test"...
#!/bin/env/python '''read in or write out file, standard utf16''' import os # charset def read_utf16_charset(filename): '''unicode charset file''' print 'read charset file, should be encoded with utf16' with open(filename, 'r') as infile: charset = infile.read().decode('utf16') charset = s...
{ "repo_name": "hyichao/protobuf-lmdb", "path": "fileio.py", "copies": "1", "size": "2065", "license": "mit", "hash": 3699408594798056400, "line_mean": 26.9189189189, "line_max": 59, "alpha_frac": 0.608716707, "autogenerated": false, "ratio": 3.782051282051282, "config_test": false, "has_no_ke...
#!/bin/env python """Reference Implementation of v1 C3 Security Beacon Auth Server.""" # import argparse # import asyncio # import os # import pprint # import signal # from .beacon import set_master_key # from .protocol import SecBeaconProtocol # parser = argparse.ArgumentParser( # description='Start a debug auth...
{ "repo_name": "C3Wireless/c3-reference", "path": "src/c3reference/authserver.py", "copies": "1", "size": "1587", "license": "mit", "hash": -8630402981054658000, "line_mean": 28.9433962264, "line_max": 73, "alpha_frac": 0.6313799622, "autogenerated": false, "ratio": 3.3410526315789473, "config_t...
#! /bin/env python '''Rerun a collection's stored enrichments ''' import sys import argparse from harvester.post_processing.couchdb_runner import CouchDBJobEnqueue from harvester.collection_registry_client import Collection import harvester.post_processing.enrich_existing_couch_doc def main(args): parser = argpar...
{ "repo_name": "barbarahui/harvester", "path": "scripts/rerun_enrichments.py", "copies": "3", "size": "1649", "license": "bsd-3-clause", "hash": -9144142540565623000, "line_mean": 30.7115384615, "line_max": 78, "alpha_frac": 0.6149181322, "autogenerated": false, "ratio": 3.7908045977011495, "con...
#! /bin/env python '''Reweights the terms of an uffbaps calculation and recalcualtes the totals. The components of the UFFBAPS calculation are assumed to be in contiguous columns in the provided file.''' from PEATSA import Core import sys, operator, optparse usage = "usage: %prog [options]" parser = optparse.OptionP...
{ "repo_name": "dmnfarrell/peat", "path": "PEATSA/Tools/ApplyWeights.py", "copies": "1", "size": "2962", "license": "mit", "hash": 871914755602737300, "line_mean": 34.2619047619, "line_max": 121, "alpha_frac": 0.6937879811, "autogenerated": false, "ratio": 3.377423033067275, "config_test": false...
#! /bin/env python r""" Examples ======== Define a grid that consists of two trianges that share two points. :: (2) - (3) / \ / (0) - (1) Create the grid, >>> from pymt.printers.vtk import tofile >>> from pymt.grids.field import GridField >>> g = GridField ([0, 2, 1, 3], [0, 0, 1, 1], [0, 2, 1...
{ "repo_name": "csdms/coupling", "path": "deprecated/printers/vtk/vtk.py", "copies": "2", "size": "3377", "license": "mit", "hash": -9208300911446856000, "line_mean": 24.3909774436, "line_max": 83, "alpha_frac": 0.5756588688, "autogenerated": false, "ratio": 3.5735449735449736, "config_test": fa...
#! /bin/env python '''run grabbing of new collection and updating in couch docs locally. ''' import sys import argparse import Queue import threading import requests import json url_api_base = 'https://registry.cdlib.org/api/v1/collection/' from harvester.post_processing.couchdb_runner import CouchDBWorker from harve...
{ "repo_name": "mredar/harvester", "path": "scripts/run_new_collection_all_docs.py", "copies": "3", "size": "2618", "license": "bsd-3-clause", "hash": -7223121749232468000, "line_mean": 36.9420289855, "line_max": 88, "alpha_frac": 0.6508785332, "autogenerated": false, "ratio": 3.4356955380577427, ...
#!/bin/env python '''run.py - wrapper around command line ==================================== Purpose ------- This script is a generic wrapper for tools with a command line interface. The wrapper records execution times and logs successfull completion of the command. Usage ----- For example, typing:: python ...
{ "repo_name": "AntonioJBT/CGATPipeline_core", "path": "scripts/run.py", "copies": "2", "size": "4038", "license": "mit", "hash": 867704536862055600, "line_mean": 32.65, "line_max": 226, "alpha_frac": 0.573551263, "autogenerated": false, "ratio": 3.563989408649603, "config_test": false, "has_n...
#!/bin/env python """Simulates the traffic of one or more listeners or beacons.""" import time import argparse import asyncio import os import random import struct # from binascii import unhexlify from enum import IntEnum import lzo # from Crypto.Cipher import AES # from Crypto.Hash import CMAC from .proto.common_p...
{ "repo_name": "C3Wireless/c3-reference", "path": "src/c3reference/listener.py", "copies": "1", "size": "9445", "license": "mit", "hash": 6463844148498691000, "line_mean": 33.5970695971, "line_max": 106, "alpha_frac": 0.5772366331, "autogenerated": false, "ratio": 3.3720099964298464, "config_tes...
#!/bin/env python # SRAFixer.py # by Brendan Kohrn, January 15, 2015 # edited by Jorge Boucas, December 30, 2015 # # This program is meant to refomat reads downladed from the SRA # (http://www.ncbi.nlm.nih.gov/sra/), including the example data set # (http://trace.ncbi.nlm.nih.gov/Traces/sra/sra.cgi?run=SRR1613972). ...
{ "repo_name": "loeblab/Duplex-Sequencing", "path": "TestData/SRAFixer.py", "copies": "1", "size": "1975", "license": "bsd-3-clause", "hash": -2801716666388409000, "line_mean": 31.3770491803, "line_max": 88, "alpha_frac": 0.6324050633, "autogenerated": false, "ratio": 3.1102362204724407, "config...
#!/bin/env python SUBDOMAIN = ( 'www', 'www2', 'dev', 'prod', 'mail', 'jenkins', 'cert', 'apt', 'haproxy' ) DOMAIN = ( 'example.com', 'example.net', 'example.org' ) TAGS = ( 'env:prod', 'role:common-node', 'role:monitoring', 'role:frontend', 'role:wor...
{ "repo_name": "DataDog/tablemutt", "path": "generate_test_data.py", "copies": "1", "size": "1516", "license": "mit", "hash": -2484697859452909600, "line_mean": 21.9848484848, "line_max": 70, "alpha_frac": 0.5435356201, "autogenerated": false, "ratio": 3.158333333333333, "config_test": false, ...
#! /bin/env python # This file runs successfully with Python 2.7.11, pygame-1.9.1, py2exe-0.6.9, and pymedia-1.2.2 from distutils.core import setup import py2exe, sys, os import shutil def copy_to_dir(filelist, dst, base_path): for filename in filelist: shutil.copy2(os.path.join(base_path,filename), dst) ...
{ "repo_name": "pymo/pymo", "path": "pc/compile_pymo_to_exe.py", "copies": "2", "size": "1805", "license": "mit", "hash": -9213919528541678000, "line_mean": 47.7837837838, "line_max": 220, "alpha_frac": 0.6847645429, "autogenerated": false, "ratio": 3.013355592654424, "config_test": false, "ha...
#!/bin/env python # This is a basic compatibility test to make sure you're using the built-in # classes properly. # # If this crashes, or you get an error message, or you never get any messages, # you're likely # using the built-ins (particularly: RoutingUpdate) in such a way that your # implementation will fail the g...
{ "repo_name": "zhaoyan1117/RoutingProtocols", "path": "scenarios/compatibility_test.py", "copies": "1", "size": "1855", "license": "bsd-3-clause", "hash": -4056730312630255600, "line_mean": 37.6458333333, "line_max": 181, "alpha_frac": 0.6409703504, "autogenerated": false, "ratio": 3.864583333333...
#!/bin/env python # This is a basic compatibility test to make sure you're using the built-in # classes properly. # # If this crashes, or you get an error message, or you never get any messages, # you're likely # using the built-ins (particularly: RoutingUpdate) in such a way that your # implementation will fail the gr...
{ "repo_name": "zhaoyan1117/RoutingProtocols", "path": "tests/compat_test.py", "copies": "1", "size": "2181", "license": "bsd-3-clause", "hash": -8039751330386386000, "line_mean": 31.0735294118, "line_max": 181, "alpha_frac": 0.653828519, "autogenerated": false, "ratio": 3.7218430034129693, "con...
#! /bin/env python # This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com # Date: 2014-01-30 import os,sys,string,struct,socket,threading,time,re,maxminddb, MySQLdb sys.path.append("/home/kun/mnt") from webcrawl import * ISOTIMEFORMAT='%Y-%m-%d %X' #geo = geoip2.database.Reader(...
{ "repo_name": "neoyk/pathperf", "path": "cmp_ip2server_mapping.py", "copies": "1", "size": "1619", "license": "apache-2.0", "hash": -3060903486406670300, "line_mean": 34.9777777778, "line_max": 231, "alpha_frac": 0.6429894997, "autogenerated": false, "ratio": 3.0896946564885495, "config_test": ...
#!/bin/env python '''This script illustrates how to download and access the `local politics` subcorpus within TREC DD This particular corpus is a selection of the TREC KBA 2014 StreamCorpus that has already been tagged with Serif NER, and is organized into hourly directories based on the origination time stamp on each...
{ "repo_name": "chrismattmann/trec-dd.org", "path": "s3-data-sets/local-politics-read-example-script.py", "copies": "1", "size": "4220", "license": "mit", "hash": 7400015708535887000, "line_mean": 39.1904761905, "line_max": 114, "alpha_frac": 0.6355450237, "autogenerated": false, "ratio": 3.808664...
#!//bin/env python # This script requires the models that are shipped with OpenRAVE to be in your # OPENRAVE_DATA path. This is true by default, but may not be true if you set # your OPENRAVE_DATA environmental variable. Notably, this includes if you # source a Catkin workspace that includes the openrave_catkin package...
{ "repo_name": "personalrobotics/or_ompl", "path": "scripts/example.py", "copies": "1", "size": "2560", "license": "bsd-2-clause", "hash": 4307559377714019000, "line_mean": 35.0563380282, "line_max": 78, "alpha_frac": 0.72421875, "autogenerated": false, "ratio": 3.324675324675325, "config_test":...
#!/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Usage: symbolstore.py <params> <dump_syms path> <symbol store path> # ...
{ "repo_name": "sergecodd/FireFox-OS", "path": "B2G/gecko/toolkit/crashreporter/tools/symbolstore.py", "copies": "2", "size": "33525", "license": "apache-2.0", "hash": -8410546874045959000, "line_mean": 41.3830594185, "line_max": 215, "alpha_frac": 0.5558538404, "autogenerated": false, "ratio": 4....
#!/bin/env python try: # For Python 3.0 and later from urllib.request import urlopen, Request, HTTPError except ImportError: # Fallback to Python 2 from urllib2 import urlopen, Request, HTTPError import sys import os import json if len(sys.argv) < 1: print ("Usage:") print ("\t %s {transfo...
{ "repo_name": "dapaas/grafterizer-backend", "path": "jarfter/scripts/testPrograms/selectTransformation.py", "copies": "1", "size": "1060", "license": "epl-1.0", "hash": 4120281620830907400, "line_mean": 22.5555555556, "line_max": 82, "alpha_frac": 0.6462264151, "autogenerated": false, "ratio": 3....
#!/bin/env python try: # For Python 3.0 and later from urllib.request import urlopen, Request, HTTPError, urlencode except ImportError: # Fallback to Python 2 from urllib2 import urlopen, Request, HTTPError from urllib import urlencode import sys import os #from urllib import urlencode if len(...
{ "repo_name": "dapaas/grafterizer-backend", "path": "jarfter/scripts/testPrograms/jar_creator.py", "copies": "1", "size": "1478", "license": "epl-1.0", "hash": 2640836066489642500, "line_mean": 27.9803921569, "line_max": 98, "alpha_frac": 0.6441136671, "autogenerated": false, "ratio": 3.374429223...
#!/bin/env python """ Utility script to convert Python source code into tutorials. Synopsis: code2tut.py basename Output: Will convert tutorials/basename.py into sphinx/basename.txt Conventions: 1. All textual comments must be enclosed in triple quotation marks. 2. First line of file is ignored, second li...
{ "repo_name": "sepehr125/pybrain", "path": "docs/code2tut.py", "copies": "27", "size": "2275", "license": "bsd-3-clause", "hash": 7324145505916706000, "line_mean": 24.8522727273, "line_max": 80, "alpha_frac": 0.5828571429, "autogenerated": false, "ratio": 3.441754916792738, "config_test": false...
#!/bin/env python # VERSION = "0.0.4.dev" import json from io import StringIO # 2 vs 3 compatibility try: # python 3 from urllib.request import HTTPPasswordMgrWithDefaultRealm from urllib.request import HTTPBasicAuthHandler from urllib.request import build_opener from urllib.request import install...
{ "repo_name": "mrkipling/maraschino-v2", "path": "maraschino/lib/xbmcjson/xbmcjson.py", "copies": "2", "size": "3145", "license": "mit", "hash": 8938433639357941000, "line_mean": 28.6698113208, "line_max": 196, "alpha_frac": 0.6607313196, "autogenerated": false, "ratio": 3.6655011655011656, "co...
#!/bin/env python ### Vicente Dominguez # # Options: # # -a active # -a accepted # -a handled # -a requests # -a reading # -a writting # -a waiting # import urllib2, base64, sys, getopt import re ## def Usage (): print "Usage: getNginxInfo.py -h 127.0.0.1 -p 80 -a [active|accepted|handled|request|readin...
{ "repo_name": "pida42/Zabbix-Addons", "path": "Web-Servers/Nginx_02/getNginxInfo.py", "copies": "1", "size": "1597", "license": "mit", "hash": 411697493317735740, "line_mean": 18.4756097561, "line_max": 120, "alpha_frac": 0.5610519724, "autogenerated": false, "ratio": 2.930275229357798, "config...
#!/bin/env python # vim: expandtab:tabstop=4:shiftwidth=4 """ A small server to listen for image-inspector scan results and log them to a local file. """ import argparse import json import os import socket import subprocess import sys class ClamLogSrv(object): """ Class to receive and report scan results. """ ...
{ "repo_name": "joelddiaz/openshift-tools", "path": "scripts/scan/scanlog_listener.py", "copies": "6", "size": "4436", "license": "apache-2.0", "hash": -870548937181715600, "line_mean": 33.9291338583, "line_max": 99, "alpha_frac": 0.4467989179, "autogenerated": false, "ratio": 5.063926940639269, ...
#!/bin/env python # vim: expandtab:tabstop=4:shiftwidth=4 """ Class to take image-inspector scan results and upload them to an S3 bucket. """ from datetime import datetime import os import yaml # pylint: disable=import-error import botocore import boto3 class ClamLogUpload(object): """ Class to upload scan re...
{ "repo_name": "twiest/openshift-tools", "path": "scripts/scan/upload_scanlogs.py", "copies": "18", "size": "3530", "license": "apache-2.0", "hash": 613665503897382400, "line_mean": 28.9152542373, "line_max": 85, "alpha_frac": 0.5399433428, "autogenerated": false, "ratio": 4.217443249701314, "co...
# Copyright 2016 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
{ "repo_name": "drewandersonnz/openshift-tools", "path": "scripts/iam-tools/aws_api_key_manager.py", "copies": "2", "size": "16772", "license": "apache-2.0", "hash": -3620165894130927600, "line_mean": 32.814516129, "line_max": 99, "alpha_frac": 0.5555688052, "autogenerated": false, "ratio": 4.4452...
#!/bin/env python # vim: expandtab:tabstop=4:shiftwidth=4 """ Listen for kubernetes PLEG creation events, and launch an image-inspector scan for every newly created customer container. """ import select import subprocess import re from Queue import Queue from threading import Thread from systemd import journal ...
{ "repo_name": "twiest/openshift-tools", "path": "scripts/scan/orchestrator.py", "copies": "6", "size": "2956", "license": "apache-2.0", "hash": -6459216789757468000, "line_mean": 26.8867924528, "line_max": 189, "alpha_frac": 0.551420839, "autogenerated": false, "ratio": 3.9308510638297873, "con...
#!/bin/env python # vim: expandtab:tabstop=4:shiftwidth=4 """ This script is used to check the psad logs for positive port scanning traffic and report its findings to Zabbix. """ from __future__ import print_function from datetime import datetime import os import re import boto3 import botocore import yaml # Rea...
{ "repo_name": "drewandersonnz/openshift-tools", "path": "docker/oso-psad/src/scripts/check_psad.py", "copies": "6", "size": "5322", "license": "apache-2.0", "hash": -6609637993123306000, "line_mean": 29.2386363636, "line_max": 93, "alpha_frac": 0.5544907929, "autogenerated": false, "ratio": 4.281...
#!/bin/env python # vim: expandtab:tabstop=4:shiftwidth=4 """ This script is used to sync clam config files from an S3 bucket to a local directory. Both the files to be synced and the destination bucket are specified as variables in /etc/openshift_tools/clam_update_config.yaml. """ from __future__ import print_fun...
{ "repo_name": "joelddiaz/openshift-tools", "path": "scripts/clam-update/pull_clam_signatures.py", "copies": "6", "size": "3655", "license": "apache-2.0", "hash": 2021721379781431000, "line_mean": 31.3451327434, "line_max": 95, "alpha_frac": 0.5983584131, "autogenerated": false, "ratio": 3.9216738...
#!/bin/env python # vim: fileencoding=utf-8 from datetime import datetime, timedelta import json import logging import os import re import sys import timezonefinder from pytz import timezone from constants import WWO_CODE logging.basicConfig(level=os.environ.get("LOGLEVEL", "INFO")) logger = logging.getLogger(__name...
{ "repo_name": "chubin/wttr.in", "path": "lib/metno.py", "copies": "1", "size": "17556", "license": "apache-2.0", "hash": -8511673651061923000, "line_mean": 37, "line_max": 108, "alpha_frac": 0.5600934154, "autogenerated": false, "ratio": 3.25050916496945, "config_test": false, "has_no_keyword...
#!/bin/env python # vim: set et ts=4 sw=4 fileencoding=utf-8: ''' Setup script for nail ''' import os from setuptools import Command, setup # Ensure we are in nail source dir setup_dirname = os.path.dirname(__file__) if setup_dirname != '': os.chdir(setup_dirname) nail_version = os.path.join(os.path.abspath(os.p...
{ "repo_name": "shadowfax-chc/nail", "path": "setup.py", "copies": "1", "size": "2672", "license": "isc", "hash": -7250726665202222000, "line_mean": 33.7012987013, "line_max": 73, "alpha_frac": 0.4614520958, "autogenerated": false, "ratio": 4.59106529209622, "config_test": false, "has_no_keywo...
#!/bin/env python # vim: set et ts=4 sw=4 fileencoding=utf-8: ''' Setup script for pycsync ''' import os from setuptools import setup # Ensure we are in pycsync source dir SETUP_DIRNAME = os.path.dirname(__file__) if SETUP_DIRNAME != '': os.chdir(SETUP_DIRNAME) PYCSYNC_VERSION = os.path.join(os.path.abspath(SETU...
{ "repo_name": "shadowfax-chc/pycsync", "path": "setup.py", "copies": "1", "size": "1809", "license": "isc", "hash": 4645145416274265000, "line_mean": 27.7142857143, "line_max": 68, "alpha_frac": 0.5881702598, "autogenerated": false, "ratio": 3.368715083798883, "config_test": false, "has_no_ke...
# # mpycache - a LRU Cache implementation in python # author: Saurav Mohapatra (mohaps@gmail.com) # website: http://code.google.com/p/mpycache # version: 1.0.0 # date: 01/01/2010 # license: Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) # Copyright (c) 2010 Saurav Mohapatra (mohaps...
{ "repo_name": "disqus/channels", "path": "channels/contrib/lrucache.py", "copies": "1", "size": "5808", "license": "apache-2.0", "hash": 7862861586198546000, "line_mean": 34.8580246914, "line_max": 130, "alpha_frac": 0.5597451791, "autogenerated": false, "ratio": 3.6209476309226933, "config_tes...
# # mpycache - a LRU Cache implementation in python # author: Saurav Mohapatra (mohaps@gmail.com) # website: http://code.google.com/p/mpycache # version: 1.0.0 # date: 01/01/2010 # license: Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0.html) # Copyright (c) 2010 Saurav Mohapatra (mohaps@gmail.com) # ...
{ "repo_name": "cmyr/poetryutils2", "path": "poetryutils2/mpycache.py", "copies": "1", "size": "6183", "license": "mit", "hash": 1782325943979777000, "line_mean": 29.1609756098, "line_max": 124, "alpha_frac": 0.6496846191, "autogenerated": false, "ratio": 2.972596153846154, "config_test": false,...
#! /bin/env python # Written by Michael Johnston, 2010 '''Performs PCA on an input matrix. Rows of the matrix correspond to samples, while columns correspond to the variables. The range of columns containing the variales to be used can be specified. Outputs eigenvectors to Eigenvectors.csv and the original data transfo...
{ "repo_name": "dmnfarrell/peat", "path": "PEATSA/Tools/PCA.py", "copies": "1", "size": "4467", "license": "mit", "hash": 5973690845426177000, "line_mean": 31.6058394161, "line_max": 118, "alpha_frac": 0.7156928587, "autogenerated": false, "ratio": 3.3113417346182357, "config_test": false, "ha...
#!/bin/env pythonp # # generate maps for small-scale combat # from string import Template import gzip import random def compress(filename): f_in = open(filename, 'rb') f_out = gzip.open(filename + '.gz', 'wb') f_out.writelines(f_in) f_out.close() f_in.close() def player_type(code)...
{ "repo_name": "k1643/StratagusAI", "path": "tools/mapgen.py", "copies": "1", "size": "4092", "license": "apache-2.0", "hash": 5809461452166960000, "line_mean": 29.7209302326, "line_max": 88, "alpha_frac": 0.5813782991, "autogenerated": false, "ratio": 3.15984555984556, "config_test": false, "...
import os import sys from collections import OrderedDict ## slight modification from grep command info_for_conversion=""" XXXX,vnl_math_isnan,itk::Math::isnan XXXX,vnl_math_isinf,itk::Math::isinf XXXX,vnl_math_isfinite,itk::Math::isfinite XXXX,vnl_math_isnormal,itk::Math::isnormal XXXX,vnl_math_max,std::ma...
{ "repo_name": "RayRuizhiLiao/ITK_4D", "path": "Utilities/Maintenance/VNL_ModernizeNaming.py", "copies": "1", "size": "3629", "license": "apache-2.0", "hash": 5151730848752096000, "line_mean": 33.9306930693, "line_max": 102, "alpha_frac": 0.6957839625, "autogenerated": false, "ratio": 2.7001488095...
#!/bin/env python # -*- code:utf-8 -*- import bs4 import time import pymongo import requests Pymongo = pymongo.MongoClient("localhost",27017) database = Pymongo["chinaskills"] table = database["chinaskills"] src_url = "http://www.chinaskills-jsw.org/pagelist.jsp" response = requests.get(src_url) response...
{ "repo_name": "erlinux/ToolsProject", "path": "Python/爬虫/chinaskills/webbot.py", "copies": "1", "size": "1199", "license": "mit", "hash": -1027114760606791000, "line_mean": 33.2647058824, "line_max": 88, "alpha_frac": 0.6488740617, "autogenerated": false, "ratio": 2.982587064676617, "config_tes...
#!//bin/env python #coding:utf-8 import os import sys import string import time import datetime import MySQLdb path='./include' sys.path.insert(0,path) import functions as func from multiprocessing import Process; def admin_mysql_purge_binlog(host,port,user,passwd,binlog_store_days): datalist=[] ...
{ "repo_name": "stanxii/indexRiver", "path": "data-lepus/lepus/admin_mysql_purge_binlog.py", "copies": "1", "size": "2175", "license": "apache-2.0", "hash": -7743989009633468000, "line_mean": 33.6557377049, "line_max": 145, "alpha_frac": 0.5866666667, "autogenerated": false, "ratio": 3.51373182552...
#!/bin/env python #-*-coding:utf-8-*- import os import sys import string import time import datetime import MySQLdb class MySQL: def __int__(self,host,port,user,passwd,dbname,timeout,charset): self.host = host self.port = port self.user = user self.passwd = passwd ...
{ "repo_name": "stanxii/indexRiver", "path": "data-lepus/lepus/include/mysql_server_class.py", "copies": "1", "size": "2051", "license": "apache-2.0", "hash": -7906398593381297000, "line_mean": 30.046875, "line_max": 156, "alpha_frac": 0.5977571916, "autogenerated": false, "ratio": 3.7564102564102...
#!/bin/env python #-*-coding:utf-8-*- import os import sys import string import time import datetime import MySQLdb class MySQL: def __int__(self,host,port,user,passwd,timeout,charset): self.host = host self.port = port self.user = user self.passwd = passwd se...
{ "repo_name": "stanxii/indexRiver", "path": "data-lepus/lepus/include/mysql_client_class.py", "copies": "1", "size": "1306", "license": "apache-2.0", "hash": -2740056899529349000, "line_mean": 26.3913043478, "line_max": 125, "alpha_frac": 0.5987748851, "autogenerated": false, "ratio": 3.829912023...
#!/bin/env python #-*-coding:utf-8-*- import os import sys import time import string path='.' sys.path.insert(0,path) import functions as func reload(sys) sys.setdefaultencoding('utf8') import ConfigParser def send_sms(sms_to_list,sms_msg,db_type,application,host,port,level,alarm_item,alarm_value,messa...
{ "repo_name": "stanxii/indexRiver", "path": "data-lepus/lepus/include/sendsms_fx.py", "copies": "1", "size": "1250", "license": "apache-2.0", "hash": -2888389214676033500, "line_mean": 30.8888888889, "line_max": 147, "alpha_frac": 0.5658783784, "autogenerated": false, "ratio": 2.690909090909091, ...
#!/bin/env python #-*- coding:utf-8 -*- import requests import bs4 import pymongo Pymongo = pymongo.MongoClient("localhost",27017) database = Pymongo["database"] table = database["51job"] headers = { "User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2...
{ "repo_name": "erlinux/ToolsProject", "path": "Python/爬虫/51job/important.py", "copies": "1", "size": "1726", "license": "mit", "hash": -4933924412247362000, "line_mean": 43.4594594595, "line_max": 146, "alpha_frac": 0.6183115339, "autogenerated": false, "ratio": 2.9150779896013863, "config_test...
__author__ = 'Ken Zheng' import hashlib import time import xml.etree.ElementTree as ET #from PIL import Image import urllib2 #generate the thumbnail for an image def generateThumbnail(): pass # import os # file = os.path.abspath(__file__) # img = os.path.join(file, '../static/public...
{ "repo_name": "catsky/phoenix-flower", "path": "weixin.py", "copies": "1", "size": "5939", "license": "mit", "hash": -690386965516704000, "line_mean": 22.668202765, "line_max": 87, "alpha_frac": 0.5968615729, "autogenerated": false, "ratio": 2.4101755965781178, "config_test": false, "has_no_k...
# Copyright 2010 Dirk Holtwick, holtwick.it # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
{ "repo_name": "bbondy/brianbondy.gae", "path": "libs/sx/pisa3/pisa_paragraph.py", "copies": "1", "size": "25310", "license": "mit", "hash": -641703105735113500, "line_mean": 28.4170673077, "line_max": 189, "alpha_frac": 0.4897459201, "autogenerated": false, "ratio": 4.2340639116613685, "config_...
#!/bin/env python # -*- coding: utf-8 -*- 'Django package for bootstrap-fileinput:' \ ' An enhanced HTML 5 file input for Bootstrap 3.x with file preview,' \ ' multiple selection, and more features.' from setuptools import setup setup( name='django-bootstrap-fileinput', version='1.6.0', ...
{ "repo_name": "ITrex/django-bootstrap-fileinput", "path": "setup.py", "copies": "1", "size": "1242", "license": "bsd-3-clause", "hash": -9184676893467748000, "line_mean": 32.5, "line_max": 75, "alpha_frac": 0.6014492754, "autogenerated": false, "ratio": 4.099009900990099, "config_test": false, ...
#!/bin/env python # -*- coding: utf-8 -*- '''Django package for bootstrap: a sleek, intuitive, and powerful front-end framework for faster and easier web development''' from setuptools import setup setup( name='django-bootstrap', version='3.2.0', url='http://getbootstrap.com', descriptio...
{ "repo_name": "ITrex/django-bootstrap", "path": "setup.py", "copies": "1", "size": "1163", "license": "mit", "hash": 8900030237645744000, "line_mean": 27.8205128205, "line_max": 54, "alpha_frac": 0.5941530525, "autogenerated": false, "ratio": 4.066433566433567, "config_test": false, "has_no_k...
#!/bin/env python # -*- coding: utf-8 -*- '''Django package for jquery-ui: jQuery UI is a curated set of user interface interactions, effects, widgets, and themes built on top of jquery.''' from setuptools import setup setup( name='django-jquery-ui', version='1.11.0-r1', url='https://github.c...
{ "repo_name": "ITrex/django-jquery-ui", "path": "setup.py", "copies": "1", "size": "1284", "license": "mit", "hash": 7872334754311238000, "line_mean": 29.3170731707, "line_max": 60, "alpha_frac": 0.5794392523, "autogenerated": false, "ratio": 3.7434402332361514, "config_test": false, "has_no_...
#!/bin/env python # -*- coding: utf-8 -*- 'Django package for modernizr:' \ ' JavaScript library that detects HTML5' \ ' and CSS3 features in the user`s browser' from setuptools import setup setup( name='django-modernizr', version='2.8.3', url='http://modernizr.com', descript...
{ "repo_name": "ITrex/django-modernizr", "path": "setup.py", "copies": "1", "size": "1043", "license": "mit", "hash": -8247885767981124000, "line_mean": 27.8, "line_max": 74, "alpha_frac": 0.5992329818, "autogenerated": false, "ratio": 3.8065693430656933, "config_test": false, "has_no_keywords...
#!/bin/env python #-*-coding:utf-8-*- import MySQLdb import string import sys reload(sys) sys.setdefaultencoding('utf8') import ConfigParser def get_sessions(conn): try: curs=conn.cursor() curs.execute("select count(*) from v$session"); result = curs.fetchone()[0] ...
{ "repo_name": "stanxii/indexRiver", "path": "data-lepus/lepus/include/lepus_mysql.py", "copies": "1", "size": "2176", "license": "apache-2.0", "hash": 2400126772696341000, "line_mean": 21.3978494624, "line_max": 199, "alpha_frac": 0.5431985294, "autogenerated": false, "ratio": 3.8650088809946714,...
#!/bin/env python #-*-coding:utf-8-*- import pymssql import string import sys import datetime import time reload(sys) sys.setdefaultencoding('utf8') import ConfigParser def get_item(data_dict,item): try: item_value = data_dict[item] return item_value except: pass d...
{ "repo_name": "stanxii/indexRiver", "path": "data-lepus/lepus/include/lepus_sqlserver.py", "copies": "1", "size": "3047", "license": "apache-2.0", "hash": -4518992758793067000, "line_mean": 22.5725806452, "line_max": 381, "alpha_frac": 0.5766327535, "autogenerated": false, "ratio": 3.623067776456...
#!/bin/env python #-*-coding:utf-8-*- import string import sys reload(sys) sys.setdefaultencoding('utf8') import ConfigParser import smtplib from email.mime.text import MIMEText from email.message import Message from email.header import Header import functions as func mail_host = func.get_option('sm...
{ "repo_name": "stanxii/indexRiver", "path": "data-lepus/lepus/include/sendmail.py", "copies": "1", "size": "1222", "license": "apache-2.0", "hash": -7604651881207284000, "line_mean": 24.8444444444, "line_max": 61, "alpha_frac": 0.6167218543, "autogenerated": false, "ratio": 3.0505050505050506, ...
#!/bin/env python # -*- coding: utf-8 -*- import urllib2, lxml.html, os from datetime import datetime from utils import timeadjust import time import sys def getAUDCNY(): API = "http://download.finance.yahoo.com/d/quotes.csv?e=.csv&f=sl1d1t1&s=AUDCNY=x" try: response = urllib2.urlopen(AP...
{ "repo_name": "catsky/phoenix-flower", "path": "cron.py", "copies": "1", "size": "3480", "license": "mit", "hash": 7143763188396857000, "line_mean": 35.4408602151, "line_max": 123, "alpha_frac": 0.5704022989, "autogenerated": false, "ratio": 3.026086956521739, "config_test": false, "has_no_ke...
""" This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Contains: - wsgibase: the gluon wsgi application """ if False: import import_all # DO NOT REMOVE PART OF FREEZE PROCESS import gc import...
{ "repo_name": "ccpgames/eve-metrics", "path": "web2py/gluon/main.py", "copies": "1", "size": "34440", "license": "mit", "hash": -5672322936060356000, "line_mean": 36.0132450331, "line_max": 117, "alpha_frac": 0.5058362369, "autogenerated": false, "ratio": 4.63588639116974, "config_test": false,...
""" This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) gluon.rewrite parses incoming URLs and formats outgoing URLs for gluon.html.URL. In addition, it rewrites both incoming and outgoing URLs based ...
{ "repo_name": "ccpgames/eve-metrics", "path": "web2py/gluon/rewrite.py", "copies": "1", "size": "54241", "license": "mit", "hash": -6847619855993047000, "line_mean": 37.3621190131, "line_max": 232, "alpha_frac": 0.5497133165, "autogenerated": false, "ratio": 4.103570888182781, "config_test": fa...
""" This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Thanks to ga2arch for help with IS_IN_DB and IS_NOT_IN_DB on GAE """ import os import re import datetime import time import cgi import url...
{ "repo_name": "ccpgames/eve-metrics", "path": "web2py/gluon/validators.py", "copies": "1", "size": "132174", "license": "mit", "hash": -8847628008999891000, "line_mean": 32.88202692, "line_max": 261, "alpha_frac": 0.5225773258, "autogenerated": false, "ratio": 3.7859639071899167, "config_test":...
""" This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) Thanks to * Niall Sweeny <niall.sweeny@fonjax.com> for MS SQL support * Marcel Leuthi <mluethi@mlsystems.ch> for Oracle support * De...
{ "repo_name": "ccpgames/eve-metrics", "path": "web2py/gluon/dal.py", "copies": "1", "size": "430331", "license": "mit", "hash": -922401092626592300, "line_mean": 38.127844088, "line_max": 224, "alpha_frac": 0.5201670342, "autogenerated": false, "ratio": 4.18805473372781, "config_test": false, ...
#!/bin/env python # -*- coding: utf-8 -*- """ 使用 libvirt 抓取 KVM 虚拟机的缩略图(待验证) from http://www.oschina.net/code/snippet_1988449_49174 """ import libvirt import os import uuid try: from PIL import Image print("PIL") except ImportError: import Image def handler(stream, buf, opaque): fd = ...
{ "repo_name": "catroll/clipboard", "path": "kvm-screenshot.py", "copies": "1", "size": "1264", "license": "mit", "hash": -3083968926763177500, "line_mean": 22.1568627451, "line_max": 68, "alpha_frac": 0.6071428571, "autogenerated": false, "ratio": 2.9125295508274234, "config_test": false, "ha...
#!/bin/env python # -*- coding: utf-8 -*- #导入模块 import simplejson as json import xlwt #从文件(JSON形式)中读取数据返回字典 def read_file(filename): with open(r'C:\Python27\oneday_one\student.txt','r') as fp: content = fp.read().decode('gbk').encode('utf-8') #print type(content) #simplejson这个模块...
{ "repo_name": "Yrthgze/prueba-sourcetree2", "path": "yefan/014/14.py", "copies": "4", "size": "1714", "license": "mit", "hash": -5655166455561628000, "line_mean": 27.3170731707, "line_max": 98, "alpha_frac": 0.6272878536, "autogenerated": false, "ratio": 1.6858345021037868, "config_test": false...
__version__=''' $Id: fonts.py 3101 2007-06-04 14:05:14Z rgbecker $ ''' import sys, os ############################################################################### # A place to put useful font stuff ############################################################################### # # Font Mappings # The b...
{ "repo_name": "jwheare/digest", "path": "lib/reportlab/lib/fonts.py", "copies": "1", "size": "3166", "license": "bsd-3-clause", "hash": -3667518074644777000, "line_mean": 34.8139534884, "line_max": 101, "alpha_frac": 0.5186355022, "autogenerated": false, "ratio": 3.1222879684418148, "config_tes...
__version__=''' $Id: fonts.py 3342 2008-12-12 15:55:34Z andy $ ''' __doc__='''Utilities to associate bold and italic versions of fonts into families Bold, italic and plain fonts are usually implemented in separate disk files; but non-trivial apps want <b>this</b> to do the right thing. We therefore need to keep...
{ "repo_name": "commtrack/temp-aquatest", "path": "reportlab/lib/fonts.py", "copies": "1", "size": "3599", "license": "bsd-3-clause", "hash": -2063131639613294800, "line_mean": 35.4895833333, "line_max": 101, "alpha_frac": 0.5462628508, "autogenerated": false, "ratio": 3.2076648841354722, "confi...
__version__=''' $Id: fonts.py,v 1.1 2006/05/26 19:19:44 thomas Exp $ ''' import string, sys, os ############################################################################### # A place to put useful font stuff ############################################################################### # # Font Mapping...
{ "repo_name": "tschalch/pyTray", "path": "src/lib/reportlab/lib/fonts.py", "copies": "1", "size": "3323", "license": "bsd-3-clause", "hash": -2333542083443161600, "line_mean": 35.3370786517, "line_max": 101, "alpha_frac": 0.5227204333, "autogenerated": false, "ratio": 3.1114232209737827, "confi...
__all__=('Formatter','DecimalFormatter') __version__=''' $Id: formatters.py 3155 2007-10-05 10:55:52Z rgbecker $ ''' __doc__=""" These help format numbers and dates in a user friendly way. Used by the graphics framework. """ import string, sys, os, re class Formatter: "Base formatter - simply applies pyth...
{ "repo_name": "commtrack/temp-aquatest", "path": "reportlab/lib/formatters.py", "copies": "3", "size": "3998", "license": "bsd-3-clause", "hash": 4161026444704997000, "line_mean": 34.6788990826, "line_max": 159, "alpha_frac": 0.5300150075, "autogenerated": false, "ratio": 3.4886561954624784, "c...
__version__=''' $Id: formatters.py,v 1.1 2006/05/26 19:19:44 thomas Exp $ ''' __doc__=""" These help format numbers and dates in a user friendly way. Used by the graphics framework. """ import string, sys, os class Formatter: "Base formatter - simply applies python format strings" def __init__(self,...
{ "repo_name": "tschalch/pyTray", "path": "src/lib/reportlab/lib/formatters.py", "copies": "1", "size": "3595", "license": "bsd-3-clause", "hash": 3490930154109166000, "line_mean": 33.97, "line_max": 159, "alpha_frac": 0.5265646732, "autogenerated": false, "ratio": 3.5107421875, "config_test": f...
__version__=''' $Id: logger.py 2385 2004-06-17 15:26:05Z rgbecker $ ''' from sys import stderr class Logger: ''' An extended file type thing initially equivalent to sys.stderr You can add/remove file type things; it has a write method ''' def __init__(self): self._fps = [stderr] ...
{ "repo_name": "jwheare/digest", "path": "lib/reportlab/lib/logger.py", "copies": "1", "size": "1819", "license": "bsd-3-clause", "hash": -5680859985922737000, "line_mean": 27.8524590164, "line_max": 102, "alpha_frac": 0.5607476636, "autogenerated": false, "ratio": 3.5736738703339883, "config_te...
__version__=''' $Id: logger.py 3342 2008-12-12 15:55:34Z andy $ ''' __doc__="Logging and warning framework, predating Python's logging package" from sys import stderr class Logger: ''' An extended file type thing initially equivalent to sys.stderr You can add/remove file type things; it has a write me...
{ "repo_name": "commtrack/temp-aquatest", "path": "reportlab/lib/logger.py", "copies": "1", "size": "1890", "license": "bsd-3-clause", "hash": -659982808114782200, "line_mean": 29.0163934426, "line_max": 102, "alpha_frac": 0.5687830688, "autogenerated": false, "ratio": 3.593155893536122, "config...
__version__=''' $Id: logger.py,v 1.1 2006/05/26 19:19:44 thomas Exp $ ''' from sys import stderr class Logger: ''' An extended file type thing initially equivalent to sys.stderr You can add/remove file type things; it has a write method ''' def __init__(self): self._fps = [stderr] ...
{ "repo_name": "tschalch/pyTray", "path": "src/lib/reportlab/lib/logger.py", "copies": "1", "size": "1821", "license": "bsd-3-clause", "hash": -937774491575327600, "line_mean": 27.8852459016, "line_max": 102, "alpha_frac": 0.5595826469, "autogenerated": false, "ratio": 3.556640625, "config_test"...
"""This module defines a few common page sizes in points (1/72 inch). To be expanded to include things like label sizes, envelope windows etc.""" __version__=''' $Id: pagesizes.py 2385 2004-06-17 15:26:05Z rgbecker $ ''' from reportlab.lib.units import cm, inch _W, _H = (21*cm, 29.7*cm) A6 = (_W*.5, _H*.5...
{ "repo_name": "jwheare/digest", "path": "lib/reportlab/lib/pagesizes.py", "copies": "3", "size": "1386", "license": "bsd-3-clause", "hash": 5346007800195198000, "line_mean": 23.2363636364, "line_max": 105, "alpha_frac": 0.5815295815, "autogenerated": false, "ratio": 2.393782383419689, "config_t...
"""This module defines a few common page sizes in points (1/72 inch). To be expanded to include things like label sizes, envelope windows etc.""" __version__=''' $Id: pagesizes.py,v 1.1 2006/05/26 19:19:44 thomas Exp $ ''' from reportlab.lib.units import cm, inch _W, _H = (21*cm, 29.7*cm) A6 = (_W*.5, _H*...
{ "repo_name": "tschalch/pyTray", "path": "src/lib/reportlab/lib/pagesizes.py", "copies": "1", "size": "1388", "license": "bsd-3-clause", "hash": 5335430158946955000, "line_mean": 23.2727272727, "line_max": 105, "alpha_frac": 0.5799711816, "autogenerated": false, "ratio": 2.3848797250859106, "co...
import types import string def __set_coerce(t, S): if t is types.ListType: return list(S) elif t is types.TupleType: return tuple(S) elif t is types.StringType: return string.join(S, '') return S def unique(seq): result = [] for i in seq: if i not...
{ "repo_name": "jwheare/digest", "path": "lib/reportlab/lib/set_ops.py", "copies": "2", "size": "1252", "license": "bsd-3-clause", "hash": 550618661151604900, "line_mean": 30.9473684211, "line_max": 103, "alpha_frac": 0.6222044728, "autogenerated": false, "ratio": 3.1857506361323153, "config_tes...
__version__=''' $Id: set_ops.py 3342 2008-12-12 15:55:34Z andy $ ''' __doc__="""From before Python had a Set class...""" import types import string def __set_coerce(t, S): if t is types.ListType: return list(S) elif t is types.TupleType: return tuple(S) elif t is types.StringTyp...
{ "repo_name": "commtrack/temp-aquatest", "path": "reportlab/lib/set_ops.py", "copies": "2", "size": "1377", "license": "bsd-3-clause", "hash": -6607987228293645000, "line_mean": 31.5853658537, "line_max": 103, "alpha_frac": 0.6172839506, "autogenerated": false, "ratio": 3.1366742596810933, "con...
__doc__="""Verfy that if in invariant mode, repeated runs make identical file. This does NOT test across platforms or python versions, only a user can do that :-)""" __version__='''$Id: test_invariant.py 3959 2012-09-27 14:39:39Z robin $''' from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputf...
{ "repo_name": "nickpack/reportlab", "path": "tests/test_invariant.py", "copies": "1", "size": "2025", "license": "bsd-3-clause", "hash": -2570787177682350000, "line_mean": 34.1607142857, "line_max": 92, "alpha_frac": 0.6345679012, "autogenerated": false, "ratio": 3.6355475763016156, "config_tes...
__version__=''' $Id: genreference.py 3959 2012-09-27 14:39:39Z robin $ ''' __doc__ = """ This module contains the script for building the reference. """ def run(verbose=None, outDir=None): import os, sys, shutil if verbose is None: verbose=('-s' not in sys.argv) cwd = os.getcwd() docsDir=os.path...
{ "repo_name": "nickpack/reportlab", "path": "docs/reference/genreference.py", "copies": "1", "size": "1317", "license": "bsd-3-clause", "hash": 3420658965231974400, "line_mean": 40.4838709677, "line_max": 119, "alpha_frac": 0.69476082, "autogenerated": false, "ratio": 3.3257575757575757, "confi...
__version__=''' $Id: genuserguide.py 3959 2012-09-27 14:39:39Z robin $ ''' __doc__ = """ This module contains the script for building the user guide. """ def run(pagesize=None, verbose=0, outDir=None): import sys,os from reportlab.lib.utils import open_and_read cwd = os.getcwd() docsDir=os.pat...
{ "repo_name": "nickpack/reportlab", "path": "docs/userguide/genuserguide.py", "copies": "1", "size": "3629", "license": "bsd-3-clause", "hash": -4878043454598180000, "line_mean": 32.8942307692, "line_max": 119, "alpha_frac": 0.6139432351, "autogenerated": false, "ratio": 3.3852611940298507, "co...
__version__=''' $Id $ ''' __doc__="""Defines some standard drawings to use as test cases This contains a number of routines to generate test drawings for reportlab/graphics. For now they are contrived, but we will expand them to try and trip up any parser. Feel free to add more. """ from reportlab.graphics...
{ "repo_name": "nickpack/reportlab", "path": "src/reportlab/graphics/testdrawings.py", "copies": "3", "size": "9747", "license": "bsd-3-clause", "hash": 5957660130014690000, "line_mean": 30.9290540541, "line_max": 113, "alpha_frac": 0.5354468041, "autogenerated": false, "ratio": 2.874373341197287,...
__all__=('Formatter','DecimalFormatter') __version__=''' $Id: formatters.py 3959 2012-09-27 14:39:39Z robin $ ''' __doc__=""" These help format numbers and dates in a user friendly way. Used by the graphics framework. """ import string, sys, os, re class Formatter: "Base formatter - simply applies python ...
{ "repo_name": "nickpack/reportlab", "path": "src/reportlab/lib/formatters.py", "copies": "2", "size": "3995", "license": "bsd-3-clause", "hash": 6965418423028231000, "line_mean": 34.6513761468, "line_max": 159, "alpha_frac": 0.5296620776, "autogenerated": false, "ratio": 3.489082969432314, "con...
__version__=''' $Id: logger.py 3959 2012-09-27 14:39:39Z robin $ ''' __doc__="Logging and warning framework, predating Python's logging package" from sys import stderr class Logger: ''' An extended file type thing initially equivalent to sys.stderr You can add/remove file type things; it has a write m...
{ "repo_name": "nickpack/reportlab", "path": "src/reportlab/lib/logger.py", "copies": "2", "size": "1878", "license": "bsd-3-clause", "hash": 1410422438530035200, "line_mean": 28.7868852459, "line_max": 102, "alpha_frac": 0.5676251331, "autogenerated": false, "ratio": 3.632495164410058, "config_...
__version__=''' $Id: rl_doc_utils.py 3959 2012-09-27 14:39:39Z robin $ ''' __doc__ = """ This module contains utilities for generating guides """ import os, sys, glob import string from rltemplate import RLDocTemplate from stylesheet import getStyleSheet styleSheet = getStyleSheet() #from reportlab.p...
{ "repo_name": "nickpack/reportlab", "path": "tools/docco/rl_doc_utils.py", "copies": "1", "size": "14253", "license": "bsd-3-clause", "hash": -720557096807697400, "line_mean": 32.2620192308, "line_max": 116, "alpha_frac": 0.5948923034, "autogenerated": false, "ratio": 3.571285392132298, "config...
__version__='''$Id: test_encrypt.py 3959 2012-09-27 14:39:39Z robin $''' __doc__="""Testing to encrypt a very minimal pdf using a Canvas and a DocTemplate. TODO: Automatiocally test that this pdf is really encrypted. """ import unittest from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, outputfil...
{ "repo_name": "nickpack/reportlab", "path": "tests/test_encrypt.py", "copies": "1", "size": "2268", "license": "bsd-3-clause", "hash": 1664365862037942000, "line_mean": 36.4406779661, "line_max": 96, "alpha_frac": 0.6785714286, "autogenerated": false, "ratio": 4.014159292035398, "config_test": ...
__version__='''$Id: test_hello.py 3959 2012-09-27 14:39:39Z robin $''' __doc__="""most basic test possible that makes a PDF. Useful if you want to test that a really minimal PDF is healthy, since the output is about the smallest thing we can make.""" from reportlab.lib.testutils import setOutDir,makeSuiteForClass...
{ "repo_name": "nickpack/reportlab", "path": "tests/test_hello.py", "copies": "1", "size": "1856", "license": "bsd-3-clause", "hash": 717219316487701100, "line_mean": 34.3921568627, "line_max": 144, "alpha_frac": 0.6433189655, "autogenerated": false, "ratio": 3.2, "config_test": true, "has_no_...
#! /bin/env python import pymedia import threading class Sound(object): def __init__(self, filename): self.name = filename self.snd=None self.playing=False def load(self, filename): self.stop() self.name = filename def play(self, loops=0): se...
{ "repo_name": "pymo/pymo", "path": "pc/pymedia_mixer.py", "copies": "1", "size": "1956", "license": "mit", "hash": 3751523661018084000, "line_mean": 26.7647058824, "line_max": 132, "alpha_frac": 0.4902862986, "autogenerated": false, "ratio": 3.732824427480916, "config_test": false, "has_no_ke...
"""Manage shelves of pickled objects using bsddb database files for the storage. """ #------------------------------------------------------------------------ import cPickle import sys import sys absolute_import = (sys.version_info[0] >= 3) if absolute_import : # Because this syntaxis is not valid ...
{ "repo_name": "Southpaw-TACTIC/Team", "path": "src/python/Lib/bsddb/dbshelve.py", "copies": "2", "size": "11139", "license": "epl-1.0", "hash": 2774773319476454000, "line_mean": 28.8559556787, "line_max": 110, "alpha_frac": 0.525899991, "autogenerated": false, "ratio": 3.8744347826086956, "conf...
"""Manage shelves of pickled objects using bsddb database files for the storage. """ #------------------------------------------------------------------------ import cPickle try: from UserDict import DictMixin except ImportError: # DictMixin is new in Python 2.3 class DictMixin: pass import ...
{ "repo_name": "ericlink/adms-server", "path": "playframework-dist/play-1.1/python/Lib/bsddb/dbshelve.py", "copies": "2", "size": "9251", "license": "mit", "hash": 5758631529482226000, "line_mean": 28.7342192691, "line_max": 110, "alpha_frac": 0.5185385364, "autogenerated": false, "ratio": 3.89844...
import re, os, sys import hashlib boot_device = '/dev/sda' sector_count = 10 sector_size = 1024 SENTINEL_SIGNATURE_FILE = '/etc/sentinel.sig' ALGORITHM = 'sha512' msg = { 'error': { 'msg': 'SENTINEL-KO', 'code': -1 }, 'ok': { 'msg': 'SENTINEL-OK', 'code': 0 }, } DEBUG=True def de...
{ "repo_name": "rootedcon/HBoot", "path": "hboot-ng.py", "copies": "1", "size": "2161", "license": "artistic-2.0", "hash": 995417768219532500, "line_mean": 24.3292682927, "line_max": 96, "alpha_frac": 0.5687818434, "autogenerated": false, "ratio": 3.3369397217928904, "config_test": false, "has...
#! /bin/env python description = """ word-count.py version of 20th August, 2011. Writes to stdout a list of word types and their frequencies. """ import argparse, collections, csv, re, sys def count_words(inf, simplify_rex, simplify_template, word_count): for line in inf: for word in line.sp...
{ "repo_name": "syhw/contextual_word_segmentation", "path": "mark_scripts/topicsandcollocations/word-count.py", "copies": "2", "size": "2724", "license": "mit", "hash": 3803057892937274400, "line_mean": 32.4810126582, "line_max": 90, "alpha_frac": 0.5528634361, "autogenerated": false, "ratio": 4.2...
#! /bin/env python description = """ word-topicalcount.py version of 20th August, 2011 Produces a file mapping words to binnedcount-topic labels """ import argparse, collections, csv, re, sys if __name__ == '__main__': parser = argparse.ArgumentParser(description=description) parser.add_argument...
{ "repo_name": "SnippyHolloW/contextual_word_segmentation", "path": "mark_scripts/topicsandcollocations/word-topicalcount.py", "copies": "2", "size": "1367", "license": "mit", "hash": -5252274972722702000, "line_mean": 33.0512820513, "line_max": 77, "alpha_frac": 0.566203365, "autogenerated": false,...
#! /bin/env python description = """ word-topical.py version of 21st August, 2011 Produces a file mapping words to topic label """ import argparse, collections, csv, re, sys if __name__ == '__main__': parser = argparse.ArgumentParser(description=description) parser.add_argument("--output-field-s...
{ "repo_name": "syhw/contextual_word_segmentation", "path": "mark_scripts/topicsandcollocations/word-topical.py", "copies": "2", "size": "1336", "license": "mit", "hash": 9115288507437199000, "line_mean": 32.2564102564, "line_max": 77, "alpha_frac": 0.5591317365, "autogenerated": false, "ratio": 4...
#!/bin/env python # Example program for viewing a 360 photosphere in a virtual reality headset import os from textwrap import dedent import numpy from OpenGL.GL import * # @UnusedWildImport # this comment squelches IDE warnings from OpenGL.GL.shaders import compileShader, compileProgram from PIL import Ima...
{ "repo_name": "cmbruns/vr_samples", "path": "src/python/photosphere_pyopenvr1.py", "copies": "1", "size": "4798", "license": "mit", "hash": -2350381262241711000, "line_mean": 36.384, "line_max": 85, "alpha_frac": 0.5093789079, "autogenerated": false, "ratio": 3.8724778046811945, "config_test": ...
#!/bin/env python # Example program for viewing a 360 photosphere in a virtual reality headset # using parallax shifting to place the ground plane on the floor import os from textwrap import dedent import numpy from OpenGL import GL from OpenGL.GL.shaders import compileShader, compileProgram try: fro...
{ "repo_name": "cmbruns/vr_samples", "path": "src/python/photosphere_parallax_pyopenvr.py", "copies": "1", "size": "7109", "license": "mit", "hash": 8962112804231515000, "line_mean": 39.8176470588, "line_max": 132, "alpha_frac": 0.50499367, "autogenerated": false, "ratio": 3.971508379888268, "co...