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
demisto/content
Tests/Marketplace/Tests/zip_packs_test.py
1
7153
from Tests.Marketplace.zip_packs import download_packs_from_gcp, get_latest_pack_zip_from_blob, zip_packs,\ remove_test_playbooks_if_exist, remove_test_playbooks_from_signatures class TestZipPacks: class FakeBlob: def __init__(self, name): self.name = name def download_to_filename...
mit
7,656,741,156,605,381,000
34.410891
118
0.600028
false
3.598089
true
false
false
gimli-org/gimli
pygimli/utils/complex.py
1
4160
#!/usr/bin/env python # -*- coding: utf-8 -*- """Pygimli base functions to handle complex arrays""" from math import pi from pygimli.core.base import isComplex import numpy as np import pygimli as pg isComplex = pg.isComplex def toComplex(amp, phi=None): """Convert real values into complex (z = a + ib) valued ...
apache-2.0
-1,366,731,802,682,097,700
27.888889
84
0.563942
false
3.054332
false
false
false
HybridF5/jacket
jacket/tests/compute/unit/virt/test_diagnostics.py
1
10365
# Copyright (c) 2014 VMware, 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 a...
apache-2.0
3,492,096,551,423,141,000
43.87013
79
0.5726
false
3.886389
true
false
false
stackforge/wsme
wsme/tests/test_protocols_commons.py
1
4904
# encoding=utf8 import datetime import unittest from wsme.api import FunctionArgument, FunctionDefinition from wsme.rest.args import from_param, from_params, args_from_args from wsme.exc import InvalidInput from wsme.types import UserType, Unset, ArrayType, DictType, Base class MyBaseType(Base): test = str c...
mit
8,376,553,251,605,089,000
29.842767
78
0.582993
false
3.563953
true
false
false
redhataccess/redhat-support-tool
src/redhat_support_tool/helpers/launchhelper.py
1
5027
# -*- coding: utf-8 -*- # # Copyright (c) 2012 Red Hat, 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 a...
apache-2.0
-1,337,313,168,602,393,000
40.545455
79
0.535508
false
4.71576
false
false
false
maruel/git-hooks-go
install_prerequisites.py
1
2123
#!/usr/bin/env python # Copyright 2014 Marc-Antoine Ruel. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """Installs all packages needed at runtime by presubmit.py.""" import logging import optparse import subprocess import sys...
apache-2.0
-6,932,394,149,472,864,000
28.901408
76
0.622233
false
3.291473
false
false
false
daniel-muthukrishna/GiantStarFormingRegions
src/line_profile_info.py
1
7283
from collections import OrderedDict import numpy as np inf = np.inf class RegionParameters(object): def __init__(self, region_name, blue_spec_file, red_spec_file, blue_spec_error_file, red_spec_error_file, scale_flux, center_list, sigma_list, lin_slope, lin_int, num_comps, component_labels, comp...
mit
-6,463,192,344,391,340,000
51.021429
150
0.621996
false
4.039379
false
false
false
cheral/orange3-text
orangecontrib/text/widgets/owloadcorpus.py
1
4460
import os from Orange.data.io import FileFormat from Orange.widgets import gui from Orange.widgets.data.owselectcolumns import VariablesListItemModel, VariablesListItemView from Orange.widgets.settings import Setting from Orange.widgets.widget import OWWidget, Msg from orangecontrib.text.corpus import Corpus, get_samp...
bsd-2-clause
177,419,213,433,732,930
37.782609
117
0.615471
false
3.960924
false
false
false
viur-framework/server
config.py
1
8334
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from google.appengine.ext import db from google.appengine.api import memcache import sys apiVersion = 1 #What format do we use to store data in the bigtable #Conf is static, local Dictionary. Changes here are local to the current instance conf = { "viu...
lgpl-3.0
-3,320,683,053,775,201,300
57.690141
173
0.74646
false
3.546383
false
false
false
helix84/activae
src/CTK_trunk/CTK/Refreshable.py
1
4931
# -*- coding: utf-8 -*- # # Copyright (C) 2010 CENATIC: Centro Nacional de Referencia de # Aplicacion de las TIC basadas en Fuentes Abiertas, Spain. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # Redistribution...
bsd-3-clause
-7,652,585,243,687,197,000
29.067073
78
0.613466
false
3.660728
false
false
false
SamWitte/Codds_DarkMatter
src/experiment_HaloIndep_Band.py
1
102335
""" Copyright (c) 2015 Andreea Georgescu Created on Wed Mar 4 00:47:37 2015 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. ...
gpl-2.0
3,419,586,075,976,344,600
45.494775
123
0.525138
false
3.764254
false
false
false
romanvm/romans_blog
blog/migrations/0001_initial.py
1
2115
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import tinymce.models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Category', fields=[ ('id'...
gpl-3.0
1,071,752,107,792,223,100
44
136
0.560757
false
4.433962
false
false
false
progrium/workjournal
main.py
1
3964
import logging import jinja2 import os import webapp2 from flask import Flask from flask import request from flask import redirect from functools import wraps from google.appengine.api import users from google.appengine.api import mail from models import Profile, Entry ADMIN_EMAIL = "progrium@gmail.com" def nl2br(v...
bsd-3-clause
-61,273,103,822,020,140
30.212598
78
0.578708
false
3.886275
false
false
false
bistaray/odoo-8.0-dev
partner_aging/supplier.py
2
11466
# -*- coding: utf-8 -*- ###################################################################### # # Note: Program metadata is available in /__init__.py # ###################################################################### from openerp.osv import fields, osv from openerp import tools class partner_aging_supplier(o...
agpl-3.0
-3,900,982,058,782,964,000
57.5
201
0.532618
false
3.804247
false
false
false
yunify/qingcloud-cli
qingcloud/cli/iaas_client/actions/collaboration/modify_user_group_attributes.py
1
2454
# ========================================================================= # Copyright 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the Licens...
apache-2.0
-5,709,529,552,119,689,000
43.618182
93
0.555012
false
4.755814
false
false
false
thomasleese/gantt-charts
ganttcharts/database.py
1
2681
"""Module for connecting to the various databases.""" import logging import os import sqlalchemy from . import models DATABASE_URI_KEY = 'DATABASE_URL' logger = logging.getLogger(__name__) _sql_engine = None _sql_connection = None def get_sql_database_uri(key=DATABASE_URI_KEY): try: return os.envi...
mit
6,809,066,745,706,707,000
28.461538
88
0.666542
false
4.222047
false
false
false
hpbader42/Klampt
Python/klampt/math/vectorops.py
7
3221
"""Allows treating tuples/lists as vectors""" import math def add(*items): """Adds one or more vectors.""" if len(items) == 0: return 0 n = len(items[0]) for v in items: if n!=len(v): raise RuntimeError('Vector dimensions not equal') return [sum([v[i] for v in items]) for i in ...
bsd-3-clause
880,627,568,920,426,000
26.529915
76
0.571872
false
3.038679
false
false
false
tensorflow/probability
tensorflow_probability/python/experimental/nn/layers_test.py
1
3788
# Copyright 2019 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
-7,789,816,107,235,642,000
31.101695
81
0.671067
false
3.500924
true
false
false
geekbert/HelloPythonSourceCode
chapter 06/1/player1.py
1
1979
import shlex class Player(object): def __init__(self, location): self.location = location self.location.here.append(self) self.playing = True def get_input(self): return raw_input(">") def look(self, player, noun): return [self.location.name, ...
bsd-3-clause
-61,562,350,928,848,024
27.695652
70
0.520465
false
4.114345
false
false
false
Juniper/contrail-ceilometer-plugin
ceilometer_plugin_contrail/network/statistics/contrail/driver.py
1
6460
# # Copyright (c) 2015 Juniper Networks, 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 by a...
apache-2.0
-6,120,844,386,303,068,000
37
80
0.596904
false
4.3531
false
false
false
srkukarni/heron
heron/tools/cli/src/python/version.py
1
3280
# Copyright 2016 Twitter. 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 applicable law or agree...
apache-2.0
-3,831,742,618,349,431,300
30.238095
97
0.697256
false
3.588621
true
false
false
ericmjl/bokeh
tests/unit/bokeh/document/test_events__document.py
1
20531
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #-------------------------------------------------------------------...
bsd-3-clause
834,450,375,620,443,300
39.099609
137
0.541036
false
3.712658
true
false
false
caiuspb/home-assistant
homeassistant/const.py
1
5259
# coding: utf-8 """ Constants used by Home Assistant components. """ __version__ = "0.11.0.dev0" # Can be used to specify a catch all when registering state or event listeners. MATCH_ALL = '*' # If no name is specified DEVICE_DEFAULT_NAME = "Unnamed Device" # #### CONFIG #### CONF_LATITUDE = "latitude" CONF_LONGITU...
mit
1,261,303,920,190,749,700
26.238342
79
0.72608
false
2.917314
false
false
false
rtqichen/torchdiffeq
torchdiffeq/_impl/rk_common.py
1
13685
import bisect import collections import torch from .event_handling import find_event from .interp import _interp_evaluate, _interp_fit from .misc import (_compute_error_ratio, _select_initial_step, _optimal_step_size) from .misc import Perturb from .solvers import AdaptiveStepsizeE...
mit
-8,176,199,358,564,004,000
43.576547
118
0.561271
false
3.263773
false
false
false
nguyenngochuy91/Ancestral-Blocks-Reconstruction
filter_operon_blast_results.py
1
21737
#!/usr/bin/env python from multiprocessing import Pool import time import os import sys import argparse import math from homolog4 import * from collections import defaultdict import itertools # Copyright(C) 2015 David Ream # Released under GPL version 3 licence. http://www.gnu.org/licenses/lgpl.html # Do not remove t...
gpl-3.0
-5,775,704,307,557,357,000
47.957207
196
0.654598
false
3.767897
true
false
false
tonyhong272/MusicML
DataScraping/lyrics/lyricsAPI.py
1
1430
# test.py # Johnny Dai 4/11/2016 # Test version script to scraping www.lyrics.com to grab lyrics of target song # Ex: # To grab lyrics of 'This Love' # print find_lyrics( title = 'this love', artist = 'maroon 5') import urllib from bs4 import BeautifulSoup #Function is to get rid of <br> in html content def text_with...
mit
142,702,986,828,445,520
29.425532
80
0.654545
false
3.095238
false
false
false
adamjmcgrath/fridayfilmclub
src/twitter.py
1
3969
#!/usr/bin/python """Create Twitter Oauth header.""" import logging import random import string import time import urllib from urlparse import urlparse import hmac import hashlib import secrets from google.appengine.api import urlfetch # TODO (adamjmcgrath) don't hardcode environment. consumer_token, consumer_to...
mpl-2.0
-2,367,052,695,008,738,000
28.183824
95
0.570169
false
4.169118
false
false
false
nyodas/enjoliver
app/tests/euid/discovery/test_kvm_discovery_client.py
1
18717
import os import sys import time import unittest from app import generator try: import kvm_player except ImportError: sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import kvm_player class TestKVMDiscoveryClient(kvm_player.KernelVirtualMachinePlayer): @classmethod d...
mit
-2,787,169,451,568,431,000
33.789963
101
0.481648
false
4.000214
true
false
false
osspeak/osspeak
osspeak/recognition/actions/library/extensions.py
1
1129
import os import queue import threading import importlib.util import settings imported_modules = {} def register(path, name): from recognition.actions.library import stdlib mod = get_or_load_module(path) stdlib.namespace[name] = mod def run(path, alias=None): runpath = get_runpath(path) save_as ...
mit
-2,010,116,532,733,566,500
25.27907
73
0.679362
false
3.517134
false
false
false
IsmoilovMuhriddin/allgo
rasp/motor_contoller.py
1
2087
import socket from allgo_utils import PCA9685,ultrasonic,ir_sens RASP_IP = '192.168.43.70' RASP_SERV_PORT = 7879 command = { # single commands 'rs': "rst_:", 'f': "fwd_:", 'rev': "rev_:", 'r': "rht_:", 'l': "lft_:", # combination commands 'f_r': "f_rt:", 'f_l': "f_lf:", 'rev_...
mit
-2,675,957,241,702,185,500
28.814286
80
0.48299
false
3.687279
false
false
false
samolds/samster
samster/local_settings.py
1
1187
# Django local_settings for samster project. DEBUG = True TEMPLATE_DEBUG = DEBUG PRODUCTION_READY = not DEBUG ADMINS = ( ('First Last', 'no@reply.com'), ) MANAGERS = ADMINS CONTACT_EMAIL_RECIPIENT = ["no@reply.com"] DEFAULT_FROM_EMAIL = 'no@reply.com' SITENAME = "sitename.com" PROPER_NAME = "Proper Name" EMPTY_...
mit
-6,704,649,602,747,509,000
16.455882
77
0.543387
false
3.140212
false
false
false
OmkarPathak/pygorithm
pygorithm/data_structures/heap.py
1
3766
""" Author: ALLSTON MICKEY Contributed: OMKAR PATHAK Created On: 11th August 2017 """ from __future__ import division from pygorithm.data_structures import queue import inspect class Heap(queue.Queue): """ min-heap implementation as queue """ @staticmethod def parent_idx(idx): """ ...
mit
-5,986,086,708,172,618,000
29.370968
89
0.565056
false
4.133919
false
false
false
alblue/swift
utils/android/adb/commands.py
6
7493
# adb/commands.py - Run executables on an Android device -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for l...
apache-2.0
-4,105,881,606,670,302,700
41.095506
79
0.648605
false
4.311277
false
false
false
Marcerisson/his-dudeness
player.py
1
1502
import pygame from graphalama import Borg from params import Params import math as m borg_baby = Borg() UP = [0, -8] DOWN = [0, 8] RIGHT = [8, 0] LEFT = [-8, 0] UP_LEFT = [-4*m.sqrt(2), -4*m.sqrt(2)] UP_RIGHT = 0 DOWN_RIGHT = 0 DOWN_LEFT = 0 class Player: def __init__(self, x, y, screensize): self.x = x ...
mit
-5,728,297,689,245,689,000
29.653061
116
0.535952
false
3.501166
false
false
false
pierky/blocklistsaggregator
pierky/blocklistsaggregator/formatters/cisco.py
1
5213
# Copyright (C) 2016 Pier Carlo Chiodi # # 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 program is distributed...
gpl-3.0
3,350,126,224,071,474,000
36.235714
79
0.547286
false
3.810673
false
false
false
dbiesecke/dbiesecke.github.io
repo/script.module.urlresolver/lib/urlresolver/plugins/vivosx.py
2
1566
''' Plugin for URLResolver Copyright (C) 2018 gujal 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 program is distribute...
mit
-2,667,967,732,104,233,000
33.043478
80
0.673052
false
3.773494
false
false
false
christensen5/pyIBCC
attic/frequentist.py
2
4446
''' Created on 10 Jan 2013 @author: Kieran Finn ''' import settings from copy import deepcopy import numpy as np from functions import * from collections import defaultdict class object_details(): def __init__(self): self.spotted=0.0 self.not_spotted=0.0 self.sc=False d...
mit
1,080,755,844,497,409,700
29.546099
102
0.565902
false
3.635323
false
false
false
edmonds/dnsviz
dnsviz/analysis/status.py
1
70016
# # This file is a part of DNSViz, a tool suite for DNS/DNSSEC monitoring, # analysis, and visualization. This file (or some portion thereof) is a # derivative work authored by VeriSign, Inc., and created in 2014, based on # code originally developed at Sandia National Laboratories. # Created by Casey Deccio (casey@de...
gpl-2.0
-7,057,467,651,495,311,000
49.589595
291
0.618059
false
3.590564
false
false
false
shub0/algorithm-data-structure
python/game_life.py
1
2262
''' According to the Wikipedia's article: "The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970." Given a board with m by n cells, each cell has an initial state live (1) or dead (0). Each cell interacts with its eight neighbors (horizonta...
bsd-3-clause
-1,267,521,293,908,738,800
41.679245
236
0.584881
false
3.827411
false
false
false
funrollloops/nebree8
controller_test.py
2
1080
#!/usr/bin/env python import threading from controller import Controller import Queue class CharWrapper: def __init__(self, x): self.x = x def __call__(self, *args): pass def testInspectQueue(): controller = Controller(None) controller.EnqueueGroup(map(CharWrapper, "abcdef")) inspect_result = ''...
gpl-2.0
9,106,819,225,737,232,000
22.478261
67
0.67037
false
3.529412
false
false
false
casselineau/Tracer
tracer/CoIn_rendering/rendering.py
1
5606
SOGUI_BINDING="SoQt" from pivy import coin from pivy.sogui import * import numpy as N import sys class Renderer(): ''' __________________________________________________________________________________________________ Rendering: Renders the scene. Offers the option to highlight specific rays according to the...
gpl-3.0
8,171,551,166,461,029,000
25.074419
198
0.618445
false
2.713456
false
false
false
tkoziara/parmec
tests/spring_general.py
1
2282
# PARMEC test --> SPRING general nonlinear capability command test matnum = MATERIAL (1E3, 1E9, 0.25) nodes = [0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1] elements = [8, 0, 1, 2, 3, 4, 5, 6, 7, matnum] colors = [1, 4, 0, 1, 2, 3, 2, 4, 4, 5, 6, 7, 3] parnum = MESH (...
mit
1,140,429,521,063,360,300
26.493976
127
0.538563
false
2.333333
false
false
false
Stratoscale/upseto
upseto/checkfulfilled.py
1
3295
from upseto import gitwrapper from upseto import avoidparadox from upseto import graph from upseto import traverse from upseto import dirtyparadoxresolution import os import re class CheckFulfilled: def __init__(self, baseDir="..", gitClean=False): self._baseDir = baseDir self._gitClean = gitClean...
apache-2.0
748,712,315,166,548,000
47.455882
104
0.642489
false
4.240669
false
false
false
charityscience/csh-sms
live_tests/modules/test_texter.py
1
29968
import logging import time from datetime import datetime from dateutil.relativedelta import relativedelta from django.test import TestCase from django.utils import timezone from freezegun import freeze_time from cshsms.settings import TEXTLOCAL_API, TEXTLOCAL_PRIMARY_ID, TEXTLOCAL_SENDERNAME, \ ...
gpl-3.0
1,287,865,866,782,484,500
67.891954
138
0.630372
false
4.078944
true
false
false
dmpetrov/dataversioncontrol
dvc/remote/local.py
1
24103
import errno import logging import os import stat from concurrent.futures import ThreadPoolExecutor, as_completed from functools import partial from funcy import cached_property, concat from shortuuid import uuid from dvc.exceptions import DownloadError, DvcException, UploadError from dvc.path_info import PathInfo fr...
apache-2.0
-8,771,469,287,355,707,000
32.663408
79
0.553168
false
4.063902
false
false
false
jm-begon/randconv
randconv/image/convolutional_extractor.py
1
5774
# -*- coding: utf-8 -*- # Author : Jean-Michel Begon # Date : Feb 23 2014 """ """ import numpy as np try: import Image except ImportError: from PIL import Image from .numpy_pil_converter import NumpyPILConvertor __all__ = ["ConvolutionalExtractor"] class ConvolutionalExtractor: """ ===============...
bsd-3-clause
3,472,348,119,263,748,600
30.900552
82
0.598026
false
4.292937
false
false
false
jf248/scrape-the-plate
mysite/settings/default.py
1
4667
""" Django settings for mysite project. Set the environment variable, DJANGO_SETTINGS_MODULE, to use other modules. e.g. $ export DJANGO_SETTINGS_MODULE=mysite.settings.production or import os; os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.setting.production' If DJANGO_SETTINGS_MODULE is not specified, Django im...
mit
-2,440,605,894,518,157,000
25.219101
79
0.64324
false
3.724661
false
false
false
haiyusun/fuck-lab-bat
lab_excel.py
1
8412
""" For my lab friends. It can save some of your time. You may need to install openplxl, enter 'pip install openpyxl' in command line(No semicolon) Extract the data(rate & psnr) from a set of result and directly write it to an Excel file. usage: Open command line: python lab_excel.py your_result_director...
mit
-5,609,206,537,076,710,000
36.751323
120
0.554752
false
2.654585
false
false
false
appsoma/pykafka
pykafka/cluster.py
4
12477
from __future__ import division """ Author: Keith Bourgoin """ __license__ = """ Copyright 2015 Parse.ly, 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/LIC...
apache-2.0
-1,946,665,483,056,688,000
42.024138
126
0.583554
false
4.401058
false
false
false
repotvsupertuga/tvsupertuga.repository
script.module.streamtvsupertuga/lib/resources/lib/sources/en/cmovieshdbz.py
1
2968
# -*- coding: utf-8 -*- ''' 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 program is distributed in...
gpl-2.0
-5,159,517,401,206,625,000
39.108108
148
0.531334
false
4.320233
false
false
false
ptitjano/bokeh
scripts/update_docs_versions.py
1
1590
import os import re import sys def check_input(version): pat = r'^\d+.\d+.\d+$' if not re.match(pat, version): print("New versions for docs must be in the format X.X.X (ex. '0.12.0')") return False return True def update_all_versions_txt(version): filename = 'sphinx/source/all_versions...
bsd-3-clause
5,166,166,777,971,329,000
30.8
130
0.602516
false
3.589165
false
false
false
jku/ffs
ffs.py
1
26945
#!/usr/bin/env python # ffs - Friendly File Server # Copyright (C) 2013 Jussi Kukkonen <jku@goto.fi> # # 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 # (a...
gpl-3.0
7,520,010,708,642,678,000
37.004231
148
0.556133
false
3.812252
false
false
false
mjudsp/Tsallis
sklearn/decomposition/tests/test_truncated_svd.py
73
6086
"""Test truncated SVD transformer.""" import numpy as np import scipy.sparse as sp from sklearn.decomposition import TruncatedSVD from sklearn.utils import check_random_state from sklearn.utils.testing import (assert_array_almost_equal, assert_equal, assert_raises, assert_greater, ...
bsd-3-clause
-5,040,406,900,728,158,000
36.109756
79
0.621262
false
2.927369
true
false
false
toomoresuch/pysonengine
eggs/z3c.recipe.scripts-1.0.1-py2.6.egg/z3c/recipe/scripts/scripts.py
1
3839
############################################################################## # # Copyright (c) 2009-2010 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. # TH...
mit
7,991,091,953,747,312,000
38.57732
78
0.609794
false
4.347678
false
false
false
scottwoodall/python-pgextras
setup.py
1
1454
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open('README.rst').read() history = open('HISTORY.rst...
bsd-3-clause
2,319,607,905,827,442,000
25.925926
75
0.599725
false
3.709184
false
false
false
piqueserver/piqueserver
piqueserver/scripts/paint.py
1
2761
""" Lets you change the color of the block you are looking at. With block tool selected, pick a color, then hold down sneak key (<V> by default) to paint. Commands ^^^^^^^^ * ``/paint <player>`` enables painting mode for that player. .. codeauthor:: hompy """ from pyspades.contained import BlockAction from pyspades...
gpl-3.0
-2,836,784,675,566,524,400
30.022472
76
0.645781
false
3.517197
false
false
false
Chiroptera/QCThesis
deprecated/CUDA/K_Means_noCUDA.py
1
3257
# -*- coding: utf-8 -*- """ Created on Thu Apr 2 09:26:03 2015 @author: Diogo Silva CUDA not implemented on this version. """ import numpy as np import sys, traceback class K_Means: def __init__(self,N=None,D=None,K=None): self.N = N self.D = D self.K = K ...
mit
8,283,756,190,934,790,000
25.274194
78
0.493706
false
3.730813
false
false
false
LamCiuLoeng/vat
vatsystem/controllers/report.py
1
72833
# coding: utf-8 from datetime import date,time from datetime import datetime as dt from decimal import Decimal import logging import os import random import traceback import zipfile from itertools import * from repoze.what import authorize from repoze.what import predicates from repoze.what.predicates import has_permi...
mit
-7,168,928,698,036,441,000
49.209577
212
0.447292
false
4.013257
false
false
false
gubser/fallblatt
software/transportapi.py
1
1476
__author__ = 'Elio Gubser' import requests import dpath import dateutil.parser def next_connections(station): url = 'http://transport.opendata.ch/v1/stationboard' params = { 'station': station, 'transportations[]': ['ice_tgv_rj', 'ec_ic', 'ir', 're_d', 's_sn_r'], 'limit': 1, 'fi...
agpl-3.0
-7,661,408,921,173,982,000
35
234
0.611789
false
3.5311
false
false
false
rworr/StudentHub
studenthub.py
1
26091
import webapp2 import jinja2 import os import urllib, urllib2, cookielib import json import urllib import cookielib import re import hmac import time import datetime from cookielib import Cookie, CookieJar from google.appengine.api import users from google.appengine.ext import ndb not_a_text = "281000002329B" secret_...
mit
-8,866,579,039,475,044,000
38.058383
169
0.557587
false
3.721969
false
false
false
isb-cgc/examples-Python
python/isb_cgc_api_v3_cases.py
1
3186
# -#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# ''' Copyright 2018, Institute for Systems Biology. 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.apach...
apache-2.0
3,489,282,957,187,963,400
34.010989
87
0.542687
false
2.880651
false
false
false
savioabuga/phoenix
phoenix/groups/forms.py
1
1111
from django import forms from bootstrap3_datetime.widgets import DateTimePicker from django_select2.fields import Select2ChoiceField from django_select2.widgets import AutoHeavySelect2Widget, Select2Widget from phoenix.animals.models import Animal from phoenix.animals.fields import BullField, CowField from .models impo...
bsd-3-clause
-6,686,427,173,280,318,000
57.526316
137
0.769577
false
3.607143
false
false
false
MarxMustermann/OfMiceAndMechs
tests/test_characters.py
1
1118
import unittest import src import config class TestBasicCharacterFunction(unittest.TestCase): def setUp(self): src.characters.mainChar = None src.characters.displayChars = src.canvas.DisplayMapping("pureASCII") src.characters.commandChars = config.commandChars src.characters.debugM...
gpl-3.0
-8,817,038,773,729,087,000
27.666667
76
0.661896
false
4.110294
true
false
false
zhangyage/Python-oldboy
day02/dict_study2.py
1
1135
#!/usr/bin/env python # -*- coding:utf-8 -*- ''' 字典学习 ''' dic = {'k1': 'v1', 'k2': 'v2', 'k3': 'v3'} #循环遍历所有的key for i in dic: print i #循环遍历所有的value for i in dic: print dic[i] #循环遍历所有的key,value for i in dic: print i,dic[i] print '--------------' #在字典中添加一个新的建值 k4,v4 dic.update(k4='v4') print di...
apache-2.0
-5,288,665,531,775,872,000
16.588235
99
0.538462
false
1.651934
false
false
false
hksoni/L2BM-Simulator
MulticastTree.py
1
2803
# ***** begin license block ***** # L2BM Simulator: Lazy Load-Balancing Multicast(L2BM) simulator # copyright (c) 2016-2017, inria. # # this work was partially supported by the anr reflexion project (anr-14-ce28-0019). # the authors alone are responsible for this work. # # see the file authors for details and contact i...
gpl-3.0
5,035,262,069,368,569,000
31.988235
94
0.582947
false
3.534678
false
false
false
andrewchambers/pixie
pixie/vm/array.py
1
4400
import pixie.vm.rt as rt import pixie.vm.object as object from pixie.vm.object import affirm from pixie.vm.code import extend, as_var from pixie.vm.numbers import Integer from pixie.vm.primitives import nil import pixie.vm.stdlib as proto import rpython.rlib.jit as jit from rpython.rtyper.lltypesystem import lltype, rf...
gpl-3.0
-5,710,290,086,861,030,000
25.672727
72
0.628409
false
3.240059
false
false
false
sciapp/pyMolDyn
src/util/message.py
1
1176
# -*- coding: utf-8 -*- __all__ = ["print_message", "progress", "finish", "error", "log", "set_output_callbacks"] _print_message = None _progress = None _finish = None _error = None _log = None # Buffer log messages if no valid log callback is set _log_buffer =...
mit
2,256,304,195,981,984,800
18.6
89
0.580782
false
3.55287
false
false
false
openstack-packages/rdopkg
rdopkg/core.py
2
8354
# -*- encoding: utf-8 -*- from __future__ import print_function import json import os from six.moves import input from rdopkg import action as _action from rdopkg import actions from rdopkg import const from rdopkg import exception from rdopkg import helpers from rdopkg.utils import log def default_action_manager():...
apache-2.0
-6,229,675,313,285,354,000
33.808333
78
0.499282
false
4.141795
false
false
false
MaxHalford/xam
xam/ensemble/groupby_model.py
1
2651
import numpy as np import pandas as pd from sklearn.base import BaseEstimator from sklearn.base import MetaEstimatorMixin from sklearn.base import clone class GroupbyModel(BaseEstimator, MetaEstimatorMixin): def __init__(self, base_model, by): self.base_model = base_model self.by = by def _...
mit
6,244,137,651,152,860,000
27.505376
82
0.564693
false
3.986466
false
false
false
levilucio/SyVOLT
GM2AUTOSAR_MM/merge_preprocess_rules/Himesis/HMoveOneOutputDirectMatchDiffRulesRHS.py
3
12524
from core.himesis import Himesis, HimesisPostConditionPattern import cPickle as pickle from uuid import UUID class HMoveOneOutputDirectMatchDiffRulesRHS(HimesisPostConditionPattern): def __init__(self): """ Creates the himesis graph representing the AToM3 model HMoveOneOutputDirectMatchDiffRulesR...
mit
-2,964,855,667,438,732,300
48.501976
136
0.524752
false
4.574142
false
false
false
quizlet/grpc
test/cpp/naming/test_dns_server.py
10
5126
#!/usr/bin/env python2.7 # Copyright 2015 gRPC authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
apache-2.0
6,873,038,278,075,577,000
37.253731
142
0.67382
false
3.307097
true
false
false
alex-jackson1994/shaunScholarshipStuff
reorderContigs.py
2
2761
#!/usr/bin/env python3 #USE: 'reorderContigs.py [inputFile.psmcfa] > [outputFile.psmcfa]' #This script reorders the location of contigs within a .psmcfa file. This in itself will do nothing to affect the results of PSMC however it may be used in conjunction with another script to remove the headers and create random co...
gpl-2.0
-4,692,691,601,525,878,000
48.303571
261
0.58602
false
4.4176
false
false
false
lorisercole/thermocepstrum
thermocepstrum_gui/core/control_unit.py
1
17560
# -*- coding: utf-8 -*- """ -------------------------------------------- Thermocepstrum graphic user interface Control unit file -------------------------------------------- This file contains the functions that the GUI will directly call to start new multithread operations and to make requests to the thermoc...
gpl-3.0
2,064,081,786,552,028,400
31.279412
125
0.582688
false
3.780409
false
false
false
ikalnytskyi/holocron
src/holocron/_processors/_misc.py
1
4375
"""Various miscellaneous functions to make code easier to read & write.""" import copy import collections.abc import inspect import logging import functools import urllib.parse import jsonschema import jsonpointer _logger = logging.getLogger("holocron") def resolve_json_references(value, context, keep_unknown=Tru...
bsd-3-clause
4,258,096,727,326,046,700
34.569106
79
0.510171
false
5.208333
false
false
false
andreabrambilla/libres
python/tests/res/enkf/test_local_dataset.py
1
4077
# Copyright (C) 2017 Equinor ASA, Norway. # # This file is part of ERT - Ensemble based Reservoir Tool. # # ERT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at ...
gpl-3.0
-8,774,615,278,449,767,000
37.462264
96
0.641403
false
3.676285
true
false
false
kolanos/vaporize
vaporize/nextgen_servers.py
1
21464
# -*- coding: utf-8 -*- import json from vaporize.core import convert_datetime, get_url, handle_request, query from vaporize.utils import DotDict class NextGenFlavor(DotDict): """A CloudNextGenServers NextGenFlavor.""" def __repr__(self): if 'name' in self: return '<NextGenFlavor %s>' % s...
mit
9,181,479,843,798,078,000
34.244663
92
0.559542
false
4.182385
true
false
false
junh1024/Reaper-Surround
Scripts/Reaper Stats.py
1
2398
"""Reascript for showing stats in this order: Tracks Buses Clips MIDIClips MIDInotes Markers FX Envelopes Sends BPM I wanted to collect various stats from projects for a retrospective spreadsheet. There was a bit of feature creep as I browsed through the API to see what stats I could collect, leaving out ones which are...
gpl-3.0
5,329,566,089,188,625,000
34.264706
437
0.739366
false
2.68533
false
false
false
andreymal/mini_fiction
mini_fiction/bl/tag_categories.py
1
1803
#!/usr/bin/env python # -*- coding: utf-8 -*- # pylint: disable=unexpected-keyword-arg,no-value-for-parameter from flask_babel import lazy_gettext from mini_fiction.bl.utils import BaseBL from mini_fiction.logic.adminlog import log_addition, log_changed_fields, log_deletion from mini_fiction.validation import Valida...
gpl-3.0
-3,347,849,631,985,785,300
34.352941
94
0.65391
false
3.928105
false
false
false
mgireesh05/jsonvalidator
proc.py
1
2293
#!/usr/bin/python import sys import json import re import os def main(argv): if len(argv) < 2: sys.exit('Usage: proc.py <inputfile>') preprocess(argv[1]) extractJson() def formatLine(line, lineSplitArr): regex = r"[\[\]\{\}]+" match = re.findall(regex, line) if match: firs...
mit
-3,740,374,752,754,121,700
22.639175
61
0.500654
false
3.906303
false
false
false
uclouvain/osis
base/forms/utils/filter_field.py
1
1783
############################################################################## # # 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
-1,895,573,005,984,991,700
37.73913
87
0.63468
false
4.077803
false
false
false
nextgis/nextgisweb_compulink
nextgisweb_compulink/compulink_deviation/model.py
1
1578
# coding=utf-8 import types from sqlalchemy.sql import func from nextgisweb import db from nextgisweb.models import declarative_base from nextgisweb_compulink.compulink_admin.model import tometadata_event Base = declarative_base() class ConstructDeviation(Base): __tablename__ = 'construct_deviation' __table...
gpl-2.0
-321,650,929,337,371,700
41.242424
106
0.723099
false
2.5625
false
false
false
googleapis/python-analytics-admin
samples/properties_web_data_streams_create.py
1
2107
#!/usr/bin/env python # Copyright 2021 Google LLC 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
-2,772,025,323,186,557,400
34.116667
115
0.728524
false
3.887454
false
false
false
FDio/vpp
test/vpp_ip_route.py
2
31405
""" IP Routes object abstractions for representing IP routes in VPP """ from vpp_object import VppObject from socket import inet_pton, inet_ntop, AF_INET, AF_INET6 from vpp_ip import DpoProto, INVALID_INDEX, VppIpAddressUnion, \ VppIpMPrefix from ipaddress import ip_network, ip_address, IPv4Network, IPv6Netwo...
apache-2.0
6,122,347,237,249,205,000
32.197674
79
0.490336
false
3.730253
true
false
false
martinpilat/dag-evaluate
utils.py
1
3302
__author__ = 'Martin' import json import method_params import networkx as nx def read_json(file_name): """ Reads the JSON file with name file_name and returns its contents. :param file_name: The name of the JSON file :return: The content of the JSON file """ return json.load(open(file_name, '...
mit
-2,784,368,577,824,294,000
29.293578
171
0.530285
false
3.390144
false
false
false
mychy/ip2location
ip2location.py
1
1182
#!/usr/bin/python #encoding: utf-8 import geoip2.database import sys, os, re import query PATH_DIR = '/Users/neo/dev/ip2location/ip2geo/' reload(sys) sys.setdefaultencoding( "utf-8" ) reobj = re.compile(r'\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b') db_file = PATH...
apache-2.0
6,399,966,973,262,311,000
24.06383
116
0.623939
false
2.572052
false
false
false
tonnie17/flowlight
flowlight/utils/remote.py
1
1374
import pickle import cloudpickle import socket import struct from flowlight.core.setting import Setting from flowlight.exceptions import RemoteWorkerNotRunning def dumps(obj): return cloudpickle.dumps(obj) def loads(data): return pickle.loads(data) class RemoteCallable: def __init__(self, callable_ob...
mit
-7,292,921,796,584,669,000
27.625
87
0.620815
false
4.227692
false
false
false
lnls-fac/scripts
bin/pytrack.py
1
9012
#!/usr/bin/env python-sirius import subprocess import sys import os from apsuite.trackcpp_utils import * if __name__ == "__main__": if len(sys.argv) == 1: subprocess.call([default_track_version]) sys.exit() if len(sys.argv) > 2: print(sys.argv[0] + ': invalid number of arguments!') ...
mit
-1,026,453,520,514,291,600
41.509434
70
0.430426
false
3.777033
false
false
false
MaxTyutyunnikov/lino
obsolete/src/lino/contacts/models.py
1
4980
## Copyright 2008 Luc Saffre. ## This file is part of the Lino project. ## Lino is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. #...
gpl-3.0
7,226,383,230,627,328,000
30.923077
72
0.603213
false
3.688889
false
false
false
tensorflow/probability
spinoffs/oryx/oryx/experimental/mcmc/__init__.py
1
1114
# Copyright 2020 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
2,212,309,546,835,617,800
47.434783
78
0.740575
false
3.978571
false
false
false
natano/tiget
tiget/utils.py
1
2440
import os import sys import fcntl import termios import struct import traceback from io import StringIO from importlib import import_module from collections import namedtuple from tempfile import NamedTemporaryFile from colors import red from git_orm import transaction, GitError from tiget.conf import settings __all...
isc
5,548,152,608,469,191,000
25.813187
79
0.613115
false
3.904
false
false
false
buildbot/supybot
test/test_yn.py
3
3524
### # Copyright (c) 2014, Artur Krysiak # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions...
bsd-3-clause
-483,795,380,785,169,300
34.59596
79
0.709421
false
4.092915
true
false
false
alex-justes/en_scripts
parse.py
1
2685
#!/usr/bin/python import sys import re import os fileName = sys.argv[1] acc = "" code = 1 def chooseEnding( num ): rem = num % 10 if (rem == 1 and num != 11): return "минута" elif ((rem == 2 or rem == 3 or rem == 4) and not (num == 12 or num == 13 or num == 14)): return "минуты" else:...
bsd-3-clause
8,345,272,627,629,920,000
29.755814
92
0.420794
false
3.448501
false
false
false
adwaitjog/mafia
aerialvision/organizedata.py
3
13480
#!/usr/bin/env python # Copyright (C) 2009 by Aaron Ariel, Tor M. Aamodt, Wilson W. L. Fung # and the University of British Columbia, Vancouver, # BC V6T 1Z4, All Rights Reserved. # # THIS IS A LEGAL DOCUMENT BY DOWNLOADING GPGPU-SIM, YOU ARE AGREEING TO THESE # TERMS AND CONDITIONS. # # THIS SOFTWARE IS PROVIDED B...
gpl-3.0
-2,439,886,757,757,145,000
36.653631
126
0.627893
false
3.68306
false
false
false
Andreea-G/Codds_DarkMatter
src/Data/DAMA2010Na_TotRateLimit.py
2
2097
""" Copyright (c) 2015 Andreea Georgescu Created on Wed Nov 19 00:18:55 2014 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. ...
gpl-2.0
2,783,579,470,692,268,500
30.298507
90
0.676204
false
2.849185
false
false
false
neale/CS-program
533-ReinforcementLearning/assignment3/mdp.py
1
13032
import sys import operator import numpy as np import matplotlib.pyplot as plt import itertools, functools import re import argparse from mdp_builder import Builder from simulator import Simulator """ Grid Layout grid[0][0] = num_states grid[0][1] = num_actions """ def load_args(): parser = argparse.ArgumentP...
unlicense
-8,252,633,816,891,850,000
35.099723
159
0.54159
false
3.740528
false
false
false
graziano-giuliani/pythoncode
pyuwphysret/common/pyfiles/atmos/rh2mr.py
1
2422
#!/usr/bin/env python # rh2mr.py import numpy as num from satvap import satvap from satmix import satmix from e2mr import e2mr def rh2mr(p,t,rh,Tconvert=None): """(w1,w2) = rh2mr(p,t,rh,Tconvert) determine H2O mixing ratio (w, g/kg) given reference pressure (mbar), temperature (t,K), and relative humidity (rh,%) T...
mit
-7,955,925,993,316,853,000
35.69697
77
0.599505
false
2.133921
false
false
false
pclements12/PyWishlist
wishlist/settings.py
1
3047
""" Django settings for wishlist project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build pat...
mit
-8,660,820,033,031,071,000
25.267241
71
0.679029
false
3.408277
false
false
false
nil0x42/phpsploit
src/ui/output/wrapper.py
1
6291
"""Phpsploit standard output wrapper. Usage: >>> import stdout, sys >>> sys.stdout = Stdout(backlog=True) >>> print("foo") foo >>> print("bar") bar >>> log = sys.stdout.backlog # log is now "foo\\nbar\\n" >>> sys.stdout.backlog = "" # empty the stdout backlog >>> print("wtf") wtf >>> log = sys.stdout.back...
gpl-3.0
-4,488,152,886,164,421,000
32.77957
77
0.581728
false
4.009572
false
false
false
praetorian-inc/pentestly
modules/reporting/list.py
1
1569
from recon.core.module import BaseModule import codecs import os class Module(BaseModule): meta = { 'name': 'List Creator', 'author': 'Tim Tomes (@LaNMaSteR53)', 'description': 'Creates a file containing a list of records from the database.', 'options': ( ('table', 'hos...
gpl-3.0
-6,071,805,736,943,783,000
43.828571
111
0.557043
false
4.002551
false
false
false
raonyguimaraes/mendelmd
individuals/migrations/0001_initial.py
1
4103
# Generated by Django 2.1.4 on 2018-12-27 08:50 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import individuals.models class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_U...
bsd-3-clause
1,397,647,168,297,428,500
46.16092
164
0.591031
false
4.282881
false
false
false