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
corbt/pypeline
setup.py
1
1413
import os from setuptools import setup # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): return open(os.path.join(os.path.di...
mit
-2,353,462,996,388,564,500
32.642857
84
0.635527
false
3.748011
false
false
false
facelessuser/sublime-markdown-popups
st3/mdpopups/pygments/lexers/pawn.py
1
8073
# -*- coding: utf-8 -*- """ pygments.lexers.pawn ~~~~~~~~~~~~~~~~~~~~ Lexers for the Pawn languages. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from ..lexer import RegexLexer from ..token import Text, Comment, Operator, Keyword, ...
mit
-358,244,456,042,769,800
39.567839
84
0.445559
false
3.447054
false
false
false
wooga/airflow
airflow/utils/log/stackdriver_task_handler.py
1
11730
# 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 may not u...
apache-2.0
2,753,684,676,931,630,600
40.013986
111
0.641347
false
4.085684
false
false
false
kagklis/Frequent-Itemset-Hiding-Toolbox-x86
Apriori.py
1
2242
#------------------------------------------------------------------------------- # Name: Apriori.py # Purpose: Mining Frequent Itemsets # Author: Vasileios Kagklis # Created: 10/02/2014 # Copyright: (c) Vasileios Kagklis #----------------------------------------------------------------------------...
mit
-4,553,797,885,954,154,000
34.03125
80
0.591436
false
3.376506
false
false
false
chiahaoliu/2016_summer_XPD
XPD_view/XPD_view_1.py
1
6464
""" This file will contain the code to create the XPD view GUI """ from xray_vision.qt_widgets import CrossSectionMainWindow from PyQt4 import QtGui, QtCore import os import sys import numpy as np from Tif_File_Finder import TifFileFinder from plot_analysis import reducedRepPlot def data_gen(length): ...
bsd-2-clause
-7,495,527,753,662,878,000
35.149425
118
0.603651
false
3.795655
false
false
false
hacklabr/geodjango-boundaries
boundaries/models.py
1
1543
# -*- coding: utf-8 -*- from django.utils.encoding import python_2_unicode_compatible from django.contrib.gis.db import models @python_2_unicode_compatible class NamedModel(models.Model): name = models.CharField(max_length=255) geometry = models.MultiPolygonField() # Multipolygon in NAD83 objects = mod...
bsd-3-clause
5,712,905,196,875,916,000
23.870968
86
0.669909
false
3.330454
false
false
false
dangra/scrapy
tests/test_crawler.py
2
16388
import logging import os import platform import subprocess import sys import warnings from unittest import skipIf from pytest import raises, mark from testfixtures import LogCapture from twisted.internet import defer from twisted.trial import unittest import scrapy from scrapy.crawler import Crawler, CrawlerRunner, C...
bsd-3-clause
6,069,620,214,822,966,000
40.463291
112
0.666992
false
4.025068
true
false
false
metacloud/python-cinderclient
cinderclient/v1/volume_types.py
1
3496
# Copyright (c) 2011 Rackspace US, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
-7,710,020,607,655,474,000
27.655738
78
0.578661
false
4.041618
false
false
false
mefly2012/platform
test/guozibeijing/deal_repeat.py
1
1867
# coding=utf-8 import json import codecs import os import sys import re if __name__ == '__main__': fr1 = codecs.open(sys.argv[1], 'r', encoding='utf-8') # 我统计的 fr2 = codecs.open(sys.argv[2], 'r', encoding='utf-8') # 君哥统计的 dics1 = [] dics2 = [] for i in fr1: js = json.loads(i) ...
apache-2.0
2,724,095,015,985,590,300
25.536232
106
0.495358
false
3.056761
false
false
false
klose911/klose911.github.io
src/python/src/lisp/lispy.py
1
12433
################ Scheme Interpreter in Python ## (c) Peter Norvig, 2010; See http://norvig.com/lispy2.html ################ Symbol, Procedure, classes from __future__ import division from __future__ import print_function import re, sys from io import StringIO class Symbol(str): pass def Sym(s, symbol_table={}): ...
apache-2.0
21,476,832,186,802,524
37.974922
87
0.541945
false
3.343103
false
false
false
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/BioSQL/BioSeqDatabase.py
1
30416
# Copyright 2002 by Andrew Dalke. All rights reserved. # Revisions 2007-2014 copyright by Peter Cock. All rights reserved. # Revisions 2009 copyright by Cymon J. Cox. All rights reserved. # Revisions 2013-2014 copyright by Tiago Antao. All rights reserved. # This code is part of the Biopython distribution and gover...
apache-2.0
1,127,389,766,597,076,100
38.044929
100
0.594523
false
4.016374
false
false
false
SanaMobile/sana.protocol_builder
src-django/api/serializer.py
1
7122
from collections import OrderedDict from rest_framework import serializers from rest_framework.fields import SkipField from django.contrib.auth.models import User import models import field import json class ElementSerializer(serializers.ModelSerializer): choices = field.ArrayAsStringField(required=False) ans...
bsd-3-clause
-1,810,374,835,869,102,800
26.712062
90
0.55827
false
4.676297
false
false
false
Nepochal/wallabag-cli
wallabag/wallabag_show.py
1
3546
""" Show a wallabag entry """ import io import formatter import json import os from sys import exit import sys from bs4 import BeautifulSoup import api import conf import entry def show(entry_id, colors=True, raw=False, html=False): """ Main function for showing an entry. """ conf.l...
mit
553,081,221,058,167,040
25.703125
98
0.551043
false
3.6
false
false
false
jmptrader/duktape
tools/genconfig.py
1
56701
#!/usr/bin/env python2 # # Process Duktape option metadata and produce various useful outputs: # # - duk_config.h with specific or autodetected platform, compiler, and # architecture, forced options, sanity checks, etc # - option documentation for Duktape config options (DUK_USE_xxx) # # Genconfig tries to...
mit
-6,401,203,405,470,451,000
37.105511
313
0.606021
false
3.743382
true
false
false
noironetworks/group-based-policy
gbpservice/neutron/services/grouppolicy/drivers/extensions/aim_mapping_extension_driver.py
1
4344
# 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 # d...
apache-2.0
-5,990,733,584,893,358,000
39.222222
78
0.662063
false
3.472422
false
false
false
JaneliaSciComp/osgpyplusplus
examples/rough_translated1/osgdirectinput.py
1
10576
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgdirectinput" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osgDB from osgpypp import osgGA from osgpypp import osgViewer # Translated from file 'DirectInputRegis...
bsd-3-clause
779,081,873,386,174,500
36.637011
111
0.647315
false
3.66205
false
false
false
ROS-PSE/arni
arni_gui/src/arni_gui/connection_item.py
1
7933
import genpy from rospy.rostime import Time, Duration from python_qt_binding.QtCore import QTranslator from abstract_item import AbstractItem from helper_functions import prepare_number_for_representation, MAXIMUM_OFFLINE_TIME, ROUND_DIGITS class ConnectionItem(AbstractItem): """ A ConnectionItem reresents ...
bsd-2-clause
8,285,537,754,295,539,000
40.103627
164
0.541787
false
3.904035
false
false
false
pshchelo/ironic
ironic/objects/conductor.py
1
6820
# coding=utf-8 # # Copyright 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
apache-2.0
-1,894,912,130,061,540,000
45.394558
78
0.643548
false
4.601889
false
false
false
astrofra/demo-unusual-suspects
Python-toolchain/3D/vector3.py
1
17953
from math import * from util import format_number class Vector3(object): __slots__ = ('_v',) def __init__(self, *args): """Creates a Vector3 from 3 numeric values or a list-like object containing at least 3 values. No arguments result in a null vector. ...
mit
-5,893,449,000,307,266,000
23.576923
117
0.408233
false
3.65716
false
false
false
andresriancho/python-aop
aop/aspecttype.py
1
1966
# -*- coding: utf-8 -*- """ python-aop is part of LemonFramework. python-aop 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. python-aop is ...
gpl-3.0
-6,336,378,035,457,480,000
44.488372
84
0.676892
false
3.549909
false
false
false
efiop/dvc
dvc/_debug.py
1
2310
from contextlib import ExitStack, contextmanager from typing import TYPE_CHECKING if TYPE_CHECKING: from argparse import Namespace @contextmanager def instrument(html_output=False): """Run a statistical profiler""" try: from pyinstrument import Profiler # pylint: disable=import-error except ...
apache-2.0
1,679,155,082,171,922,400
24.384615
78
0.634632
false
3.975904
false
false
false
JarbasAI/JarbasAI
mycroft/messagebus/api.py
1
2458
from mycroft.messagebus.message import Message import time __author__ = "jarbas" class BusQuery(): def __init__(self, emitter, message_type, message_data=None, message_context=None): self.emitter = emitter self.waiting = False self.response = Message(None, None, None) ...
gpl-3.0
1,356,580,934,561,058,300
31.342105
74
0.617168
false
4.009788
false
false
false
USGSDenverPychron/pychron
pychron/canvas/canvas2D/stage_canvas.py
1
5114
# =============================================================================== # Copyright 2015 Jake Ross # # 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...
apache-2.0
5,148,437,984,851,985,000
33.554054
97
0.51447
false
4.333898
false
false
false
AndrasKovacs/dawg-gen
dawg_gen.py
1
7469
#!/usr/bin/env python import os import array as ar import hashlib from sys import argv from copy import copy from collections import defaultdict from time import clock ######################## Read/check word list ############################### print if len(argv) != 2: print "Usage: dawg_gen.py [word list path...
mit
-984,014,338,422,908,400
28.405512
122
0.560718
false
3.283077
false
false
false
ministryofjustice/collectd-ntp
setup.py
1
1397
import os from setuptools import setup def pkg_dir(path): return os.path.join(os.path.dirname(__file__), path) with open(pkg_dir('VERSION'), 'r') as f: version = f.read().strip() with open(pkg_dir('README.rst'), 'r') as f: readme = f.read() setup( name='collectd-ntp', version=version, py...
mit
2,740,606,144,956,291,000
30.044444
71
0.614173
false
3.775676
false
false
false
idiles/opendict
lib/extra/html2text.py
1
4084
""" html2text.py convert an html doc to text """ # system libraries import os, sys, string, time, getopt import re WIDTH = 80 def tag_replace (data,center,indent, use_ansi = 0): data = re.sub ("\s+", " ", data) data = re.sub ("(?s)<!--.*?-->", "", data) data = string.replace (data, "\n", " ") output = ...
gpl-2.0
3,743,144,919,791,192,600
26.594595
72
0.481636
false
2.765064
false
false
false
rs2/pandas
pandas/core/indexers.py
1
14164
""" Low-dependency indexing utilities. """ import warnings import numpy as np from pandas._typing import Any, AnyArrayLike from pandas.core.dtypes.common import ( is_array_like, is_bool_dtype, is_extension_array_dtype, is_integer, is_integer_dtype, is_list_like, ) from pandas.core.dtypes.gene...
bsd-3-clause
7,059,395,294,665,719,000
27.556452
88
0.578791
false
4.2509
false
false
false
Shihta/python-novaclient
novaclient/tests/fixture_data/security_groups.py
1
3693
# 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
2,774,355,458,957,496,300
36.30303
78
0.486325
false
4.324356
false
false
false
PurpleHominid/The-Warlock-of-Firetop-Mountain
WOFT_01.py
1
1632
class clsLocation: #this class provides the support for enumerated locations ROOM=0 DOOR=1 WALL=2 #some more changes went here before the start of the service # # #this branch is called development 01 #this is another branch here class clsPlayerState: #this class provides the functions to suppor...
mit
5,276,123,399,268,443,000
27.137931
90
0.681985
false
4.25
false
false
false
hootnot/oandapyV20-examples
src/contrib_mo_tp_sl.py
1
1328
# -*- coding: utf-8 -*- """Example demonstrating the contrib.request classes. Create a MarketOrderRequest to enter 10000 EUR_USD LONG position along with - a TakeProfitOrder to take profit @1.10 - a StopLossOrder to take loss @1.07 These values apply for this moment: EUR_USD 1.0605 So when you run the example you may...
mit
-5,632,243,889,746,396,000
25.039216
77
0.750753
false
2.951111
false
false
false
thommiller/ANN---Pymier-League
Main.py
1
1763
import numpy as np # sigmoid function def nonlin(x,deriv=False): if(deriv==True): return x*(1-x) return 1/(1+np.exp(-x)) def displayPred(num): if(num> 0.5 and num <0.75): return " - Draw" elif(num>0.75): return " - Win" else: return " - Loss" # for training data we...
mit
3,757,302,599,893,747,700
27.435484
81
0.600681
false
2.716487
false
false
false
Outernet-Project/librarian
librarian/tasks/notifications.py
1
1481
import datetime import logging from greentasks import Task from ..core.exts import ext_container as exts from ..core.utils import utcnow class NotificationCleanupTask(Task): name = 'notifications' periodic = True def get_start_delay(self): return exts.config['notifications.default_expiry'] ...
gpl-3.0
-2,417,505,482,011,534,000
37.973684
76
0.633356
false
4.434132
false
false
false
wolf9s/doconce
lib/doconce/mwiki.py
1
17031
""" MediaWiki translator, aimed at Wikipedia/WikiBooks type of web pages. Syntax defined by http://en.wikipedia.org/wiki/Help:Wiki_markup and http://en.wikipedia.org/wiki/Help:Displaying_a_formula. The prefix m in the name mwiki distinguishes this translator from gwiki (googlecode wiki). Not yet implemented: mwiki_ref...
bsd-3-clause
7,633,075,306,408,647,000
37.531674
122
0.557278
false
3.591523
false
false
false
andyeff/skybot
plugins/giantbomb.py
1
1360
from urllib2 import HTTPError from util import hook, http @hook.command(autohelp=False) def gb(inp): '.gb - lists upcoming shows on Giant Bomb' url = 'http://www.giantbomb.com' try: doc = http.get_html(url) except HTTPError as e: errors = {400: 'bad request (ratelimited?) 400', ...
unlicense
7,194,837,047,324,547,000
29.909091
69
0.548529
false
3.578947
false
false
false
cc-archive/commoner
src/commoner/broadcast/context_processors.py
1
1043
from django.conf import settings from django.contrib.auth.decorators import login_required from commoner.broadcast.models import Message, Log def messages(request): if request.user.is_authenticated(): messages = Message.active.all() site_messages = [] for message in m...
agpl-3.0
3,577,103,782,968,181,000
28
73
0.466922
false
5.518519
false
false
false
telefonicaid/murano-agent
muranoagent/app.py
1
8000
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
-4,816,543,227,355,885,000
36.735849
79
0.541375
false
4.35019
false
false
false
szlin/gitsome
xonsh/pretty.py
1
27713
# -*- coding: utf-8 -*- """ Python advanced pretty printer. This pretty printer is intended to replace the old `pprint` python module which does not allow developers to provide their own pretty print callbacks. This module is based on ruby's `prettyprint.rb` library by `Tanaka Akira`. The following implementations w...
gpl-3.0
1,760,497,032,878,910,500
31.337223
95
0.567062
false
3.978894
false
false
false
pombredanne/func
func/overlord/inventory.py
1
6796
## ## func inventory app. ## use func to collect inventory data on anything, yes, anything ## ## Copyright 2007, Red Hat, Inc ## Michael DeHaan <mdehaan@redhat.com> ## +AUTHORS ## ## This software may be freely redistributed under the terms of the GNU ## general public license. ## ## You should have received a copy of ...
gpl-2.0
2,945,001,256,754,425,000
34.581152
121
0.543996
false
4.282294
false
false
false
gangadharkadam/office_erp
erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
1
11155
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import frappe.defaults import json from frappe import msgprint, _ from frappe.utils import cstr, flt, cint from erpnext.stock.stock_led...
agpl-3.0
-2,882,474,033,307,407,400
35.335505
129
0.688839
false
3.169935
false
false
false
kdart/pycopia
mibs/pycopia/mibs/SNMP_USER_BASED_SM_MIB.py
1
8334
# python # This file is generated by a program (mib2py). Any edits will be lost. from pycopia.aid import Enum import pycopia.SMI.Basetypes Range = pycopia.SMI.Basetypes.Range Ranges = pycopia.SMI.Basetypes.Ranges from pycopia.SMI.Objects import ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, N...
apache-2.0
-6,750,926,250,645,303,000
31.940711
547
0.735781
false
2.616641
false
false
false
kuke/models
fluid/PaddleNLP/neural_machine_translation/rnn_search/attention_model.py
1
8831
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. # # 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 appl...
apache-2.0
-6,780,336,246,658,529,000
39.140909
79
0.576265
false
3.956541
false
false
false
giruenf/GRIPy
algo/spectral/Hilbert.py
1
2141
# -*- coding: utf-8 -*- # # Class for deal with Analytic Signal # Universidade Estadual do Norte Fluminense - UENF # Laboratório de Engenharia de Petróleo - LENEP # Grupo de Inferência em Reservatório - GIR # Adriano Paulo Laes de Santana # September 12th, 2017 # # The following code is based on # http://docs.scipy.or...
apache-2.0
9,056,039,645,876,526,000
27.878378
91
0.669162
false
3.729494
false
false
false
k-yak/kivy_breakout
pong/main.py
1
3115
import kivy kivy.require('1.1.3') from kivy.app import App from kivy.uix.widget import Widget from kivy.properties import NumericProperty, ReferenceListProperty,\ ObjectProperty from kivy.vector import Vector from kivy.clock import Clock from kivy.uix.floatlayout import FloatLayout class Pong(FloatLa...
mit
-4,741,882,946,873,738,000
28.262136
79
0.545746
false
3.568156
false
false
false
AlphaNerd80/Lists
superlists/settings.py
1
2067
""" Django settings for superlists project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...)...
mit
-1,529,950,277,581,714,700
23.607143
71
0.727141
false
3.291401
false
false
false
Moggi/python-playground
queues_thread.py
1
1510
# From tutorialspoint.com about Python Multithreaded Programming # https://www.tutorialspoint.com/python/python_multithreading.htm # !/usr/bin/python import Queue import threading import time exitFlag = 0 class myThread (threading.Thread): def __init__(self, threadID, name, q): threading.Thread.__init_...
gpl-2.0
3,738,729,254,467,271,700
21.205882
65
0.64106
false
3.447489
false
false
false
luckydonald/shairport-decoder
examples/image-average.py
1
1351
# -*- coding: utf-8 -*- __author__ = 'luckydonald' from luckydonaldUtils.logger import logging # pip install luckydonald-utils logger = logging.getLogger(__name__) from PIL import Image import sys from luckydonaldUtils.images.color import most_frequent_color def average_colour(image): colour_tuple = [None, None...
lgpl-3.0
7,137,069,983,716,982,000
21.147541
76
0.684678
false
2.862288
false
false
false
hkarl/svpb
arbeitsplan/tables.py
1
41071
# -*- coding: utf-8 -*- """ Collect all the tables and column types relevant for django_tables2 here. """ import unicodedata import django_tables2 from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.utils.html import escape, format_html from django.utils.safestring im...
apache-2.0
-1,148,436,846,957,183,600
33.7663
184
0.480138
false
4.012411
false
false
false
ogvalt/saturn
spiking_som.py
1
18544
from brian2 import * from pyqtgraph.Qt import QtGui, QtCore import numpy as np import pyqtgraph as pg import matplotlib.pyplot as plt from dataset import ArtificialDataSet class ReceptiveField: # Parameter that used in standard deviation definition gamma = 1.5 def __init__(self, bank_size=10, I_min=0...
mit
4,091,960,593,132,690,000
38.04
115
0.512942
false
3.164505
false
false
false
alexrudy/Cauldron
Cauldron/logger.py
1
1395
# -*- coding: utf-8 -*- """ A useful subclass of logger for more fine-grained messaging. """ import logging import weakref __all__ = ['KeywordMessageFilter'] class Logger(logging.getLoggerClass()): """A basic subclass of logger with some useful items.""" def getChild(self, suffix): """Get a chil...
bsd-3-clause
-8,061,825,739,172,878,000
26.92
80
0.581362
false
4.090909
false
false
false
sprtkd/OpenHmnD
object/tst.py
1
3754
# -*- coding: utf-8 -*- """ Created on Tue Jul 11 09:29:01 2017 @author: Punyajoy Saha """ #!/usr/bin/env python from pocketsphinx.pocketsphinx import * from sphinxbase.sphinxbase import * # #import speech2 # ## say() speaks out loud. #speech2.say("I am speaking out loud.") # ## in...
mit
6,885,824,817,186,783,000
23.889655
93
0.641982
false
2.492696
false
false
false
jrief/djangocms-cascade
cmsplugin_cascade/migrations/0029_json_field.py
1
2323
# Generated by Django 3.1.5 on 2021-01-28 15:52 from django.db import migrations, models def backwards(apps, schema_editor): print("Migration backward will not restore your `JSONField`s to `CharField`s.") class Migration(migrations.Migration): dependencies = [ ('cmsplugin_cascade', '0028_cascade_c...
mit
-3,055,507,169,678,262,000
33.161765
112
0.587602
false
4.467308
false
false
false
SystemsBioinformatics/cbmpy
cbmpy/CBQt4.py
1
32405
""" CBMPy: CBQt4 module =================== Constraint Based Modelling in Python (http://pysces.sourceforge.net/getNewReaction) Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands This program is free software: you can redistribute it and/or modify it under the terms of the GN...
gpl-3.0
6,245,848,769,703,354,000
35.823864
148
0.568523
false
3.626749
false
false
false
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/static/scripts/pack_scripts.py
1
1952
#!/usr/bin/env python import sys, os from glob import glob from subprocess import call from shutil import copyfile from os import path # Scripts that should not be packed -- just copied do_not_pack = set() cmd = "java -jar ../../scripts/yuicompressor.jar --charset utf-8 --type js %(fname)s -o packed/%(fname)s" # cm...
gpl-3.0
-941,269,120,476,930,600
28.134328
136
0.618852
false
3.549091
false
false
false
Skydes/Monitoring
src/main.py
1
2622
#!/usr/bin/env python ''' Copyright (c) 2016, Paul-Edouard Sarlin All rights reserved. Project: Autonomous Monitoring System File: main.py Date: 2016-08-08 Author: Paul-Edouard Sarlin Website: https://github.com/skydes/monitoring ''' from multiprocessing import Que...
bsd-3-clause
-800,108,648,192,495,700
26.893617
130
0.745995
false
3.273408
false
false
false
ToonTownInfiniteRepo/ToontownInfinite
toontown/coghq/MintInterior.py
1
10229
from direct.directnotify import DirectNotifyGlobal from toontown.battle import BattlePlace from direct.fsm import ClassicFSM, State from direct.fsm import State from direct.showbase import BulletinBoardWatcher from pandac.PandaModules import * from otp.distributed.TelemetryLimiter import RotationLimitToH, TLGatherAllAv...
mit
7,421,334,415,014,637,000
41.620833
154
0.655587
false
3.601761
false
false
false
signalfire/django-property
homes/admin.py
1
2271
from mapwidgets.widgets import GooglePointFieldWidget from django.contrib import admin from django.contrib.gis.db import models from django.utils.translation import ugettext as _ from homes.models import Block, Banner, SEO, SearchPrice, Branch, PropertyTenure, PropertyType, Alert, MediaType class SearchPriceAdmin(a...
mit
5,921,387,022,681,501,000
28.115385
112
0.630559
false
3.710784
false
false
false
miguelzuma/montepython_zuma
montepython/analyze.py
1
95056
""" .. module:: analyze :synopsis: Extract data from chains and produce plots .. moduleauthor:: Karim Benabed <benabed@iap.fr> .. moduleauthor:: Benjamin Audren <benjamin.audren@epfl.ch> Collection of functions needed to analyze the Markov chains. This module defines as well a class :class:`Information`, that sto...
mit
3,279,992,004,840,234,500
43.253259
153
0.52346
false
4.247743
false
false
false
call-me-jimi/hq
hq/lib/hQCommand.py
1
1329
import re class hQCommand( object ): """! @brief Command """ def __init__( self, name, regExp, arguments = [], permission = None, fct = None, help = "", fullhelp = "" ): self.n...
gpl-2.0
594,055,388,762,925,400
24.075472
62
0.470278
false
4.489865
false
false
false
cojocar/vmchecker
vmchecker/submissions.py
1
4960
#! /bin/bin/env python # -*- coding: utf-8 -*- """ """ from __future__ import with_statement import ConfigParser import os import time import datetime import logging from .config import DATE_FORMAT from . import paths _logger = logging.getLogger('vmchecker.submissions') def get_time_struct_from_str(time_str): ...
mit
-8,193,271,641,474,638,000
32.513514
75
0.653831
false
4.178602
true
false
false
budnyjj/bsuir_magistracy
disciplines/OTOS/lab_1/lab.py
1
1813
#!/usr/bin/env python import functools import math import random import numpy as np import matplotlib.pyplot as plt plt.rc('text', usetex=True) plt.rc('font', family='serif') # 1D model def model(x): a = 2.7; d = 0.1; y_0 = 2 sigma = 0.001 result = y_0 - 0.04 * (x - a) - d * (x - a)**2 return resul...
gpl-3.0
7,770,229,010,586,717,000
24.9
79
0.578047
false
2.681953
false
false
false
ucbrise/clipper
integration-tests/deploy_pytorch_to_caffe2_with_onnx.py
1
7042
from __future__ import absolute_import, print_function import os import sys import requests import json import numpy as np import time import logging cur_dir = os.path.dirname(os.path.abspath(__file__)) import torch import torch.utils.data as data from torch import nn, optim from torch.autograd import Variable import...
apache-2.0
3,313,663,111,982,408,000
29.484848
86
0.557938
false
3.816802
true
false
false
dcneeme/droidcontroller
achannels.py
1
26311
# to be imported to access modbus registers as analogue io # 03.04.2014 neeme # 04.04.2014 it works, without periodical executuoin and without acces by svc reg # 06.04.2014 seguential register read for optimized reading, done # 14.04.2014 mb[mbi] (multiple modbus connections) support. NOT READY! # 16.04.2014 fixed mt...
gpl-3.0
2,982,232,896,375,325,000
45.240773
195
0.520505
false
3.634618
false
false
false
mtthwflst/terse
Parsers/NRT.py
1
24648
if __name__ == "__main__": import sys,os selfname = sys.argv[0] full_path = os.path.abspath(selfname)[:] last_slash = full_path.rfind('/') dirpath = full_path[:last_slash] + '/..' print "Append to PYTHONPATH: %s" % (dirpath) sys.path.append(dirpath) import copy, string import math import nu...
mit
3,443,818,888,662,613,500
28.625
117
0.438737
false
3.880353
false
false
false
ser/topitup
login_bp.py
1
3595
# Flask modules from flask import ( Blueprint, render_template, redirect, url_for, request, flash, g ) # FLask Login from flask_login import ( login_user, logout_user, current_user ) # WTForms from flask_wtf import Form, RecaptchaField from wtforms import StringField, SubmitFiel...
agpl-3.0
2,974,913,591,940,286,500
26.234848
76
0.624478
false
3.71001
false
false
false
lgarren/spack
var/spack/repos/builtin/packages/eccodes/package.py
1
4223
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
7,285,572,141,602,078,000
43.925532
113
0.636514
false
3.79425
false
false
false
DaggerES/ReloadCam
DELETED_ReloadCam_Server_Kacsat.py
1
1301
#!/usr/bin/env python # -*- coding: utf-8 -*- #Refrescador automatico de clines #Creado por Dagger - https://github.com/gavazquez import ReloadCam_Main, ReloadCam_Helper def GetVersion(): return 3 #Filename must start with Server, classname and argument must be the same! class Kacsat(ReloadCam_Main.Server): ...
gpl-3.0
1,889,748,658,797,407,500
30.731707
90
0.652575
false
3.142512
false
false
false
yunify/qingcloud-cli
qingcloud/cli/iaas_client/actions/lb/modify_loadbalancer_backend_attributes.py
1
2590
# ========================================================================= # Copyright 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the Licens...
apache-2.0
-2,008,896,815,739,194,600
41.459016
77
0.57027
false
4.64991
false
false
false
mbuesch/pyprofibus
stublibs/serial.py
1
2414
from pyprofibus.compat import * import time PARITY_EVEN = "E" PARITY_ODD = "O" STOPBITS_ONE = 1 STOPBITS_TWO = 2 class SerialException(Exception): pass class Serial(object): def __init__(self): self.__isMicropython = isMicropython self.port = "/dev/ttyS0" self.__portNum = None self.baudrate = 9600 self.b...
gpl-2.0
8,178,868,719,447,884,000
23.886598
75
0.652444
false
2.976572
false
false
false
bolshoibooze/err
errbot/backends/campfire.py
1
4381
import logging import sys from errbot.backends.base import Message, build_message from errbot.errBot import ErrBot from threading import Condition log = logging.getLogger(__name__) try: import pyfire except ImportError: log.exception("Could not start the campfire backend") log.fatal(""" If you intend...
gpl-3.0
-7,363,828,428,747,781,000
32.7
98
0.632276
false
3.897687
true
false
false
EOOOL/flaskq
app/api_1_0/comments.py
1
2405
from flask import jsonify, request, g, url_for, current_app from .. import db from ..models import Post, Permission, Comment from . import api from .decorators import permission_required @api.route('/comments/') def get_comments(): page = request.args.get('page', 1, type=int) pagination = Comment.qu...
mit
1,175,486,497,100,385,800
32.357143
75
0.607484
false
3.526393
false
false
false
secnot/uva-onlinejudge-solutions
10004 - Bicoloring/main.py
1
1734
import sys from collections import deque def load_num(): num_str = sys.stdin.readline() if num_str == '\n' or num_str=='': return None return list(map(int, num_str.rstrip().split())) def load_graph(): """Load graph into its adjacency list""" vertices = load_num()[0] # Check it i...
mit
-2,551,883,087,197,521,400
20.949367
76
0.544983
false
3.802632
false
false
false
beremaran/cbu-cse3113
hw07.py
1
2388
#!/usr/bin/env python import argparse import numpy as np from PIL import Image ''' 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 optio...
gpl-3.0
-3,285,391,032,930,099,700
27.771084
117
0.664154
false
3.15873
false
false
false
VUEG/bdes_to
src/03_post_processing/similarity.py
1
18175
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Functions and utilities comparing raster and vector similarities. Module can be used alone or as part of Snakemake workflow. """ import logging import rasterio import geopandas as gpd import pandas as pd import numpy as np import numpy.ma as ma from importlib.machine...
mit
-3,889,173,436,250,582,000
41.169374
108
0.592737
false
3.941661
false
false
false
jashandeep-sohi/aiohttp
aiohttp/client.py
1
25360
"""HTTP Client for asyncio.""" import asyncio import base64 import hashlib import os import sys import traceback import warnings import http.cookies import urllib.parse import aiohttp from .client_reqrep import ClientRequest, ClientResponse from .errors import WSServerHandshakeError from .multidict import MultiDictPr...
apache-2.0
-5,988,827,585,146,491,000
32.456464
79
0.536199
false
4.763336
false
false
false
opennewzealand/linz2osm
linz2osm/data_dict/management/commands/update_layer_names.py
1
4626
# LINZ-2-OSM # Copyright (C) Koordinates Ltd. # # 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 ...
gpl-3.0
9,209,304,426,773,775,000
42.641509
134
0.610463
false
3.138399
false
false
false
kmnk/gitn
rplugin/python3/denite/source/gitn_log.py
1
5421
# File: gitn_log.py # Author: kmnk <kmnknmk at gmail.com> # License: MIT license from gitn.enum import Window from gitn.util.gitn import Gitn from denite.process import Process import os import re import time from .gitn import Source as Base DATE_GRAPH_HIGHLIGHT = { 'container': { 'name': 'gitnLog_dateGr...
mit
632,974,363,430,759,600
29.455056
174
0.448072
false
3.855619
false
false
false
Lektorium-LLC/edx-ora2
openassessment/assessment/models/peer.py
1
18730
""" Django models specific to peer assessment. NOTE: We've switched to migrations, so if you make any edits to this file, you need to then generate a matching migration for it using: ./manage.py schemamigration openassessment.assessment --auto """ import random from datetime import timedelta from django.db impo...
agpl-3.0
7,839,245,104,259,075,000
37.778468
112
0.609557
false
4.553854
false
false
false
yoshrote/valid_model
setup.py
1
1048
from setuptools import setup, find_packages setup(name='valid_model', version='0.4.0', description="Generic data modeling and validation", long_description="""\ """, classifiers=[ 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'P...
mit
-5,580,786,748,296,095,000
31.75
72
0.542939
false
4.295082
false
true
false
saydulk/django-wysiwyg
django_wysiwyg/templatetags/wysiwyg.py
1
2413
from django import template from django.conf import settings from django.template.loader import render_to_string try: from urlparse import urljoin except ImportError: from urllib.parse import urljoin register = template.Library() def get_settings(): """Utility function to retrieve settings.py values wit...
mit
-7,762,174,823,449,520,000
28.790123
126
0.675508
false
3.569527
false
false
false
nextgenusfs/funannotate
funannotate/utilities/stringtie2gff3.py
1
3977
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import argparse import funannotate.library as lib def dict2gff3(input): from collections import OrderedDict ''' function to convert funannotate gene dictionary to gff3 output ''' def _sortDict(d): return (d[1]['contig'], d[1]['locat...
bsd-2-clause
-5,736,459,926,717,889,000
49.341772
144
0.451848
false
3.25184
false
false
false
brianloveswords/webpagemaker
webpagemaker/api/migrations/0004_lowercase_short_url_ids.py
1
1316
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models NUMERALS = "3fldc4mzjyqr7bkug5vh0a68xpon9stew12i" def rebase(num, numerals=NUMERALS): base = len(numerals) left_digits = num // base if left_digits == 0: return numerals[...
mpl-2.0
162,472,665,847,516,580
31.9
126
0.587386
false
3.454068
false
false
false
EndPointCorp/lg_ros_nodes
lg_media/scripts/browser_player.py
1
1133
#!/usr/bin/env python3 import rospy from lg_msg_defs.msg import AdhocMedias from lg_media import DirectorMediaBridge from interactivespaces_msgs.msg import GenericMessage from lg_common.helpers import handle_initial_state from lg_common.helpers import run_with_influx_exception_handler DEFAULT_VIEWPORT = 'center' MEDI...
apache-2.0
6,909,703,112,144,728,000
34.40625
91
0.713151
false
3.392216
false
false
false
paulmcquad/projecteuler
0-100/problem31.py
1
1448
#http://users.softlab.ntua.gr/~ttsiod/euler31.html #!/usr/bin/env python # the 8 coins correspond to 8 columns coins = [1, 2, 5, 10, 20, 50, 100, 200] TARGET=200 matrix = {} for y in xrange(0, TARGET+1): # There is only one way to form a target sum N # via 1-cent coins: use N 1-cents! matrix[y, 0] = 1 ...
gpl-3.0
-9,069,959,849,210,606,000
31.909091
59
0.529006
false
3.290909
false
false
false
savoirfairelinux/quebec-monitoring
scripts/dns.py
1
2091
#!/usr/bin/env python # -*- coding: utf-8 -*- DNS = { # Cogeco Cable (Trois-rivieres) 'cogeco.ca': ['205.151.69.200','205.151.68.200'], # Videotron.CA 'videotron.ca': ['205.151.222.250', '205.151.222.251'], # Colbanet 'colba.net': ['216.252.64.75', '216.252.64.76'], } template_...
agpl-3.0
-6,103,445,619,368,963,000
27.256757
77
0.432329
false
3.901119
false
false
false
dpanth3r/biggraphite
biggraphite/glob_utils.py
1
15872
#!/usr/bin/env python # Copyright 2016 Criteo # # 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
-4,000,647,928,094,152,000
29.75969
88
0.550718
false
4.336612
false
false
false
AlexGidiotis/Multimodal-Gesture-Recognition-with-LSTMs-and-CTC
multimodal_fusion/sequence_decoding.py
1
3585
import pandas as pd import numpy as np from operator import itemgetter from itertools import groupby from keras.preprocessing import sequence from keras.models import Sequential from keras.models import model_from_json from keras import backend as K from keras.optimizers import RMSprop import keras.callbacks from kera...
mit
6,923,407,496,692,858,000
27.228346
112
0.68954
false
2.787714
false
false
false
HewlettPackard/oneview-ansible
test/test_oneview_scope.py
1
11066
#!/usr/bin/python # -*- coding: utf-8 -*- ### # Copyright (2016-2020) Hewlett Packard Enterprise Development LP # # 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/licen...
apache-2.0
-3,200,483,235,945,231,000
34.928571
104
0.653895
false
3.698529
true
false
false
rtucker-mozilla/mozilla_inventory
core/utils.py
1
6521
from django.db.models import Q from django.core.exceptions import ValidationError import ipaddr import smtplib from email.mime.text import MIMEText from settings.local import people_who_need_to_know_about_failures from settings.local import inventorys_email # http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-func...
bsd-3-clause
522,087,460,123,051,500
28.776256
78
0.535501
false
3.534417
false
false
false
Vladimir-Ivanov-Git/raw-packet
Scripts/DHCP/dhcpv6_rogue_server.py
1
36326
#!/usr/bin/env python # region Import from sys import path from os.path import dirname, abspath project_root_path = dirname(dirname(dirname(abspath(__file__)))) utils_path = project_root_path + "/Utils/" path.append(utils_path) from base import Base from network import Ethernet_raw, IPv6_raw, ICMPv6_raw, UDP_raw, DHC...
unlicense
7,659,077,770,600,407,000
43.846914
121
0.500248
false
4.588354
false
false
false
JoshData/diff_match_patch-python
setup.py
2
1307
from setuptools import setup, find_packages, Extension # Note to self: To upload a new version to PyPI, run: # pip install wheel twine # python setup.py sdist bdist_wheel # twine upload dist/* module1 = Extension('diff_match_patch', sources = ['interface.cpp'], include_dirs = [...
cc0-1.0
-4,188,308,818,056,781,300
37.441176
179
0.636572
false
3.972644
false
false
false
SeaItRise/SeaItRise-webportal
src/accounts/models.py
1
4568
import uuid from datetime import timedelta from django.conf import settings from django.contrib.auth.models import AbstractBaseUser, BaseUserManager from django.db import models from django.utils import timezone from django.utils.translation import ugettext_lazy as _ class MyUserManager(BaseUserManager): def _cr...
mit
-9,196,402,323,068,319,000
29.657718
108
0.59282
false
4.175503
false
false
false
greggian/TapdIn
django/contrib/flatpages/admin.py
1
1100
from django import forms from django.contrib import admin from django.contrib.flatpages.models import FlatPage from django.utils.translation import ugettext_lazy as _ class FlatpageForm(forms.ModelForm): url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/]+$', help_text = _("Exam...
apache-2.0
7,297,535,413,985,754,000
37.285714
133
0.615455
false
4.11985
false
false
false
2015fallhw/cdw11
users/b/g11/bg11_40323247.py
1
20505
# 各組分別在各自的 .py 程式中建立應用程式 (第1步/總共3步) from flask import Blueprint, render_template, make_response # 利用 Blueprint建立 ag1, 並且 url 前綴為 /ag1, 並設定 template 存放目錄 bg11_40323247 = Blueprint('bg11_40323247', __name__, url_prefix='/bg11_40323247', template_folder='templates') @bg11_40323247.route('/task47_1') def task47_1(): ...
agpl-3.0
-2,091,752,563,251,680,500
27.446708
110
0.607912
false
1.908011
false
false
false
oczkers/gdown
gdown/modules/filefactory.py
1
5668
# -*- coding: utf-8 -*- """ gdown.modules.filefactory ~~~~~~~~~~~~~~~~~~~ This module contains handlers for filefactory. """ import re from datetime import datetime from dateutil import parser from time import sleep from ..module import browser, acc_info_template from ..exceptions import ModuleError def upload(u...
gpl-3.0
-7,907,263,448,037,048,000
50.063063
288
0.638497
false
3.751158
false
false
false
parksandwildlife/wastd
occurrence/migrations/0034_auto_20190507_1222.py
1
2843
# Generated by Django 2.1.7 on 2019-05-07 04:22 from django.db import migrations, models import django.db.models.deletion import uuid class Migration(migrations.Migration): dependencies = [ ('occurrence', '0033_auto_20190506_1347'), ] operations = [ migrations.CreateModel( n...
mit
1,233,837,931,145,389,300
44.854839
211
0.610623
false
4.12627
false
false
false
willre/homework
day21-22/webChat/webChat_master/views.py
1
3580
# -*- coding:utf-8 -*- import json import Queue import time from django.shortcuts import render,HttpResponseRedirect,HttpResponse from django.contrib.auth import authenticate,login,logout from webChat_forms.loginFrom import userLoginFrom from django.contrib.auth.decorators import login_required from webChat_models ...
gpl-2.0
4,381,744,721,565,426,700
30.90991
123
0.612931
false
3.666667
false
false
false
taariq/btcmarketdata
btcdata/public_markets/market.py
1
1991
import time import urllib.request import urllib.error import urllib.parse import config import logging from fiatconverter import FiatConverter class Market(object): def __init__(self, currency): self.name = self.__class__.__name__ self.currency = currency self.depth_updated = 0 sel...
mit
2,434,534,309,840,194,600
30.603175
90
0.553993
false
3.742481
false
false
false
fp7-netide/Engine
loader/loader/installer.py
1
8381
""" Copyright (c) 2015, NetIDE Consortium (Create-Net (CN), Telefonica Investigacion Y Desarrollo SA (TID), Fujitsu Technology Solutions GmbH (FTS), Thales Communications & Security SAS (THALES), Fundacion Imdea Networks (IMDEA), Universitaet Paderborn (UPB), Intel Research & Innovation Ireland Ltd (IRIIL), Fraunhof...
epl-1.0
-2,557,839,773,706,332,700
41.323232
153
0.540692
false
3.703049
true
false
false
wxgeo/geophar
wxgeometrie/sympy/codegen/cnodes.py
3
2498
""" AST nodes specific to the C family of languages """ from sympy.core.basic import Basic from sympy.core.compatibility import string_types from sympy.core.containers import Tuple from sympy.core.sympify import sympify from sympy.codegen.ast import Attribute, Declaration, Node, String, Token, Type, none, FunctionCall...
gpl-2.0
1,761,598,395,251,997,700
22.566038
99
0.651321
false
3.915361
false
false
false
ezietsman/seismo
setup.py
1
1041
from numpy.distutils.core import Extension f90periodogram = Extension(name='f90periodogram', sources=['seismo/src/periodogram.f90'], extra_f90_compile_args=["-fopenmp", "-lgomp"], extra_link_args=["-lgomp"]) if __name__ == "__main__": ...
mit
5,087,803,322,496,857,000
29.617647
73
0.580211
false
3.898876
false
false
false