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
WarriorIng64/GxSubOS
label.py
1
2754
# This file is part of GxSubOS. # Copyright (C) 2014 Christopher Kyle Horton <christhehorton@gmail.com> # GxSubOS 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...
gpl-3.0
-6,077,820,292,324,567,000
35.72
93
0.69281
false
3.590613
false
false
false
Benozo/NBI
NBI/stpl.py
1
17031
''' This is a port from SimpleTemplates to be a standalone Template Engine. Simple Template is a very fast Template Engine for Python. Now SimpleTemplate can be used on other projects :-) All credit to the Bottle Project Creator (https://github.com/bottlepy/bottle). ''' import functools import os, re fr...
mit
6,394,658,072,408,750,000
37.515081
98
0.536375
false
4.017693
false
false
false
baloo/shinken
shinken/daemons/skonfdaemon.py
1
32418
#!/usr/bin/env python #Copyright (C) 2009-2012 : # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # #This file is part of Shinken. # #Shinken is free software: you can redistribute it and/or modify...
agpl-3.0
4,848,755,895,858,417,000
34.860619
149
0.571041
false
4.069035
true
false
false
geobricks/geobricks_dbms
geobricks_dbms/core/dbms_postgresql.py
1
4855
import simplejson import psycopg2 from types import DictType class DBMSPostgreSQL: # User's parameters db_name = None username = None password = None host = None port = None schema = None # Computed variables. connection = None def __init__(self, db_name, username, password,...
gpl-2.0
-5,700,996,830,208,089,000
32.034014
156
0.554274
false
4.076406
false
false
false
buguen/pylayers
pylayers/simul/exploit.py
1
9905
from pylayers.util import project from pylayers.signal.bsignal import * import pylayers.util.pyutil as pyu import ConfigParser import matplotlib.pylab as plt import itertools import pdb r""" .. currentmodule:: pylayers.simul.exploit This module Class Exploit ============= .. autosummary:: :toctree: generated...
lgpl-3.0
3,811,786,968,643,733,500
30.848875
127
0.475114
false
3.409639
false
false
false
wjkoh/cs262a
utils/slowData.py
1
1686
#!/usr/bin/python import csv import calendar import datetime import glob import os import sys dirName = sys.argv[1] multiplier = float(sys.argv[2]); fnames = [] dates = [] rows = [] headers = []; for index,fname in enumerate(glob.glob(dirName + "/*.csv")): fnames.append(fname) rows.append([]) dates.append(...
bsd-3-clause
2,900,439,998,527,990,300
27.576271
82
0.581257
false
3.406061
false
false
false
jerabaul29/python_huffman
test/test_example_encode_hamlet.py
1
4351
from __future__ import print_function import pyhuffman.pyhuffman as pyhuffman import os """ A test case, that can also be used as example, about how to generate tree, and encode and decode some text. """ path_to_here = os.path.dirname(os.path.realpath(__file__)) + '/' # path_to_here = '' # functions for generating t...
mit
2,481,112,119,950,024,000
35.258333
116
0.692484
false
3.341782
false
false
false
dominicrodger/tinyblog
tinyblog/admin.py
1
1075
from django.contrib import admin from tinyblog.models import Post, EmailSubscriber from tinymce.widgets import TinyMCE class PostAdmin(admin.ModelAdmin): list_display = ('title', 'slug', 'created', 'emailed', ) list_filter = ('emailed', ) date_hierarchy = 'created' search_fields = ('title', 'text', ) ...
bsd-3-clause
-6,948,106,030,963,254,000
34.833333
79
0.652093
false
3.559603
false
false
false
gecos-team/gecosws-config-assistant
gecosws_config_assistant/dao/NetworkInterfaceDAO.py
1
4583
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # This file is part of Guadalinex # # This software 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, ...
gpl-2.0
-5,583,918,951,602,620,000
26.769697
74
0.562418
false
4.169245
false
false
false
pearu/f2py
fparser/Fortran2003.py
1
252094
#!/usr/bin/env python """Fortran 2003 Syntax Rules. """ from __future__ import absolute_import from __future__ import print_function #Author: Pearu Peterson <pearu@cens.ioc.ee> #Created: Oct 2006 import re import logging from .splitline import string_replace_map from . import pattern_tools as pattern from .readfortran...
bsd-3-clause
3,990,001,464,344,939,000
32.947482
153
0.523289
false
3.631536
false
false
false
waddedMeat/asteroids-ish
Asteroids/Ship.py
1
3639
__author__ = 'jmoran' from Asteroids import Object, Bullet import math from Asteroids.Colors import * class Ship(Object): radius = 20 def __init__(self, window, game): Object.__init__(self, window, game) self.point = (self.wWidth / 2, self.wHeight / 2) self.start_point = self.point ...
mit
8,277,368,852,374,912,000
33.009346
99
0.535037
false
2.997529
false
false
false
jjhelmus/CSU_RadarTools
csu_radartools/csu_kdp.py
1
10457
""" Timothy James Lang tjlangco@gmail.com Last Updated 04 September 2015 (Python 2.7/3.4) Last Updated 26 July 2005 (IDL) csu_kdp v1.4 Change Log ---------- v1.4 Major Changes (09/04/2015): 1. Added window keyword to enable stretching the FIR window (e.g., use a 21-pt filter over 5 km with 250-m gate spacing 2. F...
gpl-2.0
330,783,151,936,781,100
36.743682
79
0.606121
false
3.242866
false
false
false
jonjahren/unity8
tests/autopilot/unity8/dash.py
1
10349
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # # Unity Autopilot Test Suite # Copyright (C) 2012, 2013, 2014, 2015 Canonical # # 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 F...
gpl-3.0
-6,452,512,887,664,993,000
38.05283
79
0.648179
false
3.817411
false
false
false
zitkino/zitkino.cz
zitkino/mongo.py
1
5892
# -*- coding: utf-8 -*- """Base MongoDB models (heavily inspired by Flask-MongoEngine)""" import itertools from collections import Mapping, OrderedDict import mongoengine from flask import abort from mongoengine import ValidationError from mongoengine.base.fields import BaseField from mongoengine.queryset import Mul...
mit
2,080,371,165,480,691,700
30.010526
77
0.583503
false
4.364444
false
false
false
luisera/gmpe-smtk
smtk/parsers/base_database_parser.py
1
2223
#!/usr/bin/env/python """ Abstract base class for a strong motion database reader """ import os import abc def get_float(xval): """ Returns a float value, or none """ if xval.strip(): return float(xval) else: return None def get_int(xval): """ Returns an int value or none ...
agpl-3.0
1,506,132,319,386,094,600
22.4
70
0.529465
false
4.116667
false
false
false
teffalump/fhir
resources/observation.py
1
1467
from flask import request from server.common import Resource from server.resources import SearchRecords from server.resources import ReadRecord from server.resources import ValidateRecord from server.resources import Routing class OBS_Create(Resource): def post(self): '''Create interaction''' retu...
gpl-3.0
9,101,011,486,581,953,000
27.211538
76
0.670757
false
4.086351
false
false
false
Tinkerforge/brickv
src/brickv/plugin_system/plugins/analog_in/analog_in.py
1
5248
# -*- coding: utf-8 -*- """ Analog In Plugin Copyright (C) 2011-2012 Olaf Lüke <olaf@tinkerforge.com> Copyright (C) 2014-2016 Matthias Bolte <matthias@tinkerforge.com> analog_in.py: Analog In Plugin Implementation This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
gpl-2.0
8,598,593,545,445,375,000
37.580882
104
0.650276
false
3.718639
false
false
false
hickerson/bbn
fable/fable_sources/libtbx/easy_profile.py
1
1160
from __future__ import division class easy_profile(object): """ cProfile.Profile easy-to-use wrapper """ def __init__(self, func, file_name, func_name, line, runs=1): """ Profiling of the callable func. file_name, func_name, line shall tell where func is defined. runs is the number of calls which will ...
mit
1,924,395,093,234,190,600
33.117647
74
0.634483
false
3.525836
false
false
false
rigdenlab/SIMBAD
simbad/db/tests/test_db.py
1
4044
"""Test functions for simbad.db""" __author__ = "Adam Simpkin" __date__ = "19 Jan 2018" import os import unittest import simbad import simbad.db try: ROOT_DIR = SHARE_DIR = os.environ['SIMBAD_ROOT'] EXAMPLE_DIR = os.path.join(ROOT_DIR, "test_data") except KeyError: from simbad.command_line import CCP4Roo...
bsd-3-clause
-4,571,492,509,324,189,000
35.107143
113
0.59545
false
2.915645
true
false
false
Diti24/python-ivi
ivi/agilent/hprtl.py
1
13485
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2016 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the...
mit
4,937,023,965,023,341,000
34.486842
116
0.415647
false
4.030185
false
false
false
denismakogon/tosca-vcloud-plugin
setup.py
1
1135
######### # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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
-7,640,678,385,704,727,000
29.675676
77
0.661674
false
3.697068
false
false
false
dayatz/taiga-back
taiga/projects/tagging/api.py
1
4477
# -*- coding: utf-8 -*- # Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can r...
agpl-3.0
-7,110,540,894,416,723,000
35.08871
92
0.646257
false
3.851119
false
false
false
brucx/uberpku
uber_rides/client.py
1
17078
# Copyright (c) 2015 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
mit
7,539,731,653,395,724,000
31.467681
79
0.58508
false
4.677623
false
false
false
saullocastro/pyNastran
pyNastran/op2/tables/oes_stressStrain/real/oes_composite_plates.py
1
14813
from __future__ import (nested_scopes, generators, division, absolute_import, print_function, unicode_literals) from six.moves import zip, range import numpy as np from numpy import zeros, searchsorted, unique, ravel try: import pandas as pd except ImportError: pass from pyNastran.op2....
lgpl-3.0
2,757,207,133,255,796,700
39.807163
157
0.502937
false
3.20836
false
false
false
morganoh/Python_With_Kirk
week4_programs/netmiko3.py
1
1439
#!/usr/bin/env python ''' Use netmiko to connect to 'show arp' on pynet-rtr1, pynet-rtr2, and juniper-srx. ''' from netmiko import ConnectHandler from getpass import getpass def login(rtr_name): '''make connection''' try: device_connection = ConnectHandler(**rtr_name) print '### YOU ARE NOW LOG...
apache-2.0
-3,460,947,384,224,751,000
29.617021
112
0.596247
false
3.292906
false
false
false
anntzer/seaborn
seaborn/relational.py
1
49844
from textwrap import dedent import warnings import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt from ._core import ( VectorPlotter, ) from .utils import ( ci_to_errsize, locator_to_legend_entries, ci as ci_func ) from .algorithms import bootstrap from .axisg...
bsd-3-clause
-4,687,720,286,490,481,000
33.855944
79
0.575716
false
4.005143
false
false
false
alan-wu/neon
src/opencmiss/neon/core/neonregion.py
1
15062
''' Copyright 2015 University of Auckland 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
5,086,091,587,092,493,000
37.819588
116
0.615921
false
4.585084
false
false
false
algorhythms/LeetCode
076 Minimum Window Substring.py
1
1966
""" Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity O(n). For example, S = "ADOBECODEBANC" T = "ABC" Minimum window is "BANC". Note: If there is no such window in S that covers all characters in T, return the emtpy string "". If there...
mit
-3,812,813,061,940,150,000
28.75
118
0.506104
false
3.366438
false
false
false
kovidgoyal/kitty
kitty/options/parse.py
1
54395
# generated by gen-config.py DO NOT edit # vim:fileencoding=utf-8 import typing from kitty.conf.utils import ( merge_dicts, positive_float, positive_int, to_bool, to_cmdline, to_color, to_color_or_none, unit_float ) from kitty.options.utils import ( active_tab_title_template, adjust_baseline, adjust_line_h...
gpl-3.0
-6,923,967,928,219,192,000
40.842308
131
0.617171
false
3.077337
false
false
false
chrisbiggar/shiny-light
py2d/actor.py
1
1780
''' ''' import math from loggable import Loggable import pyglet import pymunk import py2d def centerImgAnchor(img): img.anchor_x = img.width // 2 img.anchor_y = img.height // 2 class Actor(object): Scene = None def __init__(self): pass def update(self, dt): pass def addedToScene(self, scene): self.s...
bsd-3-clause
-8,241,305,566,003,730,000
20.445783
93
0.702809
false
2.971619
false
false
false
jonaubf/LibraryOrder
order.py
1
2622
#!/usr/bin/env python # -*- coding: utf-8 -*- import zipfile import os from lxml import etree def get_the_book(start_dir): """ at first we have to take the book from directory, than we have to get some info from it and than to put it to the right place. So get_the_book recursevly gets each book from d...
apache-2.0
2,960,915,791,122,695,700
29.137931
84
0.609077
false
3.45
false
false
false
Robozor-network/AROM
src/drivers/camera_cv_example_subscriber.py
1
1990
#!/usr/bin/env python """OpenCV feature detectors with ros CompressedImage Topics in python. This example subscribes to a ros topic containing sensor_msgs CompressedImage. It converts the CompressedImage into a numpy.ndarray, then detects and marks features in that image. It finally displays and publishes the new i...
gpl-3.0
-6,832,583,440,947,575,000
27.028169
74
0.662312
false
3.572711
false
false
false
apenwarr/redo
redo/builder.py
1
26103
"""Code for parallel-building a set of targets, if needed.""" from __future__ import print_function import errno, os, stat, signal, sys, tempfile, time from . import cycles, env, helpers, jobserver, logs, paths, state from .logs import debug2, err, warn, meta def _nice(t): return state.relpath(t, env.v.STARTDIR) ...
apache-2.0
-3,910,744,246,060,970,000
39.913793
81
0.548251
false
3.981544
false
false
false
MSEMJEJME/ReAlistair
renpy/python.py
1
28882
# Copyright 2004-2010 PyTom <pytom@bishoujo.us> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, mer...
gpl-2.0
-3,829,970,597,061,981,700
27.262411
129
0.568382
false
4.27059
false
false
false
lucabaldini/rating02
dump_doi_duplicates.py
1
2437
#!/usr/bin/env python # # Copyright (C) 2019, Luca Baldini. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This p...
gpl-3.0
6,751,947,656,283,079,000
32.383562
76
0.594173
false
3.807813
false
false
false
NicoVarg99/daf-recipes
ckan/ckan/ckan/ckan/model/task_status.py
2
1174
# encoding: utf-8 from datetime import datetime from sqlalchemy import types, Column, Table, UniqueConstraint import meta import types as _types import domain_object __all__ = ['TaskStatus', 'task_status_table'] task_status_table = Table('task_status', meta.metadata, Column('id', types.UnicodeText, primary_key=...
gpl-3.0
-3,177,157,195,557,000,000
32.542857
80
0.701022
false
3.824104
false
false
false
patrickdw123/ParanoiDF
extractJavaScript.py
1
57182
# ParanoiDF. A combination of several PDF analysis/manipulation tools to # produce one of the most technically useful PDF analysis tools. # # Idea proposed by Julio Hernandez-Castro, University of Kent, UK. # By Patrick Wragg # University of Kent # 21/07/2014 # # With thanks to: # Julio...
gpl-3.0
-1,681,413,347,723,712,800
44.131807
173
0.470795
false
4.256197
false
false
false
EmanueleCannizzaro/scons
test/Fortran/link-with-cxx.py
1
4896
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to us...
mit
-5,625,107,486,315,200,000
30.587097
103
0.664624
false
3.014778
true
false
false
xiang12835/python_web
py2_django/myProject/settings.py
1
2038
""" Django settings for app project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import...
apache-2.0
-1,295,817,935,985,898,000
22.697674
71
0.716879
false
3.234921
false
false
false
ullerrm/eve-tools
zkb-combat-inties/zkb_by_chars.py
1
4579
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'UllerRM / Namamai (ullerrm@users.noreply.github.com)' __copyright__ = "Copyright (C) 2014 UllerRM" from collections import defaultdict import io import json import numpy import os import pprint import statistics from evesde import EveSDE # Script settings ...
apache-2.0
4,647,491,050,513,482,000
30.57931
94
0.625682
false
3.354579
false
false
false
kuckaogh/csclpp
csclpp/src/csclpp/dts/antlr4/RuleContext.py
1
7958
# Copyright (c) 2012-2016 The ANTLR Project. All rights reserved. # Use of this file is governed by the BSD 3-clause license that # can be found in the LICENSE.txt file in the project root. #/ # A rule context is a record of a single rule invocation. It knows # which context invoked it, if any. If there is no paren...
gpl-3.0
-6,816,380,873,763,029,000
34.368889
100
0.628927
false
3.872506
false
false
false
animeshpathak/chunaavitukka
appengine/models.py
1
7192
#Models.py, for defining all data models from google.appengine.ext import ndb import logging #CTUser #profile # - user : Google User object # - photo -- coming later # - displayname : unique # - ID = key class CTUser(ndb.Model): '''Models an individual Guestbook entry with content and date.''' google_user = ndb...
agpl-3.0
2,235,023,258,052,459,300
36.072165
93
0.692853
false
3.403691
false
false
false
eunchong/build
scripts/slave/recipe_modules/bisect_tester/perf_test_unittest.py
1
3628
#!/usr/bin/env python # Copyright 2015 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. import os import sys import unittest sys.path.insert(0, os.path.join(os.path.dirname(__file__), os.path.pardir)) from bisect_tester i...
bsd-3-clause
9,100,568,784,380,957,000
34.223301
75
0.612183
false
3.512101
true
false
false
oemof/oemof_examples
oemof_examples/tespy/combustion/combustion_chamber_stoich.py
1
1675
# -*- coding: utf-8 -*- from tespy.connections import Connection from tespy.components import Source, Sink, CombustionChamberStoich from tespy.networks import Network from tespy.tools import document_model # %% network # define full fluid list for the network's variable space fluid_list = ['myAir', 'myFuel', 'myFuel_...
gpl-3.0
6,506,855,591,460,377,000
24
78
0.684776
false
2.692926
false
false
false
gem/oq-engine
openquake/hazardlib/gsim/derras_2014.py
1
24829
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2013-2021 GEM Foundation # # OpenQuake 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 Licen...
agpl-3.0
9,052,354,541,802,740,000
63.323834
195
0.675621
false
2.556791
false
false
false
universalcore/unicore-mc
unicoremc/forms.py
1
1720
from django import forms from unicoremc.models import Project, Localisation from django.forms import widgets class ProjectForm(forms.ModelForm): ga_profile_id = forms.CharField(required=False) frontend_custom_domain = forms.CharField( required=False, widget=forms.TextInput(attrs={'class': 'inp...
bsd-2-clause
3,184,981,798,725,955,000
38.090909
79
0.656395
false
4.154589
false
false
false
DonJayamanne/pythonVSCode
src/test/pythonFiles/typeFormatFiles/tryBlocks4.py
1
5005
while True: try: x = int(input("Please enter a number: ")) break # except should be in same column as try: except ValueError: print("Oops! That was no valid number. Try again...") while True: try: x = int(input("Please enter a number: ")) break ...
mit
3,079,788,554,729,662,500
23.067308
71
0.494505
false
4.016854
false
false
false
klen/django-netauth
example_project/main/tests/client.py
1
3566
from django.conf import settings from django.core import signals from django.test.client import Client, WSGIRequest, close_connection, BaseHandler, curry, store_rendered_templates, got_request_exception, TemplateDoesNotExist, signals as test_signals from django.utils.importlib import import_module class TestHandler(B...
lgpl-3.0
7,350,388,896,512,029,000
33.960784
184
0.575715
false
4.418835
true
false
false
mruwnik/magnolia
main.py
1
4416
from qtpy.QtCore import QTimer from qtpy.QtWidgets import QApplication, QMainWindow from magnolia.ui import Ui_MainWindow, signaler, positioners, LineDrawable from magnolia.positioners import ( RingPositioner, ChangingRingPositioner, LowestAvailablePositioner ) from magnolia.front import BudFronter from magnolia.m...
gpl-3.0
-1,312,075,815,238,715,600
32.969231
94
0.628623
false
3.833333
false
false
false
alexbredo/ipfix-receiver
ipfix/protocol.py
1
5962
# Copyright (c) 2014 Alexander Bredo # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the # following conditions are met: # # 1. Redistributions of source code must retain the above # copyright notice, this list of conditions ...
bsd-2-clause
-307,165,267,340,686,800
33.662791
140
0.705971
false
3.468296
false
false
false
erigones/Ludolph
setup.py
1
1753
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2012-2017 Erigones, s. r. o. # All Rights Reserved # # This software is licensed as described in the README.rst and LICENSE # files, which you should have received as part of this distribution. import os import sys try: from setuptools import setup e...
bsd-3-clause
6,087,481,570,084,668,000
24.042857
70
0.654877
false
3.38417
false
false
false
bilbeyt/ITURO-Giant_Flat
flat/announce/migrations/0001_initial.py
1
1270
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime import swampdragon.models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Announce', fields=[ ...
mit
-4,946,116,681,658,328,000
32.421053
114
0.575591
false
4.409722
false
false
false
Royal-Society-of-New-Zealand/NZ-ORCID-Hub
orcid_api/models/peer_review.py
1
15184
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import r...
mit
1,337,462,382,077,442,600
27.487805
402
0.579294
false
4.260382
false
false
false
sequana/sequana
sequana/multiqc/laa.py
1
3718
#!/usr/bin/env python """ MultiQC module to parse output from sequana""" import os import re import json from collections import OrderedDict # prevent boring warning (version 1.0) import logging logging.captureWarnings(True) from multiqc import config from multiqc.modules.base_module import BaseMultiqcModule from mul...
bsd-3-clause
8,702,275,243,279,827,000
27.6
88
0.533082
false
3.692155
false
false
false
gabriel-stan/gestion-tfg
apps/comisiones_evaluacion/utils.py
1
6589
from django.db.models.fields.related import ManyToManyField from authentication.models import Alumno, Profesor from comisiones_evaluacion.models import Comision_Evaluacion, Tribunales from eventos.models import Periodo import simplejson as json import collections def get_params(req): datos = {} if req.method ...
gpl-2.0
-1,889,463,399,687,338,200
32.282828
124
0.61542
false
3.133143
false
false
false
agoose77/hivesystem
dragonfly/logic/dictionary.py
1
3154
import bee from bee.segments import * class dictionary(object): metaguiparams = {"type": "type"} def __new__(cls, type): class dictionary(bee.worker): def place(self): self._dict = {} self.v_dic = self._dict def __setitem__(self, key, value): ...
bsd-2-clause
2,687,920,952,015,724,000
27.160714
88
0.489537
false
4.171958
false
false
false
zorino/bacterialDB-fetcher
db-scripts/ncbi_entrez.py
1
1106
#!/usr/bin/env python # -*- coding: utf-8 -*- # author: maxime déraspe # email: maximilien1er@gmail.com # date: 2017-05-25 # version: 0.01 import sys from time import sleep from Bio import Entrez def bioproject_nuccore(project_id, output): Entrez.email = "microbesdbs@example.com" handle = Entrez.eli...
gpl-3.0
4,621,862,705,866,465,000
19.462963
92
0.600905
false
2.986486
false
false
false
WeCase/WeCase
src/Face.py
1
2457
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 # WeCase -- This model implemented a model for smileies. # Copyright (C) 2013, 2014 The WeCase Developers. # License: GPL v3 or later. import wecasepath as path from WeHack import Singleton from collections import OrderedDict try: from xml.etree.cElementTree ...
gpl-3.0
5,605,356,780,916,404,000
26.920455
74
0.582011
false
4.001629
false
false
false
nikmart/timelineCreator
makeTimeline.py
1
1586
""" Make a "broken" horizontal bar plot, i.e., one with gaps """ import csv import matplotlib.pyplot as plt import sys if len(sys.argv) != 2: print("Missing data file\nUsage: makeTimeline.py [datafile.csv]") quit() else: filename = sys.argv[1] # Say, "the default sans-serif font is ..." plt.rcParams['font...
mit
3,431,607,168,337,299,000
25
77
0.6343
false
2.97561
false
false
false
jolid/script.module.donnie
lib/donnie/iwatchtv.py
1
10690
import urllib2, urllib, sys, os, re, random, copy, time import htmlcleaner from BeautifulSoup import BeautifulSoup, Tag, NavigableString import xbmc,xbmcplugin,xbmcgui,xbmcaddon from t0mm0.common.net import Net from t0mm0.common.addon import Addon from scrapers import CommonScraper net = Net() class IWatchTVServiceSra...
gpl-2.0
-2,974,919,357,533,279,700
30.627219
123
0.635454
false
2.876749
false
false
false
koz4k/dni-pytorch
examples/mnist-cnn/main.py
1
6448
from __future__ import print_function import argparse import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torchvision import datasets, transforms from torch.autograd import Variable import dni # Training settings parser = argparse.ArgumentParser(description='PyTorch MNIS...
mit
693,564,362,714,472,400
37.610778
95
0.589485
false
3.489177
true
false
false
Ripsnorta/pyui2
desktop.py
1
13777
# pyui2 # Copyright (C) 2001-2002 Sean C. Riley # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope that it will be useful, # but ...
lgpl-2.1
-5,839,996,515,447,480,000
31.264637
111
0.594759
false
4.355675
false
false
false
AlfioEmanueleFresta/mrrobot
mrrobot/logger.py
1
2671
from datetime import datetime import json import os import gzip class Logger: def __init__(self): pass def callback(self, character, *args, **kwargs): raise NotImplementedError class Debugger: def callback(self, character, *args, **kwargs): print("Received: character='%s', arg...
gpl-3.0
-1,087,544,672,782,138,200
27.72043
112
0.619244
false
3.804843
false
false
false
mafagafogigante/algorithms-and-data-structures
python/knuth-morris-pratt/kmp.py
1
1258
def kmp_table(p): """ Generates a partial match table (as a Python list) for a pattern. """ table = [0] * (len(p) + 1) i = 2 # The position of table we are computing. c = 0 # The index of the next character of the current candidate. while i < len(p): if p[i - 1] == p[c]: ...
unlicense
5,414,671,833,525,716,000
25.765957
70
0.436407
false
3.242268
false
false
false
skolsuper/pybbm_private_messages
example/pybbm_private_messages/settings.py
1
3239
""" Django settings for pybbm_private_messages project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ ""...
mit
-6,622,194,445,691,050,000
24.912
71
0.686014
false
3.366944
false
false
false
campadrenalin/python-libdeje
deje/historystate.py
1
3255
''' This file is part of python-libdeje. python-libdeje 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 3 of the License, or (at your option) any later version. python-libdeje is distribute...
gpl-3.0
2,613,300,013,940,055,000
30.601942
76
0.632873
false
4.322709
false
false
false
litl/leeroy
setup.py
1
1850
import os import sys from setuptools import setup, find_packages VERSION = "0.3.0" def get_requirements(): basedir = os.path.dirname(__file__) with open(os.path.join(basedir, 'requirements.txt')) as f: return [l.strip() for l in f] setup( name="leeroy", version=VERSION, url="https://gith...
mit
6,778,343,159,504,712,000
32.035714
73
0.616757
false
3.894737
false
false
false
fdr/wal-e
wal_e/pipeline.py
1
7730
"""Primitives to manage and construct pipelines for compression/encryption. """ from gevent import sleep from wal_e import pipebuf from wal_e.exception import UserCritical from wal_e.piper import popen_sp, PIPE PV_BIN = 'pv' GPG_BIN = 'gpg' LZOP_BIN = 'lzop' CAT_BIN = 'cat' def get_upload_pipeline(in_fd, out_fd, r...
bsd-3-clause
5,922,540,675,528,291,000
29.313725
75
0.589651
false
4.107333
false
false
false
davy39/eric
Helpviewer/Passwords/PasswordsDialog.py
1
3538
# -*- coding: utf-8 -*- # Copyright (c) 2009 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog to show all saved logins. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSlot, QSortFilterProxyModel from PyQt5.QtGui import QFont, QFontMetrics from PyQt5.QtW...
gpl-3.0
-7,032,525,692,389,139,000
35.474227
79
0.628321
false
4.478481
false
false
false
ativelkov/murano-api
murano/engine/system/resource_manager.py
1
2101
# 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
-2,348,072,675,992,493,000
33.442623
78
0.727273
false
3.666667
false
false
false
GoogleCloudPlatform/grpc-gcp-python
firestore/examples/end2end/src/RunQuery.py
1
2407
#! /usr/bin/python import sys import os import json import grpc import time import subprocess from google.oauth2 import service_account import google.oauth2.credentials import google.auth.transport.requests import google.auth.transport.grpc from google.firestore.v1beta1 import firestore_pb2 from google.firestore.v1be...
apache-2.0
3,645,948,947,961,254,400
34.925373
140
0.691732
false
3.772727
false
false
false
berkeley-stat159/project-iota
code/utils/conv_response/combine_convo_script.py
1
1193
import matplotlib.pyplot as plt import numpy as np from sys import argv block_convo = np.zeros((137,)) full_convo = np.zeros((137,)) task = 'task001_' run = 'run001_' conv = 'conv00' f_ext = '.txt' block_num = [1,4,5] full_num = range(1,7,1) block_list = [] for i in block_num: block_list.append(task + run + conv...
bsd-3-clause
2,378,820,069,585,021,400
28.825
193
0.675608
false
2.587852
false
false
false
TAMU-CPT/galaxy-tools
tools/fasta/fasta_disambig.py
1
1892
#!/usr/bin/env python import logging import random import argparse import StringIO from Bio import SeqIO, Seq logging.basicConfig(level=logging.INFO) def disambiguate(fasta_file, seed=42, tbl_out=None): records = list(SeqIO.parse(fasta_file, "fasta")) output = StringIO.StringIO() if seed != 0: r...
gpl-3.0
711,223,057,516,034,000
26.42029
85
0.536998
false
3.60381
false
false
false
LINKIWI/linkr
database/link.py
1
8680
import models import util.validation from database import db_txn from linkr import db from util.exception import * @db_txn def add_link(alias, outgoing_url, password=None, user_id=None, require_recaptcha=False): """ Add a new link to the database after performing necessary input validation. :param alias:...
mit
6,447,610,842,651,206,000
33.444444
97
0.674654
false
3.704652
false
false
false
openchange/openchange
script/openchange_user_cleanup.py
2
14738
#!/usr/bin/env python # encoding: utf8 import imaplib import optparse import MySQLdb import memcache import ldb import os import re import subprocess import sys from samba.param import LoadParm from samba.samdb import SamDB from samba.auth import system_session class SambaOCHelper(object): def __init__(self): ...
gpl-3.0
-5,714,950,140,952,910,000
38.82973
95
0.519034
false
3.970097
false
false
false
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractIsekaiFiction.py
1
1737
def extractIsekaiFiction(item): """ 'Isekai Fiction' """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol or frag) or 'preview' in item['title'].lower(): return None if 'Upstart Pastry Chef' in item['tags']: return buildReleaseMessageWithType(item, 'Upstart Pastry C...
bsd-3-clause
5,251,532,720,968,745,000
54.870968
215
0.674177
false
3.020942
false
false
false
volodymyrss/3ML
threeML/plugins/spectrum/pha_spectrum.py
1
35464
import numpy as np import os import warnings import collections import astropy.io.fits as fits from threeML.plugins.spectrum.binned_spectrum import BinnedSpectrumWithDispersion, Quality from threeML.plugins.spectrum.binned_spectrum_set import BinnedSpectrumSet from threeML.plugins.OGIP.pha import PHAII from threeML.p...
bsd-3-clause
-577,589,543,724,967,800
28.528726
137
0.540407
false
4.359435
false
false
false
thumbor/remotecv
remotecv/unique_queue.py
1
2098
from pyres import ResQ from pyres.worker import Worker from remotecv.utils import logger class UniqueQueue(ResQ): def _escape_for_key(self, value): return value.replace(" ", "").replace("\n", "") def _create_unique_key(self, queue, key): return "resque:unique:queue:%s:%s" % (queue, self._esc...
mit
-9,141,874,371,104,191,000
28.549296
86
0.565777
false
3.713274
false
false
false
FabianN/autopkg_recipies
AutoPkg/AutoPkgSourceFinder.py
1
2017
#!/usr/bin/python # # Copyright 2013 Greg Neagle # # 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...
mit
-1,624,115,183,379,169,000
30.030769
78
0.639068
false
3.841905
false
false
false
thequbit/iddt
iddt/cli.py
1
1139
import os import sys import json import time from iddt.dispatcher import Dispatcher import logging logging.basicConfig(filename='iddt.cli.log', level=logging.DEBUG) logger = logging.getLogger('iddt.cli') class CLIDispatcher(Dispatcher): def __init__(self): super(CLIDispatcher, self).__init__() if _...
gpl-3.0
-2,679,496,405,271,800,300
23.76087
76
0.527656
false
3.835017
false
false
false
chrislit/abydos
abydos/phonetic/_norphone.py
1
4185
# Copyright 2014-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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 versio...
gpl-3.0
1,485,869,609,928,183,300
25.411392
79
0.459861
false
3.673415
false
false
false
pedrobaeza/account-closing
__unported__/account_multicurrency_revaluation/__openerp__.py
1
3396
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Vaucher # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
agpl-3.0
-6,072,960,411,794,114,000
31.653846
165
0.595406
false
3.939675
false
false
false
cedar10b/travelapp
weather.py
1
4475
# -*- coding: utf-8 -*-you import urllib2 import json import pandas as pd import numpy as np from sql_functions import * day = 1 month = 8 # find which of the returned 10 forecasts corresponds to next Saturday def find_record(parsed_json, day=day, month=month): for i in range(10): iday = parsed_json['forecast...
mit
-4,448,107,942,469,217,000
33.697674
93
0.591285
false
3.275988
false
false
false
sharad/calibre
src/calibre/gui2/complete2.py
1
18187
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' import weakref...
gpl-3.0
-5,513,565,515,612,933,000
34.795276
127
0.580675
false
3.930826
false
false
false
mssurajkaiga/rhythmbox
plugins/lyrics/DarkLyricsParser.py
1
5812
# -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*- # # Copyright (C) 2008, 2009, 2010 Edgar Luna # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at...
gpl-2.0
6,027,837,532,810,872,000
34.012048
100
0.669133
false
3.163854
false
false
false
PURPORC/remi
examples/simple_app.py
1
1936
""" 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 ...
apache-2.0
1,093,094,003,603,224,700
34.851852
138
0.658574
false
3.73025
false
false
false
wangjeaf/CSSCheckStyle
ckstyle/plugins/FEDMultiLineSpaces.py
1
2170
#/usr/bin/python #encoding=utf-8 from .Base import * from .helper import isCss3PrefixProp class FEDMultiLineSpaces(RuleChecker): '''{ "summary":"CSS多行风格的空格检查", "desc":"多行风格下,CSS的空格检查包括: <ol> <li>选择器的空格</li> <li>属性的空格</li> <li>结尾}的空格<...
bsd-3-clause
-9,140,682,520,756,348,000
30.333333
109
0.541586
false
3.493243
false
false
false
lsaffre/timtools
timtools/modpy/form_mailer.py
1
2444
## Copyright 2007-2008 Luc Saffre ## This file is part of the Lino project. ## Lino is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later versio...
bsd-2-clause
-6,661,208,555,647,989,000
25.565217
71
0.628069
false
3.567883
false
false
false
Itxaka/st2
st2actions/st2actions/runners/remote_script_runner.py
1
10137
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
apache-2.0
-6,781,129,962,680,668,000
47.735577
98
0.556772
false
4.446053
false
false
false
jamslevy/gsoc
app/soc/views/models/club_admin.py
1
4449
#!/usr/bin/python2.5 # # Copyright 2009 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
apache-2.0
-8,973,706,814,613,226,000
32.704545
79
0.681951
false
3.576367
false
false
false
joxer/Baka-No-Voltron
tmp/android.dist/private/renpy/loader.py
1
17102
# Copyright 2004-2015 Tom Rothamel <pytom@bishoujo.us> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, m...
gpl-2.0
5,060,090,384,790,261,000
22.363388
108
0.542977
false
3.98927
true
false
false
AxisPhilly/lobbying.ph-django
lobbyingph/migrations/0010_auto__chg_field_filing_total_exp_indirect_comm__chg_field_filing_total.py
1
10840
# -*- 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): # Changing field 'Filing.total_exp_indirect_comm' db.alter_column('lobbyingph_filing', 'total_exp_indirect_...
mit
3,768,532,456,759,209,500
73.765517
176
0.556642
false
3.436906
false
false
false
macobo/python-grader
grader/wrappers.py
1
4152
""" Wrappers to make writing tests easier """ #from macropy.tracing import macros, require from .core import * from .utils import * from .assertions import * from .decorators import * def io_test(description, writes_list, expected_read): """ Tests whether after writing each element of writes_list to stdin we ...
mit
-6,840,442,333,122,319,000
33.6
103
0.574422
false
4.193939
true
false
false
smk78/thincarb
src/python2.7/THINCARB_py27_original_model/call_THINCARB_py27_from_file.py
1
3618
# call_THINCARB_py27_from_file.py # # (c)2015 S. King # # Example of how to run THINCARB_py27.py using input values stored in an external SPACE-DELIMITED file # Run this module from the Python command shell or IDLE. # # A text file will be created containing all the input data and the computed values from the model # #...
mit
6,249,905,375,526,594,000
37.084211
559
0.718076
false
2.817757
false
false
false
mightymoose/nash
nash/visitor.py
1
2118
class Visitor(object): def visit_identifier(self, identifier): pass def visit_assignment(self, identifier, expression): pass def visit_integer(self, expression_1): pass def visit_float(self, expression_1): pass def visit_add(self, expression_1, expression_2): ...
bsd-3-clause
-8,483,903,321,205,492,000
32.09375
80
0.57271
false
3.893382
false
false
false
astroCV/astroCV
galaxy_detection/training/03_fitstojpg.py
1
2007
#!/usr/bin/env python3 from astroquery.sdss import SDSS from astropy import coordinates as coords from astropy.io import fits import numpy as np from PIL import Image import matplotlib.patches as patches import matplotlib.pyplot as plt from astropy.table import Table,vstack,Column,unique import copy import os.path from...
bsd-2-clause
-6,685,764,888,133,340,000
33.016949
70
0.643249
false
2.88777
false
false
false
nocarryr/python-dispatch
pydispatch/utils.py
1
5919
import sys import weakref from _weakref import ref try: from _weakref import _remove_dead_weakref except ImportError: def _remove_dead_weakref(o, key): del o[key] import types AIO_AVAILABLE = sys.version_info >= (3, 5) if AIO_AVAILABLE: import asyncio else: asyncio = None PY2 = sys.version_inf...
mit
7,077,792,225,005,881,000
30.822581
84
0.587261
false
4.180085
false
false
false
AnhellO/DAS_Sistemas
Ene-Jun-2018/Luis Carielo/Segundo Parcial/reporte.py
1
1498
""" import json class Report: def getTitle(self): return 'Title!' def getDate(self): return '2018-05-23' def getContents(self): return { 'title': self.getTitle(), 'date': self.getDate() } def formatJson(self): return json.dumps(self.getContents...
mit
-406,280,010,846,313,200
21.681818
99
0.514706
false
3.957672
false
false
false
simgunz/anki
qt/aqt/dbcheck.py
1
1471
# Copyright: Ankitects Pty Ltd and contributors # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html from __future__ import annotations from concurrent.futures import Future import aqt from aqt.qt import * from aqt.utils import showText, tooltip def on_progress(mw: aqt.main.AnkiQt) -> Non...
agpl-3.0
822,746,869,428,643,500
25.267857
78
0.598912
false
3.791237
false
false
false
jquacinella/pyIsbnScanner
spreadsheet.py
1
1073
import types import gdata.spreadsheet.service from config import * def get_spreadsheet_client(): ''' Prepares and returns the spreadsheet client.''' spr_client = gdata.spreadsheet.service.SpreadsheetsService() spr_client.ClientLogin(email, password) return spr_client def get_feed_from_spreadsheet(spr...
gpl-2.0
-5,379,212,502,724,104,000
31.545455
89
0.67754
false
3.261398
false
false
false