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
neocogent/electrum
setup.py
1
3017
#!/usr/bin/env python3 # python setup.py sdist --format=zip,gztar import os import sys import platform import importlib.util import argparse import subprocess from setuptools import setup, find_packages from setuptools.command.install import install MIN_PYTHON_VERSION = "3.6.1" _min_python_version_tuple = tuple(map...
mit
6,636,443,891,689,976,000
31.095745
94
0.640371
false
3.378499
false
false
false
M4rtinK/tsubame
core/platform/base_platform_module.py
1
8584
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Base class for Tsubame platform modules. #---------------------------------------------------------------------------- # Copyright 2017, Martin Kolman # # This program is free software: you can redistribute it and/or...
gpl-3.0
-3,431,817,031,588,530,700
33.894309
95
0.612069
false
4.846979
false
false
false
avlach/univbris-ocf
vt_manager/src/python/vt_manager/communication/sfa/util/callids.py
2
2280
#!/usr/bin/python import threading import time #from vt_manager.communication.sfa.util.sfalogging import logger """ Callids: a simple mechanism to remember the call ids served so fas memory-only for now - thread-safe implemented as a (singleton) hash 'callid'->timestamp """ debug=False class _call_ids_impl (dict):...
bsd-3-clause
5,228,022,733,388,344,000
30.666667
115
0.578509
false
3.653846
false
false
false
live-clones/dolfin-adjoint
timestepping/python/timestepping/pre_assembled_equations.py
1
21818
#!/usr/bin/env python2 # Copyright (C) 2011-2012 by Imperial College London # Copyright (C) 2013 University of Oxford # Copyright (C) 2014-2016 University of Edinburgh # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by ...
lgpl-3.0
5,529,168,736,928,071,000
45.619658
189
0.534788
false
4.178893
false
false
false
trnewman/VT-USRP-daughterboard-drivers_python
gnuradio-core/src/lib/filter/generate_gr_fir_sysconfig.py
1
3066
#!/bin/env python # -*- python -*- # # Copyright 2003 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at ...
gpl-3.0
2,011,145,555,511,358,200
23.141732
98
0.616765
false
3.480136
true
false
false
Hiestaa/3D-Lsystem
Vector.py
1
1792
class Vector: """represente un vecteur 3d""" def __init__(self, arg = (0, 0, 0)): self.x = float(arg[0]) self.y = float(arg[1]) self.z = float(arg[2]) def set(self, val): if isinstance(val, self.__class__): self.x = val.x self.y = val.y self.z = val.z else: self.x = val[0] self.y = val[1] ...
mit
-1,565,978,637,445,939,500
24.985507
74
0.582589
false
2.623719
false
false
false
SymbiFlow/prjxray
minitests/litex/uart_ddr/arty/scripts/arty.py
1
4274
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2017-2020 The Project X-Ray Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC # This file is Copyright (c) 2015-20...
isc
-8,789,639,174,733,908,000
32.920635
100
0.535564
false
3.546888
false
false
false
kapil1garg/eecs338-chris-jones
show_query.py
1
3440
import json import elastic from operator import itemgetter from default_query import DefaultQuery class ShowQuery(DefaultQuery): """ Handles ES queries related to shows """ def __init__(self): DefaultQuery.__init__(self) def generate_response_best_show(self, query, annotated_query): ...
mit
2,222,587,426,113,204,000
34.102041
117
0.386628
false
4.971098
false
false
false
jakevdp/altair
altair/utils/server.py
1
4035
""" A Simple server used to show altair graphics from a prompt or script. This is adapted from the mpld3 package; see https://github.com/mpld3/mpld3/blob/master/mpld3/_server.py """ import sys import threading import webbrowser import socket import itertools import random from ._py3k_compat import server, IO JUPYTER_...
bsd-3-clause
4,777,088,075,087,904,000
29.11194
78
0.603965
false
3.887283
false
false
false
CWDoherty/Baseball
Scripts/hashtags.py
1
1999
''' Copyright (c) 2015 Chris Doherty, Oliver Nabavian Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publi...
mit
-4,705,462,326,985,644,000
26.013514
77
0.722361
false
3.309603
false
false
false
karesansui/karesansui
karesansui/gadget/hostby1staticroute.py
1
6419
# -*- coding: utf-8 -*- # # This file is part of Karesansui. # # Copyright (C) 2009-2012 HDE, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without lim...
mit
270,860,576,896,063,070
33.326203
119
0.581087
false
3.871532
false
false
false
dlu-ch/dlb
test/dlb_contrib/test_git.py
1
21925
# SPDX-License-Identifier: LGPL-3.0-or-later # dlb - a Pythonic build tool # Copyright (C) 2020 Daniel Lutz <dlu-ch@users.noreply.github.com> import testenv # also sets up module search paths import dlb.di import dlb.fs import dlb.ex import dlb_contrib.generic import dlb_contrib.git import dlb_contrib.sh import os.pa...
gpl-3.0
9,056,215,447,418,423,000
42.39604
116
0.592015
false
3.456079
true
false
false
LCOGT/whatsup
whatsup/urls.py
1
1040
""" WhatsUP: astronomical object suggestions for Las Cumbres Observatory Global Telescope Network Copyright (C) 2014-2015 LCOGT urls.py 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...
gpl-3.0
-5,789,981,566,066,620,000
36.142857
93
0.749038
false
3.823529
false
false
false
holytortoise/abwreservierung
src/reservierung/views.py
1
19052
from django.shortcuts import render from django.views.generic import TemplateView, ListView, DetailView from django.views.generic.edit import CreateView, UpdateView, DeleteView, FormView from django.views.generic.dates import WeekArchiveView from django.urls import reverse_lazy, reverse from django.contrib.auth.mixins ...
mit
3,023,080,012,261,107,700
52.847025
169
0.476378
false
4.218375
false
false
false
sternb0t/django-pandas
django_pandas/io.py
1
3578
import pandas as pd from .utils import update_with_verbose import django def to_fields(qs, fieldnames): for fieldname in fieldnames: model = qs.model for fieldname_part in fieldname.split('__'): try: field = model._meta.get_field(fieldname_part) except djang...
bsd-3-clause
5,211,177,889,404,389,000
36.663158
101
0.602571
false
4.44472
false
false
false
Urumasi/Flask-Bones
app/data/models/oauth.py
1
5170
from flask_login import UserMixin from app.extensions import cache ,bcrypt import bcrypt as bcr from .. import db from ..mixins import CRUDMixin import datetime from rauth import OAuth1Service, OAuth2Service from flask import current_app, url_for, request, redirect, session class Oauth(CRUDMixin, UserMixin, db.Model)...
mit
-6,923,497,179,262,909,000
37.303704
94
0.589555
false
3.804268
false
false
false
elainenaomi/sciwonc-dataflow-examples
sbbd2016/experiments/1-postgres/3_workflow_full_10files_primary_nosh_nors_annot_with_proj_3s/pegasus.bDkvI/pegasus-4.6.0/lib/python2.7/dist-packages/Pegasus/monitoring/notifications.py
1
34263
""" Class for managing notifications in pegasus-monitord. """ ## # Copyright 2007-2011 University Of Southern California # # 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.a...
gpl-3.0
1,688,029,379,072,213,500
43.096525
118
0.516038
false
4.653402
false
false
false
GuillaumeDD/AdventOfCode2016
day08.py
1
5304
from __future__ import print_function # print utilities without systematic '\n' at EOL import io import re # --- Day 8: Two-Factor Authentication --- # # You come across a door implementing what you can only assume is an # implementation of two-factor authentication after a long game of # requirements telephone. # # T...
gpl-3.0
-4,303,923,578,873,608,000
30.760479
113
0.614065
false
3.471204
false
false
false
tomlepaine/bottle-skeleton
app.py
1
1076
import argparse from bottle import get, run, response, static_file, redirect from jinja2 import Environment, PackageLoader import config parser = argparse.ArgumentParser(prog=config.name, description=config.description) parser.add_argument('--port', type=int, ...
bsd-2-clause
3,597,068,652,393,336,000
19.692308
64
0.620818
false
3.870504
false
false
false
whiteclover/Breeze
breeze/chatcenter/room.py
1
1148
import time import logging LOGGER = logging.getLogger(__name__) class Room(object): def __init__(self, name): self.name = name self.peers = {} def broadcast(self, msg): if msg: for peer in self.peers.values(): if peer != msg.user: LOGGER.info('peer: %s', peer) peer.send(msg) def add_peer(s...
gpl-2.0
-523,038,310,736,264,300
19.5
50
0.658537
false
2.701176
false
false
false
ge0rgi/cinder
cinder/tests/unit/volume/drivers/dell_emc/scaleio/test_delete_snapshot.py
1
3977
# Copyright (c) 2013 - 2015 EMC Corporation. # 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 # # Unle...
apache-2.0
8,501,585,848,030,189,000
40.863158
78
0.602967
false
4.235357
true
false
false
rafafigueroa/compass-gait
hasimpy.py
1
9216
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Rafael Figueroa """ dp = True import numpy as np DEBUG = False class H: """Hybrid Automata Model""" def __init__(self, Q, Init_X, Init_qID, state_names = None): self.q = Q #list of q self.Init_X = Init_X self.Init_qID = Init_q...
gpl-2.0
5,182,060,363,343,078,000
26.927273
73
0.513129
false
3.649901
false
false
false
scribusproject/scribus-tools
md_import.py
1
1176
run_script = True import scribus from tempfile import NamedTemporaryFile try: import markdown except: scribus.messageBox('python-markdown not installed', 'You need to install python-markdown for this script to work', scribus.ICON_WARNING) run_script = False run_script &= bool(scribus.getSelectedObjec...
gpl-3.0
-3,829,810,779,273,234,400
24.565217
93
0.643707
false
3.618462
false
false
false
Code4SA/pmgbilltracker
pmg_scrapers/pmg/scrape_pdf.py
1
2621
import requests import json import os import tempfile import re url = "http://db3sqepoi5n3s.cloudfront.net/files/pmb5_2013.pdf" url = "http://db3sqepoi5n3s.cloudfront.net/files/130416pmb3-2013.pdf" url = "http://db3sqepoi5n3s.cloudfront.net/files/131031b18b-2013.pdf" url = "http://db3sqepoi5n3s.cloudfront.net/files/13...
apache-2.0
1,909,753,005,026,915,800
25.474747
100
0.638688
false
2.971655
false
false
false
xmdy/ibstats
src/stats/models.py
1
1877
from __future__ import unicode_literals from django.db import models from django.utils.translation import ugettext as _ import random def get_random_value(start=100, end=100000): def get_random(): return random.randint(start, end) * 0.01 return get_random class Trader(models.Model): name = model...
gpl-3.0
-8,023,529,222,036,301,000
34.433962
105
0.639851
false
3.623552
false
false
false
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
3.655462
false
false
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
3.728232
true
false
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
3.009875
false
false
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
3.347938
false
false
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
3.167442
false
false
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
3.34197
true
false
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
4.814969
false
false
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
3.712565
false
false
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
3.843162
false
false
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
4.066507
false
false
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
3.179739
false
false
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
3.746102
false
false
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
4.408333
false
false
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
3.663284
false
false
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
4.321739
false
false
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
3.879098
false
false
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
4.238176
false
false
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
3.872905
false
false
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
3.015112
false
false
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
3.402348
false
false
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
3.233691
false
false
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
3.705113
false
false
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
3.506187
false
false
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
3.312422
false
false
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
3.520147
false
false
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
4.380306
true
false
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
3.733468
false
false
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
3.715655
false
false
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
3.385762
false
false
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
2.719269
false
false
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
3.347639
false
false
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
3.690255
false
false
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
3.950139
false
false
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
2.765797
false
false
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
2.802389
false
false
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
3.737288
false
false
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
4.317439
false
false
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
3.612698
false
false
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
2.39627
false
false
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
3.442194
false
false
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
3.913793
false
false
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
4.262465
false
false
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
3.445846
false
false
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
4.394102
false
false
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
4.295455
false
false
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
3.689266
false
false
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
4.120351
false
false
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
3.297436
false
false
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
3.567027
false
false
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
3.770708
false
false
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
4.524934
false
false
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
3.813285
true
false
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
3.673806
false
false
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
4.342037
false
false
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
3.339161
false
false
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
4.092906
true
false
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
4.570222
true
false
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
4.217052
true
false
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
4.224629
false
false
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
3.05814
false
false
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
3.885714
false
false
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
4.272637
false
false
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
4.151982
true
false
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
4.119061
false
false
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
3.205212
false
false
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
3.714845
false
false
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
4.654152
false
false
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
3.875904
false
false
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
4.057322
false
false
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
4.05506
false
false
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
4.082837
false
false
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
3.580972
false
false
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
3.648037
false
false
false
mch/python-ant
src/ant/core/message.py
1
18462
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2011, Martín Raúl Villalba # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the So...
mit
603,550,664,031,524,400
31.329247
113
0.626002
false
3.926824
false
false
false
dakrauth/picker
picker/migrations/0003_auto_20180801_0800.py
1
5687
# Generated by Django 2.0.7 on 2018-08-01 12:00 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import picker.models class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('pic...
mit
9,125,686,761,335,229,000
40.510949
171
0.55706
false
4.157164
false
false
false