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
botswana-harvard/tshilo-dikotla
td_infant/models/infant_birth_data.py
1
2659
from django.core.validators import MinValueValidator, MaxValueValidator from django.db import models from edc_constants.choices import YES_NO, GENDER from .infant_crf_model import InfantCrfModel class InfantBirthData(InfantCrfModel): """ A model completed by the user on the infant's birth exam. """ infant_...
gpl-2.0
-4,537,329,226,076,851,700
31.036145
76
0.620158
false
3.809456
false
false
false
EnriqueSoria/Series-my
series.py
1
8682
# -*- coding: utf-8 -*- directorios = \ r''' D:/Series '''.split('\n') ''' Traducción para algunos géneros ''' gen = { 'Crime': u'Crimen', 'Action': u'Acción', 'Drama': u'Drama', 'Comedy': u'Comedia', 'Adventure': u'Aventuras', 'Thriller': u'Thriller' } ...
mit
3,314,433,357,700,545,500
35.70339
276
0.448857
false
3.475923
false
false
false
advisory/djangosaml2_tenant
setup.py
1
1850
# Copyright (C) 2015 Education Advisory Board # Copyright (C) 2011-2012 Yaco Sistemas # # 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...
apache-2.0
5,805,203,127,526,979,000
33.90566
79
0.668649
false
3.838174
false
false
false
Adamssss/projectEuler
Problem 001-150 Python/pb050.py
1
1068
import math import time t1 = time.time() prime = [2,3,5] primen = 2 while primen < 547: b = prime[primen] t = 1 while (t == 1): b = b+2 i = 0 t = 0 while (prime[i]*prime[i] < b)and (t == 0): i=i+1 if (b%prime[i] == 0): t = 1 ...
mit
1,853,741,059,998,883,600
17.736842
69
0.47191
false
3.086705
false
false
false
angadpc/Alexa-Project-
twilio/rest/api/v2010/account/available_phone_number/local.py
1
16142
# coding=utf-8 """ This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import deserialize from twilio.base import values from twilio.base.instance_resource import InstanceResource from twilio.base.list_resource import ListResource from twilio.base.page i...
mit
-3,366,049,378,486,977,000
37.070755
118
0.610767
false
4.276026
false
false
false
r8/scrapy-kinopoisk
kinopoisk/pipelines.py
1
2920
# -*- 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 os import sys import codecs from slugify import slugify from time import strptime, strftime from html2text import html2...
gpl-3.0
-5,104,314,660,100,140,000
36.012987
132
0.579298
false
3.220339
false
false
false
bsquidwrd/Squid-Bot
gaming/migrations/0007_auto_20161029_2354.py
1
1089
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-10-30 06:54 from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('gaming', '0006_auto_20161029_2347'), ] operations = [ ...
mit
-768,404,492,787,284,200
29.25
97
0.599633
false
4.287402
false
false
false
hashbang/provisor
provisor/utils.py
1
1845
def drop_privileges(uid_name='nobody', gid_name='nogroup'): import grp, pwd, os, resource if os.getuid() != 0: # not root. #yolo return running_uid = pwd.getpwnam(uid_name).pw_uid running_gid = grp.getgrnam(gid_name).gr_gid os.setgroups([]) os.setgid(running_gid) os.setuid(running...
mit
5,792,575,811,254,287,000
28.758065
83
0.617344
false
3.236842
false
false
false
abhijeet-talaulikar/Automatic-Helmet-Detection
K-Fold/Logistic_Regression.py
1
2663
import numpy as np import matplotlib.pyplot as plt from sklearn.metrics import roc_curve, auc from sklearn.model_selection import KFold from sklearn.linear_model import LogisticRegression from sklearn.metrics import * from timeit import default_timer as timer from random import randint from sklearn.feature_selection im...
gpl-3.0
-5,013,241,237,569,052,000
32.2875
142
0.662035
false
2.634026
true
false
false
cristobaltapia/sajou
sajou/sections.py
1
3525
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Define the classes and methods to work with sections. """ import numpy as np class BeamSection(object): """Defines a beam section Parameters ---------- name: str name of the section material: Material instance material of the sect...
mit
9,096,255,454,926,391,000
28.621849
73
0.41844
false
4.632063
false
false
false
n3wb13/OpenNfrGui-5.0-1
lib/python/Plugins/Extensions/MediaPortal/additions/fun/geo_de.py
1
4389
# -*- coding: utf-8 -*- from Plugins.Extensions.MediaPortal.plugin import _ from Plugins.Extensions.MediaPortal.resources.imports import * from Plugins.Extensions.MediaPortal.resources.simpleplayer import SimplePlayer, SimplePlaylist from Plugins.Extensions.MediaPortal.resources.twagenthelper import twAgentGetPage ST...
gpl-2.0
2,190,676,951,641,538,800
34.088
173
0.696693
false
2.78944
false
false
false
osuripple/lets
helpers/aeshelper.py
1
10866
""" A pure python (slow) implementation of rijndael with a decent interface To include - from rijndael import rijndael To do a key setup - r = rijndael(key, block_size = 16) key must be a string of length 16, 24, or 32 blocksize must be 16, 24, or 32. Default is 16 To use - ciphertext = r.encrypt(plaintext) plai...
agpl-3.0
8,741,889,376,303,064,000
23.200445
108
0.534511
false
2.264694
false
false
false
thinkWhere/Roadnet
street_browser/add.py
1
15108
# -*- coding: utf-8 -*- import datetime from PyQt4.QtSql import QSqlQuery, QSqlQueryModel from PyQt4.QtGui import QMessageBox, QLineEdit, QComboBox from PyQt4.QtCore import Qt, QDate from qgis.core import QgsMapLayerRegistry from ..generic_functions import SwitchStreetBrowserMode, ZoomSelectCanvas, ipdb_breakpoint f...
gpl-2.0
-7,157,423,312,518,393,000
39.943089
121
0.601403
false
3.852116
false
false
false
josephyli/py-db-cluster
runDDL.py
1
9526
import argparse import os import pymysql.cursors import re import sys from ConfigParser import SafeConfigParser from StringIO import StringIO from pymysql import OperationalError # returns a list of sql commands as strings def read_DDL(ddlfilename): f = open(ddlfilename, 'r') ddlfile = f.read() f.close() temp = f...
gpl-3.0
3,556,770,068,061,387,300
32.780142
229
0.655364
false
3.196644
true
false
false
alibozorgkhan/django-boilerplate
django_boilerplate/settings/base.py
1
4882
""" Django settings for django_boilerplate project. Generated by 'django-admin startproject' using Django 1.10.5. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """...
mit
2,478,633,743,751,343,000
28.409639
101
0.681073
false
3.364576
false
false
false
djangraw/PsychoPyParadigms
Reading/DistractionTask_eyelink_d6.py
1
30141
#!/usr/bin/env python2 """Display multi-page text with simultaneous auditory distractions, recording eye position data using the EyeLink eye tracker.""" # DistractionTask_eyelink_d6.py # Created 3/16/15 by DJ based on VidLecTask.py # Updated 3/31/15 by DJ - renamed from ReadingTask_dict_d2.py. # Updated 4/1-16/15 by D...
mit
7,485,308,004,066,379,000
41.572034
266
0.673103
false
3.28799
false
false
false
stanford-gfx/Horus
Code/HorusApp/app/views.py
1
19731
from app import server, db, trajectoryAPI from pylab import * import flask from flask import jsonify, request, url_for, redirect, render_template, abort from flask.ext import restful import requests import math, time import urllib2 import json import os from os import path starting_lat = 0 starting_lng = 0 vehicle_mi...
bsd-3-clause
2,205,061,663,268,043,300
33.07772
431
0.67959
false
2.738515
false
false
false
fake-name/ReadableWebProxy
amqpstorm/channel0.py
1
6351
"""AMQPStorm Connection.Channel0.""" import logging import platform from pamqp import specification from pamqp.heartbeat import Heartbeat from amqpstorm import __version__ from amqpstorm.base import AUTH_MECHANISM from amqpstorm.base import FRAME_MAX from amqpstorm.base import LOCALE from amqpstorm.base import MAX_C...
bsd-3-clause
-8,175,721,914,685,432,000
29.830097
78
0.571406
false
4.167323
false
false
false
benjolitz/trollius-redis
trollius_redis/encoders.py
1
2145
""" The redis protocol only knows about bytes, but we like to have strings inside Python. This file contains some helper classes for decoding the bytes to strings and encoding the other way around. We also have a `BytesEncoder`, which provides raw access to the redis server. """ __all__ = ( 'BaseEncoder', 'Byt...
bsd-2-clause
-7,322,729,814,872,177,000
26.5
79
0.653613
false
4.333333
false
false
false
kHarshit/DAT210x_Microsoft
Module2/assignment3.py
1
1178
import pandas as pd # TODO: Load up the dataset Ensuring you set the appropriate header column names df = pd.read_csv('Datasets/servo.data') df.columns = ['motor', 'screw', 'pgain', 'vgain', 'class'] print(df.describe()) # TODO: Create a slice that contains all entries having a vgain equal to 5. Then print the lengt...
mit
6,821,107,749,193,167,000
34.69697
129
0.684211
false
3.192412
false
false
false
upptalk/uppsell
uppsell/migrations/0002_auto__add_unique_store_code__add_field_listing_price__chg_field_listin.py
1
19453
# -*- 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 unique constraint on 'Store', fields ['code'] db.create_unique('...
mit
2,520,933,076,126,869,500
74.403101
189
0.55575
false
3.556957
false
false
false
alexanderfefelov/nav
python/nav/web/status/sections.py
1
29405
# -*- coding: utf-8 -*- # # Copyright (C) 2009, 2012 UNINETT AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License version 2 as published by # the Free Software Foundation. # # This prog...
gpl-2.0
-2,737,846,190,334,382,000
32.294185
85
0.508648
false
4.241575
false
false
false
projectarkc/arkc-server-gae
fetchfrom/goagent.py
1
9320
#!/usr/bin/env python # coding:utf-8 __version__ = '3.2.0' __password__ = '' __hostsdeny__ = () # __hostsdeny__ = ('.youtube.com', '.youku.com') import os import re import time import struct import zlib import base64 import logging import urlparse import httplib import io import string import json from BaseHTTPServ...
gpl-2.0
4,217,351,065,966,016,500
33.64684
205
0.591094
false
3.559969
false
false
false
kratorius/ads
python/interviewquestions/longest_sequence.py
1
1730
""" Given a list of distinct numbers, find the longest monotonically increasing subsequence within that list. For example: S = [2, 4, 3, 5, 1, 7, 6, 9, 8] -> [2, 3, 5, 6, 8] or [2, 4, 5, 7, 8] or [2, 4, 5, 7, 9] If there's more than one solut...
mit
2,014,271,797,512,256,300
29.892857
88
0.546821
false
3.46
false
false
false
Yannig/ansible
lib/ansible/plugins/action/net_base.py
1
7262
# (c) 2015, Ansible 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 di...
gpl-3.0
-8,083,114,629,988,565,000
43.280488
118
0.630956
false
4.114448
false
false
false
F5Networks/f5-common-python
f5/bigiq/cm/device/licensing/pool/initial_activation.py
1
1773
# coding=utf-8 # # Copyright 2017 F5 Networks Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
1,947,570,729,455,576,800
36.702128
118
0.713883
false
3.852174
false
false
false
CSD-Public/stonix
src/MacBuild/ramdisk/lib/environment.py
1
30726
#!/usr/bin/env python3 ############################################################################### # # # Copyright 2019. Triad National Security, LLC. All rights reserved. # # This program was produced under U.S. Government contrac...
gpl-2.0
8,765,713,703,017,385,000
32.145631
104
0.499837
false
4.573002
false
false
false
ajbouh/tfi
src/tfi/main.py
1
13541
#!/usr/bin/env python from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import os import os.path import sys import tempfile import tfi import tfi.driver import tfi.driverconfig from tfi.resolve.model import _detect_model_file_kind, _model_mo...
mit
230,525,589,146,237,150
41.990476
972
0.600251
false
3.714952
true
false
false
abramconnelly/genevieve
file_process/tasks.py
1
5314
"""Tasks for analyzing genome/genetic data files""" # absolute_import prevents conflicts between project celery.py file # and the celery package. from __future__ import absolute_import import bz2 import csv import gzip import os from random import randint from celery import shared_task from django.conf import settin...
mit
4,513,550,672,840,500,000
37.230216
79
0.621754
false
3.509908
false
false
false
centricular/meson
tools/cmake2meson.py
1
10941
#!/usr/bin/env python3 # Copyright 2014 Jussi Pakkanen # 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 o...
apache-2.0
8,318,193,074,904,967,000
35.348837
115
0.452792
false
4.013573
false
false
false
adyliu/mysql-connector-python
python2/tests/test_examples.py
1
6610
# -*- coding: utf-8 -*- # MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. Th...
gpl-2.0
-8,095,006,123,662,199,000
34.72973
78
0.579879
false
3.965207
true
false
false
clearcare/cc_dynamodb
tests/conftest.py
1
1033
from decimal import Decimal import os.path import pytest AWS_DYNAMODB_CONFIG_PATH = os.path.join(os.path.dirname(__file__), 'dynamodb.yml') @pytest.fixture def fake_config(): import cc_dynamodb cc_dynamodb.set_config( table_config=AWS_DYNAMODB_CONFIG_PATH, aws_access_key_id='<KEY>', ...
mit
1,849,978,970,764,546,300
25.487179
82
0.53243
false
3.353896
false
false
false
felixbb/forseti-security
google/cloud/security/scanner/audit/buckets_rules_engine.py
1
8802
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-2,150,819,857,089,099,300
33.249027
84
0.586571
false
4.149929
false
false
false
cyncyncyn/evette
languagefiles/language_irish_1.3.2.py
1
68626
#!/usr/bin/python # -*- coding: UTF-8 -*- #Copyright (C) 2007 Adam Spencer - Free Veterinary Management Suite #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 ...
gpl-2.0
-7,974,533,037,425,782,000
23.938619
163
0.665987
false
3.111585
false
false
false
JhonyVilla/blog
pelican-plugins/assets/assets.py
1
2672
# -*- coding: utf-8 -*- """ Asset management plugin for Pelican =================================== This plugin allows you to use the `webassets`_ module to manage assets such as CSS and JS files. The ASSET_URL is set to a relative url to honor Pelican's RELATIVE_URLS setting. This requires the use of SITEUR...
gpl-3.0
-8,804,839,349,497,951,000
33.626667
83
0.666542
false
3.906433
false
false
false
samuelmaudo/yepes
yepes/contrib/datamigrations/importation_plans/base.py
1
5591
# -*- coding:utf-8 -*- from __future__ import unicode_literals import collections import operator from django.db import transaction from django.db.models import F, Q from django.utils.six.moves import reduce from django.utils.text import camel_case_to_spaces, capfirst from yepes.contrib.datamigrations.exceptions im...
bsd-3-clause
1,023,181,490,690,836,600
29.551913
102
0.519943
false
4.613036
false
false
false
j-towns/fastar
fastar/test_util.py
1
3377
from itertools import chain from random import shuffle import numpy as np from jax import numpy as jnp, test_util as jtu from jax.util import safe_map, safe_zip from jax.tree_util import tree_multimap, tree_flatten, tree_map from fastar import lazy_eval, lazy_eval_fixed_point, LazyArray map = safe_map zip = safe_zip ...
mit
8,212,361,584,758,945,000
34.177083
77
0.674267
false
2.991143
false
false
false
walafc0/soclib
soclib/iss/iss_profiler/bin/iss_profiler2profile.py
1
2939
#!/usr/bin/env python from dsx.util.objdumper import * import sys __id__ = "$Id: iss_profiler2profile.py 917 2009-03-12 10:10:06Z nipo $" __version__ = "$Revision: 917 $" class SymLooker: def __init__(self, arch, obj): self.__syms = {} dumper = ObjDumper(arch, obj) for section in dumper: for sym in section...
lgpl-2.1
-5,641,330,111,067,963,000
21.960938
100
0.638653
false
2.614769
false
false
false
ayepezv/GAD_ERP
openerp/addons/test_impex/models.py
2
4918
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models def selection_fn(model): return list(enumerate(["Corge", "Grault", "Wheee", "Moog"])) def compute_fn(records): for record in records: record.value = 3 def inverse_f...
gpl-3.0
4,212,233,521,099,419,000
30.729032
89
0.618544
false
3.417651
false
false
false
steven-martins/Marking
back/marks/migrations/0001_initial.py
1
3773
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import datetime class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ m...
mit
3,561,885,093,581,885,000
34.59434
139
0.51789
false
4.72807
false
false
false
googlefonts/noto-emoji
materialize_emoji_images.py
1
4076
#!/usr/bin/env python3 # # 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 requir...
apache-2.0
7,824,723,636,050,095,000
31.349206
83
0.652601
false
2.973012
false
false
false
esacosta/u-mooc
common/schema_fields.py
1
5958
# Copyright 2012 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 ...
apache-2.0
-4,220,608,419,550,851,600
36.2375
80
0.596173
false
3.977303
false
false
false
LCBRU/reporter
reporter/uhl_reports/fast/data_quality/screening_clinic_redcap_dq.py
1
3307
#!/usr/bin/env python3 from reporter.core import Schedule from reporter.connections import RedcapInstance from reporter.emailing import ( RECIPIENT_FAST_MANAGER, RECIPIENT_FAST_ADMIN, ) from reporter.application_abstract_reports.redcap.data_quality import ( RedcapMissingDataWhen, RedcapMissin...
mit
8,472,242,262,794,943,000
29.198113
71
0.589054
false
4.003632
false
false
false
dholbach/snapcraft
snapcraft/_options.py
1
4962
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016 Canonical Ltd # # 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 Software Foundation. # # This program is distributed in the h...
gpl-3.0
740,297,699,160,747,900
28.188235
79
0.592301
false
3.802299
false
false
false
ekaakurniawan/Bioinformatics-Tools
DnC_LocalAlignment/DnC_LocalAlignment.py
1
6963
# Copyright (C) 2012 by Eka A. Kurniawan # eka.a.kurniawan(ta)gmail(tod)com # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the License. # # This program is distributed in the hop...
gpl-2.0
-8,100,298,384,511,656,000
28.629787
577
0.60922
false
2.556167
false
false
false
charman2/rsas
examples/unsteady.py
1
5254
# -*- coding: utf-8 -*- """Storage selection (SAS) functions: example with multiple fluxes out at steady state Runs the rSAS model for a synthetic dataset with one flux in and multiple fluxes out and steady state flow Theory is presented in: Harman, C. J. (2014), Time-variable transit time distributions and transport...
mit
1,715,018,500,754,261,800
35.234483
113
0.60906
false
2.793195
false
false
false
Galarzaa90/NabBot
cogs/tracking.py
1
83628
# Copyright 2019 Allan Galarza # # 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 writi...
apache-2.0
2,001,326,355,620,940,500
47.838201
120
0.590449
false
4.062533
false
false
false
Fiona/AreWeAlone
__main__.py
1
4157
########## # LD 22 # The theme is alone # it's a dumb theme # fiona wrote this ########## # System and Python lib imports import sys sys.path += ['.'] # Game engine imports from myrmidon.myrmidon import MyrmidonGame, MyrmidonProcess from myrmidon.consts import * from pygame.locals import * # Game imp...
mit
1,547,291,332,813,934,600
27.06993
117
0.570604
false
3.624237
false
false
false
BatedUrGonnaDie/salty_bot
modules/helpers/yt_video_link.py
1
1246
#! /usr/bin/env python3.7 import re import isodate import modules.extensions.regexes as regexes import modules.commands.helpers.time_formatter as time_formatter ON_ACTION = "PRIVMSG" def call(salty_inst, c_msg, balancer, **kwargs): video_ids = re.findall(regexes.YOUTUBE_URL, c_msg["message"]) if not video...
mit
-6,777,776,183,059,641,000
32.675676
104
0.623596
false
3.509859
false
false
false
google/tf_mesh_renderer
mesh_renderer/rasterize_triangles_test.py
1
7681
# Copyright 2017 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 or agreed to in writing, ...
apache-2.0
-5,375,903,968,414,628,000
38.188776
80
0.622836
false
3.151826
true
false
false
crask/redisproxy
test/memcache/memcache.py
1
15420
# Copyright 2012 Mixpanel, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
-2,465,647,685,932,409,000
37.074074
114
0.569455
false
4.273836
false
false
false
sterlingbaldwin/acme_workbench
workbench-backend/index/tests.py
1
3781
import json from django.test import TestCase from django.test import Client class IndexViewTests(TestCase): fixtures = ['seed.json'] """ Tests for the Index app views """ def test_get_index(self): """ Test that the index page returns success """ client = Client() ...
bsd-2-clause
3,293,972,023,252,596,000
28.310078
72
0.530283
false
4.164097
true
false
false
lixiangning888/whole_project
lib/cuckoo/common/demux.py
1
7192
# Copyright (C) 2015 Accuvant, Inc. (bspengler@accuvant.com) # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import tempfile from zipfile import ZipFile try: from rarfile import RarFile HAS_RARFILE = True except ImportError: ...
lgpl-3.0
-6,092,322,796,231,694,000
33.411483
123
0.535595
false
4.238067
false
false
false
jeromecc/doctoctocbot
src/customer/forms.py
1
3367
from django import forms from django.utils.translation import ugettext_lazy as _ from django_countries.fields import CountryField from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from customer.models import Customer from bootstrap_modal_forms.forms import BSModalForm, BSModalModelForm...
mpl-2.0
2,314,816,419,920,023,000
28.535088
82
0.591922
false
4.008333
false
false
false
rain87/pc-health
create_graph.py
1
6855
#!/usr/bin/python # coding=utf8 import rrd_config as C import os import subprocess from collections import namedtuple import gzip import sys import itertools from smart_attributes import names as smart_names DataSource = namedtuple('DataSource', 'db_fname field legend is_area color stack') DataSource.__new__.__defau...
mit
-2,728,556,869,338,496,500
54.723577
162
0.626204
false
3.101357
false
false
false
dendory/chartjs
sample3.py
1
5887
# This script parses the CSV files gathered from the Canadian Weather Service and makes charts import chartjs import csv # We will cover these years startyear = 1981 endyear = 2012 # We will make charts for 3 major Canadian cities cities = [ {'name': "Montreal", 'fillColor': "rgba(100,50,200,0.25)", 'strok...
mit
831,402,048,602,100,100
39.167832
216
0.660608
false
2.950877
false
false
false
MSHallOpenSoft/plotter
GUI_final.py
1
59129
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'GUI_final.ui' # # Created: Thu Mar 19 22:03:17 2015 # by: PyQt4 UI code generator 4.11.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attr...
gpl-2.0
-4,134,462,761,231,112,000
56.969608
268
0.698557
false
3.313477
false
false
false
ifp-uiuc/do-neural-networks-learn-faus-iccvw-2015
ck_plus/cnn_ad/train.py
1
3697
import argparse import os import sys sys.path.append('..') import numpy from anna import util from anna.datasets import supervised_dataset #from anna.datasets.supervised_data_loader import SupervisedDataLoaderCrossVal import data_fold_loader import data_paths from model import SupervisedModel parser = argparse.Arg...
bsd-3-clause
-8,914,378,663,641,386,000
33.551402
89
0.675683
false
3.242982
true
false
false
radjkarl/imgProcessor
imgProcessor/imgSignal.py
1
10847
from __future__ import division from __future__ import print_function import numpy as np import cv2 from imgProcessor.imgIO import imread from imgProcessor.measure.FitHistogramPeaks import FitHistogramPeaks from fancytools.math.findXAt import findXAt # from scipy.optimize.minpack import curve_fit MAX_SIZE =...
gpl-3.0
7,949,265,973,686,205,000
26.028424
78
0.553425
false
3.283984
false
false
false
Osmose/normandy
recipe-server/normandy/recipes/migrations/0021_migrate_to_single_actions.py
1
1111
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-03-16 19:55 # flake8: noqa from __future__ import unicode_literals from django.db import migrations def multiple_to_single(apps, schema_editor): """ Take the first action in a recipe and set it as the single action. """ Recipe = apps.get_model...
mpl-2.0
-8,590,091,028,667,492,000
30.742857
100
0.647165
false
3.844291
false
false
false
HoussemCharf/FunUtils
pythonMergeSort.py
1
2025
""" This is a pure python implementation of the merge sort algorithm For doctests run following command: python -m doctest -v merge_sort.py or python3 -m doctest -v merge_sort.py For manual testing run: python merge_sort.py """ from __future__ import print_function def merge_sort(collection): """Pure...
mit
-4,175,166,591,996,086,300
26.957143
73
0.545185
false
3.835227
false
false
false
walterbender/locosugar
toolbar_utils.py
1
5547
# -*- coding: utf-8 -*- # Copyright (c) 2011, Walter Bender # Copyright (c) 2012, Ignacio Rodriguez # 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...
gpl-3.0
-9,041,999,313,022,829,000
33.240741
75
0.658194
false
3.601948
false
false
false
ionux/bitforge
tests/unit.py
1
1117
from bitforge.unit import Unit class TestUnit: def test_btc_accessors(self): u = Unit(btc = 1.2) assert u.btc == 1.2 assert u.mbtc == 1200 assert u.bits == 1200000 assert u.satoshis == 120000000 def test_btc_conversion(self): u = Unit(btc = 1.3) assert...
mit
5,227,069,257,949,842,000
24.386364
54
0.522829
false
3.002688
false
false
false
markbenvenuto/buildbaron
bfg_analyzer.py
1
24487
#!/usr/bin/env python3 """ Script to analyze the Jira Build Baron Queue """ import argparse import binascii import datetime import dateutil import dateutil.relativedelta import hashlib import json import os import pprint import re import requests import stat import sys if __name__ == "__main__" and __package__ is None...
apache-2.0
-1,692,208,233,766,159,000
34.283862
100
0.556663
false
3.79879
true
false
false
jjscarafia/CUPS-Cloud-Print
reportissues.py
2
2412
#! /bin/sh "true" '''\' if command -v python2 > /dev/null; then exec python2 "$0" "$@" else exec python "$0" "$@" fi exit $? ''' # CUPS Cloudprint - Print via Google Cloud Print # Copyright (C) 2013 Simon Cadman # # This program is free software: you can redistribute it and/or modify # it under the ter...
gpl-3.0
-9,007,118,623,980,421,000
32.5
97
0.648425
false
3.716487
false
false
false
gzamboni/sdnResilience
loxi/of14/queue_stats_prop.py
1
3603
# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University # Copyright (c) 2011, 2012 Open Networking Foundation # Copyright (c) 2012, 2013 Big Switch Networks, Inc. # See the file LICENSE.pyloxi which should have been included in the source distribution # Automatically generated by LOXI from ...
gpl-2.0
4,146,537,638,850,166,000
27.824
88
0.566472
false
3.800633
false
false
false
virtualopensystems/nova
nova/virt/hyperv/driver.py
1
9838
# Copyright (c) 2010 Cloud.com, Inc # Copyright (c) 2012 Cloudbase Solutions Srl # # 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....
apache-2.0
4,809,147,517,281,367,000
43.116592
79
0.582639
false
4.523218
false
false
false
MediaMath/qasino
lib/zmq_requestor.py
1
2310
# Copyright (C) 2014 MediaMath, Inc. <http://www.mediamath.com> # # 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 appli...
apache-2.0
5,312,493,586,066,515,000
38.827586
102
0.679654
false
3.799342
false
false
false
scionrep/scioncc
src/pyon/util/containers.py
1
14330
""" General purpose util classes and functions """ __author__ = 'Adam R. Smith, Michael Meisinger' import collections import datetime import importlib import string import time import simplejson import base64 import uuid import os import re from types import NoneType from copy import deepcopy DICT_LOCKING_ATTR = "__...
bsd-2-clause
2,506,083,733,855,044,600
33.200477
108
0.625611
false
3.858374
false
false
false
uweschmitt/emzed
libms/WebserviceClients/Metlin.py
1
3159
import pdb #encoding:latin-1 import requests import urllib2 import userConfig from collections import OrderedDict from ..DataStructures.Table import Table class MetlinMatcher(object): ws_col_names = [ "formula", "mass", "name", "molid"] ws_col_types = [ str, float, str, int] ws_col_formats = [ "%s", "%....
gpl-3.0
-3,001,720,266,134,262,300
32.967742
79
0.566318
false
3.467618
false
false
false
KatiRG/flyingpigeon
flyingpigeon/processes/wps_subset_continents.py
1
5476
import os import tarfile from flyingpigeon.subset import clipping from flyingpigeon.subset import _CONTINENTS_ from pywps.Process import WPSProcess from flyingpigeon.log import init_process_logger import logging logger = logging.getLogger(__name__) class subset_continentsProcess(WPSProcess): def __init__(self)...
apache-2.0
-3,787,420,159,431,396,400
33.658228
112
0.546567
false
4.23839
false
false
false
dthain/cctools
chirp/src/bindings/python3/chirp.binding.py
1
22700
## @package ChirpPython # # Python Chirp bindings. # # The objects and methods provided by this package correspond to the native # C API in @ref chirp_reli.h and chirp_swig_wrap.h # # The SWIG-based Python bindings provide a higher-level interface that # revolves around: # # - @ref Chirp.Client # - @ref Chirp.Stat impo...
gpl-2.0
-854,934,521,074,259,500
33.869432
118
0.574758
false
4.145362
false
false
false
windskyer/nova
nova/tests/unit/virt/xenapi/test_xenapi.py
1
177617
# Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
gpl-2.0
8,827,661,696,526,691,000
41.512446
79
0.562598
false
3.875562
true
false
false
RudolfCardinal/crate
crate_anon/nlp_manager/cloud_request_sender.py
1
12012
#!/usr/bin/env python """ crate_anon/nlp_manager/cloud_request_sender.py =============================================================================== Copyright (C) 2015-2021 Rudolf Cardinal (rudolf@pobox.com). This file is part of CRATE. CRATE is free software: you can redistribute it and/or modify ...
gpl-3.0
-5,249,729,148,744,573,000
34.75
93
0.565851
false
4.297674
true
false
false
tchellomello/home-assistant
homeassistant/components/vesync/switch.py
1
3309
"""Support for VeSync switches.""" import logging from homeassistant.components.switch import SwitchEntity from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from .common import VeSyncDevice from .const import DOMAIN, VS_DISCOVERY, VS_DISPATCHERS, VS_SWITCHES...
apache-2.0
-3,332,572,542,167,740,000
29.925234
81
0.642188
false
3.768793
false
false
false
FreeOpcUa/python-opcua
opcua/common/instantiate.py
1
5606
""" Instantiate a new node and its child nodes from a node type. """ import logging from opcua import Node from opcua import ua from opcua.common import ua_utils from opcua.common.copy_node import _rdesc_from_node, _read_and_copy_attrs logger = logging.getLogger(__name__) def instantiate(parent, node_type, nodeid=...
lgpl-3.0
-3,443,361,974,097,699,300
42.457364
178
0.600428
false
4.224567
false
false
false
anselmobd/fo2
src/estoque/models.py
1
3782
import datetime from pprint import pprint from django.contrib.auth.models import User from django.db import models from produto.models import ProdutoItem class EstoquePermissions(models.Model): class Meta: verbose_name = 'Permissões de estoque' managed = False permissions = ( ...
mit
4,410,419,019,604,873,000
27.293233
78
0.612809
false
3.341918
false
false
false
maas/maas
src/maasserver/models/space.py
1
6013
# Copyright 2015-2016 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Space objects.""" import datetime import re from django.core.exceptions import PermissionDenied, ValidationError from django.db.models import CharField, Manager, TextFie...
agpl-3.0
-8,030,477,149,762,342,000
32.220994
79
0.620323
false
4.204895
false
false
false
vmware/pyvmomi-community-samples
samples/getvmsbycluster.py
1
4534
#!/usr/bin/env python """ Written by Chris Hupman Github: https://github.com/chupman/ Example: Get guest info with folder and host placement """ import json from tools import cli, service_instance data = {} def get_nics(guest): nics = {} for nic in guest.net: if nic.network: # Only return adapter ...
apache-2.0
2,445,535,360,479,337,000
38.426087
81
0.60322
false
3.970228
true
false
false
ASoftTech/Scons-Tools-Grbd
scons_tools_grbd/Tools/MSBuild/VC/Dll2Lib.py
1
3979
""" Dll2Lib This tool will generate a .lib file under windows for a given .dll file This uses dumpfile to export a list of symbols dumpbin /exports C:\yourpath\yourlib.dll The list of symbols is then written to a .def file The lib command is then used to generate the .lib file from the .def file ...
mit
-6,572,437,492,332,772,000
30.614754
83
0.617994
false
3.63379
false
false
false
liliasapurina/python_training
test/test_contacts.py
1
2349
__author__ = '1' import re def test_contacts_on_home_page(app): address_from_home_page = app.address.get_address_list()[0] address_from_edit_page = app.address.get_address_info_from_edit_page(0) assert address_from_home_page.all_phones_from_home_page == merge_phones_like_on_home_page(address_from_edit_page...
apache-2.0
-2,452,055,065,751,226,400
46.959184
121
0.62069
false
3.271588
false
false
false
robozman/pymumblegui
pymumble/pymumble_py3/mumble.py
1
24841
# -*- coding: utf-8 -*- import threading import logging import time import select import socket import ssl import struct from .errors import * from .constants import * from . import users from . import channels from . import blobs from . import commands from . import callbacks from . import tools from . import soundou...
gpl-3.0
-3,118,328,671,455,202,300
41.318569
178
0.605088
false
4.005321
false
false
false
evgenybf/pyXLWriter
pyXLWriter/utilites.py
1
4897
# pyXLWriter: A library for generating Excel Spreadsheets # Copyright (c) 2004 Evgeny Filatov <fufff@users.sourceforge.net> # Copyright (c) 2002-2004 John McNamara (Perl Spreadsheet::WriteExcel) # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Publi...
lgpl-2.1
-7,616,251,451,061,417,000
30.391026
77
0.590157
false
3.09154
false
false
false
ngokevin/zamboni
settings_test.py
1
2958
import atexit import os import tempfile from mkt.settings import ROOT _tmpdirs = set() def _cleanup(): try: import sys import shutil except ImportError: return tmp = None try: for tmp in _tmpdirs: shutil.rmtree(tmp) except Exception, exc: sys....
bsd-3-clause
2,432,286,399,915,075,000
22.291339
77
0.701826
false
3.065285
true
false
false
yfpeng/pengyifan-leetcode
src/main/python/pyleetcode/next_greater_element.py
1
1874
""" You are given two arrays (without duplicates) nums1 and nums2 where nums1's elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums2. The Next Greater Number of a number x in nums1 is the first greater number to its right in nums2. If it does not exi...
bsd-3-clause
-2,137,404,932,578,816,800
30.25
122
0.623799
false
3.476809
false
false
false
ProgrammingRobotsStudyGroup/robo_magellan
scripts/kill_switch.py
1
3880
#!/usr/bin/env python # # Copyright 2017 Robot Garden, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
8,239,543,852,723,142,000
33.954955
81
0.569072
false
3.923155
false
false
false
fossfreedom/coverart-browser
coverart_controllers.py
1
28816
# -*- Mode: python; coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*- # # Copyright (C) 2012 - fossfreedom # Copyright (C) 2012 - Agustin Carrasco # # 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 Fou...
gpl-3.0
-712,676,144,686,856,600
32.941107
111
0.58877
false
4.040381
true
false
false
neo900/skyline
src/horizon/listen.py
1
4999
import socket from os import kill, getpid from Queue import Full from multiprocessing import Process from struct import Struct, unpack from msgpack import unpackb from cPickle import loads import logging import settings logger = logging.getLogger("HorizonLog") class Listen(Process): """ The listener is resp...
mit
-8,091,358,596,528,935,000
31.044872
91
0.455091
false
4.891389
false
false
false
bavla/Graph
PsCoresTQ.py
1
2315
gdir = 'c:/users/batagelj/work/python/graph/graph' # wdir = 'c:/users/batagelj/work/python/graph/JSON/test' wdir = 'c:/users/batagelj/work/python/graph/JSON/SN5' import sys, os, datetime, json sys.path = [gdir]+sys.path; os.chdir(wdir) import GraphNew as Graph import TQ # fJSON = 'ConnectivityWeighted.json' # f...
gpl-3.0
3,479,323,956,564,014,600
36.583333
71
0.577538
false
2.232401
false
false
false
HarmonyEnterpriseSolutions/harmony-platform
src/gnue/common/datasources/drivers/ldap/Connection.py
1
5525
# GNU Enterprise Common Library - Generic DBSIG2 database driver - Connection # # Copyright 2000-2007 Free Software Foundation # # This file is part of GNU Enterprise. # # GNU Enterprise 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-2.0
5,706,516,712,830,585,000
31.122093
87
0.520543
false
4.638959
false
false
false
doraemonext/wechat-platform
wechat_platform/system/response/models.py
1
7805
# -*- coding: utf-8 -*- import logging from time import time from django.db import models from wechat_sdk.messages import EventMessage from system.official_account.models import OfficialAccount logger_response = logging.getLogger(__name__) class ResponseManager(models.Manager): """ 微信服务器响应消息记录表 Manager ...
bsd-2-clause
8,729,925,608,646,641,000
30.864865
95
0.579952
false
3.201901
false
false
false
blab/antibody-response-pulse
bcell-array/code/Virus_Bcell_IgM_IgG_Landscape.py
1
11385
# coding: utf-8 # # Antibody Response Pulse # https://github.com/blab/antibody-response-pulse # # ### B-cells evolution --- cross-reactive antibody response after influenza virus infection or vaccination # ### Adaptive immune response for repeated infection # In[1]: ''' author: Alvason Zhenhua Li date: 04/09/201...
gpl-2.0
5,572,586,783,299,461,000
36.084691
257
0.622047
false
2.538462
false
false
false
moyogo/ufo2ft
Lib/ufo2ft/outlineCompiler.py
1
55408
import logging import math from collections import Counter, namedtuple from io import BytesIO from types import SimpleNamespace from fontTools.cffLib import ( CharStrings, GlobalSubrsIndex, IndexedStrings, PrivateDict, SubrsIndex, TopDict, TopDictIndex, ) from fontTools.misc.arrayTools impo...
mit
6,340,247,939,920,733,000
36.062207
88
0.600022
false
3.953196
false
false
false
only4hj/fast-rcnn
lib/roi_data_layer/minibatch.py
1
22641
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Compute minibatch blobs for training a Fast R-CNN network.""" impor...
mit
2,063,657,557,521,492,200
40.619485
126
0.548209
false
3.342338
false
false
false
Princeton-CDH/derrida-django
derrida/outwork/migrations/0001_initial.py
1
1186
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-17 18:44 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import mezzanine.core.fields class Migration(migrations.Migration): initial = True dependencies = [ ('people', '...
apache-2.0
759,727,622,976,371,800
34.939394
185
0.604553
false
3.953333
false
false
false
phalcon/readthedocs.org
readthedocs/vcs_support/backends/hg.py
1
3235
import csv from StringIO import StringIO from projects.exceptions import ProjectImportError from vcs_support.base import BaseVCS, VCSVersion class Backend(BaseVCS): supports_tags = True supports_branches = True fallback_branch = 'default' def update(self): super(Backend, self).update() ...
mit
-1,967,239,795,073,363,200
30.407767
75
0.4983
false
4.048811
false
false
false
Crystalnix/house-of-life-chromium
chrome/test/functional/chromeos_security.py
1
1213
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import pyauto_functional import pyauto class ChromeosSecurity(pyauto.PyUITest): """Security tests for chrome on ChromeOS...
bsd-3-clause
-6,535,854,804,755,249,000
27.880952
74
0.677659
false
3.863057
false
false
false
sotlampr/personal-site
app/blog/views.py
1
3882
from datetime import datetime from flask import abort, flash, request, render_template, redirect, url_for from flask.ext.login import login_required, current_user from sqlalchemy import desc from . import blog from .forms import PostForm, DeleteForm from ..models import db, Post @blog.route('/') @blog.route('/inde...
mit
6,123,719,996,085,297,000
29.328125
75
0.569809
false
3.843564
false
false
false
b-jazz/stravamous
src/converter.py
1
1697
import logging import os import subprocess def out_for_in(in_path): return '{0}.gpx'.format(os.path.splitext(os.path.basename(in_path))[0]) class Converter(object): def __init__(self, config, input_path): self.config = config self.logger = logging.getLogger() self.input_file = input...
lgpl-3.0
-3,339,667,609,686,575,000
40.390244
141
0.551562
false
4.059809
false
false
false
jesonyang001/qarepo
askbot/__init__.py
1
3117
""" :synopsis: the Django Q&A forum application Functions in the askbot module perform various basic actions on behalf of the forum application """ import os import platform VERSION = (0, 7, 51) #keys are module names used by python imports, #values - the package qualifier to use for pip REQUIREMENTS = { 'akisme...
gpl-3.0
-2,211,768,841,389,933,000
29.558824
73
0.655759
false
3.399128
false
false
false