repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
shenaishiren/xiaodi
xiaodi/api/abc.py
1
2864
# coding=utf-8 import types import logging from tornado.gen import coroutine from tornado.web import asynchronous from tornado.web import RequestHandler from tornado.web import HTTPError from xiaodi.api.errors import HTTPAPIError from xiaodi.api.errors import INTERNAL_SERVER_ERROR from xiaodi.api.errors import BAD_REQ...
gpl-3.0
-5,720,625,523,224,219,000
31.179775
90
0.622556
false
3.87027
false
false
false
nataliemcmullen/WikiMiney
db/data/2012/10/get_gzs.py
1
24893
urls = [ "pagecounts-20121001-000000.gz", "pagecounts-20121001-010000.gz", "pagecounts-20121001-020000.gz", "pagecounts-20121001-030000.gz", "pagecounts-20121001-040000.gz", "pagecounts-20121001-050000.gz", "pagecounts-20121001-060001.gz", "pagecounts-20121001-070000.gz", "pagecounts-20121001-080000.gz", "pagecounts-20...
mit
190,367,817,570,999,400
31.883752
82
0.78512
false
2.405818
false
false
false
jenskutilek/Glyphs-Scripts
Layers/Delete all non-Master layers.py
1
1836
# MenuTitle: Delete all non-Master layers # -*- coding: utf-8 -*- from __future__ import ( absolute_import, division, print_function, unicode_literals, ) __doc__ = """ Goes through selected glyphs and deletes all glyph layers which are not a Master, Bracket or Brace layer. """ Font = Glyphs.font sele...
mit
-8,980,516,049,966,369,000
28.142857
105
0.592593
false
4.259861
false
false
false
Oldentide/Oldentide
db/tools/character_builder_scraper.py
2
9353
#!/bin/python # This script will parse and reformat all of the race and profession modifiers in the RoE files. # Modules. import argparse import os import pprint import re import sys import time # Set up command line arguments. parser = argparse.ArgumentParser(description='This script will parse and reformat all of t...
gpl-2.0
-4,958,627,607,280,227,000
26.431085
143
0.651449
false
2.634648
false
false
false
ACCUConf/ACCUConf_Submission_Web_Application
accuconf_cfp/views/review.py
1
11087
"""Routes associated with reviewing submitted proposals.""" from flask import jsonify, render_template, request, session from accuconf_cfp import app, db, year from accuconf_cfp.utils import is_acceptable_route, is_logged_in, md from models.proposal import Proposal from models.proposal_types import sessiontype_descr...
gpl-3.0
8,220,997,768,545,114,000
42.478431
120
0.582394
false
4.06564
false
false
false
fritzgerald/NehePyOpenGL
01-05/nehe-02.py
1
2520
#!/usr/bin/env python import glfw import OpenGL.GL as gl import OpenGL.GLU as glu window_width = 640 window_height = 480 def main(): # Initialize the library if not glfw.init(): return # Create a windowed mode window and its OpenGL context window = glfw.create_window(window_width, window_heig...
mit
-5,422,371,594,309,356,000
27.325843
111
0.666667
false
2.957746
false
false
false
ArchiveTeam/ftp-grab
pipeline.py
1
10356
from distutils.version import StrictVersion import datetime import hashlib import os import re import socket import shutil import time import sys import urllib try: import requests except ImportError: print('Please install or update the requests module.') sys.exit(1) import seesaw from seesaw.config import...
unlicense
-4,047,015,062,139,173,400
33.868687
174
0.565856
false
3.792018
false
false
false
evenmarbles/mlpy
mlpy/knowledgerep/cbr/similarity.py
1
17713
from __future__ import division, print_function, absolute_import import math import numpy as np from abc import ABCMeta, abstractmethod from sklearn.neighbors import NearestNeighbors from sklearn.cluster import KMeans from sklearn.metrics.pairwise import cosine_similarity from sklearn.neighbors.dist_metrics import M...
mit
-1,097,991,111,061,715,100
31.985102
119
0.603342
false
4.835654
false
false
false
larsks/cobbler-larsks
koan/utils.py
1
16252
""" koan = kickstart over a network general usage functions Copyright 2006-2008 Red Hat, Inc. Michael DeHaan <mdehaan@redhat.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of ...
gpl-2.0
3,835,868,868,866,504,700
28.549091
126
0.580852
false
3.748155
false
false
false
h4wkmoon/shinken
shinken/macroresolver.py
1
17498
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you c...
agpl-3.0
-1,762,913,324,187,749,400
39.133028
171
0.552349
false
3.9687
false
false
false
bbondy/brianbondy.gae
libs/markdown/extensions/meta.py
1
2697
#!usr/bin/python """ Meta Data Extension for Python-Markdown ======================================= This extension adds Meta Data handling to markdown. Basic Usage: >>> import markdown >>> text = '''Title: A Test Doc. ... Author: Waylan Limberg ... John Doe ... Blank_Data:...
mit
-9,115,914,859,540,492,000
27.966667
99
0.531702
false
3.751043
false
false
false
shadowmint/nwidget
lib/cocos2d-0.5.5/test/test_transition_fadebl.py
1
1224
# This code is so you can run the samples without installing the package import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # testinfo = "s, t 0.5, s, t 1, s, t 1.5, s, t 2.1, s, q" tags = "FadeBLTransition" import cocos from cocos.director import director from cocos.act...
apache-2.0
-6,601,661,051,400,266,000
24.608696
72
0.619281
false
3.083123
false
false
false
akanouras/dm-tool
dm_tool.py
1
11221
#! /usr/bin/env python # -*- coding:utf-8 -*- from __future__ import print_function # , unicode_literals # Based on dm-tool.c from the LightDM project. # Original Author: Robert Ancell <robert.ancell@canonical.com> # Copyright (C) 2013 Antonis Kanouras <antonis@metadosis.eu> # # This program is free software: you can...
gpl-3.0
4,424,071,183,432,009,000
33.420245
85
0.583014
false
3.908394
false
false
false
jrtaal/pyramid_handlebars
test/test_renderers.py
1
9484
''' Created on 3 mei 2012 @author: jacco ''' import unittest import os from lifeshare.lib.renderers import stackdict from lifeshare.lib.renderers.ajax_renderer import AjaxRendererFactory from lifeshare.lib.renderers.pybars_renderer import PybarsRendererFactory from pyramid import testing from pyramid.threadlocal im...
mit
4,120,112,888,118,071,300
34.924242
333
0.578132
false
3.626769
true
false
false
ceball/param
setup.py
1
2666
import os from setuptools import setup ########## autover ########## def get_setup_version(reponame): """Use autover to get up to date version.""" # importing self into setup.py is unorthodox, but param has no # required dependencies outside of python from param.version import Version return Ver...
bsd-3-clause
-6,838,050,883,231,067,000
32.746835
105
0.615904
false
3.875
false
false
false
robmadole/jig
src/jig/output.py
1
15443
# coding=utf-8 import sys import codecs from functools import wraps from StringIO import StringIO from contextlib import contextmanager from jig.exc import ForcedExit # Message types INFO = u'info' WARN = u'warn' STOP = u'stop' def strip_paint(payload): """ Removes any console specific color characters. ...
bsd-2-clause
4,069,934,028,138,322,000
30.324544
79
0.538885
false
4.71686
false
false
false
dtaht/ns-3-dev-old
src/wimax/bindings/modulegen__gcc_ILP32.py
1
738879
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
8,624,872,013,894,432,000
63.379106
748
0.607677
false
3.78922
false
false
false
wehriam/awspider
awspider/aws/sdb.py
1
29905
import base64 import hmac import hashlib import urllib import xml.etree.cElementTree as ET from datetime import datetime import time import dateutil.parser import logging from twisted.internet.defer import DeferredList from ..requestqueuer import RequestQueuer from .lib import etree_to_dict, safe_quote_tuple LOGGER =...
mit
3,535,296,104,513,814,500
36.664987
110
0.562281
false
4.24968
false
false
false
marcino239/reactor_arm
reactor_controller/scripts/joystick_control.py
1
4438
import gflags import dynamixel import time import sys import pygame SERVO_STEP = 10 FLAGS = gflags.FLAGS gflags.DEFINE_string( 'port', '/dev/ttyUSB0', 'dynamixel port' ) gflags.DEFINE_integer( 'baud', 1000000, 'baud rate' ) gflags.DEFINE_integer( 'min_id', 1, 'lowest dynamixel ID' ) gflags.DEFINE_integer( 'max_id', ...
gpl-2.0
807,746,683,606,955,400
28.785235
115
0.614241
false
2.644815
false
false
false
XianwuLin/block_games
snake-ai/snake.py
1
10849
# coding: utf-8 import curses from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN from random import randint # 蛇运动的场地长宽 HEIGHT = 10 WIDTH = 20 FIELD_SIZE = HEIGHT * WIDTH # 蛇头总是位于snake数组的第一个元素 HEAD = 0 # 用来代表不同东西的数字,由于矩阵上每个格子会处理成到达食物的路径长度, # 因此这三个变量间需要有足够大的间隔(>HEIGHT*WIDTH) FOOD = 0 UNDEFINED = (HEIGHT + 1) * ...
mit
-5,874,944,903,512,969,000
28.52069
128
0.625044
false
1.927719
false
false
false
rk700/rbook
rbook/r_pdf.py
1
6074
#!/usr/bin/env python #-*- coding: utf8 -*- # # Copyright (C) 2012 Ruikai Liu <lrk700@gmail.com> # # This file is part of rbook. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version ...
gpl-3.0
3,068,230,262,222,277,600
36.9625
101
0.596806
false
3.600474
false
false
false
fy0/my-leetcode
1028. Recover a Tree From Preorder Traversal/main.py
1
1267
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None import re class Solution: def recoverFromPreorder(self, S: str) -> TreeNode: items = list(map(lambda x: [len(x[0]), x[1]], re.findall(r'(-*)(\...
apache-2.0
4,045,531,576,449,108,000
22.66
83
0.426881
false
3.048969
false
false
false
TeamPurple/Cyber
yowsup_dev/src/whatspy_flask.py
1
2908
import sys, os, time, shutil from Yowsup.connectionmanager import YowsupConnectionManager from Yowsup.Common.debugger import Debugger USERNAME = '972583340860' PASSWORD = 'jag6FSF6MicZmp9M8lrsSqoXYo8='.decode('base64') phase = None cm = None signals_interface = None methods_interface = None # Utils def phone_number...
gpl-3.0
2,017,714,758,593,760,500
26.17757
102
0.686039
false
3.568098
false
false
false
USGSDenverPychron/pychron
pychron/headless_config_loadable.py
1
1222
#!/usr/bin/python # =============================================================================== # Copyright 2011 Jake Ross # # 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-2.0
4,949,899,419,939,401,000
38.419355
81
0.555646
false
4.907631
false
false
false
blaze/dask
dask/array/slicing.py
1
40834
from itertools import product import math from numbers import Integral, Number from operator import add, getitem, itemgetter import warnings import functools import bisect import numpy as np from tlz import memoize, merge, pluck, concat, accumulate from .. import core from .. import config from .. import utils from ....
bsd-3-clause
-1,367,151,266,620,555,500
30.147216
97
0.568938
false
3.571903
false
false
false
eReuse/DeviceHub
ereuse_devicehub/resources/event/device/allocate/settings.py
1
1485
from ereuse_devicehub.resources.account.settings import unregistered_user, unregistered_user_doc from ereuse_devicehub.resources.event.device.settings import EventWithDevices, \ EventSubSettingsMultipleDevices, materialized_components class Allocate(EventWithDevices): to = { 'type': ['objectid', 'dict...
agpl-3.0
-407,023,383,197,654,600
39.135135
109
0.66532
false
4.002695
false
false
false
kubernetes-client/python
kubernetes/client/models/v1_priority_class.py
1
11062
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.18 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
apache-2.0
1,955,843,117,827,839,500
37.276817
411
0.644549
false
4.177492
true
false
false
yittg/Snipping
snipping/prompt_toolkit/layout.py
1
5507
"""snipping.prompt_toolkit.layout wrappers for layout """ from prompt_toolkit.key_binding import vi_state from prompt_toolkit.layout import containers from prompt_toolkit.layout import controls from prompt_toolkit.layout import dimension from prompt_toolkit.layout import highlighters from prompt_toolkit.layout import...
mit
-1,226,969,072,952,198,400
33.85443
79
0.632831
false
3.840307
false
false
false
thecarebot/carebot
tests/test_spreadsheet.py
1
3336
#!/usr/bin/env python import datetime from mock import patch try: import unittest2 as unittest except ImportError: import unittest import app_config app_config.DATABASE_NAME = 'carebot_test.db' app_config.date_cutoff = datetime.date(1997, 1, 1) from scrapers.npr_spreadsheet import SpreadsheetScraper from ut...
mit
1,149,627,926,656,244,500
37.344828
171
0.667866
false
3.537646
true
false
false
deepmind/acme
acme/wrappers/action_repeat.py
1
1582
# python3 # Copyright 2018 DeepMind Technologies Limited. All rights reserved. # # 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 re...
apache-2.0
64,054,636,518,076,696
31.958333
76
0.719343
false
4.196286
false
false
false
treycucco/pxp
pxp/stdlib/operator.py
1
10810
from decimal import Decimal from pxp.exception import OperatorError from pxp.function import FunctionArg, FunctionList, InjectedFunction from pxp.stdlib.types import number_t, string_t, boolean_t # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Number Operators def op_number_add(reso...
bsd-3-clause
-3,144,274,327,464,263,700
36.797203
146
0.684736
false
3.359229
false
false
false
gerard256/script.trakt
rating.py
1
7947
# -*- coding: utf-8 -*- """Module used to launch rating dialogues and send ratings to Trakt""" import xbmc import xbmcaddon import xbmcgui import utilities as utils import globals import logging logger = logging.getLogger(__name__) __addon__ = xbmcaddon.Addon("script.trakt") def ratingCheck(media_type, summary_info...
gpl-2.0
-5,166,443,607,900,316,000
34.959276
179
0.556436
false
3.941964
false
false
false
oblique-labs/pyVM
rpython/memory/gctypelayout.py
1
22275
from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup from rpython.rtyper import rclass from rpython.rtyper.lltypesystem.lloperation import llop from rpython.rlib.debug import ll_assert from rpython.rlib.rarithmetic import intmask from rpython.tool.identity_dict import identity_dict class GCData(...
mit
4,813,011,452,356,338,000
38.919355
79
0.590797
false
3.544717
false
false
false
inveniosoftware-contrib/invenio-workflows-ui
invenio_workflows_ui/serializers/__init__.py
1
1527
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
gpl-2.0
-2,496,835,084,541,541,400
34.511628
76
0.75704
false
3.742647
false
false
false
DesertBus/txircd
txircd/modules/cmd_list.py
1
1917
from twisted.words.protocols import irc from txircd.modbase import Command from txircd.utils import irc_lower from fnmatch import fnmatch class ListCommand(Command): def onUse(self, user, data): chancache = [] for channame, channel in self.ircd.channels.iteritems(): if data["chanfilter"...
bsd-3-clause
-929,418,014,203,899,100
33.872727
148
0.523213
false
4.468531
false
false
false
akiokio/centralfitestoque
src/.pycharm_helpers/test_generator.py
1
15858
# encoding: utf-8 """ Tests basic things that generator3 consists of. NOTE: does not work in Jython 2.2 or IronPython 1.x, because pyparsing does not. """ import unittest from generator3 import * M = ModuleRedeclarator import sys IS_CLI = sys.platform == 'cli' VERSION = sys.version_info[:2] # only (major, minor) c...
bsd-2-clause
9,880,757,391,117,172
37.397094
120
0.570942
false
3.35548
true
false
false
razco/music_similarity
midi/midi_editting.py
1
5807
''' Created on Aug 26, 2017 @author: Raz ''' import mido import numpy as np def midifile_to_dict(mid): tracks = [] for track in mid.tracks: tracks.append([vars(msg).copy() for msg in track]) return { 'ticks_per_beat': mid.ticks_per_beat, 'tracks': tracks, } def test(): ...
mit
-5,851,520,322,637,116,000
32.959064
116
0.61667
false
2.947716
false
false
false
EpicScriptTime/update-wrapper
updatewrapper/utils/display.py
1
2279
import termcolor def ask_yes_no(question, default=True, spacing=True): """ Ask a yes/no question via raw_input() and return their answer. "question" is a string that is presented to the user. "default" is the presumed answer if the user just hits <Enter>. It must be "yes" (the default), "no" ...
mit
3,996,592,966,298,821,000
30.652778
113
0.425186
false
3.33675
false
false
false
frosty308/webapps
forms.py
1
8021
#!/usr/bin/python # -*- coding: utf-8 -*- """ Copyright (c) 2017-2018 Alan Frost, All rights reserved. Implementation of user forms """ from flask_wtf import FlaskForm from wtforms import (BooleanField, HiddenField, PasswordField, StringField, SubmitField, FileField, ValidationError) from wtform...
gpl-3.0
-5,773,261,079,788,126,000
33.424893
97
0.63234
false
4.46355
false
false
false
apache/incubator-singa
examples/autograd/resnet.py
1
8531
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
8,992,445,720,500,284,000
28.519031
117
0.593717
false
3.423355
false
false
false
bxlab/HiFive_Paper
Scripts/Figures/fivec_hicpipe_algorithm_comparison.py
1
14324
#!/usr/bin/env python import sys import os import numpy from pyx import canvas, text, path, graph, color, trafo, unit, attr, deco, style, bitmap import h5py import hifive unit.set(defaultunit="cm") text.set(mode="latex") text.preamble(r"\usepackage{times}") text.preamble(r"\usepackage{sansmath}") text.preamble(r"\...
bsd-3-clause
1,219,841,942,067,948,000
55.616601
113
0.578749
false
2.922073
false
false
false
delete/estofadora
estofadora/statement/views.py
1
4766
from datetime import datetime from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.core.urlresolvers import reverse from django.contrib import messages from estofadora.core.utils import MONTHS, last_day_of, month_before_of from .forms ...
mit
1,433,432,891,108,522,200
28.239264
73
0.634914
false
3.559373
false
false
false
stormi/tsunami
src/primaires/salle/commandes/ouvrir/__init__.py
1
3297
# -*-coding:Utf-8 -* # Copyright (c) 2010 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # lis...
bsd-3-clause
-1,509,933,335,406,380,800
42.866667
79
0.696657
false
3.576087
false
false
false
Jimdo/ansible-fastly
tests/test_fastly_response_object.py
1
2949
#!/usr/bin/env python import os import unittest import sys from test_common import TestCommon sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'library')) from fastly_service import FastlyConfiguration class TestFastlyResponseObject(TestCommon): @TestCommon.vcr.use_cassette() def test_fastly_re...
mit
3,654,560,946,872,806,000
45.078125
111
0.699559
false
4.200855
true
false
false
ericblau/ipf-xsede
ipf/glue2/application.py
1
10306
############################################################################### # Copyright 2011-2014 The University of Texas at Austin # # # # Licensed under the Apache License, Version 2.0 (the "License"); #...
apache-2.0
-30,491,066,512,194,984
39.574803
119
0.522511
false
4.556145
false
false
false
edouardpoitras/Eva
clients/cli.py
1
4617
""" This file holds the abstract CLI class used to create command line utilities that interact with Eva. Please use the local_cli.py or remote_cli.py to interact with Eva via the command line. """ import time from multiprocessing import Process class CLI(object): """ Interface object used to create CLI-based...
epl-1.0
-474,309,522,082,213,950
35.354331
91
0.601473
false
4.589463
false
false
false
darth-vader-lg/glcncrpi
tools/arm-bcm2708/gcc-linaro-arm-none-eabi-4.8-2014.04/arm-none-eabi/lib/v7ve/fpv4/softfp/libstdc++.a-gdb.py
1
2451
# -*- python -*- # Copyright (C) 2009-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later versio...
gpl-3.0
-413,694,461,915,479,100
39.85
114
0.720522
false
3.572886
false
false
false
MKLab-ITI/reveal-user-annotation
reveal_user_annotation/rabbitmq/rabbitmq_util.py
1
3042
__author__ = 'Georgios Rizos (georgerizos@iti.gr)' import sys import subprocess import urllib from amqp import Connection, Message from amqp.exceptions import PreconditionFailed if sys.version_info > (3,): import urllib.parse as urlparse else: import urlparse def translate_rabbitmq_url(url): if url[0:...
apache-2.0
-7,088,256,928,776,268,000
27.971429
112
0.635766
false
3.905006
false
false
false
bentzinir/Buffe
layers/conv_pool.py
1
3468
import theano as t import numpy as np import theano.tensor as tt from theano.tensor.nnet import conv from theano.tensor.signal import downsample import common rng = np.random.RandomState(23455) class CONV_POOL(object): """Conv Pool Layer of a convolutional network """ def __init__(self, filter_shape, image_s...
mit
1,760,589,534,825,072,000
33.68
88
0.5891
false
3.940909
false
false
false
y4ns0l0/collectd-ceph
plugins/ceph_latency_plugin.py
1
3887
#!/usr/bin/env python # # vim: tabstop=4 shiftwidth=4 # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; only version 2 of the License is applicable. # # This program is distributed in the hope th...
gpl-2.0
4,239,711,054,730,847,700
34.336364
129
0.624132
false
3.795898
false
false
false
eepalms/gem5-newcache
src/sim/Process.py
1
3132
# Copyright (c) 2005-2008 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this ...
bsd-3-clause
-4,790,954,474,984,413,000
47.9375
79
0.735951
false
4.088773
false
false
false
simbits/Lumiere
cabinet_orig.py
1
2565
#!/usr/bin/env python import random import socket import struct import sys import time from Adafruit_MCP230xx import Adafruit_MCP230XX CABINET_VERSION='1.0b' START_MSG='## Cabinet version %s ##' % (CABINET_VERSION) MCAST_GRP = ('224.19.79.1', 9999) DRAWERS = 9 USE_PULLUPS = 1 RETRIGGER_DELAY = 10 #seconds WAIT_...
mit
-227,441,266,886,782,400
29.176471
68
0.527875
false
3.079232
false
false
false
theetcher/fxpt
fxpt/fx_refsystem/options_dialog_ui.py
1
4062
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'options_dialog_ui.ui' # # Created: Fri Nov 18 22:58:31 2016 # by: pyside-uic 0.2.15 running on PySide 1.2.4 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_Dialog(object): def set...
mit
1,141,909,398,221,489,200
57.869565
137
0.727228
false
3.850237
false
false
false
KrisHammerberg/DEMtools
demtools.py
1
4546
# -*- coding: utf-8 -*- """ /*************************************************************************** DemTools A QGIS plugin A suite of tools for doing neat things with DEMs ------------------- begin : 2014-05-15 copyrigh...
gpl-2.0
-3,094,973,200,494,068,700
37.525424
183
0.543995
false
4.317189
false
false
false
WeAreWizards/proppy
proppy/proposal.py
1
6603
from collections import defaultdict from proppy.validators import ( is_currency, is_date, is_percentage, is_present, are_valid_deliverables, are_valid_rates ) from proppy.utils import ( get_work_days_interval, to_date ) class Proposal(object): validation_rules = { 'custome...
mit
5,684,873,120,759,950,000
34.12234
79
0.562169
false
4.221867
false
false
false
dann4520/vigenere_encoder_decoder
vigenere_encoder_decoder.py
1
9778
#written using Python 2.7.8 cipher_library = [{"A": "A", "B": "B", "C": "C", "D": "D", "E": "E", "F": "F", "G": "G", "H": "H", "I": "I", "J": "J", "K": "K", "L": "L", "M": "M", "N": "N", "O": "O", "P": "P", "Q": "Q", "R": "R", "S": "S", "T": "T", "U": "U", "V": "V", "W": "W", "X": "X", "Y": "Y", "Z": "Z"}, ...
mit
-7,248,983,136,332,615,000
99.804124
279
0.275312
false
2.059393
false
false
false
jeroanan/GameCollection
UI/Handlers/HandlerFactory.py
1
2201
# copyright (c) David Wilson 2015 # This file is part of Icarus. # Icarus is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # Icarus is...
gpl-3.0
6,035,370,178,296,243,000
34.5
93
0.665607
false
4.240848
false
false
false
alex-pardo/ANLP-PROJECT
findDemonyms.py
1
1884
import re from string import * import sys from nltk import * import locale from wikitools import wiki from wikitools import api from wikitools import page from wikitools import category wikiAPI = { 'en': "http://en.wikipedia.org/w/api.php"} site = wiki.Wiki(wikiAPI['en']) def generateDemonym(place, add, repl...
apache-2.0
5,177,841,268,757,151,000
20.409091
73
0.654989
false
2.863222
false
false
false
wzong/TinyCloud
virtualbox/apis.py
1
3618
import json import os from django.http import JsonResponse, StreamingHttpResponse from django.views.decorators.http import require_http_methods from authentication import authenticator from machine import machine_controller from virtualbox import virtualbox_controller GUEST_ADDITIONS_DIR = '/var/tinymakecloud/additi...
apache-2.0
4,134,940,897,749,442,000
30.189655
76
0.698729
false
3.726056
false
false
false
madmath/sous-chef
src/order/management/commands/generateorders.py
1
1511
from django.core.management.base import BaseCommand from order.models import Order from member.models import Client from datetime import datetime from django.contrib.admin.models import LogEntry, ADDITION, CHANGE class Command(BaseCommand): help = 'Generate orders for all clients using his preferences' def a...
agpl-3.0
185,264,954,829,694,800
34.97619
69
0.581072
false
4.197222
false
false
false
saihttam/kaggle-axa
RobustRegressionDriver.py
1
5500
import numpy as np from sklearn.ensemble import GradientBoostingRegressor from random import sample, seed from sklearn.decomposition import TruncatedSVD from math import floor from sklearn import cross_validation import numpy as np from numpy.linalg import norm, svd def inexact_augmented_lagrange_multiplier(X, lmbda=...
bsd-2-clause
4,683,779,648,376,033,000
42.65873
141
0.586909
false
3.424658
true
false
false
raymondanthony/youtube-dl
youtube_dl/extractor/xnxx.py
1
1491
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( compat_urllib_parse, ) class XNXXIE(InfoExtractor): _VALID_URL = r'^https?://(?:video|www)\.xnxx\.com/video(?P<id>[0-9]+)/(.*)' _TEST = { 'url': 'http://video.xnxx.com/vide...
unlicense
5,536,822,106,596,122,000
29.408163
80
0.495973
false
3.489461
false
false
false
Fuchida/Archive
albme-py/albme.py
1
3547
"""Perform automated searches against http://www.albme.org/. The script will get license information such as the licensee name, license number and expiration date information of a medical professional. This information is then saved to a json file """ import json import requests import grequests from BeautifulSoup im...
mit
-9,057,134,204,100,410,000
26.076336
75
0.728503
false
3.420444
false
false
false
smartinov/fennec
fennec/libs/importer/importer.py
1
3594
from rest_framework.renderers import JSONRenderer from fennec.apps.metamodel.serializers import ColumnSerializer, BasicSchemaSerializer, BasicTableSerializer, BasicIndexSerializer, \ ForeignKeyBasicSerializer from fennec.apps.repository.models import BranchRevisionChange from fennec.apps.metamodel.models import Ch...
gpl-3.0
3,583,280,857,935,306,000
32.287037
132
0.618809
false
4.084091
false
false
false
co-ment/comt
src/cm/utils/comment_positioning.py
1
7762
# -*- coding: utf-8 -*- from difflib import SequenceMatcher #from cm.utils.spannifier import Spannifier import sys, operator from cm.utils.spannifier import spannify from cm.converters.pandoc_converters import pandoc_convert import logging from cm.utils.spannifier import get_the_soup import re import html5lib from htm...
agpl-3.0
467,451,743,071,097,000
39.831579
188
0.577597
false
3.810413
false
false
false
esquire-/weather
weather.py
1
1797
#!/usr/bin/python ''' Weather.py John Heenan 14 February 2014 A simple utlity to send notifications to your phone when it starts raining outside of your windowless CS lab. Run as a login item/launchd process/drop it in .bashrc and it will only call you when you're in the lab. ''' import urllib2 import json import time...
mpl-2.0
5,054,473,239,764,113,000
28
182
0.722315
false
3.435946
false
false
false
sharoonthomas/trytond-report-html-stock
tests/test_views_depends.py
1
1195
# -*- coding: utf-8 -*- import sys import os DIR = os.path.abspath(os.path.normpath(os.path.join( __file__, '..', '..', '..', '..', '..', 'trytond' ))) if os.path.isdir(DIR): sys.path.insert(0, os.path.dirname(DIR)) import unittest import trytond.tests.test_tryton from trytond.tests.test_tryton import test_vie...
bsd-3-clause
2,409,269,749,330,876,400
21.980769
69
0.59749
false
3.676923
true
false
false
Ayrx/cryptography
src/_cffi_src/openssl/x509v3.py
1
9359
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function INCLUDES = """ #include <openssl/x509v3.h> /* * This is part of a work-...
bsd-3-clause
-559,673,534,380,414,200
30.725424
79
0.711508
false
3.064506
false
false
false
NLeSC/PattyAnalytics
scripts/registration.py
1
3140
#!/usr/bin/env python2.7 """Registration script. Usage: registration.py [-h] [-d <sample>] [-U] [-u <upfile>] [-c <camfile>] <source> <drivemap> <footprint> <output> Positional arguments: source Source LAS file drivemap Target LAS file to map source to footprint Footprint for the source LAS file ...
apache-2.0
-5,553,458,156,020,115,000
27.288288
111
0.634076
false
3.548023
false
false
false
ghetzel/webfriend
webfriend/utils/__init__.py
1
1517
import os.path import random import inspect import importlib import string PACKAGE_ROOT = os.path.abspath( os.path.dirname( os.path.dirname(__file__) ) ) PACKAGE_NAME = os.path.basename(PACKAGE_ROOT) def random_string(count, charset=string.lowercase + string.digits): return ''.join(random.sample...
bsd-2-clause
6,987,214,187,512,982,000
20.671429
87
0.552406
false
4.501484
false
false
false
nylas/sync-engine
inbox/mailsync/backends/imap/generic.py
1
38201
# deal with unicode literals: http://www.python.org/dev/peps/pep-0263/ # vim: set fileencoding=utf-8 : """ ---------------- IMAP SYNC ENGINE ---------------- Okay, here's the deal. The IMAP sync engine runs per-folder on each account. Only one initial sync can be running per-account at a time, to avoid hammering the...
agpl-3.0
-1,116,494,582,475,538,600
43.207176
91
0.586333
false
4.237298
false
false
false
ros2/rosidl
rosidl_cli/rosidl_cli/command/generate/api.py
1
3504
# Copyright 2021 Open Source Robotics Foundation, 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...
apache-2.0
1,224,383,898,062,600,000
34.393939
80
0.710616
false
4.672
false
false
false
jtaghiyar/kronos
kronos/pipelineui.py
1
3217
''' Created on May 9, 2014 @author: jtaghiyar ''' import argparse import os parser = argparse.ArgumentParser(description='Pipeline user interface') parser.add_argument('-b', '--job_scheduler', default='drmaa', choices=['sge','drmaa'], help="job schedule...
mit
-5,165,773,639,326,006,000
32.863158
79
0.484613
false
4.787202
false
false
false
APSL/django-kaio
kaio/mixins/email.py
1
2693
# -*- coding: utf-8 -*- import logging import os from kaio import Options from functools import partial logger = logging.getLogger(__name__) opts = Options() get = partial(opts.get, section='Email') class EmailMixin(object): """Settings para enviar emails""" # Django settings: https://docs.djangoproject.c...
bsd-3-clause
-6,720,387,585,946,271,000
26.20202
93
0.629781
false
3.704264
false
false
false
ozgurgunes/django-cmskit
cmskit/slideshow/migrations/0001_initial.py
1
5691
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Slideshow' db.create_table('cmsplugin_slideshow', ( ('cmsplugin_ptr', self.gf('d...
mit
5,875,987,426,555,961,000
64.425287
155
0.583377
false
3.693056
false
false
false
OCM-Lab-PUC/switch-chile
python_utility_scripts/create_transmission_csv.py
1
5810
# -*- coding: utf-8 -*- # Copyright 2016 The Switch-Chile Authors. All rights reserved. # Licensed under the Apache License, Version 2, which is in the LICENSE file. # Operations, Control and Markets laboratory at Pontificia Universidad # Católica de Chile. import pandas, os, re, datetime, sys from unidecode import un...
apache-2.0
7,827,939,213,781,622,000
38.496599
297
0.643472
false
2.77932
false
false
false
Jackojc/Asciify
example/matrix.py
1
1374
from asciify import asciify import random import time import pygame width, height = (60, 30) add_per_frame = 5 render = asciify(width, height, "font", fontsize=16) random.seed(time.time()) Particles = [ [ random.randint(0, width), random.randint(-1, height), ...
mit
-4,344,498,825,365,630,500
31.714286
134
0.534207
false
3.673797
false
false
false
chrisjdavie/shares
machine_learning/sklearn_dataset_format.py
1
1160
''' Created on 2 Sep 2014 @author: chris ''' '''File format - data, length of data, containing unicode - target, length of data, contains int reference to target - target_names, type names relative to target - filenames, names of files storing data (probably target too) ...
mit
4,733,438,516,823,196,000
30.378378
86
0.552586
false
4.157706
false
false
false
jiarong/SSUsearch
scripts/count-taxon.py
1
3226
#! /usr/bin/env python # count the taxon number from mothur taxonomy file # by gjr; 080614 """ Count the taxon number for each taxon in mothur taxonomy file % python <thisFile> <sample.gg.taxonomy> <outfile.table> """ import sys import os import collections #EXCLUDE = ['Archaea', 'Eukaryota', 'unknown'] EXCLUDE = [...
bsd-3-clause
-8,817,099,791,117,188,000
23.815385
77
0.490081
false
3.708046
false
false
false
giubil/trackit
api/files/api/app/s3_billing_transfer.py
1
8777
from object_storage import S3BucketObjectStore from config import BILLING_FILE_REGEX, CLIENT_BILLING_BUCKET, IMPORT_BILLING_AWS_KEY, IMPORT_BILLING_AWS_SECRET, LOCAL_BILLS_DIR from es import client from es.awsdetailedlineitem import AWSDetailedLineitem from contextlib import contextmanager from zipfile import ZipFile f...
apache-2.0
2,701,550,056,858,239,000
31.872659
150
0.583115
false
3.431196
false
false
false
ninly/pphrase
pphrase.py
1
5060
""" pphrase.py : Generate a random passphrase Generate a random passphrase from a subset of the most common words (max 10000) in Google's trillion-word corpus. See http://xkcd.com/936 for the motivation and inspiration. Licensed under terms of MIT license (see LICENSE-MIT) Copyright (c) 2014 Jason...
mit
5,217,362,287,712,699,000
29.481928
87
0.556917
false
3.868502
false
false
false
dreamhost/akanda-appliance
test/unit/drivers/test_hostname.py
1
2016
# Copyright 2014 DreamHost, LLC # # Author: DreamHost, LLC # # 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 applicabl...
apache-2.0
8,984,808,868,207,687,000
31.516129
77
0.638889
false
3.530648
true
false
false
Jorge-C/bipy
skbio/maths/stats/distribution.py
1
6102
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # ---------------------...
bsd-3-clause
-6,199,607,592,344,027,000
24.214876
79
0.493445
false
3.148607
false
false
false
gustavoatt/consultas
consultas_proyecto/consultas_proyecto/settings/base.py
1
7398
"""Common settings and globals.""" from os.path import abspath, basename, dirname, join, normpath from sys import path ########## PATH CONFIGURATION # Absolute filesystem path to the Django project directory: DJANGO_ROOT = dirname(dirname(abspath(__file__))) # Absolute filesystem path to the top-level project fold...
mit
-4,859,612,239,694,173,000
27.785992
98
0.694107
false
3.432947
true
false
false
crccheck/gallery-cms
gallery/routes.py
1
2047
import os from io import BytesIO from itertools import islice from pathlib import Path from PIL import Image from starlette.responses import Response, PlainTextResponse # TODO centralize this BASE_DIR = os.getenv("BASE_DIR", os.path.dirname(os.path.abspath(__file__))) THUMBNAIL_SIZE = (300, 300) DEFAULT_SIZE = 200 ...
gpl-3.0
-4,949,062,279,888,032,000
30.492308
82
0.625305
false
3.355738
false
false
false
FloatingGhost/skype4py
Skype4Py/call.py
1
18207
"""Calls, conferences. """ __docformat__ = 'restructuredtext en' from .utils import * from .enums import * class DeviceMixin(object): def _Device(self, Name, DeviceType=None, Set=type(None)): args = args2dict(self._Property(Name, Cache=False)) if Set is type(None): for dev, value in ...
bsd-3-clause
-244,468,576,796,218,620
24.752475
112
0.598396
false
4.0496
false
false
false
zenn1989/scoria-interlude
L2Jscoria-Game/data/scripts/quests/380_BringOutTheFlavorOfIngredients/__init__.py
1
3959
# Made by disKret & DrLecter import sys from com.l2scoria import Config from com.l2scoria.gameserver.model.quest import State from com.l2scoria.gameserver.model.quest import QuestState from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest qn = "380_BringOutTheFlavorOfIngredients" #NPC ROLLANT =...
gpl-3.0
-8,783,527,725,578,094,000
28.333333
188
0.635767
false
2.751216
false
false
false
pepetreshere/odoo
addons/account_fleet/models/account_move.py
2
1946
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields, api, _ class AccountMove(models.Model): _inherit = 'account.move' def _post(self, soft=True): vendor_bill_service = self.env.ref('account_fleet.data_fleet_service_type_...
agpl-3.0
7,216,238,615,381,273,000
40.404255
139
0.607914
false
3.590406
false
false
false
LaboratoireMecaniqueLille/crappy
crappy/blocks/grapher.py
1
5641
# coding: utf-8 import numpy as np from .block import Block from .._global import OptionalModule try: import matplotlib.pyplot as plt from matplotlib.widgets import Button except (ModuleNotFoundError, ImportError): plt = OptionalModule("matplotlib") Button = OptionalModule("matplotlib") class Grapher(Block...
gpl-2.0
-8,069,995,091,647,567,000
35.160256
79
0.601489
false
3.523423
false
false
false
xi-studio/anime
newnet/show.py
1
1080
import numpy as np import matplotlib.pyplot as plt from scipy.sparse import csc_matrix head = np.random.randint(low=0,high=10,size=20) tail = np.random.randint(low=0,high=10,size=20) row = np.arange(20) data = np.ones(20) a = csc_matrix((data, (row,head)),shape=(20,10)).toarray() b = csc_matrix((data, (row,tail)),sha...
mit
6,583,698,324,841,650,000
23.545455
65
0.642593
false
2.443439
false
false
false
wahur666/kodok
python/Base64/ip-ban.py
1
1179
#!/usr/bin/python3 __author__ = 'Imre' import sys import os import re def main(): if len(sys.argv) == 2: inputfile = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), sys.argv[1]) if os.path.isfile(inputfile): output = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0]...
gpl-3.0
-950,800,508,332,692,500
30.891892
92
0.433418
false
3.827922
false
false
false
storecast/holon
holon/services/httplib.py
1
1461
from __future__ import absolute_import from . import HttpService from httplib import HTTPConnection, HTTPException, HTTPSConnection from socket import timeout, error import time class HttpLibHttpService(HttpService): """ HttpService using python batteries' httplib. """ def __init__(self, *args, **kwa...
bsd-2-clause
40,881,219,972,397,120
34.634146
191
0.614648
false
4.297059
false
false
false
rockneurotiko/wirecloud
src/wirecloud/platform/workspace/mashupTemplateGenerator.py
1
12686
# -*- coding: utf-8 -*- # Copyright (c) 2012-2015 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either v...
agpl-3.0
8,939,400,542,287,359,000
37.093093
128
0.607647
false
4.327874
false
false
false
reedessick/pointy-Poisson
multiPopVectors2OmegaScan.py
1
6042
#!/usr/bin/python usage = "multiPopVectors2OmegaScan.py [--options] vectors.txt" description = "writes OmegaScan config files based on the multi-population vectors supplied. Assumes KW channel naming conventions. Also writes corresponding comand lines to run OmegaScans for each vector supplied." author = "reed.essick@l...
mit
-8,005,188,117,140,197,000
31.483871
215
0.624297
false
3.173319
false
false
false
googleapis/googleapis-gen
google/cloud/automl/v1beta1/automl-v1beta1-py/google/cloud/automl_v1beta1/types/model_evaluation.py
1
6961
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
apache-2.0
-8,033,426,745,816,520,000
39.947059
124
0.679787
false
4.380743
false
false
false
MDAnalysis/mdanalysis
benchmarks/benchmarks/analysis/rdf.py
1
1204
import MDAnalysis try: from MDAnalysisTests.datafiles import TPR, XTC except: pass try: from MDAnalysis.analysis.rdf import InterRDF except: pass class SimpleRdfBench(object): """Benchmarks for MDAnalysis.analysis.rdf """ params = ([20,75,200], [[0,5], [0,15], [0,20]], ...
gpl-2.0
-4,898,817,287,443,108,000
24.083333
65
0.539037
false
3.727554
false
false
false
xl1994/tfConvo
genImg.py
1
3379
# -*- Coding: UTF-8 -*- import os from captcha.image import ImageCaptcha import numpy as np from PIL import Image import tensorflow as tf import random # import time NUMBER = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] ALPHABET_LOWER = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',\ 'm', 'n', 'o...
mit
-1,317,025,532,587,306,800
34.197917
94
0.553122
false
3.199811
false
false
false
Keeper-Security/Commander
keepercommander/custom/create_delete.py
1
1159
# _ __ # | |/ /___ ___ _ __ ___ _ _ ® # | ' </ -_) -_) '_ \/ -_) '_| # |_|\_\___\___| .__/\___|_| # |_| # # Keeper Commander # Copyright 2017 Keeper Security Inc. # Contact: commander@keepersecurity.com # # Example showing how to create a record and upload # to the server, then deleting the record from ...
mit
-5,221,725,862,456,658,000
22.632653
88
0.66494
false
3.047368
false
false
false
dadorado37/Trabajos_Python
empresa_arranque_gana.py
1
7489
# este link es para asegurarse de que un usuario ingrese un numero entero y no un caracter # https://mail.python.org/pipermail/python-es/2011-September/030635.html # empresa_arranque_gana.py seleccion_menu_uno = 5 # define the function blocks def uno(): print("\nEsa opcion es correcta\n") print "cliente categoria 1"...
gpl-2.0
-7,989,632,861,453,903,000
40.153846
159
0.72533
false
2.446586
false
false
false
Hattivat/hypergolic-django
hypergolic/catalog/views/guidance_system_views.py
1
1876
from django.views.generic.detail import DetailView from django.views.generic.edit import UpdateView, DeleteView from .base import GenericListView, GenericCreateView from ..models import GuidanceSystem from ..forms import GuidanceSystemForm from django.core.urlresolvers import reverse_lazy from django.core.urlresolvers ...
agpl-3.0
-2,839,638,340,755,405,300
32.5
72
0.723348
false
3.789899
false
false
false