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
foxscotch/advent-of-code
2017/08/p1.py
1
2852
# Python 3.6.1 import re from timeit import timeit class Registers(dict): """Simple dict-based class that sets a default value on missing keys.""" def __missing__(self, key): self[key] = 0 return self[key] class Instruction: """Class for holding register instructions.""" instr_re = ...
mit
7,313,618,287,602,904,000
28.402062
80
0.551543
false
lancms/lancms2
crew/models.py
1
1229
from django.db import models from django.utils.translation import ugettext_lazy as _ # Create your models here. from core.models import Event, User class Crew(models.Model): event = models.ForeignKey(Event) name = models.CharField(max_length=64, verbose_name=_('Name')) description = models.TextField(nul...
gpl-2.0
-6,179,711,398,685,303,000
24.604167
76
0.615948
false
pawel-akonom/diff2html-plus
diff2html.py
1
28184
#! /usr/bin/python # coding=utf-8 # # 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. # # This program is distributed in t...
gpl-2.0
-6,287,472,977,222,970,000
34.630847
235
0.559644
false
yotam180/xAI
src/vision/server/google_images.py
1
1992
from selenium import webdriver from json import loads, dumps import re import time class GoogleSearch(object): """ To represent a search engine and query results from Google. """ def __init__(self): """ Initializes a new search engine """ self.driver = webdriver.Chrome(...
gpl-3.0
-5,690,252,001,971,754,000
27.471429
125
0.519076
false
Azure/azure-sdk-for-python
sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/operations/_operations.py
1
4742
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
7,340,601,551,714,671,000
41.720721
133
0.639182
false
CAB-LAB/jupyterhub-swarm
jupyterhub_config.py
1
4389
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. # Configuration file for JupyterHub import os import sys c = get_config() # We rely on environment variables to configure JupyterHub so that we # avoid having to rebuild the JupyterHub container every time we change ...
gpl-3.0
3,716,831,870,285,218,000
31.272059
111
0.661198
false
mlabru/ptracks
model/newton/defs_newton.py
1
10031
#/usr/bin/env python # -*- coding: utf-8 -*- """ --------------------------------------------------------------------------------------------------- defs_newton defines e constantes válidas localmente revision 0.2 2015/nov mlabru pep8 style conventions revision 0.1 2014/out mlabru initial release (Python/Linux) ...
gpl-3.0
1,941,892,134,202,871,000
34.437722
120
0.580538
false
MOA-2011/enigma2-plugin-extensions-openwebif
plugin/controllers/views/web/movielistm3u.py
1
5181
#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path try: import builtins as builtin except ImportError: import __builtin__ as builtin from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatib...
gpl-2.0
413,458,427,154,229,200
34.731034
248
0.62652
false
MediaKraken/mkarchive
kivy_test/subprogram_ssl_keygen.py
1
1464
''' Copyright (C) 2015 Quinn D Granfor <spootdev@gmail.com> 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 that it will be useful...
gpl-2.0
-8,266,755,077,542,875,000
38.666667
82
0.68306
false
BertrandBordage/django-postgrefts
setup.py
1
1079
#!/usr/bin/env python import os from setuptools import setup, find_packages CURRENT_PATH = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(CURRENT_PATH, 'requirements.txt')) as f: required = f.read().splitlines() setup( name='django-postgrefts', author='Bertrand Bordage', author_...
bsd-3-clause
-4,259,952,374,703,971,000
28.916667
63
0.636026
false
mvaled/sentry
src/sentry/south_migrations/0395_auto__add_releaseprojectenvironment__add_unique_releaseprojectenvironm.py
1
102138
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): # Flag to indicate if this migration is too risky # to run online and needs to be coordinated for offline ...
bsd-3-clause
-5,967,794,903,881,135,000
90.276139
233
0.580577
false
jakobabesser/pymus
pymus/sisa/loudness/estimator.py
1
2141
import numpy as np from .loudness_critical_band_approximation import LoudnessCriticalBandApproximationIsolatedMonophonicTracks from ...tools import Tools __author__ = 'Jakob Abesser' class LoudnessEstimator: """ Wrapper class for loudness estimators """ def __init__(self): pass @stati...
mit
8,950,198,014,390,151,000
39.396226
111
0.5773
false
BryceSchroeder/delvmod
delv/colormap.py
1
5210
#!/usr/bin/env python # Copyright 2015 Bryce Schroeder, www.bryce.pw, bryce.schroeder@gmail.com # Wiki: http://www.ferazelhosting.net/wiki/delv # # 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 Fo...
gpl-3.0
-8,377,676,020,398,541,000
37.029197
82
0.59309
false
ONLYOFFICE/core
Test/Applications/StandardTester/tester/scripts/tester.py
1
1243
#!/usr/bin/env python import os import platform import subprocess def make(src_args): #--input="input-standard-files-dir" #--output="output-dir" #--standard // generate standarts #--use-system-fonts="0/1/false/true" #--font-dirs="C:\\Windows\\Fonts;/usr/share/fonts;" #--cores=4 work_dir = os.path.dirnam...
agpl-3.0
2,776,664,227,402,981,000
28.619048
90
0.615447
false
yephper/django
django/contrib/gis/db/backends/spatialite/base.py
1
3690
import sys from ctypes.util import find_library from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.backends.sqlite3.base import ( Database, DatabaseWrapper as SQLiteDatabaseWrapper, SQLiteCursorWrapper, ) from django.utils import six from .client impo...
bsd-3-clause
5,947,508,242,786,386,000
47.2
98
0.630623
false
sdestercke/classifip
experiments/classification/qda/qda_accuracy.py
1
11263
from classifip.evaluation.measures import u65, u80 from classifip.dataset.uci_data_set import export_data_set from qda_common import __factory_model, generate_seeds, __factory_model_precise from sklearn.model_selection import KFold from classifip.utils import create_logger, normalize_minmax import numpy as np, pandas a...
gpl-2.0
-4,381,583,420,932,994,600
52.889952
119
0.612981
false
Ebag333/Pyfa
service/pycrest/weak_ciphers.py
1
5235
import datetime import ssl import warnings from requests.adapters import HTTPAdapter try: from requests.packages import urllib3 from requests.packages.urllib3.util import ssl_ from requests.packages.urllib3.exceptions import ( SystemTimeWarning, SecurityWarning, ) from requests.pac...
gpl-3.0
3,188,589,540,693,058,600
38.659091
109
0.635912
false
skirpichev/omg
diofant/core/trace.py
1
5346
from ..matrices import Matrix from .add import Add from .compatibility import default_sort_key from .containers import Tuple from .expr import Expr from .mul import Mul from .power import Pow from .sympify import sympify def _is_scalar(e): """Helper method used in Tr.""" # sympify to set proper attributes ...
bsd-3-clause
1,281,262,005,161,226,000
26.989529
73
0.54826
false
liuenyan/django-blog
blog/templatetags/blog_extras.py
1
1424
import hashlib from django import template from django.db.models import Count from ..models import Post, Category, Tag, Link register = template.Library() @register.inclusion_tag('_navbar.html') def show_navbar(active, user): return {'active': active, 'user': user} @register.inclusion_tag('_sidebar.html') def sh...
mit
-2,121,758,207,369,709,800
32.904762
104
0.641854
false
kgullikson88/TS23-Scripts
ImproveWavelengthSolution.py
1
2035
import scipy import sys import os import numpy as np import pylab import MakeModel from astropy.io import fits as pyfits from FitTellurics import FitFunction, FitContinuum3, CCImprove import FitsUtils import Units homedir = os.environ['HOME'] LineListFile = homedir + "/School/Research/McDonaldData/LineList.dat" if...
gpl-3.0
-3,416,336,940,831,758,300
28.492754
108
0.625553
false
XiaoChengOMG/Practice
www/orm.py
1
1791
#!/usr/bin/env python3 # -*- coding:utf-8 -*- __author__ = "" ''' ''' import asyncio,logging logging.basicConfig(level=logging.INFO) import aiomysql def log(sql,args=()): logging.info('SQL: %s' % sql) async def create_pool(loop,**kw): logging.info('create database connection pool...') global _pool ...
apache-2.0
-8,663,139,979,751,972,000
26.136364
63
0.551089
false
nojero/pod
src/pod/equivalence.py
1
7197
import sat import ptnet import z3 from util import * from encoding import * class MergingEquivalence : def __init__ (self, domain) : self.domain = domain def is_in_domain (self, it) : for x in it : if x not in self.domain : raise LookupError, "'%s' is not in the d...
gpl-3.0
4,782,201,330,291,516,000
32.474419
93
0.530777
false
tuffery/Frog2
frowns/Utils/StereoFinder.py
1
2826
def isChiral(atom): """(atom) -> See if the bfs atoms can form a chiral center""" q = {} weights = {} for oatom in atom.oatoms: q[oatom] = [{atom:1, oatom:1}, oatom.number, [oatom]] weights[oatom] = oatom.number + oatom.hcount if len(q) == 3: if atom.hcount != 1: ...
gpl-3.0
1,283,979,896,099,745,800
24.690909
66
0.462845
false
daveculp/Adafruit-Serial-LCD-for-pyboard
afserlcd.py
1
4602
'''This is a simple class for interfacing an Adafruit serial LCD with a pyboard.''' import pyb #define our LCD commands LCD_COMMAND = 0xFE DISPLAY_ON = 0x42 DISPLAY_OFF = 0x46 SET_BRIGHTNESS = 0x99 SET_SAVE_BRIGHTNESS = 0x98 SET_CONTRAST = 0x50...
mit
8,140,869,143,961,755,000
28.883117
83
0.567362
false
IronLanguages/ironpython2
Src/StdLib/Lib/test/test_urllib.py
1
48008
"""Regression tests for urllib""" import collections import urllib import httplib import io import unittest import os import sys import mimetools import tempfile from test import test_support from base64 import b64encode def hexescape(char): """Escape char as RFC 2396 specifies""" hex_repr = hex(ord(char))[...
apache-2.0
-8,723,634,837,961,240,000
40.067579
101
0.577779
false
maweigert/gputools
gputools/core/ocltypes.py
1
13081
""" @author: mweigert A basic wrapper class around pyopencl.cl__array """ from __future__ import absolute_import, print_function import numpy as np import pyopencl.array as cl_array import pyopencl as cl from pyopencl.characterize import has_double_support from gputools import get_device from gputools.core.oclprogr...
bsd-3-clause
-8,130,269,717,595,137,000
30.75
105
0.560431
false
beaker-project/beah
beah/core/command.py
1
5287
# -*- test-case-name: beah.core.test.test_command -*- # Beah - Test harness. Part of Beaker project. # # Copyright (C) 2009 Red Hat, Inc. # # 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; eithe...
gpl-2.0
8,049,308,502,287,063,000
31.042424
108
0.574806
false
lavalamp-/ws-backend-community
lib/inspection/web/crawling/middleware/base.py
1
1191
# -*- coding: utf-8 -*- from __future__ import absolute_import class BaseWsMiddleware(object): """ This is a base class for custom Scrapy middleware. """ # Class Members # Instantiation def __init__(self): pass # Static Methods # Class Methods # Public Methods ...
gpl-3.0
-5,527,538,127,943,966,000
13.8875
65
0.617128
false
coffeemug13/pyonenote
pyonenote.py
1
9347
""" PyOneNote.py ~~~~~~~~~~~~~~~~~ This module contains a basic OAuth 2 Authentication and basic handler for GET and POST operations. This work was just a quick hack to migrate notes from and old database to onenote but should hep you to understand the request structure of OneNote. Copyright (c) 2016 Coffeemu...
mit
-1,410,070,218,896,251,000
39.358407
203
0.579437
false
khalim19/gimp-plugin-export-layers
export_layers/pygimplib/tests/setting/stubs_setting.py
1
4093
# -*- coding: utf-8 -*- # # Copyright (C) 2014-2019 khalim19 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
gpl-3.0
-5,217,680,496,299,321,000
25.237179
90
0.723186
false
nkoech/csacompendium
csacompendium/research/api/researchdiversity/researchdiversityserializers.py
1
7089
from csacompendium.research.models import ( Diversity, ResearchDiversity, ) from csacompendium.utils.hyperlinkedidentity import hyperlinked_identity from csacompendium.utils.serializersutils import ( CreateSerializerUtil, get_related_content_url, FieldMethodSerializer ) from rest_framework.serialize...
mit
6,294,233,616,711,571,000
32.597156
104
0.582875
false
vgrem/Office365-REST-Python-Client
generator/generate.py
1
1115
from generator import load_settings from generator.builders.type_builder import TypeBuilder from office365.runtime.odata.odata_v3_reader import ODataV3Reader from office365.runtime.odata.odata_v4_reader import ODataV4Reader def generate_files(model, options): """ :type model: office365.runtime.odata.odata_mo...
mit
-1,358,164,647,981,276,000
29.972222
74
0.712108
false
ppizarror/Ned-For-Spod
lib/object.py
1
2067
# coding=utf-8 """ OBJETO Maneja objetos del mundo, como pistas y decoraciones, dibuja a los elementos en pantalla. Autor: PABLO PIZARRO @ppizarror Fecha: ABRIL 2015 """ if __name__ == '__main__': # noinspection PyUnresolvedReferences from path import * class Gameobject(object): """Objet...
gpl-2.0
-8,268,332,533,941,296,000
25.851351
84
0.539544
false
roderickmackenzie/opvdm
gui/inp_description.py
1
2274
# Organic Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall # model for organic solar cells. # Copyright (C) 2012 Roderick C. I. MacKenzie # # roderick.mackenzie@nottingham.ac.uk # www.opvdm.com # Room B86 Coates, University Park, Nottingham, NG7 2RD, UK # # This program is free softwar...
gpl-2.0
4,907,669,692,966,138,000
35.677419
82
0.711522
false
cdsousa/SymPyBotics
sympybotics/dynamics/rne_park.py
1
2340
from sympy import zeros, eye from .extra_dyn import frictionforce, driveinertiaterm from ..utils import sym_skew as skew from ..utils import identity def Adj(G, g): R = G[0:3, 0:3] p = G[0:3, 3] return (R.row_join(zeros(3))).col_join( (skew(p) * R).row_join(R)) * g def Adjdual(G, g): R = G[0...
bsd-3-clause
-8,549,918,759,218,217,000
23.893617
79
0.524359
false
dragorosson/heat
heat/engine/clients/os/manila.py
1
4911
# # 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
4,332,230,476,536,119,300
34.586957
78
0.621666
false
loads/ailoads
molotov/tests/test_quickstart.py
1
2046
import tempfile import shutil import os from molotov import quickstart, __version__, run from molotov.tests.support import set_args, TestLoop, dedicatedloop class TestQuickStart(TestLoop): def setUp(self): super(TestQuickStart, self).setUp() self._curdir = os.getcwd() self.tempdir = tempf...
apache-2.0
-4,303,793,364,620,485,000
27.027397
77
0.556696
false
lamter/TCPServer
src/test_socket.py
1
1518
#coding=utf-8 ''' Created on 2015-12-30 @author: lamter ''' # from gevent import monkey # monkey.patch_all() import time import unittest import json import socket from lib.woodmoo import * import conf_server import conf_debug from request import BaseRequest ''' 建立 redisco 的链接 ''' class TestSocket(unittest.TestC...
mit
-9,221,306,999,912,396,000
15.930233
57
0.553571
false
lvphj/epydemiology
epydemiology/phjCleanUKPostcodes.py
1
99765
""" Functions to check postcode variable in Pandas dataframe ======================================================== These functions take a dataframe containing postcode information and attempts to correct errors and extract outward (first half), inward (second half) and postcode area (first letters) components of th...
mit
3,842,442,044,245,103,000
53.251904
351
0.569643
false
cajone/pychess
lib/pychess/Players/Player.py
1
4715
from gi.repository import GObject class PlayerIsDead(Exception): """ Used instead of returning a move, when an engine crashes, or a nonlocal player disconnects """ pass class TurnInterrupt(Exception): """ Used instead of returning a move, when a players turn is interrupted. Currently thi...
gpl-3.0
4,301,242,595,915,062,300
30.644295
80
0.620361
false
beniwohli/apm-agent-python
elasticapm/instrumentation/packages/tornado.py
1
5909
# BSD 3-Clause License # # Copyright (c) 2019, Elasticsearch BV # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, t...
bsd-3-clause
5,332,078,897,494,987,000
44.453846
120
0.696226
false
mywulin/functest
functest/opnfv_tests/openstack/snaps/api_check.py
1
1433
#!/usr/bin/env python # Copyright (c) 2017 Cable Television Laboratories, Inc. and others. # # This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at # # http://www.apache.org/licenses/LICENSE-2.0 "...
apache-2.0
-6,492,637,902,867,436,000
30.844444
78
0.662247
false
madewokherd/urk
scripts/theme.py
1
12167
import time import windows import widgets import chaninfo import events from conf import conf textareas = {} if 'font' in conf: textareas['font'] = conf['font'] if 'bg_color' in conf: textareas['bg'] = conf['bg_color'] if 'fg_color' in conf: textareas['fg'] = conf['fg_color'] widgets.set_style("view", te...
gpl-2.0
-2,758,089,470,375,473,000
32.243169
127
0.535958
false
CoderDojoPL/stacja_pogodowa
python_scripts/rrd_update.py
1
1226
#!/usr/bin/env python # -*- coding: utf-8 -*- # # # import sys, requests from rrdtool import * from rrdtool import update as rrd_update galileo_path = "/opt/"; if galileo_path not in sys.path: sys.path.append(galileo_path); from coderdojo_library import * if __name__ == '__main__': GalileoBoard = CoderDojo...
mit
-5,374,646,723,519,305,000
25.630435
108
0.660408
false
tpn/tpn
lib/tpn/kbhit.py
1
3218
#!/usr/bin/env python ''' From: http://home.wlu.edu/~levys/software/kbhit.py A Python class implementing KBHIT, the standard keyboard-interrupt poller. Works transparently on Windows and Posix (Linux, Mac OS X). Doesn't work with IDLE. This program is free software: you can redistribute it and/or modify it under the...
mit
6,470,994,556,970,673,000
23.195489
83
0.570541
false
naparuba/pyndsgest
application.py
1
12926
#!/usr/bin/python # -*- coding: utf-8 -*- import sys, string, pickle, os, copy, threading #from qt import * from main import * from xmlInfo import * from parcoursRep import createRomsInfosListFromRep, extractFromPathAndCrc from config import Config from tableauLangues import * from tableauLocations import * from thre...
gpl-2.0
-7,346,370,328,454,689,000
31.136816
87
0.554068
false
mmcco/Verified-BPF
bedrock/tools/universes.py
1
4675
#!/usr/bin/python import sys class CycleFound (Exception): def __init__(self, path, labels): self.path = path self.labels = labels def __str__(self): l = len(self.labels) result = "" for i in range(0, l): result = "%s%s %s " % (result, self.path[i], self.lab...
bsd-3-clause
-8,935,177,100,206,518,000
24.828729
84
0.429519
false
e-koch/VLA_Lband
14B-088/HI/analysis/co_comparison/cloud_catalog.py
1
4033
from astropy.table import Table, Column from astropy.io import fits import astropy.units as u from astropy.wcs import WCS import matplotlib.pyplot as p import numpy as np from spectral_cube import SpectralCube from analysis.paths import (iram_co21_data_path, fourteenB_HI_data_path, paper1_...
mit
7,481,956,122,856,201,000
30.755906
93
0.650384
false
team-xue/xue
xue/springaid2012/migrations/0004_auto__chg_field_applicationentry_english_band_type.py
1
5321
# 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): # Changing field 'ApplicationEntry.english_band_type' db.alter_column('springaid2012_applicatio...
bsd-3-clause
8,653,887,944,780,865,000
67.103896
182
0.560609
false
opesci/devito
devito/passes/iet/instrument.py
1
2261
from devito.ir.iet import MapNodes, Section, TimedList, Transformer from devito.mpi.routines import (HaloUpdateCall, HaloWaitCall, MPICall, MPIList, HaloUpdateList, HaloWaitList, RemainderCall) from devito.passes.iet.engine import iet_pass from devito.passes.iet.orchestration import Bus...
mit
-8,532,868,118,993,749,000
29.972603
83
0.628041
false
alexis-via/xivo-provd-plugins
plugins/xivo-yealink/build.py
1
1703
# -*- coding: utf-8 -*- # Copyright (C) 2013-2015 Avencall # # 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. # # This p...
gpl-3.0
6,400,020,919,937,620,000
28.877193
70
0.590135
false
LeadPages/gcloud_requests
gcloud_requests/pubsub.py
1
1094
from .proxy import RequestsProxy class PubSubRequestsProxy(RequestsProxy): """A PubSub-specific requests proxy. This proxy handles retries according to [1]. [1]: https://cloud.google.com/pubsub/docs/reference/error-codes """ SCOPE = ( "https://www.googleapis.com/auth/pubsub", "h...
mit
4,346,857,715,697,194,000
27.051282
75
0.624314
false
NeuromorphicProcessorProject/snn_toolbox
examples/mnist_keras_INI.py
1
5042
"""End-to-end example for SNN Toolbox. This script sets up a small CNN using Keras and tensorflow, trains it for one epoch on MNIST, stores model and dataset in a temporary folder on disk, creates a configuration file for SNN toolbox, and finally calls the main function of SNN toolbox to convert the trained ANN to an ...
mit
3,051,974,469,091,452,000
32.171053
79
0.656882
false
pacificclimate/nchelpers
setup.py
1
1497
from setuptools import setup __version__ = (5, 5, 6) setup( name="nchelpers", description="Helper classes and methods for Climate and Forecast NetCDF" "datasets", keywords="NetCDF climate forecast", packages=['nchelpers'], version='.'.join(str(d) for d in __version__), url="htt...
gpl-3.0
2,547,586,673,324,611,600
33.813953
76
0.599198
false
pmdarrow/rest-api
users/views.py
1
2374
import json import re from django.http import HttpResponse, JsonResponse from django.views.generic import View from .forms import UserSerializer from .models import User allowed_filters = re.compile(r'^(username|email|gender|title|first_name|' r'last_name|street|city|state|phone|cell|pp...
mit
-8,221,110,706,021,646,000
31.520548
76
0.613311
false
ArteliaTelemac/PostTelemac
PostTelemac/meshlayerlibs/pyqtgraph/Vector.py
1
3115
# -*- coding: utf-8 -*- """ Vector.py - Extension of QVector3D which adds a few missing methods. Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more information. """ from .Qt import QtGui, QtCore, QT_LIB import numpy as np class Vector(QtGui.QVector3D): """Extension of QVe...
gpl-3.0
5,025,998,287,396,986,000
30.795918
107
0.473515
false
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/services/services/google_ads_field_service/transports/grpc.py
1
11498
# -*- 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
-4,842,684,159,372,807,000
44.090196
112
0.614368
false
N-Parsons/exercism-python
exercises/alphametics/alphametics_test.py
1
4364
import unittest from alphametics import solve # Tests adapted from `problem-specifications//canonical-data.json` @ v1.3.0 class AlphameticsTest(unittest.TestCase): def test_puzzle_with_three_letters(self): self.assertEqual(solve("I + BB == ILL"), {"I": 1, "B": 9, "L": 0}) def test_solution_must_hav...
mit
4,866,851,841,090,693,000
35.672269
79
0.412466
false
vlegoff/tsunami
src/primaires/joueur/commandes/decrire/__init__.py
1
2585
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 CORTIER Benoît # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
bsd-3-clause
-3,452,940,074,605,381,000
44.157895
79
0.726884
false
jrwdunham/lingsync2old
fix-tags.py
1
5526
"""This script was written for the express purpose of fixing the tags in a particular OLD after the lingsync2old.py migration script failed to do so. It SHOULD NOT BE RUN on an existing OLD without careful inspection first since doing so may cause data corruption. """ import json, pprint, re from old_client import O...
apache-2.0
6,626,382,727,045,683,000
34.423077
91
0.513934
false
exted/enclib
enclib.py
1
10678
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Enclib v0.1 DEV http://github.com/exted/enclib/ Copyright 2014 Exted Luo (http://extedluo.com) 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 Founda...
mit
6,214,208,754,599,738,000
34.5
99
0.61061
false
xapple/seqenv
seqenv/common/database.py
1
13725
# Built-in modules # import os, sqlite3, types # Internal modules # from seqenv.common import download_from_url, md5sum from seqenv.common.color import Color from seqenv.common.autopaths import FilePath from seqenv.common.cache import property_cached #################################################...
mit
-5,435,183,319,394,236,000
39.973134
98
0.574281
false
neoareslinux/neutron
neutron/tests/unit/agent/l3/test_agent.py
1
98014
# Copyright 2012 VMware, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
apache-2.0
-7,372,055,779,048,575,000
45.167687
79
0.562165
false
craneworks/python-pyroute2
pyroute2/devlink.py
1
2147
import logging from pyroute2.netlink import NLM_F_REQUEST from pyroute2.netlink import NLM_F_DUMP from pyroute2.netlink.devlink import DevlinkSocket from pyroute2.netlink.devlink import devlinkcmd from pyroute2.netlink.devlink import DEVLINK_NAMES log = logging.getLogger(__name__) class DL(DevlinkSocket): def _...
apache-2.0
2,995,356,431,793,696,000
29.671429
69
0.543549
false
probcomp/cgpm
src/utils/config.py
1
4181
# -*- coding: utf-8 -*- # Copyright (c) 2015-2016 MIT Probabilistic Computing Project # 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 # Unles...
apache-2.0
4,207,421,975,917,411,300
35.675439
76
0.605836
false
bcs-de/mezzanine-pageimages
setup.py
1
1815
# # Copyright 2013, 2014 # by Arnold Krille for bcs kommunikationsloesungen # <a.krille@b-c-s.de> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:...
apache-2.0
157,210,935,039,437,280
40.25
80
0.699725
false
aarif4/wireless_positioning_system
wps_ros/nodes/wifi_logger.py
1
4249
#!/usr/bin/env python ''' This ROS Node records all of the available Wi-Fi Scans received from Wavemon and saves it in a file named Wavemon_Log_YYY-MM-DD_HHMM.log. This log file is saved in wherever the user desires it by passing it as a parameter called "log_folder". Else, the log file is saved in the home director...
bsd-3-clause
-5,401,334,931,768,648,000
32.195313
223
0.702518
false
DistributedSystemsGroup/zoe
zoe_master/gelf_listener.py
1
3184
#!/usr/bin/python3 # Copyright (c) 2016, Daniele Venzano # # 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 l...
apache-2.0
-1,562,007,374,333,840,400
35.181818
146
0.648241
false
wehlutyk/Watson
watson/watson.py
1
12022
# -*- coding: utf-8 -*- import os import json try: import configparser from configparser import ConfigParser except ImportError: import ConfigParser as configparser # noqa from ConfigParser import SafeConfigParser as ConfigParser # noqa import arrow import click import requests from .frames impor...
mit
7,550,519,707,183,524,000
29.358586
79
0.508651
false
reimandlab/ActiveDriverDB
website/helpers/views.py
1
6880
from copy import copy from flask import jsonify from flask import request from sqlalchemy import and_ from sqlalchemy import asc from sqlalchemy import desc from sqlalchemy.exc import StatementError from sqlalchemy.ext.associationproxy import AssociationProxy from database import db, fast_count from helpers.filters.ma...
lgpl-2.1
8,200,000,686,788,237,000
32.560976
97
0.561337
false
xunxunzgq/open-hackathon-bak_01
open-hackathon-server/src/hackathon/constants.py
1
9034
# -*- coding: utf-8 -*- # # ----------------------------------------------------------------------------------- # Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this softw...
mit
-8,048,698,901,031,551,000
28.42671
122
0.668807
false
AutorestCI/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/services_health_evaluation.py
1
3124
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-4,146,688,202,415,256,000
47.8125
178
0.675736
false
mattmcd/PyAnalysis
mda/finance.py
1
2262
from __future__ import division import os import re import time import boto3 from tqdm import tqdm import mda from mda.io.google_finance import LseReader from mda.io.s3 import S3Proxy __author__ = 'mattmcd' dataLoc = mda.data_dir('FTSE100') def get_all(do_copy=False): """Get last 10 days of 1 minute intraday...
apache-2.0
-5,846,792,025,987,146,000
24.41573
75
0.593722
false
Nazruden/L3-ProjetReseau
grid.py
1
2174
symbols = [' ', 'O', 'X'] EMPTY = 0 J1 = 1 J2 = 2 NB_CELLS=9 class grid: cells = [] def __init__(self): self.cells = [] for i in range(NB_CELLS): self.cells.append(EMPTY) def play(self, player, cellNum): assert(0<= cellNum and cellNum < NB_CELLS) assert(self....
mit
-6,278,201,934,140,995,000
27.605263
132
0.485741
false
jne0915/Haloes
person/views.py
1
12712
# -*- coding: utf-8 -*- from django.conf import settings from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from django.contrib.sessions.models import Session from django.core.urlresolvers import reverse from django.views.decorators.csrf import csrf_exempt from .forms import ...
gpl-3.0
-2,147,021,195,785,344,300
34.311111
102
0.53831
false
airbnb/streamalert
streamalert_cli/manage_lambda/rollback.py
1
4773
""" Copyright 2017-present Airbnb, 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, sof...
apache-2.0
-4,493,538,666,771,160,000
34.619403
100
0.624764
false
vikasTmz/cao-utils
blenderVISP/treeview_cylinders.py
1
6594
import bpy from bpy.props import IntProperty, CollectionProperty from bpy.types import Panel, UIList # ######################################### # Register # ######################################### def get_activeSceneObject(): return bpy.context.scene.objects.active.name class Uilist_actions_cylinder(bpy.types...
gpl-3.0
-8,382,457,813,764,497,000
34.836957
118
0.568092
false
untergeek/es_stats_zabbix
es_stats_zabbix/cli/get_nodes.py
1
2170
""" Click module to launch node LLD gathering """ from sys import exit import click from es_stats_zabbix import __version__ from es_stats_zabbix.exceptions import FailedExecution, NotFound from es_stats_zabbix.helpers.utils import do_request, log_to_listener, open_port CONTEXT_SETTINGS = dict(help_option_names=['-h',...
apache-2.0
3,932,955,879,487,563,300
35.166667
90
0.634101
false
antoinecarme/pyaf
tests/multi_dimensional_engine/test_multi_dimensional_air_passengers.py
1
1550
import pandas as pd import numpy as np import pyaf.ForecastEngine as autof import pyaf.Bench.TS_datasets as tsds b1 = tsds.load_airline_passengers() df = b1.mPastData df.head() lEngine = autof.cForecastEngine() lEngine H = b1.mHorizon; # lEngine.mOptions.enable_slow_mode(); # lEngine.mOptions.mDebugPerformance = ...
bsd-3-clause
-7,139,851,619,651,500,000
26.678571
71
0.726452
false
BlackHole/enigma2-obh10
lib/python/Components/Converter/Streaming2.py
2
1126
from Converter import Converter from Components.Element import cached from pprint import pprint # the protocol works as the following: # lines starting with '-' are fatal errors (no recovery possible), # lines starting with '=' are progress notices, # lines starting with '+' are PIDs to record: # "+d:[p:t[,p:t...]]"...
gpl-2.0
7,345,038,617,032,228,000
27.871795
103
0.598579
false
robodasha/research_papers
research_papers/tools/parscit_extractor.py
1
3672
import re import os.path import logging import subprocess import research_papers.logutils as logutils __author__ = 'robodasha' __email__ = 'damirah@live.com' class ParscitExtractor(object): def __init__(self, parscit_dir): """ :param parscit_dir: directory where ParsCit is installed "...
mit
-4,888,883,184,914,629,000
36.469388
80
0.587691
false
mvaled/sentry
src/sentry/analytics/event.py
2
3221
from __future__ import absolute_import, print_function __all__ = ("Attribute", "Event", "Map") import six from uuid import uuid1 from base64 import b64encode from collections import Mapping from django.utils import timezone from sentry.utils.dates import to_timestamp class Attribute(object): def __init__(self...
bsd-3-clause
-8,344,939,886,867,566,000
27.758929
100
0.571562
false
Yushenbo/Python_notes
traits/traitsListener.py
1
1067
#-*- coding:utf-8 -*- ######################################################################### # File Name: traitsListener.py # Author: Nichol.Shen # mail: nichol_shen@yahoo.com ######################################################################### #!/usr/bin/env python3 from traits.api import HasTraits, Str, Int ...
gpl-3.0
-5,560,415,951,059,783,000
23.25
78
0.523899
false
tomashaber/raiden
raiden/tests/benchmark/profile_transfer.py
1
8581
# -*- coding: utf-8 -*- from __future__ import print_function from collections import namedtuple from ethereum import slogging from raiden.settings import DEFAULT_SETTLE_TIMEOUT from raiden.utils import sha3, profiling from raiden.network.transport import UDPTransport from raiden.network.discovery import Discovery f...
mit
-4,626,534,663,286,842,000
28.088136
92
0.614847
false
pyrrho314/recipesystem
trunk/dontload-astrodata_Gemini/RECIPES_Gemini/primitives/primitives_F2.py
1
10743
import numpy as np from astrodata.adutils import logutils from gempy.adlibrary.manipulate_ad import remove_single_length_dimension from gempy.gemini import gemini_tools as gt from primitives_GEMINI import GEMINIPrimitives class F2Primitives(GEMINIPrimitives): """ This is the class containing all of the primiti...
mpl-2.0
-4,384,992,145,584,854,500
42.670732
79
0.558596
false
gborri/SickRage
sickrage/libs/trakt/core/http.py
1
9662
from __future__ import absolute_import, division, print_function import calendar import datetime import logging import socket import time from threading import RLock import requests from requests.adapters import DEFAULT_POOLBLOCK, HTTPAdapter from trakt.core.configuration import DEFAULT_HTTP_RETRY, DEFAULT_HTTP_MAX_R...
gpl-3.0
5,518,086,728,358,937,000
30.167742
112
0.602049
false
xuru/pyvisdk
pyvisdk/do/alarm_info.py
1
1147
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def AlarmInfo(vim, *args, **kwargs): '''Attributes of an alarm.''' obj = vim.cli...
mit
2,583,755,846,629,879,000
31.8
124
0.589364
false
mwrlabs/veripy
contrib/rfc4862/global_address_autoconfiguration_and_dad.py
1
6447
from scapy.all import * from veripy.assertions import * from slaac_test_helper import SlaacTestHelper from veripy.models import IPv6Address class GlobalAddressAutoConfigHostTestHelper(SlaacTestHelper): def base_ra(self): ll_info = ICMPv6NDOptSrcLLAddr(lladdr=self.router(1).iface(0).ll_addr) link_m...
gpl-3.0
-5,477,840,030,406,324,000
38.802469
196
0.680006
false
nitipit/appkit
appkit/api/v0_2_4/test_app.py
1
1582
#!/usr/bin/env python from appkit.api.v0_2_4.app import * import os import unittest class AppKitUnitTest(unittest.TestCase): def setUp(self): app = App(__file__) @app.route('^/$') def index(): return ''' <html> <head><title>Test App</tible></he...
mit
2,750,187,180,367,244,000
26.275862
74
0.525917
false
zengchunyun/s12
day10/ext/temp/echoclient.py
1
1150
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: zengchunyun """ from twisted.internet import reactor, protocol # a client protocol class EchoClient(protocol.Protocol): """Once connected, send a message, then print the result.""" def connectionMade(self): self.transport.write(bytes("hello...
gpl-2.0
-5,031,809,358,392,325,000
24
64
0.658261
false
joshiatul/game_playing
environments/blackjack.py
1
6419
import random from collections import namedtuple from . import environment import os # TODO Resolve for information <===> state.. unneccessary confusion class BlackJack(environment.AbstractGame): def __init__(self): self.action_space = ['hit', 'stay'] super(BlackJack, self).__init__('blackjack') ...
mit
-3,850,240,070,565,727,000
34.269231
139
0.564885
false
looker/sentry
tests/sentry/api/endpoints/test_project_integration_details.py
1
2708
from __future__ import absolute_import import six from sentry.models import Integration, ProjectIntegration from sentry.testutils import APITestCase class ProjectIntegrationDetailsTest(APITestCase): def setUp(self): super(ProjectIntegrationDetailsTest, self).setUp() self.login_as(user=self.user...
bsd-3-clause
-8,245,508,010,090,842,000
32.02439
76
0.634786
false
bhanduroshan/fbstats-docker
action/migrations/0002_pageconversation_pagesettings.py
1
1191
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-05-21 08:42 from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('action', '0001_initial'), ] operations ...
mit
426,858,071,609,023,170
35.090909
114
0.587741
false
jseabold/statsmodels
statsmodels/sandbox/multilinear.py
4
13890
"""Analyze a set of multiple variables with a linear models multiOLS: take a model and test it on a series of variables defined over a pandas dataset, returning a summary for each variable multigroup: take a boolean vector and the definition of several groups of variables and test if the group has a f...
bsd-3-clause
5,445,314,761,563,410,000
42.003096
79
0.655076
false
llooker/pylookml
lookml/tests/scenarios/scenario_eav_test.py
1
5571
import src.lookml.lookml as lookml import src.lookml.lkml as lkml import unittest, copy from pprint import pprint import configparser, json # from looker_sdk import client, models, methods from looker_sdk import models, methods, init31 config = configparser.ConfigParser() config.read('tests/settings.ini') class testS...
mit
8,653,853,873,594,693,000
37.965035
135
0.490756
false
jean/sentry
src/sentry/digests/backends/redis.py
1
24749
from __future__ import absolute_import import itertools import logging import random import six import time from contextlib import contextmanager from redis.exceptions import ResponseError, WatchError from sentry.digests import Record, ScheduleEntry from sentry.digests.backends.base import Backend, InvalidState from...
bsd-3-clause
-3,868,215,590,341,086,000
41.744387
103
0.553679
false
pierky/ripe-atlas-tools
ripe/atlas/tools/commands/measure/base.py
1
14405
# Copyright (c) 2016 RIPE NCC # # 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. # # This program is distributed in the h...
gpl-3.0
-8,719,190,160,806,990,000
34.567901
96
0.55807
false
strahlex/machinekit
configs/ARM/BeagleBone/Replicape-Stretch/ARM.Replicape.B3/run.py
5
1467
#!/usr/bin/python2 import sys import os import errno import subprocess import importlib import argparse from time import * from machinekit import launcher def mkdir_p(path): """ 'mkdir -p' in Python """ try: os.makedirs(path) except OSError as exc: # Python <=2.5 if exc.errno == errno.EEX...
lgpl-2.1
6,406,017,663,650,471,000
29.5625
85
0.705521
false
googleapis/googleapis-gen
google/cloud/iap/v1beta1/iap-v1beta1-py/google/cloud/iap_v1beta1/services/identity_aware_proxy_admin_v1_beta1/transports/base.py
1
7927
# -*- 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,073,144,378,401,434,000
39.238579
161
0.627476
false
Crystal-SDS/dashboard
crystal_dashboard/dashboards/crystal/common.py
1
11574
import json from django.utils.translation import ugettext_lazy as _ from swiftclient import ClientException from horizon import exceptions from openstack_dashboard.api import keystone from openstack_dashboard.api import swift from crystal_dashboard.api import filters as api_filters from crystal_dashboard.api import p...
gpl-3.0
-7,474,596,593,478,111,000
27.577778
139
0.637463
false