repo_name
stringlengths
6
90
path
stringlengths
4
230
copies
stringlengths
1
4
size
stringlengths
4
7
content
stringlengths
734
985k
license
stringclasses
15 values
hash
int64
-9,223,303,126,770,100,000
9,223,233,360B
line_mean
float64
3.79
99.6
line_max
int64
19
999
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
8.06
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
SophieIPP/openfisca-france
openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/apprentissage.py
1
11264
# -*- coding: utf-8 -*- from __future__ import division from numpy import datetime64, timedelta64 from ....base import * # noqa analysis:ignore class apprenti(Variable): column = BoolCol entity_class = Individus label = u"L'individu est apprenti" url = "http://www.apce.com/pid927/contrat-d-appren...
agpl-3.0
-3,561,975,838,410,632,000
50.35023
120
0.676927
false
2.956487
false
false
false
codeforamerica/comport
migrations/versions/56bb92fb8acc_.py
1
1540
"""update bpd complaints with new fields, removed unused Revision ID: 56bb92fb8acc Revises: 5cb851130ebb Create Date: 2017-02-07 23:26:09.968323 """ # revision identifiers, used by Alembic. revision = '56bb92fb8acc' down_revision = '5cb851130ebb' from alembic import op import sqlalchemy as sa def upgrade(): o...
bsd-3-clause
-2,105,716,825,292,023,600
44.294118
126
0.729221
false
2.851852
false
false
false
d1ffeq/ecp
ecp/keyfmt.py
1
12919
import hashlib import os import base64 import codecs import base58 import crypto as Crypto from parsing import UnicodeConfigParser cconf = UnicodeConfigParser() mconf = UnicodeConfigParser() local = os.path.dirname(__file__) master_keyring = os.path.normcase(local + '/keyring/' + 'master_keyring....
mit
3,815,638,981,841,576,000
33.786704
111
0.607864
false
3.370467
false
false
false
allo-/mpdsongvote
update_playlist.py
1
3360
#!/usr/bin/env python import random import mpd from mpdsongvote.models import * from mpdsongvote.util import * from django.db import models PLAYLIST_LENGTH = 20 # desired playlist length after removing/adding songs def main_print(main, args): if main: print args def update_playlist(main=False, client...
agpl-3.0
-6,048,688,270,720,424,000
30.401869
79
0.61994
false
3.59743
false
false
false
disko/modoboa-admin
modoboa_admin/lib.py
1
4147
# coding: utf-8 from functools import wraps from itertools import chain from django.contrib.contenttypes.models import ContentType from django.db.models import Q from django.utils.translation import ugettext as _ from modoboa.core.models import User from modoboa.lib import events from modoboa.lib.email_utils import s...
mit
-6,725,191,316,320,852,000
35.06087
75
0.631782
false
3.995183
false
false
false
Elektordi/obs-websocket-py
obswebsocket/requests.py
1
106827
#!/usr/bin/env python # -*- coding: utf-8 -*- # THIS FILE WAS GENERATED BY generate_classes.py - DO NOT EDIT # # (Generated on 2020-12-20 18:26:33.661372) # from .base_classes import Baserequests class GetVersion(Baserequests): """Returns the latest version of the plugin and the API. :Returns: *vers...
mit
-2,856,185,132,902,727,000
28.690661
417
0.588934
false
4.2683
false
false
false
OpenBfS/dokpool-plone
Plone/src/docpool.dbaccess/docpool/dbaccess/content/forms.py
1
24367
# -*- coding: utf-8 -*- __author__ = 'Condat AG' __docformat__ = 'plaintext' from AccessControl import Unauthorized from docpool.dbaccess import DocpoolMessageFactory as _ from docpool.dbaccess.dbinit import __session__ from formalchemy import CheckBoxFieldRenderer from formalchemy import config from formalchemy impor...
gpl-3.0
-8,159,287,414,560,083,000
30.159847
125
0.520171
false
3.784871
false
false
false
dpoulson/r2_control
Hardware/Lights/TeeceesControl.py
1
2802
from __future__ import print_function from __future__ import absolute_import from future import standard_library import configparser import smbus import os import datetime import time from r2utils import mainconfig from flask import Blueprint, request standard_library.install_aliases() from builtins import object _co...
gpl-2.0
-834,947,600,946,573,400
27.591837
84
0.571021
false
3.929874
true
false
false
darjus/botoflow
botoflow/decider/timer_handler.py
2
2708
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://aws.amazon.com/apache2.0 # # or in the "license" file accompa...
apache-2.0
-5,238,275,573,828,646,000
34.631579
90
0.662112
false
4.023774
false
false
false
Genorch/Orchestration
service_providers/docker/__init__.py
1
2118
from ..base import ServiceProvider from config import cfg from utils import common from database import db from tinydb import where import docker def insert_join_token(tokens): def transform(element): if 'docker' not in element: element['docker'] = {} element['docker']['join_tokens...
gpl-3.0
-7,080,300,144,791,402,000
37.509091
176
0.525024
false
4.152941
false
false
false
laminko/wBlog
languages/pl.py
1
9944
# -*- coding: utf-8 -*- { '!langcode!': 'pl', '!langname!': 'Polska', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników z JOIN:', '%s %%{ro...
mit
3,650,750,323,216,495,000
41.709957
280
0.656598
false
2.654291
false
false
false
CN-UPB/OpenBarista
components/decaf-componentmanager/decaf_componentmanager/bunnyconnector.py
1
6679
## # Copyright 2016 DECaF Project Group, University of Paderborn # This file is part of the decaf orchestration framework # All Rights Reserved. # # 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 htt...
mpl-2.0
-1,427,258,908,150,069,500
40.74375
120
0.588711
false
4.314599
false
false
false
SunPower/PVMismatch
pvmismatch/pvmismatch_lib/pvcell.py
1
13490
# -*- coding: utf-8 -*- """ This module contains the :class:`~pvmismatch.pvmismatch_lib.pvcell.PVcell` object which is used by modules, strings and systems. """ from __future__ import absolute_import from future.utils import iteritems from pvmismatch.pvmismatch_lib.pvconstants import PVconstants import numpy as np fr...
bsd-3-clause
2,946,648,456,114,365,400
38.79351
79
0.57828
false
3.038973
false
false
false
cwhelan/cloudbreak
src/main/scripts/evalDelly.py
1
2247
#!/usr/bin/env python import sys import subprocess import evalBedFile # Delly file format (when only del summaries in file - cat *.del.txt | grep Deletion) # The summary line contains the chromosome, the estimated start and end of the structural variant, # the size of the variant, the number of supporting pairs, the ...
mit
4,771,707,620,192,732,000
30.647887
125
0.628393
false
3.338782
false
false
false
l0b0/cds-invenio-vengmark
modules/bibformat/lib/elements/bfe_editors.py
4
2193
# -*- coding: utf-8 -*- ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either versio...
gpl-2.0
3,714,286,827,025,312,300
41.173077
162
0.657091
false
3.813913
false
false
false
makerbot/pyusb
setup.py
6
4130
#!/usr/bin/env python # # Copyright (C) 2009-2014 Wander Lairson Costa # # The following terms apply to all files associated # with the software unless explicitly disclaimed in individual files. # # The authors hereby grant permission to use, copy, modify, distribute, # and license this software and its documentation f...
bsd-3-clause
659,068,409,148,588,400
45.404494
79
0.689346
false
4.257732
false
false
false
jaantollander/Legendre
src_legacy/computation/math_kernel.py
4
1401
# coding=utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals def math_kernel(name, **kwargs): """ Kernel for computations. Includes: * Standard 64-bit floats * Python fractions * Symp...
mit
7,922,163,417,387,498,000
27.591837
61
0.568879
false
4.968085
false
false
false
retspen/virtmgr
storage/views.py
1
13275
# -*- coding: utf-8 -*- import libvirt, re import virtinst.util as util from django.utils.translation import ugettext_lazy as _ from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from virtmgr.model.models import * def index(request, host_id): if not request.user.is_authentic...
apache-2.0
5,640,296,305,532,574,000
26.716075
104
0.629228
false
2.958547
false
false
false
lamby/dak
dak/rm.py
2
16190
#!/usr/bin/env python """ General purpose package removal tool for ftpmaster """ # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2006 James Troup <james@nocrew.org> # Copyright (C) 2010 Alexander Reichle-Schmehl <tolimar@debian.org> # This program is free software; you can redistribute it and/or modify # it under the ...
gpl-2.0
6,069,566,798,989,403,000
43.114441
444
0.579679
false
3.847433
false
false
false
rboman/progs
apps/unixadm/syschecker.py
1
3114
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2017 Romain Boman # # 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,465,282,870,295,664,000
30.77551
80
0.574502
false
3.546697
false
false
false
halfak/MediaWiki-Streaming
mwstreaming/utilities/normalize.py
1
1137
""" Converts a stream of RevisionDocument JSON blobs to JSON blobs that will validate against the latest schema (v0.0.2). Usage: normalize (-h | --help) normalize Options: -h|--help Prints this documentation """ import json import sys import docopt from .util import read_docs def main(argv=No...
mit
8,261,447,011,519,949,000
23.191489
74
0.596306
false
4.119565
false
false
false
Eylrid/flaggen
flaggen.py
1
1742
import random class Flag: def __init__(self, **kwargs): self.mode = kwargs.get('mode', self.random_mode()) self.bg = kwargs.get('bg', self.random_color()) if self.mode == 'plain': pass elif self.mode == 'quarters': self.quarterpanels = kwargs.get('quarterpan...
mit
4,369,666,059,920,785,400
32.5
78
0.483927
false
4.098824
false
false
false
thefab/rdlm-py
rdlmpy/context.py
1
2424
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of rdlm-py released under the MIT license. # See the LICENSE file for more information. from rdlmpy.client import RDLMClient class RDLMContextManager(object): ''' Class which defines a ContextManager to get a convenient way to use RDLMClient...
mit
7,373,955,643,372,384,000
37.47619
98
0.64604
false
4.136519
false
false
false
rohitranjan1991/home-assistant
homeassistant/components/scene.py
2
3565
""" homeassistant.components.scene ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Allows users to set and activate scenes within Home Assistant. A scene is a set of states that describe how you want certain entities to be. For example, light A should be red with 100 brightness. Light B should be on. """ import logging from collectio...
mit
4,587,800,414,917,044,700
26.423077
77
0.63899
false
4.005618
true
false
false
zhinaonet/sqlmap-z
lib/request/redirecthandler.py
1
7239
#!/usr/bin/env python """ Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re import time import types import urllib2 import urlparse from StringIO import StringIO from lib.core.data import conf from lib.core.data import kb from lib.core.dat...
gpl-3.0
827,274,348,231,035,600
40.365714
256
0.605885
false
4.032869
false
false
false
pku9104038/edx-platform
lms/djangoapps/instructor_task/views.py
69
10964
import json import logging from django.http import HttpResponse from django.utils.translation import ugettext as _ from celery.states import FAILURE, REVOKED, READY_STATES from instructor_task.api_helper import (get_status_from_instructor_task, get_updated_instructor_task) fr...
agpl-3.0
6,671,476,108,778,221,000
48.387387
126
0.670649
false
4.33531
false
false
false
MAFLO321/pyFroeling
froelingCore.py
1
23123
#!/usr/bin/env python # -*- coding: utf-8 -*- import binascii import serial import socket import struct import sys import time import froelingWerte ''' save_stdout = sys.stdout fh = open('f.out','w') sys.stdout = fh ''' serial_port = '/dev/ttyUSB0' ausgabe = [] info = [] fehlerspeicher = [] ...
gpl-2.0
5,794,181,109,468,168,000
30.5218
136
0.486442
false
2.663633
false
false
false
MorcoFreeCode/2014__MorcoWrapper2D
full_project/2D/6. Cocos2D [Python2]/ProjectPong/StartScene.py
2
4206
from MorcoWrapper2D.mw2_Scene import * from MorcoWrapper2D.mw2_Text import * from MorcoWrapper2D.mw2_Rect import * from MorcoWrapper2D.mw2_Image import * from ProjectPong.StartManager import * class StartScene (mw2_Scene): def __init__(self): mw2_Scene.__init__(self) def Build(self): # background background =...
mit
7,106,408,714,752,050,000
25.620253
87
0.679505
false
2.491706
false
false
false
jeremiedecock/snippets
python/tkinter/python2/file_dialog_open.py
1
1473
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org) # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including withou...
mit
3,444,912,438,787,938,000
36.717949
79
0.744392
false
3.954301
false
false
false
yafp/apparat
apparat_launcher/plugin_passwordgen.py
2
7500
#!/usr/bin/python """plugin: passwordgen (optional)""" ## general import os import random import string import wx ## apparat import ini import tools # ----------------------------------------------------------------------------------------------- # CONSTANTS # -----------------------------------------------------...
gpl-3.0
2,775,952,911,722,177,000
43.642857
156
0.6164
false
4.045307
false
false
false
btjhjeon/ConversationalQA
skipthoughts/decoding/search.py
2
3252
""" Code for sequence generation """ import numpy import copy def gen_sample(tparams, f_init, f_next, ctx, options, trng=None, k=1, maxlen=30, stochastic=True, argmax=False, use_unk=False): """ Generate a sample, using either beam search or stochastic sampling """ if k > 1: asser...
mit
-5,138,849,806,270,177,000
29.971429
81
0.499385
false
3.64574
false
false
false
zyga/arrowhead
arrowhead/core.py
1
11331
import abc import collections import sys from arrowhead.errors import Bug from arrowhead.errors import ConflictingArrow from arrowhead.errors import DuplicateInitialStep from arrowhead.errors import NoArrowCouldHaveBeenFollowed from arrowhead.errors import NoInitialStep from arrowhead.errors import NoSuchStep from arr...
bsd-3-clause
-2,549,824,257,592,986,000
31.09915
79
0.565881
false
4.408949
false
false
false
greg-hellings/Xiphos
waffles/documentation.py
1
7989
#!/usr/bin/env python # encoding: utf-8 "Create help files" import os, re, shutil import Configure, TaskGen, Utils, Runner, Task, Build, Options, Logs import cc from Logs import error from TaskGen import taskgen, before, after, feature class xml_doc_taskgen(TaskGen.task_gen): def __init__(self, *k, **kw): ...
gpl-2.0
392,728,898,622,873,600
35.313636
105
0.590312
false
3.22267
false
false
false
hecate-xw/Miscellaneous
TsinghuaCSLT/audioEmbedded/Mission/backup/recordWav.py
2
1780
#!usr/bin/env python #coding=utf-8 import numpy as np from pyaudio import PyAudio,paInt16 from datetime import datetime import wave from Tkinter import * #define of params NUM_SAMPLES = 328139 framerate = 44100 channels = 2 sampwidth = 2 #record time TIME = 10 def save_wave_file(filen...
mit
-7,317,275,206,215,485,000
26.384615
68
0.566854
false
3.574297
false
false
false
McGillX/edx_data_research
edx_data_research/parsing/forum/mongo_forum_to_mongod.py
2
2270
''' Insert the edx discussion board .mongo files into mongodb database ''' import pymongo import sys import json def connect_to_db_collection(db_name, collection_name): ''' Retrieve collection from given database name and collection name ''' connection = pymongo.Connection('localhost', 27017) d...
mit
4,230,509,762,510,995,500
31.898551
119
0.5837
false
3.802345
false
false
false
eltonkevani/tempest_el_env
tempest/api/compute/security_groups/test_security_group_rules.py
3
7812
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # 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.apach...
apache-2.0
-3,004,082,375,420,188,000
43.135593
78
0.583589
false
4.254902
true
false
false
pgromano/Markov_Models
Markov_Models/estimation/equilibrium.py
1
1480
import numpy as np from scipy.linalg import eig, solve from scipy.sparse.linalg import eigs __all__ = ['distribution', 'mfpt', 'sample', 'simulate', 'timescales'] def distribution(T, ncv=None, sparse=False): if sparse is True: w, L = eigs(T.T, k=1, ncv=ncv, which='LR') L = L[:, 0].real r...
gpl-3.0
-2,366,640,131,652,733,400
26.407407
73
0.568243
false
3.109244
false
false
false
fp12/sfv-bot
src/cfn_const.py
1
1393
from enum import Enum PROBLEM_CHAR = '_' class Character(Enum): Ryu = 0 Dictator = 1 ChunLi = 2 Ken = 3 Karin = 4 Zangief = 5 Dhalsim = 6 Nash = 7 Claw = 8 Birdie = 10 RMika = 11 Rashid = 12 Fang = 13 Laura = 14 Necalli = 15 Cammy = 16 Guile = 17 ...
mit
-1,741,790,486,168,283,000
18.082192
71
0.563532
false
3.308789
false
false
false
richardbeare/ITK
Modules/Segmentation/Watersheds/wrapping/test/WatershedSegmentation1Test.py
2
1680
#========================================================================== # # 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://www.apache.org/l...
apache-2.0
-4,781,759,507,041,192,000
34.744681
85
0.7
false
3.574468
false
false
false
nicholas-miklaucic/analytica
code/stock-market-crashes/plotting.py
1
1312
""" This file provides convenience functions that allow for easily plotting datasets, curve fits of datasets, and other stuff. """ import matplotlib.pyplot as plt import numpy as np def plot_time_series(df): """Given a DataFrame of a time series, plots it going forward as a line graph. If take_log is True, p...
mit
7,334,910,279,215,006,000
32.641026
97
0.677591
false
3.555556
false
false
false
geobricks/pgeo
pgeo/manager/manager_test.py
1
1342
from pgeo.config.settings import settings from pgeo.manager.manager import Manager from pgeo.utils import log import json import copy import random log = log.logger("pgeo.manager.manager_test") manager = Manager(settings) # Publish a Shapefile layer_def = { "title" : "ne_110m_dddgeography_regions3333222_pol...
gpl-2.0
-2,609,132,806,750,157,300
29.5
140
0.64158
false
3.077982
false
false
false
ktsitsikas/odemis
src/odemis/gui/win/acquisition.py
1
24575
# -*- coding: utf-8 -*- """ Created on 12 Apr 2013 @author: Rinze de Laat Copyright © 2013 Éric Piel, Rinze de Laat, Delmic This file is part of Odemis. Odemis 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 Fou...
gpl-2.0
1,136,655,896,486,371,800
37.395313
99
0.62239
false
4.049604
false
false
false
cloudbase/maas
src/maasserver/testing/tests/test_module.py
1
3396
# Copyright 2012, 2013 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Tests for `maasserver.testing`.""" from __future__ import ( absolute_import, print_function, unicode_literals, ) str = None __metaclass__ = type __all__...
agpl-3.0
-3,223,009,581,684,909,000
33.30303
75
0.670495
false
3.81573
true
false
false
arssivka/naomech
behavior/localization.py
1
16894
from itertools import izip import numpy as np import geo2d.geometry as g # import matplotlib.pyplot as plt import math import random import time from walker import OdoListener class RobotPose(): point = g.Point(0, 0) direction = 0.0 distance = 100 weight = 0.0 def __init__(self, x, y, direct): ...
isc
-5,414,650,607,387,465,000
44.539084
183
0.517521
false
3.364668
false
false
false
potsmaster/cinder
cinder/tests/unit/test_volume.py
1
315332
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
apache-2.0
8,885,701,951,795,988,000
44.469647
81
0.547677
false
4.294321
true
false
false
AunShiLord/sympy
sympy/tensor/tests/test_tensor_methods.py
1
4753
# -*- coding: utf-8 -*- from sympy.tensor.arraypy import Arraypy, TensorArray, list2arraypy, \ list2tensor, matrix2arraypy, matrix2tensor from sympy.tensor.tensor_methods import symmetric, asymmetric, is_symmetric, \ is_asymmetric, change_basis, tensor_product, wedge, raise_index,\ lower_index from sympy i...
bsd-3-clause
-138,381,706,307,806,000
26.633721
79
0.507679
false
2.483281
true
false
false
lgarren/spack
var/spack/repos/builtin/packages/git-lfs/package.py
3
2398
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
1,893,043,516,763,728,600
42.6
78
0.657214
false
3.677914
false
false
false
weiting-chen/manila
manila/tests/share/drivers/netapp/dataontap/client/test_client_cmode.py
1
106326
# Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2015 Clinton Knight. All rights reserved. # Copyright (c) 2015 Tom Barron. 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 ob...
apache-2.0
5,558,383,420,853,855,000
36.215961
79
0.552283
false
3.986129
true
false
false
moxon6/chemlab
build/lib/chemlab/core/spacegroup/crystal.py
5
8140
# Adapted from ASE https://wiki.fysik.dtu.dk/ase/ # # # Copyright (C) 2010, Jesper Friis # (see accompanying license files for details). """ A module for chemlab for simple creation of crystalline structures from knowledge of the space group. """ import numpy as np from collections import Counter from .spacegroup ...
gpl-3.0
8,277,910,861,386,652,000
32.916667
76
0.581327
false
3.465304
true
false
false
VerifiableRobotics/LTLMoP
src/etc/utils/transform_map.py
7
2229
#!/usr/bin/env python """ Rescales and translates maps to make them fit reasonably on the screen. (This is mainly a stop-gap convenience tool for importing "New Region Editor" maps into "Old Region Editor.") Outputs resulting "calibration matrix" that LTLMoP should use for pose transformation, assuming...
gpl-3.0
8,874,320,436,992,467,000
32.772727
97
0.700763
false
3.277941
false
false
false
flavour/eden
modules/templates/locations/AS/config.py
5
1041
# -*- coding: utf-8 -*- from gluon import current def config(settings): """ Template settings for American Samoa - designed to be used in a Cascade with an application template """ #T = current.T # Pre-Populate settings.base.prepopulate.append("locations/AS") # Restrict to s...
mit
-6,489,892,576,239,135,000
30.545455
79
0.64073
false
3.913534
false
false
false
heitorschueroff/ctci
ch4/4.02_Minimal_Tree/minimal_tree.py
1
1061
# ************************************************************************** # Question 4.2 - Minimal Tree # # Problem: # Give a sorted array with unique integer elements, write an algorithm # to crate a bst with minimal height # # Solution: O(log(N)) # We use divide and conquer by splitting the current array int...
mit
6,958,623,734,815,727,000
27.675676
76
0.573987
false
3.886447
false
false
false
korepwx/tfsnippet
tfsnippet/distributions/batch_to_value.py
1
4052
import tensorflow as tf from tfsnippet.utils import assert_deps from .base import Distribution from .wrapper import as_distribution __all__ = ['BatchToValueDistribution'] class BatchToValueDistribution(Distribution): """ Distribution that converts the last few `batch_ndims` into `values_ndims`. See :met...
mit
-1,046,389,830,498,576,800
33.632479
79
0.561451
false
4.51728
false
false
false
mohittahiliani/ns-3-python-examples
tcp/tcp-bulk-send.py
1
3994
# -*- Mode: Python; -*- # /* # * Copyright (c) 2016 NITK Surathkal # * # * This program 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 program is distributed in the hope tha...
gpl-3.0
-5,049,769,479,202,835,000
30.448819
137
0.701052
false
3.197758
false
false
false
rupace10/mysql-connector-python
examples/mysql_warnings.py
15
2164
#!/usr/bin/env python # -*- coding: utf-8 -*- # MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2009, 2014, 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...
gpl-2.0
9,215,059,764,291,930,000
27.103896
78
0.658041
false
3.724613
false
false
false
jromang/retina-old
distinclude/spyderlib/widgets/objecteditor.py
1
4907
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Object Editor Dialog based on Qt """ from spyderlib.qt.QtCore import QObject, SIGNAL class DialogKeeper(QObject): def __init__(self): ...
gpl-3.0
7,748,666,196,462,370,000
32.549296
76
0.565838
false
3.969256
false
false
false
emanuelcovaci/TLT
blog/event/views.py
1
1595
from blog import settings from django.contrib.admin.views.decorators import staff_member_required from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.http.response import HttpResponseForbidden from django.shortcuts import render from models import Event def event_all(request): e...
agpl-3.0
7,700,533,497,187,560,000
33.673913
72
0.569279
false
3.997494
false
false
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/samba/dcerpc/samr/UserInfo18.py
1
1066
# encoding: utf-8 # module samba.dcerpc.samr # from /usr/lib/python2.7/dist-packages/samba/dcerpc/samr.so # by generator 1.135 """ samr DCE/RPC """ # imports import dcerpc as __dcerpc import talloc as __talloc class UserInfo18(__talloc.Object): # no doc def __init__(self, *args, **kwargs): # real signature u...
gpl-2.0
6,980,916,384,802,974,000
31.30303
106
0.644465
false
3.427653
false
false
false
jonathansick/pySPS
demo/snapshot_test.py
1
10519
#!/usr/bin/env python # encoding: utf-8 """ Tests the iso-age library History ------- 2011-10-02 - Created by Jonathan Sick """ __all__ = [''] import os import tables import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.mlab as mlab import snapshotlib from fspsq import Param...
bsd-3-clause
5,662,759,776,264,343,000
35.77972
94
0.542542
false
3.170283
false
false
false
LonamiWebs/Telethon
telethon/tl/custom/adminlogevent.py
1
16228
from ...tl import types from ...utils import get_input_peer class AdminLogEvent: """ Represents a more friendly interface for admin log events. Members: original (:tl:`ChannelAdminLogEvent`): The original :tl:`ChannelAdminLogEvent`. entities (`dict`): A dictionary...
mit
3,210,840,853,299,942,000
33.164211
85
0.613508
false
4.61416
false
false
false
openmotics/gateway
src/gateway/thermostat/gateway/pump_driver.py
1
3634
# Copyright (C) 2020 OpenMotics BV # # 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 distribu...
agpl-3.0
-4,301,642,078,548,197,400
33.283019
103
0.592735
false
3.958606
false
false
false
seecr/meresco-components
meresco/components/berkeleydict.py
1
3124
# -*- coding: utf-8 -*- ## begin license ## # # "Meresco Components" are components to build searchengines, repositories # and archives, based on "Meresco Core". # # Copyright (C) 2007-2009 Kennisnet http://www.kennisnet.nl # Copyright (C) 2007-2009 SURF Foundation. http://www.surf.nl # Copyright (C) 2007-2010 Seek You...
gpl-2.0
7,226,124,998,808,542,000
37.097561
92
0.694622
false
3.60323
false
false
false
google/personfinder
tools/pfif-tools/app/settings.py
1
2307
# Copyright 2019 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
412,704,183,548,397,250
26.141176
80
0.696576
false
3.763458
false
false
false
paparent/FluidDB-Status
twitter.py
5
67989
#!/usr/bin/python2.4 # # Copyright 2007 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...
mit
-8,460,221,382,233,223,000
30.919718
107
0.651944
false
4.098439
false
false
false
dropbox/DropboxBusinessScripts
Files/TeamUsageStatistics.py
1
7301
import urllib import urllib2 import json import argparse import sys import csv import time from collections import Counter reload(sys) sys.setdefaultencoding('UTF8') parser = argparse.ArgumentParser(description='Lists advanced aggregate file stats of the DfB team.') parser.add_argument('-u', '--user', dest='users', a...
apache-2.0
6,524,337,923,033,715,000
40.248588
201
0.581838
false
4.053859
false
false
false
0--key/lib
portfolio/Python/scrapy/netthandelen/blivakker_spider.py
2
2697
import csv import os from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.url import urljoin_rfc from scrapy.utils.response import get_base_url from product_spiders.items import Product, ProductLoaderWithNameStrip as ProductL...
apache-2.0
-7,868,169,537,934,471,000
49.886792
129
0.641453
false
3.73029
false
false
false
eugenekolo/project-euler
euler206.py
1
1135
#!/usr/bin/python3 # -*- coding: utf-8 -*- ################################################################################ # Euler 206 # Concealed Square # Author: Eugene Kolo - 2014 # Contact: www.eugenekolo.com # Find the unique positive integer whose square has the form 1_2_3_4_5_6_7_8_9_0, # where each "_" is a s...
mit
3,187,434,935,368,011,000
42.653846
179
0.540088
false
3.449848
false
false
false
joetainment/mmmmtools
MmmmToolsMod/Dynamic/Selector.py
1
8981
import pymel.all as pm import maya.cmds as cmds import traceback import random import math try: reload(SelectorVolumeSelect) except: try: import SelectorVolumeSelect except: print( traceback.format_exc() ) ## Import Volume Select, but: ## can't reload with Maya running, c...
gpl-3.0
-3,042,789,852,411,789,300
31.651685
109
0.542924
false
4.108417
false
false
false
InQuest/ThreatKB
app/models/errors.py
1
1161
from app import db class Error(db.Model): id = db.Column(db.Integer, primary_key=True) date_created = db.Column(db.DateTime(timezone=True), default=db.func.current_timestamp()) date_modified = db.Column(db.DateTime(timezone=True), default=db.func.current_timestamp(), onupdate...
gpl-2.0
7,108,727,264,006,205,000
34.181818
94
0.605512
false
3.528875
false
false
false
gaiaresources/biosys
biosys/apps/main/migrations/0012_auto_20180611_1558.py
4
1508
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-11 07:58 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import main.models class Migration(migrations.Migration): dependencies = [ ('main', '0011_record_client_id'), ] ...
apache-2.0
-4,770,886,240,885,296,000
31.085106
121
0.566976
false
4.235955
false
false
false
ilay09/keystone
keystone/common/policy.py
2
2008
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
7,823,637,546,930,692,000
28.970149
78
0.699203
false
4.174636
false
false
false
devurandom/portage
pym/portage/tests/dbapi/test_portdb_cache.py
1
5996
# Copyright 2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import subprocess import sys import textwrap import portage from portage import os from portage import _unicode_decode from portage.const import (BASH_BINARY, PORTAGE_BIN_PATH, PORTAGE_PYM_PATH, USER_CONFIG_PATH) fr...
gpl-2.0
-3,200,397,470,879,852,000
30.067358
96
0.655103
false
2.923452
true
false
false
Kotaimen/stonemason
stonemason/storage/tilestorage/clusterfier.py
1
1629
# -*- encoding: utf-8 -*- """ stonemason.storage.tilestorage.clusterfier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Convert a `MetaTileStorage` to a `ClusterStorage` on-the-fly. """ __author__ = 'kotaimen' __date__ = '2/9/15' from stonemason.formatbundle import MapWriter from stonemason.pyramid.cluster im...
mit
-2,220,601,297,772,099,300
26.15
75
0.65132
false
3.851064
false
false
false
tuxology/bcc
examples/networking/net_monitor.py
2
3826
#!/usr/bin/python # # net_monitor.py Aggregates incoming network traffic # outputs source ip, destination ip, the number of their network traffic, and current time # how to use : net_monitor.py <net_interface> # # Copyright (c) 2020 YoungEun Choe from bcc import BPF import time from ast import literal_eval import sy...
apache-2.0
3,369,162,354,351,136,000
27.766917
114
0.587559
false
3.080515
false
false
false
google/makani
avionics/firmware/params/client.py
1
2943
# Copyright 2020 Makani Technologies 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...
apache-2.0
-2,439,594,220,612,250,000
37.220779
76
0.701325
false
4.015007
false
false
false
schleichdi2/OpenNfr_E2_Gui-6.0
lib/python/Plugins/Extensions/MediaPortal/additions/fun/germanytv.py
1
10046
# -*- coding: utf-8 -*- ############################################################################################### # # MediaPortal for Dreambox OS # # Coded by MediaPortal Team (c) 2013-2017 # # This plugin is open source but it is NOT free software. # # This plugin may only be distributed to and executed...
gpl-2.0
210,895,310,020,286,940
37.339695
141
0.674134
false
2.924017
false
false
false
VVS1864/SAMoCAD
src/trim_dim.py
1
3876
# -*- coding: utf-8; -*- import dimension import select_clone from math import sqrt import calc #ПРОДЛЕНИЕ РАЗМЕРНОЙ ЛИНИИ class Trim_dim: def __init__(self, par): self.par = par self.trim_dimEvent() def trim_dimEvent(self): self.par.kill() self.par.standart_unbind() s...
apache-2.0
-5,562,924,540,818,702,000
37.53
177
0.451077
false
3.293162
false
false
false
maxywb/vsipl
sourceryvsipl++-x86-3.1/src/vsipl++/benchmarks/QMTest/database.py
1
9415
######################################################################## # # Copyright (c) 2009 by CodeSourcery, Inc. All rights reserved. # # Contents: # Test, Resource, and Database classes for the Sourcery VSIPL++ # benchmark suite. # ######################################################################## i...
gpl-2.0
2,178,207,208,597,314,000
37.904959
89
0.566968
false
4.205002
true
false
false
lkjcalc/nAssembler
asm_mul.py
1
2960
import helpers def check_mulop(name, operands): """ Assumes valid name, valid name+flags combination, valid condcode. Check the operands and return an error string if invalid, empty string otherwise. """ operands = [x.strip() for x in operands.split(',')] if name == 'MUL' and len(operands) != ...
gpl-3.0
72,495,182,581,060,880
37.947368
119
0.597297
false
3.382857
false
false
false
ratnania/pyccel
tests/macro/scripts/MPI/bug/ex6.py
1
1515
# coding: utf-8 from pyccel.stdlib.internal.mpi import mpi_init from pyccel.stdlib.internal.mpi import mpi_finalize from pyccel.stdlib.internal.mpi import mpi_comm_size from pyccel.stdlib.internal.mpi import mpi_comm_rank from pyccel.stdlib.internal.mpi import mpi_comm_world from pyccel.stdlib.internal.mpi import mpi_...
mit
8,225,065,579,693,772,000
24.25
88
0.730033
false
3.017928
false
true
false
JoshOY/DataStructureCourseDesign
PROB10/run.py
1
3610
__author__ = 'JoshOY' import my_sort.bubbleSort as bubbleSort import my_sort.selectionSort as selectionSort import my_sort.insertionSort as insertionSort import my_sort.shellSort as shellSort import my_sort.quickSort as quickSort import my_sort.heapSort as heapSort import my_sort.mergeSort as mergeSort import my_sort.r...
mit
-160,351,527,702,582,850
36.216495
106
0.726316
false
3.333333
false
false
false
ArthurPBressan/sisgep1
sisgep1/feed/rotas.py
2
3871
# coding: UTF-8 from __future__ import absolute_import from flask import Blueprint, render_template, url_for, redirect, request, flash from flask.ext.security import login_required, current_user from sisgep1.base import db from sisgep1.feed.models import social, User bp = Blueprint('feed', __name__, static_folder='s...
mit
6,368,168,356,272,580,000
34.190909
85
0.635495
false
3.655335
false
false
false
qtproject/qtwebkit
Source/JavaScriptCore/Scripts/builtins/builtins_generate_separate_header.py
3
8111
#!/usr/bin/env python # # Copyright (c) 2014, 2015 Apple Inc. All rights reserved. # Copyright (c) 2014 University of Washington. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributio...
gpl-2.0
-3,861,198,999,955,167,000
39.758794
112
0.64505
false
4.262218
false
false
false
daviddever/RecordSearch
record.py
1
1026
import pypuzzle import os img_path = '/home/david/recordsearch/imgs/' search_img = '/home/david/recordsearch/camera.jpg' img_dict = {} dist_dict= {} imgs = os.listdir(img_path) current_img = '' puzzle = pypuzzle.Puzzle() # Set pypuzzle variables puzzle.set_lambdas(15) puzzle.set_p_ratio(1.5) puzzle.set_autocrop(1) ...
mit
-2,330,047,102,323,751,400
23.428571
73
0.714425
false
2.803279
false
false
false
long0612/randProbs
treeTraversal/Tree.py
1
2119
# Tree Node class # # Long Le # University of Illinois # import numpy as np import matplotlib.pyplot as plt class TreeNode: def __init__(self,x): self.val = x self.left = None self.right = None def serialize(root): buf = [] S = [] S.append(root) while len(S) > 0: ...
mit
4,860,739,055,698,594,000
22.544444
78
0.486078
false
3.479475
false
false
false
davidderaedt/CC-Extension-Builder-for-Sublime-Text
CCExt.py
1
2518
import sublime, sublime_plugin, os, subprocess, webbrowser from os.path import dirname, realpath extid = "com.example.ext" PLUGIN_PATH = dirname(realpath(__file__)) SDK_PATH = PLUGIN_PATH + "/cc-ext-sdk/" USER_DIR = os.path.expanduser("~") IS_WIN = (os.name == "nt") if IS_WIN: LIB_PATH = USER_DIR + "/AppData/Roaming...
mit
-7,296,346,528,573,509,000
26.977778
105
0.702145
false
2.931315
false
false
false
interDist/pasportaservo
core/middleware.py
1
5740
from django.conf import settings from django.contrib.auth.views import ( LoginView, LogoutView, redirect_to_login as redirect_to_intercept, ) from django.core.exceptions import PermissionDenied, ValidationError from django.urls import Resolver404, resolve, reverse from django.utils import timezone from django.utils...
agpl-3.0
8,305,458,266,206,797,000
46.438017
104
0.605749
false
4.632768
false
false
false
swoop-inc/graflux
graflux/graphite.py
1
1690
import time from .metric_lookup import MetricLookup from graphite_api.intervals import Interval, IntervalSet from graphite_api.node import LeafNode, BranchNode from .query_engine import QueryEngine class InfluxDBLeafNode(LeafNode): __fetch_multi__ = 'influxDB' class InfluxDBReader(object): __slots__ = ('pa...
mit
-6,308,070,479,153,033,000
29.727273
105
0.633728
false
3.634409
false
false
false
amcat/amcat
navigator/views/user.py
1
3415
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
agpl-3.0
-4,463,199,056,920,866,300
45.780822
83
0.556076
false
4.671683
false
false
false
fp12/yahtr
yahtr/ui/screens/editor.py
1
1705
from enum import Enum from kivy.lang import Builder from kivy.uix.screenmanager import Screen import yahtr.ui.selectable_recycle_box_layout # force import needed for kv files :( import yahtr.ui.hex_grid # force import needed for kv files :( import yahtr.ui.editor.board_editor # force import needed for kv files :( ...
mit
7,517,015,987,824,250,000
29.446429
99
0.643402
false
3.330078
false
false
false
neithere/eav-django
examples/grocery_shop/settings.py
2
2963
# Django settings for example_project project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE' : 'django.db.backends.sqlite3', 'NAME': 'test.sqlite', # Or path to database file if using...
lgpl-3.0
-5,590,824,596,087,922,000
32.292135
100
0.678367
false
3.58283
false
false
false
qedsoftware/commcare-hq
corehq/apps/api/domain_metadata.py
1
3814
import logging from corehq.apps.api.resources.auth import AdminAuthentication from corehq.apps.api.resources.meta import CustomResourceMeta from corehq.apps.api.serializers import XFormInstanceSerializer from corehq.apps.domain.models import Domain from corehq.apps.accounting.models import Subscription from corehq.app...
bsd-3-clause
2,617,106,799,787,753,500
35.32381
108
0.62795
false
4.270997
false
false
false
CKPalk/SeattleCrime_DM
DataMining/Maps/Generators/Time_vs_Day_Multi.py
1
1093
# # Preparing the data # import numpy as np import pandas as pd import matplotlib.pyplot as plt import sys df = pd.read_csv( sys.argv[ 1 ] ) # Add column containing day of week expressed in integer df[ 'DOW' ] = df.Day_num.map( lambda x: x-1 ) # Add column containing time of day df[ 'Hour' ] = pd.to_datetime(df....
mit
3,370,341,264,145,696,000
18.517857
71
0.583715
false
2.376087
false
false
false
agp8x/tf-weatherstation
Setup.py
1
4056
#!/usr/bin/python3 # -*- coding: utf-8 -*- from functools import partial import traceback try: from tinkerforge.ip_connection import IPConnection except ImportError: print("package 'tinkerforge' not installed, canceling") raise Exception("package 'tinkerforge' not installed, canceling") from config impor...
gpl-3.0
6,821,982,751,625,541,000
38.378641
100
0.616617
false
4.06006
false
false
false
lavende/seu-history
history/settings.py
1
2332
""" Django settings for history project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) im...
apache-2.0
-2,199,476,622,687,034,000
21.872549
71
0.712693
false
3.19015
false
false
false
lrq3000/author-detector
authordetector/doxymainpage.py
1
13953
## @mainpage AuthorDetector developer's documentation # @section intro_sec Introduction # AuthorDetector is a framework to quickly develop, experiment and prototype author identification models. # # The main purpose of this project is to be: # - Modular: can just create new algorithms and modules without even knowing...
gpl-3.0
-6,945,966,265,736,231,000
97.964539
591
0.780477
false
4.33054
true
false
false
Turbo87/welt2000
welt2000/commands/babel.py
1
1376
from os import system, path from flask.ext.script import Manager from welt2000 import __title__, __version__, __email__ BABEL_FOLDER = path.join('welt2000', 'translations') POT_PATH = path.join(BABEL_FOLDER, 'messages.pot') manager = Manager(help='i18n support via Flask-Babel') def run(command): system(comman...
mit
303,910,067,517,453,060
25.980392
75
0.627907
false
3.331719
false
false
false
dwoods/gn-maps
geonode/layers/migrations/0003_auto__add_missing_fields.py
4
23500
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Layer.csw_typename' db.add_column('layers_layer', 'csw_typename', self.gf('django.db.models.fi...
gpl-3.0
7,787,486,143,195,501,000
78.931973
217
0.564426
false
3.568175
false
false
false
tkorchug/panda-bigmon-core
core/wsgi.py
3
2334
""" WSGI config for bigpandamon project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ further doc: http://thecodeship.com/deployment/deploy-django-apache-virtualenv-and-mod_wsgi/ """...
apache-2.0
5,635,776,150,814,332,000
30.12
92
0.753642
false
3.291961
false
false
false
edne/gletools
examples/blur/app.py
1
2846
from __future__ import with_statement from __future__ import absolute_import import pyglet from gletools import ( ShaderProgram, VertexShader, FragmentShader, Texture, Framebuffer, Sampler2D, Projection, Screen, ) from gletools.gl import * window = pyglet.window.Window() framebuffer = Framebuffer( Te...
agpl-3.0
-3,955,799,002,291,555,000
24.185841
89
0.625439
false
2.918974
false
false
false