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
nus-mtp/bill-egoat
application/views/OpenCV_Main/logo_recognition.py
1
5736
# Authored by Tan Tack Poh # Logo recognition algorithm (SIFT Feature Detection) for Bill.eGoat # import libraries import os import sys import getopt import numpy as np import cv2 from matplotlib import pyplot as plt """ This function initiates the SIFT detector, which relies on keypoints, descriptors and mat...
mit
6,285,660,786,879,254,000
31.965517
103
0.680091
false
3.346558
false
false
false
willu47/smif
docs/conf.py
1
10113
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. # To run the docs build directly, generate module index: # rm -r docs/api ; sphinx-apidoc -f -M -o docs/api smif # Then build docs: # rm -r docs/_build ; sphinx-build -b html docs docs/_build/html # Note tha...
mit
-7,764,241,780,833,932,000
32.598007
90
0.686839
false
3.665458
false
false
false
dialounke/pylayers
pylayers/simul/exploit.py
1
9808
from __future__ import print_function 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 .. autosummary:: """ class Exploit(object): ...
mit
-6,433,702,681,076,244,000
31.912752
127
0.472471
false
3.411478
false
false
false
CommonsDev/unisson.co
project/migrations/0008_auto__add_field_practice_wikipage.py
1
5852
# -*- 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 field 'Practice.wikipage' db.add_column(u'project_practice', 'wi...
agpl-3.0
-228,341,664,682,812,930
67.05814
189
0.550239
false
3.671267
false
false
false
iGivefirst/cassandra-dbapi2
cql/native.py
1
34675
# 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
1,840,327,313,781,368,000
31.018467
144
0.596222
false
3.857922
false
false
false
SeanNaren/deepspeech.pytorch
deepspeech_pytorch/loader/spec_augment.py
1
4866
# Copyright 2019 RnD at Spoon Radio # # 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...
mit
7,836,354,949,505,346,000
36.430769
127
0.608303
false
3.407563
false
false
false
nupic-community/nupic.studio
nupic_studio/ui/architecture_window.py
1
15311
from PyQt5 import QtGui, QtCore, QtWidgets from nupic_studio.ui import ICON, State, Global from nupic_studio.htm.node import NodeType, Node from nupic_studio.htm.node_region import Region from nupic_studio.htm.node_sensor import Sensor from nupic_studio.ui.node_region_window import RegionWindow from nupic_studio.ui.no...
gpl-2.0
5,636,061,598,743,976,000
36.614251
188
0.608662
false
3.919355
false
false
false
aliok/trnltk
trnltk/ngrams/ngramgenerator.py
1
5642
""" Copyright 2012 Ali Ok (aliokATapacheDOTorg) 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,133,861,459,753,965,000
37.380952
166
0.64073
false
3.541745
false
false
false
FNNDSC/snode
C_stringCore.py
1
3606
#!/usr/bin/env python """ NAME C_stringCore DESCRIPTION 'C_stringCore' is a wrapper about a python cStringIO class. It provides a thins wrapper abstracting some simple methods to write/read to and from a StringIO object. NOTES HISTORY 06 Feb...
mit
-4,726,852,997,883,894,000
33.028302
85
0.410704
false
5.022284
false
false
false
funkring/fdoo
addons-funkring/at_base/userlog.py
1
2999
# -*- coding: utf-8 -*- ############################################################################# # # Copyright (c) 2007 Martin Reisenhofer <martin.reisenhofer@funkring.net> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pu...
agpl-3.0
2,603,637,102,937,746,000
36.037037
111
0.572858
false
3.648418
false
false
false
blackball/an-test6
util/mcmc.py
1
1867
from numpy import * def metropolis(data, model, nlinks, beta=1., keepchain=True, startlink=0): ''' The "model" object must implement: p = model.get_params() -- this must return an *independent copy* of the parameters. model.set_params(p) p = model.propose_params() model.tally(accept, linknumber) accept: ...
gpl-2.0
389,556,608,489,478,850
22.3375
74
0.6797
false
2.820242
false
false
false
archhurd/archweb
devel/management/commands/reporead.py
1
21781
# -*- coding: utf-8 -*- """ reporead command Parses a repo.db.tar.gz file and updates the Arch database with the relevant changes. Usage: ./manage.py reporead ARCH PATH ARCH: architecture to update; must be available in the database PATH: full path to the repo.db.tar.gz file. Example: ./manage.py reporead i686...
gpl-2.0
-3,257,685,947,078,138,000
36.168942
141
0.611267
false
3.857092
false
false
false
ctwiz/stardust
qa/rpc-tests/p2p-acceptblock.py
1
12417
#!/usr/bin/env python3 # Copyright (c) 2015-2016 The Stardust Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.mininode import * from test_framework.test_framework import StardustTestFramework fr...
mit
-6,259,573,567,135,061,000
41.670103
107
0.633406
false
3.917035
true
false
false
Azure/azure-sdk-for-python
sdk/communication/azure-mgmt-communication/azure/mgmt/communication/aio/operations/_operations.py
1
4849
# 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 may ...
mit
-1,237,854,249,529,483,000
44.317757
133
0.649206
false
4.712342
false
false
false
dbaynard/pynomo
examples/ex_temp_convert.py
1
1942
""" ex_temp_convert.py Celcius-Fahrenheit converter Copyright (C) 2007-2008 Leif Roschier 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, o...
gpl-3.0
7,767,730,312,271,597,000
25.60274
73
0.57415
false
3.308348
false
false
false
nickdirienzo/flask-dance
flask_dance/utils.py
1
1974
from __future__ import unicode_literals import functools from collections import MutableMapping from datetime import datetime try: from datetime import timezone utc = timezone.utc except ImportError: from datetime import timedelta, tzinfo class UTC(tzinfo): def utcoffset(self, dt): ...
mit
9,046,403,597,645,733,000
24.973684
106
0.62766
false
4.147059
false
false
false
tfiedor/perun
perun/fuzz/factory.py
1
25214
"""Collection of global methods for fuzz testing.""" __author__ = 'Tomas Fiedor, Matus Liscinsky' import copy import difflib import itertools import os import os.path as path import signal import sys import time import threading from subprocess import CalledProcessError, TimeoutExpired from uuid import uuid4 import n...
gpl-3.0
891,918,394,269,239,800
39.667742
100
0.644483
false
4.034886
true
false
false
tperol/ConvNetQuake
bin/predict_from_stream.py
1
9245
#!/usr/bin/env python # ------------------------------------------------------------------- # File Name : predict_from_stream.py # Creation Date : 03-12-2016 # Last Modified : Sun Jan 8 13:33:08 2017 # Author: Thibaut Perol <tperol@g.harvard.edu> # ------------------------------------------------------------------- ""...
mit
-4,502,319,271,922,005,000
37.045267
86
0.558356
false
3.983197
false
false
false
PeteAndersen/swarfarm
herders/migrations/0004_auto_20190516_1304.py
1
3667
# Generated by Django 2.1.7 on 2019-05-16 20:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('herders', '0003_auto_20190213_1224'), ] operations = [ migrations.AddField( model_name='storage', name='dark_angelmo...
apache-2.0
-8,715,888,314,248,581,000
34.485437
82
0.554856
false
3.990175
false
false
false
rvanlaar/easy-transifex
src/transifex/transifex/resources/formats/xliff.py
1
15599
# -*- coding: utf-8 -*- """ XLIFF file parser for Python see http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.htm for documentation of XLIFF format """ import re import xml.dom.minidom import xml.parsers.expat from xml.sax.saxutils import escape as xml_escape from django.utils.translation import ugettext, ugettext...
bsd-2-clause
-1,031,043,902,981,519,000
44.083815
125
0.560933
false
4.336669
false
false
false
waynemoore/django-httpstatus
src/httpstatus/tests.py
1
3493
from django.test import TestCase from django.http import * from httpstatus import Http301, Http302, Http400, Http403, Http405, Http410 from httpstatus.decorators import postonly, getonly from httpstatus.middleware import HttpStatusErrorsMiddleware class MockRequest: POST = False GET = False class HTTPStatusT...
bsd-3-clause
5,821,761,433,319,589,000
27.169355
78
0.555969
false
4.871688
true
false
false
CacaoMovil/guia-de-cacao-django
cacao_app/cacao/migrations/0004_auto_20150108_1003.py
1
1261
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('cacao', '0003_content_slug'), ] operations = [ migrations.AlterModelOp...
bsd-3-clause
1,051,232,887,543,578,800
28.325581
123
0.558287
false
4.274576
false
false
false
IIIT-Delhi/jobport
placement/jobport/storage.py
1
1469
# //======================================================================= # // Copyright JobPort, IIIT Delhi 2015. # // Distributed under the MIT License. # // (See accompanying file LICENSE or copy at # // http://opensource.org/licenses/MIT) # //======================================================================...
mit
2,312,699,302,446,188,000
34.829268
76
0.577944
false
4.506135
false
false
false
aequitas/home-assistant
homeassistant/components/totalconnect/alarm_control_panel.py
1
4070
"""Interfaces with TotalConnect alarm control panels.""" import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv import homeassistant.components.alarm_control_panel as alarm from homeassistant.components.alarm_control_panel import PLATFORM_SCHEMA from homeassistant.const import ( ...
apache-2.0
-8,429,052,973,448,798,000
33.786325
74
0.637101
false
3.898467
false
false
false
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pybedtools-0.7.6-py2.7-linux-x86_64.egg/pybedtools/contrib/classifier.py
1
22966
import os import pybedtools import itertools from collections import defaultdict class BasePairClassifier(object): def __init__(self, bed, annotations, genome, sample_name='sample', names=None, prefix='split_'): """ Classifies files using bedtools multiinter. The results ...
apache-2.0
-9,106,415,556,151,277,000
37.149502
102
0.559915
false
4.3645
false
false
false
rhinstaller/python-simpleline
tests/units/main/screen_stack_test.py
1
5094
# Screen stack test classes. # # This file is part of Simpleline Text UI library. # # Copyright (C) 2020 Red Hat, Inc. # # Simpleline 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...
gpl-2.0
8,359,806,312,666,730,000
30.444444
93
0.652925
false
3.787361
true
false
false
wrbutros/condominios
registro/migrations/0002_auto_20160426_2319.py
1
2076
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-27 02:19 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('registro', '0001_initial'), ] operations = [ ...
gpl-3.0
-2,396,396,152,666,447,400
33.032787
130
0.586224
false
3.977011
false
false
false
ddico/account-financial-tools
account_move_fiscal_year/models/account_move.py
1
1864
# Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import api, fields, models from odoo.osv import expression class AccountMove(models.Model): _inherit = 'account.move' date_range_fy_id = fields.Many2one( comodel_name='date.range', string="Fiscal...
agpl-3.0
-8,893,680,459,643,347,000
34.169811
73
0.554721
false
3.626459
false
false
false
fedora-infra/python-fedora
fedora/client/fas2.py
1
38441
# -*- coding: utf-8 -*- # # Copyright (C) 2008-2012 Ricky Zhou, Red Hat, Inc. # This file is part of python-fedora # # python-fedora 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...
lgpl-2.1
8,893,599,756,874,790,000
39.0375
79
0.574253
false
4.127577
true
false
false
kuchenrolle/kerasndl
src/kerasndl/filehandler.py
1
3367
#!/usr/bin/python3 import sys from kerasndl.utils import Numberer class EventFileHandler: """Interface to manage file with events and keep track of number of cues and outcomes. Parameters ---------- event_file: str or path path to file with events lowercase: boolean, optional ...
mit
5,767,884,512,852,428,000
27.786325
124
0.589546
false
3.839225
false
false
false
saullocastro/pyNastran
pyNastran/converters/cart3d/change_bcs.py
1
11789
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from pyNastran.gui.qt_version import qt_version if qt_version == 4: #from PyQt4 import QtCore, QtGui from PyQt4.QtGui import ( QDialog, QLineEdit, QPushButton, QGridLayout, QVBoxLayout, QHBoxLayout, QApplication, QC...
lgpl-3.0
-5,493,784,421,765,542,000
32.586895
96
0.584698
false
3.749682
false
false
false
Scriptopathe/simso-exp
simsoexp/migrations/0004_auto_20150720_1335.py
1
1173
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('simsoexp', '0003_auto_20150717_1118'), ] operations = [ migrations.RemoveField( model_name='testcategory', ...
bsd-2-clause
-7,655,561,908,491,808,000
26.27907
53
0.54902
false
4.807377
false
false
false
ideascube/ideascube
ideascube/monitoring/migrations/0007_stockitem_physical.py
1
2000
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-25 09:57 from __future__ import unicode_literals from django.db import migrations, models def set_physical(apps, schema_editor): StockItem = apps.get_model('monitoring', 'StockItem') BookSpecimen = apps.get_model('library', 'BookSpecimen') ...
agpl-3.0
3,234,554,735,561,238,000
34.714286
79
0.6055
false
4.444444
false
false
false
ndufresne/totem
src/plugins/opensubtitles/opensubtitles.py
1
26489
# -*- coding: utf-8 -*- import gi gi.require_version('Peas', '1.0') gi.require_version('Gtk', '3.0') gi.require_version('Totem', '1.0') from gi.repository import GLib, GObject # pylint: disable-msg=E0611 from gi.repository import Peas, Gtk, Gdk # pylint: disable-msg=E0611 from gi.repository import Gio, Pango, Totem # ...
gpl-2.0
-7,027,128,247,818,014,000
33.122423
120
0.528834
false
3.866676
false
false
false
zisko/swift
utils/gyb_sourcekit_support/UIDs.py
1
20112
class KEY(object): def __init__(self, internal_name, external_name): self.internalName = internal_name self.externalName = external_name class REQUEST(object): def __init__(self, internal_name, external_name): self.internalName = internal_name self.externalName = external_name ...
apache-2.0
-8,134,150,137,723,769,000
49.65995
79
0.693467
false
3.61987
false
false
false
jethrogb/capirca
tests/nsxv_mocktest.py
1
2908
#!/usr/bin/python # # Copyright 2015 VMware Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # unless required by...
apache-2.0
-2,754,112,739,998,459,400
19.485915
74
0.644085
false
3.630462
false
false
false
aspuru-guzik-group/mission_control
mc/utils/artifact_processors/tgz_artifact_processor.py
1
1532
import base64 import io import tarfile from .base_artifact_processor import BaseArtifactProcessor class TgzArtifactProcessor(BaseArtifactProcessor): """ArtifactProcessor that converts dir <=> inline compressed bytes.""" ARTIFACT_TYPE = 'tgz:bytes' def dir_to_artifact(self, dir_=None, **kwargs): ...
apache-2.0
-3,113,657,809,457,523,700
36.365854
80
0.60705
false
3.596244
false
false
false
Jumpscale/jumpscale_core8
lib/JumpScale/baselib/atyourservice81/AtYourServiceDaemon.py
1
8827
from JumpScale import j import signal import time from multiprocessing import Pool from threading import Thread from JumpScale.baselib.jobcontroller.models.JobsCollections import JobsCollection import requests def run_action(repo_path, service_key, action_name, args=None): """ run_action execute a single acti...
apache-2.0
-6,406,522,419,450,290,000
31.571956
136
0.554549
false
4.231544
false
false
false
egenomics/micomba
extractor.py
1
2303
# -*- coding: utf-8 -*- """ Created on Fri Sep 20 11:13:08 2013 @author: JL Villanueva-Cañas @email: jlvillanueva84@gmail.com miraconvert -t hsnp A10_A04_first_assembly_out.maf assembly.html """ #Import all the functions and modules used. Check functions.py import sys from functions import * try: os.system('mkd...
apache-2.0
7,053,818,916,777,186,000
40.107143
145
0.688097
false
3.293276
false
false
false
YeelerG/scrapy
scrapy/commands/parse.py
1
8285
from __future__ import print_function import logging from w3lib.url import is_url from scrapy.commands import ScrapyCommand from scrapy.http import Request from scrapy.item import BaseItem from scrapy.utils import display from scrapy.utils.conf import arglist_to_dict from scrapy.utils.spider import iterate_spider_out...
bsd-3-clause
-3,189,306,492,249,167,000
36.152466
97
0.563186
false
4.211998
false
false
false
chakki-works/elephant_sense
scripts/features/structure_extractor.py
1
1913
import re from scripts.features.feature_extractor import FeatureExtractor from bs4 import BeautifulSoup class ItemizationCountExtractor(FeatureExtractor): def extract(self, post, extracted=None): soup = BeautifulSoup(post.rendered_body, "html.parser") count = len(soup.find_all("ul")) ret...
apache-2.0
3,689,835,707,631,683,600
26.637681
71
0.648663
false
3.94824
false
false
false
cheshirex/shul-calendar
parshaSheet.py
1
2461
#!/usr/bin/python # -*- coding: UTF-8 -*- #import times import hebcalendar import sys import datetime import io from oleHelper import * from convertdate import hebrew, utils year = int(sys.argv[1]) location = 'Israel' holidays = hebcalendar.get_year(year, location) # Excel version sheet = create_sheet() row = 2 ...
mit
-5,892,075,329,358,412,000
24.876404
123
0.622937
false
2.066427
false
false
false
vprime/puuuu
env/lib/python2.7/site-packages/paramiko/kex_gex.py
1
9584
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
mit
433,937,643,793,954,560
38.440329
116
0.58942
false
3.218267
false
false
false
philrosenfield/padova_tracks
interpolate/interpolate.py
1
13711
import os import matplotlib.pyplot as plt import numpy as np from scipy.interpolate import splev, splprep, interp1d from .. import utils from ..config import logT, logL, mass, age, MODE, EXT def interpolate_(track, inds, xcol=logT, ycol=logL, paracol=age, parametric=True, zcol=None, k=3, s=0., tol...
mit
2,124,830,646,507,943,000
31.959135
79
0.57494
false
3.383761
false
false
false
aholkner/MonthlyVisitor
common.py
1
1680
import bacon class Rect(object): def __init__(self, x1, y1, x2, y2): self.x1 = x1 self.y1 = y1 self.x2 = x2 self.y2 = y2 @property def width(self): return self.x2 - self.x1 @property def height(self): return self.y2 - self.y1 @property def ...
mit
-5,733,605,006,946,309,000
24.089552
108
0.542262
false
3.082569
false
false
false
mjirik/io3d
devel/dataset/transform_file_structure_test.py
1
2569
import pytest import os import unittest from pathlib import Path from devel.dataset import transform_file_structure import io3d from loguru import logger @unittest.skipIf(os.environ.get("TRAVIS", False), "Skip on Travis-CI") def test_pilsen_pigs(): input_dir = r'H:\biomedical\orig\pilsen_pigs_raw\transplantation'...
mit
-2,420,767,972,497,787,000
52.520833
204
0.708058
false
2.470192
true
false
false
luchy0120/BigDL
pyspark/setup.py
1
3633
#!/usr/bin/env python # # Copyright 2016 The BigDL 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 applicab...
apache-2.0
-1,545,072,304,926,910,700
31.4375
97
0.617947
false
3.792276
false
false
false
superdesk/superdesk-core
apps/publish/content/resend.py
1
4377
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from apps.ar...
agpl-3.0
7,894,393,774,888,422,000
41.086538
119
0.681289
false
3.961086
false
false
false
agent8/sift-python-sdk
siftapi/__init__.py
1
11649
#!/usr/bin/env python # coding=utf8 import json import hashlib import hmac import time import requests from . import version from .utils import build_url from .exceptions import APIError, EmailFilterRuleException VERSION = version.__version__ class Sift(object): def __init__(self, api_key, api_secret, env='pro...
mit
8,674,677,604,761,795,000
32.564841
86
0.525028
false
4.571036
false
false
false
Code4SA/pmg-cms-2
migrations/versions/3160b5df63b4_add_soundcloudtrack_model.py
1
1127
"""Add SoundcloudTrack model Revision ID: 3160b5df63b4 Revises: 8cbc3d8dd55 Create Date: 2016-08-31 11:29:40.489495 """ # revision identifiers, used by Alembic. revision = '3160b5df63b4' down_revision = '8cbc3d8dd55' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by ...
apache-2.0
-1,509,107,118,755,410,700
31.2
121
0.68323
false
3.295322
false
false
false
dtudares/hello-world
yardstick/yardstick/vTC/apexlake/tests/benchmarking_unit_test.py
1
19346
# Copyright (c) 2015 Intel Research and Development Ireland Ltd. # # 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 app...
apache-2.0
-8,064,327,179,224,230,000
39.642857
79
0.57769
false
3.978203
true
false
false
ardi69/pyload-0.4.10
pyload/plugin/hoster/YourfilesTo.py
1
1958
# -*- coding: utf-8 -*- import re import urllib from pyload.plugin.Hoster import Hoster class YourfilesTo(Hoster): __name = "YourfilesTo" __type = "hoster" __version = "0.22" __pattern = r'http://(?:www\.)?yourfiles\.(to|biz)/\?d=\w+' __description = """Youfiles.to hoster plugin""" _...
gpl-3.0
2,011,660,571,474,516,700
22.309524
104
0.521961
false
3.592661
false
false
false
Chris7/django-mailchimp
mailchimp/chimpy/chimpy.py
1
16441
import urllib import urllib2 import pprint from utils import transform_datetime from utils import flatten from warnings import warn import json as simplejson _debug = 1 class ChimpyException(Exception): pass class ChimpyWarning(Warning): pass class Connection(object): """mailchimp api connection""" ...
bsd-3-clause
-7,109,039,307,079,298,000
38.332536
133
0.577337
false
4.11025
true
false
false
1kastner/analyse_weather_data
filter_weather_data/filtering_pipe.py
1
10950
""" Run with -m filter_weather_data.start_filtering_pipe if you want to see the demo. """ import os import logging from gather_weather_data.husconet import GermanWinterTime from .filters import PROCESSED_DATA_DIR from .filters import StationRepository from .filters.preparation.average_husconet_radiation import ave...
agpl-3.0
-5,768,821,160,165,581,000
38.963504
117
0.670228
false
3.543689
false
false
false
ZeitOnline/zeit.cms
src/zeit/cms/generation/evolve7.py
1
1240
import zope.annotation import zope.component import zope.securitypolicy.interfaces import zeit.cms.content.template import zeit.cms.repository.interfaces import zeit.cms.generation import zeit.connector.interfaces def update(root): # Update templates to use special property class for container in root['templ...
bsd-3-clause
9,034,369,832,801,417,000
35.470588
75
0.71371
false
4.246575
false
false
false
paolodoz/timesheet
core/api/approvals.py
1
8063
from core.validation.validation import TSValidationError, validate_request, sanitize_objectify_json, stringify_objectid_cursor from core.api.crud import db from bson.objectid import ObjectId from core.validation.permissions import get_role_approval_step, check_datamine_permissions from core.notifications import notific...
gpl-2.0
-8,539,248,169,124,035,000
42.583784
147
0.584026
false
3.776581
false
false
false
kubevirt/client-python
kubevirt/models/k8s_io_apimachinery_pkg_apis_meta_v1_watch_event.py
1
4550
# coding: utf-8 """ KubeVirt API This is KubeVirt API an add-on for Kubernetes. OpenAPI spec version: 1.0.0 Contact: kubevirt-dev@googlegroups.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class K8sIoApi...
apache-2.0
-9,103,513,066,530,438,000
28.738562
253
0.581978
false
4.106498
false
false
false
ROCmSoftwarePlatform/rocFFT
scripts/perf/perflib/specs.py
1
3109
'''Get host/gpu specs.''' import re import socket import subprocess from dataclasses import dataclass from pathlib import Path as path from textwrap import dedent @dataclass class MachineSpecs: hostname: str cpu: str kernel: str ram: str distro: str rocmversion: str vbios: str gpuid: ...
mit
3,628,413,967,658,395,000
31.051546
142
0.551624
false
3.296925
false
false
false
jathak/ok-client
client/cli/test.py
1
1201
from client import exceptions as ex from client.cli import ok from client.api import assignment from client.cli.common import messages from client.protocols import grading from client.protocols import scoring import argparse import client import logging import os.path LOGGING_FORMAT = '%(levelname)s | pid %(process)d ...
apache-2.0
2,763,782,877,069,476,400
29.025
90
0.691923
false
3.874194
false
false
false
craighagan/HalloweenCostumes
ben-plane/test-button.py
1
4961
#!/usr/bin/env python import glob from time import sleep, time import os from itertools import cycle import threading import subprocess import RPi.GPIO as GPIO import steppermotor last_played_time = time() + 3600 sound_interval = 2 * 60 gain = 90 GPIO.cleanup() GPIO.setmode(GPIO.BCM) class RunWheels(threading.Thre...
artistic-2.0
6,971,094,515,639,816,000
26.10929
93
0.521064
false
3.680267
false
false
false
barentsen/dave
detrendThis/detrendThis.py
1
2613
from __future__ import division, print_function import logging import numpy as np # from martinsff import martinsff import extract_lc extract_lc = reload(extract_lc) from astropy.stats import median_absolute_deviation as MAD def twostepreplace(arr1, arr2, idx1, idx2, zpt): midx = np.arange(len(arr1))[idx1][zpt:]...
mit
3,206,858,722,527,893,500
26.797872
72
0.613471
false
3.121864
false
false
false
CuonDeveloper/cuon
cuon_client/cuon_newclient/bin/cuon/Windows/chooseWindows.py
1
1557
import sys import types import pygtk pygtk.require('2.0') import gtk import gtk.glade import string import logging import dataEntry import cuon.XMLRPC.xmlrpc import cuon.TypeDefs import cuon.Windows.cyr_load_entries import os import os.path from cuon.Windows.windows import windows class chooseWindows(windows): ...
gpl-3.0
98,911,730,256,419,820
25.844828
67
0.542068
false
3.825553
false
false
false
kal/quince
quince/core/qdiff.py
1
3981
__author__ = 'Kal Ahmed' from itertools import dropwhile import re import git from quince.core.repo import git_dir, QUINCE_DIR, QuinceStore LINE_REGEX = re.compile(r"(?P<s>" + QuinceStore.IRI_MATCH + r")\s+(?P<p>" + QuinceStore.IRI_MATCH + r")\s+" + r"(?P<o>" + QuinceStore.URI_OR_L...
gpl-3.0
6,024,509,577,190,063,000
32.617391
140
0.525245
false
3.605978
false
false
false
jrobben/opens3box
src/tray.py
1
9070
#!/usr/bin/env python # Module : SysTrayIcon.py # Synopsis : Windows System tray icon. # Programmer : Simon Brunning - simon@brunningonline.net # Date : 11 April 2005 # Notes : Based on (i.e. ripped off from) Mark Hammond's # win32gui_taskbar.py and win32gui_menu.py demos from PyWin32 impo...
lgpl-3.0
-5,809,192,261,436,947,000
40.797235
104
0.532415
false
3.84485
false
false
false
haup/totoro
totoro/app/auth/views.py
1
6038
from flask import render_template, redirect, request, url_for, flash from flask_login import login_user, logout_user, login_required, current_user from . import auth from .. import db from ..models import User from ..email import send_email from .forms import LoginForm, RegistrationForm, ChangePasswordForm,\ Passwo...
gpl-3.0
3,939,085,964,222,901,000
35.817073
78
0.639285
false
3.967148
false
false
false
adykstra/mne-python
mne/inverse_sparse/mxne_debiasing.py
2
3610
# Authors: Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # # License: BSD (3-clause) from math import sqrt import numpy as np from scipy import linalg from ..utils import check_random_state, logger, verbose def power_iteration_kron(A, C, ...
bsd-3-clause
6,390,753,436,959,494,000
25.940299
77
0.558726
false
3.19752
false
false
false
gokudomatic/cobiv
cobiv/modules/core/session/cursor.py
1
15381
from kivy.app import App from kivy.event import EventDispatcher from kivy.properties import StringProperty, NumericProperty, ObjectProperty class CursorInterface(EventDispatcher): filename = StringProperty(None, allownone=True) repo_key = NumericProperty(None, allownone=True) pos = NumericProperty(None, a...
mit
-6,886,452,716,560,572,000
28.982456
110
0.583772
false
3.997141
false
false
false
ruibarreira/linuxtrail
usr/lib/python3/dist-packages/orca/spellcheck.py
1
9485
# Orca # # Copyright 2014 Igalia, S.L. # # Author: Joanmarie Diggs <jdiggs@igalia.com> # # 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 o...
gpl-3.0
5,192,711,434,053,360,000
30.616667
89
0.646073
false
4.149169
false
false
false
sideshowAnthony/python-image-tool
Gui.py
1
2678
#!/usr/bin/env python import wx from Controller import Controller # Run this file to start the application # Handles gui stuff only, and passes data to and from the controller only # Developed using: # - Python (major=2, minor=7, micro=6, releaselevel='final', serial=0) # - wx version 2.8.12.1 # - Ubuntu 14.04 clas...
mit
5,636,673,782,651,108,000
32.074074
125
0.714712
false
2.920393
false
false
false
spyder-ide/spyder-terminal
spyder_terminal/terminalplugin.py
1
4717
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Spyder Project Contributors # # Licensed under the terms of the MIT License # (see LICENSE.txt for details) # ----------------------------------------------------------------------------- """Terminal ...
mit
-9,207,553,236,894,733,000
33.430657
79
0.586178
false
4.327523
false
false
false
LiamBrandt/wiki-7dtd-page-generator
wiki.py
1
15455
""" Part of the 7 Days to Die Wiki Content Generator Copyright (C) 2017 Liam Brandt <brandt.liam@gmail.com> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at you...
gpl-3.0
3,209,940,783,927,221,000
38.832474
114
0.555678
false
3.767674
true
false
false
CSCSI/Lost-Visions
lost_visions/forms.py
1
1756
from django import forms __author__ = 'ubuntu' def tag_form_factory(image_tags): # 'question' : forms.IntegerField(widget=forms.HiddenInput, initial=question.id), properties = {} for tag in image_tags: properties[image_tags[tag]] = forms.BooleanField(initial=True) return type('TagForm', (form...
apache-2.0
-8,602,916,351,463,813,000
27.322581
81
0.666856
false
3.834061
false
false
false
team-vigir/vigir_behaviors
behaviors/vigir_behavior_turn_valve/src/vigir_behavior_turn_valve/turn_valve_sm.py
1
31339
#!/usr/bin/env python ########################################################### # WARNING: Generated code! # # ************************** # # Manual changes may get lost if file is generated again. # # Only code inside the [MANUAL] tags will be kept. ...
bsd-3-clause
-4,232,095,957,811,907,600
49.465378
228
0.669166
false
3.261761
true
false
false
andreasvc/disco-dop
discodop/treesearch.py
1
51380
"""Objects for searching through collections of trees.""" # Possible improvements: # - cache raw results from _query() before conversion? # - return/cache trees as strings? import io import os import re import csv import sys import mmap import array import tempfile import subprocess import multiprocessing import conc...
gpl-2.0
-8,412,140,963,899,086,000
33.003971
77
0.666835
false
3.140011
false
false
false
jcotton42/libuseful
gui.py
1
1928
""" The GUI that launches all the subprograms """ from tkinter import * import os, sys, webbrowser class MainGui(Tk): """ Main window of application """ def __init__(self, *args, **kwargs): Tk.__init__(self, *args, **kwargs) self.title('libuseful') old_dir = os....
gpl-3.0
8,653,398,009,651,159,000
41.818182
114
0.519191
false
4.093418
false
false
false
rabrahm/ceres
feros/ferospipe_fp.py
1
79430
import sys import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages from pylab import * base = '../' sys.path.append(base+"utils/Correlation") sys.path.append(base+"utils/GLOBALutils") sys.path.append(base+"utils/OptExtract") sys.path.append(base+"...
mit
-1,079,215,361,342,024,700
41.888769
182
0.580461
false
2.606142
false
false
false
crckyl/pixplus
test/test18_configui.py
1
10541
import os import time from selenium.webdriver.support.select import Select from selenium.webdriver.common.keys import Keys import util from test_base import TestCase class Test_ModConfigUI(TestCase): # TODO: bookmark.tag_order # TODO: bookmark.tag_aliases def setUp(self): TestCase.setUp(self) self.co...
mit
7,039,928,174,836,152,000
33.447712
120
0.613983
false
3.245382
true
false
false
Royal-Society-of-New-Zealand/NZ-ORCID-Hub
orcid_api_v3/models/source_v20.py
1
5024
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import si...
mit
4,904,121,067,320,620,000
29.26506
119
0.580016
false
3.749254
false
false
false
Guokr1991/POCS
smach/container.py
1
9612
import traceback import threading from contextlib import contextmanager import smach __all__ = ['Container'] class Container(smach.state.State): """Smach container interface. This provides an interface for hooking into smach containers. This includes methods to get and set state, as well as provide sta...
mit
932,796,809,544,031,200
34.208791
151
0.610175
false
4.625602
false
false
false
sposs/DIRAC
TransformationSystem/Agent/TransformationCleaningAgent.py
1
26911
""" :mod: TransformationCleaningAgent ================================= .. module: TransformationCleaningAgent :synopsis: clean up of finalised transformations """ # # imports import re from datetime import datetime, timedelta # # from DIRAC from DIRAC import S_OK, S_ERROR from DIRAC.Core.Base.AgentModule...
gpl-3.0
3,899,026,061,342,063,000
41.648177
127
0.634648
false
4.186528
false
false
false
fluxer/spm
nuitka/nuitka/utils/InstanceCounters.py
1
2391
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
gpl-2.0
-2,947,606,891,410,683,400
28.8875
80
0.630698
false
3.862682
false
false
false
Hunter522/qgroundcontrol
deploy/GooglePlayUpload.py
3
3329
#!/usr/bin/python # # Copyright 2014 Marta Rodriguez. # # 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...
agpl-3.0
-559,583,894,364,044,700
35.582418
135
0.70021
false
3.787258
false
false
false
zappyk-github/zappyk-python
lib/lib_external/postgresql/driver/dbapi20.py
1
9919
## # .driver.dbapi20 - DB-API 2.0 Implementation ## """ DB-API 2.0 conforming interface using postgresql.driver. """ threadsafety = 1 paramstyle = 'pyformat' apilevel = '2.0' from operator import itemgetter from functools import partial import datetime import time import re from .. import clientparameters as pg_param...
gpl-2.0
-2,000,818,581,374,963,500
23.251834
75
0.662668
false
3.088107
false
false
false
HybridF5/jacket
jacket/tests/storage/unit/targets/targets_fixture.py
1
4524
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
-2,476,833,427,629,326,300
40.504587
79
0.566755
false
3.610535
true
false
false
biztudio/JustPython
syntaxlab/src/play_file.py
1
1912
# coding: UTF-8 import os import fileinput import re class TextReplacer: def __init__(self): self.file = '' def replace_text_in_file(self, file_location = '', text_current = '', text_new = ''): self.file = file_location print('Plan to change ' ,text_current, ' to ',text_new) if o...
mit
-2,945,134,466,378,845,700
32.740741
166
0.583196
false
3.378479
false
false
false
gnuworldman/verschemes
src/verschemes/python.py
1
5563
# -*- coding: utf-8 -*- """verschemes.python module The Python verschemes module implements standard `Python <https://www.python.org/>`_ `versioning <https://docs.python.org/3/faq/general.html#how-does-the-python-version-numbering-scheme-work>`__. """ # Support Python 2 & 3. from __future__ import (absolute_import, ...
gpl-3.0
6,923,158,320,131,373,000
29.398907
110
0.627899
false
4.192163
false
false
false
Universal-Model-Converter/UMC3.0a
dev tests and files/data backups/GUI_dev4.5.py
1
10040
#1 #v 0.001 import COMMON #file vars and functions for import/export processing import VIEWER #mainly for the toggles from VIEWER import __GL,__GLU#,__GLUT #GL functions ''' from COMMON import Scripts #Shapes (private) #Widgets (private) def Button(Text,X,Y,W,H,): pass def Browser(): import os Dir='C:/';...
mit
4,044,090,322,282,345,000
30.974522
129
0.614143
false
2.205624
false
false
false
ZenHarbinger/spotipy
spotipy/navigationcontrol.py
1
1961
# -*- coding: utf-8 -*- class NavigationType(object): UKNOWN = 0 PLAYLIST = 1 ALBUM = 2 ARTIST = 3 SEARCH = 4 class NavigationCommand(object): def __init__(self, uri, tracks=[], playlist=None, html=""): self.__uri = uri self.__playlist = playlist self.__html = html ...
apache-2.0
3,457,596,106,350,657,500
26.236111
63
0.54462
false
3.785714
false
false
false
pschanely/gunicorn
gunicorn/workers/geventlet.py
1
1462
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. from __future__ import with_statement import os try: import eventlet except ImportError: raise RuntimeError("You need eventlet installed to use this worker.") from eventlet import h...
mit
8,227,322,796,011,741,000
27.666667
73
0.642955
false
3.972826
false
false
false
dannygoldstein/sncosmo
sncosmo/spectrum.py
1
3579
# Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np import astropy.units as u import astropy.constants as const from scipy.interpolate import splrep, splev from .bandpasses import get_bandpass from .utils import integration_grid from .constants import SPECTRUM_BANDFLUX_SPACING, HC_ERG_A...
bsd-3-clause
7,973,306,949,305,088,000
35.520408
79
0.58983
false
3.791314
false
false
false
jrg365/gpytorch
gpytorch/priors/lkj_prior.py
1
7346
#!/usr/bin/env python3 import math from numbers import Number import torch from torch.distributions import constraints from torch.nn import Module as TModule from ..utils.cholesky import psd_safe_cholesky from .prior import Prior class LKJPrior(Prior): r"""LKJ prior over n x n (positive definite) correlation m...
mit
-7,207,974,533,534,708,000
39.585635
99
0.64661
false
3.658367
false
false
false
rriggio/empower-runtime
empower/cli/command.py
1
9332
#!/usr/bin/env python3 # # Copyright (c) 2019 Roberto Riggio # # 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 applicabl...
apache-2.0
8,245,831,961,818,503,000
29.200647
79
0.62291
false
3.216822
false
false
false
andyvand/cygsystem-config-llvm
src/system-config-lvm.py
1
6024
#!/usr/bin/python2 """Entry point for system-config-lvm. This application wraps the LVM2 command line interface in a graphical user interface. """ import sys import types import select import signal import string import os from lvmui_constants import PROGNAME, INSTALLDIR #PROGNAME = "system-config-lvm" #IN...
gpl-2.0
-8,221,876,840,933,990,000
33.62069
229
0.539011
false
3.970995
true
false
false
juanbond/doctorcoin
contrib/bitrpc/bitrpc.py
1
7842
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") else: access = Ser...
mit
7,169,407,709,199,592,000
23.203704
79
0.661948
false
3.054928
false
false
false
Kortemme-Lab/klab
klab/pymath/cartesian/spatialhash.py
1
3994
#!/usr/bin/python2.4 import sys import math localfloor = math.floor class SpatialHash3D: # Optimized version of SpatialHash for three dimensional space # Optimizations work by assuming the following: # The space is three dimensional; # The area of a quadrant is r*r*r and r is always used as the radi...
mit
739,005,489,791,400,300
31.209677
168
0.556585
false
3.607949
false
false
false
sequana/sequana
sequana/utils/config.py
1
1722
# -*- coding: utf-8 -*- # # This file is part of Sequana software # # Copyright (c) 2016 - Sequana Development Team # # File author(s): # Thomas Cokelaer <thomas.cokelaer@pasteur.fr> # Dimitri Desvillechabrol <dimitri.desvillechabrol@pasteur.fr>, # <d.desvillechabrol@gmail.com> # # Distributed un...
bsd-3-clause
7,808,641,144,448,337,000
30.888889
78
0.678281
false
3.153846
false
false
false
PetrDlouhy/django-import-export
import_export/resources.py
1
30506
from __future__ import unicode_literals import functools import tablib import traceback from copy import deepcopy from diff_match_patch import diff_match_patch from django import VERSION from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management.color import ...
bsd-2-clause
147,464,280,229,419,070
34.596266
128
0.578083
false
4.573613
false
false
false
kitanata/resume
env/bin/pilprint.py
1
2408
#!/Users/raymond/Projects/resume/env/bin/python2.7 # # The Python Imaging Library. # $Id$ # # print image files to postscript printer # # History: # 0.1 1996-04-20 fl Created # 0.2 1996-10-04 fl Use draft mode when converting. # 0.3 2003-05-06 fl Fixed a typo or two. # from __future__ import print_function...
mit
4,620,902,453,395,692,000
24.347368
67
0.560631
false
3.127273
false
false
false
bayesimpact/bob-emploi
data_analysis/misc/pcs_to_fap_mapping.py
1
1981
"""Script to compute the mapping between PCS and ROME classifications.""" import os import sys from typing import Optional, TextIO, Union import pandas as pd def main( output_csv: Union[str, TextIO], filename: Optional[str] = None, data_folder: str = 'data') \ -> None: """Compute the mapping bet...
gpl-3.0
-6,544,923,891,397,089,000
38.62
100
0.652196
false
2.87936
false
false
false
DataDog/integrations-core
datadog_checks_dev/datadog_checks/dev/tooling/commands/config.py
1
4384
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) import os from fnmatch import fnmatch import click import toml from ..config import ( CONFIG_FILE, SECRET_KEYS, config_file_exists, read_config_file, read_config_file_scrubbed, re...
bsd-3-clause
4,002,231,088,186,122,000
29.444444
111
0.664462
false
3.687132
true
false
false