repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
roverdotcom/pandastream-tools
sync_profiles.py
1
3938
import logging import json import argparse from ConfigParser import SafeConfigParser import panda logging.basicConfig() logging.getLogger().setLevel(logging.DEBUG) logger = logging.getLogger('requests.packages.urllib3') logger.setLevel(logging.DEBUG) logger.propagate = True class ServiceError(Exception): pass ...
mit
5,041,170,020,435,177,000
26.929078
78
0.628492
false
pgdr/ert
python/python/ert_gui/simulation/models/single_test_run.py
1
1111
from ecl.util import BoolVector from res.enkf.enums import HookRuntime from res.enkf import ErtRunContext from ert_gui.simulation.models import BaseRunModel, ErtRunError, EnsembleExperiment class SingleTestRun(EnsembleExperiment): def __init__(self, queue_config): super(EnsembleExperiment, self).__ini...
gpl-3.0
2,944,036,167,774,455,000
32.666667
112
0.666067
false
schmidtj/PyGNA
PyGNA/graphMLRead.py
1
1143
''' This is a wrapper for the networkx graphml read/writer so that the GNA can read a graphml file with multiple graphs. The current networkx read_graphml only returns the first element in the graph list that is returned by the graphMLReader class. ''' import networkx.readwrite.graphml as ml def read_graphml(path,no...
bsd-3-clause
4,107,397,642,745,463,300
33.666667
76
0.67804
false
FescueFungiShare/hydroshare
hs_tools_resource/page_processors.py
1
7367
from mezzanine.pages.page_processors import processor_for from crispy_forms.layout import Layout, HTML from hs_core import page_processors from hs_core.views import add_generic_context from forms import UrlBaseForm, VersionForm, SupportedResTypesForm, ToolIconForm, \ SupportedSharingStatusForm, AppH...
bsd-3-clause
1,497,654,030,710,353,200
51.248227
95
0.532917
false
VirgilSecurity/virgil-sdk-python
virgil_sdk/signers/model_signer.py
1
4288
# Copyright (C) 2016-2019 Virgil Security Inc. # # Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com> # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # (1) Redistribution...
bsd-3-clause
8,491,931,940,891,143,000
42.755102
132
0.698228
false
zobe123/Plex-CS
plexcs/graphs.py
1
50414
# This file is part of Plex:CS. # # Plex:CS 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. # # Plex:CS is distributed in the hop...
gpl-3.0
1,632,475,451,479,142,700
55.013333
149
0.522911
false
cbertinato/pandas
pandas/tests/indexes/timedeltas/test_scalar_compat.py
1
2391
""" Tests for TimedeltaIndex methods behaving like their Timedelta counterparts """ import numpy as np import pytest import pandas as pd from pandas import Index, Series, Timedelta, TimedeltaIndex, timedelta_range import pandas.util.testing as tm class TestVectorizedTimedelta: def test_tdi_total_seconds(self): ...
bsd-3-clause
-2,343,195,333,733,465,600
36.952381
76
0.546633
false
CrowdEmotion/crowdemotion-api-clients-examples
python/crowdemotion_api_client_python/models/face_video.py
1
13837
# coding: utf-8 """ CloudEmotion API v1 CrowdEmotion API OpenAPI spec version: 1.1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You ...
mit
-7,702,536,492,178,499,000
23.40388
328
0.532847
false
vicgc/pyAndriller
Andriller.py
1
33884
#!/usr/bin/env python3 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Andriller.py - Forensic acquisition tool for Android devices. # Website, Usage and Disclaimer: http://android.saz.lt # Copyright (C) 2013 Denis Sazonov # # This program is free software: you can redistribute it and/or mo...
gpl-3.0
2,126,477,740,589,460,500
43.998672
621
0.616427
false
adaptive-learning/robomission
backend/learn/tests/test_recommendation.py
1
3737
import pytest from learn.models import Task, ProblemSet, Domain from learn.models import Student, TaskSession, Skill from learn.recommendation import get_recommendation, select_task def create_domain(): # TODO: Allow to set domain briefly, sth. like: # create_domain('m1(p1(t1, t2, t3), p2(t4, t5))'). ...
gpl-3.0
-1,803,799,994,616,128,500
33.284404
69
0.704308
false
depet/scikit-learn
sklearn/decomposition/pca.py
1
20538
""" Principal Component Analysis """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Denis A. Engemann <d.engemann@fz-juelich.de> # # License: BSD 3 clause from math import log, sqrt import warnin...
bsd-3-clause
-5,295,474,510,407,824,000
32.23301
80
0.583991
false
graik/biskit
biskit/core/trajparserFactory.py
1
3036
## ## Biskit, a toolkit for the manipulation of macromolecular structures ## Copyright (C) 2004-2018 Raik Gruenberg & Johan Leckner ## ## 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 v...
gpl-3.0
-8,348,231,987,865,714,000
36.02439
78
0.638011
false
takluyver/xray
xray/backends/netCDF4_.py
1
4885
from collections import OrderedDict import warnings import numpy as np from common import AbstractWritableDataStore import xray from xray.conventions import encode_cf_variable from xray.utils import FrozenOrderedDict, NDArrayMixin, as_array_or_item from xray import indexing class NetCDF4ArrayWrapper(NDArrayMixin): ...
apache-2.0
2,144,527,192,232,187,000
35.729323
76
0.596725
false
MagnusS/mirage-bench
test-jitsu/plot.py
1
1208
#!/usr/bin/env python import sys print "# Creating graphs from stdin (requires matplotlib)" results = {} for filename in sys.argv[1:]: results[filename] = [] with open(filename) as f: for l in f: line = l.strip() if len(line) == 0 or line[0] == '#': continue if l[0] == "!": print "Warning: Some ...
isc
409,130,284,544,493,900
20.571429
79
0.673841
false
SunDwarf/curious
curious/dataclasses/role.py
1
6768
# This file is part of curious. # # curious 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 3 of the License, or # (at your option) any later version. # # curious is distributed in the ho...
mit
-870,904,555,056,619,100
30.626168
99
0.593085
false
horejsek/python-webdriverwrapper
docs/conf.py
1
10146
# -*- coding: utf-8 -*- import sys import os sys.path.insert(0, '.') sys.path.insert(0, '..') # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' # Add any Sphinx extension module names here, as str...
mit
-5,967,862,005,639,540,000
29.838906
80
0.699685
false
epeios-q37/epeios
other/exercises/Hangman/workshop/_/F.py
1
2200
# coding: utf-8 """ MIT License Copyright (c) 2019 Claude SIMON (https://q37.info/s/rmnmqd49) 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 limit...
agpl-3.0
-1,613,040,798,973,529,600
27.72973
80
0.713182
false
mithrandi/eliottree
eliottree/tree.py
1
5439
from collections import OrderedDict, defaultdict def task_name(task): """ Compute the task name for an Eliot task. If we can't find a ``message_type`` or an ``action_type`` field to use to derive the name, then return ``None``. """ if task is None: raise ValueError('Cannot compute the...
mit
-8,383,232,947,113,377,000
30.994118
78
0.541644
false
claashk/python-config
schema/default_reader.py
1
11785
# -*- coding: utf-8 -*- import re from .content_buffer import ContentBuffer from .error_handler import ErrorHandler class Locator(object): """Simple locator used by :class:`~schema.DefaultReader` """ def __init__(self): self.row= 0 self.col= 0 def __str__(self): """Con...
gpl-3.0
6,490,968,191,307,207,000
30.179894
90
0.51031
false
ram8647/gcb-mobilecsp
tests/functional/whitelist.py
1
6236
# Copyright 2014 Google 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 applicable law or ...
apache-2.0
-4,620,004,720,217,033,000
34.634286
79
0.652181
false
MyPhate/PythonMiniProbe
miniprobe/miniprobe.py
2
5761
#!/usr/bin/env python # Copyright (c) 2014, Paessler AG <support@paessler.com> # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the # following conditions are met: # 1. Redistributions of source code must retain the above copyright not...
bsd-3-clause
-887,030,002,503,295,400
37.152318
119
0.602326
false
mwytock/cvxpy
examples/communications/Channel_capacity_BV4.57.py
1
2632
#!/usr/bin/env python3 # @author: R. Gowers, S. Al-Izzi, T. Pollington, R. Hill & K. Briggs # Boyd and Vandenberghe, Convex Optimization, exercise 4.57 page 207 import cvxpy as cvx import numpy as np ''' Input parameters P: channel transition matrix P_ij(t) = P(output|input) at time t n: size of input m: size o...
gpl-3.0
396,468,914,431,187,900
34.712329
103
0.675365
false
PavanGupta01/aerospike-admin
asadm.py
1
11499
#!/usr/bin/env python # Copyright 2013-2014 Aerospike, 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 la...
apache-2.0
7,454,791,825,567,895,000
33.325373
93
0.418906
false
scemama/ninja_ocaml
ninja_ocaml.py
1
8281
#!/usr/bin/env python # # Copyright 2015 Anthony Scemama # # 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 applic...
apache-2.0
-1,102,097,753,415,023,000
27.555172
94
0.602705
false
Comunitea/l10n-spain
l10n_es_aeat_sii/models/account_invoice.py
1
68394
# -*- coding: utf-8 -*- # Copyright 2017 Ignacio Ibeas <ignacio@acysos.com> # Copyright 2017 Studio73 - Pablo Fuentes <pablo@studio73> # Copyright 2017 Studio73 - Jordi Tolsà <jordi@studio73.es> # Copyright 2017 Otherway - Pedro Rodríguez Gil # Copyright 2017 Tecnativa - Pedro M. Baeza # Copyright 2017 Comunitea - Omar...
agpl-3.0
-6,420,739,032,322,082,000
42.225032
79
0.513249
false
jcarreiro/jmc-python
essential_algorithms/chapter_2.py
1
1820
from __future__ import absolute_import import random from jmc.algorithms.searching import binary_search def coin_flip(seed=None): """Generates coin flips using a fair six-sided die.""" if seed: random.seed(seed) return random.randint(1, 6) > 3 def test_coin_flip(count): heads = 0 tails = 0 for x i...
mit
-2,899,852,987,777,092,600
28.836066
79
0.601099
false
cuhk-cse/CoMonitor
benchmarks/CS_PCA_twc12/run_orangelab_temperature.py
1
1732
######################################################### # run_orangelab_temperature.py # Author: Jamie Zhu <jimzhu@GitHub> # Created: 2015/8/24 # Last updated: 2015/8/24 ######################################################### import numpy as np import os, sys, time sys.path.append('../') from commons.utils impor...
mit
5,718,934,930,505,162,000
36.652174
104
0.598152
false
cpcloud/ibis
ibis/pandas/execution/tests/test_join.py
1
13150
import pandas as pd import pandas.util.testing as tm import pytest from pytest import param import ibis import ibis.common.exceptions as com pytestmark = pytest.mark.pandas join_type = pytest.mark.parametrize( 'how', [ 'inner', 'left', 'right', 'outer', param( ...
apache-2.0
-4,809,177,219,277,779,000
30.534772
79
0.615817
false
ihartung/460-Lab1
lab4/Lab4.py
1
16224
from __future__ import print_function import sys sys.path.append('..') from src.sim import Sim from src.packet import Packet from dvrouting import DvroutingApp from networks.network import Network class BroadcastApp(object): def __init__(self, node): self.node = node def receive_packet(self, pack...
gpl-2.0
3,474,339,910,995,493,000
46.717647
96
0.685343
false
peterhogan/python
operations_test.py
1
1700
from random import randint from random import shuffle import operator ops = { "+": operator.add, "-": operator.sub, "/": operator.truediv, "*": operator.mul} all_ops = ["+","-","/","*"]*6 shuffle(all_ops) bigs = [25,50,75,100,250,500,750,1000]*6 shuffle(bigs) smalls = [1,2,3,4,5,6,7,8,9]*6 shuffle(smalls) ...
mit
4,423,803,057,749,753,300
33
120
0.514706
false
osrsbox/osrsbox-db
scripts/cache/generate_summary_models.py
1
5551
""" Author: PH01L Email: phoil@osrsbox.com Website: https://www.osrsbox.com Description: Parse OSRS cache data and extract model ID numbers for items, npcs, and objects. Known keys for models: - items: inventoryModel - npcs: models, models_2 (version 2 does not seem to be used) - objects: objectModels Copyright (c...
gpl-3.0
7,765,241,992,713,787,000
33.69375
110
0.619168
false
patta42/pySICM
pySICMgui/actionhandler.py
1
2074
# Copyright (C) 2015 Patrick Happel <patrick.happel@rub.de> # # This file is part of pySICM. # # pySICM 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 ...
gpl-3.0
4,511,619,947,610,642,000
34.758621
90
0.679364
false
Valka7a/python-playground
python-course-softuni/data-structures/ex4.py
1
1336
prices = [] while True: # User input user_input = input("Enter price or stop: ") # Show warning if there isn't enough prices if user_input == 'stop': if len(prices) < 4: print("You must enter 4 or more prices.") continue else: break try: p...
mit
-4,293,241,250,670,452,700
24.207547
78
0.613024
false
anubhav929/eden
modules/s3/s3fields.py
1
34578
# -*- coding: utf-8 -*- """ S3 Extensions for gluon.dal.Field, reusable fields @requires: U{B{I{gluon}} <http://web2py.com>} @copyright: 2009-2012 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associ...
mit
-5,980,965,802,391,904,000
36.914474
153
0.438834
false
pz325/hornbook-django
apps/hornbook_api/hanzi_base.py
1
3751
# -*- coding: utf-8 -*- TONES = ( (0, u'轻声'), (1, u'一声'), (2, u'二声'), (3, u'三声'), (4, u'四声') ) INITIALS = ( ('b', 'b'), ('p', 'p'), ('m', 'm'), ('f', 'f'), ('d', 'd'), ('t', 't'), ('n', 'n'), ('l', 'l'), ('g', 'g'), ('k', 'k'), ('h', 'h'), ('j', 'j')...
bsd-3-clause
-8,652,714,250,542,228,000
17.408163
121
0.34867
false
dkulikovsky/graphite-ch-web
webapp/graphite/render/views.py
1
20253
"""Copyright 2008 Orbitz WorldWide Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
apache-2.0
8,425,600,202,721,885,000
35.958029
125
0.666914
false
dbarbier/privot
python/test/t_AnalyticalResult_std.py
1
2108
#! /usr/bin/env python from openturns import * from math import * TESTPREAMBLE() def printNumericalPoint(point, digits) : oss = "[" eps = pow(0.1, digits) for i in range(point.getDimension()) : if i == 0 : sep = "" else : sep = "," if fabs(point[i]) < eps ...
lgpl-3.0
6,099,109,483,741,794,000
31.9375
107
0.659393
false
fwilson42/irc2
irc2/ircd/channel.py
1
1684
import collections import time from . import utils from .numerics import * from ..utils import join_max_length class Channel: def __init__(self, name): self.name = name self.ts = time.time() self.topic = "haha yes look a topic" self.topic_set_at = time.time() self.topic_bel...
bsd-3-clause
-2,169,495,262,614,063,600
29.618182
102
0.576603
false
USGSDenverPychron/pychron
pychron/image/toupcam/viewer.py
1
4772
# =============================================================================== # Copyright 2015 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/licenses...
apache-2.0
1,978,467,678,381,373,400
33.832117
82
0.551551
false
carletes/libcloud-vagrant
libcloudvagrant/tests/conftest.py
1
3218
# Copyright (c) 2014 Carlos Valiente # # 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, publish, dis...
mit
5,132,755,711,240,102,000
26.741379
79
0.675886
false
LuisMiranda132/FightSimulator
proy3/gabil.py
1
6524
from pyevolve import G1DList from pyevolve import GSimpleGA from pyevolve import G1DBinaryString from pyevolve import Util from pyevolve import Selectors from random import randint as rand_randint, uniform as rand_uniform, choice as rand_choice, randrange as randrange import sys MAX_SET_SIZE = 3 RULE_SIZE = 36 INITIA...
mit
-6,613,592,181,887,477,000
24.584314
114
0.578786
false
gemrb/gemrb
gemrb/GUIScripts/bg2/GUICG15.py
1
3499
# GemRB - Infinity Engine Emulator # Copyright (C) 2003 The GemRB Project # # 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 versi...
gpl-2.0
-2,945,485,312,536,015,400
27.680328
81
0.766505
false
biodec/biodec.recipe.riak
src/biodec/recipe/riak/instance.py
1
5723
# -*- coding: utf-8 -*- # Copyright (C)2012 'Biodec' # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # This program is...
lgpl-3.0
3,816,028,748,366,181,400
32.467836
77
0.580465
false
SushiTee/teerace
teerace/race/south_migrations/0016_auto__add_field_bestrun_ghost_file.py
1
9389
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'BestRun.ghost_file' db.add_column('race_bestrun', 'ghost_file', self.gf('django.db.models....
bsd-3-clause
-35,702,658,502,015,064
75.333333
182
0.545958
false
bitmazk/django-people
people/models.py
1
7856
"""Models for the ``people`` app.""" from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from cms.models.pluginmodel import CMSPlugin from filer.fields.file import FilerFileField from hvad.models import TranslatedFields, Tra...
mit
-6,344,347,272,851,630,000
23.939683
77
0.594323
false
Azure/azure-sdk-for-python
sdk/resources/azure-mgmt-resource/azure/mgmt/resource/policy/v2019_09_01/operations/_policy_set_definitions_operations.py
1
32458
# 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
-3,030,877,944,952,733,700
46.522694
228
0.645727
false
luci/recipes-py
recipe_modules/buildbucket/tests/put.py
2
1701
# Copyright 2017 The LUCI Authors. 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. from PB.go.chromium.org.luci.buildbucket.proto import build as build_pb2 DEPS = [ 'buildbucket', 'properties', 'runtime', ] def RunSteps(...
apache-2.0
-69,716,837,733,866,340
23.652174
75
0.597884
false
mworks/mworks
examples/Examples/FindTheCircle/analysis/Python/selection_counts.py
1
1241
import sys from matplotlib import pyplot import numpy sys.path.insert(0, '/Library/Application Support/MWorks/Scripting/Python') from mworks.data import MWKFile def selection_counts(filename): with MWKFile(filename) as f: r_codec = f.reverse_codec red_code = r_codec['red_selected'] green...
mit
-3,228,629,496,021,222,000
27.860465
78
0.51249
false
brownsr/Cinnamon
files/usr/share/cinnamon/cinnamon-settings/modules/cs_mouse.py
1
6294
#!/usr/bin/env python2 from gi.repository import Gtk, Gdk, GLib from SettingsWidgets import * class Module: comment = _("Control mouse and touchpad settings") name = "mouse" category = "hardware" def __init__(self, content_box): keywords = _("mouse, touchpad, synaptic, double-click") ...
gpl-2.0
-131,770,786,046,751,420
47.790698
178
0.631713
false
t-/gromacs_ligand_param
tools/top2itp/RUNME2.py
1
21522
import numpy as np class merge_dihedrals: def __init__(self,filepath,filelist,dihetype='9',fmerged='merged_dihedrals.itp'): clist=[] for fi in filelist: flist1 = self.read_dihedrals(filepath+fi,t=dihetype) clist=clist+flist1 #print 'processing',fi print '...
gpl-3.0
7,514,140,246,321,269,000
42.216867
240
0.452003
false
andreas-p/admin4
modPg/Function.py
1
3307
# The Admin4 Project # (c) 2013-2014 Andreas Pflug # # Licensed under the Apache License, # see LICENSE.TXT for conditions of usage from _objects import SchemaObject from _pgsql import pgQuery from wh import xlt, YesNo import logger class Function(SchemaObject): typename=xlt("Function") shortname=xlt("Function...
apache-2.0
7,796,791,559,803,237,000
31.742574
149
0.617478
false
Wintermute0110/advanced-emulator-launcher
resources/rom_audit.py
1
46115
# -*- coding: utf-8 -*- # # Advanced Emulator Launcher # # Copyright (c) 2016-2017 Wintermute0110 <wintermute0110@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2 of the L...
gpl-2.0
6,399,298,034,993,082,000
47.286911
122
0.563777
false
glaubitz/fs-uae-debian
launcher/amitools/fs/Repacker.py
1
2618
from __future__ import absolute_import from __future__ import print_function from .ADFSVolume import ADFSVolume from amitools.fs.blkdev.BlkDevFactory import BlkDevFactory class Repacker: def __init__(self, in_image_file, in_options=None): self.in_image_file = in_image_file self.in_options = in_options s...
gpl-2.0
4,303,926,271,777,007,600
30.166667
93
0.643621
false
axeltidemann/self_dot
communication.py
1
1564
#!/usr/bin/python # -*- coding: latin-1 -*- # Copyright 2014 Oeyvind Brandtsegg and Axel Tidemann # # This file is part of [self.] # # [self.] is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 # as published by the Free Software Fou...
gpl-3.0
-1,690,744,494,526,749,700
34.545455
130
0.695652
false
Royal-Society-of-New-Zealand/NZ-ORCID-Hub
orcid_api_v3/models/research_resources_v30.py
1
4928
# coding: utf-8 """ ORCID Member No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: Latest Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import si...
mit
6,569,534,095,213,337,000
28.866667
119
0.581981
false
oldhawaii/oldhawaii-metadata
www/oldhawaii_metadata/apps/users/forms.py
1
6532
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import redirect from flask import request from flask import url_for from flask.ext.wtf import Form as BaseForm from sqlalchemy.orm.exc import MultipleResultsFound from sqlalchemy.orm.exc import NoResultFound from wtforms import fields from wtforms import validat...
mit
-5,542,365,095,312,385,000
28.160714
78
0.641457
false
metamarcdw/metamarket
qtui/send_chanmsg_dialog.py
1
3520
#!/usr/bin/env python # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'send_chanmsg_dialog.ui' # # Created: Wed May 11 01:26:04 2016 # by: PyQt4 UI code generator 4.11.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtC...
mit
-8,277,862,675,880,958,000
45.315789
114
0.716761
false
emanlove/robotframework-selenium2library
src/SeleniumLibrary/keywords/screenshot.py
1
10147
# Copyright 2008-2011 Nokia Networks # Copyright 2011-2016 Ryan Tomac, Ed Manlove and contributors # Copyright 2016- Robot Framework Foundation # # 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 Licens...
apache-2.0
-5,964,730,719,708,307,000
42.549356
104
0.625505
false
Spiderstryder/DCSS-Neural-Net-Agent
DCSSNN_Main.py
1
1284
import cv2 import numpy as np from PIL import ImageGrab def main(): while True: stream = np.array(ImageGrab.grab(bbox=(0, 31, 1024, 751))) cv2.imshow('AI Vision', cv2.cvtColor(stream, cv2.COLOR_BGR2RGB)) if cv2.waitKey(25) & 0xFF == ord('q'): cv2.destroyAllWindows() ...
gpl-3.0
-1,333,826,483,512,910,800
28.181818
84
0.71729
false
voltnor/gp438
src/ned/proc2.py
1
5877
""" Processing. Author: Dave Hale, Colorado School of Mines Version: 2012.05.20 --- Receiver stations: 954 - 1295 ( 954 <=> 0.000) Source stations: 1003 - ???? (1003 <=> 7.350) """ from imports import * s1 = Sampling(4001,0.002,0.000) # time sampling s2 = Sampling(342,0.015,0.000) # receiver sampling (first group at ...
epl-1.0
-1,206,655,710,301,369,000
24.663755
77
0.614259
false
nacx/kahuna
kahuna/session.py
1
2458
#!/usr/bin/env jython import atexit import logging from config import Config from java.util import Properties from org.jclouds import ContextBuilder from org.jclouds.abiquo import AbiquoApiMetadata, AbiquoContext from org.jclouds.logging.slf4j.config import SLF4JLoggingModule from org.jclouds.sshj.config import SshjS...
mit
7,743,021,286,421,032,000
37.40625
77
0.616355
false
aroig/async
async/directories/annex.py
1
20730
#!/usr/bin/env python # -*- coding: utf-8 -*- # # async - A tool to manage and sync different machines # Copyright 2012,2013 Abdó Roig-Maranges <abdo.roig@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # th...
gpl-3.0
9,105,687,875,994,771,000
38.037665
129
0.572531
false
JohnVinyard/zounds
zounds/spectral/weighting.py
1
2857
import numpy as np from .frequencyadaptive import FrequencyAdaptive class FrequencyWeighting(object): def __init__(self): super(FrequencyWeighting, self).__init__() def __numpy_ufunc__(self, *args, **kwargs): raise NotImplementedError() def _wdata(self, scale): return np.ones(len...
mit
-8,583,206,622,282,662,000
34.271605
79
0.563878
false
CospanDesign/sdb
sdb/encoder/encoder.py
1
1326
#! /usr/bin/env python # this file is part of SDB. # # SDB 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. # # SDB is distributed in t...
gpl-2.0
4,868,662,795,525,859,000
31.341463
71
0.677225
false
jirivrany/riskflow123d-post
flowIni/transport.py
1
15980
#!/opt/python/bin/python ''' @author: Jiri Vrany A module for handling flow123d transport output Parses transport_out pos file, takes only non-zero values of concetrations and saves them to json file, also saves list of times (even if all conc at such time was zero). ''' from multiprocessing import Process, Queue, ...
gpl-2.0
-4,437,923,285,083,970,600
29.382129
125
0.545432
false
Eveler/libs
__Python__/ufms_blanks/templates/editor.py
1
21334
# -*- coding: utf-8 -*- import json from json.decoder import WHITESPACE import logging from traceback import print_exc try: # from PyQt5.Qt import (QMainWindow, QApplication, QFileDialog, QToolBar, QWidget, QVBoxLayout, QTextEdit, QTimer, # QLabel, QColor, QByteArray, QBuffer, QPixmap, QBoxLayout, QPainter, QP...
gpl-3.0
5,254,551,033,503,943,000
37.737615
122
0.506158
false
CrowdEmotion/crowdemotion-api-clients-examples
python/crowdemotion_api_client_python/apis/research_api.py
1
24008
# coding: utf-8 """ CloudEmotion API v1 CrowdEmotion API OpenAPI spec version: 1.1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You ...
mit
6,895,661,252,991,409,000
39.727891
150
0.552447
false
tymofij/adofex
transifex/resources/tests/lib/base.py
1
5917
# -*- coding: utf-8 -*- from __future__ import with_statement from mock import patch import os import logging from django.conf import settings from django.utils.hashcompat import md5_constructor from transifex.txcommon.tests import base from transifex.resources.formats.compilation import \ NormalDecoratorBuilde...
gpl-3.0
-7,842,665,203,933,623,000
38.446667
85
0.641372
false
sadmansk/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorselenium.py
1
13993
import json import os import socket import threading import traceback import urlparse import uuid from .base import (CallbackHandler, RefTestExecutor, RefTestImplementation, TestharnessExecutor, extra_timeout, strip_server) ...
mpl-2.0
6,949,301,740,680,533,000
34.787724
96
0.597513
false
lizardsystem/lizard-htmlreport
lizard_htmlreport/migrations/0003_auto__del_field_generatedreport_dataset__add_field_generatedreport_dat.py
1
8524
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'GeneratedReport.dataset' db.delete_column('lizard_htmlreport_generatedreport', 'dataset_...
gpl-3.0
7,115,927,551,136,286,000
68.868852
203
0.564641
false
felixbb/forseti-security
tests/common/data_access/csv_writer_test.py
1
1826
# Copyright 2017 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 or agreed to in writing, s...
apache-2.0
-8,956,042,327,688,226,000
35.52
74
0.676889
false
sckott/pytaxize
pytaxize/gn/gni.py
1
1679
import sys import requests import json from pytaxize.refactor import Refactor class NoResultException(Exception): pass def parse(names): """ Uses the Global Names Index to parse scientific names :param names: List of scientific names. Usage:: from pytaxize import gn gn.gni...
mit
-9,037,382,266,054,791,000
23.333333
77
0.62299
false
neudesk/neucloud
openstack_dashboard/dashboards/admin/flavors/tables.py
1
3841
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
-8,237,139,014,634,401,000
31.82906
78
0.631606
false
olix0r/pub
lib/client/register_key.py
1
1804
import os, sys from twisted.internet.defer import inlineCallbacks, returnValue from twisted.plugin import IPlugin from twisted.python.filepath import FilePath from twisted.python.usage import UsageError from zope.interface import implements from jersey import log from pub.client import cli from pub.crypto import Ke...
bsd-3-clause
432,916,004,201,920,600
21.835443
69
0.587583
false
dc3-plaso/plaso
tests/analysis/viper.py
1
4399
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the Viper analysis plugin.""" import unittest import mock from dfvfs.path import fake_path_spec from plaso.analysis import viper from plaso.lib import timelib from plaso.parsers import pe from tests.analysis import test_lib class MockResponse(dict): """A mo...
apache-2.0
8,998,042,666,297,747,000
29.762238
79
0.668561
false
emccode/HeliosBurn
heliosburn/django/hbproject/api/views/auth.py
1
1878
import json import hashlib import logging import os from django.http import HttpResponse, HttpResponseBadRequest from django.views.decorators.csrf import csrf_exempt from django.conf import settings from api.models import db_model logger = logging.getLogger(__name__) @csrf_exempt def login(request): """ Auth...
mit
5,699,081,220,727,780,000
33.145455
105
0.625666
false
ferriman/SSandSP
raspberrypi/egocentricPanel.py
1
1082
import time from twython import TwythonStreamer import subprocess def say(words): devnull = open("/dev/null","w") subprocess.call(["espeak","-v", "en-rp",words],stderr=devnull) def showinpanel(): devnull = open("/dev/null","w") subprocess.call(["sudo","./rpi-rgb-led-matrix-master/led-matrix","-p","2","-D","1","-t...
gpl-3.0
366,088,186,372,964,700
26.74359
125
0.655268
false
HexaMonkey/hexamonkey
test/resources/parser/test_msgpack.py
1
1831
import msgpack, math with open("test_msgpack.msgpack", 'w') as f: def write(str): f.write(str) def dump(item, **kwargs): msgpack.dump(item, f, **kwargs) def dumpList(list): for item in list: dump(item) write(b"\xdc\x00\x24"); dumpList([None,...
gpl-2.0
-3,161,185,039,400,671,000
18.902174
98
0.506827
false
optimamodel/Optima
server/webapp/dbmodels.py
1
7577
import os #from flask_restful_swagger import swagger from sqlalchemy import text from sqlalchemy.dialects.postgresql import UUID from sqlalchemy.dialects.postgresql import JSON import optima as op from .dbconn import db, redis #@swagger.model class UserDb(db.Model): __tablename__ = 'users' id = db.Column(UU...
lgpl-3.0
8,831,208,499,364,056,000
34.577465
102
0.634024
false
fredmorcos/attic
projects/plantmaker/archive/20100520/src/utils.py
1
1766
import math from schedule import Schedule def parseSolutions(solutions, plant, orderList): parsedSolutions = [] for solution in solutions: solutionItems = solution.items() schedule = Schedule() for item in solutionItems: if "enter" in item[0]: parsedItem = item[0].split("-") order = orderList.orderF...
isc
1,680,595,651,206,730,000
26.169231
65
0.686297
false
TresysTechnology/setools
tests/policyrep/mls.py
1
30650
# Copyright 2015, Tresys Technology, LLC # # This file is part of SETools. # # SETools 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. ...
lgpl-2.1
-5,423,022,946,715,485,000
38.244558
100
0.592365
false
olivierverdier/sfepy
sfepy/physics/potentials.py
1
3446
""" Classes for constructing potentials of atoms and molecules. """ from sfepy.base.base import * from sfepy.linalg import norm_l2_along_axis class CompoundPotential(Container): """ Sum of several potentials. """ def __init__(self, objs=None): Container.__init__(self, objs=objs) self....
bsd-3-clause
-7,074,944,824,542,105,000
21.522876
78
0.54585
false
surgebiswas/poker
PokerBots_2017/Johnny/keras/applications/xception.py
2
10377
# -*- coding: utf-8 -*- """Xception V1 model for Keras. On ImageNet, this model gets to a top-1 validation accuracy of 0.790 and a top-5 validation accuracy of 0.945. Do note that the input image format for this model is different than for the VGG16 and ResNet models (299x299 instead of 224x224), and that the input p...
mit
1,069,713,095,376,036,900
43.536481
151
0.620989
false
c3nav/c3nav
src/c3nav/mapdata/utils/index.py
1
1897
import operator from functools import reduce from django.core import checks from shapely import speedups if speedups.available: speedups.enable() try: import rtree except OSError: rtree_index = False class Index: def __init__(self): self.objects = {} def insert(self, va...
apache-2.0
5,152,785,575,294,487,000
26.1
106
0.555087
false
atugushev/django-simple-settings
setup.py
1
1443
import os import re from setuptools import setup VERSION = re.search( r"VERSION\s*=\s*['\"](.*)['\"]", open(os.path.join(os.path.dirname(__file__), 'simple_settings', '__init__.py')).read() ).group(1) README = open(os.path.join(os.path.dirname(__file__), 'README.rst')).read() # allow setup.py to be run from ...
mit
4,488,668,001,902,991,000
33.357143
90
0.619543
false
haoyutan/MSA-Framework
modules/msa/msa/contrib/master/authentication.py
1
1199
from rest_framework import exceptions from rest_framework.authentication import ( get_authorization_header, BaseAuthentication, ) from .models import MicroService class MicroServiceSecretAuthentication(BaseAuthentication): def authenticate(self, request): auth = get_authorization_header(request).spl...
mit
-5,470,964,627,476,039,000
32.305556
84
0.673895
false
masayukig/tempest
tempest/tests/lib/cli/test_execute.py
1
6396
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
apache-2.0
8,490,711,824,259,044,000
41.357616
78
0.603346
false
ornotermes/WebLights
effects/Christmas.py
1
1135
# #+ Copyright (c) 2014, 2015 Rikard Lindstrom <ornotermes@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
gpl-3.0
7,070,983,920,460,769,000
28.102564
71
0.62467
false
JKarathiya/Lean
Algorithm.Python/CustomDataUsingMapFileRegressionAlgorithm.py
1
4658
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Lice...
apache-2.0
-5,567,616,709,043,004,000
43.352381
147
0.691796
false
docileninja/CTF-Tools
scheduler/scheduler.py
1
1263
import requests as r import threading from functools import wraps import os import json _tasks = [] ips = [] omitted = [] #list of names of skipped exploits def info(s): print('[*] {}'.format(s)) def warn(s): print('[-] {}'.format(s)) def schedule(func): @wraps(func) def task_func(ip): flag = func(ip) if fl...
gpl-2.0
-6,046,373,756,138,118,000
25.3125
96
0.656374
false
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/test/test_asyncio/test_sendfile.py
1
20141
"""Tests for sendfile functionality.""" import asyncio import os import socket import sys import tempfile import unittest from asyncio import base_events from asyncio import constants from unittest import mock from test import support from test.test_asyncio import utils as test_utils try: import ssl except Import...
apache-2.0
7,076,000,672,156,794,000
35.29009
78
0.613574
false
54lihaoxin/leetcode_python
src/ClimbStairs/test_suite.py
1
1536
import sys from solution import Solution # from classes import ? class TestSuite: def run(self): self.test000() self.test001() self.test002() self.test003() self.test004() def test000(self): print 'test 000\n' ...
apache-2.0
-3,947,825,580,929,355,300
17.717949
37
0.416667
false
Universal-Model-Converter/UMC3.0a
data/Python/x86/Lib/site-packages/OpenGL/GLU/glunurbs.py
1
10429
"""Implementation of GLU Nurbs structure and callback methods Same basic pattern as seen with the gluTess* functions, just need to add some bookkeeping to the structure class so that we can keep the Python function references alive during the calling process. """ from OpenGL.raw import GLU as simple from OpenGL import...
mit
-4,510,473,603,208,233,000
35.337979
106
0.636111
false
odty101/MediaCollector
MediaCollector/MediaCollector/settings.py
1
3199
""" Django settings for MediaCollector project. Generated by 'django-admin startproject' using Django 1.10.3. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ im...
mit
8,056,945,365,130,964,000
24.798387
91
0.687402
false
ocelot-inc/tarantool
test/box-py/iproto.test.py
1
9376
import os import sys import struct import socket import msgpack from tarantool.const import * from tarantool import Connection from tarantool.request import Request, RequestInsert, RequestSelect from tarantool.response import Response from lib.tarantool_connection import TarantoolConnection admin("box.schema.user.gran...
bsd-2-clause
-1,622,080,474,523,970,000
30.253333
84
0.632999
false
AliShug/RoboVis
robovis/load_histogram.py
1
3645
import numpy as np # from matplotlib import pyplot as plt from PyQt5.QtWidgets import * from PyQt5.QtCore import * from PyQt5.QtGui import * class RVLoadHistogram(QGraphicsView): '''A histogram for the maximum load across the reachable area''' def __init__(self, ik): width = 330 height = 120 ...
mit
-5,331,397,275,199,806,000
32.136364
96
0.584362
false
ErickMurillo/aprocacaho
aprocacaho/settings.py
1
3231
""" Django settings for aprocacaho project. Generated by 'django-admin startproject' using Django 1.9.4. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ from loca...
mit
-6,922,736,693,737,744,000
28.642202
91
0.692355
false
asterisk/asterisk_rest_libraries
lib/javascript.py
1
5168
#!/usr/bin/env python """ Copyright (C) 2013 Digium, Inc. Erin Spiceland <espiceland@digium.com> See http://www.asterisk.org for more information about the Asterisk project. Please do not directly contact any of the maintainers of this project for assistance; the project provides a web site, mailing lists and IRC cha...
bsd-3-clause
2,504,914,704,043,261,400
30.512195
78
0.623839
false
kxz/interstat
interstat/formatters.py
1
6274
"""Interstat's core single-line and whole-file formatters.""" from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import * from datetime import datetime from itertools import tee import re from jinja2 import Environment, ChoiceLoader, FileSystem...
mit
7,675,466,667,183,133,000
37.024242
77
0.591967
false
sklam/llvmlite
llvmlite/binding/executionengine.py
1
5466
from __future__ import print_function, absolute_import from ctypes import byref, POINTER, c_char_p, c_bool, c_uint, c_void_p from . import ffi, targets # Just check these weren't optimized out of the DLL. ffi.lib.LLVMPY_LinkInJIT ffi.lib.LLVMPY_LinkInMCJIT def create_jit_compiler(module, opt=2): """Create an Ex...
bsd-2-clause
5,138,272,336,224,354,000
29.536313
78
0.637578
false