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
trilan/django-sitesutils
tests/test_context_processors/tests.py
1
1156
from django.contrib.sites.models import Site, RequestSite from django.test import TestCase, RequestFactory from sitesutils.context_processors import site from sitesutils.middleware import RequestSiteMiddleware def create_request(host): request_factory = RequestFactory(HTTP_HOST=host) return request_factory.g...
isc
994,248,313,722,007,300
31.111111
59
0.688581
false
4.297398
true
false
false
SUNET/eduid-webapp
src/eduid_webapp/idp/sso_session.py
1
9142
# # Copyright (c) 2014 NORDUnet A/S # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of ...
bsd-3-clause
2,594,995,407,846,799,400
44.257426
112
0.662656
false
3.817119
false
false
false
devopshq/crosspm
crosspm/helpers/exceptions.py
1
1087
# -*- coding: utf-8 -*- CROSSPM_ERRORCODES = ( CROSSPM_ERRORCODE_SUCCESS, CROSSPM_ERRORCODE_UNKNOWN_ERROR, CROSSPM_ERRORCODE_WRONG_ARGS, CROSSPM_ERRORCODE_FILE_DEPS_NOT_FOUND, CROSSPM_ERRORCODE_WRONG_SYNTAX, CROSSPM_ERRORCODE_MULTIPLE_DEPS, CROSSPM_ERRORCODE_NO_FILES_TO_PACK, CROSSPM_ER...
mit
1,808,988,960,025,678,600
30.970588
59
0.701012
false
3.027855
false
false
false
rock-planning/planning-lama
lama/translate/invariant_finder.py
1
5900
#! /usr/bin/env python # -*- coding: latin-1 -*- from collections import deque, defaultdict import itertools import time import invariants import pddl import timers class BalanceChecker(object): def __init__(self, task, reachable_action_params): self.predicates_to_add_actions = defaultdict(set) ...
gpl-3.0
1,017,633,145,280,532,500
38.597315
86
0.622542
false
4.030055
false
false
false
piotroxp/scibibscan
scib/lib/python3.5/site-packages/astropy/io/fits/util.py
1
31000
# Licensed under a 3-clause BSD style license - see PYFITS.rst from __future__ import division import gzip as _system_gzip import itertools import io import mmap import os import platform import signal import string import sys import tempfile import textwrap import threading import warnings import weakref from distu...
mit
5,024,605,963,164,226,000
30.600408
95
0.601613
false
4.079484
false
false
false
pattisdr/osf.io
api/base/urls.py
1
4679
from django.conf.urls import include, url from django.views.generic.base import RedirectView from . import views from . import settings from . import versioning default_version = versioning.decimal_version_to_url_path(settings.REST_FRAMEWORK['DEFAULT_VERSION']) # Please keep URLs alphabetized for auto-generated docu...
apache-2.0
-1,306,424,025,450,056,000
53.406977
140
0.580893
false
4.065161
false
false
false
abhinavsingh/proxy.py
proxy/http/websocket/client.py
1
3712
# -*- coding: utf-8 -*- """ proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE...
bsd-3-clause
4,140,007,883,464,853,500
33
91
0.593362
false
4.211364
false
false
false
queeno/network-simulator
MR_JobGenerator/MR_JobGenerator.py
1
4366
''' Copyright (c) 2012, Simon Aquino All rights reserved. Made available under the BSD license - see the LICENSE file ''' #Imports import sys import random # File specs INPUT_PATH = '../inputs/' NO_FILE = 'input%d.mr' #Number specs MAX_NO_FILES = 5 MAX_NUMS_IN_FILES = 100 MAX_RANGE_IN_FILES = 1000 WELCOME_MESSAGE=...
bsd-3-clause
-5,966,355,612,059,816,000
24.389535
79
0.60055
false
3.572831
false
false
false
a4a881d4/gosse
rewrite/memlayout.py
1
4785
class type: def __init__(self,name,size,ctypename,gotypename='default'): self.name = name self.size = size self.ctypename = ctypename if gotypename=='default': self.gotypename = name else: self.gotypename = gotypename def cgen(self,v): print self.name,'%s;'%v.name def gogen(self,v): print v.nam...
gpl-2.0
-153,453,880,150,630,100
17.916996
62
0.621317
false
2.426471
false
false
false
hzxsnczpku/banrinochoujou
examples/CartPole/train_CartPole_BDQN.py
1
2863
from train import * from models.net_builder import * from basic_utils.env_wrapper import Vec_env_wrapper from models.agents import * from basic_utils.options import * from basic_utils.exploration_noise import * def train_CartPole_DQN(load_model=False, render=False, save_every=None, double=False, prioritized=False): ...
mit
8,449,812,705,804,333,000
37.689189
105
0.493888
false
3.911202
false
false
false
amitdeshmukh/malware-domain-detection
malware_domain_detection.py
1
3283
#!/usr/bin/python from urlparse import urlparse import requests import json import math import re domain = '' domain_arr = [] path='' path_arr = [] starts_with_http = re.compile('^http') j = {} tlds = [] file_name = 'angler_domains.txt' def bigrams(input_list): return zip(input_list, input_list[1:]) def probabilit...
apache-2.0
3,560,087,129,758,477,000
21.798611
75
0.646055
false
2.998174
false
false
false
brunojulia/ultracoldUB
brightsolitons/bs_evolution/sim_2_light.py
1
6761
# -*- coding: utf-8 -*- """ Created on Fri Nov 25 20:40:22 2016 @author: laura18 ****************************************************************************** This program creates an animation to reproduce an analogy with the module of a bright soliton passing through a barrier. Given the energy and the h...
gpl-3.0
-4,692,148,553,348,611,000
36.426136
112
0.589558
false
2.791495
false
false
false
Donkyhotay/MoonPy
zope/dublincore/interfaces.py
1
14791
############################################################################## # # Copyright (c) 2002 Zope Corporation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SO...
gpl-3.0
-6,439,756,937,129,569,000
30.204641
80
0.654114
false
4.642498
false
false
false
sernst/cauldron
cauldron/session/writing/components/plotly_component.py
1
2008
import typing import os from cauldron import cli from cauldron import environ from cauldron.session import projects from cauldron.session.writing import file_io from cauldron.session.writing.components.definitions import COMPONENT from cauldron.session.writing.components.definitions import WEB_INCLUDE PLOTLY_WARNING ...
mit
-18,592,247,775,742,830
24.1
71
0.641434
false
3.788679
false
false
false
osrf/rosbook
code/patrol/src/shapes.py
1
2028
# BEGIN ALL #!/usr/bin/env python import rospy from smach import State,StateMachine from time import sleep class Drive(State): def __init__(self, distance): State.__init__(self, outcomes=['success']) self.distance = distance def execute(self, userdata): print 'Driving', self.distanc...
apache-2.0
790,602,064,692,161,200
32.8
80
0.623767
false
3.783582
false
false
false
3DGenomes/tadbit
_pytadbit/hic_data.py
1
80109
""" December 12, 2014. """ import os from sys import stderr from collections import OrderedDict from warnings import warn from bisect import bisect_right as bisect from cPickle import HIGHEST_PROTOCOL, d...
gpl-3.0
7,835,012,755,277,714,000
44.85518
134
0.488934
false
4.09325
false
false
false
bytescout/ByteScout-SDK-SourceCode
PDF.co Web API/PDF Fill PDF Forms/Python/Fill PDF Forms Simplified/FillPDFForms.py
1
2904
import os import requests # pip install requests # The authentication key (API Key). # Get your own by registering at https://app.pdf.co/documentation/api API_KEY = "**********************************************" # Base URL for PDF.co Web API requests BASE_URL = "https://api.pdf.co/v1" # Direct URL of source PDF fi...
apache-2.0
-5,449,671,780,464,104,000
40.5
308
0.657025
false
3.713555
false
false
false
ActionAdam/osmc
package/mediacenter-addon-osmc/src/script.module.osmcsetting.updates/resources/lib/apt_cache_action.py
1
11742
''' This script is run as root by the osmc update module. ''' import apt import socket import sys from datetime import datetime import json import os import time import subprocess import traceback from CompLogger import comprehensive_logger as clog t = datetime class Logger(object): def __init__(self, filename="Def...
gpl-2.0
-4,620,404,637,077,849,000
23.160494
125
0.634219
false
3.268931
false
false
false
yueyoum/gstatus
gstatus.py
1
4136
# -*- coding: utf-8 -*- import re import sys import os import json import subprocess from xml.sax.saxutils import unescape try: import cStringIO as StringIO except ImportError: import StringIO from bottle import Bottle, run, static_file from jinja2 import Environment, FileSystemLoader from pygments import h...
mit
8,413,325,068,222,933,000
22.907514
86
0.601547
false
3.35987
false
false
false
fkorotkov/pants
src/python/pants/pantsd/watchman_launcher.py
1
4029
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging from...
apache-2.0
4,658,803,938,619,317,000
39.29
99
0.687764
false
4.041123
false
false
false
igrowing/Orchids
orchid_app/management/commands/runner.py
1
11265
#!/usr/bin/env python from __future__ import unicode_literals import os import re import time import django.core.exceptions from datetime import datetime, timedelta from threading import Thread from decimal import Decimal import paho.mqtt.subscribe as subscribe from django.core.management.base import BaseCommand imp...
mit
-1,352,453,078,105,427,200
44.240964
148
0.518154
false
4.173768
false
false
false
alphacsc/alphacsc
alphacsc/other/sdtw/barycenter.py
1
1860
# Author: Mathieu Blondel # License: Simplified BSD import numpy as np from scipy.optimize import minimize from sdtw import SoftDTW from sdtw.distance import SquaredEuclidean def sdtw_barycenter(X, barycenter_init, gamma=1.0, weights=None, method="L-BFGS-B", tol=1e-3, max_iter=50): """ ...
bsd-3-clause
-8,478,393,243,963,510,000
25.197183
78
0.599462
false
3.563218
false
false
false
ruibarreira/linuxtrail
usr/lib/python2.7/dist-packages/reportbug/checkversions.py
1
6898
# # checkversions.py - Find if the installed version of a package is the latest # # Written by Chris Lawrence <lawrencc@debian.org> # (C) 2002-08 Chris Lawrence # Copyright (C) 2008-2014 Sandro Tosi <morph@debian.org> # # This program is freely distributable per the following license: # ## Permission to use, cop...
gpl-3.0
-5,959,477,691,698,844,000
29.794643
87
0.620325
false
3.81105
false
false
false
borjam/exabgp
src/exabgp/bgp/message/update/attribute/origin.py
2
1719
# encoding: utf-8 """ origin.py Created by Thomas Mangin on 2009-11-05. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ from exabgp.bgp.message.update.attribute.attribute import Attribute # ===============================================================...
bsd-3-clause
5,328,723,355,995,210,000
24.656716
94
0.588133
false
3.704741
false
false
false
acbilson/forbidden-island
tests/playerservicetests.py
1
1508
import unittest import sys sys.path.append('../src') from island import * from service_island import * from service_player import * from islandbus import * from constants import * from message import * from cards import * import sys from iofactory import * from playerfactory import * from tiles import * class TestPlay...
gpl-3.0
7,529,739,578,610,399,000
28.568627
120
0.730106
false
3.723457
true
false
false
slremy/cloudroboticsreferences
processbibtex.py
1
2266
from sys import exc_info, argv import pandas as pd from pybtex.database.input import bibtex as bibtex_in import textwrap bibparser = bibtex_in.Parser() d=[] for bibfile in argv[1:]: #bib=bibparser.parse_file(bibfile) with open(bibfile) as f: raw = f.read() f.close() bib=bibparser.parse_str...
apache-2.0
2,383,310,921,888,308,000
36.766667
153
0.652692
false
3.377049
false
false
false
pebble/spacel-provision
src/spacel/provision/changesets.py
1
3695
import logging logger = logging.getLogger('spacel') # These could always use tuning: COSTS = { 'AWS::AutoScaling::AutoScalingGroup': { 'Add': 2, 'Modify': 300, 'Remove': 2 }, 'AWS::AutoScaling::LaunchConfiguration': { 'Add': 2, 'Modify': 2, 'Remove': 2 }...
mit
6,241,463,731,857,132,000
22.83871
73
0.458728
false
3.840956
false
false
false
SeVenOPS/CFM-Project
ClientSide/#OldReactor.py
1
1621
import SocketServer import subprocess import sys from threading import Thread import time import sqlite3 dbcon = sqlite3.connect("./Compile/dbfile.sqlite", check_same_thread = False) dbcon.isolation_level = None dbcur = dbcon.cursor() dbcon.row_factory = sqlite3.Row dbcon.text_factory = str HOST = '176.53.113.223' PO...
apache-2.0
-6,648,381,212,443,176,000
28.472727
172
0.607033
false
3.562637
false
false
false
viswimmer1/PythonGenerator
data/python_files/28566063/ws.py
1
1270
import cookielib, socket, urllib, urllib2, urllib, sys from urllib import urlretrieve from shutil import copyfile from .views.SubscriptsViews import getIntereses from twisted.internet import reactor from twisted.python import log import json, os import pickle import threading from autobahn.websocket import WebSocketSe...
gpl-2.0
-2,534,047,227,258,700,300
20.913793
73
0.712598
false
3.128079
false
false
false
arvidfm/masters-thesis
src/features.py
1
11702
# Copyright (C) 2016 Arvid Fahlström Myrman # # 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 the License, or # (at your option) any later version. # # This program is distr...
gpl-2.0
7,318,891,887,492,125,000
33.014535
89
0.617041
false
3.600308
false
false
false
vootelerotov/CTT-reliability-estimates
tests/lambda_2_test.py
1
2349
''' Created on Aug 5, 2013 @author: Voss ''' import sys sys.path.append('../python2') import unittest import logging import lambda_2 import numpy as np class Test(unittest.TestCase): @classmethod def setUpClass(cls): logging.basicConfig(filename="./test_log.log", ...
mit
7,359,208,791,154,483,000
44.098039
224
0.539378
false
2.744159
true
false
false
vkscool/nupic
nupic/swarming/HypersearchV2.py
1
169328
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gpl-3.0
-6,840,123,944,068,782,000
41.110918
95
0.620417
false
4.486936
false
false
false
ccpgames/pypicloud-tools
pypicloud_tools/__init__.py
1
9315
"""Contstants and helpers common to multiple operations.""" from __future__ import print_function import os import sys import boto import argparse import datetime import operator import pkg_resources from collections import namedtuple from pip.utils import SUPPORTED_EXTENSIONS from boto.exception import NoAuthHandle...
mit
-1,410,663,693,755,735,800
27.928571
79
0.593666
false
3.827034
true
false
false
walterjabo/RPI_LCD_Transmission_Monitor
torrents.py
1
1106
#!/usr/bin/python from Adafruit_CharLCD import Adafruit_CharLCD from subprocess import * from time import sleep, strftime from datetime import datetime import transmissionrpc lcd = Adafruit_CharLCD() cmd = "ip addr show wlan0 | grep inet | awk '{print $2}' | cut -d/ -f1" lcd.begin(16, 2) def run_cmd(cmd): p =...
gpl-2.0
8,548,548,404,915,456,000
21.12
105
0.673599
false
2.633333
false
false
false
fvcproductions/dotfiles
bin/alfred/Alfred.alfredpreferences/workflows/user.workflow.DEDF5652-6FEF-4776-80D8-ACEDF577D06A/release.py
1
2355
import sys import urllib2 import json import os GITHUB_USER = 'jeeftor' GITHUB_REPO = 'EmojiTaco' ''' Requires you have a github access token as specified below in your home director ''' # Read github access token outof ~/.github_access_token from os.path import expanduser home = expanduser("~") token_file = home +...
mit
1,539,996,446,428,196,600
23.789474
109
0.698938
false
3.003827
false
false
false
antonyrp/teach-acsl
contest4/acsl_numble.py
1
4242
## Antony Philip - 04/02/2016 - Developed for ACSL teaching ## ACSL 2013-2014 - ACSL NUMBLE """ This is an interesting problem which involves backtracking/recursion and greedy approach First I sort the given n numbers so that we can find the maximum possible sum of given length r which is a multiple of...
mit
806,462,668,560,513,000
42.731959
120
0.619283
false
4.090646
false
false
false
PaulMcMillan/2014_defcon_timing
hue/vis3.py
1
4234
import matplotlib.pyplot as plt from collections import defaultdict from itertools import combinations from pprint import pprint from scipy import stats import random from itertools import chain class QueryResponse(object): """Class to make it easier to work with parsed data. Works with everything natively in...
bsd-2-clause
-4,668,456,046,142,274,000
29.905109
85
0.573925
false
3.315583
false
false
false
FunTimeCoding/directory-tools
setup.py
1
1432
#!/usr/bin/env python3 from setuptools import setup, find_packages setup( name='directory-tools', version='0.1.0', description='Manage OpenLDAP users and groups.', url='https://github.com/FunTimeCoding/directory-tools', author='Alexander Reitzel', author_email='funtimecoding@gmail.com', lic...
mit
6,691,615,528,217,709,000
33.926829
79
0.60405
false
4.211765
false
true
false
SheepDogInc/sheepdog_tables
sheepdog_tables/templatetags/urlbuilder.py
1
1968
from django import template from django.core.urlresolvers import reverse register = template.Library() """ urlbuilder is a template tag that takes a TableRowURL object and an object to get data from, like a Participant or Connector. It builds a list of arguments from the args parameter as found in TableRowURL. For e...
bsd-3-clause
-6,577,632,244,761,753,000
30.238095
80
0.643801
false
4.117155
false
false
false
jhpyle/docassemble
docassemble_demo/docassemble/demo/alembic/env.py
1
2127
from __future__ import with_statement from logging.config import fileConfig from sqlalchemy import engine_from_config from sqlalchemy import pool from alembic import context import json # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config #...
mit
-1,788,559,162,752,157,400
25.924051
69
0.706159
false
4.043726
true
false
false
guangyingjiang/Mapping_and_Navigation
src/select_goals.py
1
2622
#!/usr/bin/env python ###################################################################################### # --- selecte_goals.py Version 1.0 # --- This module read and display selected goals on the map. # --- # --- 11/02/16 GYJ Initial coding. ######################################################...
gpl-3.0
8,439,585,836,310,511,000
33.973333
95
0.598398
false
3.318987
false
false
false
Kobzol/debug-visualizer
debugger/lldbc/lldb_breakpoint_manager.py
1
2794
# -*- coding: utf-8 -*- # # Copyright (C) 2015-2016 Jakub Beranek # # This file is part of Devi. # # Devi 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, version 3 of the License, or # (at yo...
gpl-3.0
-1,981,503,231,332,240,600
31.870588
76
0.64388
false
4.127031
false
false
false
cdeboever3/WASP
CHT/chromstat.py
1
4416
import sys import numpy as np import genome.db class ChromStats(object): def __init__(self): self.n = 0 self.n_nan = 0 self.sum = 0 self.min = None self.max = None def mean(self): """Calculates mean of sites that are not nan on this chromsome""" ...
apache-2.0
-6,585,973,737,630,896,000
28.245033
75
0.519248
false
3.742373
false
false
false
speendo/Photocell
photocell.py
1
2727
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'marcel' import threading import os import select import time import atexit class CheckLight(threading.Thread): def __init__(self, light_on_method, light_off_method, pin=24, waiting_time=0.5): threading.Thread.__init__(self) self.pin_number = pin ...
gpl-2.0
9,150,732,193,831,011,000
35.36
120
0.686102
false
3.016593
false
false
false
open-synergy/runbot-addons
runbot_secure/__openerp__.py
1
1544
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Management Solution # This module copyright (C) 2010 - 2014 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/...
agpl-3.0
-1,551,203,393,975,892,200
34.090909
78
0.599093
false
3.979381
false
false
false
southampton/unimatrix
deskctl/app.py
1
5053
#!/usr/bin/python # -*- coding: utf-8 -*- import os import os.path from flask import Flask, request, session, abort, g, render_template, url_for import logging import binascii import datetime class DeskCtlFlask(Flask): config_file = '/usr/lib/deskctl/deskctl.conf' class FatalError(Exception): pass class Daemon...
gpl-3.0
-4,498,089,863,996,088,300
31.6
113
0.622007
false
3.742963
true
false
false
sniemi/SamPy
sandbox/src1/examples/interactive2.py
1
10393
#!/usr/bin/env python # GTK Interactive Console # (C) 2003, Jon Anderson # See www.python.org/2.2/license.html for # license details. # import gtk import gtk.gdk import code import os, sys import pango import __builtin__ import __main__ banner = """GTK Interactive Python Console Thanks to Jon Anderson %s """ %...
bsd-2-clause
-2,978,916,656,849,842,700
26.494709
106
0.638507
false
3.321508
false
false
false
levi-rs/gifted
gifted/cli.py
1
1486
import os import argparse from gifted.gifted import load_images, write_gif # Strings PNG = 'PNG' png = 'png' JPG = 'JPG' jpg = 'jpg' GIF = 'GIF' gif = 'gif' OUTPUT_FILE = "output.gif" DEFAULT_DURATION = 0.2 def get_args(): """ Parses command line arguments """ parser = argparse.ArgumentParser() ...
bsd-3-clause
3,649,467,000,269,699,000
21.179104
80
0.603634
false
3.463869
false
false
false
tswast/google-cloud-python
billingbudgets/google/cloud/billing_budgets_v1beta1/types.py
1
1563
# -*- coding: utf-8 -*- # # Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
6,767,624,625,924,204,000
32.255319
74
0.731926
false
3.504484
false
false
false
terasaur/seedbank
src/seedbank/messaging/server_control_handler.py
1
3657
# # Copyright 2012 ibiblio # # 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.txt # # Unless required by applicable law or agreed to in writing...
apache-2.0
5,971,937,317,664,378,000
42.023529
128
0.648346
false
4.113611
false
false
false
sigmunau/nav
tests/unittests/arnold/arnold_test.py
1
1070
"""Basic tests for nav.arnold""" import unittest from nav.arnold import find_input_type class TestArnold(unittest.TestCase): """Tests for nav.arnold""" def test_find_input_type(self): """Test find_input_type""" ip_address = '158.38.129.113' mac = '5c:f9:dd:78:72:8a' self.assert...
gpl-2.0
-2,306,070,185,254,072,300
33.516129
68
0.630841
false
3.232628
true
false
false
sherpya/archiver
utils.py
1
3927
#!/usr/bin/env python # -*- Mode: Python; tab-width: 4 -*- # # Netfarm Mail Archiver - release 2 # # Copyright (C) 2005-2007 Gianluigi Tiesi <sherpya@netfarm.it> # # 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 Sof...
gpl-2.0
-4,113,292,646,432,418,000
30.416
82
0.583142
false
3.622694
false
false
false
MechanisM/djangodash2011
test_project/test_app/urls.py
1
1313
from django.conf.urls.defaults import * from staste.charts.views import PieChart, TimeserieChart, LatestCountAndAverageChart from staste.middleware import response_time_metrica from .views import IndexView from .metrics import gender_age_metrica urlpatterns = patterns('', url(r'^$', IndexView...
bsd-3-clause
8,659,286,452,042,558,000
41.354839
112
0.471439
false
5.030651
false
true
false
alexeyshulzhenko/OBDZ_Project
OnlineAgecy/views.py
1
18388
#!python #OnlineAgesy/views.py from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from .forms import * @login_required(login_url="login/") def home(request): return render(request, "static_pages/home.html") #--------------------Clients Views--...
gpl-3.0
-6,328,619,585,197,924,000
38.461373
416
0.637753
false
3.601253
false
false
false
dbmi-pitt/DIKB-Micropublication
scripts/mp-scripts/Bio/Geo/__init__.py
1
2770
# Copyright 2001 by Katharine Lindner. All rights reserved. # Copyright 2006 by PeterC. All rights reserved. # Copyright 2007 by Michiel de Hoon. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part...
apache-2.0
-817,326,445,066,471,700
32.373494
145
0.57509
false
4.134328
false
false
false
svenstaro/uni-projekt
assembler/operations/pseudoOperation.py
1
2713
from ..operands import Zero, Register, AluOperand2, Opcodes, Const from .operation import Operation from .jumpOperation import JumpOperation from .aluOperation import AluOperation, AluSOperation import re def PseudoOperations(): class PseudoOperation(Operation): underlyingType = None pseudo = "" ...
gpl-3.0
3,973,601,288,656,858,600
31.686747
85
0.537044
false
3.588624
false
false
false
dmrsouza/json2kml
json2kml.py
1
1803
##################################################################################### # Python script to convert Google Maps JSON file to a KML file # Copyright (C) 2017 Dimitri Souza # https://github.com/dmrsouza/json2kml ##################################################################################### # This...
gpl-3.0
-2,344,173,037,282,680,000
32.673077
85
0.54132
false
4.242353
false
false
false
mcgraw-bb25/site-quality-crawler
crawler/crawler.py
1
4832
import time import argparse from urllib.parse import urljoin from bs4 import BeautifulSoup from crawler.page_request import PageRequest from crawler.page_report import PageReport from crawler.report_builder import ReportBuilder class Crawler(object): ''' The main crawler object that the user interacts with ...
bsd-2-clause
24,238,746,664,563,644
29.974359
84
0.56726
false
4.115843
false
false
false
qedsoftware/commcare-hq
corehq/apps/userreports/reports/view.py
1
19536
import json import os import tempfile from StringIO import StringIO from corehq.apps.domain.views import BaseDomainView from corehq.apps.reports.util import \ DEFAULT_CSS_FORM_ACTIONS_CLASS_REPORT_FILTER from corehq.apps.style.decorators import ( use_select2, use_daterangepicker, use_jquery_ui, use_...
bsd-3-clause
7,399,060,679,144,329,000
33.21366
109
0.609285
false
4.068305
true
false
false
jnvandermeer/PythonFeedback
Thermo/Thermo.py
1
6111
# we use pygame for our nice little thermometer! import pygame # let's try it... class Thermo(object): """ So... this class displays, using pygame, a nice thermometer on the screen. You can set the height of the thing as a percentage, using: set_percentage(some percentage) This is really just as s...
gpl-2.0
-3,218,809,404,950,575,600
34.12069
116
0.62412
false
3.870171
false
false
false
iamrajhans/FlaskBackend
migrations/versions/8eba94c1838c_.py
1
1094
"""empty message Revision ID: 8eba94c1838c Revises: 59b25a9d6e7b Create Date: 2017-02-24 00:38:20.074565 """ # revision identifiers, used by Alembic. revision = '8eba94c1838c' down_revision = '59b25a9d6e7b' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
mit
-4,994,312,549,992,917,000
29.388889
66
0.680987
false
3.305136
false
false
false
punitvara/zephyr
scripts/gen_kobject_list.py
1
8899
#!/usr/bin/env python3 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 import sys import argparse import math import os import struct from elf_helper import ElfHelper, kobject_to_enum # Keys in this dictionary are structs which should be recognized as kernel # objects. Values should e...
apache-2.0
8,422,010,048,923,392,000
27.986971
116
0.589167
false
3.327973
true
false
false
habnabit/theresa-bot
twits.py
1
8827
# Copyright (c) Aaron Gallagher <_@habnab.it> # See COPYING for details. "I HATE TWITTER" from twisted.application.service import Service from twisted.protocols.policies import TimeoutMixin from twisted.web.http_headers import Headers from twisted.protocols.basic import LineOnlyReceiver from twisted.internet.error imp...
isc
4,725,299,947,152,811,000
36.244726
106
0.656282
false
4.191358
false
false
false
rcarmo/crab
scikits/crab/recommenders/knn/tests/test_item_strategies.py
1
3263
import numpy as np from numpy.testing import assert_array_equal from nose.tools import assert_raises from scikits.crab.models.classes import MatrixPreferenceDataModel from scikits.crab.recommenders.knn.item_strategies import ItemsNeighborhoodStrategy, AllPossibleItemsStrategy from scikits.crab.models.utils import User...
bsd-3-clause
6,464,256,378,812,769,000
44.957746
123
0.709776
false
3.125479
false
false
false
matrumz/RPi_Custom_Files
Printing/hplip-3.15.2/ui/setupform_base.py
1
26342
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui/setupform_base.ui' # # Created: Thu Sep 20 11:45:16 2007 # by: The PyQt User Interface Compiler (pyuic) 3.17 # # WARNING! All changes made in this file will be lost! from qt import * class SetupForm_base(QWizard): def __init_...
gpl-2.0
80,808,447,214,767,820
47.781481
317
0.738289
false
3.646456
true
false
false
bytedance/fedlearner
fedlearner/common/dfs_client.py
1
5157
# Copyright 2021 The FedLearner Authors. 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 required by applica...
apache-2.0
6,400,063,321,914,510,000
34.565517
78
0.54935
false
4.092857
false
false
false
lseman/pylspm
pylspm/bootstraping.py
1
4635
# EFRON, B.; TIBSHIRANI, R. J. An Introduction to the Bootstrap. 1993. import pandas import numpy as np from numpy import inf import pandas as pd import scipy.stats from scipy.stats import norm from .pylspm import PyLSpm from .boot import PyLSboot def bootstrap(nrboot, cores, data_, lvmodel, ...
mit
4,771,311,085,366,402,000
33.381679
100
0.486731
false
3.474513
false
false
false
joopert/home-assistant
homeassistant/components/bluetooth_tracker/device_tracker.py
1
5963
"""Tracking for bluetooth devices.""" import asyncio import logging from typing import List, Set, Tuple, Optional # pylint: disable=import-error import bluetooth from bt_proximity import BluetoothRSSI import voluptuous as vol from homeassistant.components.device_tracker import PLATFORM_SCHEMA from homeassistant.compo...
apache-2.0
-5,821,608,202,752,087,000
30.550265
115
0.64917
false
3.884691
true
false
false
mtury/scapy
scapy/layers/tls/crypto/suites.py
1
30034
# This file is part of Scapy # Copyright (C) 2007, 2008, 2009 Arnaud Ebalard # 2015, 2016, 2017 Maxence Tury # This program is published under a GPLv2 license """ TLS cipher suites. A comprehensive list of specified cipher suites can be consulted at: https://www.iana.org/assignments/tls-parameters/tls-p...
gpl-2.0
2,971,043,887,224,793,000
21.770281
98
0.689718
false
2.773735
false
false
false
nexdatas/recselector
test/TestPool2SetUp.py
1
5146
#!/usr/bin/env python # This file is part of nexdatas - Tango Server for NeXus data writer # # Copyright (C) 2012-2014 DESY, Jan Kotanski <jkotan@mail.desy.de> # # nexdatas is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
gpl-3.0
4,812,012,494,212,713,000
30.765432
73
0.536922
false
4.036078
true
false
false
ARamsey118/Reverse-Javadoc
ReverseDoc.py
1
6710
#!/usr/bin/python3 from bs4 import BeautifulSoup import ClassName import Fields import Method import Constructor class Comment(): """ comment stores a comment for later printing """ def __init__(self, indent): """ Make a new instance of the comment class attributes: ...
mit
-2,180,981,688,187,114,000
33.234694
125
0.625037
false
4.054381
false
false
false
feureau/Small-Scripts
Blender/Blender config/2.91/scripts/addons/assemblme_v1-4-0/functions/common/color_effects.py
1
13577
# Author: Christopher Gearhart # System imports from numba import cuda, jit, prange import numpy as np from colorsys import rgb_to_hsv, hsv_to_rgb # Blender imports # NONE! # Module imports # from .color_effects_cuda import * from .images import * def initialize_gradient_texture(width, height, quadratic=False): ...
gpl-3.0
4,217,206,529,779,193,300
37.902579
112
0.574133
false
3.292192
false
false
false
amitsaha/apigatewaydemo
webapp-1/app2.py
1
2163
#!/usr/bin/env python # Reflects the requests from HTTP methods GET, POST, PUT, and DELETE # Written by Nathan Hamiel (2010) # Copied from https://gist.github.com/huyng/814831 from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler from optparse import OptionParser import consulate import os import signal impor...
mit
-7,872,632,249,936,792,000
27.090909
92
0.606103
false
3.876344
false
false
false
FuelCellUAV/FC_datalogger
quick2wire/quick2wire/i2c_ctypes.py
1
1711
# Warning: not part of the published Quick2Wire API. # # Converted from i2c.h and i2c-dev.h # I2C only, no SMB definitions from ctypes import c_int, c_uint16, c_ushort, c_short, c_char, POINTER, Structure # /usr/include/linux/i2c-dev.h: 38 class i2c_msg(Structure): """<linux/i2c-dev.h> struct i2c_msg""" _fie...
cc0-1.0
2,400,107,093,059,200,000
29.553571
81
0.665108
false
2.49781
false
false
false
cyanfish/heltour
heltour/tournament/tasks.py
1
26748
from heltour.tournament.models import * from heltour.tournament import lichessapi, slackapi, pairinggen, \ alternates_manager, signals, uptime from heltour.celery import app from celery.utils.log import get_task_logger from datetime import datetime from django.core.cache import cache from heltour import settings im...
mit
-4,893,947,234,258,996,000
45.518261
131
0.606999
false
3.810799
false
false
false
mr-tim/sandpit
sandpit_app/webapp/admin.py
1
1110
from flask import Blueprint, redirect, render_template import json import docker import security admin = Blueprint('admin', __name__) @admin.route('/admin') @security.logged_in @security.admin def admin_home(): images = sorted(docker.images(), key=lambda i: i['repository']) processes = sorted(docker.ps(), ke...
mit
6,534,282,961,573,552,000
29.833333
97
0.725225
false
3.37386
false
false
false
stonebig/numba
numba/core/errors.py
1
22392
""" Numba-specific errors and warnings. """ import abc import contextlib import os import sys import warnings import numba.core.config import numpy as np from collections import defaultdict from numba.core.utils import chain_exception from functools import wraps from abc import abstractmethod # Filled at the end __a...
bsd-2-clause
-8,959,926,455,638,270,000
28.501976
100
0.610129
false
4.268395
false
false
false
spradeepv/dive-into-python
hackerrank/domain/algorithms/sorting/correctness-loop-invariant.py
1
2946
""" Problem Statement In the previous challenge, you wrote code to perform an Insertion Sort on an unsorted array. But how would you prove that the code is correct? I.e. how do you show that for any input your code will provide the right output? Loop Invariant In computer science, you could prove it formally with a l...
mit
7,067,585,179,489,689,000
30.340426
76
0.741005
false
3.757653
false
false
false
our-city-app/oca-backend
src/solutions/common/bizz/city_vouchers.py
1
3297
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
apache-2.0
3,162,790,153,654,418,000
39.703704
121
0.715499
false
3.687919
false
false
false
choderalab/openpathsampling
openpathsampling/pathsimulators/path_simulator.py
1
3675
import abc import sys import logging from future.utils import with_metaclass import openpathsampling as paths from openpathsampling.netcdfplus import StorableNamedObject, StorableObject from ..ops_logging import initialization_logging logger = logging.getLogger(__name__) init_log = logging.getLogger('openpathsampli...
lgpl-2.1
-4,037,917,422,712,159,700
29.122951
76
0.623129
false
4.525862
false
false
false
guitarmanusa/metau
metau_lib/AboutDialog.py
1
1914
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2013 <Kyle Francis> <guitarman_usa@yahoo.com> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free...
gpl-3.0
8,972,623,279,978,186,000
38.875
76
0.691745
false
4.151844
false
false
false
butala/pyrsss
pyrsss/signal/convmtx.py
1
6852
from __future__ import division import numpy as NP import scipy.linalg import scipy.signal import scipy.sparse as sparse from util import zero_pad class Convmtx(sparse.coo_matrix): def __new__(cls, n, H, mode='full'): """ Construct sparse convolution matrix to operate on vector of dimens...
mit
5,486,634,381,309,362,000
32.42439
82
0.484092
false
3.3246
false
false
false
OmkarPathak/pygorithm
pygorithm/data_structures/trie.py
1
3224
""" Author: MrDupin """ class Node: def __init__(self, v, p=None, w=False): self.word = w #If the node represents the end of a word or not self.parent = p self.value = v self.children = {} class Trie: def __init__(self): self.root = Node('') #The root of the trie is al...
mit
4,062,834,501,498,244,000
28.851852
79
0.526055
false
4.075853
false
false
false
liurenqiu520/AutobahnPython
examples/twisted/wamp/basic/client.py
1
3070
############################################################################### ## ## Copyright (C) 2011-2014 Tavendo GmbH ## ## 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 ## ## h...
apache-2.0
6,052,565,354,310,117,000
31.659574
132
0.640391
false
4.22865
false
false
false
Ladsgroup/MP3-cleaner
mp3.py
1
1167
import fnmatch import os import eyed3 import shutil path_to_clean = u'/media/amir/Files/Download/' path_to_move = u'/media/amir/Files/Music/' matches = [] for root, dirnames, filenames in os.walk(path_to_clean): for filename in fnmatch.filter(filenames, u'*.mp3'): matches.append(os.path.join(root, filename)...
apache-2.0
-5,187,029,414,978,394,000
29.710526
70
0.520137
false
3.51506
false
false
false
aino/django-pgindex
pgindex/management/commands/reindex.py
1
1687
import pgindex import sys from django.core.management.base import BaseCommand, CommandError from django.utils.translation import ugettext as _ from optparse import make_option from pgindex.models import Index class Command(BaseCommand): help = _('Reindex for django-pgindex') option_list = BaseCommand.option_...
bsd-3-clause
4,848,674,826,842,466,000
34.145833
74
0.515708
false
4.584239
false
false
false
Spinmob/spinmob
_pylab_colormap.py
1
18278
import os as _os import matplotlib as _mpl import pylab as _pylab from functools import partial as _partial try: from . import _pylab_tweaks except: import _pylab_tweaks import spinmob as _s _qtw = _s._qtw _qt = _s._qt _qtcore = _s._qtc # make sure...
gpl-3.0
6,873,766,403,259,576,000
32.232727
175
0.55679
false
3.642487
false
false
false
jdemel/gnuradio
gnuradio-runtime/python/pmt/pmt_to_python.py
1
5374
# Copyright 2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # from __future__ import unicode_literals from . import pmt_python as pmt import numpy # SWIG isn't taking in the #define PMT_NIL; # getting the singleton locally. PMT_NIL = pmt.get_P...
gpl-3.0
6,369,554,458,698,232,000
41.992
153
0.653331
false
2.936612
false
false
false
informatik-mannheim/Moduro-CC3D
Simulation/SpaBpaPcdiInDa.py
1
1241
# Copyright 2016 the original author or authors. # # 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...
apache-2.0
2,450,295,381,788,317,700
33.472222
79
0.74859
false
3.495775
false
false
false
fredreichbier/genie
genie/slp/__init__.py
1
10209
""" A modular decoder for the SLP image format as used in the Genie engine. Thanks to http://alexander-jenkins.co.uk/blog/?p=9 and to http://www.digitization.org/wiki/index.php/SLP for the great documentation! """ import struct import construct as cons class FrameAdapter(cons.Adapter): def _decode(s...
bsd-2-clause
229,002,700,896,511,780
36.259124
104
0.50142
false
4.372163
false
false
false
passy/glashammer-rdrei
examples/notes/notes.py
1
2761
# -*- coding: utf-8 -*- """ glashammer.examples.notes ~~~~~~~~~~~~~~~~~~~~~~~~~ A simple note application. :copyright: 2010 Glashammer Developers :license: MIT """ from os.path import dirname from glashammer.application import make_app from glashammer.utils import run_very_simple, render_response from glashammer.bu...
mit
790,866,502,890,790,700
23.873874
75
0.659906
false
3.338573
false
false
false
hall1467/wikidata_usage_tracking
wbc_usage/utilities/entity_page_views.py
1
4539
""" Prints page views for each entity_aspect_wikidb. Merges page view and entity usage data. Usage: entity_page_views (-h|--help) entity_page_views <aggregated-entity-usage-file> --page-view-file=<location> [<dbname-file>] [--output=<location>] ...
mit
7,453,180,173,170,969,000
27.910828
80
0.544173
false
3.936687
false
false
false
irin4eto/Bar-Management
orders/migrations/0010_initial.py
1
3480
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'Stock' db.create_table('orders_stock', ( ('id...
gpl-3.0
-9,072,361,152,304,698,000
46.040541
122
0.568966
false
3.62878
false
false
false
devdattakulkarni/test-solum
solum/api/handlers/camp/assembly_handler.py
1
1647
# -*- coding: utf-8 -*- # # 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 to in writing, soft...
apache-2.0
-6,993,427,364,563,070,000
36.431818
75
0.684274
false
3.692825
false
false
false
appleseedhq/gaffer
python/GafferImageUI/FlatToDeepUI.py
1
4334
########################################################################## # # Copyright (c) 2017, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
bsd-3-clause
5,892,267,718,167,482,000
32.859375
125
0.695201
false
3.815141
false
false
false
danaukes/popupcad
dev_tools/hierarchy.py
2
4333
# -*- coding: utf-8 -*- """ Written by Daniel M. Aukes and CONTRIBUTORS Email: danaukes<at>asu.edu. Please see LICENSE for full license. """ #from pynamics.tree_node import TreeNode from dev_tools.acyclicdirectedgraph import Node,AcyclicDirectedGraph import random #import numpy #import yaml def level(connections): ...
mit
5,193,853,664,068,871,000
27.142857
85
0.603277
false
3.712939
false
false
false
maxive/erp
addons/stock/tests/test_stock_flow.py
1
107063
# -*- coding: utf-8 -*- from odoo.addons.stock.tests.common import TestStockCommon from odoo.tools import mute_logger, float_round from odoo.exceptions import UserError class TestStockFlow(TestStockCommon): @mute_logger('odoo.addons.base.models.ir_model', 'odoo.models') def test_00_picking_create_and_transfe...
agpl-3.0
2,654,378,991,845,158,400
58.446419
249
0.578258
false
3.799929
true
false
false
alriddoch/cyphesis
rulesets/basic/mind/goals/common/move.py
1
18663
#This file is distributed under the terms of the GNU General Public license. #Copyright (C) 1999 Aloril (See the file COPYING for details). from common import const from physics import * from physics import Vector3D from physics import Point3D from mind.Goal import Goal from mind.goals.common.common import * from ra...
gpl-2.0
-7,111,369,907,136,039,000
37.010183
95
0.530783
false
3.882463
false
false
false
vanant/googleads-dfa-reporting-samples
python/v2.1/create_advertiser_group.py
1
2002
#!/usr/bin/python # # Copyright 2014 Google Inc. 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 required b...
apache-2.0
-9,044,761,426,972,332,000
28.880597
77
0.701798
false
3.806084
false
false
false
hgschmie/presto
presto-docs/src/main/sphinx/conf.py
1
2451
# # 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 to in writing, software # distributed under ...
apache-2.0
5,452,581,341,700,879,000
21.906542
81
0.651163
false
3.486486
false
false
false