repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
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
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
spectralpython/spectral
spectral/image.py
1
6861
''' Generic functions for handling spectral images. ''' from __future__ import absolute_import, division, print_function, unicode_literals import numbers import numpy as np from .spectral import BandInfo class Image(object): '''spectral.Image is the common base class for spectral image objects.''' def __in...
gpl-2.0
-5,828,234,927,931,188,000
30.911628
82
0.563037
false
4.235185
false
false
false
TeamODrKnow/doctor-know
pipeline-image/twitter-to-redis.py
1
2462
"""This script uses the Twitter Streaming API, via the tweepy library, to pull in tweets and store them in a Redis server. """ import os import redis from tweepy import OAuthHandler from tweepy import Stream from tweepy.streaming import StreamListener # Get your twitter credentials from the environment variables. # ...
mit
2,234,303,924,202,498,000
30.164557
80
0.701056
false
3.562952
false
false
false
inviwo/inviwo
modules/python3/scripts/ivw/regression.py
1
2420
#********************************************************************************* # # Inviwo - Interactive Visualization Workshop # # Copyright (c) 2013-2021 Inviwo Foundation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the f...
bsd-2-clause
-2,159,099,499,981,238,800
39.333333
85
0.688017
false
3.954248
false
false
false
dietrichc/streamline-ppc-reports
examples/dfp/v201403/activity_group_service/create_activity_groups.py
1
2557
#!/usr/bin/python # # Copyright 2014 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 b...
apache-2.0
-894,893,596,057,951,500
33.554054
78
0.70747
false
3.80506
false
false
false
gannetson/sportschooldeopenlucht
apps/tasks/migrations/0003_auto__del_skills__add_skill__add_field_task_skill.py
1
12818
# -*- 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 model 'Skills' db.delete_table(u'tasks_skills') # Adding model 'Skill' db.create...
bsd-3-clause
5,640,817,934,617,898,000
71.835227
187
0.555001
false
3.626025
false
false
false
anubhav929/eden
modules/s3/s3task.py
1
16173
# -*- coding: utf-8 -*- """ Asynchronous Task Execution - falls back to Synchronous if no workers are alive Worker nodes won't run on Win32 yet. To run a worker node: python web2py.py -K eden NB Need WEB2PY_PATH environment variable to be defined (e.g. /etc/profile) Tasks need to be ...
mit
-8,151,199,539,073,031,000
36.611628
115
0.506585
false
4.974777
false
false
false
infobloxopen/netmri-toolkit
Python/NetMRI_GUI_Python/Script 3 - Generate a Custom Issue.py
1
1227
# BEGIN-SCRIPT-BLOCK # # Script-Filter: # true # # Script-Variables: # $command word "show version" # END-SCRIPT-BLOCK import requests, json, re from infoblox_netmri.easy import NetMRIEasy # This values will be provided by NetMRI before execution defaults = { "api_url": api_url, "http_username": http_...
mit
2,723,534,120,206,774,300
29.675
93
0.586797
false
3.427374
false
true
false
simos/keyboardlayouteditor
KeycodesReader.py
1
5036
#!/usr/bin/env python # -*- encoding: 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 3 of the License, or # (at your option) any later version. # # This program is...
gpl-3.0
668,175,162,504,604,700
38.34375
121
0.620334
false
3.984177
false
false
false
blackpan2/HealthNet
src/healthnet/prescription/views.py
1
5883
from django.contrib.auth.decorators import login_required from django.shortcuts import render, get_object_or_404, HttpResponseRedirect from .forms import * from base.views import group_required from base.models import * # Create your views here. @login_required @group_required('Doctor') def createPrescription(request...
mit
-6,837,937,245,806,848,000
36.711538
95
0.653578
false
3.840078
false
false
false
jeffkit/wechat
wechat/official.py
1
16558
# encoding=utf-8 from hashlib import sha1 import requests import json import tempfile import shutil import os from .crypt import WXBizMsgCrypt from .models import WxRequest, WxResponse from .models import WxMusic, WxArticle, WxImage, WxVoice, WxVideo, WxLink from .models import WxTextResponse, WxImageResponse, WxVoic...
gpl-3.0
6,699,400,970,800,230,000
34.670996
79
0.53392
false
3.791993
false
false
false
mastak/airflow_multi_dagrun
examples/trigger_with_multi_dagrun_sensor.py
1
1147
from airflow.models import DAG from airflow.operators.python import PythonOperator from airflow.utils.dates import days_ago from airflow_multi_dagrun.operators import TriggerMultiDagRunOperator from airflow_multi_dagrun.sensors import MultiDagRunSensor def generate_dag_run(): return [{'timeout': i} for i in rang...
apache-2.0
-5,851,436,575,635,393,000
22.895833
69
0.720139
false
3.22191
false
false
false
dropbox-dashbpard/error-detect-of-log
ed/system_tombstone.py
1
1957
# -*- coding: utf-8 -*- import re from utils import detect_string, gen_hashcode, detect_all from symbols import translate_traces from symbols import backtrace as remote_traces IGNORE = ['/data/app-lib', '/mnt/asec/', '/data/data/', '/data/app/'] def detect_trace(contents): for content in contents: if "...
mit
-5,243,716,539,045,736,000
35.240741
131
0.556975
false
3.67167
false
false
false
Lilykos/pyphonetics
pyphonetics/phonetics/soundex.py
1
1168
import re from unidecode import unidecode from ..utils import translation, squeeze, check_str, check_empty from .phonetic_algorithm import PhoneticAlgorithm class Soundex(PhoneticAlgorithm): """ The Soundex algorithm. [Reference]: https://en.wikipedia.org/wiki/Soundex [Authors]: Robert C. Russel, Ma...
mit
7,323,594,689,653,898,000
27.487805
64
0.589897
false
3.616099
false
false
false
lutraconsulting/qgis-cmaps-region-generator-plugin
qgis_plugin/CMapsRegionGenerator/cmapsregiongeneratordialog.py
1
24207
# -*- coding: utf-8 -*- # CMAPS Region Generator - Automate merging features using a CSV file definition. # Copyright (C) 2013 Centigon Solutions Inc. # sales at centigonsolutions dot com # 1333 Camino Del Rio S #300 # San Diego # CA 92108 # USA # This program is free software; you can redistribute it an...
gpl-2.0
4,395,614,780,969,134,000
45.745562
176
0.577354
false
4.803929
false
false
false
AlertaDengue/AlertaDengue
AlertaDengue/dados/models.py
1
3178
from django.db import models from django.utils.translation import ugettext_lazy as _ class City(models.Model): """ geocode INT NOT NULL, forecast_model_id INT, active BOOL NOT NULL, """ geocode = models.IntegerField( db_column='geocodigo', null=False, primary_key=True...
gpl-3.0
2,494,833,941,740,376,600
22.220588
73
0.563331
false
3.331224
false
false
false
chris-blay/historical-rents
scraper.py
1
7068
#!/usr/bin/python3 # Copyright (C) 2017 Christopher Blay <chris.b.blay@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 l...
gpl-3.0
6,003,138,055,225,850,000
36.595745
80
0.592813
false
3.858079
false
false
false
mnahm5/django-estore
Lib/site-packages/awscli/utils.py
1
4992
# Copyright 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
mit
-7,054,070,252,055,107,000
32.72973
79
0.614183
false
3.86677
false
false
false
brainwane/zulip
zerver/tests/test_cache.py
2
14168
from typing import Any, Dict, List, Optional from unittest.mock import Mock, patch from django.conf import settings from zerver.apps import flush_cache from zerver.lib.cache import ( MEMCACHED_MAX_KEY_LENGTH, InvalidCacheKeyException, NotFoundInCache, bulk_cached_fetch, cache_delete, cache_del...
apache-2.0
-7,180,724,032,288,269,000
41.794562
131
0.63911
false
3.782377
true
false
false
alexkychen/PythonForBiologists
04_SeqAlignment.py
1
2605
#!/usr/bin/env python #Python for biologists #03_Sequence Alignment #Align two DNA fragments seq1 = "ATCGTGCTAGCTGCATC" seq2 = "ATCATGCTAGCTGCTTC" n = 0 seq1L = [] seq2L = [] bondL = [] seq1len = len(seq1) seq2len = len(seq2) print(seq1len, seq2len) #Under condition of one nucleotide mutation (SNP), equal sequence l...
mit
-7,424,942,195,998,097,000
21.264957
88
0.572361
false
2.558939
false
false
false
KayvanMazaheri/IMH-Summer-School-2015
Libs/EquationSolve.py
1
1320
def swapRow (givenList , answer , j , k): for i in range(len(givenList)): temp = givenList[j][i] givenList[j][i] = givenList[k][i] givenList[k][i] = temp temp = answer[j][i] answer[j][i] = answer[k][i] answer[k][i] = temp return def correct(givenList , answer): for i i...
gpl-2.0
-230,294,811,296,953,380
25.938776
61
0.474242
false
3.473684
false
false
false
zapcoop/vertex
vertex_api/service/models/_reply_template.py
1
1918
from django.db import models from django.utils.translation import ugettext_lazy as _ from hvad.models import TranslatableModel, TranslatedFields from vertex.models import AbstractDatedModel __author__ = 'Jonathan Senecal <jonathan@zap.coop>' class ReplyTemplate(AbstractDatedModel, TranslatableModel): """ W...
agpl-3.0
-5,038,954,966,465,524,000
35.903846
97
0.620438
false
4.399083
false
false
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Ops/PyScripts/wrappers/packetredirect.py
1
1053
import dsz import ops.data import ops.parseargs dsz.control.echo.Off() dsz.ui.Background() parser = ops.parseargs.ArgumentParser() parser.add_argument('command_id', type=int, help='Command ID to monitor.') args = parser.parse_args() pr = ops.data.getDszObject(args.command_id) lasterror = None while True: dsz.scrip...
unlicense
-5,557,397,730,484,920,000
35.344828
125
0.618234
false
3.364217
false
false
false
simirimia/webarok
src/Actions/PlayerStatus.py
1
1109
""" The current status (player, stopped, paused) (c) webarok project http://sourceforge.net/projects/webarok/ This file is part of Webarok. Webarok is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either versio...
gpl-3.0
5,018,001,448,671,837,000
32.606061
68
0.74211
false
4.107407
false
false
false
wo3kie/pchGenerator
recursive_filter.py
1
1081
from topological_sorter import\ TopologicalSorter # # RecursiveFilter # class RecursiveFilter: def __init__( self, tSorter, predicate, options ): self._filteredNodes = [] self._tSorter = tSorter self._options = options for node in self._tSorter.getNodes(): self.__fi...
mit
-2,822,735,406,377,043,000
24.139535
82
0.592044
false
4.239216
false
false
false
BackupTheBerlios/fbcallnotify
callmonitor.py
1
3691
# -*- coding:utf-8 -*- ######################################### # Name: FBCallNotify # Copyright (C): 2010 Maximilian Köhl # License: GPLv3 ######################################### import socket import notifyer class Callmonitor(): def __init__(self, multiprocessmanager, numberconfig): self.processmana...
gpl-3.0
2,132,932,810,372,888,000
45.708861
195
0.458266
false
4.538745
true
false
false
Thraxis/pymedusa
sickbeard/event_queue.py
1
1607
# coding=utf-8 import threading import traceback from six.moves.queue import Queue, Empty from sickbeard import logger from sickrage.helper.exceptions import ex class Event(object): def __init__(self, event_type): self._type = event_type @property def event_type(self): """ Returns...
gpl-3.0
6,323,000,063,821,660,000
25.344262
98
0.539515
false
4.39071
false
false
false
monovertex/ygorganizer
ygo_core/urls.py
1
1039
from django.conf.urls import patterns, url, include from django.contrib import admin from .views import (CollectionPageView, BrowsePageView, AboutPageView, IndexPageView, DonationsPageView) admin.autodiscover() urlpatterns = patterns( '', url(r'^api/', include('ygo_api.urls')), url(r'...
mit
-8,705,648,786,299,676,000
36.107143
70
0.632339
false
3.298413
false
true
false
ric2b/Vivaldi-browser
chromium/third_party/blink/renderer/bindings/scripts/web_idl/enumeration.py
1
2285
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from .code_generator_info import CodeGeneratorInfo from .composition_parts import WithCodeGeneratorInfo from .composition_parts import WithComponent from .co...
bsd-3-clause
-6,105,392,281,440,092,000
36.459016
76
0.646827
false
4.428295
false
false
false
wackerly/faucet
tests/fakeoftable.py
1
17306
# Copyright (C) 2015 Research and Innovation Advanced Network New Zealand Ltd. # Copyright (C) 2015--2018 The Contributors # # 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.ap...
apache-2.0
5,955,598,394,282,099,000
38.331818
99
0.558535
false
4.349334
false
false
false
DongjunLee/kino-bot
kino/dialog/presence.py
1
3092
import arrow from .dialog_manager import DialogManager from .dnd import DoNotDisturbManager from ..functions import Functions from ..skills.predictor import Predictor from ..skills.trello import TrelloManager from ..skills.weather import Weather from ..slack.resource import MsgResource from ..slack.slackbot import...
mit
7,462,080,519,424,263,000
32.247312
75
0.591527
false
3.725301
false
false
false
marios-zindilis/musicbrainz-django-models
musicbrainz_django_models/models/l_area_work.py
1
2078
""" .. module:: l_area_work The **L Area Work** Model. PostgreSQL Definition --------------------- The :code:`l_area_work` table is defined in the MusicBrainz Server as: .. code-block:: sql CREATE TABLE l_area_work ( -- replicate id SERIAL, link INTEGER NOT NULL,...
gpl-2.0
2,971,579,159,202,513,400
34.220339
82
0.645332
false
4.164329
false
false
false
levilucio/SyVOLT
mbeddr2C_MM/transformation_from_eclipse/Hlayer3rule4.py
1
8838
from core.himesis import Himesis import uuid class Hlayer3rule4(Himesis): def __init__(self): """ Creates the himesis graph representing the DSLTrans rule layer3rule4. """ # Flag this instance as compiled now self.is_compiled = True ...
mit
-5,395,848,567,690,402,000
45.516129
408
0.564155
false
3.997286
true
false
false
nullpixel/litecord
litecord/objects/guild.py
1
12297
import datetime import logging import collections from .base import LitecordObject from .member import Member from ..snowflake import snowflake_time from ..utils import dt_to_json from ..enums import ChannelType log = logging.getLogger(__name__) BareGuild = collections.namedtuple('BareGuild', 'id') class Guild(Lit...
mit
4,421,614,363,433,700,400
28.992683
105
0.540132
false
3.941346
false
false
false
kg-bot/SupyBot
plugins/Gateway/gwplain.py
1
2628
### # Copyright (c) 2005, Ali Afshar # 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 list of conditions, a...
gpl-3.0
-8,137,286,768,114,357,000
34.04
79
0.753044
false
3.819767
false
false
false
m46kruk/openavb-pentests
scapy/ptp_fuzz.py
1
1454
#!/usr/bin/env python # ptp_fuzz.py - Fuzz a PTP implementation # Copyright (C) 2016 Matthias Kruk # # 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 yo...
gpl-2.0
-4,596,063,875,462,127,600
32.813953
136
0.678129
false
3.470167
false
false
false
diegocortassa/TACTIC
src/bin/startup_dev.py
1
5317
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
-5,019,779,552,770,964,000
30.276471
123
0.610307
false
3.733848
true
false
false
YuvaAthur/jkernel-yuva
wrapper.py
1
3704
from __future__ import print_function from ctypes import * import sys import os # CUSTOMIZE HERE # J binary directory (the one with all the binaries) j_bin_path = os.path.expanduser("/Applications/j64-804/bin") def get_libj(binpath): if os.name == "nt": lib_path = binpath + "/j.dll" # Windows elif s...
gpl-3.0
543,247,820,746,448,600
28.870968
100
0.554266
false
3.232112
false
false
false
openstack/oslo.service
oslo_service/tests/test_loopingcall.py
1
16173
# Copyright 2012 Red Hat, 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 agre...
apache-2.0
-2,603,906,600,743,247,000
33.930886
79
0.593273
false
3.952346
true
false
false
mrpau/kolibri
kolibri/core/tasks/utils.py
1
5577
import importlib import logging import os import time import uuid try: from thread import get_ident except ImportError: from threading import get_ident from kolibri.core.tasks import compat from kolibri.core.utils.cache import process_cache # An object on which to store data about the current job # So far t...
mit
-7,861,053,696,255,299,000
30.868571
117
0.604088
false
3.997849
false
false
false
numansiddique/contrail-controller
src/config/common/zkclient.py
1
14418
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import os import gevent import logging import kazoo.client import kazoo.exceptions import kazoo.handlers.gevent import kazoo.recipe.election from kazoo.client import KazooState from kazoo.retry import KazooRetry from bitarray import bitarray from cfg...
apache-2.0
-6,376,591,169,113,161,000
34.425061
126
0.556596
false
3.895704
false
false
false
nagyistoce/geokey
geokey/contributions/migrations/0010_auto_20150511_1132.py
1
2387
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from django.db import migrations def clean_list(val): if val is not None and (isinstance(val, str) or isinstance(val, unicode)): return json.loads(val) return val def clean_int(val): if val is not None and (isinstance(...
apache-2.0
9,169,566,666,281,336,000
30
79
0.620863
false
4.42037
false
false
false
dougthor42/PyBank
pybank/_logging.py
1
6390
# -*- coding: utf-8 -*- """ Logging setup and handlers for PyBank Created on Wed Jan 13 13:55:56 2016 """ # --------------------------------------------------------------------------- ### Imports # --------------------------------------------------------------------------- # Standard Library import datetime ...
gpl-2.0
-5,926,981,340,757,622,000
34.101695
77
0.478091
false
4.577364
false
false
false
RadishLLC/ballast
ballast/discovery/ns.py
1
3780
import abc import logging import socket from ballast.compat import unicode from ballast.exception import BallastException, BallastConfigurationException from ballast.discovery import ServerList, Server try: from dns import resolver, rdatatype, exception from dns.rdtypes.IN.A import A from dns.rdtypes.ANY.C...
apache-2.0
1,116,718,246,703,858,000
28.76378
80
0.551323
false
4.478673
false
false
false
aerospike/aerospike-client-python
test/new_tests/test_nested_cdt_ctx.py
1
150657
# -*- coding: utf-8 -*- import sys import random import unittest from datetime import datetime import pytest from aerospike import exception as e from aerospike_helpers.operations import bitwise_operations from aerospike_helpers import cdt_ctx from aerospike_helpers.operations import list_operations from aerospike_he...
apache-2.0
-7,527,856,688,997,616,000
46.99554
190
0.559363
false
3.097007
true
false
false
schleichdi2/OpenNfr_E2_Gui-6.0
lib/python/Components/FileList.py
1
16437
import os import re from MenuList import MenuList from Components.Harddisk import harddiskmanager from Tools.Directories import SCOPE_ACTIVE_SKIN, resolveFilename, fileExists, pathExists from enigma import RT_HALIGN_LEFT, eListboxPythonMultiContent, \ eServiceReference, eServiceCenter, gFont, getDesktop from Tools.Loa...
gpl-2.0
-5,400,781,138,365,447,000
33.824153
367
0.684249
false
3.197238
false
false
false
ikalnytskyi/sphinxcontrib-openapi
tests/conftest.py
1
1259
import textwrap import pytest from sphinx.application import Sphinx def _format_option_raw(key, val): if isinstance(val, bool) and val: return ':%s:' % key return ':%s: %s' % (key, val) @pytest.fixture(scope='function') def run_sphinx(tmpdir): src = tmpdir.ensure('src', dir=True) out = tmpd...
bsd-2-clause
7,175,091,320,421,709,000
25.229167
56
0.517077
false
3.769461
false
false
false
manticorp/i3dv-renderer
render.py
1
6667
import bpy import sys, os, configparser import math, time, json, pprint # Because this is being run inside blender, # the current folder is not in include path. sys.path.append(os.path.dirname(os.path.realpath(__file__))) from render_functions import * global ob global settings settings = {} model_id = sys.argv[-1] ...
apache-2.0
2,177,082,250,014,198,500
34.849462
172
0.691915
false
3.65115
false
false
false
openstack/horizon
openstack_dashboard/dashboards/admin/networks/ports/views.py
1
3110
# Copyright 2012 NEC Corporation # # 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 ag...
apache-2.0
-4,485,813,691,591,716,000
37.875
79
0.665273
false
3.992298
false
false
false
jesux/FruityWifi
FruityWifi/www/modules/responder/includes/Responder-master/LDAPPackets.py
2
14612
#! /usr/bin/env python # NBT-NS/LLMNR Responder # Created by Laurent Gaffie # Copyright (C) 2014 Trustwave Holdings, 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 th...
gpl-3.0
-5,014,740,053,376,970,000
60.394958
927
0.635847
false
3.189697
false
false
false
bovee/planknn
pyplanknn/convnetwork.py
1
2361
import json import numpy as np from pyplanknn.layer import Layer from pyplanknn.convlayer import ConvPoolLayer class ConvNetwork: """ A neural network comprised of several layers interconnected. """ def __init__(self, n_convs=10, hidden=4, n_outs=121): """ Create a series of layers. ...
mit
2,300,784,070,463,185,700
31.342466
69
0.577298
false
3.771565
false
false
false
thenetcircle/dino
dino/hooks/set_acl.py
1
1983
# 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
5,935,591,124,777,318,000
37.882353
108
0.634392
false
3.651934
false
false
false
paramiko/paramiko
paramiko/rsakey.py
1
6647
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 (a...
lgpl-2.1
6,964,392,122,854,019,000
31.26699
79
0.592147
false
3.958904
false
false
false
rowanv/ndt-e2e-clientworker
client_wrapper/names.py
1
1080
# Copyright 2016 Measurement Lab # # 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 writi...
apache-2.0
-3,175,681,662,177,151,500
32.75
79
0.758333
false
3.673469
false
false
false
arenadata/ambari
ambari-server/src/main/resources/stacks/ADH/1.6/services/SPARK2/package/scripts/spark_client.py
1
2535
#!/usr/bin/python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you...
apache-2.0
4,982,916,051,106,075,000
38
125
0.764892
false
3.942457
false
false
false
ewels/MultiQC
multiqc/modules/hops/hops.py
1
5139
""" MultiQC module to parse output from HOPS postprocessing script """ from __future__ import print_function from collections import OrderedDict import logging import json from multiqc.plots import heatmap from multiqc.utils import config from multiqc.modules.base_module import BaseMultiqcModule log = logging.getLog...
gpl-3.0
7,303,804,159,075,458,000
36.510949
138
0.564118
false
3.943975
false
false
false
ramineni/my_congress
congress/datasources/cinder_driver.py
1
5973
# Copyright (c) 2014 Montavista Software, 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 applic...
apache-2.0
-2,842,564,202,007,806,000
42.282609
78
0.615269
false
4.19747
false
false
false
italomaia/turtle-linux
games/Evolution/lib/trees.py
1
6760
import random from OpenGL.GL import * from euclid import * def draw_trunk(bl, tr): ''' - bottom & top control points at same point - may vary from close to bottom to half way - may vary from either side to other side ''' x1, y1 = bl y1 -= 64 # XXX OMG HAX HAX OMG SUXX...
gpl-3.0
-2,740,534,610,567,499,300
28.264069
80
0.48713
false
2.445731
false
false
false
CMU-dFabLab/dfab
python/dfab/gui/gl_drawing.py
1
8505
"""Basic drawing functions that only depend on plain OpenGL. These are higher level than raw GL and similar in purpose to the GLU functions. gl_drawing.py, Copyright (c) 2001-2014, Garth Zeglin. All rights reserved. Licensed under the terms of the BSD 3-clause license as included in LICENSE. """ from OpenGL.GL impor...
bsd-3-clause
-6,041,161,415,964,834,000
34.4375
127
0.546972
false
3.119956
false
false
false
becm/meson
mesonbuild/modules/__init__.py
1
3243
# Copyright 2019 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to ...
apache-2.0
-1,228,796,452,171,816,400
33.136842
85
0.654641
false
3.911942
false
false
false
rlaverde/scorecard_cps
performance_indicators_project/perspectives/forms.py
1
4634
from django.forms import ModelForm, Textarea from django.forms.models import inlineformset_factory import re from crispy_forms.helper import FormHelper from .models import Target, Initiative, Perspective, Resource, InCharge, Committee from indicators.models import Indicator, MainIndicator, Parameter class BasicFor...
gpl-3.0
6,310,318,416,087,374,000
31.180556
129
0.587829
false
3.734085
false
false
false
turbulent/substance
substance/command/status.py
1
1204
from substance.monads import * from substance.logs import * from substance import (Command, Engine) from tabulate import tabulate from substance.constants import (EngineStates) from substance.exceptions import (EngineNotRunning) logger = logging.getLogger(__name__) class Status(Command): def getShellOptions(self...
apache-2.0
-85,619,144,083,130,860
29.1
82
0.651163
false
4.081356
false
false
false
vribeiro1/plainsboro_221
plainsboro/appointments/migrations/0001_initial.py
1
1047
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-05-08 04:01 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('doctor_subscriptions', '0001_initial'), ...
mit
-8,226,026,083,457,915,000
32.741935
148
0.590822
false
4.070039
false
false
false
wdv4758h/ZipPy
edu.uci.python.benchmark/src/benchmarks/sympy/examples/advanced/gibbs_phenomenon.py
2
3694
#!/usr/bin/env python """ This example illustrates the Gibbs phenomenon. It also calculates the Wilbraham-Gibbs constant by two approaches: 1) calculating the fourier series of the step function and determining the first maximum. 2) evaluating the integral for si(pi). See: * http://en.wikipedia.org/wiki/Gibbs_phen...
bsd-3-clause
-4,386,274,726,224,543,000
22.987013
84
0.554954
false
2.868012
false
false
false
ogenstad/ansible
lib/ansible/modules/monitoring/grafana_dashboard.py
1
11505
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Thierry Sallé (@seuf) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function ANSIBLE_METADATA = { 'status': ['preview'], 'supported_by': 'com...
gpl-3.0
-3,438,470,058,666,596,000
33.44012
143
0.608363
false
3.771475
false
false
false
mmdg-oxford/papers
Schlipf-PRL-2018/model/epw_mass.py
1
1237
from __future__ import print_function from bose_einstein import bose_einstein from constant import htr_to_meV import argparser import mass_factor import numpy as np args = argparser.read_argument('Renormalize EPW calculation') if args.vb: offset = -8.75333295715961e-03 else: offset = 8.53193322468371e-03 if args.vb: ...
gpl-3.0
8,698,819,622,413,661,000
25.319149
113
0.660469
false
2.577083
false
false
false
apbard/scipy
scipy/ndimage/tests/test_io.py
2
1049
from __future__ import division, print_function, absolute_import import pytest from numpy.testing import assert_array_equal from scipy._lib._numpy_compat import suppress_warnings import scipy.ndimage as ndi import os try: from PIL import Image pil_missing = False except ImportError: pil_missing = True ...
bsd-3-clause
-3,530,541,556,877,071,000
28.971429
87
0.671115
false
3.37299
false
false
false
tjtrebat/algorithms
algorithms/graph_algorithms/readgraph.py
1
2178
""" read_graph.py -- Used for reading graph node and edge information from an adjacency matrix contained within a file. """ __author__ = 'Tom' class Graph: def __init__(self): self.num_nodes = 0 self.edge_weights = dict() def read_graph(self, infile): """ Reads a file to popul...
gpl-2.0
-1,201,915,395,122,980,400
28.445946
115
0.502755
false
4.101695
false
false
false
ksmit799/Toontown-Source
toontown/catalog/CatalogItem.py
1
14890
from direct.directnotify import DirectNotifyGlobal from pandac.PandaModules import * from toontown.toonbase import TTLocalizer from toontown.toonbase import ToontownGlobals from direct.interval.IntervalGlobal import * from direct.distributed.PyDatagram import PyDatagram from direct.distributed.PyDatagramIterator import...
mit
7,182,130,796,234,648,000
30.95279
101
0.605776
false
3.862516
false
false
false
AlexKordic/sublime-collaboration
collab/client.py
1
3626
import logging, doc, connection class CollabClient: def __init__(self, host, port): self.docs = {} self.state = 'connecting' self.waiting_for_docs = [] self.connected = False self.id = None self.socket = connection.ClientSocket(host, port) sel...
unlicense
-8,670,789,396,532,765,000
28.991453
83
0.538058
false
4.106455
false
false
false
MyRobotLab/pyrobotlab
home/moz4r/deprecated/Inmoov/InmoovScript_InmoovAI/INMOOV-AI_games.py
1
7481
# -*- coding: utf-8 -*- ################################################################################ # LOTO ################################################################################ def loto(phrase,the,chance,fin): table1 = [(random.randint(1,49)), (random.randint(1,49)), (random.randint(1,49)), (random...
apache-2.0
-1,827,207,560,315,940,000
24.260135
132
0.596174
false
3.023049
false
false
false
giuspugl/COSMOMAP2
tests/test_coarse_operator.py
1
1345
import scipy.linalg as la from interfaces import * from utilities import * import numpy as np def test_coarse_operator(): """ Build and test the :class:`CoarseLO`. """ nt,npix,nb= 400,20,1 blocksize=nt/nb d,pairs,phi,t,diag=system_setup(nt,npix,nb) c=bash_colors() runcase={'I':1,'QU':2,...
gpl-3.0
-1,678,375,014,878,100,500
28.888889
72
0.5829
false
2.616732
false
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2015_06_15/models/key_vault_key_reference_py3.py
1
1433
# 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
-2,373,742,063,998,240,300
33.95122
77
0.589672
false
4.190058
false
false
false
aparo/django-elasticsearch
tests/testproj/myapp/tests.py
1
7873
""" Test suite for django-elasticsearch. """ from django.test import TestCase from testproj.myapp.models import Entry, Blog, StandardAutoFieldModel, Person, TestFieldModel, EModel import datetime import time class DjangoESTest(TestCase): # multi_db = True # def test_add_and_delete_blog(self): # blog1 = ...
bsd-3-clause
247,389,388,771,741,630
29.397683
101
0.513019
false
3.389152
true
false
false
dyf102/Gomoku-online
server/service/chat_service.py
1
2797
import logging import time from baseservice import BaseService, handler, register LOBBY_CHAT_ID = 0 class ChatService(BaseService): # TODO: Add FIFO policy to the dict to limit the msg in memory def __init__(self): BaseService.__init__(self, 'ChatService') # init self.chat_room_lis...
apache-2.0
91,080,623,419,363,280
37.315068
103
0.545585
false
3.613695
false
false
false
adamnovak/hgvm-builder
scripts/histogram.py
1
27911
#!/usr/bin/env python2.7 """ histogram: plot a histogram of a file of numbers. Numbers can be floats, one per line. Lines with two numbers are interpreted as pre-counted, with the number of repeats of the first being given by the second. Multiple instances of the same value in a category will be merged by adding weigh...
apache-2.0
-3,313,469,020,805,510,000
40.720478
80
0.561929
false
4.245019
false
false
false
meco-group/omg-tools
omgtools/problems/gcodeschedulerproblem.py
1
66507
# This file is part of OMG-tools. # # OMG-tools -- Optimal Motion Generation-tools # Copyright (C) 2016 Ruben Van Parys & Tim Mercy, KU Leuven. # All rights reserved. # # OMG-tools 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...
lgpl-3.0
1,146,049,252,038,892,700
52.463023
196
0.545206
false
3.859058
false
false
false
hq20051252/sogouWeixin
sogouWeixin/items.py
1
2374
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class SogouweixinItem(scrapy.Item): # define the fields for your item here like: # sogou中, 帐号的历史页面 sogougzh = scrapy.Field() # 帐号的logo ...
gpl-2.0
3,447,349,317,792,681,500
19.48
51
0.597656
false
2.464501
false
false
false
mpatek/runcalc
runcalc/cli.py
1
4177
import datetime import click import re _multipliers = { 's': 1, 'm': 60, 'h': 3600, } _pattern = re.compile( '(?:(?:(?P<h>\d+):)?(?P<m>\d+):)?(?P<s>\d+(?:\.\d+)?)' ) def time_str_to_seconds(s): """ Convert a string representation of a time to number of seconds. Args: s (str): A ...
mit
-3,712,212,842,191,771,000
25.436709
77
0.526215
false
3.726137
false
false
false
CLVsol/odoo_addons
clv_medicament_template/wkf/clv_medicament_template_wkf.py
1
2671
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
agpl-3.0
405,023,882,919,092,160
44.271186
94
0.445152
false
4.778175
false
false
false
ATNF/askapsdp
Tools/scons_tools/doxybuilder.py
1
2704
# Copyright (c) 2009 CSIRO # Australia Telescope National Facility (ATNF) # Commonwealth Scientific and Industrial Research Organisation (CSIRO) # PO Box 76, Epping NSW 1710, Australia # atnf-enquiries@csiro.au # # This file is part of the ASKAP software distribution. # # The ASKAP software distribution is free softwar...
gpl-2.0
6,290,299,520,852,421,000
29.382022
77
0.678994
false
3.253911
false
false
false
s-will/LocARNA
src/Utils/relsubseqs.py
1
5767
#!/usr/bin/env python ## enumerate the relevant sub sequences for a crossing RNA (dp format) import re from optparse import OptionParser ## ============================================================ ## function definitions def parseCmdLine(): "parse the command line arguments" usage = "usage: %prog [op...
gpl-3.0
-6,923,049,886,996,048,000
26.593301
103
0.584879
false
3.538037
false
false
false
shigh/py3d3v
py3d3v/setup.py
1
1503
from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext import numpy as np setup( cmdclass = {'build_ext':build_ext}, include_dirs = [np.get_include()], ext_modules = [Extension("interp",["interp.pyx", "par_interp.cpp"], ...
gpl-2.0
-401,854,307,524,964,200
47.483871
74
0.413839
false
4.864078
false
false
false
HopkinsIDD/EpiForecastStatMech
epi_forecast_stat_mech/utils.py
1
1845
# Lint as: python3 """Functions for manipulating nested structures of arrays.""" from typing import Any, Union import jax import jax.numpy as jnp def slice_along_axis( inputs: Any, axis: int, idx: Union[slice, int] ): """Returns slice of `inputs` defined by `idx` along axis `axis`. Args: inputs:...
gpl-3.0
-7,539,086,425,729,540,000
29.245902
77
0.680759
false
3.410351
false
false
false
eJRF/ejrf
questionnaire/services/users.py
1
3518
from django.utils.datastructures import SortedDict from questionnaire.models import Answer, AnswerGroup from questionnaire.services.questionnaire_entry_form_service import QuestionnaireEntryFormService class UserQuestionnaireService(object): def __init__(self, country, questionnaire, version=None): self....
bsd-3-clause
-1,901,261,143,422,016,500
42.9875
113
0.681069
false
4.168246
false
false
false
nttks/edx-platform
common/lib/xmodule/xmodule/tabs.py
1
18918
""" Implement CourseTab """ from abc import ABCMeta import logging from xblock.fields import List from openedx.core.lib.api.plugins import PluginError log = logging.getLogger("edx.courseware") # Make '_' a no-op so we can scrape strings. Using lambda instead of # `django.utils.translation.ugettext_noop` because Dja...
agpl-3.0
-7,294,548,381,858,526,000
35.241379
118
0.609208
false
4.322138
false
false
false
spesmilo/electrum
electrum/plugins/safe_t/clientbase.py
1
10111
import time from struct import pack from typing import Optional from electrum import ecc from electrum.i18n import _ from electrum.util import UserCancelled from electrum.keystore import bip39_normalize_passphrase from electrum.bip32 import BIP32Node, convert_bip32_path_to_list_of_uint32 from electrum.logging import L...
mit
6,721,036,304,798,242,000
37.154717
119
0.608842
false
4.050881
false
false
false
macarena/aulas
batalhanaval/batalha_naval_sabado.py
1
2113
#!/usr/bin/python # -*- coding: utf-8 -*- from random import randint from time import sleep class Navio: pass def __init__(self, nome): self.nome = nome self.vivo = True def posiciona(self, linha, coluna): self.linha = linha self.coluna = coluna def ...
gpl-2.0
-2,727,341,878,696,295,000
22.287356
59
0.534785
false
3.089181
false
false
false
Davideddu/kivy-forkedtouch
kivy/uix/codeinput.py
1
6518
''' Code Input ========== .. versionadded:: 1.5.0 .. image:: images/codeinput.jpg The :class:`CodeInput` provides a box of editable highlited text like the one shown in the image. It supports all the features provided by the :class:`~kivy.uix.textinput` as well as code highliting for `languages supported by pygmen...
mit
3,261,649,836,463,144,400
31.108374
79
0.577017
false
3.870546
false
false
false
biosustain/driven
driven/vizualization/plotting/with_plotly.py
1
2430
# Copyright 2015 Novo Nordisk Foundation Center for Biosustainability, DTU. # 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
248,582,597,926,571,700
34.735294
120
0.639506
false
4.05
false
false
false
gandelman-a/neutron-lbaas
neutron_lbaas/services/loadbalancer/data_models.py
1
22151
# Copyright (c) 2014 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
apache-2.0
-1,961,598,836,779,295,700
37.523478
79
0.615954
false
4.088409
false
false
false
bmcfee/crema
training/chords/01-prepare.py
1
3644
#!/usr/bin/env python '''CREMA structured chord model''' import argparse import sys import os import pickle from tqdm import tqdm from joblib import Parallel, delayed from jams.util import smkdirs import pumpp import crema.utils OUTPUT_PATH = 'resources' def process_arguments(args): parser = argparse.Argume...
bsd-2-clause
4,136,463,791,362,030,000
33.704762
79
0.51674
false
4.098988
false
false
false
stephanos/subvoc
api/subtitle/model_test.py
1
1422
from api.subtitle.model import to_model, Media, Subtitle def test_subtitle_equality(): assert Subtitle('S1', None, 'srt', 1, 'enc', False) == \ Subtitle('S1', None, 'srt', 1, 'enc', False) assert Subtitle('S2', None, 'srt', 1, 'enc', False) != \ Subtitle('S1', None, 'srt', 1, 'enc', False) d...
mit
-8,464,037,668,767,110,000
23.947368
61
0.509142
false
3.261468
false
false
false
scylladb/scylla-longevity-tests
sdcm/tester.py
1
59525
# 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 distributed in the hope that it will be usefu...
agpl-3.0
-6,798,341,341,531,159,000
48.770067
155
0.554305
false
4.107155
true
false
false
bchartoff/regexcalibur
globals.py
1
1502
import os from mobs import * from inventory import * import terminaloutput modify_text_file = terminaloutput.modify_text_file def init(): global gameover, lives, active_input, active_screen, active_message, start_inventory, active_inventory, inventory, active_hit_strings, active_miss_strings, num_mobs, hit_strings, m...
mit
-7,099,374,207,322,111,000
44.515152
246
0.706391
false
2.823308
false
false
false
erts/pyTCP2UDPBrige
brige.py
1
2436
import threading import socket import sys LISTEN_TO_UDP_PORT = 5000 SEND_TO_UDP_IP = "127.0.0.1" SEND_TO_UDP_PORT = 5000 TCP_SERVER_IP = "127.0.0.1" TCP_SERVER_PORTS = [5000,5001,5002,] class TCP_UDP_forwarder(threading.Thread): def __init__(self, tcp_server_ip, tcp_server_port): threading.Thre...
mit
4,556,852,890,959,875,600
33.814286
120
0.574302
false
3.598227
false
false
false
jhuttner/flake8-import-order
flake8_import_order/checker.py
1
1888
import ast import pycodestyle from flake8_import_order import ImportVisitor from flake8_import_order.styles import ( Cryptography, Google, PEP8, Smarkets, ) DEFAULT_IMPORT_ORDER_STYLE = 'cryptography' class ImportOrderChecker(object): visitor_class = ImportVisitor options = None def __init__(self,...
lgpl-3.0
-7,491,054,521,117,362,000
28.046154
73
0.587924
false
4.11329
false
false
false
amudalab/concept-graphs
document retrieval/doc_ret_bfs.py
1
1509
def BFS(graph,root,k): checked = [] visited=[] level=[] l=[] l.append(root) level.append(l) count =0 checked.append(root) while len(checked)>0: v = checked.pop(0) visited.append(v) l=[] for edge in graph[v]: #l=list(set(graph[...
mit
4,241,411,692,561,005,000
33.093023
126
0.442015
false
3.383408
false
false
false
ChristopheVuillot/qiskit-sdk-py
qiskit/extensions/standard/cy.py
1
2323
# -*- coding: utf-8 -*- # Copyright 2017 IBM RESEARCH. 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 # # U...
apache-2.0
-7,041,353,571,288,676,000
32.161765
79
0.598795
false
3.710863
false
false
false
swapagarwal/JARVIS-on-Messenger
modules/src/video.py
1
2005
import os import requests import requests_cache import config from templates.generic import * from templates.text import TextTemplate from utils.YouTube import YouTubeUtil YOUTUBE_DATA_API_KEY = os.environ.get('YOUTUBE_DATA_API_KEY', config.YOUTUBE_DATA_API_KEY) def process(input, entities): output = {} tr...
mit
7,995,285,015,709,858,000
43.555556
145
0.615461
false
3.900778
false
false
false
aakechin/BRCA-analyzer
joinMutations.py
1
3013
# This script joins mutation of all patients to one file # Use the following arguments: # [1] - regular expression for variants files # [2] - name for resultFile ## v4 - added argparse ## v5 - join mutations of avinput (annovar input) import glob import sys import argparse import re def showPercWork(done,allWork): ...
gpl-3.0
6,838,469,630,968,487,000
31.397849
135
0.599734
false
3.385393
false
false
false