repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
PVirie/aknowthai
src/test.py
1
1728
import gen import network as ann import numpy as np import util def eval(neural_net, data, labels): classes, alphas = neural_net.scan(data, gen.get_default_total_code()) data3ch = util.cvtColorGrey2RGB(data) red = np.array([1.0, 0.0, 0.0], dtype=np.float32) for b in xrange(alphas.shape[0]): f...
mit
-4,338,133,510,740,657,000
31.603774
96
0.601852
false
3.141818
false
false
false
xingnix/learning
machinelearning/python/computationallearningtheory/weightedmajority.py
1
2790
import re import numpy as np input_string = """ Example Sky AirTemp Humidity Wind Water Forecast EnjoySport 1 Sunny Warm Normal Strong Warm Same Yes 2 Sunny Warm High Strong Warm Same Yes 3 Rainy Cold High Strong Warm Change No 4 Sunny Warm High Strong Cool Change...
gpl-3.0
3,463,591,842,420,936,000
29.659341
104
0.513262
false
3.353365
false
false
false
cpbl/cpblUtilities
matplotlib_utils.py
1
7242
#!/usr/bin/python import matplotlib.pyplot as plt def prepare_figure_for_publication(ax=None, width_cm=None, width_inches=None, height_cm=None, height_inches=None, fontsize=None, fontsize_labels=None, fontsiz...
gpl-3.0
-5,737,185,367,860,241,000
43.158537
474
0.627175
false
3.725309
false
false
false
sarrionandia/taber
data/views.py
1
4616
from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponse, Http404 from django.utils.decorators import method_decorator from django.views.generic import View from django.template import RequestContext, loader from models import Institution, Judge, Team, Venue from django.views.decorator...
gpl-2.0
3,279,643,001,639,974,000
29.569536
90
0.630416
false
4.084956
false
false
false
xzhang2016/tfagent
tfta/test/test2_json.py
1
40826
from kqml import KQMLList, KQMLString from tfta.tfta import TFTA from tfta.tfta_module import TFTA_Module from bioagents.tests.util import ekb_from_text, ekb_kstring_from_text, \ get_request, agent_clj_from_text from bioagents.tests.integration import _IntegrationTest, _FailureTest from...
bsd-2-clause
-776,647,102,837,806,700
38.445411
119
0.606452
false
3.559062
true
false
false
cajone/pychess
lib/pychess/widgets/ChatWindow.py
1
3808
import re from gi.repository import Gtk from pychess.widgets.ChatView import ChatView from pychess.widgets.ViewsPanel import ViewsPanel from pychess.widgets.InfoPanel import InfoPanel from pychess.widgets.ChannelsPanel import ChannelsPanel TYPE_PERSONAL, TYPE_CHANNEL, TYPE_GUEST, \ TYPE_ADMIN, TYPE_COMP, TYPE_BL...
gpl-3.0
-2,369,495,915,848,076,000
33
77
0.608193
false
3.736997
false
false
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
2.229543
false
false
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
4.798133
false
false
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
2.752827
false
false
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
4.389474
false
false
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
4.36618
false
false
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
4.23166
false
false
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
3.410834
false
false
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
2.940152
false
false
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
4.09643
true
false
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
2.877825
false
false
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
3.395957
true
false
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
3.568199
false
false
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
3.270471
false
false
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
4.390372
false
false
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
3.833174
false
false
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
4.730229
false
false
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
3.592635
false
false
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
3.63227
false
false
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
3.904124
false
false
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
3.514318
false
false
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
3.882653
false
false
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
3.364709
false
false
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
3.069995
true
false
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
4.917127
true
false
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
3.810264
false
false
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
3.085417
false
false
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
3.31614
false
false
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
3.649394
false
false
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
4.262661
true
false
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
3.824823
false
false
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
3.817211
false
false
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
3.935987
false
false
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
3.674129
false
false
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
3.135307
false
false
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
3.778777
false
false
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
3.989805
false
false
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
4.442831
false
false
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
2.094438
false
false
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
4.208917
false
false
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
3.286159
false
false
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
3.156105
false
false
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
2.929155
false
false
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
3.737395
false
false
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
3.618926
false
false
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
3.766141
false
false
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
3.436741
false
false
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
2.724284
false
false
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
2.182692
false
false
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
4.205645
false
false
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
3.804428
false
false
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
3.668014
false
false
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
3.233801
false
false
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
3.842033
false
false
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
3.524068
false
false
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
4.208224
false
false
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
3.95301
true
false
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
4.039696
false
false
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
3.026012
false
false
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
3.871327
false
false
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
4.132236
false
false
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
3.911481
false
false
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
3.969142
true
false
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
3.923747
false
false
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
3.807128
false
false
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
4.379747
false
false
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
3.942798
false
false
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
4.018887
false
false
false
alanaberdeen/coupled-minimum-cost-flow-track
cmcft/tools/params/c_cost.py
1
2405
# c_cost.py # Cost vector for edges in coupled matrix import numpy as np __all__ = ["c_cost"] def c_cost(g, a_coup, a_vertices): # TODO: think this function is slow. Check for performance increases. # c_cost # creates vector of costs for edges # # Inputs: g - graph structure # ...
mit
-3,617,845,052,523,256,300
23.540816
77
0.50894
false
3.734472
false
false
false
stylight/python-fastbill
tests/test_api.py
1
6430
#!/usr/bin/env python # encoding: utf-8 import datetime import decimal import httpretty import json import unittest # Set the endpoint to http because some library combination # leads to a SSLError when running the test with httpretty. api_endpoint = "http://automatic.fastbill.com/api/1.0/api.php" api_email = "fastb...
mit
5,063,697,128,748,161,000
32.489583
80
0.487092
false
4.566761
true
false
false
steffgrez/fast-jsonrpc2
fast_jsonrpc2/resolver.py
1
2183
""" from fast_jsonrpc import JSONRPCResolver def foo(msg) return 'foobar ' + str(msg) router = {'foo': foo} resolver = JSONRPCResolver(router) json_request = {"jsonrpc": "2.0", "method": "foo", "params": ["toto"], "id": 1} json_response = resolver.handle(json_request) print json_response -> {"jsonrpc": "2.0", "...
mit
4,663,643,689,105,370,000
26.2875
79
0.558406
false
4.501031
false
false
false
ninemoreminutes/django-datatables
test_project/settings.py
1
2955
# Python import os import sys # Django from django.conf import global_settings # Update this module's local settings from the global settings module. this_module = sys.modules[__name__] for setting in dir(global_settings): if setting == setting.upper(): setattr(this_module, setting, getattr(global_setting...
bsd-3-clause
7,971,362,363,779,574,000
23.221311
72
0.598308
false
3.488784
false
false
false
ulif/pulp
common/pulp/common/error_codes.py
1
9417
from collections import namedtuple from gettext import gettext as _ Error = namedtuple('Error', ['code', 'message', 'required_fields']) """ The error named tuple has 4 components: code: The 7 character uniquely identifying code for this error, 3 A-Z identifying the module followed by 4 numeric characters for th...
gpl-2.0
3,952,500,558,581,350,000
56.072727
100
0.609642
false
3.846814
false
false
false
stuart-stanley/RackHD
test/tests/api/v2_0/nodes_tests.py
1
20157
from config.api2_0_config import config from config.amqp import * from modules.logger import Log from modules.amqp import AMQPWorker from modules.worker import WorkerThread, WorkerTasks from on_http_api2_0 import ApiApi as Api from on_http_api2_0 import rest from datetime import datetime from proboscis.asserts import a...
apache-2.0
-2,104,577,647,102,050,300
41.978678
114
0.540904
false
3.631238
true
false
false
QuincyWork/AllCodes
Python/Codes/Practice/LeetCode/211 Add and Search Word - Data structure design.py
1
1913
 # define const variable _MAX_LETTER_SIZE = 27; _STRING_END_TAG = '#'; class TireNode(object): def __init__(self,x): self.value = x self.childNodes = {} class WordDictionary(object): def __init__(self): """ Initialize your data structure here. """ self.root =...
mit
-8,859,075,159,283,428,000
23.189873
125
0.521193
false
4.172489
false
false
false
thorwhalen/ut
stats/util.py
1
2022
__author__ = 'thor' from numpy import zeros, argmin, array, unique, where from scipy.spatial.distance import cdist def _df_picker(df, x_cols, y_col): return df[x_cols].as_matrix(), df[[y_col]].as_matrix() def df_picker_data_prep(x_cols, y_col): return lambda df: _df_picker(df, x_cols, y_col) def binomial...
mit
2,205,652,758,375,168,500
32.7
120
0.674085
false
3.277147
false
false
false
greyshell/linuxJuicer
badchar-detection-automated/badchar-detection-HPNNM-B.07.53.py
1
8764
#!/usr/bin/env python # Description: Identify good and bad chars in HPNNM-B.07.53 # author: greyshell # Script requirements: python 2.7 x86, pydbg 32bit binary, python wmi, pywin32 # Copy pydbg inside C:\Python27\Lib\site-packages\ # Copy pydasm.pyd inside C:\Python27\Lib\site-packages\pydbg\ import os import socket...
mit
5,686,919,584,607,260,000
29.754386
116
0.674464
false
2.659788
false
false
false
MarxDimitri/schmankerl
schmankerlapp/models.py
1
1505
from django.db import models from django.contrib.auth.models import User # Create your models here. class Restaurant(models.Model): user = models.OneToOneField(User, on_delete=models.CASCADE, related_name='restaurant') name = models.CharField(max_length=500) phone = models.CharField(max_length=500) add...
apache-2.0
687,804,165,970,565,200
35.707317
90
0.706312
false
3.626506
false
false
false
Fokko/incubator-airflow
airflow/ti_deps/deps/trigger_rule_dep.py
1
9884
# -*- coding: utf-8 -*- # # 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 #...
apache-2.0
-311,230,294,439,406,660
43.32287
94
0.563234
false
4.48254
false
false
false
walterbender/story
toolbar_utils.py
1
5567
# -*- coding: utf-8 -*- # Copyright (c) 2011, Walter Bender # Port To GTK3: # Ignacio Rodriguez <ignaciorodriguez@sugarlabs.org> # 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 ...
gpl-3.0
-1,535,071,521,111,068,200
32.945122
75
0.659062
false
3.580064
false
false
false
yeleman/health_ident
health_ident/management/commands/export_j2me.py
1
2794
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu from __future__ import (unicode_literals, absolute_import, division, print_function) import os import zipfile from django.conf import settings from optparse import make_option from django.core.management.base import ...
unlicense
8,823,605,234,748,818,000
35.298701
110
0.582319
false
3.885953
false
false
false
sumihai-tekindo/account_sicepat
add_sub_menu/models/check_id.py
1
1245
from datetime import datetime from openerp.osv import fields,osv from openerp.tools.translate import _ class purchase_requisition_line(osv.osv): _inherit = "purchase.requisition.line" def stock_out(self, cr, uid, ids,stock_out): if self.stock_out: return { 'view_type': 'form', 'flags': {'a...
gpl-3.0
-3,897,940,405,699,393,500
35.787879
191
0.659438
false
2.875289
false
false
false
nkoep/blaplay
blaplay/formats/wav.py
1
1831
# blaplay, Copyright (C) 2012 Niklas Koep # 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 2 # of the License, or (at your option) any later version. # This program is distribut...
gpl-2.0
-6,617,483,503,426,571,000
35.62
78
0.677226
false
3.9718
false
false
false
kaushik94/sympy
sympy/printing/tests/test_rcode.py
7
14176
from sympy.core import (S, pi, oo, Symbol, symbols, Rational, Integer, GoldenRatio, EulerGamma, Catalan, Lambda, Dummy, Eq) from sympy.functions import (Piecewise, sin, cos, Abs, exp, ceiling, sqrt, gamma, sign, Max, Min, factorial, beta) from sympy.sets import Range...
bsd-3-clause
-5,326,308,247,995,265,000
27.87169
105
0.482294
false
2.501941
true
false
false
gplepage/gvar
examples/svdcut.py
1
2303
""" svdcut.py --- Correlations and SVD Cuts This code illustrates the use of SVD cuts when calculating correlations using random samples. See the Case Study in the documentation for more information. """ from __future__ import print_function import numpy as np import gvar as gv try: # may not be installed, in wh...
gpl-3.0
5,101,233,874,259,818,000
40.125
98
0.583152
false
2.156367
false
false
false
alex-ip/agdc
agdc/landsat_ingester/__main__.py
1
2058
#!/usr/bin/env python # =============================================================================== # Copyright (c) 2014 Geoscience Australia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ar...
bsd-3-clause
2,366,633,804,520,542,700
49.45
86
0.68999
false
4.48366
false
false
false
GAMPTeam/vampyre
demos/mlp/randmlp.py
1
3387
# -*- coding: utf-8 -*- """ randmlp: Random MLP class definitions @author: Sundeep """ import numpy as np import pickle """ Randomly generated multilayer perceptron """ class RandomMLP: """ Constructor """ def __init__(self, nin, nhid, nout, sparse_tgt=[]): # Get dimensions self...
mit
-1,413,568,176,545,062,700
25.460938
72
0.459404
false
3.801347
false
false
false
jlongever/redfish-client-python
on_http_redfish_1_0/models/odata_4_0_0_context.py
1
2489
# coding: utf-8 """ Copyright 2015 SmartBear Software 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 applica...
apache-2.0
-451,191,449,684,300,100
26.351648
77
0.55685
false
4.687382
false
false
false
kit-cel/gr-dab
apps/dab_rx_constellation.py
1
6407
#!/usr/bin/env python2 # -*- coding: utf8 -*- # Andreas Müller, 2008 # andrmuel@ee.ethz.ch # # this code may be freely used under GNU GPL conditions """ demodulate DAB signal and ouput to constellation sink """ from gnuradio import gr, uhd, blocks from gnuradio import eng_notation from gnuradio.eng_option import eng...
gpl-3.0
8,074,108,952,524,165,000
38.54321
346
0.685295
false
2.905215
false
false
false
reliableJARED/python
opencv/video_on_video_overlay_tracked_obj.py
1
4338
''' This code will put a video on a colored object (like a green ball)in the main video stream. It will resize the overlay video on the fly based on big the tracked object is. The code will not work without the file: hist_for_tracking.png that is the 'color calibration' image. The program does allow you to calibrate...
gpl-3.0
-4,845,308,143,406,473,000
35.453782
90
0.638774
false
3.386417
false
false
false
cosmodesi/snsurvey
src/control.py
1
1120
#!/usr/bin/env python import numpy import sncosmo import scipy.optimize import matplotlib.pyplot as plt model=sncosmo.Model(source='salt2-extended') def f(t ,rlim): # print t, model.bandflux('desr',t, zp = rlim, zpsys='ab') return model.bandflux('desr',t, zp = rlim, zpsys='ab')-1. def controlTime(z,rlim): ...
bsd-3-clause
-1,581,675,154,253,889,500
26.317073
79
0.605357
false
2.528217
false
false
false
prefetchnta/questlab
bin/x64bin/python/37/Lib/html/parser.py
1
18191
"""A parser for HTML and XHTML.""" # This file is based on sgmllib.py, but the API is slightly different. # XXX There should be a way to distinguish between PCDATA (parsed # character data -- the normal case), RCDATA (replaceable character # data -- only char and entity references and end tags are special) # a...
lgpl-2.1
-4,034,221,794,916,283,000
36.704255
80
0.490792
false
4.209905
false
false
false
aykut/django-oscar
oscar/apps/address/abstract_models.py
1
7907
import zlib from django.db import models from django.utils.translation import ugettext_lazy as _ class AbstractAddress(models.Model): """ Superclass address object This is subclassed and extended to provide models for user, shipping and billing addresses. The only required fields are last_name...
bsd-3-clause
-9,183,936,321,529,190,000
38.143564
108
0.621981
false
4.090533
false
false
false
glowtree/pybythec
pybythec/__init__.py
1
18150
# -*- coding: utf-8 -*- from pybythec import utils from pybythec.utils import f from pybythec.utils import PybythecError from pybythec.BuildStatus import BuildStatus from pybythec.BuildElements import BuildElements import os import sys import time from threading import Thread log = utils.Logger('pybythec') __author_...
isc
2,476,342,218,496,277,000
29.658784
146
0.638182
false
3.543538
true
false
false
wasade/qiime
tests/test_core_microbiome.py
1
4217
#!/usr/bin/env python # File created on 08 Jun 2012 from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2011, The QIIME project" __credits__ = ["Greg Caporaso"] __license__ = "GPL" __version__ = "1.8.0-dev" __maintainer__ = "Greg Caporaso" __email__ = "gregcaporaso@gmail.com" from...
gpl-2.0
8,308,714,476,410,311,000
55.986486
908
0.526678
false
3.06468
true
false
false