repo_name
stringlengths
6
90
path
stringlengths
4
230
copies
stringlengths
1
4
size
stringlengths
4
7
content
stringlengths
734
985k
license
stringclasses
15 values
hash
int64
-9,223,303,126,770,100,000
9,223,233,360B
line_mean
float64
3.79
99.6
line_max
int64
19
999
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
8.06
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
woutersmet/Zeosummer
lib/zeobuilder/selection_cache.py
2
8413
# Zeobuilder is an extensible GUI-toolkit for molecular model construction. # Copyright (C) 2007 - 2009 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center # for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights # reserved unless otherwise stated. # # This file is part of Zeobuilder. # # Zeobuilde...
gpl-3.0
-4,121,243,692,202,220,000
31.233716
123
0.682396
false
3.957197
false
false
false
vegeclic/django-regularcom
accounts/admin.py
1
2063
# # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 # as published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of #...
agpl-3.0
-5,575,985,195,771,191,000
34.568966
91
0.678623
false
3.730561
false
false
false
cctsao1008/deviation
utils/mkfat/mkfat.py
7
16931
#!/usr/bin/env python # # Copyright (c) 2008 Martin Decky # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retain the above copyright # notice, this li...
gpl-3.0
4,534,553,009,265,239,000
28.86067
131
0.628965
false
3.003548
false
false
false
openstack/third-party-ci-tools
monitoring/lastcomment-scoreboard/cireporter.py
2
10128
#!/usr/bin/env python """Generate a report on CI comments and jobs.""" import argparse import calendar import datetime import json import yaml import requests import comment def query_gerrit(name, count, project, quiet=False): """Query gerrit and fetch the comments.""" # Include review messages in query ...
apache-2.0
-3,996,951,611,977,877,000
37.363636
79
0.467318
false
4.497336
false
false
false
minghuascode/pyj
examples/libtest/TemplateStringTest.py
7
1891
import UnitTest from string import Template import sys class TemplateStringTest(UnitTest.UnitTest): def test_substitute(self): try: self.assertEqual(Template('This is a test of the $first method of the $second class' ).substitute(first='substitute',second='Temp...
apache-2.0
8,816,301,460,464,973,000
50.108108
127
0.591222
false
4.886305
true
false
false
PuchatekwSzortach/face_detection
face/processing.py
1
11450
""" Module with various image related processing functions """ import os import random import numpy as np import cv2 import shapely.geometry import face.utilities import face.geometry import face.config class InvalidBoundingBoxError(Exception): """ A simple exception used when bounding boxes appear invalid...
mit
3,965,991,666,376,896,500
34.448916
113
0.652751
false
3.582603
false
false
false
mvanga/checkers
preload/run.py
1
3141
import sys import subprocess import itertools from random import randint from math import factorial import sys import subprocess import itertools def my_print(prog, line): prefix = None #if len(line) > 2: # addr = line[2] # p = subprocess.Popen('addr2line -s -f -e ' + prog + ' ' + addr, shell=Tru...
gpl-3.0
-3,936,931,307,127,381,500
28.35514
110
0.504935
false
3.32381
false
false
false
bcj/subpar
subpar/structs.py
1
5524
""" Output structs produced by components """ from typing import Any, Dict, NamedTuple, Optional, Tuple, TypeVar __all__ = ['Context', 'Node', 'T', 'Trace', 'Result', 'Serialized'] # NOTE: mypy doesn't currently support Recursive NamedTuples. That's why # Node and Trace aren't just NamedTuples class Node: """ ...
agpl-3.0
-7,323,081,467,470,993,000
28.382979
72
0.566799
false
4.356467
false
false
false
ICGC-TCGA-PanCancer/architecture-setup
roles/bindle-profiles/files/update_security_groups.py
1
1961
#! /usr/bin/python "This script will update AWS EC2 security groups" # This script needs to be run with python 2.7, because of boto3 import boto3 #import requests import sys # get instance ID with: `curl http://169.254.169.254/latest/meta-data/instance-id` # get public IP with: `curl http://169.254.169.254/latest/met...
gpl-2.0
6,927,768,995,080,342,000
38.22
134
0.617542
false
3.898608
false
false
false
pierre-rouanet/aupyom
tests/test_time_stretch.py
1
1247
import unittest import random import numpy import copy from aupyom import Sound from aupyom.util import example_audio_file class TestTimeStretch(unittest.TestCase): def setUp(self): self.s1 = Sound.from_file(example_audio_file()) freq, dt, sr = 440.0, 10.0, 22050 t = numpy.linspace(0, dt...
gpl-3.0
8,047,650,908,711,684,000
24.979167
63
0.566961
false
3.307692
true
false
false
Trebgarta/pygmc
main.py
1
4372
# -*- coding: utf-8 -*-. import pyglet from pyglet.gl import * from ctypes import * # LocalInstruction from GL import * from custom_math import * WIDTH, HEIGHT = 800, 800 FPS = 128 BORDER_WIDTH = 2 BLACK = (0, 0, 0) WHITE = (255, 255, 255) SOILRED = (0, 0, 0) POTBLACK = (0, 0, 0) class Window(pyglet.window.Window...
mit
3,380,847,965,311,993,000
30.014184
98
0.618939
false
2.802564
false
false
false
forseti-security/forseti-security
tests/unittest_utils.py
1
6139
# Copyright 2017 The Forseti Security Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
apache-2.0
7,163,835,677,463,795,000
35.111765
91
0.626486
false
3.848903
true
false
false
Lost-In-MASE/x9115AAP
hw/code/3/Card.py
1
3188
"""This module contains code from Think Python by Allen B. Downey http://thinkpython.com Copyright 2012 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ import random class Card(object): """Represents a standard playing card. Attributes: suit: integer 0-3 rank: i...
gpl-2.0
5,307,397,410,800,289,000
23.72093
76
0.555834
false
3.610419
false
false
false
arminhammer/teiler
teiler/filesender.py
1
4051
import os, json from twisted.python import log from twisted.protocols import basic from twisted.internet.protocol import ClientFactory from twisted.protocols.basic import FileSender import session class FileSenderClient(basic.LineReceiver): """ file sender """ def __init__(self, path, controller, sessionID):...
gpl-2.0
1,053,876,407,652,464,600
33.042017
81
0.611454
false
4.511136
false
false
false
dschrimpsher/mcoc_aw_diversity
src/player.py
1
1477
import character import json import pprint class Player(object): def __init__(self): self.id = 0 self.champs = [] self.chosen = [] self.added = 0 self.averagePower = 0 def load(self, file): with open(file) as data_file: data = json.load(data_file) ...
mit
8,235,870,759,200,516,000
33.348837
144
0.521327
false
3.711055
false
false
false
Jumpscale/dockers
js8/x86_64/_archive/93_ubuntu1604_influxdb_grafana/build.py
1
4074
from JumpScale import j # d = j.sal.docker.get(name='build') d = j.sal.docker.create(name='build', ports='', volsro='', stdout=True, base='jumpscale/ubuntu1604_js8', nameserver=['8.8.8.8'], ...
apache-2.0
1,332,862,117,412,935,200
28.1
167
0.618802
false
2.939394
false
false
false
unreal666/outwiker
buildtools/utilites.py
2
2965
# -*- coding: UTF-8 -*- from functools import wraps import sys import os import os.path import shutil from fabric.api import local from .libs.colorama import Fore def addToSysPath(path): """ Add path to sys.path to use outwiker modules """ cmd_folder = os.path.abspath(path) syspath = [item ...
gpl-3.0
-3,612,305,694,110,653,000
20.642336
78
0.590219
false
3.669554
false
false
false
miguelchuga/stock-logistics-reporting
stock_picking_webkit/report/stock_report.py
3
5729
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2011-2013 Camptocamp SA (http://www.camptocamp.com) # @author Nicolas Bessi # Copyright (c) 2013 Agile Business Group (http://www.agilebg.com) # @author Lorenzo Battistini # # This program...
agpl-3.0
2,235,048,430,289,734,100
36.444444
99
0.600803
false
3.945592
false
false
false
WilJoey/tn_ckan
ckan/tests/functional/api/model/test_group.py
1
9937
import copy from ckan import model from ckan.lib.create_test_data import CreateTestData from nose.tools import assert_equal from ckan.tests.functional.api.base import BaseModelApiTestCase from ckan.tests.functional.api.base import Api1TestCase as Version1TestCase from ckan.tests.functional.api.base import Api2TestCa...
mit
-6,107,958,428,549,949,000
42.77533
104
0.622623
false
3.765441
true
false
false
jacobjma/PyQSTEM
pyqstem/wave.py
1
8322
import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable from matplotlib.widgets import Slider import scipy import scipy.ndimage import numpy as np from .detection import detect def load(name): npzfile=np.load(name) return Wave(npzfile['arr_0'],npzfile['arr_1'],npzfile['arr_2']) ...
gpl-3.0
-4,160,987,391,715,237,000
32.556452
111
0.615597
false
3.1934
false
false
false
Azure/WALinuxAgent
tests/ga/test_multi_config_extension.py
1
81386
import contextlib import json import os.path import subprocess import uuid from azurelinuxagent.common import conf from azurelinuxagent.common.event import WALAEventOperation from azurelinuxagent.common.exception import GoalStateAggregateStatusCodes from azurelinuxagent.common.future import ustr from azurelinuxagent.c...
apache-2.0
-4,498,405,034,717,457,400
65.113729
167
0.582115
false
4.671986
true
false
false
mahmoud/wapiti
wapiti/client.py
1
4090
# -*- coding: utf-8 -*- from __future__ import unicode_literals ''' The beginnings of a better Mediawiki API library (with certain builtin affordances for the more popular wikis and extensions). Most of what you see below is implementation internals, the public API isn't set yet, but check back soon. # TODO * Creat...
bsd-3-clause
-4,059,717,020,378,073,600
29.75188
79
0.61687
false
3.645276
false
false
false
benoit-canet/pyghmi
pyghmi/ipmi/events.py
1
20808
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2015 Lenovo # # 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 ...
apache-2.0
2,973,575,030,307,276,300
37.10989
79
0.567666
false
3.772299
false
false
false
Alwnikrotikz/myrafproject
myraflib/myEnv.py
1
3314
# -*- coding: utf-8 -*- #!/usr/bin/env python """ MYRaf Environment Module. Note that all modules with name started by 'my' such as myFit, myEnv are MYRaf's third party modules. For further information: From myraflib import myEnv help(myEnv) """ import os import shutil __all__ = ["oOP"] class oOP(): """ oOP stand...
gpl-3.0
-104,376,840,840,868,370
25.301587
101
0.634279
false
3.162214
false
false
false
BeyondTheClouds/rome
test/nova/methods/test_migration_get_in_progress_by_host_and_node.py
1
2404
__author__ = 'jonathan' import test.nova._fixtures as models from lib.rome.core.orm.query import Query from lib.rome.core.orm.query import Query as RomeQuery from lib.rome.core.session.session import Session as RomeSession import six # from oslo.utils import timeutils from lib.rome.core.utils import timeutils from te...
mit
-5,918,318,442,493,106,000
32.859155
116
0.635607
false
3.902597
false
false
false
jevonearth/frappe
frappe/core/doctype/user/test_user.py
39
2999
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, unittest from frappe.model.delete_doc import delete_doc test_records = frappe.get_test_records('User') class TestUser(unittest.TestCase): def test_delete(self):...
mit
2,411,902,533,063,370,000
38.460526
107
0.686562
false
3.094943
true
false
false
AmineEch/BrainCNN
utils.py
1
1702
from keras.models import load_model from injury import ConnectomeInjury from scipy.stats import pearsonr from sklearn.metrics import mean_absolute_error as mae from numpy import std from IPython.display import HTML, display import tabulate def generate_synthetic_validation_data(noise): injury = ConnectomeInjury() ...
mit
-5,607,205,783,845,702,000
45.027027
105
0.615159
false
3.205273
false
false
false
guedou/scapy-python2.5
scapy/contrib/bgp.py
6
6259
#! /usr/bin/env python # http://trac.secdev.org/scapy/ticket/162 # scapy.contrib.description = BGP # scapy.contrib.status = loads from scapy.packet import * from scapy.fields import * from scapy.layers.inet import TCP class BGPIPField(Field): """Represents how bgp dose an ip prefix in (length, prefix)""" def ma...
gpl-2.0
-7,576,448,297,183,017,000
36.035503
351
0.654258
false
2.837262
false
false
false
elPistolero/DeepFried2
DeepFried2/layers/SpatialConvolutionCUDNN.py
1
2421
import DeepFried2 as df from DeepFried2.utils import create_param_and_grad class SpatialConvolutionCUDNN(df.Module): def __init__(self, n_input_plane, n_output_plane, k_w, k_h, d_w=1, d_h=1, pad_w=0, pad_h=0, mode='cross', with_bias=True, initW=df.init.xavier(), initB=df.init.const(0), border=None): # mod...
mit
4,991,433,911,386,211,000
47.42
187
0.601817
false
2.848235
false
false
false
phenoxim/nova
nova/tests/unit/virt/libvirt/volume/test_quobyte.py
2
20139
# Copyright (c) 2015 Quobyte Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
apache-2.0
8,045,538,873,131,543,000
42.124197
79
0.557575
false
4.034255
true
false
false
Wingless-Archangel/CustomCommand
tor.py
1
4388
#!/usr/bin/env python3 """ Investigate the List of IP and Date for - check that port 80 is open or not - Is it the TOR node - If yes, name and ID - IP geolocation - ISP and company name Required module pandas, pytabgeo, ipwhois Expected output |IP|DATE|PORT|TOR|IP geolocation| ISP and company name| """ import sock...
gpl-3.0
-6,273,143,619,507,005,000
31.503704
85
0.617593
false
3.428125
false
false
false
LolexInc/Lolex-Tools
project/new/setup/exp/LolexToolsSetup.py
1
2679
#! python3 # 0 # 0 000000 0 000000 0 0 000000000 00000000 00000000 0 000000 # 0 00 0 0 0 00 00 0 0 0 0 0 0 # 0 00 0 0 00000 00 000000 00 0 ...
lgpl-3.0
-7,427,103,499,629,148,000
51.529412
646
0.439343
false
3.679945
false
false
false
muzhack/musitechhub
docker/generate-specs.py
2
3516
#!/usr/bin/env python3 """Generate GKE spec files.""" import os.path import jinja2 import json import base64 def _render_template(fname, environment, context): with open(os.path.join('docker/templates', fname + '.yaml'), 'rt') \ as f: content = f.read() jinja_env = jinja2.Environment( ...
mit
-3,203,790,504,270,523,000
32.169811
79
0.559727
false
3.573171
false
false
false
nkanish2002/tornado-razorpay
tornado_razorpay/client.py
1
3702
from tornado.httpclient import AsyncHTTPClient def _optional_args(args_lst): args_str = "?" for args in args_lst: if args[1] is not None: args_str = "%s%s=%s&" % (args_str, args[0], str(args[1])) return args_str class _Payments: def __init__(self, api_key, api_secret, client: Asy...
mit
-8,089,587,626,210,818,000
44.146341
111
0.574824
false
3.499055
false
false
false
theodoregoetz/clas12-dc-wiremap
clas12_wiremap/component_wiremap.py
1
9831
import sys from os import path import numpy as np from .dc_tables import (CalibrationDCHVCrate, CalibrationDCHVSupplyBoard, CalibrationDCHVSubslot, CalibrationDCHVDoublet, CalibrationDCHVDoubletPin, CalibrationDCHVDoubletPinMap, CalibrationDCHVTranslationBoard, CalibrationDCWire, CalibrationDCSignalTra...
gpl-3.0
-6,061,490,724,203,606,000
30.408946
80
0.587631
false
3.367934
false
false
false
Multiscale-Genomics/mg-process-fastq
process_bs_seeker_index.py
1
5025
#!/usr/bin/env python """ .. See the NOTICE file distributed with this work for additional information regarding copyright ownership. 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 ...
apache-2.0
4,005,837,887,104,304,600
29.271084
81
0.594428
false
4.618566
true
false
false
korepwx/tfsnippet
tfsnippet/utils/statistics.py
1
4461
import numpy as np __all__ = ['StatisticsCollector'] class StatisticsCollector(object): """ Computing :math:`\\mathrm{E}[X]` and :math:`\\operatorname{Var}[X]` online. """ def __init__(self, shape=()): """ Construct the :class:`StatisticsCollector`. Args: shape: ...
mit
-5,027,272,172,644,213,000
32.044444
80
0.524098
false
3.829185
false
false
false
guorendong/iridium-browser-ubuntu
native_client/src/trusted/validator/driver/ncval_annotate.py
5
3850
#!/usr/bin/python # Copyright (c) 2011 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. import collections import re import subprocess import sys BUNDLE_SIZE = 32 Error = collections.namedtuple('Error', 'offset me...
bsd-3-clause
-1,350,429,063,763,931,400
28.166667
79
0.624675
false
3.40708
false
false
false
scylladb/scylla-cluster-tests
sdcm/sct_events/grafana.py
1
6127
# 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 distributed in the hope that it will be usefu...
agpl-3.0
-250,210,277,474,660,350
41.846154
118
0.670475
false
3.770462
false
false
false
jimboatarm/workload-automation
wlauto/common/linux/device.py
2
40013
# Copyright 2014-2015 ARM Limited # # 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
-2,335,897,516,140,583,400
42.304113
126
0.581911
false
4.227916
false
false
false
greatscottgadgets/greatfet
host/greatfet/boards/rad1o.py
2
1217
# # This file is part of GreatFET # from ..board import GreatFETBoard from ..interfaces.gpio import GPIO from ..interfaces.i2c_bus import I2CBus from ..interfaces.spi_bus import SPIBus class Rad1oBadge(GreatFETBoard): """ Class representing GreatFET One base-boards. """ # Currently, all GreatFET One boards ...
bsd-3-clause
922,158,710,669,396,900
27.302326
71
0.644207
false
3.289189
false
false
false
Donkyhotay/MoonPy
zope/structuredtext/stdom.py
1
13186
############################################################################## # # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFT...
gpl-3.0
7,802,998,828,088,113,000
26.131687
78
0.57106
false
4.323279
false
false
false
openearth/delft3d-gt-server
delft3dcontainermanager/tasks.py
1
4118
from __future__ import absolute_import import logging from json import dumps from shutil import rmtree from celery import shared_task from celery.utils.log import get_task_logger from celery_once import QueueOnce from django.conf import settings from django.core.management import call_command from kubernetes import c...
gpl-3.0
-5,077,962,871,781,835,000
29.279412
83
0.62846
false
3.634598
true
false
false
ThomasEmge/arcgis-osm-editor
src/data/svr_datasync.py
3
1166
import arcpy from arcpy import env # load the standard OpenStreetMap bpx as it references the core OSM tools arcpy.ImportToolbox(r'C:\Data\OSM\OpenStreetMap Toolbox.tbx') # define the enterprise geodatabase workspace env.workspace = r'C:\Data\OSM\Mxds\NewOSMDEV.sde' # get the start date/time for synchronization (fir...
apache-2.0
-2,458,241,708,338,888,700
30.513514
147
0.783877
false
3.321937
false
false
false
invesalius/invesalius3
invesalius/data/coordinates.py
3
18385
#-------------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer # Homepage: http://www.softwarepublico.gov.br # Contact: invesalius@cti.gov.br # License: ...
gpl-2.0
6,128,979,595,147,784,000
39.314607
162
0.601741
false
3.253982
false
false
false
kikusu/chainer
chainer/optimizer.py
1
20025
import collections import numpy import six from chainer import cuda import chainer.link as link_module def _sum_sqnorm(arr): sq_sum = collections.defaultdict(float) for x in arr: with cuda.get_device(x) as dev: x = x.ravel() s = x.dot(x) sq_sum[int(dev)] += s ...
mit
5,082,801,818,029,305,000
31.66721
79
0.59206
false
4.465879
false
false
false
beni55/flocker
flocker/volume/filesystems/zfs.py
1
10946
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ZFS APIs.""" from __future__ import absolute_import import os import subprocess from contextlib import contextmanager from uuid import uuid4 from characteristic import with_cmp, with_repr from zope.interface import implementer from twisted.python.fil...
apache-2.0
-4,693,210,822,448,257,000
33.099688
78
0.591906
false
4.250874
false
false
false
opalytics/opalytics-ticdat
ticdat/lingo.py
1
14369
from ticdat.utils import verify, containerish, stringish, find_duplicates_from_dict_ticdat from ticdat.utils import find_case_space_duplicates import ticdat.utils as tu from ticdat.ticdatfactory import TicDatFactory import os, subprocess, inspect, time, uuid, shutil from collections import defaultdict from ticdat.jsont...
bsd-2-clause
-1,763,562,608,612,621,800
41.895522
125
0.608393
false
3.272375
false
false
false
ProfessionalIT/maxigenios-website
sdk/google_appengine/google/appengine/tools/devappserver2/login.py
8
9043
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
mit
-3,642,046,358,819,106,300
30.399306
78
0.664824
false
3.631727
false
false
false
luojiyin1987/learn_Flask
file_manger_and_files_upload.py
1
1812
# coding=utf-8 import os import time import hashlib from flask import Flask, render_template, redirect, url_for, request from flask_uploads import UploadSet, configure_uploads from flask_uploads import IMAGES, patch_request_class from flask_wtf import FlaskForm from flask_wtf.file import FileField, FileRequired, FileA...
mit
1,796,284,808,581,619,500
26.876923
75
0.662804
false
3.451429
false
false
false
tkasp/osmose-backend
analysers/analyser_osmosis_highway_broken_level_continuity.py
4
4813
#!/usr/bin/env python #-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Frédéric Rodrigo 2011 ## ## ...
gpl-3.0
1,442,436,079,811,872,000
34.375
193
0.557057
false
3.652999
false
false
false
poliastro/poliastro
src/poliastro/core/maneuver.py
1
5983
""" Low level manuever implementations """ import numpy as np from numba import njit as jit from numpy import cross from numpy.linalg import norm from poliastro.core.elements import coe_rotation_matrix, rv2coe, rv_pqw @jit def hohmann(k, rv, r_f): r"""Calculate the Hohmann maneuver velocities and the duration o...
mit
8,783,847,111,568,420,000
29.651282
133
0.56684
false
2.835389
false
false
false
noironetworks/networking-cisco
networking_cisco/plugins/cisco/common/cisco_ios_xe_simulator.py
2
9102
# Copyright 2016 Cisco Systems, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
-7,428,245,873,932,595,000
37.083682
79
0.552626
false
3.926661
true
false
false
jualvarez/charlex
01-Inicial/charlexapi/charlas/views.py
1
1150
from django.contrib.auth import get_user_model from rest_framework import viewsets from charlas.serializers import ( UsuarioSerializer, OradorSerializer, LugarSerializer, CharlaSerializer, UsuarioCharlaSerializer, FotoCharlaSerializer ) from charlas.models import ( Orador, Lugar, C...
gpl-3.0
5,307,778,196,788,190,000
21.54902
50
0.758261
false
3.605016
false
false
false
flagos/pico-brewUI
Tank.py
1
3433
from builtins import str from builtins import object import time from datetime import timedelta, datetime from PID import PID from globals import MyGlobals import os SAMPLE_HISTORY = 10 class List_max(object): def __init__(self, max_size): self.max_size = max_size self.array = [] def app...
mit
5,288,483,463,312,370,000
26.464
76
0.549082
false
3.785006
false
false
false
fritzo/loom
loom/format.py
2
18560
# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved. # Copyright (c) 2015, Google, Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retain the above copyright ...
bsd-3-clause
3,540,683,031,035,435,500
34.085066
79
0.61611
false
3.668709
false
false
false
Andr3iC/juriscraper
opinions/united_states/state/ohio.py
2
4574
"""Scraper for the Supreme Court of Ohio CourtID: ohio Court Short Name: Ohio Author: Andrei Chelaru Reviewer: mlr History: - Stubbed out by Brian Carver - 2014-07-30: Finished by Andrei Chelaru - 2015-07-31: Redone by mlr to use ghost driver. Alas, their site used to be great, but now it's terribly f...
bsd-2-clause
-7,193,118,802,892,472,000
36.186992
124
0.592916
false
3.562305
false
false
false
ArmstrongJ/robotadventure
lib/gamedb.py
1
14222
# Murder in the Park - A Robotic Mystery # Copyright (C) 2008 Jeffrey Armstrong (a.k.a. PrintStar) # http://jeff.rainbow-100.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 versio...
gpl-3.0
4,560,093,244,267,058,000
30.12035
182
0.539305
false
4.03461
false
false
false
google-research/google-research
ravens/ravens/primitives.py
1
4040
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
apache-2.0
4,658,949,043,551,005,000
30.5625
76
0.645297
false
3.141524
false
false
false
francois-contat/scapy
scapy/data.py
1
9046
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """ Global variables and functions for handling external data sets. """ import os import re import time from scapy.dadict ...
gpl-2.0
-9,060,736,471,901,943,000
28.180645
125
0.54654
false
3.175149
false
false
false
odashi/chainer_examples
chainer-1.5/LSTMVariants.py
1
11508
import numpy import chainer from chainer.functions.activation import sigmoid from chainer.functions.activation import tanh from chainer import link from chainer.links.connection import linear class LSTMBase(link.Chain): def __init__(self, n_units, n_inputs=None): if n_inputs is None: n_input...
mit
9,166,014,582,060,104,000
28.060606
83
0.522072
false
3.05252
false
false
false
stevepryde/spnaughts
lib/gameresult.py
1
2385
"""Object containing all game result details.""" from typing import Dict STATUS_NONE = "NONE" STATUS_WIN = "WIN" STATUS_TIE = "TIE" STATUS_BATCH = "BATCH" class GameResult: """Object containing game result.""" def __init__(self) -> None: """Create a new GameResult object.""" self.scores = {...
gpl-3.0
667,718,561,780,216,200
28.444444
75
0.570231
false
4.008403
false
false
false
cbmoore/statsmodels
statsmodels/tsa/statespace/tests/results/results_sarimax.py
26
13916
""" Results for SARIMAX tests Results from Stata using script `test_sarimax_stata.do`. See also Stata time series documentation. Data from: http://www.stata-press.com/data/r12/wpi1 http://www.stata-press.com/data/r12/air2 http://www.stata-press.com/data/r12/friedman2 Author: Chad Fulton License: Simplified-BSD """ ...
bsd-3-clause
8,144,355,560,080,152,000
43.318471
77
0.600891
false
2.135666
false
false
false
vertexclique/openvas_tasks
openvas_tasks/tasks.py
2
3798
#!/usr/bin/env python # -*- coding: utf-8 -*- from ovastypes import * class OvasReceiver(object): """docstring for OvasReceiver""" def __init__(self): super(OvasReceiver, self).__init__() def set_db_path(self, dbpath): database = SqliteDatabase(dbpath) database_proxy.initialize(...
mit
-7,036,802,234,709,910,000
36.613861
117
0.50237
false
3.851927
false
false
false
ministryofjustice/cla_backend
cla_backend/apps/legalaid/migrations/0021_auto_20190515_1042.py
1
1614
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone import model_utils.fields import uuidfield.fields import core.cloning class Migration(migrations.Migration): dependencies = [("legalaid", "0020_fill_missing_outcome_codes")] ...
mit
6,582,551,400,835,420,000
35.681818
114
0.560719
false
4.733138
false
false
false
gfixler/fmaya
fmaya/core/pure.py
1
2007
import re ident = lambda x: x const = lambda x: lambda _: x app = lambda f: lambda x: f(x) flip = lambda f: lambda x: lambda y: f(y)(x) juxt = lambda *fs: lambda x: [f(x) for f in fs] both = lambda f: lambda g: lambda x: (f(x), g(x)) comp = lambda *fs: reduce(lambda f, g: lambda x: f(g(x)), fs, ident) cmap = lambda f:...
gpl-3.0
-8,620,027,616,245,523,000
33.603448
88
0.622322
false
2.534091
false
false
false
ASzc/nagoya
cfg/util/openssl.py
1
3425
import os import OpenSSL import util.cred as cred filetype = OpenSSL.crypto.FILETYPE_PEM class CA(object): def __init__(self, key_path, cert_path, serial_path): self.serial_path = serial_path key_exists = os.path.exists(key_path) cert_exists = os.path.exists(cert_path) serial_exist...
lgpl-3.0
-3,985,685,516,777,279,500
33.25
93
0.613139
false
3.280651
false
false
false
python-attrs/attrs
tests/test_pyright.py
2
1879
import json import os.path import shutil import subprocess import sys import pytest import attr if sys.version_info < (3, 6): _found_pyright = False else: _found_pyright = shutil.which("pyright") @attr.s(frozen=True) class PyrightDiagnostic(object): severity = attr.ib() message = attr.ib() @pyte...
mit
-2,741,036,560,320,034,000
26.231884
77
0.596594
false
3.906445
false
false
false
kyubifire/softlayer-python
SoftLayer/CLI/block/acl/subnet_remove.py
1
1025
"""Removes subnets from a given ACL.""" # :license: MIT, see LICENSE for more details.ß import click import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions @click.command() @click.argument('host_id') @click.option('--subnet-id', '-s', multiple=True, required=True, h...
mit
2,664,114,346,285,381,000
34.310345
73
0.701172
false
3.482993
false
false
false
beyondmetis/scikit-video
skvideo/io/avconv.py
1
15350
""" Plugin that uses Libav to read and write series of images to a wide range of video formats. """ # Heavily inspired from Almar Klein's imageio code # Copyright (c) 2015, imageio contributors # distributed under the terms of the BSD License (included in release). import sys import os import stat import re import t...
bsd-3-clause
3,516,543,137,372,903,400
33.035477
214
0.557915
false
3.978745
false
false
false
Atos-FiwareOps/sla-dashboard
slagui/fm_adapter.py
2
4967
__author__ = 'root' import json import socket import urllib2 #import time from django.conf import settings import sys import base64 class FMAdapter(object): DCA = "DCA" FM = "FM" TOKEN_DCA = "TOKEN_DCA" TOKEN_FM = "TOKEN_FM" __instance = None __token_dca = None __token_fm = None __timeout_value = 4 #cr...
apache-2.0
3,724,275,704,284,127,000
32.560811
108
0.670425
false
3.155654
false
false
false
vlegoff/tsunami
src/secondaires/auberge/commandes/louer/liste.py
1
4343
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
bsd-3-clause
8,280,306,982,069,352,000
45.923913
86
0.640259
false
3.377934
false
false
false
scifiswapnil/Project-LoCatr
LoCatr/LoCatr/views.py
1
3990
from django.shortcuts import render,redirect from django import forms from models import Rusers from django.shortcuts import get_object_or_404, render from django.views import generic from django.views.generic.edit import UpdateView,DeleteView,CreateView from django.core.urlresolvers import reverse_lazy class indexvi...
mit
7,125,442,616,129,782,000
34.945946
142
0.630827
false
3.950495
false
false
false
SnowWalkerJ/quantlib
quant/data/wind/tables/asharedividend.py
1
2881
from ....common.db.sql import VARCHAR, Numeric as NUMBER, DateTime as DATETIME, Column, BaseModel, CLOB, DATE VARCHAR2 = VARCHAR class AShareDividend(BaseModel): """ 4.18 中国A股分红 Attributes ---------- object_id: VARCHAR2(100) 对象ID s_info_windcode: VARCHAR2(40) Wind代码 ...
gpl-3.0
-1,656,893,756,477,742,000
28
109
0.592019
false
2.266023
false
false
false
IndraSub/VapourSynth-Utility-Scripts
logonr_vs.py
1
7402
##################################################### ### ### ### logoNR port for VapourSynth ### ### ### ### port by TundraWork - tundrawork@gmail.com ### ### original by 06_taro - astrataro@gmail.com ...
mit
8,180,157,187,910,180,000
39.448087
161
0.573494
false
3.186397
true
false
false
migueldvb/piernik
bin/validate.py
1
3504
#!/usr/bin/env python # @todo # get rid of paths # sanitize # problem_name is de facto var passed directly to setup, so it can be # anything, make it configurable import sys sys.path.append("python/") import os import json import tempfile import hashlib import argparse import time import base64, getpass from Di...
gpl-3.0
-4,180,114,686,075,379,000
29.736842
78
0.630993
false
3.349904
false
false
false
Thortoise/Super-Snake
Blender/animation_nodes-master/nodes/generic/debug_loop.py
1
3144
import bpy from bpy.props import * from collections import defaultdict from ... base_types.node import AnimationNode debugLinesByIdentifier = defaultdict(list) class DebugLoopNode(bpy.types.Node, AnimationNode): bl_idname = "an_DebugLoopNode" bl_label = "Debug Loop" bl_width_default = 160 textBlockNa...
gpl-3.0
2,180,440,801,694,022,100
32.446809
93
0.61514
false
3.876695
false
false
false
anomen-s/programming-challenges
projecteuler.net/0082-Path_sum-three_ways/solution.py
1
2560
#!/usr/bin/python # -*- coding: utf-8 -*- from Queue import PriorityQueue FILENAME='sample.txt' FILENAME='sample2.txt' FILENAME='p082_matrix.txt' def readfile(filename): f = open(filename) try: data = f.readlines() finally: f.close() return [map(lambda n: [int(n), False, 2**30, 0, 0], ...
gpl-2.0
2,634,846,003,842,248,700
21.857143
84
0.567969
false
2.758621
false
false
false
coreos/mockldap
mockldap/tests.py
1
23687
from __future__ import absolute_import, with_statement from copy import copy from doctest import DocTestSuite try: import unittest2 as unittest except ImportError: import unittest import ldap import ldap.modlist import ldap.filter try: import passlib except ImportError: passlib = None from . import M...
bsd-2-clause
-7,790,170,784,210,686,000
35.218654
105
0.617174
false
3.429916
true
false
false
quangounet/TOPP
tests/torque_limits.py
1
4348
# -*- coding: utf-8 -*- # Copyright (C) 2013 Quang-Cuong Pham <cuong.pham@normalesup.org> # # This file is part of the Time-Optimal Path Parameterization (TOPP) library. # TOPP 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 Fre...
lgpl-3.0
6,063,821,661,038,005,000
34.349593
125
0.709982
false
2.931895
false
false
false
marczellm/algorimp
file_handlers.py
1
1917
import copy from typing import List import midi import midiutil.MidiFile from music import ChordProgression, ABCNote, Note def changes_from_file(songname: str) -> ChordProgression: with open("changes/{}.txt".format(songname)) as bf: return ChordProgression(ABCNote.from_string(songname.split('_')[0]), bf...
gpl-3.0
-2,528,012,287,786,755,600
36.588235
117
0.629108
false
3.168595
false
false
false
wavesoft/creditpiggy
creditpiggy-server/creditpiggy/api/views/info.py
1
3223
################################################################ # CreditPiggy - Volunteering Computing Credit Bank Project # Copyright (C) 2015 Ioannis Charalampidis # # 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 Fr...
gpl-2.0
2,199,687,163,472,661,800
29.695238
81
0.676078
false
3.650057
false
false
false
policecar/simsets
src/text_entail/io.py
1
5992
# -*- coding: utf-8 -*- """ Created on Sun Mar 30 09:37:09 2014 @author: stevo """ from __future__ import print_function; import os; import logging; #from text_entail.dictionary import Dict; import gzip; def read_args_wo_ctx(argfile, has_header=True): logging.info('reading file \'{}\''.format(argfile)); with ...
apache-2.0
6,950,973,958,451,260,000
38.163399
103
0.524866
false
3.317829
false
false
false
Waino/python-Levenshtein
setup.py
1
1629
from setuptools import setup import os import sys import numpy as np from distutils.core import Extension version = '0.12.0' extLevensthein = Extension('Levenshtein._levenshtein', sources = ['Levenshtein/_levenshtein.c'], include_dirs=[np.get_include()], ...
gpl-2.0
7,057,600,967,395,573,000
32.244898
91
0.593616
false
4.022222
false
false
false
thruflo/pyramid_torque_engine
src/pyramid_torque_engine/repo.py
1
8872
# -*- coding: utf-8 -*- """Create and lookup activity events.""" __all__ = [ 'ActivityEventFactory', 'LookupActivityEvent', 'NotificationFactory', 'LookupNotification', 'LookupNotificationDispatch', 'NotificationPreferencesFactory', 'get_or_create_notification_preferences', ] import loggi...
unlicense
-8,075,731,546,656,025,000
32.479245
93
0.609107
false
4.281853
false
false
false
brousch/opencraft
instance/models/logging_mixin.py
1
3992
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015 OpenCraft <xavier@opencraft.com> # # 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 Soft...
agpl-3.0
7,488,569,768,198,936,000
34.963964
100
0.576152
false
4.445434
false
false
false
centrologic/django-codenerix
codenerix/models_people.py
1
13561
# -*- coding: utf-8 -*- # # django-codenerix # # Copyright 2017 Centrologic Computational Logistic Center S.L. # # Project URL : http://www.codenerix.com # # 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 ...
apache-2.0
2,900,583,848,826,835,000
37.416431
206
0.567878
false
4.685902
false
false
false
grongor/school_rfid
lib/nmap-6.40/zenmap/zenmapCore/UmitOptionParser.py
1
14726
#!/usr/bin/env python # -*- coding: utf-8 -*- # ***********************IMPORTANT NMAP LICENSE TERMS************************ # * * # * The Nmap Security Scanner is (C) 1996-2013 Insecure.Com LLC. Nmap is * # * also a registered trademark of Inse...
gpl-2.0
-1,820,671,602,774,242,300
54.360902
86
0.564172
false
4.716848
false
false
false
lepy/phuzzy
tests/test_alo.py
1
1216
# -*- coding: utf-8 -*- import sys is_py2 = sys.version_info.major == 2 import phuzzy import phuzzy.analysis.alo def test_alo(): v1 = phuzzy.Triangle(alpha0=[0,4], alpha1=[1], number_of_alpha_levels=5) v2 = phuzzy.Superellipse(alpha0=[-1, 2.], alpha1=None, m=1.0, n=.5, number_of_alpha_levels=6) v3 = phuzzy...
mit
-5,984,418,619,626,605,000
42.428571
127
0.585526
false
2.44668
false
false
false
renyi533/tensorflow
tensorflow/lite/testing/model_coverage/model_coverage_lib_test.py
4
7307
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-1,912,639,197,576,107,500
34.818627
87
0.660052
false
3.626303
true
false
false
2dor/COMS10001
cw5/ant/bin/runant.py
124
3299
#!/usr/bin/python # 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 "Licen...
gpl-3.0
6,138,408,615,162,813,000
31.343137
85
0.671416
false
3.193611
false
false
false
kidaa30/spacewalk
spacecmd/src/lib/softwarechannel.py
2
73924
# # Licensed under the GNU General Public License Version 3 # # 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 version. # # This p...
gpl-2.0
-4,563,864,290,366,998,500
33.129271
108
0.594787
false
4.120395
false
false
false
aaa121/Web-Scraping
Project_4c_with_page_loop.py
1
6849
from bs4 import BeautifulSoup import requests # The website to loop through url='http://www.yellowpages.com/search?search_terms=coffee&geo_location_terms=Los%20Angeles%2C%20CA&page=' #Create Empty List for the variables of interest Name=[] Address=[] Phone_Number=[] YP_Rating=[] Address_modified=[] # It is on...
bsd-3-clause
2,430,753,302,845,856,000
51.507813
163
0.627537
false
3.666488
false
false
false
watsonyanghx/CNN_LSTM_CTC_Tensorflow
utils.py
1
6179
""" """ import os import numpy as np import tensorflow as tf import cv2 # +-* + () + 10 digit + blank + space num_classes = 3 + 2 + 10 + 1 + 1 maxPrintLen = 100 tf.app.flags.DEFINE_boolean('restore', False, 'whether to restore from the latest checkpoint') tf.app.flags.DEFINE_string('checkpoint_dir', './checkpoint/...
mit
3,969,131,211,222,857,700
34.716763
99
0.628095
false
3.347237
false
false
false
aplicatii-romanesti/allinclusive-kodi-pi
.kodi/addons/plugin.video.kidsplace/channels/kidmango.py
1
1791
import urllib, re import helper thisChannel = "kidmango" baseLink = "http://kidmango.com/shows/" def mainPage(): page = helper.load_page(baseLink) extractShow = re.compile("<a href=\"(.*?)\" target=\"_self\"><img src=\"(.*?)\".*?alt=\"Watch (.*?) on KidMango.com!\" /></a>") for show in extractShow.finditer(page)...
apache-2.0
-7,984,472,273,378,380,000
34.117647
128
0.676717
false
3.136602
false
false
false
isard-vdi/isard
api/src/api/views/__ApiViews.py
1
29819
# Copyright 2017 the Isard-vdi project authors: # Josep Maria Viñolas Auquer # Alberto Larraz Dalmases # License: AGPLv3 #!flask/bin/python # coding=utf-8 from api import app import logging as log from uuid import uuid4 import time,json import sys,os from flask import request from ..libv2.apiv2_exc import *...
agpl-3.0
3,126,357,857,576,033,300
58.162698
151
0.650044
false
3.639004
false
false
false
PersianWikipedia/pywikibot-core
scripts/clean_sandbox.py
1
13731
#!/usr/bin/python # -*- coding: utf-8 -*- """ This bot resets a (user) sandbox with predefined text. This script understands the following command-line arguments: &params; Furthermore, the following command line parameters are supported: -hours:# Use this parameter if to make the script repeat itself ...
mit
-119,630,312,693,992,350
41.553691
80
0.520543
false
3.02577
false
false
false
cmouse/buildbot
master/buildbot/steps/source/gitlab.py
5
2150
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
-6,994,991,232,737,217,000
43.791667
79
0.666977
false
4.387755
false
false
false
ndaniel/fusioncatcher
bin/get_synonyms.py
1
10272
#!/usr/bin/env python # -*- coding: utf-8 -*- """ It downloads the lastest available gene symbols and synonyms of the gene symbols from Ensembl. Author: Daniel Nicorici, Daniel.Nicorici@gmail.com Copyright (c) 2009-2021 Daniel Nicorici This file is part of FusionCatcher. FusionCatcher is free software: you can r...
gpl-3.0
-753,397,362,906,701,000
35.817204
175
0.576324
false
3.48913
false
false
false
Effi-01/Testing
other/jsunpackMM.py
12
5644
""" urlresolver XBMC Addon Copyright (C) 2011 t0mm0 Updated by Shani_08 for muchmovies, here they have done the double encrypt. 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 Founda...
gpl-2.0
1,748,734,483,707,796,000
36.924138
373
0.562544
false
3.414398
false
false
false