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
ClusterLabs/booth
test/assertions.py
1
2281
import re class BoothAssertions: def configFileMissingMyIP(self, config_file=None, lock_file=None): (pid, ret, stdout, stderr, runner) = \ self.run_booth(config_file=config_file, lock_file=lock_file, expected_exitcode=1, expected_daemon=False) expected_error ...
gpl-2.0
-1,527,476,993,304,187,000
52.046512
94
0.553705
false
ideamonk/Web2Hunter-GAE
web2hunter.py
1
2098
#!/usr/bin/env python # Web2Hunter -- Abhishek Mishra <ideamonk at gmail.com> # # a web 2.0 name generator extension to domainhunter.py # # usage - # $ python web2hunter.py import domainhunter as DH import random A = ["Anti", "Aero", "Babble", "Buzz", "Blog", "Blue", "Brain", "Bright", "Browse", "Bubbl...
bsd-3-clause
-202,349,895,963,669
55.702703
448
0.515729
false
buzzz321/SerMan
server.py
1
4112
#!/usr/bin/env python3 # found some where on internet and added my own stuff to it. import logging import socket import select import subprocess HOSTNAME = 'localhost' PORT = '4000' MAXIMUM_QUEUED_CONNECTIONS = 5 RECEIVING_BUFFER_SIZE = 4096 logger = logging.getLogger(__name__) def start_server(hostname, port): ...
bsd-2-clause
5,011,016,042,292,578,000
37.074074
79
0.530399
false
zibraproject/zika-pipeline
scripts/extract.py
1
1704
from poretools.Fast5File import Fast5FileSet import sys # extract with constraints: # -- only one group ever # -- only one flowcell ID ever # -- always unique read ID def run(parser, args): flowcells = set() reads = set() i = 0 basecaller_version = None for fast5 in Fast5FileSet(args.directory, None, args...
mit
-3,093,050,626,163,535,000
23.695652
136
0.658451
false
inspirehep/inspire-next
inspirehep/factory.py
1
2892
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE 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
-4,535,237,258,872,902,000
31.494382
86
0.72787
false
GeoMatDigital/django-geomat
geomat/feedback/views.py
1
1251
from django.shortcuts import render from rest_framework import generics from rest_framework.response import Response from rest_framework import views from geomat.feedback.serializers import FeedBackSerializer from django.core.mail import send_mail from rest_framework import status from drf_yasg.utils import swagger_aut...
bsd-3-clause
-621,155,066,860,859,400
39.354839
107
0.681055
false
xmendez/wfuzz
tests/server_dir/simple_server.py
1
3589
# slightly modified from # https://gist.github.com/trungly/5889154 from http.server import HTTPServer from http.server import SimpleHTTPRequestHandler import urllib.parse class GetHandler(SimpleHTTPRequestHandler): def do_HEAD(self): parsed_path = urllib.parse.urlparse(self.path) if parsed_path.p...
gpl-2.0
6,534,772,595,874,089,000
33.84466
68
0.462246
false
josefmonje/Django_demo
main/migrations/0001_initial.py
1
1096
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-01 10:46 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migration...
mit
313,435,659,963,360,100
34.354839
145
0.609489
false
hsmade/expenses
expenses/tests.py
1
9500
from django.test import TestCase from django.utils import timezone from .models import Month, Withdrawal, Deposit, DepositType, WithdrawalType from django.core.urlresolvers import reverse from django.core.exceptions import ObjectDoesNotExist from . import import_data from expenses.lib import rabo from tempfile import N...
gpl-2.0
-9,034,774,651,408,447,000
42.577982
207
0.626316
false
yannrouillard/weboob
modules/banqueaccord/pages.py
1
5605
# -*- coding: utf-8 -*- # Copyright(C) 2013 Romain Bignon # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
agpl-3.0
2,130,746,300,878,250,000
37.383562
126
0.616881
false
franblas/facialrecoChallenge
itml.py
1
3881
# -*- coding: utf-8 -*- """ Created on Thu Jun 18 19:04:51 2015 @author: Paco """ """ Information Theoretic Metric Learning, Kulis et al., ICML 2007 """ import numpy as np from sklearn.metrics import pairwise_distances from base_metric import BaseMetricLearner class ITML(BaseMetricLearner): """ Information The...
mit
2,450,078,011,670,945,000
30.056
78
0.592373
false
rickysarraf/autoEqualizer
autoEqualizer.py
1
8836
#!/usr/bin/python # autoEqualizer - Script to load equalizer presets ondemand based on what genre of track is playing # Copyright (C) 2007 Ritesh Raj Sarraf <rrs@researchut.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publ...
gpl-3.0
-8,767,119,271,233,244,000
32.596958
109
0.603327
false
fffy2366/image-processing
api.py
1
10056
#!bin/evn python # -*-coding:utf8-*- import base64 import sys import os import logging import datetime import re import multiprocessing # from pylab import * from PIL import Image import cv2 from bceocrapi import BceOCRAPI from bin.python.models.images import Images from nude import Nude import imagehash from bin.py...
mit
-6,490,777,745,784,625,000
28.816456
106
0.525472
false
Huyuwei/tvm
tests/python/contrib/test_cublas.py
1
2856
# 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
2,408,037,564,744,352,000
36.090909
80
0.613796
false
prataprc/eazytext
eazytext/extension/.Attic/box.py
1
4735
# This file is subject to the terms and conditions defined in # file 'LICENSE', which is part of this source code package. # Copyright (c) 2010 SKR Farms (P) LTD. # -*- coding: utf-8 -*- # Gotcha : none # Notes : none # Todo : none # 1. Unit test case for this extension. from zope.component impor...
gpl-3.0
856,791,562,702,116,600
28.409938
78
0.594931
false
Maskawanian/ude-components
Components/Client/__init__.py
1
1318
# See LICENCE for the source code licence. # (c) 2010 Dan Saul from Base import Base SAVE_STATUS_SAVED = 0 # We can close this without losing data. SAVE_STATUS_NOT_SAVED = 1 # If we close this we will lose data, but we can save. SAVE_STATUS_NOT_SAVED_NEED_PATH = 2 # If we close this we will lo...
lgpl-3.0
7,542,065,898,066,238,000
34.621622
125
0.698786
false
zncb/wtrace
setup.py
1
4273
#!/usr/bin/env python """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import p...
agpl-3.0
2,862,599,234,718,813,700
35.521368
97
0.659256
false
mardiros/apium
apium/task/__init__.py
1
8390
import sys import types import logging import asyncio import inspect import traceback import importlib from collections import defaultdict from uuid import uuid4 import venusian from .. import registry log = logging.getLogger(__name__) class TaskRegistry(object): """ Default implementation of the task registry...
bsd-3-clause
-306,071,942,864,579,460
31.269231
81
0.556853
false
tuzhaopeng/NMT-Coverage
build/lib/groundhog/trainer/SGD_adadelta.py
1
8042
""" Stochastic Gradient Descent. TODO: write more documentation """ __docformat__ = 'restructedtext en' __authors__ = ("Razvan Pascanu " "KyungHyun Cho " "Caglar Gulcehre ") __contact__ = "Razvan Pascanu <r.pascanu@gmail>" import numpy import time import logging import theano import th...
bsd-3-clause
3,818,986,608,536,046,000
37.663462
98
0.497762
false
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/services/services/billing_setup_service/transports/grpc.py
1
11783
# -*- 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
1,060,008,593,816,807,600
43.464151
112
0.616821
false
jsubpy/jsub
jsub/loader.py
1
1148
import os import sys import inspect from jsub.error import JsubError class LoadError(JsubError): pass class ModuleNotFoundError(LoadError): pass class ClassNotFoundError(LoadError): pass class NotAClassError(LoadError): pass class PackageDirectoryNotFoundError(LoadError): pass def load_module(module_name)...
mit
2,569,055,906,323,149,000
21.96
101
0.736934
false
okfse/froide
froide/foirequest/tasks.py
1
3122
import os from django.conf import settings from django.utils import translation from django.db import transaction from django.core.files import File from froide.celery import app as celery_app from .models import FoiRequest, FoiAttachment from .foi_mail import _process_mail, _fetch_mail from .file_utils import conve...
mit
8,346,048,382,823,139,000
25.913793
77
0.652466
false
rtbortolin/QandA
QandA/QandA/urls.py
1
1936
""" Definition of urls for QandA. """ from datetime import datetime from django.conf.urls import patterns, url from app.forms import BootstrapAuthenticationForm import app import app.views import django.contrib.auth.views # Uncomment the next lines to enable the admin: # from django.conf.urls import include # from dj...
mit
-6,395,860,316,709,606,000
35.528302
143
0.628099
false
bSr43/udis86
scripts/ud_opcode.py
1
26794
# udis86 - scripts/ud_opcode.py # # Copyright (c) 2009, 2013 Vivek Thampi # 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 copyrig...
bsd-2-clause
-4,087,577,388,770,248,000
37.168091
115
0.506382
false
JioCloud/oslo-incubator
tests/unit/test_authutils.py
1
1104
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # 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.apac...
apache-2.0
7,319,244,362,919,340,000
38.428571
78
0.722826
false
levythu/ThuCloudDisk
ThuCloudDisk/ThuCloudDisk/settings.py
1
6136
# Django settings for ThuCloudDisk project. import os.path dirname = os.path.dirname(__file__).replace("\\", "/") ROOT_PATH = os.path.dirname(dirname) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('thuclouddisk', 'thuclouddisk@gmail.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': ...
apache-2.0
-3,915,417,579,704,217,000
32.71978
127
0.688233
false
romanz/electrum
plugins/digitalbitbox/qt.py
1
1522
from ..hw_wallet.qt import QtHandlerBase, QtPluginBase from .digitalbitbox import DigitalBitboxPlugin from electrum.i18n import _ from electrum.plugins import hook from electrum.wallet import Standard_Wallet class Plugin(DigitalBitboxPlugin, QtPluginBase): icon_unpaired = ":icons/digitalbitbox_unpaired.png" ...
mit
-7,596,609,756,621,793,000
30.708333
77
0.605782
false
ExCiteS/geokey-dataimports
geokey_dataimports/tests/test_views.py
1
108533
"""All tests for views.""" import os import json from django.core.files import File from django.core.urlresolvers import reverse from django.http import HttpRequest from django.template.loader import render_to_string from django.test import TestCase, RequestFactory from django.contrib.messages import get_messages fro...
mit
-7,359,887,042,110,271,000
31.908733
79
0.557987
false
chadmv/cmt
scripts/cmt/rig/swingtwist.py
1
14549
"""Creates a node network to extract swing/twist rotation of a transform to drive another transforms offsetParentMatrix. The network calculates the local rotation swing and twist offset around the specified twist axis relative to the local rest orientation. This allows users to specify how much swing and twist they w...
mit
-4,035,239,516,782,056,000
36.594315
191
0.652279
false
TurkuNLP/SRNNMT
old_/big_run.py
1
12851
from keras.models import Sequential, Graph, Model, model_from_json from keras.layers import Dense, Dropout, Activation, Merge, Input, merge, Flatten from keras.layers.recurrent import GRU from keras.callbacks import Callback,ModelCheckpoint from keras.layers.embeddings import Embedding import numpy as np import sys imp...
apache-2.0
-3,734,053,887,119,361,000
35.717143
243
0.604155
false
warrenspe/hconf
hconf/Config.py
1
6230
""" Copyright (C) 2016 Warren Spencer warrenspencer27@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 your option) any later vers...
gpl-3.0
-5,497,231,904,780,135,000
34.6
120
0.619904
false
tgcmteam/tgcmlinux
src/tgcm/contrib/freedesktopnet/networkmanager/activeconnection.py
1
2450
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009 Martin Vidner # # # Authors: # Martin Vidner <martin at vidnet.net> # # 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; eithe...
gpl-2.0
4,414,699,881,224,779,000
30.818182
115
0.682449
false
derekgreene/twitter-jsonl-tools
jsonl-tweet-export.py
1
2962
#!/usr/bin/env python """ A very simple script to export tweets from a JSONL file in CSV format. Sample usage: python jsonl-tweet-export.py sample/sample-tweets-500.jsonl -o sample/sample-tweets.csv """ import sys, fileinput, codecs, re from datetime import datetime from optparse import OptionParser import logging as ...
apache-2.0
4,448,869,735,812,144,000
34.686747
149
0.605334
false
AlexStarov/Shop
applications/delivery2/urls.py
1
1073
# -*- coding: utf-8 -*- from django.conf.urls import url from applications.delivery2 import views __author__ = 'AlexStarov' urlpatterns = [ # aaa=re.compile(r'^\?(?P<key>[a-zA-Z0-9]{64,64})$') # print re.match(aaa, '?naJX2WhVXlGtXlg0NFhbY1hqXu51M8MyUzwxpLm1SBvdcWerdNDRJPmtXmZYR0qe').group('key') # url(regex=r'^\?...
apache-2.0
-3,864,737,801,507,028,000
32.903226
103
0.562322
false
gkadillak/rockstor-core
src/rockstor/fs/btrfs.py
1
31825
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any la...
gpl-3.0
-7,107,197,275,919,733,000
35.123723
91
0.564996
false
nevins-b/lemur
lemur/plugins/lemur_kubernetes/plugin.py
1
5423
""" .. module: lemur.plugins.lemur_kubernetes.plugin :platform: Unix :copyright: (c) 2015 by Netflix Inc., see AUTHORS for more :license: Apache, see LICENSE for more details. The plugin inserts certificates and the private key as Kubernetes secret that can later be used to secure service endpoin...
apache-2.0
-2,376,839,072,637,838,300
33.987097
157
0.592476
false
jfinkels/turingmachine
test_turingmachine.py
1
11279
# test_turingmachine.py - tests for turingmachine.py # # Copyright 2014 Jeffrey Finkelstein. # # This file is part of turingmachine. # # turingmachine 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 ver...
gpl-3.0
6,797,504,506,111,407,000
34.806349
79
0.494193
false
FujitsuEnablingSoftwareTechnologyGmbH/tempest
tempest/api/monitoring/test_monitoring_alarming_api.py
1
38475
# 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
9,134,014,418,691,864,000
45.355422
141
0.591371
false
tensorflow/datasets
tensorflow_datasets/structured/dart/dart.py
1
4869
# coding=utf-8 # Copyright 2021 The TensorFlow Datasets 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 appl...
apache-2.0
2,792,275,343,321,724,000
39.575
414
0.636681
false
Mitali-Sodhi/CodeLingo
Dataset/python/multi_interface.py
1
6077
import re import time import sys import os import copy PARAMS = {} NAME_PREFIX = 'vm_' METRICS = { 'time' : 0, 'data' : {} } LAST_METRICS = copy.deepcopy(METRICS) METRICS_CACHE_MAX = 5 INTERFACES = [] descriptors = [] stats_tab = { "rx_bytes" : 0, "rx_pkts" : 1, "rx_errs" : 2, "rx_drop...
mit
4,746,327,573,861,715,000
27.530516
148
0.481981
false
Beyond-Imagination/BlubBlub
RaspberryPI/django-env/bin/miniterm.py
1
35109
#!/home/pi/Django/bin/python3 # # Very simple serial terminal # # This file is part of pySerial. https://github.com/pyserial/pyserial # (C)2002-2015 Chris Liechti <cliechti@gmx.net> # # SPDX-License-Identifier: BSD-3-Clause import codecs import os import sys import threading import serial from serial.tools.list_po...
gpl-3.0
9,167,541,231,525,012,000
34.972336
116
0.527415
false
shivaenigma/pycoin
tests/bip32_test.py
1
15806
import unittest from pycoin.key.BIP32Node import BIP32Node from pycoin.serialize import h2b class Bip0032TestCase(unittest.TestCase): def test_vector_1(self): master = BIP32Node.from_master_secret(h2b("000102030405060708090a0b0c0d0e0f")) self.assertEqual( master.wallet_key(as_private=...
mit
-2,865,108,965,114,670,600
52.579661
143
0.675819
false
sivertkh/gtrackcore
gtrackcore/test/track_operations/operations/FilterTest.py
1
10998
import unittest import numpy as np from gtrackcore.metadata import GenomeInfo from gtrackcore.track.core.GenomeRegion import GenomeRegion from gtrackcore.track_operations.operations.Filter import Filter from gtrackcore.test.track_operations.TestUtils import \ createSimpleTestTrackContent class FilterTest(unitte...
gpl-3.0
-4,644,463,832,202,392,000
38.419355
78
0.521549
false
openmotics/gateway
src/gateway/group_action_controller.py
1
2954
# Copyright (C) 2020 OpenMotics BV # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # # This program is distribu...
agpl-3.0
3,239,037,115,919,670,000
43.089552
109
0.708869
false
SymbiFlow/edalize
tests/test_vunit/run.py
1
1483
# Auto generated by Edalize def load_module_from_file(name, python_file): import importlib.util spec = importlib.util.spec_from_file_location(name, python_file) module = importlib.util.module_from_spec(spec) spec.loader.exec_module(module) return module def load_runner_hooks(python_file = r''): ...
bsd-2-clause
-3,198,943,249,158,944,300
35.170732
105
0.732974
false
endere/Data-structures-2nd-half
src/hash.py
1
2101
"""Hash tables.""" import bst class HashTable(object): """Class object for our Hash Table.""" def __init__(self, bucket_number, function='fnv'): """Init for our hash. Accepts a string to determine which hash the table uses. """ self.bucket_list = [] self.function = fu...
mit
8,588,302,588,909,000,000
34.016667
96
0.557354
false
chiemseesurfer/thumbor-mogilefs-loader
loaders/mogilefs_loader_http_fallback.py
1
1218
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2017 Max Oberberger (max@oberbergers.de) # # 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...
gpl-3.0
-3,743,907,813,002,403,000
35.909091
71
0.724959
false
Banbury/cartwheel-3d
Python/Data/Characters/Bip/Controllers/Jumping.py
1
21457
from App.Proxys import * data = SimBiController( name = 'Jumping', controlParamsList = [ ControlParams( joint = 'root', kp = 3000.0, kd = 300.0, tauMax = 10000.0, scale = ( 1.0, 0.2, 1.0 ) ), ControlParams( joint = 'pelvis_torso', kp = 1000.0, kd = 100.0, tauMax = 10000.0, scale = (...
apache-2.0
2,999,820,496,715,441,700
48.971496
149
0.360628
false
juancarlospaco/microraptor
setup.py
1
4696
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # # To generate DEB package from Python Package: # sudo pip3 install stdeb # python3 setup.py --verbose --command-packages=stdeb.command bdist_deb # # # To generate RPM package from Python Package: # sudo apt-get install rpm # python3 setup.py bdist_rpm --verbose --fix-p...
gpl-3.0
-6,046,680,466,054,644,000
28.721519
93
0.622445
false
COCS4950G7/COSC4950
Source/GUI/frameGUI_V1.4.py
1
4896
__author__ = 'Jon' import Tkconstants import tkFileDialog from Tkinter import * import Tkinter as Tk ######################################################################## ## adding a hashinng button, used to test basic functionality of enter text. ## Test commit for pycharm rebuild class MyApp(object): """""" ...
gpl-3.0
-3,765,599,085,140,937,000
34.744526
99
0.469771
false
quattor/aquilon
lib/aquilon/worker/templates/personality.py
1
10046
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008-2016,2018 Contributor # # 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...
apache-2.0
-806,622,832,720,203,800
35.398551
103
0.601334
false
imdaveho/boilerplates
django-boilerplate/project_name/settings/production.py
1
1544
import sys from {{ project_name }}.settings.default import * # Custom Project Structure: BASE_DIR = os.path.dirname(os.path.dirname(__file__)) APPS_DIR = os.path.join(BASE_DIR, 'apps') sys.path.insert(0, BASE_DIR) sys.path.insert(1, APPS_DIR) sys.path.insert(2, os.path.join(BASE_DIR, 'libs')) # Production Configs (o...
gpl-2.0
2,579,424,371,143,748,600
28.132075
72
0.715674
false
jdavidrcamacho/Tests_GP
02 - Programs being tested/RV_function.py
1
3615
# -*- coding: utf-8 -*- """ Created on Fri Feb 3 11:36:58 2017 @author: camacho """ import numpy as np import matplotlib.pyplot as pl pl.close("all") ##### RV FUNCTION 1 - circular orbit def RV_circular(P=365,K=0.1,T=0,gamma=0,time=100,space=20): #parameters #P = period in days #K = semi-amplitude of t...
mit
1,223,838,283,404,268,000
25.202899
78
0.582849
false
privb0x23/bliss-initramfs
pkg/hooks/Firmware.py
1
1964
# Copyright 2012-2017 Jonathan Vasquez <jon@xyinn.org> # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the fol...
bsd-2-clause
149,393,277,640,515,650
42.644444
86
0.746945
false
IamJeffG/geopandas
geopandas/plotting.py
1
13216
from __future__ import print_function import warnings import numpy as np from six import next from six.moves import xrange from shapely.geometry import Polygon def plot_polygon(ax, poly, facecolor='red', edgecolor='black', alpha=0.5, linewidth=1.0, **kwargs): """ Plot a single Polygon geometry """ from desc...
bsd-3-clause
-1,790,349,565,041,138,400
34.431635
138
0.590875
false
spillai/crisp
crisp/rotations.py
1
9499
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import """ Rotation handling module """ __author__ = "Hannes Ovrén" __copyright__ = "Copyright 2013, Hannes Ovrén" __license__ = "GPL" __email__ = "hannes.ovren@liu.se" import numpy as np from numpy.testing import assert_almost_equal ...
gpl-3.0
-1,031,934,485,086,081,700
29.149206
146
0.502896
false
prim/ocempgui
doc/examples/table.py
1
2042
# Table examples. from ocempgui.widgets import Renderer, Table, Label, Button from ocempgui.widgets.Constants import * def create_table_view (): # Crate and display a Table. table = Table (9, 2) table.spacing = 5 table.topleft = 5, 5 label = Label ("Nonaligned wide Label") table.add_child (0, ...
bsd-2-clause
528,070,260,686,461,950
30.415385
59
0.616552
false
MERegistro/meregistro
meregistro/apps/reportes/views/normativa_jurisdiccional.py
1
1076
# -*- coding: UTF-8 -*- from django.http import HttpResponse, HttpResponseRedirect from datetime import datetime, date from apps.seguridad.decorators import login_required, credential_required from apps.seguridad.models import Usuario, Perfil from apps.titulos.models.NormativaJurisdiccional import NormativaJurisdiccio...
bsd-3-clause
-264,908,265,114,107,870
45.73913
203
0.733023
false
mozbhearsum/balrog
auslib/test/web/api/test_releases.py
1
2720
from auslib.test.web.api.base import CommonTestBase class TestPublicReleasesAPI(CommonTestBase): def test_get_releases(self): ret = self.public_client.get("/api/v1/releases") got = ret.get_json() self.assertEqual(len(got["releases"]), 3) self.assertIsInstance(got["releases"][0], di...
mpl-2.0
-7,702,099,460,482,028,000
44.333333
89
0.621691
false
steffgrez/aio-jsonrpc-2.0
aio_jsonrpc_20/response.py
1
1779
class ResponseMaker(object): __slot__ = ['error_verbose'] def __init__(self, error_verbose=True): self.error_verbose = error_verbose def get_response(self, result, request_id): return { "jsonrpc": "2.0", "result": result, "id": request_id } ...
mit
4,117,111,114,315,011,600
27.693548
72
0.540753
false
markovmodel/molPX
molpx/_linkutils.py
1
18471
import numpy as _np from matplotlib.widgets import AxesWidget as _AxesWidget from matplotlib.colors import is_color_like as _is_color_like from matplotlib.axes import Axes as _mplAxes from matplotlib.figure import Figure as _mplFigure from IPython.display import display as _ipydisplay from pyemma.util.types import is...
lgpl-3.0
-6,859,057,174,613,301,000
38.133475
118
0.584592
false
aykut/django-oscar
oscar/apps/shipping/tests.py
1
4176
from decimal import Decimal as D from django.utils import unittest from django.test.client import Client from oscar.apps.shipping.methods import FreeShipping, FixedPriceShipping from oscar.apps.shipping.models import OrderAndItemLevelChargeMethod from oscar.apps.basket.models import Basket from oscar.test.helpers imp...
bsd-3-clause
-1,676,387,105,145,000,200
38.028037
115
0.630747
false
brianhouse/wavefarm
granu/braid/pattern.py
1
2625
""" Pattern is just a list (of whatever) that can be specified in compacted form ... with the addition of the Markov expansion of tuples on calling resolve """ import random class Pattern(list): def __init__(self, value=[0]): list.__init__(self, value) self.resolve() def resolve(self...
gpl-3.0
-2,916,064,081,948,905,500
34
155
0.509333
false
cggh/scikit-allel
allel/test/test_api.py
1
8225
# -*- coding: utf-8 -*- def test_public_api(): # The idea of this test is to ensure that all functions we expect to be in the # public API under the correct namespace are indeed there. import allel # allel.model.ndarray assert callable(allel.GenotypeVector) assert callable(allel.GenotypeArray)...
mit
-1,089,891,051,480,196,000
36.557078
82
0.752705
false
jimstorch/tokp
tokp_lib/xml_store.py
1
4808
#------------------------------------------------------------------------------ # File: xml_store.py # Purpose: Store and Retrieve data from XML files # Author: Jim Storch # License: GPLv3 see LICENSE.TXT #------------------------------------------------------------------------------ import...
gpl-3.0
-795,323,932,101,939,700
31.053333
81
0.532238
false
qianqians/Screw
3rdparty/protobuf/python/google/protobuf/internal/message_factory_test.py
1
8361
#! /usr/bin/env python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ...
lgpl-2.1
-2,762,322,544,589,745,000
41.441624
84
0.706853
false
tamnm/kodi.mp3.zing.vn
dev/service.vnmusic/service.py
1
5800
import time import xbmc import urlparse import SimpleHTTPServer import SocketServer import urllib2 import urllib import re import json import base64 import requests import httplib songInfoApi = 'http://api.mp3.zing.vn/api/mobile/song/getsonginfo?keycode=fafd463e2131914934b73310aa34a23f&requestdata={"id"...
gpl-2.0
-8,087,498,911,041,477,000
22.276151
146
0.642241
false
znerol/spreadflow-delta
spreadflow_delta/test/test_symlink.py
1
1301
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import copy from mock import Mock, patch from testtools import TestCase from spreadflow_core.scheduler import Scheduler from spreadflow_delta.test.matchers import MatchesSendDeltaIte...
mit
-5,483,107,710,838,320,000
28.568182
99
0.607225
false
unho/translate
translate/storage/test_yaml.py
1
12717
# -*- coding: utf-8 -*- import pytest import ruamel.yaml from translate.storage import base, test_monolingual, yaml class TestYAMLResourceUnit(test_monolingual.TestMonolingualUnit): UnitClass = yaml.YAMLUnit def test_getlocations(self): unit = self.UnitClass("teststring") unit.setid('some-...
gpl-2.0
-7,368,948,542,874,367,000
29.25
126
0.578198
false
oxfishapp/RESTful
src/commons.py
1
9031
# -*- coding: utf-8 -*- #!/usr/bin/env python #!flask/bin/python from flask.ext.restful.fields import Raw from api_errors import error_handled class Set_to_List(Raw): def format(self, value): """ (set) -> list Convertir un set a list y retornarlo. """ return list(value) class...
unlicense
-4,525,323,916,411,038,000
25.955224
114
0.638095
false
her0e1c1/pystock
stock/signals.py
1
2696
import pandas as pd from . import line, util def rolling_mean(series, period): """現在の株価(短期)と長期移動平均線(長期)のクロス""" slow = series.rolling(window=period, center=False).mean() return util.cross(series, slow) def rolling_mean_ratio(series, period, ratio): """長期移動平均線と現在の株価の最終日の差がratio乖離したら売買シグナル""" mean ...
gpl-3.0
7,619,161,558,827,822,000
28.868421
67
0.647137
false
ted-dunstone/ivs
hub_demo/test_match.py
1
1043
import pika import sys import logging logging.basicConfig() connection = pika.BlockingConnection(pika.ConnectionParameters( host='localhost')) channel = connection.channel() channel.exchange_declare(exchange='Australia_NZ_Exchange', type='headers') result = channel.queue_declare(excl...
mit
-1,545,338,382,569,837,600
26.447368
65
0.61745
false
SKIRT/PTS
do/core/convert.py
1
4941
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
agpl-3.0
-4,891,003,356,254,152,000
42.333333
141
0.634615
false
m4tx/techswarm-server
tsserver/model.py
1
1346
from tsserver import db from tsserver.strutils import to_camel_case class Model(db.Model): """ Base class for all models. What differs it from default Model class is serializable method, which is used to convert objects to JSON (or any other representation) more easily. """ __abstract__ = Tru...
mit
8,821,978,695,869,308,000
31.829268
79
0.648588
false
gemelkelabs/timing_system_software
server_py_files/core/xstatus.py
1
1031
# -*- coding: utf-8 -*- """ Created on Sat Apr 05 21:30:07 2014 @author: Nate """ from xml.sax import saxutils class xstatus_ready(): """ Inheritance class to add a status output in xml-format to any object """ def xstatus(self): """ returns status of the listener as xml, and follows-...
mit
3,538,536,760,451,454,000
28.485714
96
0.519884
false
cheery/essence
essence/selection.py
1
12706
# This file is part of Essential Editor Research Project (EERP) # # EERP 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. # # EERP is di...
gpl-3.0
40,778,738,927,370,540
33.064343
156
0.557217
false
google/material-design-icons
update/venv/lib/python3.9/site-packages/fontTools/pens/basePen.py
3
13126
"""fontTools.pens.basePen.py -- Tools and base classes to build pen objects. The Pen Protocol A Pen is a kind of object that standardizes the way how to "draw" outlines: it is a middle man between an outline and a drawing. In other words: it is an abstraction for drawing outlines, making sure that outline objects don...
apache-2.0
4,968,359,647,964,168,000
31.490099
78
0.710879
false
almarklein/bokeh
bokeh/server/views/data.py
1
2797
import json from flask import jsonify, request from six import iteritems from bokeh import protocol from bokeh.models import Range1d from .backbone import init_bokeh from ..app import bokeh_app from ..crossdomain import crossdomain from ..serverbb import prune from ..views import make_json @bokeh_app.route("/bokeh...
bsd-3-clause
-7,211,432,925,990,131,000
37.847222
111
0.6936
false
dpinney/omf
omf/scratch/MPUPV/solarAdd.py
1
1552
from omf import feeder import omf.solvers.gridlabd feed = feeder.parse('GC-12.47-1.glm') maxKey = feeder.getMaxKey(feed) print(feed[1]) feed[maxKey + 1] = { 'object': 'node', 'name': 'test_solar_node', 'phases': 'ABCN', 'nominal_voltage': '7200' } feed[maxKey + 2] = { 'object': 'underground_line', 'name': 'test_s...
gpl-2.0
-2,700,435,537,165,388,300
35.116279
158
0.642397
false
mricharleon/HatosGanaderos
userena/urls.py
1
4539
from django.conf.urls import * from django.contrib.auth import views as auth_views from userena import views as userena_views from userena import settings as userena_settings from userena.compat import auth_views_compat_quirks, password_reset_uid_kwarg def merged_dict(dict_a, dict_b): """Merges two dicts and ret...
gpl-2.0
-6,829,509,290,407,092,000
37.142857
102
0.625028
false
tianhao64/vsphere-automation-sdk-python
samples/vsphere/vcenter/vm/main.py
1
5800
""" * ******************************************************* * Copyright (c) VMware, Inc. 2016-2018. All Rights Reserved. * SPDX-License-Identifier: MIT * ******************************************************* * * DISCLAIMER. THIS PROGRAM IS PROVIDED TO YOU "AS IS" WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, WHET...
mit
-7,201,189,507,724,110,000
40.134752
107
0.545
false
Morijarti/dota-2-heatmap
heroes.py
1
15331
__author__ = 'yanbo' HEROES = [{'dt_name': 'DT_DOTA_Unit_Hero_AntiMage', 'id': 2, 'localized_name': 'Anti-Mage', 'name': 'npc_dota_hero_antimage'}, {'dt_name': 'DT_DOTA_Unit_Hero_Axe', 'id': 3, 'localized_name': 'Axe', 'name': 'npc_dota_hero_axe'}, {'dt_name': 'DT_DOTA_Unit...
mit
1,758,962,667,588,618,200
34.736597
56
0.546866
false
thica/ORCA-Remote
src/ORCA/settings/setttingtypes/SettingActions.py
1
4810
# -*- coding: utf-8 -*- """ ORCA Open Remote Control Application Copyright (C) 2013-2020 Carsten Thielepape Please contact me by : http://www.orca-remote.org/ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publish...
gpl-3.0
-6,715,954,626,130,124,000
45.156863
119
0.619543
false
GoodgameStudios/crossbar
crossbar/adapter/rest/test/test_common.py
1
9136
##################################################################################### # # Copyright (C) Tavendo GmbH # # Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you # have purchased a commercial license), the license terms below apply. # # Should you enter into a separate licen...
agpl-3.0
-1,753,702,394,484,008,000
35.398406
115
0.617995
false
whiteclover/Choco
test/test_inheritance.py
1
10179
from choco import lookup, compat import unittest from test.util import result_lines class InheritanceTest(unittest.TestCase): def test_basic(self): collection = lookup.TemplateLookup() collection.put_string('main', """ <%inherit file="base"/> <%def name="header()"> main header. </%def> this ...
mit
347,781,610,667,428,540
28.166189
163
0.483938
false
census-instrumentation/opencensus-python
contrib/opencensus-ext-zipkin/opencensus/ext/zipkin/trace_exporter/__init__.py
1
6920
# Copyright 2017, OpenCensus 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 applicable law or agreed to in w...
apache-2.0
-6,535,133,408,901,106,000
31.641509
79
0.598555
false
pihito/myHomeBox
devAsset/python/main.py
1
1055
from flask import Flask,render_template,request from flask.ext.script import Manager #déclare le serveur flask app = Flask(__name__) #déclare le plug-in flask-script manager = Manager(app) #crée la route web de la racine du site #et la lie à la fonction index @app.route("/") def index(): return render_templa...
apache-2.0
-385,943,290,818,522,430
27.324324
82
0.671442
false
thanatoskira/AndroGuard
build/scripts-2.7/androapkinfo.py
1
3821
#!/usr/bin/python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard 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, eit...
lgpl-3.0
2,697,242,861,988,364,300
36.460784
101
0.548548
false
ray-project/ray
python/ray/autoscaler/_private/azure/node_provider.py
1
12092
import json import logging from pathlib import Path from threading import RLock from uuid import uuid4 from azure.common.client_factory import get_client_from_cli_profile from msrestazure.azure_active_directory import MSIAuthentication from azure.mgmt.compute import ComputeManagementClient from azure.mgmt.network impo...
apache-2.0
-5,612,354,719,580,587,000
38.645902
78
0.606517
false
lhaze/dharma
pca/data/dao/abstract.py
1
7281
import typing as t from abc import abstractmethod from functools import reduce from operator import and_ from pca.data.errors import QueryErrors from pca.data.predicate import Predicate from pca.interfaces.dao import ( BatchOfDto, Dto, Id, IDao, Ids, IQueryChain, Kwargs, ) from pca.utils.d...
mit
-3,672,697,594,967,121,400
29.851695
98
0.609944
false
avedaee/DIRAC
WorkloadManagementSystem/Agent/JobCleaningAgent.py
1
8926
######################################################################## # $HeadURL$ # File : JobCleaningAgent.py # Author : A.T. ######################################################################## """ The Job Cleaning Agent controls removing jobs from the WMS in the end of their life cycle. """ from DIRAC ...
gpl-3.0
4,453,427,842,608,304,000
35.73251
114
0.608895
false
NightscoutFoundation/dataxfer
oh_data_source/celery.py
1
1415
""" Celery set up, as recommended by celery http://celery.readthedocs.org/en/latest/django/first-steps-with-django.html Celery will automatically discover and use methods within INSTALLED_APPs that have the @shared_task decorator. """ # absolute_import prevents conflicts between project celery.py file # and the celery...
gpl-3.0
4,745,985,152,428,473,000
29.76087
77
0.728622
false
GoIncremental/gi-ansible
inventory/digital_ocean.py
1
19937
#!/usr/bin/env python ''' DigitalOcean external inventory script ====================================== Generates Ansible inventory of DigitalOcean Droplets. In addition to the --list and --host options used by Ansible, there are options for generating JSON of other DigitalOcean data. This is useful when creating d...
apache-2.0
-7,804,996,669,653,076,000
39.940452
192
0.580679
false
yveskaufmann/Naive-Bayes
NaiveBayes/BagOfWords.py
1
1801
class BagOfWords(object): """ Implementing a bag of words, words corresponding with their frequency of usages in a "document" for usage by the Document class, DocumentClass class and the Pool class. """ def __init__(self): self.__number_of_words = 0 self.__bag_of_words = {} de...
mit
204,471,557,903,905,180
26.707692
99
0.52804
false
lmazuel/azure-sdk-for-python
azure-mgmt-consumption/azure/mgmt/consumption/models/__init__.py
1
2327
# 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
-6,159,015,588,938,572,000
31.319444
76
0.7211
false
xR86/ml-stuff
labs-AI/hw-lab5/pawn_chess.py
1
14528
# /usr/bin/python ''' Based on Representing a chess set in Python Part 2 Brendan Scott https://python4kids.brendanscott.com/2013/04/28/a-different-view-on-our-chess-model/ ''' import Tkinter as tk from Tkinter import PhotoImage import os.path import os # column_reference = "1 2 3 4 5 6 7 8".split(" ") column_refere...
mit
-8,434,570,687,873,066,000
38.373984
105
0.581016
false
Azure/azure-sdk-for-python
sdk/edgegateway/azure-mgmt-edgegateway/azure/mgmt/edgegateway/models/arm_base_model.py
1
1384
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-4,780,398,978,749,978,000
29.755556
76
0.547688
false
lightd22/smartDraft
src/data/database_ops.py
1
15164
import sqlite3 import re from .champion_info import champion_id_from_name,champion_name_from_id, convert_champion_alias, AliasException regionsDict = {"NA_LCS":"NA", "EU_LCS":"EU", "LCK":"LCK", "LPL":"LPL", "LMS":"LMS", "International":"INTL", "NA_ACA": "NA_ACA", "KR_CHAL":"KR_CHAL", "LDL":"LDL"} inter...
apache-2.0
-8,253,334,377,751,635,000
41.122222
156
0.615339
false
mikalstill/nova
nova/conf/cinder.py
1
4043
# Copyright (c) 2016 OpenStack Foundation # 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 ...
apache-2.0
6,942,938,164,454,437,000
32.691667
79
0.697007
false
FedoraScientific/salome-paravis
test/VisuPrs/Plot3D/E3.py
1
1493
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # 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 ...
lgpl-2.1
8,911,156,577,564,217,000
37.282051
81
0.731413
false