repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
ejfresch/qdc
taxi_driver.py
1
4234
#!/usr/bin/python # Copyright 2009-2012 - Luca Freschi <l.freschi@gmail.com> # This file is part of QDC. # QDC is free software: you can redistribute...
gpl-3.0
-4,987,247,999,163,791,000
28.816901
129
0.548181
false
3.740283
false
false
false
shuoli84/gevent_socketio2
socketio/binary.py
1
2907
# coding=utf-8 """ Binary class deconstruct, reconstruct packet """ import copy class Binary(object): @staticmethod def deconstruct_packet(packet): """ Replaces every bytearray in packet with a numbered placeholder. :param packet: :return: dict with packet and list of buffers ...
mit
-4,149,683,405,712,881,000
25.669725
71
0.471276
false
4.734528
false
false
false
SimpleITK/SimpleITK
Examples/ImageRegistrationMethodExhaustive/ImageRegistrationMethodExhaustive.py
4
4049
#!/usr/bin/env python # ========================================================================= # # Copyright NumFOCUS # # 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:/...
apache-2.0
3,926,961,951,353,954,300
35.809091
115
0.70289
false
3.454778
false
false
false
erwilan/ansible
lib/ansible/plugins/terminal/dellos6.py
5
2788
# 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible 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. # # Ansible is distri...
gpl-3.0
3,488,803,437,115,528,000
36.675676
126
0.628407
false
3.757412
false
false
false
zorna/zorna
zorna/site/urls.py
1
1743
from django.conf.urls.defaults import url, patterns from zorna.site import views urlpatterns = patterns('', url(r'^options/$', views.admin_list_options, name='admin_list_options'), url(r'^regist...
bsd-3-clause
5,005,190,076,417,932,000
50.264706
89
0.383247
false
5.829431
false
true
false
petersanchez/django-allauth
allauth/utils.py
1
7725
import re import unicodedata import json from django.core.exceptions import ImproperlyConfigured from django.core.validators import validate_email, ValidationError from django.core import urlresolvers from django.contrib.sites.models import Site from django.db.models import FieldDoesNotExist from django.db.models.fiel...
mit
-8,072,015,998,628,125,000
32.154506
79
0.621489
false
4.113419
false
false
false
branchard/django-react-scrapy-sample
djangoapp/components/migrations/0001_initial.py
1
7888
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-21 23:32 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
gpl-3.0
1,862,894,931,031,018,800
47.691358
200
0.574797
false
4.54902
false
false
false
doctaphred/projecteuler
projecteuler/problems/problem12.py
1
1814
# -*- coding: utf-8 -*- """ Project Euler: Problem 12 ========================= https://projecteuler.net/problem=12 Highly divisible triangular number ---------------------------------- The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 +...
gpl-3.0
85,330,717,630,826,640
21.121951
74
0.5871
false
3.023333
false
false
false
TeamspykBot/Plugins
Plugins/CommandHelp.py
1
2230
from operator import itemgetter from Bot.Plugins.Base import PluginBase class HelpCommandPlugin(PluginBase): """ This plugin sends a list of all available commands to the user when he types a certain command help - Sends a list of all available commands optional example json ( can be inserted in co...
gpl-3.0
-1,927,694,817,722,317,600
41.075472
132
0.560987
false
4.183865
false
false
false
jonparrott/gcloud-python
storage/google/cloud/storage/bucket.py
2
66912
# Copyright 2014 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 agreed to in writing, s...
apache-2.0
-8,911,138,920,853,945,000
35.66411
84
0.60058
false
4.391992
false
false
false
Yukarumya/Yukarum-Redfoxes
security/generate_mapfile.py
1
1861
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # This script processes NSS .def files according to the rules defined in # a comment at the top o...
mpl-2.0
3,943,185,764,499,847,700
36.979592
77
0.558302
false
4.210407
false
false
false
rackerlabs/pycon-workshop
pyrax/monitoring.py
1
3994
#!/usr/bin/env python import argparse import os import sys import pyrax pyrax.set_setting("identity_type", "rackspace") pyrax.set_credential_file(os.path.expanduser("~/.pyraxcreds")) cm = pyrax.cloud_monitoring auto = pyrax.autoscale def get_entity(ip): """Create or get an entity.""" entities = cm.list_en...
apache-2.0
-880,856,842,529,316,000
31.737705
78
0.619179
false
3.870155
false
false
false
jscott1989/happening
src/events/templatetags/tickets.py
2
2585
"""Template tags relating to tickets.""" from django import template import json register = template.Library() @register.filter() def has_tickets(user, event): """Return True if the user has tickets for this event.""" if user.is_authenticated(): return event.tickets.filter(user=user, cancelled=False...
mit
-5,112,925,305,039,460,000
29.77381
78
0.661122
false
3.661473
false
false
false
googleapis/googleapis-gen
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/types/customer_service.py
1
7684
# -*- 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
1,351,810,789,427,220,700
29.736
120
0.653826
false
4.326577
false
false
false
HenrikPoulsen/Json2Class
convert/py/generator.py
1
5455
import re from convert.base.generator import BaseGenerator from convert.base.parsedobject import * import datetime class Generator(BaseGenerator): def _generate_default_constructor(self): if self.data.type == ParsedObjectType.Enum: return "" constructor = " def __init__(self):\n" ...
mit
-1,390,719,304,453,153,000
42.301587
129
0.519707
false
3.893647
false
false
false
LuoZijun/solidity-sc2-replay-reader
solidity.py
1
5965
#!/usr/bin/env python #coding: utf8 import os, sys, json BASE_PATH = os.path.dirname(os.path.abspath(__file__)) # Solc Compiler SOLC = "solc" build_dir = os.path.join(BASE_PATH, "build") src_dir = os.path.join(BASE_PATH, "src") dst_dir = os.path.join(BASE_PATH, "build/src") bin_dir = os.path.join(BASE_PATH, "buil...
gpl-3.0
1,277,137,600,390,265,900
34.295858
140
0.57435
false
3.142782
false
false
false
bert/geda-gaf
xorn/src/python/base64.py
1
7731
# xorn.geda - Python library for manipulating gEDA files #********************************************************************** # _ _ __ _ _ # __ _ _ __ ___| |_ | |__ __ _ ___ ___ / /_ | or | # / _` | '_ \ / _ \ __| | '_ \ / _` / __|/ _ \ '_ \| or |_ # | (_| | | | ...
gpl-2.0
-3,761,338,956,071,024,000
34.95814
80
0.542621
false
3.164552
false
false
false
leigh123linux/cinnamon-screensaver
src/stage.py
1
36783
#!/usr/bin/python3 import gi gi.require_version('CDesktopEnums', '3.0') from gi.repository import Gtk, Gdk, CScreensaver, CDesktopEnums, GObject import random import status import constants as c import singletons from monitorView import MonitorView from unlock import UnlockDialog from clock import ClockWidget from a...
gpl-2.0
449,252,281,052,089,700
35.061765
157
0.558764
false
4.489016
false
false
false
lasa/website
app/post.py
1
3761
import time import datetime from app import db, utils from app.models import Post, Message from flask import redirect, request from flask_login import current_user from flask_wtf import Form from wtforms import validators, StringField, TextAreaField, HiddenField class NewPostForm(Form): title = StringField('Titl...
agpl-3.0
-3,114,586,670,228,496,000
27.492424
109
0.616325
false
3.709073
false
false
false
Weiya-CF/reco_gesture
dataAcquisition.py
1
4190
from recoDataStructure import * class DataReceiver: """This class helps us to read data into the program. During the training stage, it can read data from file and during recognition stage, it can get real time tracking data and pass it to the Feature Extraction module.""" def __init__(...
mit
-8,908,244,186,650,463,000
32.52
96
0.553222
false
3.428805
false
false
false
vaporry/pydevp2p
devp2p/crypto.py
1
9987
#!/usr/bin/python CIPHERNAMES = set(('aes-128-ctr',)) import os import sys if sys.platform not in ('darwin',): import pyelliptic else: # FIX PATH ON OS X () # https://github.com/yann2192/pyelliptic/issues/11 _openssl_lib_paths = ['/usr/local/Cellar/openssl/'] for p in _openssl_lib_paths: if...
mit
-468,143,978,608,255,500
31.009615
98
0.603685
false
3.38887
false
false
false
aanunez/tortilla8
tortilla8/instructions.py
1
8266
#!/usr/bin/env python3 from random import randint from . import EmulationError from .constants.reg_rom_stack import STACK_ADDRESS, STACK_SIZE from .constants.graphics import GFX_FONT_ADDRESS, GFX_RESOLUTION, GFX_ADDRESS, \ GFX_WIDTH, GFX_HEIGHT_PX, GFX_WIDTH_PX, \ ...
gpl-3.0
-7,325,783,240,247,029,000
37.092166
118
0.594967
false
2.673351
false
false
false
cinayc/crawler
crawler/pipelines.py
1
2611
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html import scrapy import pymysql import hashlib from scrapy.exceptions import DropItem class CrawlerPipeline(object): def __i...
unlicense
7,208,958,898,935,078,000
31.6375
122
0.561854
false
3.29256
false
false
false
daira/zcash
qa/zcash/updatecheck.py
3
16150
#!/usr/bin/env python3 # # This script checks for updates to zcashd's dependencies. # # The SOURCE_ROOT constant specifies the location of the zcashd codebase to # check, and the GITHUB_API_* constants specify a personal access token for the # GitHub API, which need not have any special privileges. # # All dependencies...
mit
-5,905,578,815,122,862,000
38.583333
146
0.579009
false
3.776011
true
false
false
lyoshida/conference-central
main.py
1
2418
#!/usr/bin/env python """ main.py -- Udacity conference server-side Python App Engine HTTP controller handlers for memcache & task queue access $Id$ created by wesc on 2014 may 24 """ __author__ = 'wesc+api@google.com (Wesley Chun)' import webapp2 from google.appengine.api import app_identity from google.appe...
apache-2.0
4,636,045,090,729,896,000
32.123288
96
0.648056
false
3.86262
false
false
false
imincik/medobs
medobs/reservations/views.py
1
14838
import json from datetime import datetime, date, time, timedelta from view_utils import get_offices, get_reservations_data, is_reservation_on_date from view_utils import send_reservation_notification, send_reschedule_notificaion, send_cancel_notificaion from django.conf import settings from django.contrib.auth.decorat...
gpl-3.0
-6,299,085,958,533,279,000
29.530864
109
0.707845
false
3.236205
false
false
false
informatics-isi-edu/hatrac
hatrac/model/storage/filesystem.py
1
8769
# # Copyright 2015-2019 University of Southern California # Distributed under the Apache License, Version 2.0. See LICENSE for more info. # """Filesystem-backed object bulk storage for Hatrac. This module handles only low-level byte storage. Object and object-version lifecycle and authorization is handled by the cal...
apache-2.0
-6,930,290,742,175,459,000
32.342205
110
0.542707
false
4.360517
false
false
false
Shaffi08/yowsup
yowsup/layers/protocol_contacts/protocolentities/notificiation_contacts_sync.py
59
1237
from yowsup.structs import ProtocolTreeNode from .notification_contact import ContactNotificationProtocolEntity class ContactsSyncNotificationProtocolEntity(ContactNotificationProtocolEntity): ''' <notification from="4917667738517@s.whatsapp.net" t="1437251557" offline="0" type="contacts" id="4174521704"> ...
gpl-3.0
-5,041,676,321,133,361,000
41.689655
113
0.709782
false
4.221843
false
false
false
vtemian/kruncher
crunch/jobs/add.py
1
2347
import sys import rethinkdb as r from disco.core import Job import csv class GroupSum(Job): def __init__(self, group_by, fields, *args, **kwargs): self.group_by = int(group_by) self.fields = map(int, fields) super(GroupSum, self).__init__(*args, **kwargs) @staticmethod def map_reader(fd, size, url...
apache-2.0
5,782,297,061,048,121,000
25.370787
85
0.585428
false
3.282517
false
false
false
openstack/octavia
octavia/tests/unit/common/sample_configs/sample_configs_split.py
1
42888
# Copyright 2014 OpenStack Foundation # # 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,750,399,087,215,040,000
36.9876
79
0.562162
false
3.49792
false
false
false
fossilet/6.00x
week8/lecture15/L15P5/histogramfun.py
1
1308
import pylab WORDLIST_FILENAME = "words.txt" def loadWords(): """ Returns a list of valid words. Words are strings of lowercase letters. Depending on the size of the word list, this function may take a while to finish. """ print "Loading word list from file..." # inFile:...
mit
-5,151,276,438,908,687,000
28.418605
74
0.630734
false
3.726496
false
false
false
redapple/sketchtml
sketchtml/lzw.py
1
1198
import binascii def fingerprint(tokens, dict_limit=25, token_limit=None, debug=False): ''' Paper: "Locality Sensitive Hashing for Scalable Structural Classification and Clustering of Web Documents" Hachenberg, Christian; Gottron, Thomas (2013) https://west.uni-koblenz.de/de/forschung/datensaetze/...
mit
-7,910,488,060,922,732,000
26.860465
75
0.583472
false
3.708978
false
false
false
aselle/tensorflow
tensorflow/compiler/tests/rmsprop_test.py
5
5189
# Copyright 2017 The TensorFlow 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
4,907,214,135,932,618,000
38.310606
80
0.564849
false
3.706429
true
false
false
humenda/GladTeX
gleetex/parser.py
1
2397
# (c) 2013-2018 Sebastian Humenda # This code is licenced under the terms of the LGPL-3+, see the file COPYING for # more details. """Top-level API to parse input documents. The main point of the parsing is to extract formulas from a given input document, while preserving the remaining formatting. The returned parsed ...
lgpl-3.0
1,394,008,949,783,631,000
34.220588
84
0.68142
false
4.094017
false
false
false
Arvedui/picuplib
picuplib/checks.py
1
3800
# -*- coding:utf8 -*- # ####################### BEGIN LICENSE BLOCK ######################## # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at yo...
lgpl-2.1
927,483,443,651,689,300
33.862385
92
0.627895
false
4.418605
false
false
false
Xeralux/tensorflow
tensorflow/contrib/eager/python/checkpointable_utils_test.py
1
55336
# Copyright 2017 The TensorFlow 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
-1,253,107,922,935,844,900
43.988618
80
0.683533
false
3.760772
true
false
false
walletmona/coinunifier
script/unify_coins_simple.py
1
3723
#!/usr/bin/env python import sys from optparse import OptionParser from bisect import bisect_left, bisect_right from coinunifier.wallet.factory import load_wallet ## ## Process arguments ## USAGE = '''' % unify_coins_simple.py [OPTIONS] KIND THRESHOLD ADDRESS KIND: kind of coin (e.g. bitcoin, litecoin, ...) TH...
gpl-2.0
6,460,143,289,946,502,000
26.375
80
0.607037
false
3.223377
false
false
false
cloudify-cosmo/cloudify-plugins-common
cloudify/workflows/tasks.py
1
29721
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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...
apache-2.0
-3,218,372,813,292,323,300
35.467485
79
0.573635
false
4.565438
false
false
false
p-ho/emailIdx
emailidx/contentfilter/SMimeDecryption.py
1
3901
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # emailIdx - Synchronizes emails from IMAP to Elasticsearch # Copyright (C) 2015 Paul Hofmann # # 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 Softwar...
gpl-3.0
1,187,557,389,535,473,200
43.83908
125
0.524737
false
4.339266
false
false
false
itsnotmyfault1/kimcopter2
crazyflie-pc-client/lib/cfclient/ui/dialogs/about.py
3
2518
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
gpl-2.0
8,543,637,364,166,004,000
32.131579
82
0.560763
false
3.416554
false
false
false
airilyan/nescient
nescient/crypto/galois.py
2
10839
# Nescient: A Python program for packing/unpacking encrypted, salted, and authenticated file containers. # Copyright (C) 2018 Ariel Antonitis. Licensed under the MIT license. # # nescient/crypto/galois.py """ Classes for creating and interacting with Galois fields (otherwise known as finite fields) A galois field of o...
mit
-5,047,232,777,198,569,000
39.144444
120
0.548021
false
3.774025
false
false
false
hkkwok/MachOTool
mach_o/non_headers/symbol_table_block.py
1
2304
from utils.header import Header, NonEncodingField from utils.commafy import commafy class SymbolTableBase(Header): FIELDS = ( NonEncodingField('desc'), ) def __init__(self, entry_type, num_entries=None): if num_entries is not None: desc = '%s %s' % (commafy(num_entries), entry...
apache-2.0
5,418,894,315,636,065,000
31
112
0.607639
false
3.46988
false
false
false
shurain/archiver
archiver/sink.py
1
4439
# -*- coding: utf-8 -*- import hashlib import binascii from thrift.transport.THttpClient import THttpClient from thrift.protocol.TBinaryProtocol import TBinaryProtocol from evernote.edam.userstore import UserStore from evernote.edam.notestore import NoteStore import evernote.edam.type.ttypes as Types import evernote....
mit
2,208,738,899,252,046,300
32.37594
120
0.609597
false
4.203598
false
false
false
haanme/FinnBrain
generate_anon_list.py
1
1369
#!/usr/bin/env python experiment_dir = '/Users/eija/Documents/FinnBrain/pipelinedata' DTIprep_protocol = '/Users/eija/Documents/FinnBrain/scripts/default.xml' from argparse import ArgumentParser import os import math import numpy as np import glob import dicom if __name__ == "__main__": parser = ArgumentParser()...
mit
-411,932,060,426,310,850
36
105
0.6355
false
3.740437
false
false
false
jendrikseipp/rednotebook
rednotebook/gui/browser_cef.py
1
5589
# ----------------------------------------------------------------------- # Copyright (c) 2018 Jendrik Seipp # # RedNotebook 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...
gpl-2.0
-4,047,744,652,660,251,000
36.013245
105
0.582752
false
4.152303
false
false
false
mtjvc/gpew
examples/single_line.py
1
3029
#!/usr/bin/env python # -*- coding: utf-8 -*- import inspect import numpy as np import emcee import george from george import kernels import os import sys currentframe = inspect.currentframe() currentdir = os.path.dirname(os.path.abspath(inspect.getfile(currentframe))) parentdir = os.path.dirname(currentdir) sys.pa...
mit
-5,366,648,903,730,181,000
26.536364
76
0.685705
false
3.109856
false
false
false
jamesiter/JimV-C
jimvc/api/guest.py
1
56141
#!/usr/bin/env python # -*- coding: utf-8 -*- import copy from math import ceil from IPy import IP import requests import json from uuid import uuid4 import random import time import jimit as ji from flask import Blueprint, url_for, request from jimvc.api.base import Base from jimvc.models.initialize import dev_tab...
gpl-3.0
499,616,185,876,565,700
29.027854
139
0.556847
false
3.439967
true
false
false
gwu-libraries/sfm-utils
sfmutils/warc_iter.py
1
7870
from warcio.archiveiterator import WARCIterator import json import argparse import logging import sys import os from collections import namedtuple log = logging.getLogger(__name__) IterItem = namedtuple('IterItem', ['type', 'id', 'date', 'url', 'item']) class BaseWarcIter: """ Base class for a warc iterator...
mit
763,000,765,478,507,900
45.023392
114
0.509022
false
4.599649
false
false
false
espadrine/opera
chromium/src/third_party/protobuf/python/google/protobuf/internal/wire_format.py
561
8431
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
3,566,976,627,402,225,700
30.458955
77
0.735619
false
3.618455
false
false
false
WellDone/pymomo
pymomo/mib/api.py
2
1460
#api.py #Routines for dumping the MIB API region of a mib12 executive module and verifying #the contents to make sure they have not been stomped on by some other process. from pymomo.hex8.decode import * from pymomo.utilities.paths import MomoPaths from pymomo.utilities import build from config12 import MIB12Processor...
lgpl-3.0
7,744,014,180,232,141,000
21.121212
82
0.662329
false
2.857143
false
false
false
tomix86/hpcpm
api/hpcpm/api/resources/endpoints/nodes/computation_node/ComputationNode.py
1
4792
import json import requests from flask_restful import Resource, request, abort from flask_restful_swagger import swagger from hpcpm.api import log from hpcpm.api.helpers.database import database from hpcpm.api.helpers.utils import abort_when_port_invalid from hpcpm.api.helpers.constants import COMPUTATION_NODE_PARAM_...
mit
-1,720,521,261,261,079,300
37.95935
107
0.629382
false
3.993333
false
false
false
openconnectome/ndlib
restutil.py
3
2484
# Copyright 2014 NeuroData (http://neurodata.io) # # 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 ag...
apache-2.0
-3,062,821,905,153,752,000
29.666667
144
0.69525
false
3.584416
false
false
false
JohnGarbutt/taskflow-1
taskflow/patterns/graph_flow.py
1
5825
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Yahoo! 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 # # ...
apache-2.0
4,437,600,558,059,972,600
39.734266
79
0.545751
false
4.586614
false
false
false
openprocurement/robot_tests.broker.publicportal
publicportal.py
1
1378
# -*- coding: utf-8 -*- from datetime import datetime, timedelta def parse_date_publicportal(date_str): return ' '.join([date_str.split(' ')[1], date_str.split(' ')[-1]]) def subtract_from_time(date_time, subtr_min, subtr_sec): sub = (datetime.strptime(date_time, "%d.%m.%Y %H:%M") - timedelta(minutes=int(s...
apache-2.0
5,936,651,659,007,901,000
37.277778
118
0.613933
false
3.3125
false
false
false
etsrepo/currentcostgui
currentcostcomhistory.py
9
4524
# -*- coding: utf-8 -*- # # CurrentCost GUI # # Copyright (C) 2008 Dale Lane # # 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 # (...
gpl-3.0
-8,730,828,092,541,913,000
33.34375
98
0.587533
false
4.569697
false
false
false
vedgar/ip
Chomsky/TS.py
1
2189
from util import * class TuringovStroj(types.SimpleNamespace): @classmethod def iz_komponenti(klasa, stanja, abeceda, radna_abeceda, praznina, prijelaz, početno, prihvat): assert abeceda assert abeceda <= radna_abeceda assert praznina in radna_abeceda - abeceda ...
unlicense
8,859,561,109,812,507,000
40.692308
80
0.618542
false
2.587112
false
false
false
anastue/netforce
netforce_mfg/netforce_mfg/controllers/issue_rm.py
4
1553
from netforce.controller import Controller from netforce import database from netforce.model import get_model,clear_cache from netforce import template class IssueRM(Controller): _path="/issue_rm" def get(self): db=database.get_connection() try: data={} html=template.re...
mit
2,009,952,782,927,295,200
30.06
78
0.537025
false
4.501449
false
false
false
oczkers/gdown
gdown/modules/rapidu.py
1
1575
# -*- coding: utf-8 -*- """ gdown.modules.rapidu ~~~~~~~~~~~~~~~~~~~ This module contains handlers for rapidu. """ import re from datetime import datetime, timedelta from ..module import browser, acc_info_template from ..exceptions import ModuleError def accInfo(username, passwd, proxy=False): """Returns acc...
gpl-3.0
7,319,476,821,231,289,000
33.977778
146
0.561626
false
3.148
false
false
false
stevegood/filesync-server
src/backends/filesync/data/downloadservices.py
6
5228
# Copyright 2008-2015 Canonical # # This program 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 version 3 of the # License, or (at your option) any later version. # # This program is distributed...
agpl-3.0
-6,586,029,267,998,936,000
31.47205
79
0.68114
false
3.645746
false
false
false
dpazel/music_rep
midi/score_to_midi_converter.py
1
16776
""" File: score_to_midi_converter.py Purpose: Provides a means to convert a score to a midi file. """ from mido import MidiFile, MidiTrack, Message from fractions import Fraction from timemodel.tempo_event import TempoEvent from timemodel.time_signature_event import TimeSignatureEvent from mido.midifiles import M...
mit
-3,183,113,065,999,324,000
39.917073
119
0.587685
false
4.052174
false
false
false
Azure/azure-storage-python
azure-storage-common/azure/storage/common/_constants.py
1
2363
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import pla...
mit
2,878,465,554,714,151,400
44.442308
119
0.662717
false
3.500741
false
false
false
luminnem/KittysHeart
arrowsLauncher.py
1
1352
''' Created on 23/8/2014 @author: Alberto ''' import pygame as py from settings import SCREEN_WIDTH, SCREEN_HEIGHT class ArrowsLauncher(object): def __init__(self, arrowsManager, img, i): self.am = arrowsManager self.img = img self.ConfigurePosition(i) self.canShoot = True ...
gpl-3.0
-5,816,272,487,389,536,000
22.327586
78
0.522929
false
3.371571
false
false
false
jepler/linuxcnc-mirror
lib/python/qtvcp/widgets/state_label.py
3
5885
#!/usr/bin/python2.7 # QTVcp Widget # # Copyright (c) 2017 Chris Morley # # 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...
lgpl-2.1
8,506,048,133,853,998,000
33.415205
111
0.611555
false
3.853962
false
false
false
Bergiu/smarthomepi
packages/shp/Controller.py
1
2815
# from abc import ABCMeta, abstractmethod class Controller (metaclass=ABCMeta): #public: @abstractmethod def __init__( self, process, database): self.process = process self.database = database self.itemList = [] # Array self.indexIdx = 0 # int #self.initiateAllFromDB() @abstractmethod def createItem(...
gpl-3.0
3,497,706,627,547,256,300
19.23741
79
0.658372
false
2.954832
false
false
false
fuhongxue/CoronaSDK-SublimeText
run_project.py
1
2260
# # Sublime Text plugin to support Corona Editor # # Copyright (c) 2013 Corona Labs Inc. A mobile development software company. All rights reserved. # # MIT License - see https://raw.github.com/coronalabs/CoronaSDK-SublimeText/master/LICENSE import sublime import sublime_plugin try: from . import _corona_utils # P...
mit
7,294,193,245,420,829,000
29.133333
105
0.680088
false
3.460949
false
false
false
SynTuner/WIXOSS
o8g/Scripts/Cost.py
1
43132
# -*- coding: utf-8 -*- ''' Created on 2014年7月18日 @author: SynTuner ''' class CardCost: #have some problems handling Chinese with regular expressions on OCTGN. All these classes is necessary until we can handle it in a uniform way. def __init__(self): self.etype = -2 def WX01_001(self, card, e...
apache-2.0
-7,812,407,356,915,212,000
30.585542
160
0.426468
false
2.698346
false
false
false
geobricks/pgeorest
pgeorest/rest/stats.py
1
11799
import json from flask import Blueprint, Response from flask.ext.cors import cross_origin import copy import StringIO import uuid from pgeo.error.custom_exceptions import PGeoException, errors from pgeo.utils import log from pgeorest.config.settings import settings from pgeo.stats.raster import Stats from pgeo.gis.rast...
gpl-2.0
3,271,741,245,350,275,000
34.220896
116
0.635223
false
3.795111
false
false
false
rmorshea/spectate
tests/test_events.py
1
1896
import pytest from spectate import mvc from .mock import model_events, Counter def test_hold_events(): counter, events = model_events(Counter) with mvc.hold(counter) as cache: counter.increment(1) assert cache == [{"old": 0, "new": 1}] counter.increment(1) assert cache == [...
mit
2,735,460,593,841,551,000
23.307692
68
0.595464
false
3.761905
true
false
false
blacksector/python-url-shortner
app.py
1
4829
from flask import Flask, jsonify, abort, render_template, request, session, escape import MySQLdb from flask_limiter import Limiter import time import random app = Flask(__name__) ##################################### #### MAIN CONFIG #### ##################################### # Set website limits l...
gpl-2.0
-3,498,428,097,392,850,000
31.409396
181
0.485608
false
4.68835
false
false
false
acutesoftware/worldbuild
worldbuild/quest_gen/quest.py
1
6660
#!/usr/bin/python3 # -*- coding: utf-8 -*- # quest.py import random objects = [ {'name':'rusty key', 'desc':'an old rusty key', 'location':'woods', 'when_seen':'the key is old and rusty, but glitters slightly', 'on_success':'the key slides into the lock with a firm click'}, {'name':'chest...
gpl-2.0
3,023,595,139,140,641,000
27.461538
136
0.517868
false
3.514512
false
false
false
xodus7/tensorflow
tensorflow/contrib/distribute/python/tpu_strategy.py
2
13762
# Copyright 2018 The TensorFlow 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
777,925,020,914,767,700
41.085627
111
0.686165
false
3.858144
false
false
false
google/protocall
protocall/interpreter/parser_converter.py
1
8657
# Copyright 2016 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 by applicable law or agre...
apache-2.0
367,662,007,759,672,700
40.028436
213
0.735359
false
3.89955
false
false
false
whaleygeek/mb_deathstar
game.py
1
6760
# game.py (c) 2017 D.J.Whale 22/01/2017 # Star-Wars 'Use the Force, Luke' game # Using many moving parts provided by Martin O'Hanlon #----- CONFIGURATION ---------------------------------------------------------- DEATHSTAR_CENTRE_POS = (100,100,10) TARGET_POS = (100,100,10) IN_RANGE = ((100,1...
mit
-1,244,756,361,887,171,600
23.316547
96
0.564053
false
3.300781
false
false
false
Benjamin-S/AccountManagement
MultiToolSettings.py
1
6257
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'C:\Users\symonsbe\Downloads\WinPython-64bit-3.4.4.5Qt5\notebooks\MultiToolSettings.ui' # # Created by: PyQt5 UI code generator 5.5.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets...
mit
-6,289,644,542,471,036,000
51.939655
140
0.702253
false
4.031572
false
false
false
paanil/Mapot
3Dmap/blender_script.py
1
6184
# Copyright (C) 2014 Susanne Jauhiainen, Markku Kovanen, Ilari Paananen # # 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 la...
gpl-3.0
-341,470,612,410,070,500
29.463054
81
0.601876
false
3.443207
false
false
false
kingsj/music-player
SongEdit.py
1
5917
# -*- coding: utf-8 -*- # MusicPlayer, https://github.com/albertz/music-player # Copyright (c) 2012, Albert Zeyer, www.az2000.de # All rights reserved. # This code is under the 2-clause BSD license, see License.txt in the root directory of this project. import utils from utils import UserAttrib, Event, initBy import T...
bsd-2-clause
5,378,411,905,825,060,000
29.035533
101
0.674835
false
3.07217
false
false
false
kinoraw/kinoraw_repo
external/script_auto_complete/__init__.py
1
2810
''' Copyright (C) 2014 Jacques Lucke mail@jlucke.com Created by Jacques Lucke 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...
gpl-3.0
2,808,274,111,072,506,000
27.673469
93
0.617082
false
3.823129
false
false
false
ngageoint/six-library
six/modules/python/six.sicd/tests/test_six_sicd.py
1
5272
#!/usr/bin/env python # # ========================================================================= # This file is part of six.sicd-python # ========================================================================= # # (C) Copyright 2004 - 2015, MDA Information Systems LLC # # six.sicd-python is free software; you can...
lgpl-3.0
301,591,056,922,000,700
33.913907
97
0.588771
false
3.893648
true
false
false
bacovcin/corpus-tools
PTree.py
1
2935
class PTree: def __init__(self, name, content): if type(name) is str and ' ' not in name: self.name = name else: print("Name is not a string") self.content = content self.height = 0 if type(content) is list: for tree in content: ...
mit
-4,020,557,727,004,430,000
28.94898
91
0.405451
false
4.053867
false
false
false
Guilouz/repository.guilouz
skin.estuary.modv2/scripts/viewswitcher.py
1
3271
import time import xbmc import xbmcgui import xbmcaddon if __name__ == '__main__': # init props trans_title = xbmc.getLocalizedString(369) monitor = xbmc.Monitor() xbmc.log("service.skin.viewswitcher - Start service", level=xbmc.LOGNOTICE) while not monitor.abortRequested(): # Sleep/wait fo...
gpl-2.0
-4,197,966,663,311,798,300
65.77551
168
0.598594
false
4.058313
false
false
false
ndp-systemes/odoo-addons
purchase_delivery_tracking_colissimo/__openerp__.py
1
1441
# -*- coding: utf8 -*- # # Copyright (C) 2015 NDP Systèmes (<http://www.ndp-systemes.fr>). # # This program 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 version 3 of the # Licen...
agpl-3.0
8,709,168,868,862,906,000
34.95
82
0.655076
false
3.640506
false
false
false
binoculars/osf.io
api/preprints/views.py
2
12118
import re from rest_framework import generics from rest_framework.exceptions import NotFound, PermissionDenied, NotAuthenticated from rest_framework import permissions as drf_permissions from framework.auth.oauth_scopes import CoreScopes from osf.models import ReviewAction, PreprintService from osf.utils.requests imp...
apache-2.0
5,948,116,108,433,933,000
35.281437
142
0.674204
false
4.262399
false
false
false
fxia22/ASM_xf
PythonD/site_python/twisted/test/test_words.py
2
3573
# Twisted, the Framework of Your Internet # Copyright (C) 2001 Matthew W. Lefkowitz # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in ...
gpl-2.0
-7,671,457,463,034,201,000
35.090909
79
0.673104
false
4.074116
true
false
false
UnrememberMe/pants
tests/python/pants_test/build_graph/test_target.py
1
12283
# coding=utf-8 # Copyright 2014 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 os.path from ...
apache-2.0
-8,117,164,829,789,744,000
39.272131
120
0.673288
false
3.544877
true
false
false
dburggie/py3D
bodies/ConcCircle.py
1
1475
import bounds from py3D import Vector, Ray, Color, Body from CheckPlane import CheckPlane class ConcCircle(CheckPlane): def set_orientation(self, orientation): self.oX = (orientation - self._origin).norm() self.oY = self._normal.cross(self.oX).norm() return self def __init__(s...
mit
-2,887,579,285,533,850,600
29.102041
70
0.51661
false
3.503563
false
false
false
ethanyishchan/parksandrec
app.py
1
2548
from flask import Flask, request,render_template, jsonify, Response import random import glob import os import uuid import urllib2 import time import httplib, urllib import requests import json app = Flask(__name__) # print "hello" @app.route("/upload_phrase", methods=['POST']) def classify_url(): if request.meth...
bsd-3-clause
-6,499,030,696,478,848,000
24.227723
77
0.600863
false
3.509642
false
false
false
cpodlesny/lisbon
src/news/models.py
2
1864
import datetime from django.db import models from tours.models import Category, Tour from easy_thumbnails.fields import ThumbnailerImageField from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse class Article(models.Model): title_PT = models.CharField(_('Title PT'), max_...
mit
-3,807,208,999,162,011,600
44.463415
113
0.701717
false
3.683794
false
false
false
KE-works/pykechain
pykechain/models/representations/representation_base.py
1
4247
import warnings from abc import abstractmethod from typing import Dict, Any from jsonschema import validate from pykechain.models.validators.validator_schemas import representation_jsonschema_stub class BaseRepresentation(object): """ Base class for all Representations. :cvar jsonschema: jsonschema to ...
apache-2.0
7,312,249,588,611,529,000
31.419847
104
0.616435
false
4.581446
true
false
false
treethought/flask-assistant
api_ai/schema_handlers.py
1
14253
import os import inspect import json from ruamel import yaml from .models import Intent, Entity class SchemaHandler(object): def __init__(self, assist, object_type=None): self.assist = assist self.intents = [] self.api = assist.api self.object_type = object_type # File se...
apache-2.0
2,774,965,515,386,810,000
32.774882
115
0.562618
false
3.907072
false
false
false
artefactual/archivematica-storage-service
storage_service/locations/api/resources.py
1
73908
# This file contains the base models that individual versioned models # are based on. They shouldn't be directly used with Api objects. # stdlib, alphabetical import json import logging import os import pprint import re import shutil import urllib # Core Django, alphabetical from django.conf import settings from djan...
agpl-3.0
889,811,449,057,808,400
36.998972
200
0.543595
false
4.56645
false
false
false
ZeitOnline/zeit.content.cp
src/zeit/content/cp/browser/workflow.py
1
3104
from zeit.cms.i18n import MessageFactory as _ import gocept.form.grouped import zeit.cms.browser.interfaces import zeit.cms.content.interfaces import zeit.cms.workflow.interfaces import zeit.content.cp.interfaces import zeit.objectlog.interfaces import zeit.workflow.browser.form import zope.component import zope.dublin...
bsd-3-clause
-1,244,946,245,865,622,800
39.842105
79
0.667848
false
3.949109
false
false
false
ACS-Community/ACS
LGPL/CommonSoftware/nsStatisticsService/test/TConsumer.py
3
3170
#!/usr/bin/env python # @(#) $Id: TConsumer.py,v 1.4 2015/01/23 16:51:58 pcolomer Exp $ #******************************************************************************* # ALMA - Atacama Large Millimiter Array # (c) Associated Universities Inc., 2002 # (c) European Southern Observatory, 2002 # Copyright by ESO (in the f...
lgpl-2.1
-7,423,310,020,961,331,000
32.368421
103
0.680442
false
3.383138
true
false
false
minrk/dask
dask/dataframe/io.py
1
11154
import pandas as pd import numpy as np from functools import wraps import re import struct import os from glob import glob from math import ceil from toolz import curry, merge, partial from itertools import count import bcolz from operator import getitem from ..compatibility import StringIO from ..utils import textblo...
bsd-3-clause
-4,378,829,436,264,550,000
31.236994
81
0.584095
false
3.860852
false
false
false
kentwills/pgctl
pgctl/daemontools.py
1
4975
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals from collections import namedtuple from subprocess import CalledProcessError from subprocess import PIPE from subprocess import Popen from subprocess import STDOUT from .debug i...
mit
-713,848,870,300,144,900
28.613095
99
0.61809
false
3.823982
false
false
false
unixxxx/simplecms
admin/controllers/passwordcontroller.py
1
1097
import base64 from bottle import jinja2_template as template, request from models.cmsmodels import Users import admin.session as withsession @withsession.app.app.route('/password', method=['GET', 'POST']) @withsession.issessionactive() def password(): try: if request.method == 'GET': return ...
mit
-8,460,016,379,660,171,000
35.6
107
0.611668
false
4.268482
false
false
false
igemsoftware/SYSU-Software2013
project/Python27/Lib/site-packages/pypm/external/zclockfile.py
2
2619
############################################################################## # # Copyright (c) 2001, 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. # T...
mit
-2,048,824,077,317,107,500
26.568421
78
0.524246
false
4.272431
false
false
false
skython/eXe
rpm-setup.py
2
2490
#!/usr/bin/python # setup.py import glob import os.path from distutils.command.install import install from distutils.core import setup from exe.engine import version g_files = { '/usr/share/exe': ["README", "COPYING", "NEWS", ...
gpl-2.0
-2,697,922,290,048,538,600
31.763158
76
0.544578
false
3.562232
false
false
false
milankl/swm
calc/misc/tempautocorr.py
1
2286
## COMPUTE AND PRODUCE TIMESCALE PLOTS from __future__ import print_function path = '/home/mkloewer/python/swm/' import os; os.chdir(path) # change working directory import numpy as np import matplotlib.pyplot as plt from netCDF4 import Dataset def acf(x,l): """ autocorrelation function of vector x up to lag l."""...
gpl-3.0
5,510,185,352,351,144,000
28.688312
89
0.545494
false
2.548495
false
false
false
sxjscience/mxnet
python/mxnet/optimizer/rmsprop.py
9
7538
# 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 u...
apache-2.0
-7,770,516,226,256,501,000
40.646409
93
0.591536
false
4.287827
false
false
false
dgoldman916/nyu-python
flask_blog/app.py
1
3964
from flask import Flask, render_template, request, redirect, url_for from flask_sqlalchemy import SQLAlchemy from flask.ext.uploads import UploadSet, configure_uploads, IMAGES from werkzeug.utils import secure_filename from datetime import datetime from random import choice from functools import wraps import os ...
mit
-8,502,223,185,065,904,000
29.967742
114
0.610999
false
3.477193
false
false
false