repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
nspi/vbcg
src/defines.py
1
1253
#!/usr/bin/env python # -*- coding: ascii -*- """defines.py - this file contains meta data and program parameters""" # Meta data __author__ = "Nicolai Spicher" __credits__ = ["Nicolai Spicher", "Stefan Maderwald", "Markus Kukuk", "Mark E. Ladd"] __license__ = "GPL v3" __version__ = "v0.2-beta" __maintainer__ = "Nicola...
gpl-3.0
-914,130,250,429,905,500
23.568627
91
0.691141
false
2.562372
false
false
false
SUSE/azure-sdk-for-python
azure-mgmt-sql/azure/mgmt/sql/models/elastic_pool_per_database_min_dtu_capability.py
2
1345
# 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
-770,284,012,031,825,800
31.804878
76
0.589591
false
4.559322
false
false
false
googleads/google-ads-python
examples/basic_operations/add_campaigns.py
1
4715
#!/usr/bin/env python # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
-6,714,371,405,759,470,000
34.719697
80
0.700742
false
3.861589
false
false
false
chiara-paci/santaclara-third
setup.py
1
1462
import os from distutils.core import setup README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='santaclara_third', version='0.11.1', packages=['santa...
bsd-3-clause
3,694,934,636,837,836,000
35.55
103
0.604651
false
3.777778
false
false
false
Lektorium-LLC/edx-ora2
openassessment/xblock/validation.py
1
17104
""" Validate changes to an XBlock before it is updated. """ from collections import Counter from submissions.api import MAX_TOP_SUBMISSIONS from openassessment.assessment.serializers import rubric_from_dict, InvalidRubric from openassessment.assessment.api.student_training import validate_training_examples from openass...
agpl-3.0
1,735,284,554,581,837,600
40.921569
120
0.651485
false
4.441444
false
false
false
luisera/hmtk
hmtk/sources/area_source.py
1
10138
#!/usr/bin/env/python # -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # LICENSE # # Copyright (c) 2010-2013, GEM Foundation, G. Weatherill, M. Pagani, # D. Monelli. # # The Hazard Modeller's Toolkit is free software: you can redistribute # it and/or modify it under the terms of the GNU Affero Gene...
agpl-3.0
-2,997,554,901,713,249,300
37.992308
79
0.626455
false
4.0552
false
false
false
chuckinator0/Projects
scripts/houseRobber2.py
1
3769
''' You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed. All houses at this place are arranged in a circle. That means the first house is the neighbor of the last one. Meanwhile, adjacent houses have security system connected and it will automatically co...
gpl-3.0
-690,878,699,913,978,600
40.417582
391
0.714248
false
2.974743
false
false
false
SolusOS-discontinued/pisi
pisi/package.py
1
9936
# -*- coding: utf-8 -*- # # Copyright (C) 2005-2010, TUBITAK/UEKAE # # 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. # #...
gpl-2.0
1,664,222,144,843,548,200
33.620209
90
0.58122
false
4.09732
false
false
false
mesocentrefc/Janua-SMS
janua/actions/set_auth_backend.py
1
2374
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # # Copyright (c) 2016 Cédric Clerget - HPC Center of Franche-Comté University # # This file is part of Janua-SMS # # http://github.com/mesocentrefc/Janua-SMS # # This program is free software: you can redistribute it and/or modify # it under th...
gpl-2.0
-6,885,421,660,702,887,000
28.283951
77
0.6543
false
3.888525
true
false
false
annashcherbina/sherlockstoolkit
python_analysis_modules/quality_check/qcSamples.py
1
7970
#This module will draw an S-curve for a set of selected profiles. import MySQLdb as mdb import os import sys import Params from Outputs import * def recordAttachmentParameterMappings(attachment,cur): attachments=[attachment] parameter_ids=[Params.min_calls_id] print str(parameter_ids) for attac...
gpl-3.0
6,908,922,549,713,577,000
35.559633
247
0.580678
false
3.624375
false
false
false
LeMinaw/minaw.net
dynimg/models.py
1
1599
#-*- coding: utf-8 -*- from django.urls import reverse from django.db import models from datetime import timedelta class BaseModel(models.Model): created = models.DateField (auto_now_add=True, verbose_name="création" ) last_used = models.DateField (auto_now=True, blan...
gpl-3.0
-952,888,346,687,520,100
33.673913
106
0.608777
false
3.649886
false
false
false
matthewalbani/scipy
scipy/io/matlab/tests/test_pathological.py
24
1064
""" Test reading of files not conforming to matlab specification We try and read any file that matlab reads, these files included """ from __future__ import division, print_function, absolute_import from os.path import dirname, join as pjoin from numpy.testing import assert_, assert_raises from scipy.io.matlab.mio ...
bsd-3-clause
5,226,861,288,698,345,000
31.242424
73
0.702068
false
3.546667
true
false
false
swordsmaster/waf
rtems_waf/debug.py
2
2222
from hashlib import sha256 from os.path import exists from json import JSONEncoder from time import time import logging from logging.handlers import MemoryHandler from waflib.Task import Task from waflib.Utils import subprocess, check_dir from waflib.Logs import debug from os.path import dirname #from cStringIO impor...
gpl-2.0
5,777,441,172,275,156,000
22.389474
66
0.680918
false
3.060606
false
false
false
jtpaasch/armyguys
armyguys/jobs/instanceprofiles.py
1
8479
# -*- coding: utf-8 -*- """Jobs for IAM roles.""" import os from ..aws.iam import instanceprofile from .exceptions import FileDoesNotExist from .exceptions import ImproperlyConfigured from .exceptions import MissingKey from .exceptions import ResourceAlreadyExists from .exceptions import ResourceDoesNotExist from ....
mit
-5,456,793,122,395,470,000
24.011799
73
0.617172
false
4.31721
false
false
false
Azure/azure-sdk-for-python
sdk/search/azure-search-documents/samples/async_samples/sample_semantic_search_async.py
1
2503
# 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. # --------------------------------------------------------------------...
mit
-5,546,289,094,553,076,000
36.358209
102
0.64203
false
3.917058
false
false
false
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/network/linkset.py
1
6262
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
237,834,643,917,131,900
27.857143
109
0.66145
false
3.314981
false
false
false
vuolter/pyload
src/pyload/plugins/decrypters/YoutubeComFolder.py
1
6834
# -*- coding: utf-8 -*- import json from ..base.decrypter import BaseDecrypter class YoutubeComFolder(BaseDecrypter): __name__ = "YoutubeComFolder" __type__ = "decrypter" __version__ = "1.11" __status__ = "testing" __pattern__ = r"https?://(?:www\.|m\.)?youtube\.com/(?P<TYPE>user|playlist|view_...
agpl-3.0
-5,458,169,004,478,449,000
37.393258
132
0.473954
false
4.38921
false
false
false
4degrees/harmony
source/harmony/schema/collection.py
1
1859
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. from ..error import SchemaConflictError class Collection(object): '''Store registered schemas.''' def __init__(self, schemas=None): '''Initialise collection with *schemas*.''' self._schema...
apache-2.0
-6,000,509,363,584,870,000
27.166667
78
0.555137
false
4.374118
false
false
false
praekelt/portia
portia/utils.py
1
1745
from glob import glob import json import os from urlparse import urlparse from twisted.internet.endpoints import serverFromString from twisted.internet import reactor as default_reactor from twisted.web.server import Site from twisted.python import log from txredisapi import Connection from .web import PortiaWebServ...
bsd-3-clause
3,205,609,877,235,778,600
29.614035
78
0.695702
false
3.974943
false
false
false
zircote/gh_mirror
gh_mirror/cli.py
1
3527
#!/usr/bin/python # -*- coding: utf-8; -*- # Copyright [2013] [Robert Allen] # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
apache-2.0
8,240,381,497,432,421,000
35.360825
110
0.620357
false
3.875824
false
false
false
remi1411/RootTheBox
setup/xmlsetup.py
6
7231
# -*- coding: utf-8 -*- ''' Created on Aug 26, 2013 Copyright 2012 Root the Box Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ...
apache-2.0
7,185,562,956,989,984,000
39.172222
95
0.599226
false
3.893915
false
false
false
coderbone/SickRage-alt
sickbeard/show_name_helpers.py
1
9036
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: https://sickchill.github.io # # This file is part of SickChill. # # SickChill 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...
gpl-3.0
774,299,349,112,703,500
35.881633
158
0.651726
false
3.809444
false
false
false
renanvicente/urleater-server
urleater/settings.py
1
2513
""" Django settings for urleater project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) i...
apache-2.0
-8,719,305,114,898,483,000
23.881188
71
0.6924
false
3.205357
false
false
false
meowtec/fanserve.py
examples/test-tornado.py
1
1361
# coding:utf-8 import sys sys.path.append("..") import tornado.ioloop import tornado.web import fanserve as fans class MyTornadoFans(fans.Tornado): app_secret = 'appsecretEnF5leY4V' def receive_text(self, text): if text == u'文章': print('receive wz') self.reply_articles([ ...
mit
-7,682,928,567,104,062,000
23.98
101
0.572458
false
2.911422
false
false
false
Jajcus/pyxmpp
pyxmpp/stanzaprocessor.py
1
19717
# # (C) Copyright 2003-2010 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be u...
lgpl-2.1
5,931,750,637,663,219,000
36.990366
104
0.589745
false
4.516033
false
false
false
ocornut/bgfx
3rdparty/scintilla/scripts/LexGen.py
63
2214
#!/usr/bin/env python # LexGen.py - implemented 2002 by Neil Hodgson neilh@scintilla.org # Released to the public domain. # Regenerate the Scintilla source files that list all the lexers. # Should be run whenever a new lexer is added or removed. # Requires Python 2.5 or later # Files are regenerated in place with temp...
bsd-2-clause
-3,412,395,111,659,150,300
40
77
0.654472
false
3.481132
false
false
false
zerok/celery-prometheus-exporter
setup.py
1
1075
import io from setuptools import setup long_description = "See https://github.com/zerok/celery-prometheus-exporter" with io.open('README.rst', encoding='utf-8') as fp: long_description = fp.read() setup( name='celery-prometheus-exporter', description="Simple Prometheus metrics exporter for Celery", ...
mit
1,541,334,639,674,667,500
27.289474
76
0.618605
false
3.681507
false
false
false
thaim/ansible
lib/ansible/modules/network/fortios/fortios_firewall_multicast_policy6.py
13
14200
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, 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, either version 3 of the Lic...
mit
6,936,528,424,947,619,000
32.17757
113
0.552535
false
4.493671
false
false
false
ekager/focus-android
tools/taskcluster/lib/tasks.py
1
5419
# 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/. import datetime import json import os import taskcluster class TaskBuilder(object): def __init__(self, task_id, re...
mpl-2.0
-7,108,205,373,988,370,000
34.651316
147
0.49511
false
4.416463
false
false
false
PLyczkowski/Sticky-Keymap
2.74/scripts/addons_contrib/add_mesh_building_objects/tread.py
2
12171
# Stairbuilder - Tread generation # # Generates treads for stair generation. # Stair Type (typ): # - id1 = Freestanding staircase # - id2 = Housed-open staircase # - id3 = Box staircase # - id4 = Circular staircase # Tread Type (typ_t): # - tId1 = Classic # - tId2 = Basic Steel #...
gpl-2.0
-6,137,030,975,140,094,000
49.293388
115
0.45822
false
3.302849
false
false
false
sr/beadmin
sites-edit.py
1
1922
#!/usr/bin/env python #-*- coding: utf8 -*- from dialog import * import database as db import dbconf import re import sys import os if os.environ.has_key('SUDO_USER'): user = os.environ['SUDO_USER'] else: user = 'root' userfromdb = db.select('users', where="login = '%s'" % user) if len(userfromdb) =...
gpl-3.0
-4,300,826,163,190,533,600
27.863636
102
0.64252
false
2.75289
false
false
false
hydroshare/hydroshare
hs_geo_raster_resource/migrations/0001_initial.py
1
7484
# -*- coding: utf-8 -*- from django.db import models, migrations from django.conf import settings import hs_core.models class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), ('pages', '__first__'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ...
bsd-3-clause
2,092,259,263,180,738,800
60.344262
250
0.608097
false
4.363848
false
false
false
CanonicalLtd/landscape-client
landscape/client/monitor/tests/test_activeprocessinfo.py
1
33631
import operator import os import shutil import tempfile import subprocess from twisted.internet.defer import fail from landscape.lib.testing import ProcessDataBuilder from landscape.client.monitor.activeprocessinfo import ActiveProcessInfo from landscape.client.tests.helpers import LandscapeTest, MonitorHelper from m...
gpl-2.0
-229,604,412,375,126,000
44.570461
79
0.522821
false
4.305595
true
false
false
tallforasmurf/PPQT
pqFnote.py
1
58681
# These imports move Python 2.x almost to Python 3. # They must precede anything except #comments, including even the docstring from __future__ import division from __future__ import print_function from __future__ import unicode_literals from future_builtins import * __version__ = "1.3.0" __author__ = "David Cortesi"...
gpl-3.0
-8,001,404,848,635,416,000
44.738114
124
0.630869
false
3.72933
false
false
false
maweigert/spimagine
spimagine/utils/imgutils.py
1
4869
from __future__ import absolute_import, print_function import logging logger = logging.getLogger(__name__) import os import numpy as np import re import json import warnings with warnings.catch_warnings(): warnings.simplefilter("ignore") from tifffile import TiffFile, imsave, imread #from spimagine....
bsd-3-clause
-8,010,270,323,642,686,000
23.715736
100
0.551037
false
3.171987
false
false
false
wunderlins/learning
python/zodb/lib/osx/ZEO/scripts/zeoqueue.py
2
11094
#!/usr/bin/env python2.3 """Report on the number of currently waiting clients in the ZEO queue. Usage: %(PROGRAM)s [options] logfile Options: -h / --help Print this help text and exit. -v / --verbose Verbose output -f file --file file Use the specified file to store the incr...
gpl-2.0
2,865,013,277,010,498,600
26.735
78
0.534974
false
3.715338
false
false
false
GoogleCloudPlatform/cloud-foundation-toolkit
dm/templates/network/network.py
1
3125
# Copyright 2018 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-7,620,196,664,950,365,000
31.552083
87
0.56032
false
4.328255
false
false
false
kkarrancsu/fecapi
python/qa_tpc_decoder_withnoise.py
1
7308
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: TPC Encoder Test # Generated: ################################################## from gnuradio import gr, gr_unittest from gnuradio import blocks from fec.extended_decoder_interface import extended_decoder_i...
gpl-3.0
-1,348,339,920,012,235,000
33.476415
127
0.558019
false
3.818182
true
false
false
bdestombe/flopy-1
flopy/modflow/mfbas.py
2
11659
""" mfbas module. Contains the ModflowBas class. Note that the user can access the ModflowBas class as `flopy.modflow.ModflowBas`. Additional information for this MODFLOW package can be found at the `Online MODFLOW Guide <http://water.usgs.gov/ogw/modflow/MODFLOW-2005-Guide/index.html?bas6.htm>`_. """ imp...
bsd-3-clause
5,940,413,536,282,508,000
32.494083
93
0.546016
false
4.04967
false
false
false
karimbahgat/PythonGis
pythongis/vector/geometry.py
1
3638
from shapely.geometry import shape from shapely.prepared import prep from .geography import Geography class Geometry(object): def __init__(self, obj, **kwargs): # stored internally as shapely if isinstance(obj, dict): self._shapely_data = obj # keep geojson as is, dont convert to shap...
mit
2,483,002,800,462,296,000
26.770992
98
0.604178
false
4.148233
false
false
false
MDAnalysis/pyQuteMol
python/Molecule.py
1
19581
import numpy import random from OpenGL.GL import * import glew_wrap as glew from Canvas import moltextureCanvas, haloCanvas from OctaMap import octamap from trackball import glTrackball from quaternion import quaternion from CgUtil import cgSettings import hardSettings import ShadowMap from ShadowMap import AOgpu2 imp...
gpl-2.0
5,204,924,955,819,472,000
33.595406
146
0.6038
false
3.016174
false
false
false
mbakker7/ttim
ttim/equation.py
1
18909
import numpy as np class HeadEquation: def equation(self): '''Mix-in class that returns matrix rows for head-specified conditions. (really written as constant potential element) Works for nunknowns = 1 Returns matrix part nunknowns,neq,npval, complex Returns rhs part nunkno...
mit
836,768,421,473,794,000
50.38587
82
0.459041
false
3.588727
false
false
false
BrainTech/openbci
obci/analysis/classification/tests/pyml_test.py
1
1979
#!/usr/bin/env python # -*- coding: utf-8 -*- # # OpenBCI - framework for Brain-Computer Interfaces based on EEG signal # Project was initiated by Magdalena Michalska and Krzysztof Kulewski # as part of their MSc theses at the University of Warsaw. # Copyright (C) 2008-2009 Krzysztof Kulewski and Magdalena Michalska # ...
gpl-3.0
6,883,719,996,742,280,000
31.966667
81
0.68908
false
3.200647
false
false
false
bagelbits/dnd-3.5-tools
character-specific/Krag/weapons/boulder.py
1
2255
#!/usr/bin/env python # -*- coding: utf8 -*- """ Damage Calculator for my character, Krag Written by Christopher Durien Ward 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
1,582,518,392,385,350,000
29.066667
97
0.642572
false
3.432268
false
false
false
jemandez/creaturas-magicas
Configuraciones básicas/scripts/addons/blendertools-1.0.0/makewalk/fkik.py
1
23920
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
gpl-3.0
-1,981,514,103,589,804,800
30.682119
142
0.580644
false
2.885752
false
false
false
FND/impact
impactlib/install.py
1
5369
import zipfile import StringIO import tempfile import shutil import os from impactlib.load import load_repo_data from impactlib.refresh import strip_extra from impactlib.github import GitHub from impactlib.semver import SemanticVersion from impactlib import config try: import colorama from colorama import For...
mit
2,942,958,143,946,274,000
29.505682
79
0.562302
false
3.947794
false
false
false
lightscaletech/pulseaudio-streamer
pulseaudio_streamer/device.py
1
2077
import sys import socket import errno import re import xmltodict import logging if sys.version_info >= (3, 0): from urllib import request elif sys.version_info < (3, 0): import urllib as request class Service(object): def __init__(self, data): self.service_type = data['serviceType'] self.s...
gpl-3.0
7,192,833,278,839,230,000
24.9625
63
0.597015
false
3.702317
false
false
false
kodi-czsk/plugin.video.joj.sk
default.py
2
1991
# -*- coding: UTF-8 -*- #/* # * Copyright (C) 2013 Maros Ondrasek # * # * # * 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, or (at your option) # * any later versi...
gpl-2.0
-8,803,822,367,505,026,000
37.288462
100
0.657459
false
3.391823
false
false
false
mrunge/openstack_horizon
openstack_horizon/dashboards/admin/dashboard.py
1
1166
# Copyright 2012 Nebula, 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 agree...
apache-2.0
-5,459,148,279,635,116,000
31.388889
78
0.680103
false
3.912752
false
false
false
QuantCrimAtLeeds/PredictCode
tests/scripted/processors_test.py
1
2017
import pytest from unittest.mock import patch import open_cp.scripted.processors as processors import open_cp.scripted.evaluators as evaluators from .. import helpers import io @pytest.fixture def outfile(): with io.StringIO() as f: yield f @pytest.fixture def hit_rate_save(outfile): hrs = processor...
artistic-2.0
-8,576,715,014,576,377,000
34.385965
137
0.667328
false
2.931686
true
false
false
marcore/edx-platform
lms/djangoapps/courseware/features/events.py
177
2247
# pylint: disable=missing-docstring from lettuce import step from lettuce import world from lettuce import before from pymongo import MongoClient from nose.tools import assert_equals from nose.tools import assert_in REQUIRED_EVENT_FIELDS = [ 'agent', 'event', 'event_source', 'event_type', 'host', ...
agpl-3.0
-2,871,520,452,668,130,300
26.072289
80
0.663996
false
3.630048
false
false
false
jamielennox/keystone
keystone/tests/unit/contrib/federation/test_utils.py
3
25865
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
1,597,877,283,526,985,000
41.332242
79
0.658264
false
4.331045
true
false
false
Muff1nz/PygameDeepRLAgent
PygameDeepRLAgent/A3CBootcampGame/ShootingGrounds/ShootingGrounds.py
1
2896
import asyncio import numpy as np import pygame from A3CBootcampGame.BaseGame import BaseGame from A3CBootcampGame.ShootingGrounds.Targets import TargetHandler from A3CBootcampGame.ShootingGrounds.GameHandler import GameHandler from A3CBootcampGame.ShootingGrounds.Player import Player from A3CBootcampGame.ShootingGrou...
mit
5,469,149,061,274,142,000
41.602941
119
0.61913
false
4.368024
false
false
false
mattgwwalker/msg-extractor
extract_msg/constants.py
1
22395
""" The constants used in extract_msg. If you modify any of these without explicit instruction to do so from one of the contributers, please do not complain about bugs. """ import datetime import struct import sys if sys.version_info[0] >= 3: BYTES = bytes STRING = str else: BYTES = str STRING = unico...
gpl-3.0
-1,751,319,441,181,529,000
32.030973
121
0.639071
false
2.626979
false
false
false
rwstauner/dear_astrid
dear_astrid/test/test_formatter.py
1
1646
# pylint: disable=wildcard-import,unused-wildcard-import,missing-docstring # pylint: disable=undefined-variable,line-too-long,invalid-name from __future__ import unicode_literals from nose.tools import * from dear_astrid.formatter import * from dear_astrid.parser import * from dear_astrid.test.helpers import * # sh...
mit
-2,871,590,752,276,053,500
26.433333
74
0.565006
false
3.141221
false
false
false
eschloss/FluFuture
openpds/visualization/stats.py
1
6302
from django.shortcuts import render_to_response from django.template import RequestContext import pdb from openpds.visualization.internal import getInternalDataStore from openpds.core.models import Profile, FluQuestions, ProfileStartEnd, FB_Connection, Emoji, Emoji2, emoji_choices, QuestionInstance, QuestionType, Fireb...
mit
6,003,946,626,061,600,000
39.146497
174
0.541098
false
3.453151
false
false
false
chiggs/theopencorps
theopencorps/travis/yml.py
1
1414
""" Helper for generating the .travis.yml file for """ __copyright__ = """ Copyright (C) 2016 Potential Ventures Ltd This file is part of theopencorps <https://github.com/theopencorps/theopencorps/> """ __license__ = """ This program is free software: you can redistribute it and/or modify it under the terms of the G...
agpl-3.0
-1,915,430,394,060,182,300
32.666667
88
0.727016
false
3.906077
false
false
false
arthurdarcet/aiohttp
aiohttp/http_websocket.py
3
24594
"""WebSocket protocol versions 13 and 8.""" import asyncio import collections import json import random import re import sys import zlib from enum import IntEnum from struct import Struct from typing import Any, Callable, List, Optional, Tuple, Union from .base_protocol import BaseProtocol from .helpers import NO_EXT...
apache-2.0
-3,456,276,932,102,304,300
36.663093
79
0.505083
false
4.442558
false
false
false
iogf/vy
vyapp/plugins/range_sel.py
1
2369
""" Overview ======== This plugin implements range selection. Key-Commands ============ Namespace: range-sel Mode: NORMAL Event: <Control-k> Description: Add/remove selection one line up from the initial selection mark. Mode: NORMAL Event: <Control-j> Description: Add/remove selection one line down from the in...
mit
2,314,433,789,206,561,000
23.42268
86
0.593921
false
3.644615
false
false
false
vanatteveldt/luctor
recipes/migrations/0008_auto_20160405_0044.py
1
1062
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-04-05 00:44 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('recipes', '0007_auto_20160330_1637'), ] operations = [ migrations.AlterModel...
mit
2,756,338,900,395,628,000
26.230769
74
0.541431
false
4.26506
false
false
false
jkokorian/ODMAnalysis
odmanalysis/scripts/TabulateODMAnalysisData.py
1
1770
import pandas as pd import odmanalysis as odm from odmanalysis import gui import os import argparse def main(): parser = argparse.ArgumentParser(description='Pivots the odmanalysis output file to produce and excel file with all cycles in different columns') parser.add_argument('filename', ...
gpl-3.0
2,002,328,115,349,419,500
32.415094
149
0.580791
false
3.986486
false
false
false
ASMlover/study
python/coroutines/trampoline.py
1
1796
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright (c) 2020 ASMlover. 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...
bsd-2-clause
4,227,577,050,536,624,000
34.92
70
0.727728
false
4.054176
false
false
false
solvire/ordo_electro
ordo_electro/config/common.py
1
11527
# -*- coding: utf-8 -*- """ Django settings for ordo_electro project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ # Build paths inside the project like this: o...
bsd-3-clause
962,781,622,429,351,200
32.221902
102
0.620543
false
3.847463
true
false
false
starcraftman/python-client
neovim/api/tabpage.py
5
1031
"""API for working with Nvim tabpages.""" from .common import Remote, RemoteMap, RemoteSequence __all__ = ('Tabpage') class Tabpage(Remote): """A remote Nvim tabpage.""" def __init__(self, session, code_data): """Initialize from session and code_data immutable object. The `code_data` cont...
apache-2.0
6,166,943,724,153,261,000
31.21875
77
0.628516
false
4.124
false
false
false
trailofbits/manticore
docs/conf.py
1
5587
# -*- coding: utf-8 -*- # # Manticore documentation build configuration file, created by # sphinx-quickstart on Fri Mar 10 18:04:51 2017. # # 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. # #...
agpl-3.0
7,054,512,338,096,493,000
28.877005
87
0.669948
false
3.855763
true
false
false
galad-loth/LearnDescriptor
symbols/metric_net.py
1
1866
# -*- coding: utf-8 -*- """ Created on Sun Jan 14 09:35:33 2017 @author: galad-loth """ import mxnet as mx import feat_net def metric_net_2ch(): data = mx.sym.Variable("data") conv_weight = [] conv_bias = [] for i in range(3): conv_weight.append(mx.sym.Variable('conv' + str(i) + ...
apache-2.0
-1,251,829,865,832,214,800
36.916667
79
0.598071
false
2.708273
false
false
false
anyonedev/anyonedev-monitor-agent
monitor/metrics/linux/dir_stat.py
1
3290
''' 监控linux目录变化(可观察的监控源) Create on : 2014-12-23 Author:liangzonghua ''' from core.MonitorSource import ObserableMonitorSource from core.MetricValue import MultiMetricValue from core import regist_monitor_source from utils.Logger import info import os import pyinotify class DiectoryChangleHanlder(pyinotify.ProcessEvent...
gpl-2.0
-28,914,935,067,256,016
40.303797
140
0.64531
false
3.745121
false
false
false
kpanic/lymph
iris/core/events.py
1
1907
import functools import re class Event(object): def __init__(self, evt_type, body, source=None): self.evt_type = evt_type self.body = body self.source = source def __getitem__(self, key): return self.body[key] def __iter__(self): return iter(self.body) @class...
apache-2.0
-3,250,280,866,492,313,000
24.77027
86
0.538542
false
4.109914
false
false
false
szatanszmatan/myrdp
app/database/schema.py
1
1109
# -*- coding: utf-8 -*- from sqlalchemy import Column, Integer, String from sqlalchemy.schema import ForeignKey from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class HostTable(Base): __tablename__ = 'hosts' id = Column(Integer, primary_key=True) name = Column(String, un...
gpl-2.0
6,143,549,514,950,739,000
31.647059
86
0.64743
false
3.696667
false
false
false
lukauskas/mMass-fork
mspy/mod_signal.py
2
20335
# ------------------------------------------------------------------------- # Copyright (C) 2005-2013 Martin Strohalm <www.mmass.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 Foundat...
gpl-3.0
36,186,215,712,887,930
29.487256
114
0.603295
false
3.948544
false
false
false
reydelamirienda/nuevo
lib/nuevo/drivers/neo4j/rest.py
1
3350
import logging log = logging.getLogger(__name__) import requests, json from nuevo.drivers.neo4j.commands import JSONCommandEncoder, Neo4jBatchedCommand from nuevo.drivers.neo4j.content import Neo4jContent from nuevo.core.exceptions import NuevoException class RESTException(NuevoException): def __init__(se...
bsd-3-clause
8,176,684,758,473,357,000
27.641026
80
0.53194
false
4.031288
false
false
false
aaronkaplan/intelmq-beta
intelmq/bots/parsers/arbor/parser.py
1
1345
from intelmq.lib.bot import Bot, sys from intelmq.lib.message import Event from intelmq.lib.harmonization import DateTime from intelmq.lib import utils class ArborParserBot(Bot): def process(self): report = self.receive_message() if not report.contains("raw"): self.acknow...
agpl-3.0
77,732,868,448,493,170
30.02381
92
0.560595
false
3.97929
false
false
false
Hotpirsch/tbot
Metar.py
1
45637
#!/usr/bin/env python # # A python package for interpreting METAR and SPECI weather reports. # # US conventions for METAR/SPECI reports are described in chapter 12 of # the Federal Meteorological Handbook No.1. (FMH-1 1995), issued by NOAA. # See <http://metar.noaa.gov/> # # International conventions for the M...
apache-2.0
2,790,689,688,889,914,000
37.31822
754
0.486491
false
3.650084
false
false
false
liuchengtian/CS523
steerstats/tools/plotting/animating/anim_scatter2d.py
8
2679
""" Matplotlib Animation Example author: Jake Vanderplas email: vanderplas@astro.washington.edu website: http://jakevdp.github.com license: BSD Please feel free to use and modify this, but keep the above information. Thanks! """ import numpy as np from matplotlib import pyplot as plt from matplotlib import animation ...
gpl-3.0
4,624,429,499,103,212,000
29.11236
80
0.668533
false
3.020293
false
false
false
Saevon/AnkiHelpers
new_kanji_locator.py
1
1381
#!/usr/bin/env python # -*- coding: UTF-8 -*- from models.anki import AnkiModel from models.kanji import Kanji from models.kanji_word import KanjiWord from utf8_helper import force_UTF8 import kana import settings import argparse import sys from collections import Counter def parse(args=None): parser = argpars...
mit
-6,331,862,144,492,737,000
22.016667
73
0.613324
false
3.461153
false
false
false
dpereira/synergy
ext/toolchain/commands1.py
1
58099
#Embedded file name: ext/toolchain/commands1.py import sys, os, ConfigParser, shutil, re, ftputil, zipfile, glob, commands from generators import VisualStudioGenerator, EclipseGenerator, XcodeGenerator, MakefilesGenerator from getopt import gnu_getopt if sys.version_info >= (2, 4): import subprocess class Toolchai...
gpl-2.0
-9,186,781,263,585,066,000
38.442634
939
0.547858
false
3.94239
true
false
false
davisd/django-blogyall
blog/managers.py
1
4842
from datetime import datetime from django.db import models from tagging.models import Tag, TaggedItem class PostImageManager(models.Manager): """ Post Image Manager """ # use for related fields use_for_related_fields = True def get_gallery_images(self): """ Get gallery images ...
bsd-3-clause
2,348,055,286,321,983,500
35.413534
112
0.577654
false
4.177739
false
false
false
kcpawan/django
tests/many_to_one/models.py
215
2785
""" Many-to-one relationships To define a many-to-one relationship, use ``ForeignKey()``. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Reporter(models.Model): first_name = models.CharFiel...
bsd-3-clause
-1,773,659,522,397,237,800
26.85
97
0.712029
false
3.607513
false
false
false
desihub/desisim
py/desisim/pixelsplines.py
1
15653
""" desisim.pixelsplines ==================== Pixel-integrated spline utilities. Written by A. Bolton, U. of Utah, 2010-2013. """ from __future__ import absolute_import, division, print_function import numpy as n from scipy import linalg as la from scipy import sparse as sp from scipy import special as sf def compu...
bsd-3-clause
-4,022,755,084,042,178,600
43.851003
80
0.565259
false
3.324766
false
false
false
JohnBrookes/MayaAWD
Autodesk/Maya2013/Python/Lib/site-packages/pymel/tools/envparse.py
4
15560
"Parser for Maya.env" import sys, os, os.path, logging #import external.ply.lex as lex try: from pymel.util.external.ply import lex except ImportError: from ply import lex from pymel.mayautils import getMayaAppDir _logger = logging.getLogger(__name__) # lexer and parser for the Maya.env file # first level ...
apache-2.0
-6,613,185,605,031,252,000
40.718499
169
0.546722
false
3.810923
false
false
false
torshid/foodnow
entities/user.py
1
2323
from flask import render_template from common import * import datetime from tables import users, restolikes, dishlikes from werkzeug import redirect page = Blueprint(__name__) @page.route('/user/<int:user_id>/') def main(user_id): if isValidUserId(user_id): return render_template('user.html', user_id = ...
gpl-3.0
7,894,251,774,190,047,000
29.986667
86
0.599656
false
3.401171
false
false
false
cmusv-sc/DIWD-Team4-Wei-Lin-Tsai
src/python/data_2015_fall/api/generateNetwork.py
1
2181
from django.http import JsonResponse from data_2015_fall.models import * from neomodel import db class NetworkResponse(): def __init__(self, name): self.name = name self.children = [] def to_dict(self): return { "name": self.name, "children": [c.to_dict() for c...
unlicense
-2,011,199,960,961,736,700
35.983051
103
0.65658
false
3.299546
false
false
false
sahikaru/DP
chapter1/strategymode.py
1
1364
#!/usr/env python class Flyable: def fly(self): pass class Quackable(object): def quack(self): pass class ReadHeadDuckFly(Flyable): def fly(self): print "I am a readheadduck, I can fly" class ReadHeadDuckQack(Quackable): def quack(self): print "I am a readheadduck,Dc...
gpl-2.0
-60,068,599,119,975,496
19.984615
64
0.603372
false
2.847599
false
false
false
patricmutwiri/pombola
pombola/core/migrations/0045_migrate_identifiers.py
4
25162
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.contrib.contenttypes import generic from django.db import models class Migration(DataMigration): def get_fields_mapping(self, orm): return {'old-mz-person-original': (orm.Person, 'original_id'), ...
agpl-3.0
-2,694,846,960,529,568,300
82.042904
176
0.547015
false
3.688361
false
false
false
aristanetworks/arista-ovs-quantum
quantum/plugins/cisco/ucs/cisco_ucs_plugin_v2.py
4
14992
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2012 Cisco Systems, 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...
apache-2.0
-5,851,265,784,641,359,000
43.486647
79
0.576241
false
3.791603
false
false
false
MTgeophysics/mtpy
mtpy/gui/SmartMT/legacy/frequency_selection.py
1
6304
import numpy as np from PyQt4 import QtGui from mtpy.gui.SmartMT.gui.matplotlib_imabedding import MPLCanvas, Cursor from mtpy.gui.SmartMT.ui_asset.groupbox_frequency_period_single import Ui_groupBoxFrequency_pereiod_single class FrequencySingle(QtGui.QGroupBox): """ Frequency selection (single frequency) ...
gpl-3.0
-2,814,063,199,744,263,700
37.439024
109
0.568211
false
3.818292
false
false
false
NuenoB/TheTeleop
src/the_teleop/sender.py
1
1250
#! /usr/bin/env python import genpy import rospy from std_msgs.msg import String import roslib import roslib.message def sender(msg,reciver, msg_type): #reciver -> String #msg -> obj #rospy.loginfo("sender " + reciver) msg_class = roslib.message.get_message_class(msg_type) pub = rospy.Publisher(reciver, msg_clas...
bsd-3-clause
274,586,115,358,421,950
22.166667
62
0.6808
false
2.422481
false
false
false
bmccary/csvgb
csvgb/reductions.py
1
3473
from functools import partial from itertools import izip from csvgb import ( isna, isnum, isexempt, ismissed, isransomed, sum0, drop0, inner0, mean0, K_RANSOMED, K_MISSED, K_EXAM_N, K_HOMEWORK_N, K_QUIZ_N...
mit
7,387,753,133,588,528,000
22.62585
109
0.463288
false
2.473647
false
false
false
darcamo/pyphysim
pyphysim/util/serialize.py
1
5985
#!/usr/bin/env python """ Module containing function related to serialization. """ import json from typing import Any, Dict, Union, cast import numpy as np Serializable = Union[np.ndarray, np.int32, np.int64, np.float32, np.float64, np.float128, set] # A type corresponding to the JSON represent...
gpl-2.0
-4,537,723,960,394,275,300
26.580645
80
0.570426
false
4.413717
false
false
false
ctuning/ck-env
soft/dataset.librispeech.preprocessed/customize.py
1
2228
# # Collective Knowledge (individual environment - setup) # # See CK LICENSE.txt for licensing details # See CK COPYRIGHT.txt for copyright details # # Developer: Leo Gordon, leo@dividiti.com # ############################################################################## # setup environment setup def setup(i): ...
bsd-3-clause
-705,101,672,003,192,600
30.380282
91
0.496409
false
4.284615
false
false
false
feresum/acml
miniml/typeunion.py
1
1303
class TypeUnion(dict): def _get(self, k): return super().__getitem__(k) def _set(self, k, v): super().__setitem__(k, v) def representative(self, k): while type(self._get(k)) is not int: k = self._get(k) return k def size(self, x): return self._get(self...
mit
5,240,343,500,133,450,000
30.780488
63
0.488872
false
3.512129
false
false
false
dirjud/pickup
event/models.py
1
3032
from django.db import models from django.utils import timezone import pytz import datetime def hash(n): n = int(n) return ((0x0000FFFF & n)<<16) + ((0xFFFF0000 & n)>>16) class EventInstance(object): def __init__(self, event, event_time, date): self.date = date.date() self.time = date.time(...
gpl-2.0
-7,187,010,939,716,523,000
33.850575
121
0.611148
false
3.481056
false
false
false
team-xue/xue
xue/cms/utils/helpers.py
4
2000
# -*- coding: utf-8 -*- from django.conf import settings # modify reversions to match our needs if required... def reversion_register(model_class, fields=None, follow=(), format="json", exclude_fields=None): """CMS interface to reversion api - helper function. Registers model for reversion only if reversion...
bsd-3-clause
-278,905,006,542,900,480
32.35
96
0.639
false
4.395604
false
false
false
lizenn/erlang-dbus
test/dbus_client_SUITE_data/example-service.py
1
1776
#!/usr/bin/env python3 from gi.repository import GObject import dbus import dbus.service import dbus.glib class SampleObject(dbus.service.Object): def __init__(self, bus_name, object_path="/"): dbus.service.Object.__init__(self, bus_name, object_path) @dbus.service.method("net.lizenn.dbus.SampleInter...
apache-2.0
2,494,797,983,573,573,600
31.290909
80
0.648086
false
3.552
false
false
false
z/xonotic-server-management-suite
tests/test_command.py
1
1055
import os import xsms.util as util from xsms.command import Command from xsms.config import conf root_dir = os.path.dirname(os.path.abspath(__file__)) def test_command_object(): command = Command(conf=conf) assert isinstance(command, Command) assert command.conf['xsms_config_root'] == os.path.expanduser(...
mit
3,742,688,121,942,573,000
33.064516
143
0.718483
false
3.403226
true
false
false
Naeka/wagtailmodelchooser
tests/conftest.py
1
3177
def pytest_configure(): from django.conf import settings settings.configure( DEBUG_PROPAGATE_EXCEPTIONS=True, DATABASES={'default': {'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:'}}, SITE_ID=1, SECRET_KEY='not very secret in tests', ...
bsd-2-clause
-5,454,537,738,664,717,000
36.821429
82
0.533207
false
4.917957
false
false
false
tkliuxing/django-wiki
wiki/plugins/template/south_migrations/0001_initial.py
1
12750
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # ...
gpl-3.0
-1,443,735,191,738,663,700
73.561404
214
0.567373
false
3.787879
false
false
false
obs145628/2048-ai
tests/commander.py
1
2290
import os import subprocess import ioutils def ebool(x): if x: return 'T' else: return 'F' class Commander: def __init__(self): self.use_valgrind = False self.timeout = -1 def run_cmd(self, args, read_stdout = True, read_stderr = True): run_dict = { 'args':...
mit
-7,483,657,585,588,319,000
29.533333
88
0.531878
false
3.687601
false
false
false
jfterpstra/bluebottle
bluebottle/slides/tests/test_api.py
1
2299
import json from django.core.urlresolvers import reverse from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework import status from bluebottle.test.utils import BluebottleTestCase from bluebottle.test.factory_models.slides import SlideFactory, \ DraftSlideF...
bsd-3-clause
7,004,832,615,452,423,000
31.842857
77
0.661157
false
4.019231
true
false
false
grundic/yagocd
yagocd/resources/agent.py
1
6973
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # The MIT License # # Copyright (c) 2016 Grigory Chernyshev # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation file...
isc
8,598,892,318,151,013,000
32.047393
114
0.601176
false
4.160501
false
false
false