repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
genialis/resolwe-bio
resolwe_bio/tools/make_report.py
1
13645
#!/usr/bin/env python3 """Generate amplicon report.""" import argparse import csv import re import subprocess DECIMALS = 2 # Decimal precision when presenting results: parser = argparse.ArgumentParser(description="Fill data into tex template file.") parser.add_argument("--sample", help="Sample name.") parser.add_arg...
apache-2.0
390,329,933,350,816,100
37.114525
113
0.55317
false
tcpcloud/openvstorage
ovs/dal/hybrids/t_testemachine.py
1
1117
# Copyright 2014 Open vStorage NV # # 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
7,613,816,019,880,162,000
36.233333
88
0.743957
false
AutorestCI/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2016_12_01/models/effective_network_security_group.py
1
1777
# 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
8,663,824,145,024,644,000
43.425
112
0.667417
false
neurosnap/modular-file-storage
mfs/__init__.py
1
1644
""" Abstract interface for multiple file storage services""" from tempfile import TemporaryFile def loader(backend, *args, **kwargs): """ Main entry point for all backends :param backend: File storage class that will be used for this instance """ return backend(*args, **kwargs) def detector(): """ Finds all su...
mit
-3,544,348,001,866,502,000
27.362069
85
0.695864
false
GustavePate/lycheesync
lycheesync/sync.py
1
4223
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function # from __future__ import unicode_literals from lycheesync.lycheesyncer import LycheeSyncer from lycheesync.update_scripts import inf_to_lychee_2_6_2 import logging.config import click import os import sys import pwd import grp from lychee...
mit
-210,268,809,910,668,600
35.405172
138
0.631068
false
relictMarauder/kodi
plugin.video.relict.hdout.tv/default.py
1
5939
#!/usr/bin/python # -*- coding: utf-8 -*- import xbmcaddon, xbmc, xbmcgui, xbmcplugin import sys import os import traceback from resources.lib.debug import RemoteDebug import resources.lib.series as hdout_series import resources.lib.episodes as hdout_episodes import resources.lib.common as hdout_common debug = Remot...
apache-2.0
-938,124,161,819,895,900
30.094241
111
0.596565
false
quantumlib/Cirq
cirq-core/cirq/contrib/graph_device/graph_device_test.py
1
7734
# Copyright 2018 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
-4,084,446,069,587,269,000
39.920635
99
0.694466
false
Karkus476/pygame-tanks
entity.py
1
5935
import pygame, math, geom from vector import Vector mp = [0,0] class Entity: entities = [] bulletIds = [] bombIds = [] agentIds = [] trackIds = [] nextId = 0 def __init__(self, type, xywh = None, xyr = None): if xywh != None: self.rect = pygame.Rect(xywh[0...
gpl-3.0
2,342,787,344,332,372,500
25.995283
76
0.474473
false
Denniskamau/Twitter-Sentiment-Analysis
stream.py
1
3946
import re import json import tweepy from config import * from tweepy import OAuthHandler from textblob import TextBlob class TwitterClient(object): ''' Generic Twitter Class for sentiment analysis. ''' def __init__(self): ''' Class constructor or initialization method. ''' ...
mit
-1,112,497,269,740,668,700
33.025862
103
0.582362
false
rschnapka/partner-contact
passport/tests/test_passport.py
1
6929
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or m...
agpl-3.0
6,739,414,966,500,262,000
38.146893
79
0.536152
false
NeuroDataDesign/seelviz
Cherrypy/cherrypyapp.py
1
2633
import os, os.path import random import sqlite3 import string import time import cherrypy DB_STRING = "my.db" class StringGenerator(object): @cherrypy.expose def index(self): return file('index.html') class StringGeneratorWebService(object): exposed = True @cherrypy.tools.accept(media='text/p...
apache-2.0
-7,757,661,957,531,134,000
29.616279
79
0.5921
false
red-hood/calendarserver
txweb2/dav/auth.py
1
6134
## # Copyright (c) 2005-2015 Apple Inc. All rights reserved. # # 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, mod...
apache-2.0
3,584,021,437,774,560,000
34.456647
119
0.709977
false
pavle-batuta/djangoTDD
lists/migrations/0001_initial.py
1
1038
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Item', fields=[ ('id', models.AutoField(primary...
mit
7,126,767,289,904,180,000
26.315789
114
0.5
false
h2oai/sparkling-water
py-scoring/src/ai/h2o/sparkling/ml/params/HasGamColsOnMOJO.py
1
1024
# # 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 us...
apache-2.0
-8,079,116,648,204,308,000
39.96
74
0.770508
false
Mariaanisimova/pythonintask
INBa/2015/Sarocvashin_M/task_12_23.py
1
4811
#Задача 12. Вариант 28. #1-50. Разработайте игру "Крестики-нолики". (см. М.Доусон Программируем на Python гл. 6). #Сароквашин Максим #29.05.2016 X="X" O="O" EMPTY=" " TIE="Ничья" NUM_SQUARES=9 def display_instruct(): print(''' Добро пожаловать на ринг грандиознейших интеллектуальных состязаний всех времён. Твой м...
apache-2.0
1,933,226,175,583,030,000
25.577181
161
0.655808
false
umanium/trafficmon
id/trafficmon/TrafficMain.py
1
4091
import os import cv2 import numpy as np import time from backgroundsubtraction.KMeans import KMeans from objectblob.ObjectBlobDetection import ObjectBlobDetection from pixelcleaning.MorphologicalCleaning import MorphologicalCleaning __author__ = 'Luqman' def morphological(image): cleaning_model = Morphologica...
mit
8,293,663,444,799,409,000
28.644928
106
0.575409
false
jvasilakes/ML_Programs
naive_bayes.py
1
4044
#! /usr/bin/python2 from __future__ import division import numpy as np from sys import exit from collections import OrderedDict # ------Training data------------- # Politics xP = [ [1, 0, 1, 1, 1, 0, 1, 1], [0, 0, 0, 1, 0, 0, 1, 1], [1, 0, 0, 1, 1, 0, 1, 0], [0, 1, 0, 0, 1, 1, 0, 1], [0, 0,...
unlicense
-4,065,819,488,263,296,000
27.680851
79
0.541296
false
bzhou26/leetcode_sol
p384_Shuffle_an_Array.py
1
1759
''' - Leetcode problem: 384 - Difficulty: Medium - Brief problem description: Shuffle a set of numbers without duplicates. Example: // Init an array with set 1, 2, and 3. int[] nums = {1,2,3}; Solution solution = new Solution(nums); // Shuffle the array [1,2,3] and return its result. Any permutation of [1,2,3] mu...
mit
2,762,108,037,381,353,500
22.783784
114
0.529847
false
Azure/azure-sdk-for-python
sdk/applicationinsights/azure-applicationinsights/azure/applicationinsights/models/events_trace_result.py
1
3361
# 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,093,606,016,977,611,300
43.223684
107
0.645344
false
WaveBlocks/WaveBlocksND
WaveBlocksND/HagedornBasisEvaluationPsi.py
1
6904
"""The WaveBlocks Project The basic common algorithms for evaluation Hagedorn basis functions of the new kind. @author: R. Bourquin @copyright: Copyright (C) 2016 R. Bourquin @license: Modified BSD License """ from numpy import complexfloating, dot, vstack, zeros, identity, diag, real from numpy.linalg import eigh f...
bsd-3-clause
785,517,517,514,397,800
34.772021
106
0.538094
false
flopp/GpxTrackPoster
gpxtrackposter/calendar_drawer.py
1
5500
"""Draw a calendar poster.""" # Copyright 2016-2021 Florian Pigorsch & Contributors. All rights reserved. # # Use of this source code is governed by a MIT-style # license that can be found in the LICENSE file. import calendar import datetime import svgwrite # type: ignore from gpxtrackposter import utils from gpxtr...
mit
376,503,079,912,758,800
38.855072
112
0.482909
false
shizeeg/pyicqt
tools/migrate.py
1
5978
#!/usr/bin/env python # # Spool Migration Script # # This script takes two arguments. The first is either "dump" or "restore". # The second argument will be a file that your xdb will be dumped to, in the # case of a "dump", or restored from, in the case of a "restore". The # spool config used will be what is in confi...
gpl-2.0
-8,978,707,114,988,355,000
33.16
104
0.683339
false
outbig/DAFGA
v1.0/dafga_refDB.py
1
5933
#!/usr/bin/python # -*- coding: utf-8 -*- """ # Author: Yongkyu Kim, PhD Max Planck Institute for terrestrial microbiology # # Date: 2014-04-02 # Version: 1.0 # # Try 'dafga_refDB.py -h' for more information and See manual # # Purpose: # Bugs: Please report to https://github.com/outbig/DAFGA/is...
gpl-3.0
3,426,493,625,151,996,000
43.609023
143
0.592618
false
rwl/openpowersystem
rdflib/sparql/bison/Query.py
1
3614
from rdflib.sparql.bison.GraphPattern import GraphPattern class Query(object): """ Query ::= Prolog ( SelectQuery | ConstructQuery | DescribeQuery | AskQuery ) See: http://www.w3.org/TR/rdf-sparql-query/#rQuery """ def __init__(self,prolog,query): self.prolog = prolog self.query = q...
agpl-3.0
7,408,429,954,010,658,000
37.052632
220
0.65689
false
zepheira/rdf-to-ejson
lib/rdf_to_ejson.py
1
5385
import simplejson import httplib2 import rdflib import hashlib import sys, os __version__ = "0.2" _RDF_TYPE = u"http://www.w3.org/1999/02/22-rdf-syntax-ns#type" _RDFS_LABEL = "label" # "http://www.w3.org/2000/01/rdf-schema#label" _SKOS_PREFLABEL = "prefLabel" # "http://www.w3.org/2004/02/skos/core#prefLabel" # Conve...
apache-2.0
-3,883,332,222,962,265,000
30.863905
89
0.599257
false
FirstDraftGIS/firstdraft
projfd/apifd/serializers.py
1
3304
from appfd.models import Basemap, Feature, Order, Place, Test from drf_queryfields import QueryFieldsMixin from rest_framework.serializers import HiddenField, IntegerField, NullBooleanField, CharField, ChoiceField, URLField from rest_framework.serializers import HyperlinkedModelSerializer, ModelSerializer, Serializer, ...
apache-2.0
4,986,572,885,234,948,000
35.711111
117
0.631053
false
AndreaOrru/Yugen
key.py
1
1945
"""Representation of keypresses.""" import curses from curses import ascii from curses.ascii import isprint class Key: """Class representing a combination of key presses. Attributes: keys: Dictionary that maps key names to codes. """ keys = {k[4:]: eval('curses.'+k) for k in dir(curses) if ...
bsd-2-clause
-6,767,947,122,418,785,000
33.122807
91
0.572237
false
fumitoh/modelx
modelx/tests/core/space/test_space_reload.py
1
1096
import sys import os.path import modelx as mx import modelx.tests.testdata import pytest import pathlib datadir = pathlib.Path(os.path.dirname(mx.tests.testdata.__file__)) @pytest.fixture def reloadtest(tmp_path): with open(tmp_path / "__init__.py", "w") as f: f.write("") sys.path.insert(0, str(tmp...
gpl-3.0
-7,326,591,670,973,193,000
21.833333
73
0.656934
false
mjafin/bcbio-nextgen
bcbio/distributed/multitasks.py
1
7491
"""Multiprocessing ready entry points for sample analysis. """ from bcbio import heterogeneity, hla, structural, utils, chipseq, upload from bcbio.bam import callable from bcbio.srna import sample as srna from bcbio.srna import group as seqcluster from bcbio.chipseq import peaks from bcbio.cwl import create as cwl_crea...
mit
3,032,854,519,934,070,300
23.086817
78
0.726205
false
terranodo/eventkit-cloud
eventkit_cloud/tasks/migrations/0006_auto_20200803_1037.py
1
3279
# Generated by Django 2.2.5 on 2020-08-03 10:37 import django.core.files.storage from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import uuid class Migration(migrations.Migration): dependencies = [ ('jobs', '0002_dataprovider_attribute_class'), ...
bsd-3-clause
1,799,017,180,767,200,000
53.65
237
0.63007
false
cdepman/falcon_api
site-packages/psycopg2cffi/_impl/connection.py
1
28889
from __future__ import unicode_literals import threading import weakref from functools import wraps import six from psycopg2cffi._impl import consts from psycopg2cffi._impl import encodings as _enc from psycopg2cffi._impl import exceptions from psycopg2cffi._impl.libpq import libpq, ffi from psycopg2cffi._impl import...
mit
-5,988,319,057,899,774,000
31.42312
81
0.580567
false
jupyter/dockerspawner
tests/test_systemuserspawner.py
1
1246
"""Tests for SwarmSpawner""" from getpass import getuser import pytest from jupyterhub.tests.mocking import public_url from jupyterhub.tests.test_api import add_user from jupyterhub.tests.test_api import api_request from jupyterhub.utils import url_path_join from tornado.httpclient import AsyncHTTPClient from dockers...
bsd-3-clause
5,829,882,064,698,830,000
32.675676
74
0.707063
false
guptaarchit/nacsniff
main.py
1
9500
import wx import sys from capture import * import netifaces import wx.lib.buttons from sniffer_socket import * from help_window import * from scanner import * class ListCtrlLeft(wx.Frame): def __init__(self, parent, id): wx.Frame.__init__(self, None, wx.ID_ANY, 'wxBitmapButton', size=(300, 350)) sel...
gpl-2.0
-6,793,228,414,728,784,000
35.402299
139
0.622421
false
rkoschmitzky/coconodz
etc/maya/applib.py
1
4161
import pymel.core as pmc def get_attribute_tree(node): """ traverses attributes on given node and gets dict in form the attribute tree widget expects Args: node: PyNode Returns: dict """ parents = {} for attr in node.listAttr(): if not attr.isChild() and not attr.isMulti():...
mit
-4,021,520,205,011,341,000
33.966387
117
0.614516
false
nixphix/ml-projects
sentiment_analysis/twitter_sentiment_analysis-jallikattu/code/twitter_sentiment_analysis-jallikattu_FINAL.py
1
11757
# coding: utf-8 # ### Sentiment Analysis on "Jallikattu" with Twitter Data Feed <h3 style="color:red;">#DataScienceForSocialCause</h3> # # Twitter is flooded with Jallikattu issue, let us find peoples sentiment with Data Science tools. Following is the approach # * Register a Twitter API handle for data feed # * Pul...
mit
-8,772,647,441,873,645,000
43.534091
351
0.737518
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyKDE4/kdecore/KUser.py
1
2592
# encoding: utf-8 # module PyKDE4.kdecore # from /usr/lib/python3/dist-packages/PyKDE4/kdecore.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore import PyQt4.QtNetwork as __PyQt4_QtNetwork class KUser(): # skipped bases: <class 'sip.wrapper'> # no doc ...
gpl-2.0
4,795,472,248,495,693,000
25.721649
101
0.595293
false
TheReverend403/ricedb
cappuccino/nickserv.py
1
1603
# This file is part of cappuccino. # # cappuccino 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. # # cappuccino is distributed i...
gpl-3.0
-5,728,297,602,008,661,000
35.431818
87
0.669994
false
pdamodaran/yellowbrick
tests/checks.py
1
4707
# tests.checks # Performs checking that visualizers adhere to Yellowbrick conventions. # # Author: Benjamin Bengfort <bbengfort@districtdatalabs.com> # Created: Mon May 22 11:18:06 2017 -0700 # # Copyright (C) 2017 District Data Labs # For license information, see LICENSE.txt # # ID: checks.py [4131cb1] benjamin@ben...
apache-2.0
8,565,193,886,379,202,000
27.355422
84
0.616316
false
LearnEra/LearnEraPlaftform
lms/djangoapps/verify_student/tests/test_views.py
1
29571
# encoding: utf-8 """ verify_student/start?course_id=MITx/6.002x/2013_Spring # create /upload_face?course_id=MITx/6.002x/2013_Spring /upload_photo_id /confirm # mark_ready() ---> To Payment """ import json import mock import urllib import decimal from mock import patch, Mo...
agpl-3.0
-7,823,823,130,717,851,000
40.414566
120
0.633581
false
newmath/FuturesAndOptionsTradingSimulation
scripts/FuturesHashConvert.py
1
2590
from datetime import date from TimeSeriesFunctions import GetDatesAndValuesByDateRange def ConvertFuturesHashToCurvesHash(FUTURES,CURVES,minDate=date(1900,1,1),maxDate=date(2099,12,31)): for code in FUTURES.keys(): for year in FUTURES[code].keys(): for month in FUTURES[code][year].keys(): ...
mit
-8,615,884,269,429,254,000
49.784314
107
0.554826
false
zaitcev/swift-lfs
swift/proxy/controllers/account.py
1
6160
# Copyright (c) 2010-2012 OpenStack, 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 to ...
apache-2.0
7,475,800,555,374,340,000
43.963504
78
0.643182
false
shumik/skencil-c
Sketch/Graphics/selinfo.py
1
7864
# Sketch - A Python-based interactive drawing program # Copyright (C) 1996, 1997, 1998 by Bernhard Herzog # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the Lice...
gpl-2.0
-989,434,683,885,754,100
28.675472
75
0.691633
false
kimond/miamm
miamm/recipes/serializers.py
1
3262
from rest_framework import serializers, fields from recipes.models import Recipe, Step, RecipeIngredient, Ingredient, QuantityType class QuantityTypeSerializer(serializers.ModelSerializer): class Meta: model = QuantityType fields = ('name',) class IngredientSerializer(serializers.ModelSerializer...
bsd-3-clause
-3,855,466,600,728,706,600
37.376471
127
0.681484
false
comprna/SUPPA
scripts/generate_boxplot_event.py
1
5584
# The next script will format a phenotype table (junctions, events, trasncripts...) # for runnning FastQTL analysis #This version is for formatting the SCLC phenotype """ @authors: Juan L. Trincado @email: juanluis.trincado@upf.edu generate_boxplot_event.py: Generates a boxplot with the PSI values, given which sampl...
mit
-788,959,910,408,193,500
33.475309
118
0.546024
false
UrbanCCD-UChicago/sf-plenario-backend
wopr/etl.py
1
17862
import os import numpy as np from datetime import datetime from wopr.database import task_engine as engine, Base from wopr.models import crime_table, MasterTable, sf_crime_table,\ sf_meta_table, shp2table from wopr.helpers import download_crime from datetime import datetime, date from sqlalchemy import Column, Inte...
mit
-3,185,086,776,300,698,000
47.803279
95
0.587336
false
dragoon/kilogram
kilogram/entity_linking/app.py
1
3555
#!/usr/bin/env python """ ./app.py --dbpedia-data-dir /home/roman/dbpedia --ner-host diufpc54.unifr.ch --types-table typogram --hbase-host diufpc304 """ import argparse import os.path from flask import Flask, jsonify, request import kilogram from kilogram.dataset.entity_linking.gerbil import DataSet from kilogram.ent...
apache-2.0
-2,217,680,018,903,372,300
39.397727
122
0.675387
false
denischevalier/dkb
keylog_parser.py
1
5565
#!/usr/bin/python3 ########################################################################## ## ## ## dkb: Simple Python Keybinder for Linux ## ## Copyright (C) 2014 chevalierdenis@gmx.com ## #...
gpl-3.0
-8,606,256,544,597,879,000
62.238636
143
0.425517
false
ytsarev/rally
rally/openstack/common/db/options.py
1
8175
# 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 u...
apache-2.0
4,159,092,132,425,864,000
46.807018
79
0.517798
false
PoppyPop/docker
webui-aria2/autounrar.py
1
4224
#!/usr/bin/python3 import subprocess import os import json import shutil maxlevel = 1 def CheckRarComplete( path, file, associatedFiles ): plsar = subprocess.Popen(['lsar', '-j', os.path.join(path, file)], stdout=subprocess.PIPE) lsarout, lsarerr = plsar.communicate() jsonObject = json.loads(lsarout.decode("utf...
gpl-3.0
-2,123,492,820,590,740,200
25.074074
117
0.635417
false
benoit-canet/pyghmi
pyghmi/ipmi/oem/lookup.py
1
1121
# Copyright 2015 Lenovo Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
apache-2.0
-6,524,692,475,986,176,000
35.16129
74
0.743979
false
metagriffin/raspi-door
raspi_door/button.py
1
2666
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------ # file: $Id$ # auth: metagriffin <mg.github@metagriffin.net> # date: 2014/05/27 # copy: (C) Copyright 2014-EOT metagriffin -- see LICENSE.txt #-------------------------------------------------------------------------...
gpl-3.0
-2,050,472,767,038,455,800
42
79
0.487622
false
zeinsteinz/tacker
tacker/tests/functional/vnfm/test_vnfm_param.py
1
5503
# Copyright 2015 Brocade Communications System, 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 ...
apache-2.0
1,078,700,329,491,360,300
41.658915
78
0.608214
false
702nADOS/sumo
tools/contributed/sumopy/agilepy/lib_wx/test_app.py
1
7648
import os import sys import wx from wx.lib.wordwrap import wordwrap if __name__ == '__main__': try: APPDIR = os.path.dirname(os.path.abspath(__file__)) except: APPDIR = os.path.dirname(os.path.abspath(sys.argv[0])) AGILEDIR = os.path.join(APPDIR, '..') print 'APPDIR,AGILEDIR', APPDIR,...
gpl-3.0
1,562,993,720,212,012,800
33.922374
81
0.471365
false
fernandog/Medusa
ext/sqlalchemy/event/attr.py
1
12905
# event/attr.py # Copyright (C) 2005-2018 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Attribute implementation for _Dispatch classes. The various listener targets for a...
gpl-3.0
3,407,839,585,040,073,700
31.182045
77
0.604107
false
toddpalino/kafka-tools
kafka/tools/protocol/requests/describe_acls_v0.py
1
1408
# 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
-7,320,927,482,224,388,000
37.054054
82
0.697443
false
jusjusjus/pyedf
pyedf/recording/edf_param_struct.py
1
1026
#!/usr/bin/python import ctypes as ct class edf_param_struct(ct.Structure): # this structure contains all the relevant EDF-signal parameters of one signal _fields_ = [("label_b", ct.c_char*17), # label (name) of the signal, null-terminated string ("smp_in_file", ct.c_longlong), ...
gpl-3.0
1,679,297,871,892,782,800
63.125
135
0.548733
false
brkrishna/freelance
bolly_reviews/process_data.py
1
5263
#------------------------------------------------------------------------------- # Name: process_data # Purpose: # # Author: Ramakrishna # # Created: 17/04/2014 # Copyright: (c) Ramakrishna 2014 # Licence: <your licence> #----------------------------------------------------------------------------...
gpl-2.0
1,349,513,766,792,721,200
43.601695
82
0.564127
false
RoboCupULaval/StrategyIA
tests/Util/test_path.py
1
2516
import unittest from Util import Path, Position __author__ = 'Simon Bouchard' A_START = Position(100, 200) A_TARGET = Position(123, -456) A_PATH = Path(start=A_START, target=A_TARGET) A_START_ARRAY = A_START.array A_TARGET_ARRAY = A_TARGET.array A_LIST_OF_POSITION = [Position(0, 0), Position...
mit
1,124,075,646,280,694,000
37.707692
82
0.596582
false
tkf/neo
neo/io/micromedio.py
1
5751
# encoding: utf-8 """ Class for reading/writing data from micromed (.trc). Inspired by the Matlab code for EEGLAB from Rami K. Niazy. Supported : Read Author: sgarcia """ from .baseio import BaseIO from ..core import * from .tools import create_many_to_one_relationship import numpy as np import quantities as pq ...
bsd-3-clause
5,507,281,442,814,225,000
27.899497
119
0.497653
false
listyque/TACTIC-Handler
thlib/side/natsort/utils.py
1
15239
# -*- coding: utf-8 -*- """ Utilities and definitions for natsort, mostly all used to define the _natsort_key function. """ from __future__ import ( print_function, division, unicode_literals, absolute_import ) # Std. lib imports. import re from math import isnan from warnings import warn from os impor...
epl-1.0
5,161,603,413,266,719,000
39.314815
79
0.569394
false
ngokevin/zamboni
mkt/developers/api_payments.py
1
11477
from django.core.exceptions import PermissionDenied from django.core.urlresolvers import reverse import commonware from curling.lib import HttpClientError, HttpServerError from rest_framework import status from rest_framework.mixins import (CreateModelMixin, DestroyModelMixin, ListMo...
bsd-3-clause
2,143,733,476,936,879,400
38.575862
79
0.632744
false
mitchsmith/qd_screener
questionnaire/admin.py
1
7839
from django.contrib import admin from django.forms import ModelChoiceField, ModelForm, Textarea from questionnaire.models import * from django.core.exceptions import ValidationError from django.forms.models import BaseInlineFormSet from questionnaire import admin_helper ############################################### ...
mit
-3,241,874,263,367,155,000
39.2
122
0.612706
false
mtrgroup/django-mtr-utils
tests/app/settings.py
1
3204
import os import django # placeholder for gettext def _(s): return s BASE_DIR = os.path.dirname(os.path.dirname(__file__)) SECRET_KEY = 'j#zwt2c!*(7(jz!m(tr$+jq^1d(+)e(^059f^nd_(*zj!gv0x)' DEBUG = True TEMPLATE_DEBUG = True ALLOWED_HOSTS = ['*'] INSTALLED_APPS = ( 'modeltranslation', 'django.contr...
mit
525,239,956,382,142,200
22.217391
73
0.644819
false
USGSDenverPychron/pychron
pychron/hardware/actuators/iactuator.py
1
1276
# =============================================================================== # Copyright 2014 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/licens...
apache-2.0
-8,927,689,282,698,169,000
32.578947
81
0.527429
false
Telestream/telestream-cloud-python-sdk
telestream_cloud_qc_sdk/test/test_container_type.py
1
1326
# coding: utf-8 """ Qc API Qc API # noqa: E501 The version of the OpenAPI document: 3.0.0 Contact: cloudsupport@telestream.net Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unittest import datetime import telestream_cloud_qc from telestream_cl...
mit
7,400,878,994,656,975,000
24.5
89
0.65083
false
daniel-j/lutris
lutris/services/service_game.py
1
1672
"""Communicates between third party services games and Lutris games""" from lutris import pga class ServiceGame: """Representation of a game from a 3rd party service""" store = NotImplemented installer_slug = NotImplemented def __init__(self): self.appid = None # External ID of the game on t...
gpl-3.0
-4,914,758,489,699,517,000
31.784314
77
0.605861
false
nginx/unit
test/test_asgi_websockets.py
1
44158
import struct import time from distutils.version import LooseVersion import pytest from unit.applications.lang.python import TestApplicationPython from unit.applications.websockets import TestApplicationWebsocket from unit.option import option class TestASGIWebsockets(TestApplicationPython): prerequisites = { ...
apache-2.0
-6,733,568,760,508,300,000
28.771409
84
0.545197
false
OpenPTV/postptv
flowtracks/scene.py
1
17778
# -*- coding: utf-8 -*- #Created on Sun Aug 10 11:28:42 2014 # # Private references: # [1] https://docs.python.org/2/library/itertools.html """ A module for manipulating PTV analyses saved as HDF5 files in the flowtracks format. Allows reading the data by iterating over frames or over trajectories. Main design goals:...
gpl-3.0
-1,854,678,531,572,964,000
34.698795
90
0.564124
false
nathanielvarona/airflow
airflow/sensors/s3_prefix_sensor.py
1
1173
# # 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...
apache-2.0
4,924,990,681,050,090,000
39.448276
98
0.767263
false
vdel/CoMFoRT
src/modules/themodule_Coord.py
2
19824
#!/usr/bin/python # -*- coding: utf-8 -*- # # CoMFoRT: a COntent Management system FOr Researchers and Teachers! # # Copyright (C) 2008 Projet2-L3IF ENS Lyon. # # Contributors: # * Jean-Alexandre Angles d'Auriac # * Gabriel Beaulieu # * Valentin Blot # * Pierre Boutillier # * Nicolas Brunie # * Aloï...
gpl-3.0
3,369,862,865,479,592,000
42.767699
139
0.491887
false
cekk/fantacalcio-react
fantacalcio/public/views.py
1
7080
# -*- coding: utf-8 -*- '''Public section, including homepage and signup.''' from flask import (Blueprint, request, render_template, flash, url_for, redirect, session, make_response, jsonify, current_app) from flask.ext.login import login_user, login_required, logout_user from fantacalcio.extensions...
bsd-3-clause
-269,672,554,093,082,620
35.489691
120
0.632575
false
dheesbeen/Mage2Gen
mage2gen/snippets/plugin.py
1
4340
# A Magento 2 module generator library # Copyright (C) 2016 Derrick Heesbeen # Copyright (C) 2016 Maikel Martens Changed add API and refactor code # # This file is part of Mage2Gen. # # Mage2Gen is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
gpl-3.0
-6,212,635,163,810,068,000
29.780142
191
0.693779
false
sendgrid/sendgrid-python
setup.py
1
1257
import io import os from distutils.file_util import copy_file from setuptools import setup, find_packages __version__ = None with open('sendgrid/version.py') as f: exec(f.read()) def getRequires(): deps = [ 'python_http_client>=3.2.1', 'starkbank-ecdsa>=1.0.0' ] return deps dir_path...
mit
-6,855,320,425,953,217,000
28.232558
79
0.613365
false
MSEMJEJME/Get-Dumped
renpy/audio/__init__.py
1
1154
# Copyright 2004-2012 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
1,362,124,465,807,204,400
49.173913
72
0.779029
false
yukisakurai/hhntup
higgstautau/pileup.py
1
6320
from rootpy.tree.filtering import EventFilter from externaltools import PileupReweighting from ROOT import Root from . import datasets from . import log; log = log[__name__] # https://twiki.cern.ch/twiki/bin/viewauth/AtlasProtected/InDetTrackingPerformanceGuidelines PU_RESCALE = { 2011: (0.97, 0.01), 2012: (...
gpl-3.0
-8,316,059,299,699,684,000
35.531792
107
0.631329
false
jonashagstedt/tornado
tornado/util.py
1
12529
"""Miscellaneous utility functions and classes. This module is used internally by Tornado. It is not necessarily expected that the functions and classes defined here will be useful to other applications, but they are documented here in case they are. The one public-facing part of this module is the `Configurable` cl...
apache-2.0
-1,926,682,109,197,582,600
33.515152
97
0.64666
false
kytos/python-openflow
tests/unit/v0x01/test_controller2switch/test_packet_out.py
1
2854
"""Packet out message tests.""" from pyof.foundation.exceptions import ValidationError from pyof.v0x01.common.action import ActionOutput from pyof.v0x01.common.phy_port import Port from pyof.v0x01.controller2switch.packet_out import PacketOut from tests.unit.test_struct import TestStruct class TestPacketOut(TestStruc...
mit
2,311,977,237,423,042,600
38.638889
79
0.627891
false
alexbrasetvik/Piped
contrib/manhole/piped_manhole/providers.py
1
8642
# Copyright (c) 2011, Found IT A/S and Piped Project Contributors. # See LICENSE for details. from twisted.application import internet, service, strports from twisted.conch import manhole, manhole_ssh, error as conch_error from twisted.conch.insults import insults from twisted.conch.ssh import keys from twisted.cred im...
mit
3,105,781,388,952,865,300
39.57277
115
0.651122
false
kudrom/genesis2
genesis2/plugins/install_plugins/provider.py
1
8220
class RepositoryManager: """ Manages official Genesis plugin repository. ``cfg`` is :class:`genesis.config.Config` - ``available`` - list(:class:`PluginInfo`), plugins available in the repository - ``installed`` - list(:class:`PluginInfo`), plugins that are locally installed - ``upgradable`` - li...
gpl-3.0
7,486,914,138,501,670,000
33.683544
109
0.51983
false
dropseedlabs/configyaml
configyaml/config/nodes.py
1
3286
import re from .base import AbstractNode from .dict import DictNode class WildcardDictNode(DictNode): """A dictionary node where nearly any key is valid The only invalid keys are: - an actual asterisk '*' - a key that begins with '_' """ def _validate_value(self): for key...
mit
817,435,022,708,661,400
29.71028
92
0.552343
false
smn/django-cache-sweeper
myproject/settings.py
1
3533
# Django settings for myproject project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. ...
bsd-3-clause
8,056,872,209,026,352,000
34.33
122
0.68865
false
avi-psvm-dutta/eSim
src/kicadtoNgspice/KicadtoNgspice.py
1
30713
#=============================================================================== # # FILE: kicadtoNgspice.py # # USAGE: --- # # DESCRIPTION: This define all configuration used in Application. # # OPTIONS: --- # REQUIREMENTS: --- # BUGS: --- # NOTES: --- # AUTHOR: F...
gpl-3.0
-3,305,500,280,295,651,000
44.035191
233
0.543516
false
trevor/calendarserver
txweb2/dav/test/test_acl.py
1
15231
## # Copyright (c) 2005-2014 Apple Inc. All rights reserved. # # 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, mod...
apache-2.0
6,740,619,522,265,714,000
37.268844
120
0.522684
false
tensorflow/agents
tf_agents/metrics/batched_py_metric_test.py
1
4425
# coding=utf-8 # Copyright 2020 The TF-Agents 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
apache-2.0
-7,867,883,181,337,868,000
36.184874
79
0.687684
false
MediaKraken/MediaKraken_Deployment
source/testing/test_common/test_common_network_iscp.py
1
1193
""" Copyright (C) 2016 Quinn D Granfor <spootdev@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but ...
gpl-3.0
-1,125,498,603,951,545,300
28.097561
69
0.740151
false
makinacorpus/geonode
src/GeoNodePy/geonode/maps/tests.py
1
47766
from django.conf import settings from django.test import TestCase from django.test.client import Client from django.contrib.auth.models import User, AnonymousUser, Group import geonode.maps.models import geonode.maps.views from geonode.maps.models import Map, Layer, User from geonode.maps.utils import get_valid_user,...
gpl-3.0
-6,754,898,947,613,309,000
34.806597
157
0.591236
false
jnv/asciibooth
asciibooth/__main__.py
1
3498
from threading import Semaphore from rx import Observable from rx.concurrency import Scheduler from time import sleep from .input import observe_mouse, observe_keyboard, observe_getch from . import ascii from . import screen from . import config from . import raster from . import output from .statuses import status_gen...
cc0-1.0
-2,811,212,175,431,827,000
27.439024
128
0.647513
false
imchipwood/iSOBOT_ESP8266
iSOBOT_Control/isobot.py
1
14020
__author__ = "chawood@pdx.edu" import requests import ping import socket import time import re # Code originally pulled from here # http://web.cecs.pdx.edu/~mperkows/CLASS_479/Projects-2012/Mathias_Sunardi-iSobot_controller_report.pdf # And subsequently changed entirely for use with ESP8266s over wifi commands = { '...
gpl-3.0
-3,810,087,699,394,670,000
31.988235
144
0.633381
false
devlights/try-python
trypython/stdlib/dataclasses_/dataclasses02.py
1
1182
""" dataclasses モジュールのサンプルです. fronzen プロパティの指定について REFERENCESS:: http://bit.ly/2KTZynw http://bit.ly/2KJCnwk http://bit.ly/2KHeNA9 http://bit.ly/2KFLGxc """ import dataclasses as dc from trypython.common.commoncls import SampleBase from trypython.common.commonfunc import pr ...
mit
6,721,860,153,349,248,000
23.318182
70
0.542056
false
algorithm-ninja/territoriali-backend
terry/__main__.py
1
1084
#!/usr/bin/env python3 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright 2017-2018 - Edoardo Morassutto <edoardo.morassutto@gmail.com> # Copyright 2017-2018 ...
mpl-2.0
51,052,995,239,214,664
26.794872
73
0.693727
false
mvdroest/RTLSDR-Scanner
src/cli.py
1
9447
# # rtlsdr_scan # # http://eartoearoak.com/software/rtlsdr-scanner # # Copyright 2012 - 2015 Al Brown # # A frequency scanning GUI for the OsmoSDR rtl-sdr library at # http://sdr.osmocom.org/trac/wiki/rtl-sdr # # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Gene...
gpl-3.0
8,755,995,106,425,478,000
34.920152
95
0.544406
false
nwjs/chromium.src
tools/perf/experimental/representative_perf_test_limit_adjuster/adjust_upper_limits.py
1
6803
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from __future__ import print_function import json import os import sys import shutil import subprocess import tempfile CHROMIUM_PATH = os.path.join(os.path...
bsd-3-clause
-4,852,662,846,886,099,000
31.555024
79
0.670587
false
webplate/astrini
InputHandler.py
1
1070
# -*- coding: utf-8-*- from direct.showbase.DirectObject import DirectObject import sys, time class InputHandler(DirectObject): def __init__(self, world): self.world = world #setting it active by default self.setActive() def setInactive(self): # Main Modifier ...
gpl-3.0
-3,965,905,659,118,814,000
32.516129
77
0.600935
false
eli-schwartz/Sigil
src/Resource_Files/plugin_launchers/python/opf_parser.py
1
11711
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Copyright (c) 2014 Kevin B. Hendricks, John Schember, and Doug Massay # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following ...
gpl-3.0
3,533,007,548,701,989,000
37.14658
129
0.504056
false
kendazheng/wizcloud2
wizcloud/wizresource/zapi.py
1
2298
import time from pyzabbix import ZabbixAPI from settings import ZabbixAPI_URL, ZabbixAPI_USER, ZabbixAPI_PASSWD def getZabbixHistory(key, hostname, lastminutes): zapi = ZabbixAPI(ZabbixAPI_URL, timeout=5) zapi.login(ZabbixAPI_USER, ZabbixAPI_PASSWD) hosts = zapi.host.get(filter={"host": hostname}) if...
apache-2.0
-8,149,228,016,804,766,000
33.298507
106
0.521323
false
jeffmahoney/crash-python
contrib/lsbtrfs-cmd.py
1
1665
#!/usr/bin/python3 # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: path = "/lib/modules/4.4.20-6.gd2e08c5-default/kernel/fs/btrfs/btrfs.ko" from crash.types.list import list_for_each_entry import gdb import uuid from crash.commands import CrashCommand class LSBtrfs(CrashCommand): """ doc """...
gpl-2.0
1,526,070,313,311,482,000
34.425532
87
0.553153
false
zijistark/ck2utils
esc/check_titles.py
1
8077
#!/usr/bin/env python3 from collections import defaultdict import csv from operator import attrgetter import pathlib import pprint import re import sys import shutil import tempfile import ck2parser from ck2parser import (rootpath, vanilladir, is_codename, Obj, csv_rows, get_province_id_name_map...
gpl-2.0
7,852,511,862,413,225,000
37.831731
79
0.510833
false
atlarge-research/opendc-web-server
opendc/api/v1/simulations/simulationId/paths/endpoint.py
1
1243
from opendc.models.path import Path from opendc.models.simulation import Simulation from opendc.util import exceptions from opendc.util.rest import Response def GET(request): """Get this Simulation's Paths.""" # Make sure required parameters are there try: request.check_required_parameters( ...
mit
-2,937,328,540,424,146,000
27.906977
87
0.663717
false
decvalts/cartopy
versioneer.py
1
72608
# Version: 0.15+dev """The Versioneer - like a rocketeer, but for versions. The Versioneer ============== * like a rocketeer, but for versions! * https://github.com/warner/python-versioneer * Brian Warner * License: Public Domain * Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, and pypy * [![Latest Version] (https...
gpl-3.0
2,493,613,641,410,716,700
35.763544
79
0.615056
false
bt3gl/Numerical-Methods-for-Physics
others/laplace_poisson_equations/mg_test.py
1
1396
#!/usr/bin/env python """ an example of using the multigrid class to solve Laplace's equation. Here, we solve u_xx = sin(x) u = 0 on the boundary [0,1] The analytic solution is u(x) = -sin(x) + x sin(1) """ #from io import * import numpy import multigrid import pylab # the analytic solution def true(x): retu...
apache-2.0
6,720,700,672,188,370,000
18.942857
100
0.657593
false