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
apmichaud/vitess-apm
test/queryservice_test.py
1
2644
#!/usr/bin/env python import logging import optparse import traceback import unittest import sys import utils import framework from queryservice_tests import cache_tests from queryservice_tests import nocache_tests from queryservice_tests import stream_tests from queryservice_tests import status_tests from queryserv...
bsd-3-clause
2,655,012,504,257,989,000
33.789474
96
0.664145
false
pavelponomarev/Elmer_IM2D_cases
IM_one_pole/cage/cage_generator.py
1
9486
# Elmer circuit equations generator for a cage winding taking into account periodicity # Author: P. Ponomarev # July 2016 # changelog: # version 1.3 (03.2017) by PP: # - added 'boffset' parameter - offset of the body numbers # version 1.2 (01.2017) by PP: # - added 'ns' parameter - number of slices for ...
gpl-3.0
-1,045,329,439,116,759,700
43.12093
133
0.37666
false
oddt/oddt
oddt/docking/AutodockVina.py
1
15674
import sys import subprocess import re import os import warnings from tempfile import mkdtemp from shutil import rmtree from distutils.spawn import find_executable from tempfile import gettempdir from six import string_types import oddt from oddt.utils import (is_openbabel_molecule, is_molecul...
bsd-3-clause
8,064,540,954,755,132,000
36.859903
85
0.534133
false
clarin-eric/Centre-Registry
centre-registry-app/centre_registry/migrations/0001_initial.py
1
13641
# pylint: disable=invalid-name import centre_registry.models from django.db import migrations from django.db import models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [] operations = [ migrations.CreateModel( name='Centre', fields=[ ...
gpl-3.0
-708,127,677,141,282,700
41.761755
119
0.467268
false
google/sqlcommenter
python/sqlcommenter-python/tests/sqlalchemy/tests.py
1
4346
#!/usr/bin/python # # Copyright 2019 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 ag...
apache-2.0
-5,383,465,248,542,579,000
32.953125
104
0.627474
false
olix0r/vtwt
vtwt/util.py
1
1493
import re from htmlentitydefs import name2codepoint from twisted.python.text import greedyWrap from twisted.web.error import Error as WebError # From http://wiki.python.org/moin/EscapingHtml _HTMLENT_CODEPOINT_RE = re.compile('&({0}|#\d+);'.format( '|'.join(name2codepoint.keys()))) def recodeText(text): ...
bsd-3-clause
-5,111,688,798,574,299,000
24.305085
68
0.561956
false
onlynight/wechat-dump
wechat/smiley.py
1
4076
#!/usr/bin/env python2 # -*- coding: UTF-8 -*- # File: smiley.py # Date: Thu Jun 18 00:02:43 2015 +0800 # Author: Yuxin Wu <ppwwyyxxc@gmail.com> import os import re import json import struct from common.textutil import get_file_b64 STATIC_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static') UNI...
gpl-3.0
-4,862,418,928,206,776,000
31.15873
94
0.57848
false
molpopgen/fwdpy11
examples/discrete_demography/localadaptation.py
1
7832
# # Copyright (C) 2019 Kevin Thornton <krthornt@uci.edu> # # This file is part of fwdpy11. # # fwdpy11 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...
gpl-3.0
-7,623,108,832,788,986,000
30.967347
86
0.621425
false
kastman/lyman
lyman/tests/test_surface.py
1
1392
import pytest from .. import surface class TestSurfaceMeasure(object): def test_surface_measure_neighbors(self, meshdata): sm = surface.SurfaceMeasure(meshdata["verts"], meshdata["faces"]) for v, v_n in sm.neighbors.items(): assert v_n == pytest.approx(meshdata["neighbors"][v]) ...
bsd-3-clause
3,423,571,037,266,909,700
27.408163
73
0.58477
false
GbalsaC/bitnamiP
django-wiki/wiki/plugins/links/wiki_plugin.py
1
1271
# -*- coding: utf-8 -*- from django.conf.urls.defaults import patterns, url from django.utils.translation import ugettext_lazy as _ from wiki.conf import settings from wiki.core.plugins import registry from wiki.core.plugins.base import BasePlugin from wiki.plugins.links import views from wiki.plugins.links.mdx.urlize...
agpl-3.0
1,642,203,236,917,021,200
32.447368
96
0.651456
false
OPU-Surveillance-System/monitoring
master/scripts/planner/solvers/test_penalization_plot.py
1
1040
import matplotlib.pyplot as plt with open("test_pen", "r") as f: data = f.read() data = data.split("\n")[:-1] data = [data[i].split(" ") for i in range(0, len(data))] pen = [float(data[i][0]) for i in range(len(data))] u = [float(data[i][1]) for i in range(len(data))] d = [float(data[i][2]) for i in range(len(data...
mit
1,042,806,748,452,897,400
37.518519
75
0.632692
false
Silvian/samaritan
emailservice/views.py
1
2372
""" @author: Silvian Dragan @Date: 17/06/2016 @Copyright: Copyright 2016, Samaritan CMA - Published under GNU General Public Licence v3 @Details: https://github.com/Silvian/samaritan """ import json from django.contrib.auth import get_user from django.contrib.auth.decorators import login_required from django.http impo...
gpl-3.0
-769,699,822,619,569,500
28.283951
90
0.664418
false
kyubifire/softlayer-python
SoftLayer/fixtures/SoftLayer_Virtual_Guest.py
1
19232
getObject = { 'id': 100, 'hostname': 'vs-test1', 'domain': 'test.sftlyr.ws', 'fullyQualifiedDomainName': 'vs-test1.test.sftlyr.ws', 'status': {'keyName': 'ACTIVE', 'name': 'Active'}, 'billingItem': { 'id': 6327, 'nextInvoiceTotalRecurringAmount': 1.54, 'children': [ ...
mit
-4,988,771,412,386,916,000
27.619048
93
0.391275
false
d120/pyfeedback
src/feedback/models/fragebogen2016.py
1
14676
# coding=utf-8 from django.db import models from feedback.models import Fragebogen, Ergebnis class Fragebogen2016(Fragebogen): fach = models.CharField(max_length=5, choices=Fragebogen.FACH_CHOICES, blank=True) abschluss = models.CharField(max_length=5, choices=Fragebogen.ABSCHLUSS_CHOICES, blank=True) sem...
agpl-3.0
4,768,601,658,121,352,000
66
157
0.658291
false
littley/network_cjl
network_cjl/ReceiveRequest.py
1
1833
import time class ReceiveRequest(object): """ A ReceiveRequest is generated every time the first packet from a message is received. The ReceiveRequest then keeps track of all of the message's packets that have already ben received. """ def __init__(self, inital_packet, (host, port)): s...
apache-2.0
-5,376,255,074,754,944,000
29.55
109
0.61593
false
DedMemez/ODS-August-2017
golf/GolfGlobals.py
1
13007
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.golf.GolfGlobals from direct.directnotify import DirectNotifyGlobal import random MAX_PLAYERS_PER_HOLE = 4 GOLF_BALL_RADIUS = 0.25 GOLF_BALL_VOLUME = 4.0 / 3.0 * 3.14159 * GOLF_BALL_RADIUS ** 3 GOLF_BALL_MASS = 0.5 GOLF_BALL_DENSITY = GOLF_BALL_...
apache-2.0
-2,305,301,541,882,050,600
26.158009
113
0.496041
false
fluxer/spm
nuitka/nuitka/Builtins.py
1
6584
# 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
8,219,563,310,531,405,000
30.806763
79
0.605559
false
seanbell/opensurfaces
server/intrinsic/algorithm/grosse2009/intrinsic.py
1
10552
import itertools import numpy as np import os import png import sys import poisson ############################### Data ########################################### def load_png(fname): reader = png.Reader(fname) w, h, pngdata, params = reader.read() image = np.vstack(itertools.imap(np.uint16, pngdata)) ...
mit
-6,676,248,594,824,166,000
32.18239
99
0.60453
false
sigurdga/samklang-blog
samklang_blog/views.py
1
2247
from django.http import HttpResponseRedirect from django.views.generic.edit import CreateView, UpdateView from django.views.generic.dates import ArchiveIndexView, YearArchiveView, MonthArchiveView, DateDetailView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decora...
agpl-3.0
-2,393,359,891,051,174,000
29.780822
106
0.70227
false
czpython/django-cms
cms/page_rendering.py
1
2938
# -*- coding: utf-8 -*- from django.conf import settings from django.core.urlresolvers import resolve, Resolver404, reverse from django.http import Http404 from django.shortcuts import render from django.template.response import TemplateResponse from cms import __version__ from cms.cache.page import set_page_cache fro...
bsd-3-clause
3,639,318,368,674,407,400
35.725
102
0.687543
false
rivasd/djPsych
djreceive/migrations/0019_singleaudiotrial.py
1
1328
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-01-04 19:35 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('djreceive', '0018_auto_20170104_1418')...
gpl-3.0
-2,971,340,042,235,738,600
35.888889
114
0.565512
false
lrocheWB/navitia
source/jormungandr/jormungandr/scenarios/helpers.py
1
8430
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
agpl-3.0
-456,811,872,450,253,060
37.318182
116
0.655753
false
ruhan/django-silk-mongoengine
setup.py
1
1322
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme_file: README = readme_file.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-silk', version='0...
mit
-4,198,657,876,189,128,000
28.377778
80
0.587746
false
UstadMobile/exelearning-ustadmobile-work
testing/runtests.py
1
3225
#!/usr/bin/python # =========================================================================== # config unittest # Copyright 2004, University of Auckland # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software F...
gpl-2.0
2,101,990,094,750,326,500
41.434211
77
0.710388
false
HaraldWeber/client
src/ladder/__init__.py
1
1144
from PyQt4 import QtCore from PyQt4 import QtWebKit import logging import urllib import util logger = logging.getLogger(__name__) class Ladder(QtCore.QObject): def __init__(self, client, *args, **kwargs): QtCore.QObject.__init__(self, *args, **kwargs) logger.debug("Ladder tab instantiating.") ...
gpl-3.0
-2,618,006,111,668,638,000
27.6
139
0.615385
false
anshengme/Angelina
apps/users/views.py
1
15715
import json from django.contrib.auth import authenticate, login, logout from django.contrib.auth.backends import ModelBackend from django.contrib.auth.hashers import make_password from django.core.exceptions import ObjectDoesNotExist # ORM get查询不到数据 from django.core.urlresolvers import reverse from django.db.models i...
mit
-7,679,907,315,270,004,000
35.074359
108
0.605942
false
frobnitzem/slack
gen/plan.py
1
1926
# Plan a parallel copy using n workers into output shape s. # The algorithm requires prod(s) to be a multiple of n and # works by matching factors from n with those of s, # with preference to the right (for R) or left (for L). # This means as many workers as possible for the most sig. dimensions, # each doing as many c...
gpl-3.0
-4,937,704,351,101,991,000
26.913043
84
0.548806
false
thopiekar/Cura
cura/Settings/CuraContainerRegistry.py
1
45586
# Copyright (c) 2019 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import os import re import configparser from typing import Any, cast, Dict, Optional, List, Union from PyQt5.QtWidgets import QMessageBox from UM.Decorators import override from UM.Settings.ContainerFormatError...
lgpl-3.0
888,320,683,751,068,900
57.511749
321
0.624841
false
agdsn/hades
src/hades/common/cli.py
1
5189
"""Functionality for the Hades command-line utilities in :mod:`hades.bin`.""" import argparse import logging.handlers import os import sys import textwrap from gettext import gettext as _ from hades import constants class ArgumentParser(argparse.ArgumentParser): """ArgumentParser subclass that exists with :data:...
mit
-2,648,820,304,603,994,000
36.601449
115
0.63943
false
etingof/pyasn1-modules
tests/test_rfc3657.py
2
6803
# # This file is part of pyasn1-modules software. # # Created by Russ Housley # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # import sys import unittest from pyasn1.codec.der.decoder import decode as der_decoder from pyasn1.codec.der.encoder import encode as der_encoder ...
bsd-2-clause
-370,215,760,429,315,650
39.736527
87
0.759077
false
souravbadami/oppia
core/domain/exp_jobs_one_off_test.py
1
92168
# coding: utf-8 # # Copyright 2014 The Oppia Authors. 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 requi...
apache-2.0
-433,900,859,914,173,500
39.780531
135
0.613851
false
sunlightlabs/tcamp
tcamp/sked/migrations/0012_auto__add_field_location_has_sessions.py
1
9931
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Location.has_sessions' db.add_column(u'sked_location', 'has_sessions', ...
bsd-3-clause
-2,078,722,091,345,254,700
77.204724
187
0.551908
false
tangowhisky37/RaspiPythonProjects
Write_To_LCD_Screen/RPi_I2C_driver.py
1
4851
# -*- coding: utf-8 -*- """ Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic Made available under GNU GENERAL PUBLIC LICENSE # Modified Python I2C library for Raspberry Pi # as found on http://www.recantha.co.uk/blog/?p=4849 # Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library # adde...
gpl-3.0
9,119,408,727,036,929,000
24.803191
78
0.652031
false
santoshsahoo/personfinder
app/admin_review.py
1
5813
#!/usr/bin/python2.5 # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
6,470,416,251,959,256,000
37.243421
80
0.54963
false
arangodb/arangodb
3rdParty/rocksdb/6.8/tools/advisor/test/test_db_log_parser.py
14
4605
# Copyright (c) 2011-present, Facebook, Inc. All rights reserved. # This source code is licensed under both the GPLv2 (found in the # COPYING file in the root directory) and Apache 2.0 License # (found in the LICENSE.Apache file in the root directory). from advisor.db_log_parser import DatabaseLogs, Log, NO_COL_FA...
apache-2.0
3,976,545,626,828,295,000
43.708738
79
0.616721
false
project-zerus/blade
src/blade/sh_test_target.py
1
3937
# Copyright (c) 2016 Tencent Inc. # All rights reserved. # # Author: Li Wenting <wentingli@tencent.com> # Date: June 2, 2016 """ This module defines sh_test target which executes a shell script. """ import os import blade import build_rules import console from blade_util import var_to_list from blade_util import...
bsd-3-clause
-8,556,172,725,187,871,000
30.75
83
0.493015
false
ximion/Clementine-LibDanceTag
data/pythonlibs/uic/properties.py
1
14787
import logging import sys from uic.exceptions import UnsupportedPropertyError from uic.icon_cache import IconCache if sys.hexversion >= 0x03000000: from uic.port_v3.ascii_upper import ascii_upper else: from uic.port_v2.ascii_upper import ascii_upper logger = logging.getLogger(__name__) DEBUG = logger.debug ...
gpl-3.0
281,255,060,788,967,330
32.454751
114
0.57368
false
villaverde/iredadmin
libs/iredutils.py
1
17090
# encoding: utf-8 # Author: Zhang Huangbin <zhb@iredmail.org> from os import urandom, getloadavg import re import time import urllib2 import socket from base64 import b64encode, b64decode from xml.dom.minidom import parseString as parseXMLString import random import subprocess import web import settings from libs impo...
gpl-2.0
3,642,822,410,555,801,600
26.788618
106
0.572089
false
andrewhao/dotfiles
weechat.symlink/python/autoload/wee_slack.py
1
141239
# -*- coding: utf-8 -*- from __future__ import unicode_literals from functools import wraps import time import json import pickle import sha import os import re import urllib import sys import traceback import collections import ssl import random import string from websocket import create_connection, WebSocketConne...
mit
-3,852,895,032,448,216,000
37.0493
239
0.593313
false
RPGOne/Skynet
pytorch-master/torch/nn/modules/linear.py
1
1934
import math import torch from torch.nn.parameter import Parameter from .module import Module class Linear(Module): r"""Applies a linear transformation to the incoming data: :math:`y = Ax + b` Args: in_features: size of each input sample out_features: size of each output sample bias:...
bsd-3-clause
-3,095,174,257,862,721,500
29.698413
89
0.592037
false
Huyuwei/tvm
python/setup.py
1
5411
# 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
-311,008,582,766,743,360
32.196319
96
0.608575
false
andrewklau/openshift-tools
openshift/installer/vendored/openshift-ansible-3.5.13/filter_plugins/oo_filters.py
2
41534
#!/usr/bin/python # -*- coding: utf-8 -*- # vim: expandtab:tabstop=4:shiftwidth=4 # pylint: disable=no-name-in-module, import-error, wrong-import-order, ungrouped-imports """ Custom filters for use in openshift-ansible """ import os import pdb import pkg_resources import re import json import yaml import random from a...
apache-2.0
-3,096,275,517,794,424,000
40.555556
149
0.55179
false
PyPlanet/PyPlanet
pyplanet/core/storage/storage.py
1
3977
import asyncio_extras import os import importlib from async_generator import yield_ from pyplanet.conf import settings from pyplanet.core.storage import StorageDriver, StorageInterface class Storage(StorageInterface): """ The storage component manager is managing the storage access trough drivers that can be cust...
gpl-3.0
4,460,439,379,608,528,000
33.885965
108
0.713603
false
Inspq/ansible
lib/ansible/modules/packaging/os/pacman.py
1
15030
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2012, Afterburn <http://github.com/afterburn> # (c) 2013, Aaron Bull Schaefer <aaron@elasticdog.com> # (c) 2015, Indrajit Raychaudhuri <irc+code@indrajit.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it un...
gpl-3.0
989,851,401,062,312,200
32.178808
270
0.574784
false
kg-bot/SupyBot
plugins/Mailbox/plugin.py
1
6690
### # Copyright (c) 2005, Jeremiah Fincher # Copyright (c) 2006, Jon Phillips # Copyright (c) 2006, Creative Commons # All rights reserved. ### import time import rfc822 import poplib import textwrap from cStringIO import StringIO as sio import supybot.utils as utils import supybot.world as world from supybot.command...
gpl-3.0
6,275,430,813,889,883,000
34.210526
79
0.557848
false
Tancata/phylo
test_for_lgt_more_groups.py
1
6655
from ete3 import Tree, TreeStyle import sys, re #read in the bootstrapped consensus tree from one of Cedric's families. Ask whether the candidate LGT has phylogenetic support at some bootstrap threshold by checking various tree-based criteria for LGTs #Arguments: treefile target_sequence_tag #euk_supergroups = ['Vir...
mit
-7,968,757,924,115,821,000
43.66443
203
0.6284
false
taimur97/Feeder
server/flaskapp/feeder/rest.py
1
7265
# -*- coding: utf-8 -*- ''' The REST-API of Feeder ''' from feeder import app from .database import db from .models import (Feed, FeedItem, UserFeed, UserDeletion, get_user, get_feed, get_userfeed) #from flask_oauthlib.client import OAuth from flask.ext.restful import (Resource, Api, reqparse, fie...
gpl-2.0
6,649,980,418,391,360,000
27.490196
84
0.591053
false
welchbj/tt
tt/tests/unit/expressions/test_bexpr_sat_all.py
1
4209
"""Tests for expression sat_all functionality.""" from tt.errors import NoEvaluationVariationError from tt.expressions import BooleanExpression as be from ._helpers import ExpressionTestCase class TestExpressionSatAll(ExpressionTestCase): def test_only_constants_exprs_cause_exception(self): """Test tha...
mit
819,618,383,093,715,800
39.864078
78
0.577809
false
sparrow242/demandfs
demandfs/demandfs.py
1
13810
#!/usr/bin/env python """ demandfs.py - mount and umount sources on demand Copyright (C) 2013 Sebastian Meyer <s.meyer@drachenjaeger.eu> Based upon the the xmp.py-FS Example in the fuse-python distribtion: Copyright (C) 2001 Jeff Epler <jepler@unpythonic.dhs.org> Copyright (C) 2006 Csaba Henk <csa...
gpl-3.0
-5,716,152,501,423,935,000
32.933661
79
0.547791
false
googleapis/googleapis-gen
google/cloud/dialogflow/cx/v3beta1/dialogflow-cx-v3beta1-py/google/cloud/dialogflowcx_v3beta1/types/fulfillment.py
1
7242
# -*- 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
-547,233,568,092,019,840
35.39196
127
0.607705
false
darafferty/factor
factor/lib/operation.py
1
16793
""" General operation library Contains the master class for all operations """ import os import logging import socket import subprocess import numpy as np import sys import uuid from factor import _logging from jinja2 import Environment, FileSystemLoader from lofarpipe.support.utilities import create_directory DIR = ...
gpl-2.0
-2,884,447,275,419,179,000
37.872685
94
0.581909
false
sampathweb/game_app
card_games/play_blackjack.py
1
1843
#!/usr/bin/env python from __future__ import print_function from blackjack import BlackJack def play_blackjack(player): game = BlackJack() while True: print('Your Hand %s is of value %d' % (game.player_hand, game.player_hand_value())) action = raw_input('Enter: hit (1), stand (2) or split (3) ...
mit
2,510,335,775,484,046,300
40.886364
146
0.558871
false
chakki-works/arXivTimesIndicator
main.py
1
1791
import os from PIL import Image from arxivtimes_indicator.data.github import filter_issue_by_ym, fetch_issues, get_icon_url, tally_by_labels, tally_by_users from arxivtimes_indicator.data.twitter import fetch_tweets, rank_paper from arxivtimes_indicator.data.utils import download, break_line, std_score from arxivtime...
apache-2.0
-7,062,447,111,258,028,000
35.571429
124
0.698492
false
wkew/FTMSVisualization
3-HeteroClassPlotter.py
1
10441
# -*- coding: utf-8 -*- """ Created on Fri Apr 22 11:42:36 2016 @author: Will Kew will.kew@gmail.com Copyright Will Kew, 2016 This file is part of FTMS Visualisation (also known as i-van Krevelen). FTMS Visualisation is free software: you can redistribute it and/or modify it under the terms of the G...
gpl-3.0
-3,138,422,466,994,427,400
42.690377
193
0.666507
false
Parkayun/flask
flask/debughelpers.py
1
6024
# -*- coding: utf-8 -*- """ flask.debughelpers ~~~~~~~~~~~~~~~~~~ Various helpers to make the development experience better. :copyright: (c) 2016 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from ._compat import implements_to_string, text_type from .app import Flask from .bl...
bsd-3-clause
-7,867,772,259,524,209,000
37.864516
83
0.586819
false
stpx/canto-curses
canto_curses/main.py
1
9578
# -*- coding: utf-8 -*- #Canto-curses - ncurses RSS reader # Copyright (C) 2014 Jack Miller <jack@codezen.org> # # 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. CANTO_PROTOCO...
gpl-2.0
-2,279,344,980,120,224,800
32.256944
102
0.546774
false
jgmanzanas/CMNT_004_15
project-addons/sale_advance_payment/__openerp__.py
1
1634
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Comunitea Servicios Tecnológicos All Rights Reserved # $Omar Castiñeira Saaevdra <omar@comunitea.com>$ # # This program is free software: you can redistribute it and/or modify # it u...
agpl-3.0
1,341,334,413,204,334,000
40.846154
78
0.590074
false
voytekresearch/neurodsp
neurodsp/tests/aperiodic/test_irasa.py
1
1456
"""Tests for IRASA functions.""" import numpy as np from neurodsp.tests.settings import FS, N_SECONDS_LONG, EXP1 from neurodsp.sim import sim_combined from neurodsp.spectral import compute_spectrum, trim_spectrum from neurodsp.aperiodic.irasa import * ###############################################################...
mit
5,145,470,417,897,858,000
32.090909
99
0.581044
false
tkrajina/cartesius
cartesius/colors.py
1
1051
# -*- coding: utf-8 -*- """ Utility functions folr colors """ def get_color(color): """ Can convert from integer to (r, g, b) """ if not color: return None if isinstance(color, int): temp = color blue = temp % 256 temp = int(temp / 256) green = temp % 256 ...
apache-2.0
6,686,300,613,034,056,000
24.634146
92
0.527117
false
ehooo/django_mqtt
test_web/settings.py
1
4373
""" Django settings for web project. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import...
gpl-2.0
6,900,691,633,989,705,000
25.664634
95
0.641207
false
matllubos/django-reversion-log
setup.py
1
1150
from setuptools import setup, find_packages from reversion_log.version import get_version setup( name='django-reversion-log', version=get_version(), description="Log build on revisiions.", keywords='django, reversion', author='Lubos Matl', author_email='matllubos@gmail.com', url='https://g...
lgpl-3.0
-1,228,347,683,448,355,300
31.857143
78
0.618261
false
MissionCriticalCloud/cosmic
cosmic-core/systemvm/patches/centos7/opt/cosmic/startup/setup_cpvm.py
1
2608
import logging import os from utils import Utils def setup_iptable_rules(cmdline): external_rules = "" for cidr in cmdline.get('allowedcidrs', '').split(','): if cidr != '': external_rules += "-A INPUT -i " + cmdline['publicnic'] + " -s " + cidr.strip() + " -p tcp -m multiport --dports 8...
apache-2.0
-2,954,845,786,210,160,600
28.977011
151
0.635353
false
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/pyshared/orca/structural_navigation.py
1
153933
# Orca # # Copyright 2005-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...
gpl-3.0
3,199,177,288,072,333,300
39.519347
80
0.565077
false
3dfxsoftware/cbss-addons
account_aged_partner_balance_vw/wizard/__init__.py
1
1312
# -*- encoding: utf-8 -*- ########################################################################### # Module Writen to OpenERP, Open Source Management Solution # # Copyright (c) 2011 Vauxoo - http://www.vauxoo.com/ # All Rights Reserved. # info Vauxoo (info@vauxoo.com) ####################################...
gpl-2.0
360,285,372,285,675,100
45.857143
78
0.550305
false
kazuoteramoto/alot
alot/ui.py
1
18751
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file import urwid import logging from twisted.internet import reactor, defer from settings import settings from buffers import BufferlistBu...
gpl-3.0
-3,591,981,657,515,845,000
36.880808
79
0.55997
false
ardoi/datajuicer
lsjuicer/ui/widgets/panels/eventpanel.py
1
3918
from PyQt5 import QtWidgets as QW from PyQt5 import QtCore as QC from lsjuicer.inout.db.sqla import SyntheticData from lsjuicer.ui.widgets.fileinfowidget import MyFormLikeLayout from lsjuicer.ui.widgets.clicktrees import EventClickTree, Events from actionpanel import ActionPanel from lsjuicer.ui.widgets.mergewidget i...
gpl-3.0
376,748,179,821,630,000
36.673077
74
0.639612
false
nicholas-maltbie/Medina
AIPractice/tttTest.py
1
1416
from ttt import * from tttGameSpec import TicTacToeGameSpec def play_game(agent1, agent2, name1, name2): """Plays a game of tic tac toe with two agents and returns the winner.""" game_spec = TicTacToeGameSpec() return game_spec.play_game(agent1, agent2) """board = make_board() names = [name1, name2...
mit
6,103,644,358,303,188,000
36.263158
86
0.558616
false
Azure/azure-sdk-for-python
sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_app_service_environments_operations.py
1
167660
# 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
2,373,434,903,715,900,400
50.651263
272
0.634325
false
crs4/hl7apy
hl7apy/v2_8_2/__init__.py
1
3070
# -*- coding: utf-8 -*- # # Copyright (c) 2012-2018, CRS4 # # 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...
mit
2,264,156,724,461,546,500
30.010101
92
0.684691
false
DTL-FAIRData/ODEX4all-UseCases
EKP/tmp/NIZO2.py
1
5816
# Load the required packages import EKP import csv import os import datetime # Knowledge platform URL url = '' # User credentials: Please fill in! username = '' password = '' # Set the output directory os.chdir("NIZO input & Output/") # Get the user token, required for access t = EKP.getToken(username, password, ur...
mit
-8,227,296,890,107,231,000
39.388889
217
0.607634
false
Khurramjaved96/Recursive-CNNs
data_augmentor/augmentData.py
1
2668
import os import cv2 import numpy as np import utils def argsProcessor(): import argparse parser = argparse.ArgumentParser() parser.add_argument("-i", "--dataPath", help="DataPath") parser.add_argument("-o", "--outputFiles", help="outputFiles", default="bar") return parser.parse_args() args = a...
apache-2.0
4,897,393,317,941,922,000
38.820896
117
0.463268
false
vsemionov/npamp
npamp/output.py
1
11750
# Copyright (C) 2012 Victor Semionov # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright notice, this # list of conditions and ...
bsd-2-clause
-5,244,082,922,388,500,000
49.646552
278
0.655234
false
living180/vex
vex/remove.py
1
1329
import os import shutil from vex import exceptions def obviously_not_a_virtualenv(path): include = os.path.join(path, 'include') bin = os.path.join(path, 'bin') scripts = os.path.join(path, 'Scripts') if not os.path.exists(bin) and not os.path.exists(scripts): return True if os.path.exists...
mit
-4,692,091,804,238,745,000
34.918919
73
0.632054
false
cginternals/glkernel
scripts/generate.py
1
19818
import posixpath # instead of os.path, to always use forward slashes import os import re # TODOs: # (more TODOs in code) standardTypes = { "bool", "char", "short", "int", "long", "long long", "unsigned char", "unsigned short", "unsigned int", "unsigned long", "unsigned lon...
mit
3,420,205,758,163,455,500
37.481553
220
0.612171
false
AutorestCI/azure-sdk-for-python
azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py
1
1307
# 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
-2,687,682,908,228,144,000
32.512821
187
0.613619
false
UManPychron/pychron
pychron/experiment/experimentor.py
1
11553
# =============================================================================== # Copyright 2013 Jake Ross # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
apache-2.0
-4,886,870,572,820,441,000
34.990654
110
0.521769
false
Chaffelson/whoville
whoville/cloudbreak/models/blueprint_input.py
1
4561
# coding: utf-8 """ Cloudbreak API Cloudbreak is a powerful left surf that breaks over a coral reef, a mile off southwest the island of Tavarua, Fiji. Cloudbreak is a cloud agnostic Hadoop as a Service API. Abstracts the provisioning and ease management and monitoring of on-demand clusters. SequenceIQ's Cloud...
apache-2.0
-7,454,445,487,106,906,000
29.610738
984
0.585617
false
williamoverall/soundtomidi
soundtomidi/soundtomidi.py
1
48543
"""Audio Processor. Takes live audio and generates MIDI information from it. Here are the configuration options, and they go on and on. Some of them are optimistic that I'll come back later and add other options, but don't count on it. Probably the most important thing to wrap your head around is that you set a frame...
mit
-3,844,153,051,610,324,500
48.787692
79
0.549018
false
DramaFever/calcifer
calcifer/tree.py
1
9183
""" `calcifer.tree` module This module implements a non-deterministic nested dictionary (tree). The tree comprises leaf nodes, dict nodes, and "unknown nodes" -- nodes which are known to exist but undefined beyond that. Ultimately, the policy tree contains *definitions*, a higher-level abstraction on "value": LeafPol...
mit
1,653,217,216,247,063,300
25.850877
105
0.5765
false
amol9/fbstats
fbstats/main.py
1
2731
import sys import os from os.path import exists from mutils.system.scheduler import get_scheduler, PlatformError, FrequencyError from redcmd import subcmd, CommandLine, CommandLineError, CommandError from . import globals from .fb import FB from .action import Action @subcmd def job(): '''Run fbstats as a job.''' ...
mit
7,284,842,101,302,858,000
18.789855
107
0.70011
false
awong1900/platformio
platformio/maintenance.py
1
7117
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import re import struct from os import remove from os.path import isdir, isfile, join from shutil import rmtree from time import time import click from platformio import __version__, app, telemetry from platformio.commands.install import cli a...
mit
-8,118,982,638,193,287,000
32.729858
77
0.603344
false
RPi-Distro/pgzero
pgzero/rect.py
1
15799
# -*- coding: utf-8 -*- import pygame.rect class Rect(pygame.rect.Rect): __slots__ = () # From Pygame docs VALID_ATTRIBUTES = """ x y top left bottom right topleft bottomleft topright bottomright midtop midleft midbottom midright center cente...
lgpl-3.0
-2,143,938,976,755,739,000
29.722892
110
0.510318
false
red-hood/calendarserver
contrib/performance/report.py
1
1237
## # Copyright (c) 2010-2015 Apple 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 applicab...
apache-2.0
-8,329,028,068,985,315,000
35.382353
108
0.656427
false
Netflix-Skunkworks/cloudaux
cloudaux/orchestration/aws/sqs.py
1
2280
from cloudaux.aws.sqs import get_queue_url, get_queue_attributes, list_queue_tags, list_dead_letter_source_queues from cloudaux.decorators import modify_output from flagpole import FlagRegistry, Flags import logging from cloudaux.orchestration.aws import ARN logger = logging.getLogger('cloudaux') registry = FlagReg...
apache-2.0
8,771,817,787,487,272,000
30.666667
115
0.645614
false
MarkNenadov/YNABpy
YNABpy/BaseClasses.py
1
3510
""" BaseClasses.py INTRODUCTION YNABpy - A Python module for the YNAB (You Need A Budget) application. AUTHOR Mark J. Nenadov (2011) * Essex, Ontario * Email: <marknenadov@gmail.com> LICENSING This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public...
lgpl-3.0
-2,300,809,593,029,452,800
22.092105
78
0.611111
false
zhuzhezhe/django_blog
mywebsite/settings.py
1
3965
#coding:utf-8 """ Django settings for mywebsite project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(B...
mit
2,951,843,428,582,509,600
24.227273
81
0.663063
false
lesh1k/beatport-verifier
v 1/BP_top100_v_1.1.0.py
1
3528
#This program is supposed to fetch the top 100 list from Beatport and compare it to the previously #saved list, then present the difference, hence the new entries. #Dependencies. It is written in Python 2.7 on Windows and it uses BeautifulSoup4 ####Version log################## #######################################...
cc0-1.0
-2,010,492,077,310,553,000
24.021277
132
0.692744
false
jingzhehu/udacity_mlnd
P4_Training_a_Smartcab_to_Drive/smartcab/simulator.py
1
8851
import os import time import random import importlib class Simulator(object): """Simulates agents in a dynamic smartcab environment. Uses PyGame to display GUI, if available. """ colors = { 'black' : ( 0, 0, 0), 'white' : (255, 255, 255), 'red' : (255, 0, 0), ...
mit
-5,244,304,932,999,362,000
49.00565
220
0.54073
false
ctwiz/stardust
qa/rpc-tests/test_framework/key.py
1
7367
# Copyright (c) 2011 Sam Rushing # # key.py - OpenSSL wrapper # # This file is modified from python-stardustlib. # """ECC secp256k1 crypto routines WARNING: This module does not mlock() secrets; your private keys may end up on disk in swap! Use with caution! """ import ctypes import ctypes.util import hashlib import...
mit
4,338,475,104,793,338,400
33.265116
130
0.641102
false
openstack/oslo.versionedobjects
oslo_versionedobjects/base.py
1
51253
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
-5,300,163,210,659,548,000
41.287954
79
0.612491
false
ruleant/buildtime-trend
buildtimetrend/collection.py
1
2160
# vim: set expandtab sw=4 ts=4: ''' Dictionary based collection class. Copyright (C) 2014 Dieter Adriaenssens <ruleant@users.sourceforge.net> This file is part of buildtime-trend <https://github.com/ruleant/buildtime-trend/> This program is free software: you can redistribute it and/or modify it under the terms of t...
gpl-3.0
-7,609,691,097,847,600,000
25.024096
70
0.630556
false
henkhaus/wow
testing/plotter.py
1
1278
from pymongo import MongoClient from matplotlib import pyplot as plt import os from datetime import datetime, date, time, timedelta client = MongoClient() # using wowtest.auctiondata db = client.wowtest posts = db.auctiondata auctions = posts.find().limit(10) #time.time() into datetime ---> #datetime.datetime.fromti...
apache-2.0
1,368,956,586,611,997,000
22.666667
86
0.649452
false
davy39/eric
Graphics/UMLDialog.py
1
14316
# -*- coding: utf-8 -*- # Copyright (c) 2007 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing a dialog showing UML like diagrams. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSlot, Qt, QFileInfo from PyQt5.QtWidgets import QAction, QToolBar, QGraphicsScene fr...
gpl-3.0
6,361,713,874,534,443,000
36.37859
78
0.551132
false
kylefrost/budget
main.py
1
1783
from flask import Flask, render_template, request, redirect from sql import select # Create Flask app app = Flask(__name__) # API Blueprint from api import api app.register_blueprint(api, url_prefix="/api") # Load Index page @app.route("/") def index(): return render_template("index.html") # ...
gpl-3.0
-3,901,554,615,492,134,400
21.155844
66
0.621985
false
ApptuitAI/xcollector
collectors/etc/metric_naming.py
1
1357
#!/usr/bin/env python def print_if_apptuit_standard_metric(metric, mapping, timestamp, value, tags=None, tags_str=None): if metric not in list(mapping["metrics"].keys()): return new_metric_name = mapping["metrics"][metric]["standard_name"] new_metric_tags_str = "" if tags is not None or tags_st...
lgpl-3.0
-2,912,226,242,471,547,400
47.464286
109
0.559322
false
kiyukuta/chainer
chainer/links/connection/n_step_rnn.py
1
10731
import numpy import six from chainer import cuda from chainer.functions.array import permutate from chainer.functions.array import transpose_sequence from chainer.functions.connection import n_step_rnn as rnn from chainer import link from chainer.utils import argument from chainer import variable def argsort_list_de...
mit
-8,108,629,455,502,223,000
34.651163
89
0.619514
false
kubernetes-client/python
kubernetes/client/models/v2beta2_resource_metric_source.py
1
4559
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.18 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
apache-2.0
-5,506,228,094,858,839,000
29.393333
124
0.58741
false
nico202/pyNeMo
plugins/images/membrane.py
1
1385
#Save spiking: saveSourceImage(output_firings, '.' + general_config_hash + config_hash + '.png') for neuron in to_save: stims = [] n = 0 for n in range(0, general_config.steps): if n in config.step_input: found = False for s in config.step_input[n]: if s[0] ==...
gpl-2.0
-7,114,411,268,899,487,000
46.758621
115
0.6
false
danielfrg/ec2hosts
ec2hosts/cli.py
1
1208
from __future__ import print_function, absolute_import, division import sys import click CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) import ec2hosts def main(): try: cli(obj={}) except Exception as e: import traceback click.echo(traceback.format_exc(), err=True) ...
apache-2.0
8,346,817,316,003,575,000
23.16
81
0.663907
false
muggot/python-goose
tests/tests.py
1
24622
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by Xavier Grangier for Recrutae Gravity.co...
apache-2.0
4,290,335,241,615,320,000
45.187617
202
0.656146
false