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
jcpeterson/avoidr
player.py
1
3915
import pygame, os class Player: # this takes in screen width/height to calculate the player's starting position (center of screen) # it also takes in the background color to compute its own color (inverted background color) def __init__(self, screenWidth, screenHeight): self.posRangeX = screenWidth ...
gpl-3.0
-8,821,727,489,908,777,000
33.052174
108
0.591315
false
staranjeet/fjord
fjord/redirector/tests/test_dummy.py
1
1413
from fjord.base.tests import reverse, TestCase from fjord.redirector import get_redirectors from fjord.redirector.base import build_redirect_url from fjord.redirector.providers.dummy import DummyRedirector from fjord.redirector.tests import RedirectorTestMixin class DummyRedirectorLoadingTestCase(RedirectorTestMixin,...
bsd-3-clause
70,996,547,842,896,990
32.642857
68
0.678698
false
lucidfrontier45/scikit-learn
examples/manifold/plot_manifold_sphere.py
1
4572
#!/usr/bin/python # -*- coding: utf-8 -*- """ ============================================= Manifold Learning methods on a severed sphere ============================================= An application of the different :ref:`manifold` techniques on a spherical data-set. Here one can see the use of dimensionality reducti...
bsd-3-clause
-6,762,097,957,016,355,000
31.425532
75
0.680446
false
iulian787/spack
var/spack/repos/builtin/packages/linktest/package.py
2
1299
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class Linktest(MakefilePackage): """Performance tool to generate communication matrix using parallel ping-pong be...
lgpl-2.1
-1,271,115,290,490,346,200
35.083333
115
0.647421
false
nomad-vino/SPSE-1
Module 5/5.4.py
1
1362
#!/usr/bin/python print " __ " print " |__|____ ___ __ " print " | \__ \\\\ \/ / " print " | |/ __ \\\\ / " print " /\__| (____ /\_/ " print " \______| \/ " p...
gpl-3.0
3,683,522,595,518,480,000
22.084746
100
0.526432
false
mancoast/CPythonPyc_test
fail/313_test_bigmem.py
1
41534
from test import support from test.support import bigmemtest, _1G, _2G, _4G, precisionbigmemtest import unittest import operator import sys import functools # Bigmem testing houserules: # # - Try not to allocate too many large objects. It's okay to rely on # refcounting semantics, but don't forget that 's = creat...
gpl-3.0
2,800,543,251,407,446,000
34.590403
79
0.552608
false
dwhagar/snowboard
snowboard/connection.py
1
6948
# This file is part of snowboard. # # snowboard 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. # # snowboard is distributed in the hop...
gpl-3.0
5,802,513,024,660,214,000
34.454082
103
0.517559
false
zarthur/restful-todo
tests/test_integration.py
1
1726
import re import threading import unittest from selenium import webdriver from app import create_app, db from models import Todo class IntegrationTestCase(unittest.TestCase): client = None @classmethod def setUpClass(cls): # start Firefox try: cls.client = webdriver.Firefox(...
gpl-2.0
-385,083,701,008,058,800
25.151515
75
0.593859
false
Southpaw-TACTIC/Team
src/python/Lib/site-packages/PySide/examples/demos/qtdemo/demotextitem.py
1
2157
from PySide import QtCore, QtGui from demoitem import DemoItem class DemoTextItem(DemoItem): STATIC_TEXT, DYNAMIC_TEXT = range(2) def __init__(self, text, font, textColor, textWidth, scene=None, parent=None, type=STATIC_TEXT, bgColor=QtGui.QColor()): super(DemoTextItem, self).__init__(sc...
epl-1.0
-7,139,952,236,623,638,000
29.814286
68
0.618915
false
Jumpscale/core9
JumpScale9/data/serializers/SerializerYAML.py
1
3063
import yaml from collections import OrderedDict from js9 import j from .SerializerBase import SerializerBase testtoml=""" name = 'something' multiline = ''' these are multiple lines next line ''' nr = 87 nr2 = 34.4 """ # from .PrettyYAMLDumper import PrettyYaml class SerializerYAML(SerializerBase): d...
apache-2.0
5,639,020,786,048,849,000
28.171429
98
0.588965
false
rsalmaso/django-cms
cms/toolbar/items.py
1
16937
import json from abc import ABCMeta from collections import defaultdict from django.template.loader import render_to_string from django.utils.encoding import force_str from django.utils.functional import Promise from cms.constants import RIGHT, LEFT, REFRESH_PAGE, URL_CHANGE class ItemSearchResult: def __init__...
bsd-3-clause
1,316,855,163,184,581,600
29.46223
124
0.56598
false
krissrex/python_projects
Projects/Oving10-itgk/main.py
1
6889
# -*- coding: utf-8 -*- """ Created on Sun Nov 9 00:06:24 2014 @author: kristian """ from skumleskogen import * import time ################## OPTIONS ################## debug_on = True write_to_file = True hukommelse = {} sti_totalt = ["inn"] noder_med_lås = set() forrige_retning = [] file = None try: del ...
mit
-6,669,817,222,215,976,000
26.135458
79
0.474233
false
sajuptpm/neutron-ipam
neutron/services/firewall/drivers/linux/iptables_fwaas.py
1
11774
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Dell 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/lice...
apache-2.0
4,463,777,469,175,995,000
41.65942
79
0.58213
false
ant31/kpm
kpm/commands/kexec.py
1
1587
from kpm.console import KubernetesExec from kpm.commands.command_base import CommandBase class ExecCmd(CommandBase): name = 'exec' help_message = "exec a command in pod from the RC or RS name.\ It executes the command on the first matching pod'" def __init__(self, options): self.output = opti...
apache-2.0
6,065,838,701,070,110,000
35.068182
96
0.570258
false
jim-easterbrook/pywws
src/pywws/process.py
1
29244
# pywws - Python software for USB Wireless Weather Stations # http://github.com/jim-easterbrook/pywws # Copyright (C) 2008-21 pywws contributors # 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;...
gpl-2.0
-1,985,312,193,686,834,200
35.784906
94
0.559328
false
brickfiestastem/brickfiesta
shop/views.py
1
11431
import datetime import json import urllib.error import urllib.parse import urllib.request import uuid from django.conf import settings from django.contrib import messages from django.contrib.auth.models import User from django.core.mail import EmailMessage from django.core.mail import send_mail from django.shortcuts i...
agpl-3.0
1,022,110,666,750,949,400
44.181818
120
0.53906
false
acabey/flash-dump-tool
test/test_xecrypt.py
1
35801
from unittest import TestCase from Crypto.PublicKey import RSA from lib.xecrypt import XeCryptBnQw_SwapLeBe, XeCryptBnDw_SwapLeBe, XeCryptBnQw, XeCryptBnQw_toInt, XeCryptBnQwNeMod from lib.xecrypt_rsa import XeCrypt_RSA from lib.xecrypt import XeCryptRotSum, RotSumCtx from lib.xecrypt import XeCryptRotSumSha class ...
gpl-3.0
-194,653,558,820,259,620
64.93186
120
0.585542
false
joseamaya/tambox
contabilidad/urls.py
1
4452
from django.conf.urls import url from django.contrib.auth.decorators import login_required from contabilidad.views import Tablero, ListadoCuentasContables, \ CargarCuentasContables, ListadoTiposDocumentos, CrearTipoDocumento, \ EliminarTipoDocumento, DetalleTipoDocumento, ModificarTipoDocumento, \ Repo...
gpl-3.0
7,144,240,158,981,100,000
82
120
0.707772
false
kyubifire/softlayer-python
SoftLayer/CLI/user/permissions.py
1
1893
"""List A users permissions.""" import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import formatting from SoftLayer.CLI import helpers @click.command() @click.argument('identifier') @environment.pass_env def cli(env, identifier): """User Permissions. TODO change to list all pe...
mit
-6,047,882,941,413,080,000
32.210526
98
0.688325
false
dracidoupe/graveyard
ddcz/migrations/0018_auto_20180617_1740.py
1
2511
# Generated by Django 2.0.2 on 2018-06-17 15:40 import ddcz.models.magic from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("ddcz", "0017_auto_20180617_1604"), ] operations = [ migrations.AddField( model_name="gallerypicture", ...
mit
5,232,469,323,310,818,000
30.759494
87
0.540454
false
actuino/unicorn-display
display-client/client.py
1
3700
#!/usr/bin/env python # Unicorn Jauge Display Client import json import os import sys, getopt # pip install socketIO-client # https://github.com/invisibleroads/socketIO-client from socketIO_client import SocketIO, LoggingNamespace current_page = 0; # The socker server Hostname DISPLAY_SERVER_HOST = 'localhost'...
mit
1,647,634,160,931,848,400
28.6
125
0.628919
false
magenta-aps/mox
oio_rest/oio_rest/validate.py
1
13865
# Copyright (C) 2015-2019 Magenta ApS, https://magenta.dk. # Contact: info@magenta.dk. # # 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/. import copy import jsonschema ...
mpl-2.0
8,253,058,164,997,057,000
30.227477
79
0.567039
false
heidtn/MeteorTracker
meteortracker/meteor_tracker.py
1
2196
""" @author(s): Nathan Heidt, Jean Nassar This is the primary program for detecting and logging Meteors. Running `python meteor_tracker.py` is sufficient. Make sure the parameters specified in the config.ini file are correct. """ import configparser from . import camera from . import find_events from . import save_...
mit
-95,246,667,177,402,660
30.826087
77
0.584699
false
OpenSPA/dvbapp
lib/python/Screens/MessageBox.py
1
4589
from Screen import Screen from Components.ActionMap import ActionMap from Components.Label import Label from Components.Pixmap import Pixmap from Components.Sources.StaticText import StaticText from Components.MenuList import MenuList from enigma import eTimer class MessageBox(Screen): TYPE_YESNO = 0 TYPE_INFO = 1 ...
gpl-2.0
843,997,252,445,277,600
24.780899
193
0.665504
false
HaoboGu/Structure-Similarity
Drugbank.py
1
6376
import random import numpy as np import time from sklearn.linear_model import LogisticRegression from sklearn.metrics import roc_auc_score def read_drugbank_data(): # read interaction data interaction_file = open('data/interacts.csv') interact_dict = {} line = interaction_file.readline() while line...
mit
7,838,667,354,194,536,000
35.649425
99
0.559285
false
dunkenj/smpy
scripts/data/fitting.py
1
27412
import numpy as np import array import os, sys import re import time import multiprocessing import h5py import logging from astropy.table import Table, Column from astropy import units as u import argparse parser = argparse.ArgumentParser() parser.add_argument("-p","--params", type=str, help = "Pa...
mit
8,329,940,140,997,636,000
35.844086
261
0.489311
false
ledatelescope/bifrost
test/test_resizing.py
1
4303
# Copyright (c) 2016, The Bifrost Authors. 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 an...
bsd-3-clause
2,158,393,822,636,490,500
47.897727
81
0.684871
false
kszys/num2words
num2words/lang_ID.py
1
6232
# Copyright (c) 2003, Taro Ogawa. All Rights Reserved. # Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved. # 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 # versi...
lgpl-2.1
64,732,259,284,972,610
30.795918
86
0.516367
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/operations/_bgp_service_communities_operations.py
1
5134
# 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
470,148,117,307,068,350
44.433628
133
0.643942
false
Qubad786/pr-code-review
gitcodereview/settings.py
1
3117
""" Django settings for gitcodereview project. """ import os from os.path import abspath, dirname, join import dj_database_url from django.core.urlresolvers import reverse_lazy # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)...
mit
6,610,438,276,086,385,000
25.87069
71
0.688803
false
BadrYoubiIdrissi/TIPE-Algorithme-Genetique
Source/NEAT/test.py
1
2640
# -*- coding: utf-8 -*- """ Created on Wed Oct 12 11:36:14 2016 @author: Badr Youbi Idrissi """ import pygame import pygame.gfxdraw import numpy as np from pygame.locals import * from individu import Individu from phenotype import Phenotype from population import Population from datadisplay import DataDisplay import ...
gpl-3.0
4,906,027,643,944,131,000
29.697674
96
0.595455
false
tu-darmstadt-ros-pkg/hector_flexbe_behavior
behaviors/behavior_pathdrivemission/src/behavior_pathdrivemission/pathdrivemission_sm.py
1
2883
#!/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
-1,531,267,439,377,354,000
29.347368
115
0.623656
false
napalm-automation/napalm-yang
napalm_yang/models/openconfig/network_instances/network_instance/mpls/signaling_protocols/rsvp_te/global_/hellos/__init__.py
1
18060
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
apache-2.0
4,378,248,771,271,248,000
37.181818
377
0.577187
false
GodotNativeTools/godot-cpp
binding_generator.py
1
27665
#!/usr/bin/env python import json # comment. # Convenience function for using template get_node def correct_method_name(method_list): for method in method_list: if method["name"] == "get_node": method["name"] = "get_node_internal" classes = [] def generate_bindings(path, use_template_get_n...
mit
4,136,963,166,776,560,600
31.547059
267
0.53396
false
oliverodaa/cs184-final-proj
dwinelle/video/gen_3d.py
1
1238
#!/usr/bin/env python3 # This file is part of dwinelle-tools. # dwinelle-tools 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. # dwi...
mit
3,032,383,156,941,196,300
48.52
159
0.667205
false
iwhiz/Algorist
fibonacci_dp.py
1
1163
# This function uses the dynamic programming concept, where it stores previously computed values rather # computing it every time like in normal recursion. import time # This version of fibonacci uses dynamic programming concept. # First check the normal fibonacci.py for better understanding def fibo_dp(n: int): # ...
mit
-8,367,374,644,856,106,000
45.52
108
0.66466
false
openweave/openweave-core
src/test-apps/happy/tests/standalone/wdmNext/test_weave_wdm_next_one_way_subscribe_05.py
1
3250
#!/usr/bin/env python3 # # Copyright (c) 2016-2017 Nest Labs, 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/lic...
apache-2.0
-7,014,199,987,476,152,000
44.138889
173
0.635385
false
tedye/leetcode
Python/leetcode.037.sudoku-solver.py
1
2045
class Solution(object): def solveSudoku(self, board): """ :type board: List[List[str]] :rtype: void Do not return anything, modify board in-place instead. """ hset = [{'1','2','3','4','5','6','7','8','9'} for _ in range(9)] vset = [{'1','2','3','4','5','6','7','8','9'...
mit
-8,874,471,319,951,807,000
36.888889
124
0.326161
false
opennode/nodeconductor-paas-oracle
src/nodeconductor_paas_oracle/extension.py
1
3675
from nodeconductor.core import NodeConductorExtension class OracleExtension(NodeConductorExtension): class Settings: ORACLE_TICKET_TEMPLATES = { 'provision': { 'summary': "Request for a new Oracle instance", 'details': """ Oracle DB purchase...
mit
7,087,574,279,063,508,000
37.684211
80
0.477279
false
SheffieldML/TVB
likelihoods.py
1
1637
# Copyright (c) 2014, James Hensman, Max Zwiessele # Distributed under the terms of the GNU General public License, see LICENSE.txt import numpy as np from scipy.special import gamma, digamma from scipy import stats class student_t(): def __init__(self): self._set_params(np.ones(2)) def _set_params(se...
gpl-3.0
8,509,867,237,343,463,000
45.771429
144
0.602932
false
krux/graphite-web
webapp/tests/test_whitelist.py
1
3982
import errno import mock import os import pickle from . import DATA_DIR from django.conf import settings from django.core.urlresolvers import reverse from .base import TestCase from graphite.whitelist.views import load_whitelist, save_whitelist class WhitelistTester(TestCase): settings.WHITELIST_FILE = os.path....
apache-2.0
5,494,387,643,403,174,000
33.626087
76
0.629332
false
bulax41/Commands
scripts/mcast_listen.py
1
2340
#!/bin/python import socket import struct import sys import signal import time import datetime import argparse import threading class McastSocket(socket.socket): def __init__(self, local_port='', reuse=False): socket.socket.__init__(self, socket.AF_INET, socket.SOCK_DGRAM, socket.IPPROTO_UDP) if(reuse): ...
gpl-3.0
1,310,441,972,813,679,400
30.2
137
0.641026
false
PatrikValkovic/grammpy
tests/transformations_test/RemoveEpsilonRules/Reverse/SimpleTest.py
1
1825
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 16:01 :Licence MIT Part of grammpy """ from unittest import TestCase, main from grammpy import * from grammpy.parsers import cyk from grammpy.transforms import ContextFree, InverseContextFree class S(Nonterminal): pass class A(Nonterminal): pass c...
mit
7,512,837,500,692,749,000
32.181818
152
0.614795
false
McIntyre-Lab/papers
newman_events_2017/python_workflow/programs/build_intron2border_junction_index.py
1
5945
#!/usr/bin/env python3 ####################################################################################################################### # # DATE: 2017-12-15 # NAME: build_Event2Transcript_index.py # AUTHOR: Jeremy R. B. Newman (jrbnewman@ufl.edu) # # DESCRIPTION: This script creates an intron-to-border junction ...
lgpl-3.0
2,977,821,361,398,456,300
56.728155
131
0.639024
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_06_01/operations/_virtual_network_gateways_operations.py
1
103438
# 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
-3,029,695,423,026,583,000
51.373671
255
0.652188
false
cragusa/cocoma
bin/Logger.py
1
5704
#!/usr/bin/env python #Copyright 2012-2013 SAP 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 applicab...
apache-2.0
-399,721,959,556,241,200
32.162791
162
0.645863
false
isc-projects/forge
tests/dhcpv4/ddns/test_ddns_no_tsig_request.py
1
41287
"""DDNS without TSIG""" # pylint: disable=invalid-name,line-too-long import pytest import misc import srv_control import srv_msg @pytest.mark.v4 @pytest.mark.ddns @pytest.mark.notsig @pytest.mark.forward_reverse_add def test_ddns4_notsig_forw_and_rev_add_success_Sflag(): misc.test_setup() srv_control.conf...
isc
4,452,881,845,453,598,000
38.546935
91
0.673263
false
qedsoftware/commcare-hq
corehq/apps/settings/tests/test_utils.py
1
1321
import os from django.test import SimpleTestCase from corehq.apps.settings.utils import get_temp_file class GetTempFileTests(SimpleTestCase): def test_file_closed(self): """ Check that an error is not raised if the file is closed by the caller """ try: with get_temp_fi...
bsd-3-clause
8,103,971,329,567,022,000
30.452381
78
0.55564
false
LooseTerrifyingSpaceMonkey/DecMeg2014
src/benchmark_pooling.py
1
3692
"""DecMeg2014 example code. Simple prediction of the class labels of the test set by: - pooling all the triaining trials of all subjects in one dataset. - Extracting the MEG data in the first 500ms from when the stimulus starts. - Using a linear classifier (logistic regression). """ import numpy as np from sklearn....
gpl-2.0
7,230,487,808,953,025,000
29.270492
120
0.623239
false
karolciba/playground
markov/baumwelch.py
1
4027
import numpy as np # functions and classes go here def fb_alg(A_mat, O_mat, observ): # set up k = observ.size (n,m) = O_mat.shape prob_mat = np.zeros( (n,k) ) fw = np.zeros( (n,k+1) ) bw = np.zeros( (n,k+1) ) # forward part fw[:, 0] = 1.0/n for obs_ind in xrange(k): f_row_vec...
unlicense
-5,241,369,529,496,385,000
36.635514
89
0.534145
false
iotile/coretools
transport_plugins/awsiot/iotile_transport_awsiot/device_adapter.py
1
21488
import os import binascii import base64 import datetime import logging import queue import uuid from iotile.core.exceptions import IOTileException, ArgumentError, HardwareError from iotile.core.hw.transport.adapter import DeviceAdapter from iotile.core.hw.reports.parser import IOTileReportParser from iotile.core.dev.re...
gpl-3.0
8,618,029,404,942,219,000
40.562863
181
0.624721
false
schef/schef.github.io
source/14/mc-14-04-whf-pid.py
1
2581
#!/usr/bin/python # Written by Stjepan Horvat # ( zvanstefan@gmail.com ) # by the exercises from David Lucal Burge - Perfect Pitch Ear Traning Supercourse # Thanks to Wojciech M. Zabolotny ( wzab@ise.pw.edu.pl ) for snd-virmidi example # ( wzab@ise.pw.edu.pl ) import random import sys sys.path.append("/home/schef/gith...
mit
1,993,438,828,375,399,400
30.47561
193
0.590469
false
Zephor5/zspider
zspider/crawler.py
1
5759
# coding=utf-8 import json import logging from queue import Queue from pooled_pika import PooledConn from scrapy.crawler import CrawlerProcess from scrapy.settings import Settings from scrapy.utils.log import log_scrapy_info from scrapy.utils.ossignal import install_shutdown_handlers from twisted.internet import defer...
mit
-4,324,731,660,645,133,300
29.333333
87
0.593232
false
andymckay/zamboni
mkt/inapp/views.py
1
3169
import json from django.db import transaction from django.shortcuts import get_object_or_404 from rest_framework.permissions import AllowAny from rest_framework.viewsets import ModelViewSet import commonware.log from mkt.api.authentication import (RestAnonymousAuthentication, Rest...
bsd-3-clause
-7,194,169,135,948,572,000
35.011364
78
0.61218
false
do-mpc/do-mpc
documentation/source/release_overview.py
1
1138
import requests import os def get_overview(): # Use Github Rest API to get releases: release_dict = requests.get('https://api.github.com/repos/do-mpc/do-mpc/releases').json() text = '' text += '# Release notes' text += '\n' text += 'This content is autogenereated from our Github [release n...
lgpl-3.0
2,997,779,202,889,332,700
28.179487
149
0.529877
false
PetterS/easy-IP
examples/run_nurses.py
1
1028
#!/usr/bin/env python3 from glob import glob import os # Set this to the location of NSPLib. nsplib = r"C:\Users\Petter\Dropbox\Datasets\NSPLib" def run_solver(data_set, case): case_file = os.path.join(nsplib, "Cases", str(case) + ".gen") log_file = data_set + "." + str(case) + ".output.log" files = glob(os.path...
bsd-2-clause
2,813,238,958,239,927,000
26.052632
72
0.620623
false
mxOBS/deb-pkg_trusty_chromium-browser
native_client/src/trusted/validator_ragel/proof_tools.py
1
15125
# Copyright (c) 2014 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Tools and utilities for creating proofs about tries.""" import itertools import multiprocessing import optparse import spec import trie import ...
bsd-3-clause
-8,105,469,482,561,294,000
37.388325
80
0.618182
false
NicoSantangelo/sublime-gulp
status_bar.py
1
1362
import sublime is_sublime_text_3 = int(sublime.version()) >= 3000 if is_sublime_text_3: from .settings import Settings from .caches import ProcessCache from .timeout import defer_sync else: from settings import Settings from caches import ProcessCache from timeout import defer_sync class Sta...
mit
7,182,725,561,763,034,000
29.266667
89
0.623348
false
fedora-conary/rbuild
plugins/buildpackages.py
1
4531
# # Copyright (c) SAS Institute Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
-3,516,606,443,660,765,000
38.4
79
0.672699
false
Autodesk/molecular-design-toolkit
moldesign/helpers/qmmm.py
1
3277
# Copyright 2016 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
3,375,231,192,028,924,000
34.619565
99
0.641745
false
USGSDenverPychron/pychron
pychron/hardware/fusions/fusions_motor_configurer.py
1
1639
# =============================================================================== # Copyright 2011 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
3,609,808,186,760,802,300
29.351852
81
0.546065
false
bccp/nbodykit
nbodykit/source/catalog/subvolumes.py
1
2079
from nbodykit.base.catalog import CatalogSource from pmesh.domain import GridND from nbodykit.utils import split_size_3d import numpy class SubVolumesCatalog(CatalogSource): """ A catalog that distributes the particles spatially into subvolumes per MPI rank. Attributes ---------- d...
gpl-3.0
3,959,098,747,508,798,500
31.484375
88
0.599327
false
DANS-KNAW/dariah-contribute
dariah_static_data/migrations/0003_auto__del_field_country_iso3166_2__del_field_country_uri__add_field_co.py
1
4571
# -*- coding: utf-8 -*- """ DARIAH Contribute - DARIAH-EU Contribute: edit your DARIAH contributions. Copyright 2014 Data Archiving and Networked Services 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...
apache-2.0
5,867,931,267,306,300,000
46.134021
182
0.589805
false
GNOME/pygobject
tests/test_cairo.py
1
11911
# -*- Mode: Python; py-indent-offset: 4 -*- # vim: tabstop=4 shiftwidth=4 expandtab import unittest import pytest import gi try: gi.require_foreign('cairo') import cairo has_cairo = True except ImportError: has_cairo = False has_region = has_cairo and hasattr(cairo, "Region") try: from gi.repos...
lgpl-2.1
-7,246,807,414,580,883,000
37.672078
94
0.657543
false
gsarma/PyOpenWorm
tests/EvidenceQualityTest.py
1
2772
# -*- coding: utf-8 -*- from __future__ import absolute_import from .DataTestTemplate import _DataTest import PyOpenWorm from PyOpenWorm.evidence import Evidence from PyOpenWorm.document import Document from PyOpenWorm.website import Website from PyOpenWorm.context import Context from six.moves.urllib.parse import url...
mit
-8,552,154,659,828,182,000
33.65
118
0.5386
false
puttarajubr/commcare-hq
custom/succeed/reports/patient_task_list.py
1
14071
from datetime import datetime import logging from django.core.urlresolvers import reverse from django.utils import html from django.utils.translation import ugettext as _, ugettext_noop import json from corehq.apps.api.es import ReportCaseES from corehq.apps.cloudcare.api import get_cloudcare_app, get_cloudcare_form_...
bsd-3-clause
-7,832,998,788,708,410,000
37.763085
144
0.542108
false
mahmoudShaheen/PyMedox
packages/arduino.py
1
1286
#!/usr/bin/env python ################################# # @author: Mahmoud Shaheen # # MedicalBox IOT Project # # Arduino # ################################# #functions for serial communication with Arduino #called from controlHardware module import serial import data import time ser = se...
mit
-8,242,292,681,083,054,000
31.974359
93
0.691291
false
Ladeia/ProjectEuler
Problem145/Python/solution_1.py
1
3513
#!/usr/bin/env python3 #coding=utf-8 """ How many reversible numbers are there below one-billion? Problem 145 Some positive integers n have the property that the sum [ n + reverse(n) ] consists entirely of odd (decimal) digits. For instance, 36 + 63 = 99 and 409 + 904 = 1313. We will call such numbers reversible; so ...
mit
1,478,400,310,391,212,000
28.601695
184
0.613688
false
a3qz/networked_platformer
editor/editor.py
1
4284
import random import time import data import sprite import sys import pygame import constants import collectable import client import wall from struct import * import board class Game: def __init__(self, s): self.objects = [] #start with a list of no objects self.screen = s #get the screen surfac...
gpl-3.0
-2,789,428,229,882,804,700
33.272
118
0.558123
false
bwhite/hadoopy
examples/l4-vision-and-image-processing-with-hadoop/ex0-face-finder/face_finder.py
1
3141
#!/usr/bin/env python # (C) Copyright 2011 Brandyn A. White # # 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 # any later version. # # This program is distrib...
gpl-3.0
-3,343,407,461,399,199,000
32.774194
78
0.562241
false
ctools/ctools
cscripts/csphagen.py
1
44281
#! /usr/bin/env python # ========================================================================== # Computes the PHA spectra for source/background and ARF/RMF files using the # reflected region method # # Copyright (C) 2017-2021 Luigi Tibaldo # # This program is free software: you can redistribute it and/or modify # ...
gpl-3.0
-5,513,716,661,560,983,000
34.768174
99
0.522549
false
uclouvain/osis
base/tests/views/test_learning_unit_proposal.py
1
55572
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
-6,050,080,561,337,178,000
49.473206
120
0.670134
false
christianwengert/mailclient
src/bin/__init__.py
1
2230
# coding=utf-8 import subprocess from imapclient import IMAPClient HOST = 'mail.netzone.ch' USERNAME = 'christian@wengert.ch' PASSWORD = subprocess.check_output(["/usr/local/bin/pass", "mail/christian@wengert.ch"]) PASSWORD = PASSWORD.split()[0].decode('utf8') KEYMAPPING = {} ssl = True class Signature(): pa...
bsd-3-clause
-5,255,035,904,629,647,000
14.594406
89
0.565471
false
ningirsu/stepmania-server
smserver/controllers/routes.py
1
1366
""" Routes files """ from smserver.smutils.smpacket import smcommand from smserver.controllers import legacy ROUTES = { # Legacy controller for compatibility with Stepmania 5.X smcommand.SMClientCommand.NSCPingR: legacy.ping_response.PINGRController, smcommand.SMClientCommand.NSCHello: legacy.hello.Hello...
mit
7,506,692,969,652,477,000
53.64
91
0.825769
false
ThomasMcVay/MediaApp
MediaAppKnobs/KnobElements/RectButton.py
1
1663
#=============================================================================== # @Author: Madison Aster # @ModuleDescription: # @License: # MediaApp Library - Python Package framework for developing robust Media # Applications with Qt Library # Copyright (C) 2013 Madison Aster # ...
lgpl-2.1
5,703,280,998,694,598,000
42.945946
83
0.607336
false
lvapeab/nmt-keras
tests/NMT_architectures/unidir_deep_GRU_ConditionalLSTM.py
1
3021
import argparse import os import pytest from tests.test_config import load_tests_params, clean_dirs from data_engine.prepare_data import build_dataset from nmt_keras.training import train_model from nmt_keras.apply_model import sample_ensemble, score_corpus def test_NMT_Unidir_deep_GRU_ConditionalLSTM(): params =...
mit
8,802,438,062,096,458,000
40.958333
107
0.618338
false
kontron/python-ipmi
pyipmi/sensor.py
1
7640
# cOPYRIGht (c) 2014 Kontron Europe GmbH # # 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 library is...
lgpl-2.1
-3,930,262,043,866,632,700
34.868545
79
0.657984
false
henriquegemignani/randovania
randovania/gui/tracker_window.py
1
32424
import collections import functools import json import typing from pathlib import Path from random import Random from typing import Optional, Dict, Set, List, Tuple, Iterator, Union import matplotlib.pyplot as plt import networkx from PySide2 import QtWidgets from PySide2.QtCore import Qt from PySide2.QtWidgets import...
gpl-3.0
5,743,560,068,089,182,000
43.599725
119
0.599926
false
tkw1536/GitManager
tests/commands/test_state.py
1
4328
import unittest import unittest.mock from GitManager.commands import state from GitManager.repo import description from GitManager.utils import format from GitManager.repo import implementation class TestState(unittest.TestCase): """ Tests that the state command works properly """ @unittest.mock.patch( ...
mit
-7,933,464,358,307,545,000
39.830189
79
0.654575
false
muffinresearch/amo-validator
validator/testcases/javascript/actions.py
1
39965
from copy import deepcopy from functools import partial import sys import types # Global import of predefinedentities will cause an import loop import instanceactions from validator.constants import (BUGZILLA_BUG, DESCRIPTION_TYPES, FENNEC_GUID, FIREFOX_GUID, MAX_STR_SIZE) from validat...
bsd-3-clause
-7,636,647,010,772,091,000
36.490619
79
0.573702
false
Cosiroc/bleau-database
Triangulation/MathFunctions.py
2
1561
#################################################################################################### # # Bleau Database - A database of the bouldering area of Fontainebleau # Copyright (C) Salvaire Fabrice 2016 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affe...
agpl-3.0
-8,246,428,365,087,209,000
35.302326
100
0.465727
false
gplssm/europepstrans
europepstrans/results/__init__.py
1
13654
""" TimeFrameResults steals methods from oemof.outputlib adapted to the structure applied here. Most relevant difference is results data stored in self.data """ from oemof.outputlib import DataFramePlot, ResultsDataFrame import pickle from matplotlib import pyplot as plt import logging import pandas as pd class Ti...
gpl-3.0
-7,392,969,019,323,245,000
35.413333
90
0.576388
false
bollu/polymage
sandbox/apps/python/img_proc/interpolate/init.py
2
2104
import sys import os.path from PIL import Image import numpy as np from arg_parser import parse_args from printer import print_header, print_usage, print_line def init_images(app_data): print("[init.py] : initializing images...") app_args = app_data['app_args'] # input image: img_path = app_args.im...
apache-2.0
-8,058,180,493,064,463,000
24.658537
76
0.63308
false
MadeiraCloud/salt
sources/salt/states/locale.py
1
1224
# -*- coding: utf-8 -*- ''' Management of languages/locales ==============================+ The locale can be managed for the system: .. code-block:: yaml en_US.UTF-8: locale.system ''' def __virtual__(): ''' Only load if the locale module is available in __salt__ ''' return 'locale' if '...
apache-2.0
5,171,256,469,383,106,000
23.979592
73
0.521242
false
balajiiyer-ufl-projects/OpenStackVaccine
test/registrar_test.py
1
1074
from controller.registrar import Registrar import json class TestRegistrar: def __init__(self, conf, auth_info): self.registrar = Registrar(conf, auth_info) def test_client(self): assert self.registrar.client != None assert self.registrar.client != None print self.registrar.cl...
gpl-2.0
142,240,600,238,883,500
27.263158
70
0.59311
false
Alberto-Beralix/Beralix
i386-squashfs-root/usr/lib/python2.7/trace.py
1
30152
#! /usr/bin/python2.7 # portions copyright 2001, Autonomous Zones Industries, Inc., all rights... # err... reserved and offered to the public under the terms of the # Python 2.2 license. # Author: Zooko O'Whielacronx # http://zooko.com/ # mailto:zooko@zooko.com # # Copyright 2000, Mojam Media, Inc., all rights reserv...
gpl-3.0
-8,048,764,754,056,504,000
35.459492
79
0.541457
false
twbarber/pygooglevoice
googlevoice/voice.py
1
11310
from conf import config from util import * import settings import base64 qpat = re.compile(r'\?') if settings.DEBUG: import logging logging.basicConfig() log = logging.getLogger('PyGoogleVoice') log.setLevel(logging.DEBUG) else: log = None class Voice(object): """ Main voice instance for...
bsd-3-clause
1,199,714,198,842,147,000
34.01548
132
0.558267
false
jtakayama/makahiki-draft
install/run_initialize_instance.py
1
7542
import os import sys import subprocess import shlex import sys import StringIO import datetime sys.path.append(os.path.dirname(os.path.realpath(__file__)) + os.sep + os.pardir + os.sep + "makahiki" + os.sep) from apps.utils import script_utils def termination_string(): """ Gets the current system time and app...
mit
-7,530,258,053,230,034,000
37.284264
115
0.60647
false
xuru/pyvisdk
pyvisdk/do/host_das_ok_event.py
1
1156
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def HostDasOkEvent(vim, *args, **kwargs): '''This event records when HA on a host returns...
mit
3,296,307,332,034,000,000
33.029412
124
0.594291
false
jcberquist/SublimeText-Lucee
src/inline_documentation.py
1
2952
import sublime, sublime_plugin, webbrowser from os.path import dirname, realpath from . import utils from collections import namedtuple Documentation = namedtuple('Documentation', 'doc_html_variables on_navigate priority') FILE_PATH = dirname(realpath(__file__)).replace("\\", "/") DOC_TEMPLATE = "" PAGINATION_TEMPLAT...
mit
6,132,070,834,389,892,000
36.379747
117
0.732724
false
BibMartin/python-nvd3
nvd3/__init__.py
1
1025
#!/usr/bin/python # -*- coding: utf-8 -*- """ Python-nvd3 is a Python wrapper for NVD3 graph library. NVD3 is an attempt to build re-usable charts and chart components for d3.js without taking away the power that d3.js gives you. Project location : https://github.com/areski/python-nvd3 """ __version__ = '0.13.10' __...
mit
-8,305,914,760,808,070,000
34.344828
65
0.774634
false
pivotal-jbarrett/geode-native
tools/gnmsg/server_message_decoder.py
1
9484
#!/usr/local/bin/python3 # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance with # the L...
apache-2.0
-3,065,811,444,816,776,000
37.552846
150
0.575812
false
Azure/azure-sdk-for-python
sdk/managedservices/azure-mgmt-managedservices/azure/mgmt/managedservices/aio/operations/_marketplace_registration_definitions_without_scope_operations.py
1
8182
# 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
-8,387,111,801,339,155,000
47.994012
141
0.664141
false
westernx/vee
vee/environmentrepo.py
1
6434
from subprocess import CalledProcessError import os import re from vee import log from vee.cli import style_note, style_warning, style_error, style from vee.environment import Environment from vee.exceptions import CliMixin from vee.git import GitRepo from vee.packageset import PackageSet from vee.requirements import ...
bsd-3-clause
6,445,287,524,280,731,000
34.546961
133
0.591389
false
etkirsch/pyna-colada
pyna/core/Manager.py
1
1512
import hashlib, json, os from pyna.base.Settings import Settings from pyna.core.Packager import Packager from pyna.core.NodeList import NodeList from pyna.ui.PynaDisplay import PynaDisplay class Manager(Settings): ''' Manages all things related to other nodes and configuration settings ''' def __init__(self, alia...
gpl-2.0
-5,107,208,855,984,028,000
28.647059
74
0.71164
false
kparal/anaconda
pyanaconda/localization.py
1
23995
# Localization classes and functions # # Copyright (C) 2012-2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program i...
gpl-2.0
3,819,219,907,003,919,000
33.978134
99
0.628506
false
hsolbrig/SNOMEDToOWL
SNOMEDCTToOWL/RF2Files/Transitive.py
1
2725
from typing import Dict, Set from SNOMEDCTToOWL.SNOMEDToOWLConstants import RelationshipFilePrefix class Transitive: relationship_prefix = RelationshipFilePrefix def __init__(self): self._children = {} # parent -> set(children) Dict[int, Set[int]] self._parents = {} # child -...
apache-2.0
-6,966,169,800,768,780,000
38.492754
102
0.605872
false
ConservationInternational/ldmp-qgis-plugin
LDMP/processing_provider/carbon.py
1
8231
import numpy as np from osgeo import gdal, osr from qgis import processing from qgis.core import (QgsGeometry, QgsProcessing, QgsProcessingAlgorithm, QgsProcessingException, QgsProcessingParameterFile, QgsProce...
gpl-2.0
3,302,916,721,898,712,000
35.910314
153
0.532864
false
hasgeek/funnel
migrations/versions/887db555cca9_adding_uuid_to_commentset.py
1
1769
"""Adding uuid to commentset. Revision ID: 887db555cca9 Revises: 222b78a8508d Create Date: 2020-05-08 19:16:15.324555 """ from uuid import uuid4 from alembic import op from sqlalchemy.sql import column, table from sqlalchemy_utils import UUIDType import sqlalchemy as sa from progressbar import ProgressBar import p...
agpl-3.0
-8,246,667,750,301,554,000
23.915493
88
0.642736
false
brigittebigi/proceed
proceed/src/wxgui/frames/import_wizard.py
1
18211
#!/usr/bin/python # -*- coding: UTF-8 -*- # --------------------------------------------------------------------------- # ___ __ ___ ___ ____ ____ __ # | \ | \ | | / | | | \ Automatic # |__/ |__/ | | | |__ |__ | | Conference # | |\...
gpl-3.0
-3,954,575,004,273,499,000
40.768349
143
0.557905
false