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
hugolm84/tomahawk-charts
scraper/tomahawk/spiders/rdiospider.py
1
2964
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) Hugo Lindström <hugolm84@gmail.com> # # 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 # (...
gpl-2.0
-8,073,873,393,976,325,000
36.987179
121
0.619305
false
3.5358
false
false
false
kakunbsc/enigma2.2
lib/python/Plugins/SystemPlugins/NFIFlash/flasher.py
2
10609
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.ChoiceBox import ChoiceBox from Screens.Standby import TryQuitMainloop from Components.ActionMap import ActionMap from Components.Sources.StaticText import StaticText from Components.Sources.Progress import Progress from Components...
gpl-2.0
8,285,512,115,970,571,000
39.96139
244
0.685456
false
3.062644
false
false
false
feilaoda/FlickBoard
project/lib/filter.py
1
7291
# -*- coding: utf-8 -*- from datetime import datetime import urllib2 import re import urllib, hashlib import string from itertools import imap def none2string(value): if value is None: return '' return value def video(value): if value is None: return None videos = re.findall('(htt...
mit
-399,325,461,132,370,750
35.09901
295
0.535592
false
3.40224
false
false
false
lidaobing/itcc
itcc/molecule/utils.py
1
5019
# $Id$ import sys import os.path import math from itcc.molecule import read, write from itcc.molecule.tools import neighbours, is_pyramid from itcc.molecule import relalist try: sorted except: from itcc.core.tools import sorted_ as sorted def mirrormol(): if len(sys.argv) != 2: sys.stderr.write('U...
gpl-3.0
6,977,058,385,700,711,000
28.350877
83
0.546523
false
3.423602
false
false
false
wmfs/chimp
src/calc/TimestampColumn.py
1
3205
''' Created on 4 Mar 2012 @author: Tim.Needham ''' import cs import chimpsql import chimpspec class TimestampColumn: ''' classdocs ''' def __init__(self, timestampColumnTag): self.type = "timestampColumn" self.taskOrder = 2 self.outputColumn = cs.grabAttribute(timestampColumnT...
gpl-3.0
434,596,775,635,696,060
41.746667
178
0.5922
false
4.140827
false
false
false
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/route_filter.py
1
2621
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-4,254,058,854,959,345,700
36.442857
91
0.592522
false
4.095313
false
false
false
lukechurch/coda
csv_conversion/internal2csv.py
1
5252
''' Copyright (c) 2017 Coda authors 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, publish, distribute, s...
mit
1,804,412,583,267,640,300
40.039063
142
0.614813
false
4.297872
false
false
false
hammerlab/isovar
isovar/variant_orf_helpers.py
1
5017
# 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 th...
apache-2.0
-7,773,328,974,950,547,000
38.503937
86
0.651983
false
4.447695
false
false
false
vfine/webplatform
pmModules/users.py
1
4422
# users.py # Display user info # $Id: users.py 13454 2012-11-08 17:54:19Z fine $ # import re, os from datetime import datetime, timedelta import pmConfig.pmConfig as config import pmUtils.pmUtils as utils from pmCore.pmModule import pmModule from pmTaskBuffer.pmTaskBuffer import pmtaskbuffer as pmt from operator im...
lgpl-3.0
3,956,176,911,021,721,000
39.2
104
0.504749
false
3.566129
false
false
false
vulogov/zap_proxy
etc/python/CacheDriver.py
1
1608
__version__ = 'v0.1.0' import time class CacheDriver: def __init__(self, creator): self.creator = creator self.ready = False self.name = "" def set_cache_args(self, args): self.args = args def set(self, name, key, value): if not self.ready or self.name != name: ...
gpl-3.0
-9,193,560,970,287,625,000
26.271186
59
0.521144
false
3.748252
false
false
false
blueshed/blueshed-micro
blueshed/micro/web/rpc_handler.py
1
4761
from pkg_resources import resource_filename # @UnresolvedImport from tornado import web from tornado.escape import json_decode from tornado.web import asynchronous, RequestHandler import tornado.concurrent from blueshed.micro.utils.json_utils import dumps from blueshed.micro.web.context_mixin import ContextMixin from ...
mit
-7,662,630,218,613,734,000
37.088
102
0.572989
false
4.392066
false
false
false
gh4w/some
web/diego/pronostix/views.py
1
2629
from datetime import datetime from django.utils import timezone from django.views import generic from django.contrib.auth.decorators import login_required from django.shortcuts import render, get_object_or_404, HttpResponseRedirect from django.urls import reverse import pronostix.models as models import pronostix.forms...
mit
533,804,269,170,800,700
36.028169
106
0.692278
false
3.340534
false
false
false
schnitzlein/weatherstation
obsolete/Display.py
1
1636
import os, syslog import pygame import logging class PyLcd : screen = None; colourBlack = (0, 0, 0) def __init__(self): "Ininitializes a new pygame screen using the framebuffer" # Based on "Python GUI in Linux frame buffer" # http://www.karoltomala.com/blog/?p=679 disp_no =...
mit
4,967,346,822,978,412,000
34.565217
132
0.586797
false
3.867612
false
false
false
dgilland/alchy
alchy/_compat.py
1
3201
# -*- coding: utf-8 -*- # flake8: noqa # pylint: skip-file """Python 2/3 compatibility Some py2/py3 compatibility support based on a stripped down version of six so we don't have to depend on a specific version of it. Borrowed from https://github.com/mitsuhiko/flask/blob/master/flask/_compat.py ""...
mit
-7,518,559,914,268,568,000
27.327434
78
0.630116
false
3.824373
false
false
false
stephantul/somber
somber/plsom.py
1
5148
"""The PLSOM.""" import logging from typing import Callable, Dict, Optional, Tuple import numpy as np from tqdm import tqdm from somber.som import BaseSom from somber.components.initializers import range_initialization from somber.components.utilities import Scaler logger = logging.getLogger(__name__) class PLSom...
mit
6,037,134,522,918,761,000
37.41791
88
0.612277
false
4.148268
false
false
false
skggm/skggm
examples/trace_plot_example.py
1
3138
""" Visualize Regularization Path ============================= Plot the edge level coefficients (inverse covariance entries) as a function of the regularization parameter. """ import sys import numpy as np from sklearn.datasets import make_sparse_spd_matrix sys.path.append("..") from inverse_covariance import Quic...
mit
-7,484,878,322,205,193,000
29.764706
84
0.646272
false
3.131737
false
false
false
takaakiaoki/PyFoam
unittests/Basics/TemplateFile.py
1
6744
import unittest from PyFoam.Basics.TemplateFile import TemplateFile,TemplateFileOldFormat,PyratempPreprocessor from PyFoam.Error import FatalErrorPyFoamException from tempfile import mktemp from PyFoam.ThirdParty.six import PY3 import sys theSuite=unittest.TestSuite() template1="""$$ y = 3+x This should be $x+y$...
gpl-2.0
-8,537,140,287,998,110,000
36.259669
125
0.586447
false
2.898152
true
false
false
danakj/chromium
mojo/public/tools/bindings/pylib/mojom/parse/translate.py
3
9030
# Copyright 2014 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. """Translates parse tree to Mojom IR.""" import re from . import ast def _DuplicateName(values): """Returns the 'name' of the first entry in |values| w...
bsd-3-clause
-7,084,876,562,291,309,000
37.262712
80
0.58206
false
3.878866
false
false
false
DavidAndreev/indico
indico/web/forms/jinja_helpers.py
1
4705
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
9,104,690,325,091,572,000
43.386792
116
0.663549
false
4.28897
false
false
false
dora40323106/2014cpa_final_project
std/a40323142.py
1
8795
#@+leo-ver=5-thin #@+node:lee.20141224110313.61: * @file example2.py #@@language python #@@tabwidth -4 import cherrypy import random from std.asciisymbol import asciiImage #@+others #@+node:lee.20141223114246.41: ** class Application class Application(object): #@+others #@+node:lee.20141223114246.42: *3* def i...
gpl-3.0
-2,628,410,771,341,456,400
31.325103
236
0.493698
false
2.662712
false
false
false
FluxIX/pyShellScript
src/pyshell/environment.py
1
7462
from .tee_output_file import TeeOutputFile class Environment( object ): class CloneOptions( object ): InheritVariables = "inherit_vars" InheritStreams = "inherit_streams" MakeParentLink = "parent_link" def __init__( self, starting_directory = None, parent = None, starting_variables = N...
lgpl-3.0
-8,011,103,368,289,027,000
27.922481
139
0.585902
false
4.614719
false
false
false
Iepoev/vsc-mympirun
lib/vsc/mympirun/mpi/mpi.py
1
41888
# # Copyright 2011-2016 Ghent University # # This file is part of vsc-mympirun, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # the Flemish Research Foundat...
gpl-2.0
-5,106,039,025,082,344,000
40.228346
123
0.597999
false
3.732003
false
false
false
setsulla/owanimo
lib/puyo/util/log.py
1
2199
import os import logging import logging.config import define from system import FILE as f from system import DIRECTORY as d CONF_FILE = "logging.conf" BASE_NAME = "Puyopuyo.Owanimo" BASE_LEVEL = logging.DEBUG BASE_FORMAT = '%(processName)s.%(name)s ( PID %(process)d ) : %(asctime)s - %(levelname)s - %(message)s' c...
mit
-1,362,475,733,673,479,400
25.493976
104
0.600728
false
3.864675
false
false
false
CelineBoudier/rapid-router
game/tests/test_scoreboard.py
1
14455
# -*- coding: utf-8 -*- # Code for Life # # Copyright (C) 2016, Ocado Innovation Limited # # 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 o...
agpl-3.0
6,419,585,294,995,314,000
41.090379
122
0.605805
false
3.750844
true
false
false
openhumanoids/oh-distro
software/models/common_components/multisense_sl/mit_modifications/multisense_sl.py
1
1937
import os drc_base_path = os.getenv("DRC_BASE") import sys sys.path.append(os.path.join(drc_base_path, "software", "models", "model_transformation")) import mitUrdfUtils as mit from jointNameMap import jointNameMap from lxml import etree import tempfile from glob import glob os.chdir(os....
bsd-3-clause
-8,525,078,679,496,667,000
29.265625
72
0.737223
false
2.861152
false
false
false
b1-systems/kiwi
kiwi/tasks/result_bundle.py
1
7145
# Copyright (c) 2015 SUSE Linux GmbH. All rights reserved. # # This file is part of kiwi. # # kiwi 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 la...
gpl-3.0
1,665,385,439,122,019,300
39.596591
92
0.56795
false
4.716172
false
false
false
jeonghoonkang/BerePi
apps/lcd_berepi/16x2_LCD_RGB.py
1
6266
#!/usr/bin/python #-*- coding: utf-8 -*- # Author : Matt Hawkins # : ipmstyle, https://github.com/ipmstyle # : jeonghoonkang, https://github.com/jeonghoonkang # The wiring for the LCD is as follows: # 1 : GND # 2 : 5V # 3 : Contrast (0-5V)* # 4 : RS (Register Select) # 5 : R/W (Read Write) - GROUND...
bsd-2-clause
-9,210,237,829,379,006,000
22.207407
73
0.646345
false
2.640539
false
false
false
BollMose/sensor
pms7003.py
1
1949
#encoding=utf-8 import os import time import serial import sqlite3 from struct import * def open_device(dev): return serial.Serial(dev, baudrate=9600, timeout=2.0) def close_device(ser): ser.close() def read_one_data(ser): rv = b'' while True: ch1 = ser.read() if ch1 == b'\x42': ...
apache-2.0
3,337,298,386,798,929,000
27.661765
87
0.421755
false
3.069291
false
false
false
googleapis/googleapis-gen
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/enums/types/search_engine_results_page_type.py
1
1203
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
2,275,997,382,339,844,900
29.846154
74
0.690773
false
3.868167
false
false
false
grbd/GBD.Build.BlackJack
blackjack/cmake/storage/SetList.py
1
1558
from blackjack.cmake.ScriptBase import ScriptBase class SetList(ScriptBase): """ Represents a collection of source files to be passed to a Target """ def __init__(self, name: str, srcs: [] = None, parentscope: bool = False): super().__init__() self._Name = None self.Name = na...
apache-2.0
333,099,618,787,520,600
27.290909
78
0.548843
false
3.919395
false
false
false
tgerdes/toolbot
toolbot/adapter/shell.py
1
1382
import asyncio import sys from toolbot.adapter import Adapter from toolbot.message import TextMessage class ShellAdapter(Adapter): def __init__(self, bot): super().__init__(bot) def send(self, envelope, *strings): for string in strings: # TODO: async print? print("\x...
mit
-5,638,943,008,233,438,000
24.592593
75
0.552822
false
3.796703
false
false
false
HyperloopTeam/FullOpenMDAO
lib/python2.7/site-packages/Pyevolve-0.6-py2.7.egg/pyevolve/Crossovers.py
1
21075
""" :mod:`Crossovers` -- crossover methods module ===================================================================== In this module we have the genetic operators of crossover (or recombination) for each chromosome representation. """ from random import randint as rand_randint, choice as rand_choice from random i...
gpl-2.0
7,506,001,929,453,182,000
25.881378
131
0.584437
false
3.024975
false
false
false
stevearc/stiny
fabfile.py
1
5084
import os import fabric.api as fab import jinja2 import json from fabric.context_managers import path from fabric.decorators import roles from pyramid.settings import aslist from stiny.gutil import normalize_email fab.env.roledefs = { 'door': ['pi@192.168.86.200'], 'web': ['stevearc@stevearc.com'], } def _...
mit
5,882,313,111,331,927,000
31.8
78
0.622148
false
3.037037
false
false
false
divyekapoor/grepurls
.ycm_extra_conf.py
1
4740
# Generated by YCM Generator at 2016-02-07 13:10:00.249398 # This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publis...
mit
-842,317,956,061,606,100
32.617021
79
0.704008
false
3.779904
false
false
false
PetterKun/biblioteca
principal/views.py
1
8531
#encoding:utf-8 from principal.models import Obra, Video from django.contrib.auth.models import User from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.core.mail import EmailMessage from dja...
apache-2.0
-5,421,392,188,126,946,000
39.794258
94
0.535484
false
4.216123
false
false
false
ksachs/invenio
modules/bibauthorid/lib/bibauthorid_templates.py
1
142829
## -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011 CERN. # # Invenio 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 late...
gpl-2.0
261,724,183,691,193,570
52.27154
267
0.493982
false
4.021654
false
false
false
iw3hxn/LibrERP
mrp_bom_history/wizard/bom_add_note.py
1
1132
from mail.mail_message import truncate_text from openerp.osv import orm, fields from tools.translate import _ class bom_add_note(orm.TransientModel): """Adds a new note to the case.""" _name = 'bom.add.note' _description = "Add Internal Note" _columns = { 'body': fields.text('Note Body', requ...
agpl-3.0
-8,780,630,179,386,807,000
32.294118
78
0.576855
false
3.811448
false
false
false
glennguy/plugin.video.9now
resources/lib/menu.py
1
4419
import xbmcgui import xbmcplugin import comm import config import sys import urlparse import urllib from aussieaddonscommon import utils _url = sys.argv[0] _handle = int(sys.argv[1]) def list_categories(): """ Make initial list """ try: listing = [] categories = config.CATEGORIES ...
gpl-3.0
-3,547,577,061,269,654,000
34.926829
78
0.560308
false
4.02459
false
false
false
vrde/pandora
pandora/migrations/0001_initial.py
1
2086
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Item' db.create_table(u'pandora_item', ( (u'i...
mit
2,874,409,250,318,841,300
46.431818
108
0.584372
false
3.627826
false
false
false
acil-bwh/SlicerCIP
Scripted/attic/CIP_GetImage/CIP_GetImage.py
1
28162
"""ACIL_GetImage is a module developed for the internal use of the Applied Chest Imaging Laboratory to download cases stored in MAD server via ssh. It works both in Unix/Mac/Windows, and it uses an internal SSH key created specifically for this purpose, so it doesn't need that the user has an authorized SSH key install...
bsd-3-clause
-6,395,616,928,657,452,000
47.471601
331
0.586642
false
4.448973
false
false
false
mvtuong/mysite
v1/blog/models.py
1
2011
from django.db import models from django.db.models import permalink # Create your models here. class Blog(models.Model): title = models.CharField(max_length=200) slug = models.SlugField(unique=True) content = models.TextField(default='', blank=True) description = models.TextField(default='', blank=True...
apache-2.0
2,280,699,659,320,023,600
31.451613
69
0.661363
false
3.485269
false
false
false
MarilyGunnersLab/MCCE
mcce_stable/bin/pdbdict2tpl.py
1
1624
#!/usr/bin/python2 import sys if __name__ == '__main__': if len(sys.argv) < 2: print 'Usage:' print ' ', sys.argv[0], 'hicup_pdbdict_file' sys.exit(0) fin = open(sys.argv[1]).readlines() for i_line in range(0, len(fin)): if (fin[i_line][:7] == 'RESIDUE'): res...
mit
-6,502,614,572,368,778,000
38.609756
108
0.454433
false
3.064151
false
false
false
Balandat/cont_no_regret
old_code/testing.py
1
3136
''' Created on Feb 24, 2015 @author: balandat ''' import numpy as np from scipy.integrate import quad import matplotlib.pyplot as plt from ContNoRegret.Domains import S from ContNoRegret.Distributions import Uniform from ContNoRegret.utils import create_random_Sigmas from ContNoRegret.LossFunctions import GaussianLos...
mit
-3,819,883,864,521,728,500
31.677083
132
0.552296
false
2.200702
false
false
false
maxprais/psoriassist
psoriassist/models.py
1
4403
from __future__ import unicode_literals from django.db import models from django.contrib.auth.models import User from datetime import datetime class AppUser(models.Model): user = models.OneToOneField(User) age = models.IntegerField(null=True) birthday = models.DateField(null=True) profile_pi...
mit
8,355,907,875,308,252,000
30.858209
82
0.67454
false
3.712479
false
false
false
rec/grit
grit/command/Version.py
1
1631
from __future__ import absolute_import, division, print_function, unicode_literals import os import re import semver VERSION = re.compile(r'\d+\.\d+\.\d+(?:-\w\d*)') from grit.Args import ARGS from grit import ChangeLog from grit import CommandList from grit import File from grit import Git from grit import GitRoot ...
artistic-2.0
-4,114,299,311,459,008,000
29.203704
82
0.676272
false
3.775463
false
false
false
lukedeo/cross-domain
data_analysis.py
1
7237
""" Functions to get insight into the data """ import sys import pickle # # Categories anaylisis of all the amazon data # # Number of products: 2498330 # Multilabel elements: 888864 # Percentage of products with a given category # ============================================ # Collectibles: 0.000273 # Music: 0.024316...
gpl-2.0
1,212,668,472,962,764,800
28.538776
105
0.551057
false
3.713186
false
false
false
ntamas/python-selecta
selecta/renderers.py
1
2075
"""Renderers convert model objects into a visual representation that can be shown on the UI.""" class Renderer(object): def attach_to_terminal(self, terminal): """Attaches the renderer to the given terminal.""" pass def render(self, obj, selected=False): """Renders the given object in...
mit
-8,372,224,419,947,170,000
36.053571
79
0.58988
false
4.313929
false
false
false
krishauser/Klampt
Python/klampt/control/blocks/trajectory_tracking.py
1
2744
from ..controller import ControllerBlock,RobotControllerIO from klampt.model import trajectory class TrajectoryPositionController(ControllerBlock): """A (robot) controller that takes in a trajectory and outputs the position along the trajectory. If type is a 2-tuple, this will also output the derivative ...
bsd-3-clause
4,214,445,663,503,191,600
30.906977
106
0.626093
false
3.982583
false
false
false
ColmFitz369/docker-repo
python-flask/my_application/app.py
1
1686
from flask import Flask from flask import request import os, sys app = Flask(__name__) @app.route('/') def index(): return 'Index Page' @app.route('/hello') def hello(): <<<<<<< HEAD return 'Hello World' @app.route('/user/<username>') def show_user_profile(username): # show the user profile for that user return 'User %...
mit
-7,064,585,944,802,551,000
24.545455
74
0.666074
false
2.84317
false
false
false
Zerknechterer/pyload
module/plugins/internal/XFSAccount.py
1
5969
# -*- coding: utf-8 -*- import re import time import urlparse from module.plugins.internal.Account import Account from module.plugins.internal.SimpleHoster import parseHtmlForm, set_cookies class XFSAccount(Account): __name__ = "XFSAccount" __type__ = "account" __version__ = "0.38" __descript...
gpl-3.0
6,233,733,894,626,523,000
31.977901
119
0.495895
false
3.924392
false
false
false
arizvisa/syringe
template/local/pif.py
1
13321
""" Ripped from https://www.smsoft.ru/en/pifdoc.htm """ import ptypes from ptypes import * class Heading(pstruct.type): def __Next_section_offset(self): return dyn.pointer(Section, pint.uint16_t) def __Section_data_offset(self): def _object_(_, self=self): length = self['Length']....
bsd-2-clause
2,997,885,994,163,634,000
30.196721
100
0.507995
false
3.411268
false
false
false
musicbrainz/picard
picard/ui/tagsfromfilenames.py
1
6502
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # # Copyright (C) 2006-2007 Lukáš Lalinský # Copyright (C) 2009, 2014, 2019-2020 Philipp Wolfer # Copyright (C) 2012-2013 Michael Wiencek # Copyright (C) 2014, 2017 Sophist-UK # Copyright (C) 2016-2017 Sambhav Kothari # Copyright (C) 2017 Ville ...
gpl-2.0
2,771,010,965,814,264,000
39.111111
113
0.612188
false
3.867857
false
false
false
merc-devel/merc
merc/features/rfc1459/privmsg.py
1
2517
from merc import channel from merc import errors from merc import feature from merc import message from merc import mode class PrivmsgFeature(feature.Feature): NAME = __name__ install = PrivmsgFeature.install MAX_TARGETS = 4 class _Privmsg(message.Command): MIN_ARITY = 2 FORCE_TRAILING = True def __ini...
mit
-7,296,159,504,572,538,000
25.21875
77
0.684148
false
3.329365
false
false
false
denizs/torchUp
torchup/agents/DoubleDQN.py
1
6576
import torch import torch.optim as optim import torch.nn as nn from torchup.agents.DQN import DQNAgent from torchup.utils.utils import Transition from torchup.base.models import Variable class DoubleDQNAgent(DQNAgent): ''' The DoubleDQNAgent is an implemenation of the Deep Reinforcement Agent outlined in ...
bsd-2-clause
-2,724,416,356,105,284,600
48.074627
98
0.648723
false
3.706877
false
false
false
otsaloma/gaupol
gaupol/attrdict.py
1
2782
# -*- coding: utf-8 -*- # Copyright (C) 2006 Osmo Salomaa # # 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 pr...
gpl-3.0
207,437,394,888,405,980
36.594595
75
0.659238
false
4.422893
false
false
false
timsavage/odin
odin/resources.py
1
18168
# -*- coding: utf-8 -*- import copy import six from odin import exceptions, registration from odin.exceptions import ValidationError from odin.fields import NOT_PROVIDED from odin.utils import cached_property, field_iter_items DEFAULT_TYPE_FIELD = '$' META_OPTION_NAMES = ( 'name', 'namespace', 'name_space', 'verb...
bsd-3-clause
-4,006,824,706,083,677,700
34.83432
119
0.59269
false
4.27583
false
false
false
swistaq/aoc2016
src/day10.py
1
2065
from __future__ import print_function import re # id low high # {botno : ((bot|output, id), (bot|output, id))} bots = {} # (value, botno) vals = [] # {output_id : [values]} outputs = {} # {botno : [values]} states = {} def parse(line): global bots, vals, outputs if line.startswith(...
gpl-3.0
-7,242,079,772,893,059,000
31.777778
114
0.543826
false
3.20155
false
false
false
tjssmy/CuviewerPy
vtkTests/PyQtInter.py
1
1292
#!/usr/bin/env python import sys import vtk from PyQt4 import QtCore, QtGui from vtk.qt4.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor class MainWindow(QtGui.QMainWindow): def __init__(self, parent=None): QtGui.QMainWindow.__init__(self, parent) self.frame = QtGui.QFrame() ...
mit
-2,950,600,264,807,827,000
23.865385
73
0.641641
false
3.702006
false
false
false
HiSPARC/station-software
user/python/Lib/lib-tk/ttk.py
2
56173
"""Ttk wrapper. This module provides classes to allow using Tk themed widget set. Ttk is based on a revised and enhanced version of TIP #48 (http://tip.tcl.tk/48) specified style engine. Its basic idea is to separate, to the extent possible, the code implementing a widget's behavior from the code implementing its ap...
gpl-3.0
4,497,026,299,902,996,000
33.461963
93
0.607747
false
4.195146
false
false
false
randall-frank/heresy
card_objects.py
1
23728
# # T.I.M.E Stories card editor # Copyright (C) 2017 Randall Frank # See LICENSE for details # import base64 import os import os.path from PyQt5 import QtXml from PyQt5 import QtGui from PyQt5 import QtCore from PyQt5 import QtWidgets # these are the core objects that represent a deck of cards to the editor class B...
mit
1,640,969,313,959,279,400
32.001391
112
0.553355
false
3.569731
false
false
false
nmardosz/freedb-to-json-parser
freedbparser.py
1
7260
import os import sys import xml.sax.handler import xml.sax import codecs import re import time import json reload(sys) sys.setdefaultencoding('utf8') releaseCounter = 0 if ( __name__ == "__main__"): trackslength = [] #trackoffsets = [] disclength = [] prevcombinenum = '' trackcombinenum = '' par...
mit
-9,202,248,683,548,465,000
36.61658
193
0.612672
false
2.998761
false
false
false
dnil/OGTtoPED
OGTtoPED.py
1
3605
import argparse import sys from openpyxl import load_workbook import config from sample import Sample from family import update_family, family_ped # CLI parser = argparse.ArgumentParser(description="Convert OGT xlsx to PED file") parser.add_argument("orderform", help="OGT order form with sample ID, status and...
artistic-2.0
893,453,471,902,956,800
27.84
79
0.553398
false
4.055118
true
false
false
ryanmiao/libvirt-test-API
utils/xml_parser.py
1
7336
#!/usr/bin/env python # # xml_parser.py: Parse XML document, the result is a python dict. # # Copyright (C) 2010-2012 Red Hat, Inc. # # libvirt-test-API 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 v...
gpl-2.0
4,921,790,545,853,446,000
39.530387
84
0.466876
false
4.640101
false
false
false
ksmit799/Toontown-Source
toontown/cogdominium/CogdoMazeGameObjects.py
1
10289
from pandac.PandaModules import CollisionSphere, CollisionTube, CollisionNode from pandac.PandaModules import NodePath, BitMask32 from pandac.PandaModules import Point3, Point4, WaitInterval, Vec3, Vec4 from direct.interval.IntervalGlobal import LerpScaleInterval, LerpColorScaleInterval, LerpPosInterval, LerpFunc from ...
mit
8,465,987,789,883,547,000
39.507874
919
0.666731
false
3.272583
false
false
false
chromium/chromium
ui/ozone/generate_constructor_list.py
5
5576
#!/usr/bin/env python # Copyright 2014 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. """Code generator for PlatformObject<> constructor list. This script takes as arguments a list of platform names as a text file and a ...
bsd-3-clause
-1,612,006,540,855,881,200
29.140541
76
0.65477
false
3.869535
false
false
false
jgibbons-cp/sva_scan_examples
app/sva_scan_examples/config_helper.py
1
1913
import os import sys class ConfigHelper(): """ Manage all configuration information for the application """ def __init__(self): TRUE = "True" FALSE = "False" ERROR = 1 self.halo_key = os.getenv("HALO_API_KEY") self.halo_secret = os.getenv("HALO_API_SECRET_K...
bsd-2-clause
6,427,597,855,864,617,000
35.788462
79
0.578672
false
3.765748
false
false
false
emakis/erpnext
erpnext/controllers/taxes_and_totals.py
1
24666
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import json import frappe, erpnext from frappe import _, scrub from frappe.utils import cint, flt, cstr, fmt_money, round_based_on_smallest_currency_fra...
gpl-3.0
2,259,971,950,055,743,200
39.043831
148
0.689167
false
2.987284
false
false
false
nismod/energy_demand
energy_demand/plotting/fig_p2_weather_val.py
1
14554
"""Fig 2 figure """ import numpy as np import matplotlib.pyplot as plt #from scipy.stats import mstats import pandas as pd import geopandas as gpd from scipy import stats from shapely.geometry import Point import matplotlib.pyplot as plt from collections import defaultdict from matplotlib.colors import Normalize from ...
mit
2,933,761,730,508,633,600
32.457471
152
0.589735
false
3.359649
false
false
false
sivertkh/gtrackcore
gtrackcore/track_operations/raw_operations/Shift.py
1
4473
import numpy as np def shift(starts, ends, regionSize, strands=None, shiftLength=None, useFraction=False, useStrands=True, treatMissingAsNegative=False): """ Shift elements in a track a give nr of BP. :param starts: numpy array. Starts :param ends: numpy array. Ends :param regionSize: I...
gpl-3.0
2,891,743,441,771,215,000
36.588235
77
0.663537
false
4.157063
false
false
false
owtf/owtf
owtf/shell/interactive.py
1
6596
""" owtf.shell.interactive ~~~~~~~~~~~~~~~~~~~~~~ The shell module allows running arbitrary shell commands and is critical to the framework in order to run third party tools. The interactive shell module allows non-blocking interaction with subprocesses running tools or remote connections (i.e. shells) """ import logg...
bsd-3-clause
6,571,136,281,010,158,000
34.085106
108
0.583535
false
4.468835
false
false
false
danaukes/popupcad
popupcad/filetypes/genericshapebase.py
2
15733
# -*- coding: utf-8 -*- """ Written by Daniel M. Aukes and CONTRIBUTORS Email: danaukes<at>asu.edu. Please see LICENSE for full license. """ from popupcad.geometry.vertex import ShapeVertex import numpy import qt.QtCore as qc import qt.QtGui as qg from dev_tools.enum import enum import popupcad class ShapeInvalid...
mit
9,166,630,827,800,457,000
35.590698
253
0.59372
false
3.885651
true
false
false
basilfx/BierApp-Server
bierapp/core/decorators.py
1
1740
from django.shortcuts import get_object_or_404 from django.http import Http404 from functools import wraps from bierapp.accounts.models import User from bierapp.core.models import Transaction, ProductGroup, Product, \ TransactionTemplate from bierapp.utils.types import get_int def resolve_user(func): @wraps...
gpl-3.0
2,630,288,681,782,983,000
28
78
0.644828
false
3.632568
false
false
false
aringh/odl
odl/util/vectorization.py
1
8540
# Copyright 2014-2017 The ODL contributors # # This file is part of ODL. # # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at https://mozilla.org/MPL/2.0/. """Utilities for internal functionality con...
mpl-2.0
-1,299,324,578,800,178,000
28.040816
79
0.559264
false
4.059914
false
false
false
euphorie/Euphorie
src/euphorie/client/authentication.py
1
9395
""" Authentication -------------- User account plugins and authentication. """ from ..content.api.authentication import authenticate_token as authenticate_cms_token from . import model from .interfaces import IClientSkinLayer from AccessControl import ClassSecurityInfo from Acquisition import aq_parent from App.class...
gpl-2.0
5,777,297,908,647,784,000
30.955782
97
0.604896
false
4.501677
false
false
false
larryweya/dry-pyramid
drypyramid/tests.py
1
20737
import unittest import colander from webob.multidict import MultiDict from webtest import TestApp from pyramid import testing from pyramid.httpexceptions import ( HTTPNotFound, HTTPFound ) from sqlalchemy import ( create_engine, Column, Integer, String, Table, ForeignKey, ) from sqlalch...
mit
-7,523,207,633,318,657,000
33.619366
87
0.589815
false
4.14989
true
false
false
6aika/issue-reporting
issues/models/applications.py
1
1241
from django.db import models from django.utils.crypto import get_random_string from issues.excs import InvalidAppError DEFAULT_APP_DATA = { # Used by `.autodetermine()` and the migration 'identifier': 'default', 'name': 'Default', 'key': '' } def generate_api_key(): return get_random_string(30) c...
mit
6,477,491,313,848,653,000
30.025
108
0.654311
false
3.854037
false
false
false
dajobe/SoCo
soco/ms_data_structures.py
1
21067
# -*- coding: utf-8 -*- # pylint: disable = star-args, too-many-arguments, unsupported-membership-test # pylint: disable = not-an-iterable # Disable while we have Python 2.x compatability # pylint: disable=useless-object-inheritance """This module contains all the data structures for music service plugins.""" # This...
mit
7,402,956,122,372,239,000
37.164855
79
0.584896
false
3.876886
false
false
false
kuke/models
fluid/PaddleRec/word2vec/preprocess.py
1
5840
# -*- coding: utf-8 -* import os import random import re import six import argparse import io import math prog = re.compile("[^a-z ]", flags=0) def parse_args(): parser = argparse.ArgumentParser( description="Paddle Fluid word2 vector preprocess") parser.add_argument( '--build_dict_corpus_dir'...
apache-2.0
-1,929,002,871,442,135,600
30.229947
134
0.52774
false
3.834537
false
false
false
sigma-random/Triton
examples/callback_after.py
1
8375
# Output # # $ ./triton ./examples/callback_after.py ./samples/crackmes/crackme_xor a # 0x40056d: push rbp # -> #0 = (bvsub (_ bv140735022953896 64) (_ bv8 64)) ; Aligns stack # -> #1 = (_ bv140735022953936 64) # -> #2 = (_ bv4195694 64) ; RIP # # 0x40056e: mov rbp, rsp # -> #3 = (...
lgpl-3.0
4,867,103,924,392,754,000
47.410405
200
0.469373
false
2.530211
false
false
false
lelit/tailor
vcpx/tests/svn.py
1
13407
# -*- mode: python; coding: utf-8 -*- # :Progetto: vcpx -- svn specific tests # :Creato: gio 11 nov 2004 19:09:06 CET # :Autore: Lele Gaifax <lele@nautilus.homeip.net> # :Licenza: GNU General Public License # from unittest import TestCase from datetime import datetime from vcpx.repository.svn import changesets_fr...
gpl-3.0
3,799,975,612,509,294,000
36.54902
85
0.596121
false
3.578484
true
false
false
peterhinch/micropython-epaper
epaper.py
1
19329
# epaper.py main module for Embedded Artists' 2.7 inch E-paper Display. # Peter Hinch # version 0.9 # 17 Jun 2018 Adapted for VFS mount/unmount. # 18 Mar 2016 Adafruit module and fast (partial) updates. # 2 Mar 2016 Power control support removed. Support for fonts as persistent byte code # 29th Jan 2016 Monospaced font...
apache-2.0
1,606,973,317,774,428,700
37.735471
110
0.496197
false
3.690854
false
false
false
ecreall/nova-ideo
novaideo/utilities/alerts_utility.py
1
9428
# -*- coding: utf8 -*- # Copyright (c) 2015 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi import json import requests import re from persistent.list import PersistentList # from urllib.request import urlopen from pyramid.threadlocal im...
agpl-3.0
-1,736,134,962,268,818,200
34.310861
101
0.559504
false
4.136902
false
false
false
zmarvel/playground
project6-hy/tests.py
1
4016
from hashtable import Hashtable import time ########################### ########## Tests ########## ########################### some_words = [u'lewes', # => 5 u'mistranscribe', # => 13 u'outbleed', # => 8 u'abstemiously', # => 12 u'antifeuda...
mit
9,035,777,160,325,980,000
33.324786
82
0.534363
false
3.753271
true
false
false
joshua-cogliati-inl/raven
rook/XMLDiff.py
1
19356
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
3,820,883,646,590,924,000
39.493724
100
0.606685
false
3.691076
true
false
false
openatv/enigma2
lib/python/Plugins/Extensions/FileCommander/addons/dmnapi.py
3
1533
#!/usr/bin/python -u # -*- coding: UTF-8 -*- # napiprojekt.pl API is used with napiproject administration consent import re import os import os.path import sys import dmnapim def get_all(file, supplement): rex = re.compile('.*\\.%s$' % file[-3:], re.I) (dir, fname) = os.path.split(file) for f in os.listdir(dir):...
gpl-2.0
-2,545,383,978,789,383,700
26.872727
163
0.621657
false
2.410377
false
false
false
itsvetkov/pyqtgraph
pyqtgraph/debug.py
1
36061
# -*- coding: utf-8 -*- """ debug.py - Functions to aid in debugging Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more infomation. """ from __future__ import print_function import sys, traceback, time, gc, re, types, weakref, inspect, os, cProfile, threading from . import pt...
mit
1,375,255,485,171,331,300
32.670401
161
0.522254
false
4.030964
false
false
false
cloudbase/maas
src/maasserver/migrations/0010_add_node_netboot.py
1
11133
# flake8: noqa # SKIP this file when reformatting. # The rest of this file was generated by South. # encoding: utf-8 import datetime from django.db import models from maasserver.enum import NODE_STATUS from south.db import db from south.v2 import SchemaMigration class Migration(SchemaMigration): def forwards(s...
agpl-3.0
-3,308,740,581,718,270,500
68.149068
182
0.548729
false
3.645383
false
false
false
veteman/thepython2blob
logicanalyser2fss.py
1
5278
#Copyright 2015 B. Johan G. Svensson #Licensed under the terms of the MIT license (see LICENSE). from __future__ import division import struct, time, csv import fsslib class CSVWriter(): def __init__(self, fid, samplerate): pass class CSVReader(): def __init__(self, fid, samplerate): ...
mit
2,724,560,461,482,590,700
28.333333
98
0.541872
false
3.359644
false
false
false
sempliva/Emotly
emotly/tests/test_model_user.py
1
6285
""" MIT License Copyright (c) 2016 Emotly Contributors 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, pu...
mit
-5,786,649,106,648,142,000
36.861446
78
0.608115
false
4.349481
true
false
false
Rayal/ROS_proov
ros_robotics_projects/chapter_7_codes/rostensorflow/image_recognition.py
1
1917
import rospy from sensor_msgs.msg import Image from std_msgs.msg import String from cv_bridge import CvBridge import cv2 import numpy as np import tensorflow as tf from tensorflow.models.image.imagenet import classify_image class RosTensorFlow(): def __init__(self): classify_image.maybe_download_and_extra...
mit
-6,235,122,650,728,627,000
38.122449
113
0.633281
false
3.596623
false
false
false
Microsoft/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/conda/models/match_spec.py
1
31362
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from abc import ABCMeta, abstractmethod, abstractproperty from collections import Mapping from functools import reduce from os.path import basename import re from .channel import Channel from .dist import Dist f...
apache-2.0
-8,014,581,032,672,361,000
35.048276
99
0.568554
false
3.956352
false
false
false
open-austin/capture
distance.py
1
4386
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function import argparse import glob import os import numpy as np import pandas as pd from geopy.distance import vincenty as point_distance def ingest(fn, route_id, begin_latlng, end_latlng): df = pd.read_csv(fn, parse_dates=[...
gpl-3.0
-4,384,529,574,560,891,400
35.247934
131
0.649111
false
3.358346
false
false
false
borg-project/borg
borg/unix/accounting.py
1
8038
"""@author: Bryan Silverthorn <bcs@cargo-cult.org>""" import os import select import signal import datetime import collections import borg log = borg.get_logger(__name__) class SessionTimeAccountant(object): """ Track the total CPU (user) time for members of a session. Process accounting under Linux is ...
mit
-8,009,201,627,987,073,000
30.155039
90
0.581488
false
4.270988
false
false
false
pudo/archivekit
archivekit/store/s3.py
1
4834
import os from urllib2 import urlopen from boto.s3.connection import S3Connection, S3ResponseError from boto.s3.connection import Location from archivekit.store.common import Store, StoreObject, MANIFEST DELIM = os.path.join(' ', ' ').strip() ALL_USERS = 'http://acs.amazonaws.com/groups/global/AllUsers' class S3St...
mit
-4,507,298,742,891,452,000
33.042254
78
0.571369
false
3.785435
false
false
false
DonHilborn/DataGenerator
faker/providers/es_MX/company.py
1
8627
# -*- encoding: utf-8 -*- from __future__ import unicode_literals from ..company import Provider as CompanyProvider class Provider(CompanyProvider): formats = ( '{{last_name}} {{company_suffix}}', '{{last_name}}-{{last_name}}', '{{company_prefix}} {{last_name}}-{{last_name}}', '{{c...
mit
-2,724,498,202,587,713,500
49.311765
77
0.559102
false
3.048111
false
false
false
chrys87/orca-beep
src/orca/generator.py
1
43334
# Orca # # Copyright 2009 Sun Microsystems Inc. # # This library 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 (at your option) any later version. # # This libr...
lgpl-2.1
-4,279,859,017,480,769,000
40.78785
176
0.542461
false
4.695925
false
false
false
peterheim1/robbie
bin/speech_text.py
1
2005
#!/usr/bin/env python # Author: Derek Green PKG = 'pocketsphinx' #import roslib; roslib.load_manifest(PKG) import rospy import re import os from std_msgs.msg import String from subprocess import Popen, PIPE class SpeechText(): def __init__(self): self.pub = rospy.Publisher('speech_text', String) ...
gpl-3.0
1,194,413,395,588,688,100
32.983051
135
0.54015
false
3.678899
false
false
false
noppanit/sweepy
sweepy.py
1
3267
#!/usr/bin/env python import pymongo import tweepy from pymongo import MongoClient from sweepy.get_config import get_config config = get_config() consumer_key = config.get('PROCESS_TWITTER_CONSUMER_KEY') consumer_secret = config.get('PROCESS_TWITTER_CONSUMER_SECRET') access_token = config.get('PROCESS_TWITTER_ACCES...
mit
-7,822,002,205,192,745,000
28.7
103
0.654729
false
3.313387
true
false
false
kaajavi/ninformes
escolar/test_dev.py
1
3482
from django.shortcuts import render_to_response from django.template import RequestContext import os from django.conf import settings from django.template import Context from django.template.loader import get_template from xhtml2pdf import pisa #INSTALAR ESTA LIBRERIA from django.templatetags.static import static from...
gpl-2.0
624,910,965,018,021,500
34.907216
166
0.688685
false
3.585994
true
false
false
cloudnull/genastack_roles
genastack_roles/nova_api_os_compute/__init__.py
1
1103
# ============================================================================= # Copyright [2013] [Kevin Carter] # License Information : # This software has no warranty, it is provided 'as is'. It is your # responsibility to validate the behavior of the routines and its accuracy # using the code provided. Consult the ...
gpl-3.0
-5,563,318,845,062,327,000
35.766667
79
0.446056
false
4.576763
false
false
false