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
lnanhkhoa/thesis-iot-khoa
iot/data/configNode.py
1
1711
databaseNode = { "DateNow": "2017-01-05", "TimeNow": "10:16:10", "d": { "dataNodeMaster01": { "Device01": 0, "Device02": 0, "Device03": 0, "Device04": 0, "Device05": 0, "Device06": 0, "Device07": 0, "Devi...
apache-2.0
-8,739,905,282,718,457,000
24.939394
29
0.354763
false
elhuhdron/emdrp
emdrp/emdrp/dpCubeIter.py
1
19641
#!/usr/bin/env python # The MIT License (MIT) # # Copyright (c) 2016 Paul Watkins, National Institutes of Health / NINDS # # 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...
mit
3,392,337,723,787,381,000
60.378125
120
0.611832
false
oldm/OldMan
oldman/exception.py
1
5501
#------------------- # Abstract types #------------------- class OMError(Exception): """Root of exceptions generated by the oldman package expected HTTP ones.""" pass class ModelGenerationError(OMError): """Error when generating a new model.""" pass class OMRuntimeError(OMError): """Error at r...
bsd-3-clause
282,539,723,383,344,740
21.275304
86
0.681331
false
jeeyoungk/exercise
python/calendar.py
1
1671
DAYS_IN_MONTH = [31,28,31,30,31,30,31,31,30,31,30,31] DAYS_IN_MONTH_CUMULATIVE = [None for i in range(12)] DOW = ['sun', 'mon', 'tues', 'wed', 'thurs', 'fri', 'sat'] # pre-calculate cumulative days till this month (not including this month). for i in range(12): if i == 0: DAYS_IN_MONTH_CUMULATIVE[i] = 0 else: ...
mit
-414,533,418,909,324,800
32.42
90
0.624177
false
feureau/Small-Scripts
Blender/Blender config/2.91/scripts/addons/bricker_v2-2-1/functions/brick/mesh_generators/tile.py
1
4378
# Copyright (C) 2020 Christopher Gearhart # chris@bblanimation.com # http://bblanimation.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, either version 3 of the License, or # (at your opt...
gpl-3.0
-8,467,515,662,449,953
39.165138
152
0.620603
false
lmjohns3/manifold-experiment
en-dee.py
1
6947
import climate import lmj.plot import logging import numpy as np import sklearn.decomposition import theanets climate.add_arg('--dimensions', type=int, default=10, metavar='D') climate.add_arg('--samples', type=int, default=1000, metavar='N') climate.add_arg('--clusters', type=int, default=20, metavar='K') climate.add...
mit
2,385,183,796,207,257,000
31.462617
93
0.549158
false
fgaudin/aemanager
accounts/migrations/0012_auto__add_field_expense_supplier.py
1
12652
# 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 'Expense.supplier' db.add_column('accounts_expense', 'supplier', self.gf('django.db.models....
agpl-3.0
5,774,475,095,478,383,000
81.155844
183
0.551138
false
laurentb/weboob
modules/lyricsmode/module.py
1
1723
# -*- coding: utf-8 -*- # Copyright(C) 2016 Julien Veyssier # # This file is part of a weboob module. # # This weboob module 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 Lice...
lgpl-3.0
-4,821,468,968,850,700,000
31.509434
86
0.713871
false
LIMXTEC/BitCore
contrib/seeds/generate-seeds.py
1
4341
#!/usr/bin/env python3 # Copyright (c) 2014-2017 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the dir...
mit
-4,901,292,662,621,745,000
30.456522
98
0.571067
false
cardmaster/makeclub
controlers/url.py
1
3202
'''Copyright(C): Leaf Johnson 2011 This file is part of makeclub. makeclub 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. makeclub ...
agpl-3.0
-1,901,133,220,814,521,600
35.804598
120
0.682698
false
JoeJimFlood/RugbyPredictifier
2020SuperRugby/matchup.py
1
16562
import os os.chdir(os.path.dirname(__file__)) import sim_util import sys import pandas as pd import numpy as np from numpy.random import poisson, uniform from numpy import mean import time import math po = False team_homes = pd.read_csv(os.path.join(os.path.split(__file__)[0], 'TeamHomes.csv'), header = None, index_...
mit
3,946,143,101,696,154,000
39.29927
162
0.55899
false
pyokagan/gyp
pylib/gyp/simple_copy.py
1
1385
# Copyright 2014 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """A clone of the default copy.deepcopy that doesn't handle cyclic structures or complex types except for dicts and lists. This is because gyp copies so large structur...
bsd-3-clause
4,918,599,992,610,725,000
22.474576
72
0.680866
false
mice-software/maus
bin/user/simulate_mice.py
1
2151
#!/usr/bin/env python """ Simulate the MICE experiment This will simulate MICE spills through the entirety of MICE using Geant4, then digitize and reconstruct TOF and tracker hits to space points. """ import io # generic python library for I/O import MAUS # MAUS libraries def run(): """ Run the macro ""...
gpl-3.0
-5,412,434,296,677,713,000
30.632353
80
0.699675
false
ibm-security-intelligence/api-samples
data_classification/02_LowLevelCategories.py
1
2598
#!/usr/bin/env python3 # This sample script demonstrates how to # 1. get a list of low level categories # 2. get a single low level category by its id import importlib import json import os import sys sys.path.append(os.path.realpath('../modules')) client_module = importlib.import_module('RestApiClient') SampleUtilit...
apache-2.0
4,357,113,796,614,164,000
32.74026
79
0.624326
false
lukaasp/libs
aws_xray_sdk/ext/django/middleware.py
1
3458
import logging import traceback from aws_xray_sdk.core import xray_recorder from aws_xray_sdk.core.models import http from aws_xray_sdk.core.models.trace_header import TraceHeader log = logging.getLogger(__name__) # Django will rewrite some http request headers. USER_AGENT_KEY = 'HTTP_USER_AGENT' X_FORWARDED_KEY = ...
unlicense
-9,111,171,738,209,037,000
31.622642
81
0.633892
false
yujikato/DIRAC
src/DIRAC/WorkloadManagementSystem/DB/PilotAgentsDB.py
1
43047
""" PilotAgentsDB class is a front-end to the Pilot Agent Database. This database keeps track of all the submitted grid pilot jobs. It also registers the mapping of the DIRAC jobs to the pilot agents. Available methods are: addPilotTQReference() setPilotStatus() deletePilot() clearPilo...
gpl-3.0
8,148,434,752,963,911,000
34.197874
119
0.572793
false
Endika/edx-platform
common/lib/xmodule/xmodule/course_module.py
1
56725
""" Django module container for classes and operations related to the "Course Module" content type """ import json import logging from cStringIO import StringIO from datetime import datetime import requests from django.utils.timezone import UTC from lazy import lazy from lxml import etree from path import Path as path...
agpl-3.0
1,317,115,201,239,316,500
38.201797
124
0.613874
false
jtotto/sooper-jack-midi-looper
src/GUI/jack_midi_looper_gui/engine_manager.py
1
10951
# JACK MIDI LOOPER # Copyright (C) 2014 Joshua Otto # # 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 any later version. # # This program is dis...
gpl-2.0
-1,342,625,881,783,382,500
35.748322
99
0.601863
false
ramansbach/cluster_analysis
clustering/visualize.py
1
2797
from __future__ import absolute_import, division, print_function import numpy as np import gsd.hoomd import sklearn import scipy.optimize as opt import os import pdb from sklearn.neighbors import BallTree from sklearn.neighbors import radius_neighbors_graph from scipy.spatial.distance import cdist from scipy.special im...
mit
-3,627,616,678,007,215,000
30.784091
78
0.632463
false
ethereum/pydevp2p
devp2p/multiplexer.py
1
21218
from gevent.queue import Queue from collections import OrderedDict import rlp from rlp.utils import str_to_bytes, is_integer import struct import sys sys.setrecursionlimit(10000) # frames are generated recursively # chunked-0: rlp.list(protocol-type, sequence-id, total-packet-size) header_data_sedes = rlp.sedes.List...
mit
-6,756,658,152,461,528,000
37.578182
105
0.582996
false
tschaefer/director
director/__init__.py
1
2748
# -*- coding: utf-8 -*- import sys import os import argparse from director.importer import Importer from director.updater import Updater from director.service import Service def stype(bytestring): unicode_string = bytestring.decode(sys.getfilesystemencoding()) return unicode_string def parse_options(): ...
bsd-3-clause
-2,391,396,943,135,285,000
32.108434
67
0.519651
false
elliotthill/django-oscar
tests/config.py
1
3532
import os import django from django.conf import settings, global_settings import oscar def configure(): if not settings.configured: from oscar.defaults import OSCAR_SETTINGS # Helper function to extract absolute path location = lambda x: os.path.join( os.path.dirname(os.path....
bsd-3-clause
6,051,882,844,065,200,000
41.047619
94
0.541336
false
rakeshmi/cinder
cinder/tests/unit/test_db_api.py
1
78467
# Copyright 2014 IBM Corp. # 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 ...
apache-2.0
-9,099,845,731,141,413,000
43.838286
79
0.515338
false
Mzero2010/MaxZone
plugin.video.Mzero/channels/biblioteca.py
1
26859
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # Mzero - XBMC Plugin # Canal para biblioteca de Mzero # http://blog.tvalacarta.info/plugin-xbmc/Mzero/ # ------------------------------------------------------------ import os from core import config from core import filetools fro...
gpl-3.0
-6,729,001,074,678,392,000
38.120991
124
0.566978
false
mitodl/bootcamp-ecommerce
localdev/seed/app_state_api.py
1
17130
"""API functionality for setting the state of an application""" import os import random from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError from django.core.files import File from d...
bsd-3-clause
5,803,917,556,540,261,000
34.83682
116
0.648803
false
TamiaLab/carnetdumaker
apps/gender/fields.py
1
1538
""" Model fields for the gender app. """ from django.db import models from django.utils import six from django.utils.translation import ugettext_lazy as _ from .constants import (GENDER_CHOICES, GENDER_UNKNOWN) class GenderFieldBase(models.CharField): """ This database model field ca...
agpl-3.0
8,364,084,219,892,851,000
27.481481
77
0.587776
false
JaredButcher/dayOfSagittariusIII
Server/sockServer.py
1
8357
import asyncio import dataManagement from enum import Enum, unique import html import json import threading import websockets dataStor = None def start(port, data): global dataStor dataStor = data loop = asyncio.new_event_loop() asyncio.set_event_loop(loop) try: coro = websockets.server.se...
mit
310,050,558,187,058,500
31.905512
133
0.459495
false
SeanNaren/deepspeech.pytorch
search_lm_params.py
1
3566
from dataclasses import dataclass import hydra from hydra.core.config_store import ConfigStore import optuna import torch from deepspeech_pytorch.configs.train_config import SpectConfig from deepspeech_pytorch.decoder import BeamCTCDecoder, GreedyDecoder from deepspeech_pytorch.loader.data_loader import AudioDataLoad...
mit
8,604,702,044,512,136,000
32.327103
86
0.618059
false
jumpstarter-io/nova
nova/tests/api/openstack/compute/plugins/v3/test_servers.py
1
134728
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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-2.0
2,637,198,558,954,699,000
40.595554
79
0.559654
false
kcsry/wurst
tests/conftest.py
1
1702
import os import pytest import toml from rest_framework.test import APIClient from six import StringIO from wurst.core.consts import StatusCategory from wurst.core.models import IssueType, Priority, Project, Status from wurst.core.utils.schema_import import SchemaImporter BASIC_SCHEMA_PATH = os.path.join( os.pat...
mit
4,476,096,679,161,664,500
24.029412
104
0.727967
false
census-instrumentation/opencensus-python
contrib/opencensus-ext-requests/setup.py
1
1936
# Copyright 2019, OpenCensus 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 law or agreed to in w...
apache-2.0
4,184,736,613,953,377,000
36.960784
128
0.66374
false
openmotics/gateway
testing/cicd/tests/toolbox.py
1
36876
# 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,625,946,587,529,712,000
46.337612
185
0.566764
false
foursquare/pants
contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/variable_names.py
1
4706
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import ast import keyword import re from functools import wraps import six from pants.c...
apache-2.0
-250,211,113,857,295,550
33.602941
98
0.671058
false
avigad/boole
old/expr_examples.py
1
2607
################################################################################ # # expr_examples.py # ################################################################################ from boole.core.model import * ################################################################################ # # Examples ...
apache-2.0
-8,128,380,361,066,723,000
23.364486
80
0.392789
false
warner/petmail
src/petmail/eventsource.py
1
7209
from twisted.python import log, failure from twisted.internet import reactor, defer, protocol from twisted.application import service from twisted.protocols import basic from twisted.web.client import Agent, ResponseDone from twisted.web.http_headers import Headers from .eventual import eventually class EventSourcePar...
mit
1,099,797,958,269,554,300
34.165854
80
0.609793
false
anilpai/leetcode
Tests/test_matrix.py
1
1516
from unittest import TestCase from Matrix.MatrixInSpiral import Solution as a from Matrix.MatrixRotate90deg import Solution as b from Matrix.RotateMatrix import Solution as c class TestSolution(TestCase): def test_spiralmatrix(self): r = a() matrix = [ [1, 2, 3, 4], [5, 6, ...
mit
-5,891,117,889,782,187,000
38.921053
167
0.509235
false
boblefrag/lolyx
lolyx/urls.py
1
1605
# -*- coding: utf-8 -*- pylint: disable-msg=R0801 # # Copyright (c) 2013 Rodolphe Quiédeville <rodolphe@quiedeville.org> # # 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 ver...
gpl-3.0
8,413,431,553,604,031,000
42.351351
75
0.700748
false
JanMalte/secondhandshop_server
src/secondhandshop_server/wsgi.py
1
1582
""" WSGI config for Second-Hand-Shop Server project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSG...
mit
1,794,648,453,947,780,000
40.631579
81
0.790771
false
tensorflow/models
research/object_detection/builders/preprocessor_builder.py
1
18154
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
2,135,707,827,955,755,500
39.979684
80
0.640961
false
tobegit3hub/deep_recommend_system
http_service/restful_server/settings.py
1
3216
""" Django settings for restful_server project. Generated by 'django-admin startproject' using Django 1.9.8. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ impor...
apache-2.0
7,750,119,693,354,985,000
26.02521
83
0.684701
false
xodus7/tensorflow
tensorflow/python/kernel_tests/control_flow_ops_py_test.py
1
124988
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
5,589,263,064,231,256,000
34.988483
112
0.609403
false
AstroTech/workshop-python
network/src/imap-gmail.py
1
1379
import getpass import imaplib import email from pprint import pprint from quopri import decodestring from datetime import datetime USERNAME = getpass.getuser() PASSWORD = getpass.getpass() HOST = 'imap.gmail.com' PORT = 993 imap = imaplib.IMAP4_SSL(HOST, PORT) imap.login(USERNAME, PASSWORD) imap.select('INBOX') def...
mit
7,039,509,036,235,123,000
22.372881
77
0.618564
false
uhuramedia/Havel
HavelCMS/admin.py
1
7900
import datetime from django.conf import settings from django.contrib import admin from django.contrib.admin.options import FORMFIELD_FOR_DBFIELD_DEFAULTS from django.core import urlresolvers from django.db import models from django.utils.importlib import import_module from django.utils.translation import ugettext_lazy...
bsd-3-clause
-1,609,924,798,894,494,700
34.426009
133
0.599114
false
lecovi/reveal.js
archivos/encapsulamiento_property.py
1
1041
class Encapsulamiento: """ Esta clase tiene 3 atributos y 3 métodos propios. >>> # El atributo privado es accesible a través de una Propiedad. >>> x = Encapsulamiento() >>> x.atributo_publico este atributo es privado. >>> x._atributo_semi_privado este atributo es 'ca...
mit
-8,376,594,411,097,522,000
30.333333
73
0.619923
false
pashinin-com/pashinin.com
src/ege/migrations/0006_auto_20170217_1608.py
1
1323
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-17 13:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('edu', '0007_auto_20170217_1434'), ('ege', '0005_auto_20170129_0117'), ] ope...
gpl-3.0
364,146,395,202,600,960
38.966667
187
0.593828
false
MJuddBooth/pandas
pandas/tests/tseries/frequencies/test_freq_code.py
1
4707
import pytest from pandas._libs.tslibs import frequencies as libfrequencies, resolution from pandas._libs.tslibs.frequencies import ( FreqGroup, _period_code_map, get_freq, get_freq_code) import pandas.compat as compat import pandas.tseries.offsets as offsets @pytest.fixture(params=list(compat.iteritems(_period...
bsd-3-clause
-5,491,830,421,126,756,000
30.590604
75
0.579137
false
tweakyllama/Arduino-Projects
I2C/src/raspberry.py
1
1938
import time import smbus class I2C(object): @staticmethod def getPiVersion(): "Gets the version number of the Pi board" try: with open('/proc/cpuinfo', 'r') as infile: for line in infile: # Match a line of the form "Revision : 0002" while ignoring extra # info in front of...
gpl-2.0
7,011,148,986,396,381,000
32.413793
87
0.615067
false
joshbuddy/crew
pitcrew/tasks/ensure/aws/route53/has_records.py
1
1339
import json import asyncio from pitcrew import task @task.arg("zone_id", desc="The zone id to operate on", type=str) @task.arg("records", desc="A list of records to ensure are set", type=list) class HasRecords(task.BaseTask): """Ensure route53 has the set of records""" async def verify(self): json_ou...
mit
3,340,604,327,670,191,000
36.194444
153
0.589246
false
niavok/perroquet
perroquetlib/repository/exercise_repository_exercise.py
1
15308
#! /usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2011 Frédéric Bertolus. # Copyright (C) 2009-2011 Matthieu Bizien. # # This file is part of Perroquet. # # Perroquet 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 ...
gpl-3.0
3,889,338,079,324,293,000
32.346405
118
0.633281
false
slub/vk2-georeference
georeference/utils/process/mapfile.py
1
4870
# -*- coding: utf-8 -*- ''' Copyright (c) 2015 Jacob Mendt Created on 04.08.15 @author: mendt ''' import os import uuid from mapscript import MS_IMAGEMODE_RGB, MS_OFF, MS_PIXELS, MS_LAYER_RASTER, layerObj, mapObj, MS_ON, outputFormatObj from georeference.utils.exceptions import MapfileBindingInitalizationException ...
gpl-3.0
5,549,427,881,581,592,000
35.074074
116
0.641684
false
holgerd77/django-public-project
public_project/south_migrations/0023_auto__del_field_siteconfig_navi_link_color.py
1
21861
# -*- coding: 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): # Deleting field 'SiteConfig.navi_link_color' db.delete_column(u'public_project_siteconfig', 'navi_link_colo...
bsd-3-clause
-2,835,805,165,672,189,400
81.18797
227
0.558803
false
neuro-ml/reskit
reskit/core.py
1
21723
""" Core classes. """ from sklearn.externals.joblib import Parallel, delayed from sklearn.model_selection import cross_val_score, cross_val_predict from sklearn.model_selection import GridSearchCV from sklearn.metrics.scorer import check_scoring from sklearn.pipeline import Pipeline from sklearn.base import Transform...
bsd-3-clause
620,806,418,496,660,200
36.42931
90
0.554655
false
lcary/nbd
nbd/export.py
1
3791
from abc import (ABCMeta, abstractmethod, abstractproperty) from os import path as ospath import logging import nbformat from nbconvert import (PythonExporter, RSTExporter) from nbd.fileops import (get_file_id, write_file) EXPORT_FORMAT_PYTHON = 'python' EXPORT_FORMAT_RST = 'rst' logger = logging.getLogger() clas...
mit
7,295,198,112,324,375,000
30.330579
78
0.710367
false
GeosoftInc/gxpy
geosoft/gxapi/GXSTR.py
1
48660
### extends 'class_empty.py' ### block ClassImports # NOTICE: Do not edit anything here, it is generated code from . import gxapi_cy from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref ### endblock ClassImports ### block Header # NOTICE: The code generator will not replace the code in this block ### end...
bsd-2-clause
-3,684,899,027,531,421,700
31.354388
188
0.58097
false
aptakhin/docs
conf.py
1
11385
# -*- coding: utf-8 -*- # # conan documentation build configuration file, created by # sphinx-quickstart on Thu May 21 10:27:36 2015. # # 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. # # All...
mit
-5,884,956,265,093,350,000
30.277473
80
0.706632
false
pombredanne/rest-api-mock-server
mock_webapp/mock_api/tests/test_admin.py
1
2713
# -*- coding: utf-8 -*- from django.conf import settings from django.core.urlresolvers import reverse from django.test import TestCase from mock import patch, ANY from mock_api.models import AccessLog @patch("requests.request") class AccessLogAdminTest(TestCase): fixtures = ("test_api.json", "test_access_logs.js...
mit
-3,531,914,026,436,281,000
41.390625
111
0.683008
false
wbali/rwc-inventory-manager
inventory_manager_app/stock/forms.py
1
1742
from flask_wtf import FlaskForm from wtforms import StringField, DateField, IntegerField, SelectField, DecimalField from wtforms.validators import DataRequired, Optional from wtforms.widgets import TextArea class StockForm(FlaskForm): stock_id = IntegerField() item_name = StringField("Item name", validators...
mit
-1,446,767,546,980,391,400
27.57377
83
0.695178
false
Arcanemagus/SickRage
sickbeard/providers/rarbg.py
1
6962
# coding=utf-8 # Author: Dustyn Gibson <miigotu@gmail.com> # # URL: https://sick-rage.github.io # # This file is part of SickRage. # # SickRage 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 ...
gpl-3.0
7,859,844,668,399,947,000
38.333333
149
0.548118
false
JarbasAI/jarbas-core
mycroft/jarbas-skills/skill_trivia/__init__.py
1
10505
from adapt.intent import IntentBuilder from mycroft.skills.core import MycroftSkill import random, math, os, sys from os.path import dirname path= dirname(dirname(__file__)) sys.path.append(path) # import intent layers from service_intent_layer import IntentParser __author__ = 'jarbas' class MathQuestions: def ...
gpl-3.0
-7,013,586,128,043,303,000
38.645283
135
0.58991
false
asselapathirana/RRPam-WDS
src/rrpam_wds/tests/test_logging.py
1
2109
from rrpam_wds.gui import set_pyqt_api # isort:skip # NOQA import sys import time from PyQt5.QtWidgets import QApplication from rrpam_wds.gui.dialogs import LogDialog from rrpam_wds.gui.dialogs import MainWindow from rrpam_wds.tests.test_utils import Test_Parent from rrpam_wds.tests.test_utils import main class TC...
gpl-3.0
-5,391,814,945,688,619,000
35.362069
97
0.650545
false
ZeitgeberH/nengo
nengo/tests/test_config.py
1
3332
import pytest import nengo import nengo.config def test_config(): @nengo.config.configures(nengo.Ensemble) class TestConfigEnsemble(nengo.config.ConfigItem): something = nengo.config.Parameter(None) other = nengo.config.Parameter(0) @nengo.config.configures(nengo.Connection) class Te...
gpl-3.0
283,863,634,523,770,460
29.568807
72
0.654862
false
firebitsbr/SPF
spf/core/framework.py
1
48936
#import getopt import argparse import emails import sys import re import os import subprocess import time import signal from collections import defaultdict #import our libs from emails import EmailTemplate from utils import Utils from display import Display from gather import Gather from mydns import Dns from webprofi...
bsd-3-clause
-8,369,864,212,482,959,000
47.741036
171
0.462257
false
aa-m-sa/summer-url-py
summerurlapp.py
1
4031
# a small URL shortening service import psycopg2 # if we want to persistent strorage on heroku from flask import Flask, request, Response, g, redirect, url_for, abort, render_template from contextlib import closing import os import urlparse import appconfig import shortenid APPSETTINGS_ENVVAR = 'SUMMER_APP_CONFIG' ...
mit
-2,764,560,846,763,436,500
26.609589
88
0.649219
false
FedoraScientific/salome-geom
src/GEOM_SWIG/geomBuilder.py
1
644045
# -*- coding: iso-8859-1 -*- # Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your ...
lgpl-2.1
-8,497,507,476,621,121,000
48.652687
169
0.597899
false
vindar/mtools
tools/mtools-project.py
1
8519
#!/usr/bin/env python # # Copyright 2015 Arvind Singh # This file is part of the mtools library. # # mtools 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 optio...
gpl-3.0
-2,650,942,873,968,966,000
25.538941
98
0.620965
false
mitdbg/modeldb
client/workflows/examples-without-verta/scripts/client-demo.py
1
3496
"""Logistic Regression with Grid Search (scikit-learn)""" import os, sys import itertools import joblib import pandas as pd import numpy as np from sklearn import model_selection from sklearn import linear_model from sklearn import metrics sys.path.append(os.path.join("..", "modeldb")) from modeldbclient import Mo...
mit
3,824,065,516,834,919,000
28.880342
114
0.716819
false
stvstnfrd/edx-platform
cms/djangoapps/contentstore/tests/test_libraries.py
1
45058
""" Content library unit tests that require the CMS runtime. """ import ddt import six from django.test.utils import override_settings from mock import Mock, patch from opaque_keys.edx.locator import CourseKey, LibraryLocator from six.moves import range from cms.djangoapps.contentstore.tests.utils import AjaxEnabled...
agpl-3.0
7,295,077,615,141,590,000
42.283381
118
0.641595
false
skosukhin/spack
var/spack/repos/builtin/packages/libwebsockets/package.py
1
1834
############################################################################## # 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
-4,229,960,590,508,280,300
43.731707
79
0.685387
false
adieyal/billtracker
code/billtracker/scrapers/models.py
1
3436
from django.db import models from django.conf import settings import bills.models as bill_models class GovInfoScraper(models.Model): bill_name = models.CharField(max_length=100) bill_code = models.CharField(max_length=10) comment_startdate = models.DateField() comment_enddate = models.DateField() s...
bsd-3-clause
-3,848,321,381,667,851,000
32.686275
87
0.625146
false
tamentis/psutil
examples/process_detail.py
1
4156
#!/usr/bin/env python # # $Id$ # # Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Print detailed information about a process. """ import os import datetime import socket import sys import...
bsd-3-clause
8,451,998,020,740,110,000
31.46875
87
0.492541
false
dstufft/ooni-backend
oonib/test/test_bouncer.py
1
17723
# -*- encoding: utf8 -*- import json from twisted.internet import defer from cyclone import web from oonib.bouncer.api import bouncerAPI from oonib.test.handler_helpers import HandlerTestCase fake_bouncer_file = """ collector: fake_address: policy: input: - {id: fake_id} nettest: - {na...
bsd-2-clause
-617,926,981,280,456,400
35.243354
108
0.567342
false
TimoRoth/oggm
oggm/cli/benchmark.py
2
8716
"""Command line arguments to the oggm_benchmark command Type `$ oggm_benchmark -h` for help """ # External modules import os import sys import argparse import time import logging import pandas as pd import geopandas as gpd # Locals import oggm.cfg as cfg from oggm import utils, workflow, tasks from oggm.exceptions ...
bsd-3-clause
-8,687,463,995,399,151,000
32.394636
77
0.595686
false
silviot/ulif.openoffice
src/ulif/openoffice/pyunoserver.py
1
13032
## ## pyunoserver.py ## Login : <uli@pu.smp.net> ## Started on Fri Aug 28 02:13:03 2009 Uli Fouquet ## $Id$ ## ## Copyright (C) 2009 Uli Fouquet ## 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 Foundatio...
gpl-2.0
-3,064,599,806,069,286,000
33.752
80
0.561924
false
mupen64plus/mupen64plus-ui-python
src/m64py/frontend/dialogs.py
1
2520
# -*- coding: utf-8 -*- # Author: Milan Nikolic <gen2brain@gmail.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, either version 3 of the License, or # (at your option) any later version. ...
gpl-3.0
-3,016,938,212,530,211,000
32.6
71
0.678968
false
invenfantasy/software-factory
tools/sfmigration/sfmigration/tests/issues/test_redmine.py
1
3063
#!/usr/bin/env python # # Copyright (C) 2015 eNovance SAS <licensing@enovance.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 # # Unle...
apache-2.0
2,867,644,867,389,157,400
40.391892
75
0.52824
false
jimr/noterator
tests/test_config.py
1
1365
# -*- coding: utf-8 -*- import unittest from .utils import all_available_methods, get_config_path from noterator import Noterator from noterator.config import ConfigurationError class TestConfigValidation(unittest.TestCase): def test_valid_config(self): noterator = Noterator( method=all_ava...
mit
307,810,941,396,676,740
30.022727
59
0.630037
false
Joshuaalbert/IonoTomo
src/ionotomo/inversion/gradient_and_adjoint.py
1
13841
'''The gradient for steepest direction, i.e. <Cm, d/dm(-log(posterior))> is equal to Adjoint(G).(g(m) - d_obs) + (m - m_prior) = Cm.G^t.Cd^-1 .( g(m) - d_obs ) + (m - m_prior)''' from ionotomo.geometry.tri_cubic import bisection import numpy as np from scipy.integrate import simps import dask.array as da from...
apache-2.0
3,531,586,930,173,808,000
40.457055
156
0.449173
false
freerangerouting/frr
tests/topotests/lib/common_config.py
1
120562
# # Copyright (c) 2019 by VMware, Inc. ("VMware") # Used Copyright (c) 2018 by Network Device Education Foundation, Inc. # ("NetDEF") in this file. # # Permission to use, copy, modify, and/or distribute this software # for any purpose with or without fee is hereby granted, provided # that the above copyright notice and...
gpl-2.0
-3,059,218,530,192,539,600
33.986071
96
0.456985
false
npotts/dotfiles
ipython/profile_default/ipython_config.py
1
38662
c = get_config() # NEVER NAG ME c.TerminalInteractiveShell.confirm_exit = False # Configuration file for ipython. # ------------------------------------------------------------------------------ # InteractiveShellApp(Configurable) configuration # -----------------------------------------------------------------------...
unlicense
-8,919,215,008,065,537,000
36.139289
222
0.687316
false
Zarthus/Reconcile
tools/ignorelist.py
1
2663
""" The MIT License (MIT) Copyright (c) 2014 - 2015 Jos "Zarthus" Ahrens and contributors 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 without limitation the rig...
mit
5,329,721,178,999,119,000
30.702381
77
0.640631
false
pierce403/EmpirePanel
lib/modules/situational_awareness/network/powerview/user_hunter.py
1
5974
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-UserHunter', 'Author': ['@harmj0y'], 'Description': ('Finds which machines users of a specified group are logged into. ' 'P...
bsd-3-clause
-559,141,152,159,625,900
36.572327
128
0.4307
false
kernsuite-debian/lofar
MAC/Deployment/data/Coordinates/CoordMenu.py
1
10615
#!/usr/bin/env python # P.Donker ASTRON # and Arno Schoenmakers the Great import sys import pg from subprocess import Popen import os import getpass from optparse import OptionParser from database import getDBname, getDBhost, getDBport, getDBuser VERSION = '0.0.2' # version of this script default_targetdate='2009.5' ...
gpl-3.0
-5,528,725,688,728,908,000
33.464286
99
0.557419
false
JaneliaSciComp/osgpyplusplus
examples/osg-tutorial/tut2_textures.py
1
6318
#!/bin/env python # Translated into python from C++ tutorial at # http:#trac.openscenegraph.org/projects/osg/wiki/Support/Tutorials/Textures from osgpypp import osg, osgDB, osgViewer import sys # Creating Textured Geometry using StateSets # Goals # Add a texture to geometry defined by OpenGL drawing primitives intr...
bsd-3-clause
5,011,954,014,060,613,000
38.242236
108
0.738841
false
alex/warehouse
tests/unit/test_filters.py
1
7152
# 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 the Li...
apache-2.0
4,395,946,780,134,338,600
26.6139
76
0.50755
false
mixman/djangodev
tests/regressiontests/localflavor/ca/tests.py
1
3819
import warnings from django.contrib.localflavor.ca.forms import (CAPostalCodeField, CAPhoneNumberField, CAProvinceField, CAProvinceSelect, CASocialInsuranceNumberField) from django.test import SimpleTestCase class CALocalFlavorTests(SimpleTestCase): def setUp(self): self.save_warnings_st...
bsd-3-clause
-1,082,681,703,602,119,000
33.098214
97
0.558785
false
sbobovyc/GameTools
ImmunityDebugger/collectLoopRets.py
1
2256
#!/usr/bin/env python import immlib from immlib import LogBpHook, BpHook class ReturnBP(BpHook): def __init__(self): BpHook.__init__(self) def run(self, regs): imm = immlib.Debugger() eip = regs["EIP"] imm.log("bp, EIP is 0x%08X " % eip) imm.addKnowledge("0x%0...
gpl-3.0
2,774,366,314,029,570,600
29.90411
107
0.503103
false
anhaidgroup/py_stringmatching
py_stringmatching/similarity_measure/jaro.py
1
2435
from py_stringmatching import utils from six.moves import xrange from py_stringmatching.similarity_measure.sequence_similarity_measure import \ SequenceSimilarityMeasure from py_stringmatching.similarity_measure.cython.cython_jaro import jaro class Jaro(SequenceSimi...
bsd-3-clause
-4,056,580,345,706,609,700
30.217949
104
0.593018
false
JeanOlivier/pyHegel
pyHegel/__init__.py
1
2890
# -*- coding: utf-8 -*- ########################## Copyrights and license ############################ # # # Copyright 2011-2015 Christian Lupien <christian.lupien@usherbrooke.ca> # # ...
gpl-3.0
6,260,107,342,247,178,000
47.166667
104
0.510035
false
dknlght/dkodi
src/script.module.urlresolver/lib/urlresolver/plugins/vevio.py
1
2891
""" Plugin for UrlResolver Copyright (C) 2018 jsergio This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
gpl-2.0
-3,188,007,391,110,179,000
35.1375
112
0.628156
false
DMS-Aus/Roam
src/roam/utils.py
1
3007
import faulthandler import time import logging import os import sys import getpass from logging import handlers from qgis.PyQt import uic import gdal logger = logging.getLogger("roam") log = logger.debug debug = logger.debug info = logger.info warning = logger.warning error = logger.error critical = logger.critical...
gpl-2.0
-3,913,994,386,383,318,500
27.638095
97
0.621882
false
Jeff-Tian/mybnb
Python27/Lib/ctypes/test/test_byteswap.py
2
11120
import sys, unittest, struct, math, ctypes from binascii import hexlify from ctypes import * def bin(s): return hexlify(memoryview(s)).upper() # Each *simple* type that supports different byte orders has an # __ctype_be__ attribute that specifies the same type in BIG ENDIAN # byte order, and a __ctype_...
apache-2.0
3,056,722,733,219,436,000
35.694915
88
0.511331
false
GPflow/GPflowOpt
gpflowopt/acquisition/pof.py
1
3594
# Copyright 2017 Joachim van der Herten # # 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 wr...
apache-2.0
-1,453,852,975,451,257,900
41.282353
145
0.687257
false
adamchainz/django-mysql
src/django_mysql/utils.py
1
9970
import os import subprocess import time from collections import defaultdict from queue import Empty, Queue from threading import Lock, Thread from weakref import WeakKeyDictionary import django from django.db import DEFAULT_DB_ALIAS from django.db import connection as default_connection from django.db import connectio...
bsd-3-clause
-5,315,907,786,015,990,000
30.550633
87
0.590672
false
th0mmeke/toyworld
kinetics_2D.py
1
7872
""" Created on 22/03/2013 @author: thom """ import random import math import logging from rdkit.Chem import AllChem as Chem from ULPS import Float_t import config class Kinetics2D(object): @classmethod def get_ke(cls, m, x, y): return 0.5 * m * (x * x + y * y) @classmethod def get_speed(...
gpl-3.0
6,768,914,614,100,645,000
43.982857
184
0.597053
false
Diviyan-Kalainathan/causal-humans
ClusterAnalysis/v_test.py
1
2510
''' Analyses the clusters and returns v-type of vars Author : Diviyan Kalainathan Date : 28/06/2016 DEPRECATED - Use plot-gen/Cluster_extraction instead ''' import csv,numpy def v_test(input_data,data_folder,num_clusters, num_vars, list_vars): """ :param input_data: Data used to do the clustering(String) :...
mit
1,592,596,920,828,584,400
42.293103
202
0.584064
false
wateraccounting/wa
Collect/GLEAM/DataAccess.py
1
8456
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*- """ Authors: Tim Hessels UNESCO-IHE 2016 Contact: t.hessels@unesco-ihe.org Repository: https://github.com/wateraccounting/wa Module: Collect/GLEAM """ # import general python modules import os import numpy as np import pandas as pd import glob from joblib import...
apache-2.0
4,973,839,900,364,555,000
32.828
121
0.607498
false
delacuesta13/Who-am-I
itsme/models.py
1
4585
from django.db import models from django.contrib.auth.models import User class UserProfile(models.Model): user = models.ForeignKey(User, unique=True) phone = models.CharField(max_length=100, blank=True) location = models.CharField(max_length=100, blank=True) profession = models.CharField(max_length=100...
gpl-3.0
-7,769,707,275,793,938,000
40.306306
87
0.68506
false
steny138/PythonTaipeiOpendata
migrations/versions/3974d310ac43_.py
1
3035
"""empty message Revision ID: 3974d310ac43 Revises: edfc37a36914 Create Date: 2016-11-11 16:39:16.828429 """ # revision identifiers, used by Alembic. revision = '3974d310ac43' down_revision = 'edfc37a36914' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
apache-2.0
1,569,172,373,200,974,000
41.746479
77
0.685008
false
matthiaskramm/corepy
examples/cal/buffers.py
1
3037
import corepy.lib.extarray as extarray import corepy.arch.cal.isa as cal import corepy.arch.cal.types.registers as reg import corepy.arch.cal.platform as env def test_4comp(): proc = env.Processor(0) prgm = env.Program() code = prgm.get_stream() inp = proc.alloc_remote('i', 1, 4, 1) out = proc.alloc_remote(...
bsd-3-clause
7,764,453,063,671,404,000
19.38255
83
0.575568
false
mcfongtw/MkConfig
mkconfig/core/chain.py
1
1494
import logging logger = logging.getLogger(__name__) class ChainOfTransfiguration(object): """ A chain of responsibility implementation that channel through a series of transifgurations. One may depend on previous step with respect to Context """ _chain = [] _context = {} def __init__(s...
mit
-3,838,645,005,129,700,400
24.322034
110
0.609103
false