repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
kmARC/Cloud99
runners/baseRunner.py
1
1077
import ha_engine.ha_infra as common LOG = common.ha_logging(__name__) class BaseRunner(object): def __init__(self, input_args): self.ha_report = [] self.input_args = {} if input_args: self.set_input_arguments(input_args) def set_input_arguments(self, input_args): ...
apache-2.0
-7,036,798,112,431,719,000
27.342105
74
0.663881
false
wojla/kozaczko
biblio/settings.py
1
2066
# """ # Django settings for biblio 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(B...
mit
-726,473,775,652,205,600
23.891566
71
0.719264
false
beingzy/user_recommender_framework
network_simulator/GuidedUserClickSimulator.py
1
1477
""" objective introduction Author: Yi Zhang <beingzy@gmail.com> Date: 2016/05/09 """ from .UserClickSimulator import UserClickSimulatorMixin def convert_pair_dictionary(user_connections): """ translate user pairs into user-wise dictionary """ user_conn_dict = {} for ii, (uid_a, uid_b) in enumerate(us...
gpl-3.0
-7,057,734,268,814,471,000
28.54
88
0.607312
false
ask/python-github2
github2/teams.py
1
3026
# Copyright (C) 2011-2012 James Rowe <jnrowe@gmail.com> # Patryk Zawadzki <patrys@pld-linux.org> # # This file is part of python-github2, and is made available under the 3-clause # BSD license. See LICENSE for the full details. from github2.core import BaseData, GithubCommand, Attribute, requi...
bsd-3-clause
8,555,084,811,293,170,000
28.666667
79
0.579974
false
acutesoftware/AIKIF
aikif/.z_prototype/tools.py
1
4110
# coding: utf-8 # tools.py written by Duncan Murray 20/3/2014 (C) Acute Software # Script to configure the functional toolbox of AIKIF import os import sys import time from random import randint import aikif.toolbox.Toolbox as mod_tool import aikif.config as mod_cfg aikif_dir = mod_cfg.core_folder # os.path.dirname(o...
gpl-3.0
-9,033,121,310,961,446,000
44.666667
143
0.602676
false
michalochman/complex-networks
code/calc-users-topics-count.py
1
1552
from collections import OrderedDict import os from multiprocessing import Process, Queue, JoinableQueue, cpu_count import math import MySQLdb from MySQLdb.cursors import SSDictCursor from scur_mgr import DB_HOST, DB_USER, DB_PASS, DB_NAME, DB_TABLE_RELATIONSHIPS __DIR__ = os.path.dirname(os.path.abspath(__file__)) i...
mit
-1,621,546,364,814,652,400
31.354167
128
0.592784
false
IDMIPPM/reliability-aware-resynthesis
resynthesis/resynthesis_create_subckts.py
1
39197
# coding: utf-8 __author__ = 'IDM.IPPM (Roman Solovyev)' import os import subprocess import re import random from resynthesis.resynthesis_external_stats import get_project_directory import resynthesis as sa # Получает список уникальных имен узлов из структуры merge def getUniqueNames(m): lst = [] for o in m: ...
apache-2.0
969,359,723,190,603,000
34.828829
138
0.447462
false
Attorney-Fee/django-wiki
wiki/conf/settings.py
1
6506
# -*- coding: utf-8 -*- from django.conf import settings as django_settings from django.core.urlresolvers import reverse_lazy from django.utils.translation import ugettext as _ # Should urls be case sensitive? URL_CASE_SENSITIVE = getattr( django_settings, 'WIKI_URL_CASE_SENSITIVE', False ) # Non-configurable (at the...
gpl-3.0
-3,424,891,487,880,541,700
42.959459
161
0.724255
false
Yukarumya/Yukarum-Redfoxes
python/mozbuild/mozbuild/frontend/emitter.py
1
61700
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from __future__ import absolute_import, unicode_literals import itertools import logging import os import traceback imp...
mpl-2.0
136,273,668,066,256,000
42.696884
119
0.541896
false
ooici/coi-services
ion/services/eoi/table_loader.py
1
13500
#!/usr/bin/python """ A Service to load data products into PostgreSQL and Geoserver """ __author__ = 'abird' from pyon.util.breakpoint import breakpoint from pyon.ion.resource import LCS, LCE, PRED from pyon.util.file_sys import FileSystem, FS import psycopg2 import requests import os from pyon.public import CFG from...
bsd-2-clause
4,371,377,394,359,796,000
38.823009
147
0.545259
false
note35/sinon
sinon/test/TestSinonMatcher.py
1
5492
import sys sys.path.insert(0, '../') import unittest import lib.base as sinon from lib.matcher import SinonMatcher from lib.spy import SinonSpy from lib.stub import SinonStub """ ====================================================== FOR TEST ONLY START ===============================================...
bsd-2-clause
4,025,504,554,026,396,000
31.497041
81
0.593227
false
nasimrahaman/tracky-mctrackface
tmtf/net.py
1
4380
import theano as th import theano.tensor as T import Antipasti.netkit as nk import Antipasti.netarchs as na import Antipasti.archkit as ak import Antipasti.netools as ntl import Antipasti.netrain as nt import Antipasti.backend as A __doc__ = """Model Zoo""" # Define shortcuts # Convlayer with ELU cl = lambda fmapsin...
mit
-8,449,824,629,756,680,000
39.183486
119
0.613014
false
SNeuhausen/training_management
models/teaching_selection_wizard/teaching_selection_wizard.py
1
3023
# -*- coding: utf-8 -*- from openerp.api import depends, multi from openerp.fields import Many2one, Many2many, Boolean from openerp.models import TransientModel from openerp.addons.training_management.models.model_names import ModelNames from openerp.addons.training_management.utils.action_utils import ActionUtils fr...
gpl-3.0
2,646,424,817,527,438,300
37.240506
111
0.656405
false
TeamBasedLearning/Service
pgtbl/accounts/tests/test_model.py
1
2437
from rest_framework.test import APITestCase from accounts.models import User class UserTestCase(APITestCase): """ Unit test case to test user features. """ def setUp(self): """ This method will run before any test. """ self.superuser = User.objects.create_superuser( ...
gpl-3.0
198,308,726,957,194,020
30.24359
78
0.586377
false
jeremiah-c-leary/vhdl-style-guide
vsg/rules/generate/rule_400.py
1
1308
from vsg.rules import align_tokens_in_region_between_tokens_when_between_tokens_unless_between_tokens from vsg import token lAlign = [] lAlign.append(token.full_type_declaration.identifier) lAlign.append(token.incomplete_type_declaration.identifier) lAlign.append(token.file_declaration.identifier) lAlign.append(toke...
gpl-3.0
-5,148,443,936,430,004,000
39.875
178
0.791284
false
kevinjqiu/btsync.py
docs/conf.py
1
7788
# -*- coding: utf-8 -*- # # btsync.py documentation build configuration file, created by # sphinx-quickstart on Wed Oct 9 17:19:48 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
mit
-3,814,393,141,935,559,700
31.181818
80
0.703518
false
kwikadi/orange3
Orange/tests/test_instance.py
1
14396
from math import isnan import warnings import unittest from unittest.mock import MagicMock import numpy as np from numpy.testing import assert_array_equal from Orange.data import \ Instance, Domain, Unknown, Value, \ DiscreteVariable, ContinuousVariable, StringVariable class TestInstance(unittest.TestCase):...
bsd-2-clause
-9,191,138,324,597,714,000
38.658402
80
0.527091
false
yulbryn/armory-leap
python/lib/ws4py/server/geventserver.py
2
3779
# -*- coding: utf-8 -*- __doc__ = """ WSGI entities to support WebSocket from within gevent. Its usage is rather simple: .. code-block: python from gevent import monkey; monkey.patch_all() from ws4py.websocket import EchoWebSocket from ws4py.server.geventserver import WSGIServer from ws4py.server.wsg...
gpl-3.0
-3,232,764,169,154,879,500
30.231405
97
0.63747
false
google-research/sloe-logistic
sloe_experiments/p_values.py
1
2329
# coding=utf-8 # Copyright 2021 The SLOE Logistic Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
6,458,165,117,299,555,000
30.053333
78
0.717475
false
arrabito/DIRAC
ResourceStatusSystem/Utilities/CSHelpers.py
1
11101
""" CSHelpers Module containing functions interacting with the CS and useful for the RSS modules. """ import errno from DIRAC import gConfig, gLogger, S_OK, S_ERROR from DIRAC.Core.Utilities.SitesDIRACGOCDBmapping import getGOCSiteName from DIRAC.ResourceStatusSystem.Utilities import Utils from DIRAC.Resources.S...
gpl-3.0
4,771,185,437,900,824,000
22.321429
105
0.651653
false
rhoscanner-team/pcd-plotter
delaunay_example.py
1
1435
import numpy as np from scipy.spatial import Delaunay points = np.random.rand(30, 2) # 30 points in 2-d tri = Delaunay(points) # Make a list of line segments: # edge_points = [ ((x1_1, y1_1), (x2_1, y2_1)), # ((x1_2, y1_2), (x2_2, y2_2)), # ... ] edge_points = [] edges = set() def ad...
gpl-2.0
-7,879,795,444,467,567,000
24.175439
81
0.632753
false
mathieugouin/txtWeb
mailer.py
1
4448
# User libs import mgouinlib as mgl import sendmail as sendmail # System libs import webapp2 #******************************************************************************* # http://localhost:8080/mailer?from=me@acme.com&to=mgouin@gmail.com&message=hello&subject=test&name=Mat%20Gouin&redirect=redir # http://mgouin....
gpl-2.0
3,905,436,552,790,530,000
37.017094
138
0.468076
false
jakeshi/python-twitter
twitter/api.py
1
202358
#!/usr/bin/env python # # # Copyright 2007-2016 The Python-Twitter Developers # # 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
864,313,760,263,173,100
38.499902
145
0.549981
false
sealuzh/ContextBasedAnalytics
model/connection.py
1
1087
class Connection(object): def __init__(self, method, status, url, timestamp): self.method = method self.status = status self.url = url self.timestamp = timestamp self.label = self.assign_label() def assign_label(self): parameter_url_split = self.url.split('?') if len(parameter_url_spli...
apache-2.0
-3,840,156,015,687,418,000
26.871795
108
0.655934
false
medialab/reanalyse
outside/views.py
1
34992
#!/usr/bin/python # -*- coding: utf-8 -*- import urllib, os from django.core import serializers from django.contrib.auth import login, logout, authenticate from django.contrib.auth.decorators import login_required, permission_required from django.contrib.auth.models import User from django.conf import settings from...
lgpl-3.0
7,209,418,571,269,518,000
30.576715
248
0.670697
false
sjholden/traveller-universe
travelleruniverse/world/world.py
1
1259
''' Created on May 30, 2017 @author: Sam Holden <sholden@holden.id.au> ''' class World(object): ''' classdocs ''' def __init__(self, port, size, atmo, hydro, pop, govt, law, tech, bases=None, extra=None): ''' Constructor ''' self._port = port ...
gpl-3.0
-8,847,898,661,072,577,000
20.927273
94
0.50834
false
simonspa/django-datacollect
datacollect/survey/migrations/0074_auto_20161128_1022.py
1
2106
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-11-28 09:22 from __future__ import unicode_literals from django.db import migrations, models import select_multiple_field.models class Migration(migrations.Migration): dependencies = [ ('survey', '0073_auto_20161123_1720'), ] operations ...
gpl-3.0
1,470,687,113,668,205,800
66.935484
874
0.635802
false
linvictor88/vse-lbaas-driver
quantum/plugins/brocade/QuantumPlugin.py
1
19982
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Brocade Communications System, Inc. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
apache-2.0
2,346,525,727,396,633,600
39.205231
79
0.564408
false
rlutz/xorn
src/gaf/netlist/slib.py
1
1934
# gaf.netlist - gEDA Netlist Extraction and Generation # Copyright (C) 1998-2010 Ales Hvezda # Copyright (C) 1998-2010 gEDA Contributors (see ChangeLog for details) # Copyright (C) 2013-2019 Roland Lutz # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Publ...
gpl-2.0
7,368,122,807,875,870,000
36.192308
73
0.725957
false
nextgis-extra/tests
lib_gdal/utilities/test_gdal_grid.py
1
36399
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id: test_gdal_grid.py 32170 2015-12-13 19:59:59Z goatbar $ # # Project: GDAL/OGR Test Suite # Purpose: gdal_grid testing # Author: Even Rouault <even dot rouault @ mines-paris dot org> # ...
gpl-2.0
-3,094,923,045,946,894,300
37.314737
345
0.611171
false
rephorm/libnotify-mozilla
indicator.py
1
3854
#!/usr/bin/env python import gtk, glib, sys, fcntl, os import gobject import indicate class MessagingServer: def __init__(self, subtype, desktop): self.indicators = {} self.actions = {} self.user_cb = None self.server_cb = None self.desktop = desktop self.srv = indicate.indicate_server_ref_...
gpl-3.0
5,225,121,163,404,387,000
24.355263
79
0.629216
false
dliessi/frescobaldi
frescobaldi_app/viewers/documents.py
1
4042
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # 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 ...
gpl-2.0
7,887,973,219,943,224,000
33.844828
91
0.65809
false
tcstewar/telluride2014
tank/tankudp.py
1
2078
import time import socket import nengo class TankUDP(nengo.Node): def __init__(self, address, port=8889, period=0.1): self.target = (address, port) self.period = period self.data = [0,0,0,0] self.last_time = None self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)...
gpl-3.0
-3,970,165,346,261,248,000
33.633333
82
0.440808
false
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/answers/browser/tests/test_question.py
1
6315
# Copyright 2010 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Tests for the question module.""" __metaclass__ = type __all__ = [] from zope.security.proxy import removeSecurityProxy from lp.answers.browser.question import QuestionTarge...
agpl-3.0
8,673,996,265,418,779,000
39.480769
77
0.67015
false
eykd/syml
syml/parser.py
1
3207
from parsimonious import NodeVisitor, Grammar, VisitationError from . import grammars from . import nodes from .exceptions import OutOfContextNodeError class TextOnlySymlParser(NodeVisitor): grammar = Grammar(grammars.text_only_syml_grammar) def reduce_children(self, children): children = [c for c i...
mit
-4,732,940,867,475,525,000
30.752475
74
0.623636
false
wangsix/vmo
vmo/plot.py
1
5141
""" plot.py drawing routines for vmo Copyright (C) 8.20.2014 Cheng-i Wang This file is part of vmo. vmo 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 l...
gpl-3.0
7,331,357,824,226,617,000
30.931677
96
0.576542
false
dude56987/DoThis
speakthis.py
1
7865
#! /usr/bin/python ######################################################################## # SpeakThis speaks the currently highlighted text using espeak. # Copyright (C) 2013 Carl J Smith # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
gpl-3.0
-4,459,860,735,749,077,500
45.538462
284
0.645645
false
mspublic/openair4G-mirror
targets/TEST/OAI/case01.py
1
11144
#****************************************************************************** # Eurecom OpenAirInterface # Copyright(c) 1999 - 2013 Eurecom # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by ...
gpl-3.0
-2,948,093,134,201,896,000
39.231047
228
0.566942
false
andyseubert/doorbell
doorBellListener.py
1
1322
#!/usr/bin/python from time import sleep import os import sys import subprocess from subprocess import Popen import RPi.GPIO as GPIO # global variables for commands and status global alertcmd alertcmd = "/opt/doorbell/ringer.py" bellButtonPin=26 # board pin numbers are easier for me. If I move to another RPI versio...
unlicense
-8,915,464,939,995,576,000
29.045455
98
0.736006
false
BruceDLong/CodeDog
Docs/source/conf.py
1
5796
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # CodeDog documentation build configuration file, created by # sphinx-quickstart on Tue Dec 1 11:27:30 2020. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # au...
gpl-2.0
4,719,379,069,325,472,000
28.125628
80
0.672878
false
rdkit/rdkit-orig
rdkit/Chem/SATIS.py
2
3432
# $Id$ # # Copyright (C) 2001-2006 greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """ Functionality for ...
bsd-3-clause
-4,643,794,991,775,500,000
26.902439
72
0.614219
false
nathanshartmann/portuguese_word_embeddings
sentence_similarity.py
1
3369
""" This script evaluates a embedding model in a semantic similarity perspective. It uses the dataset of ASSIN sentence similarity shared task and the method of Hartmann which achieved the best results in the competition. ASSIN shared-task website: http://propor2016.di.fc.ul.pt/?page_id=381 Paper of Hartmann can be ...
gpl-3.0
7,752,934,141,966,542,000
32.69
79
0.646483
false
aholkner/bacon
bacon/resource.py
1
1151
import os import sys from bacon import native #: Path to resources. Set to the script directory by default during development, and the executable #: directory for frozen applications. resource_dir = os.path.abspath(os.path.dirname(sys.argv[0])) if native._mock_native: resource_dir = '' # Or use frozen executab...
mit
5,605,592,067,121,228,000
31.914286
100
0.707211
false
hetajen/vnpy161
vn.trader/ctaStrategy/ctaBacktesting.py
1
40890
# encoding: UTF-8 ''' 本文件中包含的是CTA模块的回测引擎,回测引擎的API和CTA引擎一致, 可以使用和实盘相同的代码进行回测。 History <id> <author> <description> 2017051200 hetajen 样例:策略回测和优化 ''' from __future__ import division '''2017051200 Add by hetajen begin''' import time '''2017051200 Add by hetajen end''' from datetime import d...
mit
-668,877,765,279,320,800
35.246507
98
0.467592
false
googleapis/python-dialogflow-cx
google/cloud/dialogflowcx_v3beta1/services/flows/transports/grpc_asyncio.py
1
23309
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-2,634,202,347,345,729,500
42.325279
88
0.617916
false
botswana-harvard/tshilo-dikotla
td_maternal/forms/maternal_contact_form.py
1
1974
from django import forms from edc_constants.constants import YES from ..models import MaternalContact, MaternalLocator class MaternalContactForm(forms.ModelForm): def clean(self): cleaned_data = super(MaternalContactForm, self).clean() self.validate_maternal_locator() self.validate_conta...
gpl-2.0
-3,322,033,492,145,352,700
41.913043
105
0.611449
false
google/eclipse2017
scripts/obtain_token.py
1
2613
# # 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
1,149,795,917,191,979,800
35.291667
113
0.724837
false
seishei/multiprocess
py3.2/multiprocess/dummy/__init__.py
2
4590
# # Support for the API of the multiprocessing package using threads # # multiprocessing/dummy/__init__.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: ...
bsd-3-clause
-2,710,518,699,465,600,000
28.235669
79
0.676688
false
TiddlySpace/tiddlyspace
test/test_web_htmljavascript.py
1
2427
import pytest from test.fixtures import make_test_env, make_fake_space, get_auth from wsgi_intercept import httplib2_intercept import wsgi_intercept import httplib2 import simplejson from tiddlyweb.model.tiddler import Tiddler from tiddlyweb.web.util import encode_name def setup_module(module): make_test_env(m...
bsd-3-clause
5,711,042,658,843,738,000
34.691176
86
0.682736
false
gurneyalex/odoo
addons/fleet/models/fleet_vehicle.py
4
20652
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from dateutil.relativedelta import relativedelta from odoo import api, fields, models, _ from odoo.osv import expression class FleetVehicle(models.Model): _inherit = ['mail.thread', 'mail.activity.mixin'] _nam...
agpl-3.0
-9,049,208,608,646,020,000
51.683673
209
0.617035
false
avedaee/DIRAC
TransformationSystem/Client/TransformationClient.py
1
22189
""" Class that contains client access to the transformation DB handler. """ __RCSID__ = "$Id$" import types from DIRAC import S_OK, S_ERROR, gLogger from DIRAC.Core.Base.Client import Client from DIRAC.Core.Utilities.List ...
gpl-3.0
-7,001,248,997,333,648,000
42.337891
161
0.629997
false
sql-machine-learning/sqlflow
python/runtime/dbapi/hive.py
1
3946
# Copyright 2020 The SQLFlow Authors. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
-3,445,714,880,476,136,400
32.159664
76
0.590471
false
andrewfu0325/gem5-aladdin
configs/common/Caches.py
1
3830
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
bsd-3-clause
5,390,287,003,320,646,000
36.184466
72
0.747781
false
franek/weboob
weboob/tools/date.py
1
4493
# -*- coding: utf-8 -*- # Copyright(C) 2010-2013 Romain Bignon # # This file is part of weboob. # # weboob 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...
agpl-3.0
-8,122,204,400,357,521,000
38.069565
97
0.639884
false
torstehu/medlemssys
medlemssys/innhenting/management/commands/postnr_bolstad_import.py
1
2788
# -*- coding: utf-8 -*- # vim: shiftwidth=4 tabstop=4 expandtab softtabstop=4 ai # Copyright 2009-2014 Odin Hørthe Omdal # This file is part of Medlemssys. # Medlemssys 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 Sof...
agpl-3.0
2,682,141,056,814,976,500
35.657895
162
0.585786
false
yukim/cassandra-dtest
cql_tests.py
1
219237
# coding: utf-8 import random import time from collections import OrderedDict from uuid import uuid4, UUID from dtest import Tester, canReuseCluster, freshCluster from assertions import assert_invalid, assert_one, assert_none, assert_all from tools import since, require, rows_to_list from cassandra import Consistency...
apache-2.0
-2,856,207,298,656,864,000
41.229436
191
0.536278
false
voytekresearch/fakespikes
fakespikes/neurons.py
1
4820
# -*- coding: utf-8 -*- import numpy as np from numpy.random import RandomState from fakespikes.util import to_spikes from fakespikes.rates import constant class Spikes(object): """Simulates statistical models of neural spiking Params ------ n : int Number of neurons t : float Sim...
mit
-3,318,524,617,815,953,400
28.390244
74
0.541079
false
Didacti/botornado
botornado/s3/key.py
1
40979
#!/usr/bin/env python # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Nexenta Systems Inc. # # 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 restric...
mit
-2,260,968,066,132,986,000
44.431264
103
0.544889
false
radjkarl/dataArtist
dataArtist/figures/image/tools/input/VideoStream.py
1
2582
# coding=utf-8 from __future__ import division import cv2 import numpy as np from pyqtgraph_karl.Qt import QtCore from imgProcessor.transformations import toFloatArray from dataArtist.widgets.Tool import Tool class VideoStream(Tool): ''' Capture the video stream from a connected webcam. ''' icon = ...
gpl-3.0
5,214,445,681,117,259,000
28.011236
70
0.525949
false
CyrilWaechter/pyRevitMEP
pyRevitMEP.tab/Lab.panel/Lab.pulldown/AirFlowSpaceToTerminal.pushbutton/script.py
1
3085
# coding: utf8 from Autodesk.Revit.DB import ( FilteredElementCollector, BuiltInCategory, Transaction, Document, BuiltInParameter, Category, Connector, ) from Autodesk.Revit.DB.Mechanical import DuctFlowConfigurationType import rpw from pyrevit import script, forms __title__ = "AirFlowSpac...
gpl-3.0
-406,586,815,082,952,960
30.804124
104
0.631767
false
martinb3/helpbot
plugins/help.py
1
1095
from lib import helps from lib import utils outputs = [] def process_message(data): if data.get('text', '').split(' ')[0] == '!help': admin_channel, botname, icon_emoji = utils.setup_bot(config) message_attrs = {'icon_emoji': icon_emoji, 'username': botname} # Translate channel id to cha...
mit
3,180,540,034,602,252,300
34.322581
71
0.603653
false
santoshphilip/eppy
eppy/useful_scripts/eppyreadtest_file.py
1
2848
# Copyright (c) 2012 Santosh Philip # ======================================================================= # Distributed under the MIT License. # (See accompanying file LICENSE or copy at # http://opensource.org/licenses/MIT) # ======================================================================= """ script to ...
mit
584,645,335,740,861,600
32.116279
87
0.658006
false
Pfeter/SpaceShooter
background.py
1
1843
import sys, random import pygame from pygame.locals import * class Screen(object): def __init__(self, width=640, height=400, fps=60, stars=200): self.running = True self.fps = fps self.playtime = 0.0 self.total_stars = stars pygame.init() pygame.display.set_caption("Press ESC to quit") self.width = w...
mit
3,407,102,023,887,565,300
24.957746
107
0.657081
false
icgood/pymap
pymap/plugin.py
1
3579
from __future__ import annotations from collections.abc import Callable, Iterable, Iterator, Mapping from typing import TypeVar, Generic, Optional, Final from pkg_resources import iter_entry_points, DistributionNotFound __all__ = ['PluginT', 'Plugin'] #: The plugin type variable. PluginT = TypeVar('PluginT') cla...
mit
7,337,603,406,598,405,000
30.121739
101
0.582844
false
prashantas/MyDataScience
GeneralPython/PyDataStructure/multiValuedDict.py
1
1163
#http://code.activestate.com/recipes/52219-associating-multiple-values-with-each-key-in-a-dic/ #https://www.oreilly.com/library/view/python-cookbook/0596001673/ch01s06.html def repeatedValue(): # this method allows duplicate values for the same key d = dict() # To add a key->value pair, do this: #d.set...
bsd-2-clause
8,858,082,615,650,891,000
26.690476
94
0.600172
false
boxed/CMi
web_frontend/CMi/tvshows/api.py
1
1578
from django.template.loader import render_to_string from django.conf.urls import patterns from CMi.tvshows.models import Episode, Category def tv_show_tile(title, episodes, category=None): return ( 10, render_to_string('tile.html', { 'url': '/tvshows/' + (('category/%s/' % category.pk) if categ...
mit
6,253,094,463,314,585,000
53.448276
304
0.607731
false
khchine5/xl
lino_xl/lib/postings/mixins.py
1
2368
# -*- coding: UTF-8 -*- # Copyright 2012-2016 Luc Saffre # # License: BSD (see file COPYING for details) """ Defines models for :mod:`lino_xl.lib.postings`. """ from django.contrib.contenttypes.models import ContentType from django.utils.translation import ugettext_lazy as _ from lino.core import actions from lino....
bsd-2-clause
-8,290,678,036,793,711,000
26.218391
74
0.585726
false
ajyoon/brown
tests/mocks/mock_graphic_object_interface.py
1
1231
from PyQt5 import QtWidgets from brown.core.brush_pattern import BrushPattern from brown.core.pen_cap_style import PenCapStyle from brown.core.pen_join_style import PenJoinStyle from brown.core.pen_pattern import PenPattern from brown.interface.brush_interface import BrushInterface from brown.interface.graphic_object_...
gpl-3.0
-6,671,446,716,516,352,000
35.205882
75
0.683184
false
aagavin/Friday-Flair-Python-reddit-api
reddit/helpers.py
1
3568
# This file is part of reddit_api. # # reddit_api 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. # # reddit_api is distributed in the ...
gpl-3.0
1,856,128,301,368,777,000
35.408163
79
0.640415
false
JoelBender/bacpypes
tests/test_constructed_data/helpers.py
1
2570
#!/usr/bin/python """ Helper classes for constructed data tests. """ from bacpypes.debugging import bacpypes_debugging, ModuleLogger, xtob from bacpypes.errors import MissingRequiredParameter from bacpypes.primitivedata import Boolean, Integer, Tag, TagList from bacpypes.constructeddata import Element, Sequence # s...
mit
3,345,657,281,038,894,000
28.204545
130
0.64358
false
merenlab/anvio
anvio/drivers/MODELLER.py
1
40930
# coding: utf-8 """ Interface to MODELLER (https://salilab.org/modeller/). """ import os import anvio import shutil import argparse import subprocess import pandas as pd import anvio.utils as utils import anvio.fastalib as u import anvio.terminal as terminal import anvio.constants as constants import anvio.filesnpath...
gpl-3.0
-6,874,570,277,576,418,000
42.681964
157
0.608209
false
huijunwu/heron
heronpy/streamlet/impl/reducebykeyandwindowbolt.py
1
5269
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache...
apache-2.0
-2,289,694,245,475,044,900
43.277311
94
0.724236
false
bloomberg/chef-bcpc
virtual/bin/generate-chef-databags.py
1
1488
#!/usr/bin/env python3 # Copyright 2020, Bloomberg Finance L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable...
apache-2.0
4,527,267,695,024,593,400
27.615385
74
0.665323
false
sharbison3/python-docs-samples
bigtable/autoscaler/autoscaler_test.py
1
2682
# 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,261,725,935,538,267,100
29.134831
74
0.700224
false
maralla/completor.vim
tests/conftest.py
1
2190
# -*- coding: utf-8 -*- import os import sys import pytest import mock from copy import deepcopy class VimError(Exception): pass class List(object): pass class Vars(dict): def __set__(self, inst, value): if not value: inst._vars = deepcopy(self) inst._vars.update(value) ...
mit
-2,497,200,517,213,834,000
19.857143
67
0.574429
false
quodlibet/mutagen
mutagen/oggopus.py
1
5334
# Copyright (C) 2012, 2013 Christoph Reiter # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. """Read and write Ogg Op...
gpl-2.0
-5,781,207,931,457,435,000
28.147541
78
0.627109
false
pbs/django-filer
filer/utils/generate_filename.py
1
1841
import datetime import os import filer from filer.utils.files import get_valid_filename from django.core.files.uploadedfile import UploadedFile from django.utils.encoding import smart_str def by_date(instance, filename): datepart = str(datetime.datetime.now().strftime(smart_str("%Y/%m/%d"))) return os.path....
bsd-3-clause
5,553,913,049,167,690,000
28.222222
77
0.664856
false
PennyDreadfulMTG/Penny-Dreadful-Tools
decksite/charts/chart.py
1
2940
import os.path import pathlib from typing import Dict import matplotlib as mpl # This has to happen before pyplot is imported to avoid needing an X server to draw the graphs. # pylint: disable=wrong-import-position mpl.use('Agg') import matplotlib.pyplot as plt import seaborn as sns from decksite.data import deck fro...
gpl-3.0
-2,024,999,655,757,413,000
37.684211
131
0.633333
false
robertsj/poropy
poropy/coretools/laban.py
1
9241
''' Created on Dec 11, 2011 @author: robertsj ''' from evaluator import Evaluator import numpy as np import os class Laban(Evaluator): """ Uses the LABAN-PEL code to evaluate loading patterns. """ # Public Interface def __init__(self, rank=0) : """ Constructor Parameter...
mit
5,067,928,261,008,976,000
35.670635
108
0.450601
false
james-d-mitchell/libsemigroups-python-bindings
tests/test_semifp.py
1
10732
# pylint: disable = C0103,E0611,C0111,W0104,R0201 import unittest import sys import os from semigroups import FpSemigroup, FpMonoid path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) if path not in sys.path: sys.path.insert(1, path) del path class TestFpSemigroup(unittest.TestCase): def tes...
gpl-3.0
-8,928,574,193,098,366,000
36.263889
83
0.492732
false
opennode/nodeconductor-saltstack
src/nodeconductor_saltstack/exchange/cost_tracking.py
1
1101
from nodeconductor.cost_tracking import CostTrackingStrategy, CostTrackingRegister, ConsumableItem from . import models class ExchangeTenantStrategy(CostTrackingStrategy): resource_class = models.ExchangeTenant class Types(object): SUPPORT = 'support' STORAGE = 'storage' class Keys(obje...
mit
-468,962,099,311,564,200
32.363636
114
0.684832
false
inercia/evy
tests/stdlib/test_threading.py
1
1651
from evy import patcher from evy.patched import threading from evy.patched import thread from evy.patched import time # *NOTE: doesn't test as much of the threading api as we'd like because many of # the tests are launched via subprocess and therefore don't get patched patcher.inject('test.test_threading', ...
mit
-330,612,090,144,291,650
34.891304
82
0.736523
false
ajdawson/windspharm
examples/iris/rws_example.py
1
2190
"""Compute Rossby wave source from the long-term mean flow. This example uses the iris interface. Additional requirements for this example: * iris (http://scitools.org.uk/iris/) * matplotlib (http://matplotlib.org/) * cartopy (http://scitools.org.uk/cartopy/) """ import warnings import cartopy.crs as ccrs import i...
mit
-1,699,799,583,394,681,900
32.181818
76
0.73379
false
Johnetordoff/waterbutler
tests/providers/github/test_provider.py
1
45643
import pytest import io import os import copy import json import base64 import hashlib from http import client import aiohttpretty from waterbutler.core import streams from waterbutler.core import exceptions from waterbutler.core.path import WaterButlerPath from waterbutler.core.provider import build_url from water...
apache-2.0
-6,292,797,433,193,074,000
46.054639
254
0.613391
false
ljwolf/pysal_core
libpysal/weights/_contW_lists.py
1
3800
from ..cg.shapes import Polygon import itertools as it from sys import version_info import collections QUEEN = 1 ROOK = 2 if version_info[0] == 2: zip = it.izip range = xrange __author__ = "Jay Laura jlaura@asu.edu" def _get_verts(pgon): if isinstance(pgon, Polygon): return pgon.vertices else:...
bsd-3-clause
1,847,765,243,791,407,600
29.894309
81
0.492632
false
caperren/Archives
OSU Coursework/ROB 421 - Applied Robotics/software/windows_packages/denso_slave/Framework/arm_control_receiver.py
1
9085
##################################### # Imports ##################################### # Python native imports from PyQt5 import QtCore, QtWidgets import pythoncom import win32com.client from time import time import socket import json ##################################### # Global Variables ############################...
gpl-3.0
-7,680,143,499,272,589,000
33.942308
129
0.571491
false
DataDog/brod
brod/base.py
1
32420
import binascii import logging import struct import time import sys, traceback from cStringIO import StringIO from collections import namedtuple from datetime import datetime from functools import partial __all__ = [ 'KafkaError', 'ConnectionFailure', 'OffsetOutOfRange', 'InvalidMessageCode', 'Wron...
mit
-6,190,908,027,129,328,000
38.013237
194
0.564312
false
gkulkarni/JetMorphology
fitjet_3d.py
1
5370
""" File: fitjet_3d.py Fits a geometric model to mock jet data. Uses image subtraction; otherwise same as fitjet.py """ import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import cm import scipy.optimize as op import emcee import triangle import sys # These mock data are pr...
mit
-4,125,838,441,567,503,000
26.680412
116
0.555121
false
RaspberryPiFi/CloudCode
handlers/api.py
1
5836
"""api.py: handles API requests""" __author__ = "Tom Hanson" __copyright__ = "Copyright 2014" __credits__ = ["Tom Hanson"] __license__ = "GPL" __maintainer__ = "Tom Hanson" __email__ = "tom@aporcupine.com" import json from google.appengine.api import memcache from google.appengine.ext import ndb import models from...
gpl-2.0
7,389,472,976,324,577,000
32.936047
80
0.625428
false
intel-ctrlsys/actsys
oobrestserver/oobrestserver/test/test_auth_server.py
1
2251
# -*- coding: utf-8 -*- # # Copyright (c) 2016-2017 Intel Corp. # import os import sys import base64 import uuid from cherrypy.test import helper from oobrestserver.Application import Application from oobrestserver.Authenticator import Authenticator class TestServer(helper.CPWebCase): app = None @staticm...
apache-2.0
-7,393,978,656,071,096,000
29.418919
85
0.558418
false
Svjard/presto-admin
prestoadmin/workers.py
1
3726
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
-3,800,782,643,496,563,000
37.412371
77
0.580247
false
Luthaf/Chemharp-python
chemfiles/trajectory.py
2
7109
# -*- coding=utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals from ctypes import c_uint64, c_char_p import sys from .utils import CxxPointer, _call_with_growing_buffer from .frame import Frame, Topology from .misc import ChemfilesError # Python 2 compatibility if sys.hexversion >= 0x...
mpl-2.0
5,389,887,010,910,090,000
31.912037
87
0.584048
false
ThomasBollmeier/GObjectCreator2
src/gobjcreator2/output/sections.py
1
2533
# # Copyright 2011 Thomas Bollmeier # # This file is part of GObjectCreator2. # # GObjectCreator2 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 late...
gpl-3.0
6,967,641,308,313,684,000
29.890244
94
0.564943
false
proversity-org/edx-platform
lms/djangoapps/bulk_reset_attempts/tests/test_views.py
1
6441
""" Tests for the Bulk Enrollment views. """ import ddt import json from django.core.urlresolvers import reverse from rest_framework.test import \ APIRequestFactory, APITestCase, force_authenticate from bulk_reset_attempts.serializers import BulkResetStudentAttemptsSerializer from bulk_reset_attempts.views impor...
agpl-3.0
6,005,615,642,526,080,000
30.729064
79
0.563267
false
listen-lavender/pholcus
gdc/task/news/toutiao.py
1
2955
#!/usr/bin/env python # coding=utf-8 from datetime import * from webcrawl.character import * from webcrawl.task import * from webcrawl.urlkit import URLParse from newsspider import * from webcrawl import request #_print, logger = logprint(modulename(__file__), modulepath(__file__)) class SpiderToutiao(SpiderNewsOrig...
mit
6,648,418,480,170,023,000
38
273
0.555556
false
timkofu/gitstars
stars/migrations/0001_initial.py
1
1853
# Generated by Django 3.0.8 on 2020-07-04 10:01 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='ProgrammingLanguage', fiel...
mit
7,964,705,436,317,314,000
37.604167
150
0.559093
false
samuelfd/harpia
harpia/bpGUI/xor.py
1
5854
# -*- coding: utf-8 -*- # [HARPIA PROJECT] # # # S2i - Intelligent Industrial Systems # DAS - Automation and Systems Department # UFSC - Federal University of Santa Catarina # Copyright: 2006 - 2007 Luis Carlos Dill Junges (lcdjunges@yahoo.com.br), Clovis Peruchi Scotti (scotti@ieee.org), # Guilh...
gpl-2.0
3,624,822,109,108,054,500
39.937063
143
0.534677
false
tomschr/sdsc
src/sdsc/__init__.py
1
1375
# # Copyright (c) 2017 SUSE Linux GmbH # # This program is free software; you can redistribute it and/or # modify it under the terms of version 3 of the GNU General Public License as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRAN...
lgpl-2.1
-7,583,139,108,530,900,000
31.738095
77
0.734545
false
sdbonin/SOQresearch
SOQswapRK4.py
1
8364
# -*- coding: utf-8 -*- """ This code uses a loop along with our set of coupled differential equations and matrix math to create arrays of 4-vector quaternions. The old plotting functions need to be updated and incorperated into the end of this code or a better visualization solution needs to be found. """ ...
mit
6,529,477,373,206,285,000
28.757353
95
0.50825
false
DMS-Aus/Roam
src/roam_tests/tests_editorwidgets/test_numberwidget.py
1
2390
import pytest from roam.editorwidgets.numberwidget import NumberWidget, DoubleNumberWidget config = { "prefix": "test_pre", "suffix": "test_suf", "max": 100, "min": 0 } def test_should_return_same_value(): widget = NumberWidget().createWidget(None) wrapper = NumberWidget(widget=widget) wr...
gpl-2.0
-1,665,007,667,072,634,000
27.117647
76
0.683264
false