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
synth3tk/the-blue-alliance
controllers/api/api_district_controller.py
1
7325
import json import webapp2 from controllers.api.api_base_controller import ApiBaseController from consts.district_type import DistrictType from consts.event_type import EventType from datetime import datetime from database.event_query import DistrictEventsQuery from google.appengine.ext import ndb from database.tea...
mit
9,133,785,129,898,404,000
38.594595
156
0.658294
false
PostCenter/botlang
botlang/parser/s_expressions.py
1
8935
import ast as python_ast from botlang.ast.ast import * class SExpression(object): """ https://en.wikipedia.org/wiki/S-expression """ OPENING_PARENS = ['(', '[', '{'] CLOSING_PARENS = [')', ']', '}'] def to_ast(self): raise NotImplementedError def accept(self, visitor): ra...
mit
-6,733,622,686,020,938,000
22.637566
76
0.545943
false
Flamacue/pretix
src/tests/presale/test_organizer_page.py
2
2634
from datetime import timedelta import pytest from django.utils.timezone import now from pretix.base.models import Event, Organizer @pytest.fixture def env(): o = Organizer.objects.create(name='MRMCD e.V.', slug='mrmcd') event = Event.objects.create( organizer=o, name='MRMCD2015', slug='2015', ...
apache-2.0
-9,136,829,961,403,215,000
26.154639
66
0.649962
false
myyyy/wiki
learn/selenium/test_sensorcmd.py
1
1183
# -*- coding:utf-8 -*- from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.action_chains import ActionChains import time import sys reload(sys) sys.setdefaultencoding('utf-8') driver = webdriver.Chrome() driver.get("http://bk47.thunics.org:8888/login?next=/plat"...
mit
-7,917,124,765,778,914,000
29.783784
69
0.755048
false
drulang/foxleaf
server/server/settings.py
1
2308
""" Django settings for server project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) imp...
gpl-2.0
-5,230,758,876,941,882,000
22.313131
71
0.717071
false
googleapis/googleapis-gen
google/cloud/iot/v1/iot-v1-py/google/cloud/iot_v1/types/__init__.py
1
3122
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-418,746,509,503,978,800
26.875
74
0.740231
false
BRiAl/BRiAl
sage-brial/brial/simplebb.py
1
2128
from .PyPolyBoRi import * from .interred import interred def buchberger(l): "calculates a (non minimal) Groebner basis" l = interred(l) #for making sure, that every polynomial has a different leading term #needed for add_generator if not l: return [] g = GroebnerStrategy(l[0].ring()) ...
gpl-2.0
5,377,038,491,770,049,000
28.555556
74
0.593045
false
robcarver17/pysystemtrade
sysproduction/reporting/trades_report.py
1
16443
from copy import copy from collections import namedtuple import datetime import numpy as np import pandas as pd from syscore.genutils import transfer_object_attributes from syscore.pdutils import make_df_from_list_of_named_tuple from syscore.objects import header, table, body_text, arg_not_supplied, missing_data fro...
gpl-3.0
-6,562,554,001,399,663,000
26.775338
92
0.593018
false
globocom/database-as-a-service
dbaas/maintenance/async_jobs/base.py
1
5453
from copy import copy from notification.models import TaskHistory from util import get_worker_name from workflow.workflow import steps_for_instances, rollback_for_instances_full __all__ = ('BaseJob',) class BaseJob(object): step_manger_class = None get_steps_method = None success_msg = '' error_msg...
bsd-3-clause
-4,363,220,306,400,859,000
35.844595
79
0.585366
false
hovo1990/deviser
generator/bindings_files/DowncastPackagesFile.py
1
16916
#!/usr/bin/env python # # @file DowncastPackagesFile.py # @brief class for generating downcast packages file # @author Frank Bergmann # @author Sarah Keating # # <!-------------------------------------------------------------------------- # # Copyright (c) 2013-2015 by the California Institute of Technology # (C...
lgpl-2.1
-2,038,758,559,390,291,500
42.937662
81
0.539135
false
jensv/fluxtubestability
external_stability.py
1
5083
# -*- coding: utf-8 -*- """ Created on Mon Sep 08 20:42:30 2014 @author: Jens von der Linden Calculate dW and determine external stability. """ from __future__ import print_function from __future__ import division from __future__ import absolute_import from future.builtins import (ascii, bytes, chr, dict, filter, he...
mit
-331,985,213,792,842,400
29.437126
79
0.540429
false
marcosbontempo/algar
workspace/pcef/diameter/libDiameter.py
1
28177
#!/usr/bin/env python ################################################################## # Copyright (c) 2012, Sergej Srepfler <sergej.srepfler@gmail.com> # February 2012 - Nov 2012 # Version 0.3.1, Last change on Nov 17, 2012 # This software is distributed under the terms of BSD license. ##########################...
gpl-2.0
9,170,383,060,501,169,000
32.664277
105
0.566065
false
jacobmetrick/Flexget
flexget/plugins/internal/urlrewriting.py
1
4917
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import logging from flexget import plugin from flexget.event import event log = logging.getLogger('urlrewriter') class UrlRewritingError(Exception): def __init__(s...
mit
-4,990,742,627,879,474,000
38.97561
110
0.564979
false
SuperTux/flexlay
text_editor/highlighters/highlighter.py
1
3157
# Flexlay - A Generic 2D Game Editor # Copyright (C) 2015 Karkus476 <karkus476@yahoo.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)...
gpl-3.0
2,754,940,423,649,126,400
34.077778
71
0.605322
false
amenonsen/ansible
lib/ansible/modules/network/fortios/fortios_system_replacemsg_image.py
1
9636
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # 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 Lic...
gpl-3.0
7,136,086,628,521,580,000
28.558282
107
0.595475
false
matrix-org/synapse
synapse/config/server.py
1
56774
# Copyright 2014-2016 OpenMarket Ltd # Copyright 2017-2018 New Vector Ltd # Copyright 2019 The Matrix.org Foundation C.I.C. # # 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-2.0
-8,277,472,441,097,090,000
38.841404
104
0.599993
false
openstack/nova-solver-scheduler
nova_solverscheduler/tests/scheduler/solvers/test_solvers.py
1
3383
# Copyright (c) 2014 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 r...
apache-2.0
-1,885,574,219,722,357,000
39.27381
78
0.71209
false
czchen/cppman
cppman/formatter/cppreference.py
1
11978
# -*- coding: utf-8 -*- # # formatter.py - format html from cplusplus.com to groff syntax # # Copyright (C) 2010 - 2015 Wei-Ning Huang (AZ) <aitjcize@gmail.com> # All Rights reserved. # # This file is part of cppman. # # This program is free software; you can redistribute it and/or modify # it under the terms of the G...
gpl-3.0
-7,802,305,860,583,029,000
35.518293
85
0.506595
false
radjkarl/fancyTools
fancytools/fcollections/TwoDArraySliceIterator.py
1
1824
# coding=utf-8 from __future__ import division class TwoDArraySliceIterator(object): """ a simple iterator that build small slices from a big array >>> import numpy as np >>> arr = np.random.rand(100,100) >>> n_pieces = (2,4) >>> i = TwoDArraySliceIterator( arr.shape, n_pieces ) than i...
gpl-3.0
-7,601,669,127,951,315,000
24.333333
62
0.506579
false
tago-io/tago-python
tago/account/plan.py
1
1281
import requests # Used to make HTTP requests import json # Used to parse JSON import os # Used to infer environment variables API_TAGO = os.environ.get('TAGO_API') or 'https://api.tago.io' REALTIME = os.environ.get('TAGO_REALTIME') or 'https://realtime.tago.io' class Plan: def __init__(self, acc_token): sel...
mit
7,042,328,090,365,870,000
41.7
152
0.722092
false
kushG/osf.io
website/addons/s3/routes.py
1
1822
from framework.routing import Rule, json_renderer from website.addons.s3 import views settings_routes = { 'rules': [ Rule( [ '/project/<pid>/s3/newbucket/', '/project/<pid>/node/<nid>/s3/newbucket/', ], 'post', views.crud.cre...
apache-2.0
-793,094,058,685,847,200
25.405797
60
0.407245
false
eirmag/weboob
modules/societegenerale/pages/login.py
1
2921
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Jocelyn Jaubert # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
agpl-3.0
-8,890,756,489,859,032,000
32.965116
97
0.639849
false
hyde/hyde
tests/ext/test_sass.py
1
1430
# -*- coding: utf-8 -*- """ Use nose `$ pip install nose` `$ nosetests` """ from hyde.generator import Generator from hyde.site import Site from fswrap import File, Folder from util import assert_no_diff SCSS_SOURCE = File(__file__).parent.child_folder('scss') TEST_SITE = File(__file__).parent.parent.child_folder('_...
mit
161,853,854,422,888,540
28.791667
79
0.613287
false
btovar/autopyfactory
autopyfactory/plugins/queue/batchsubmit/CondorEC2.py
1
11034
#!/bin/env python # # AutoPyfactory batch plugin for Condor # from CondorBase import CondorBase from autopyfactory import jsd from autopyfactory.condor import killids, mincondorversion import subprocess import time import commands import logging import traceback #mincondorversion(8,1,1) class CondorEC2(CondorBase)...
apache-2.0
-7,728,521,285,141,547,000
44.784232
135
0.542958
false
daira/zcash
qa/rpc-tests/finalsaplingroot.py
3
10025
#!/usr/bin/env python3 # Copyright (c) 2018 The Zcash developers # Distributed under the MIT software license, see the accompanying # file COPYING or https://www.opensource.org/licenses/mit-license.php . from test_framework.test_framework import BitcoinTestFramework from test_framework.util import ( assert_equal,...
mit
1,170,812,582,823,440,100
47.429952
128
0.653267
false
shauryachats/codechef
codechef/contest.py
1
4271
from utils import * import json import datetime import time from BeautifulSoup import BeautifulSoup import logging def getContestInList(contestList, present, past, future): bucket = [] if future: bucket += contestList['future'] if present: bucket += contestList['present'] if past: ...
mit
-1,368,864,087,390,014,000
32.637795
135
0.620464
false
zaqwes8811/matlab_ext
identification/tests/test-dfilters.py
1
1166
# coding: utf-8 """ Характеристики для цифрового фильтра """ # Other from pylab import * from numpy import arange from numpy import ones # App from visualisers import mfreqz from visualisers import impz from iir_models.iir_digital import calc_digital_characteristics if __name__=='__main__': mean_params = ...
apache-2.0
-3,083,217,678,609,390,600
20.377358
86
0.590468
false
zkan/intern-checklist
docs/conf.py
1
7864
# -*- coding: utf-8 -*- # # Intern Checklist documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration valu...
bsd-3-clause
8,210,602,970,106,798,000
31.097959
80
0.698245
false
sridevikoushik31/nova
nova/db/mysqldb/instance_metadata.py
1
1820
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2013 Rackspace Hosting # 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.apac...
apache-2.0
1,250,801,677,011,324,400
36.916667
78
0.643956
false
h4ck3rm1k3/FEC-Field-Documentation
fec/version/v2/SH1.py
1
2170
import fechbase class Records(fechbase.RecordsBase): def __init__(self): fechbase.RecordsBase.__init__(self) self.fields = [ {'name': 'FORM TYPE', 'number': '1'}, {'name': 'FILER FEC CMTE ID', 'number': '2'}, {'name': 'NAT PARTY COMMITTEES %', 'number': '3'}, ...
unlicense
-168,832,545,269,836,580
56.105263
75
0.477419
false
tomleo/djqna
djqna/forum/tests.py
1
3736
from django.test import TestCase from django.contrib.auth.models import User from django.core.urlresolvers import reverse from .models import Question, Answer, Vote from .views import questions, question, answers, answer def make_users(n): return { 'u%s' % i: User(first_name='fn%s' % i, ...
gpl-3.0
6,163,236,046,892,313,000
36.737374
104
0.627677
false
edgedb/edgedb
docs/conf.py
1
9624
# -*- coding: utf-8 -*- # # EdgeDB documentation build configuration file, created by # sphinx-quickstart on Wed Aug 3 17:58:14 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
apache-2.0
8,664,072,637,096,982,000
30.554098
79
0.695761
false
rcgee/oq-hazardlib
openquake/hazardlib/tests/geo/surface/gc2_test.py
1
12206
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # The Hazard Library # Copyright (C) 2013-2016 GEM Foundation # # 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 ...
agpl-3.0
8,594,448,369,396,380,000
36.789474
79
0.584794
false
yuantw/DataCollecting
spider/SpiderQYer.py
1
6919
#!/usr/bin/python # -*- coding: utf-8 -*- ''' @author: Tengwei Yuan 1. Get all links of summary pages - from start search page result 2. From each summary page get all links of detail product pages 3. From each detail product page get basic information and the number of review pages 4. From each review page get review ...
mit
8,851,705,568,924,844,000
26.486056
117
0.630816
false
kernsuite-debian/obit
python/testObit.py
1
1061
import OErr, OSystem, Image, InfoList, FArray err=OErr.OErr() ObitSys=OSystem.OSystem ("Python", 1, 103, 1, ["None"], 1, ["../PythonData/"], 1, 0, err) OErr.printErrMsg(err, "Error with Obit startup") # for debugging #OErr.Bomb() list = InfoList.InfoList(); dim = [1,0,0,0,0] InfoList.PPutLong (list, "longItem", dim,...
gpl-2.0
7,167,062,497,883,381,000
24.261905
89
0.70311
false
zlsun/XX-Net
code/default/smart_router/local/pipe_socks.py
1
7876
import threading import select import time import utils import global_var as g from xlog import getLogger xlog = getLogger("smart_router") class PipeSocks(object): def __init__(self, buf_size=16*1024): self.buf_size = buf_size self.sock_dict = {} self.read_set = [] self.write_se...
bsd-2-clause
8,271,000,328,040,894,000
31.020325
107
0.405663
false
SEL-Columbia/commcare-hq
corehq/apps/hqwebapp/templatetags/hq_shared_tags.py
1
6328
from datetime import datetime, timedelta import json from django import template from django.conf import settings from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils.datastructures import SortedDict from django.utils.safestring import mark_safe from django....
bsd-3-clause
6,498,541,805,005,537,000
26.633188
119
0.649494
false
onedata/helpers
test/integration/key_value_canonical_test_base.py
1
10786
"""This module contains test for KeyValue helpers with canonical paths and blockSize set to 0.""" __author__ = "Bartek Kryza" __copyright__ = """(C) 2019 ACK CYFRONET AGH, This software is released under the MIT license cited in 'LICENSE.txt'.""" from test_common import * from common_test_base import * from posix_...
mit
-6,070,383,453,461,788,000
32.08589
97
0.613295
false
versae/DH2304
data/arts1.py
1
1038
import numpy as np import pandas as pd arts = pd.DataFrame() # Clean the dates so you only see numbers. def clean_years(value): result = value chars_to_replace = ["c.", "©", ", CARCC", "no date", "n.d.", " SODRAC", ", CA", " CARCC", ""] chars_to_split = ["-", "/"] if isinstance(result, str): ...
mit
6,705,441,532,649,155,000
27.805556
122
0.586307
false
openstates/openstates
openstates/nh/bills.py
1
15203
import re import datetime as dt from collections import defaultdict import pytz from pupa.scrape import Scraper, Bill, VoteEvent as Vote from openstates.nh.legacyBills import NHLegacyBillScraper body_code = {"lower": "H", "upper": "S"} bill_type_map = { "B": "bill", "R": "resolution", "CR": "concurrent ...
gpl-3.0
2,210,391,430,675,251,500
36.445813
109
0.485036
false
jrjang/mbed
workspace_tools/export/__init__.py
1
7502
""" mbed SDK Copyright (c) 2011-2013 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 wr...
apache-2.0
-2,033,997,486,222,120,000
37.081218
203
0.6237
false
dafrito/trac-mirror
trac/mimeview/rst.py
1
11299
# -*- coding: utf-8 -*- # # Copyright (C) 2004-2009 Edgewall Software # Copyright (C) 2004 Oliver Rutherfurd # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wi...
bsd-3-clause
9,153,874,119,046,492,000
39.209964
80
0.589167
false
arne-cl/alt-mulig
elasticsearch/generate_json_documents.py
1
21510
#!/usr/bin/env python # -*- coding: utf-8 -*- # original author: Marko Drotschmann # changes: Arne Neumann import json import hashlib ''' # an example document for a 'celebrity' { # Alter "age": , # ausgedachtes Rating von 1.0 bis 5.0 "rating": 0.0, # Geburtstag, Format yyyy-mm-dd "birthday": "", # Vorname "firstnam...
gpl-3.0
-5,353,777,207,924,947,000
37.677716
82
0.7515
false
hootnot/postcode-api-wrapper
postcodepy/postcodepy.py
1
8659
"""Postcode API module.""" import json import requests class EndpointsMixin(object): """EndpointsMixin - API endpoints for the API class. each endpoint of the API has a representative method in EndpointsMixin Parameters that apply to the API url just need to be passed as a keyword argument. """ ...
mit
-2,491,037,702,951,134,700
33.7751
95
0.577665
false
rstebbing/powerlifting-meet-manager
table.py
1
24349
########################################## # File: table.py # # Copyright Richard Stebbing 2014. # # Distributed under the MIT License. # # (See accompany file LICENSE or copy at # # http://opensource.org/licenses/MIT) # ########################################## # Imports from PyQ...
mit
-6,845,737,173,238,908,000
29.023428
81
0.54877
false
gnufede/sqjobs
sqjobs/brokers/base.py
1
1413
from abc import ABCMeta, abstractmethod from six import add_metaclass from uuid import uuid4 @add_metaclass(ABCMeta) class Broker(object): @abstractmethod def add_job(self, job_class, *args, **kwargs): """ Add a job to the broker :param job_class: python class of the payload job ...
bsd-3-clause
-1,563,097,627,087,554,800
30.4
77
0.632696
false
fparrel/vigicrues_tools
chcantabrico_scrap.py
1
1262
#!/usr/bin/env python import json import requests import datetime from serialize import saveValues, loadStations from chcantabrico_get_stations import getFlow4Level def parseLine(line): d, v = line.split(';') return datetime.datetime.strptime(d,"%d/%m/%Y %H:%M:%S"),float(v) def main(): flow4level_updated...
gpl-3.0
6,565,035,455,773,232,000
33.108108
104
0.639461
false
FabianWe/foodle
foodle/foodle_polls/filters.py
1
1306
# The MIT License (MIT) # # Copyright (c) 2016 Fabian Wenzelmann <fabianwenzelmann@posteo.de> # # 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 limitati...
mit
-8,735,106,766,333,132,000
42.533333
80
0.779479
false
valentin-krasontovitsch/ansible
lib/ansible/playbook/base.py
1
25893
# Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import itertools import oper...
gpl-3.0
-870,057,588,751,126,500
40.628617
153
0.551655
false
Jaesin/OctoPrint
tests/plugin/test_core.py
1
12641
import unittest import mock import ddt import octoprint.plugin import octoprint.plugin.core ##~~ Helpers for testing mixin type extraction class A(object): pass class A_1(A): pass class A_2(A): pass class A_3(A): pass class A1_1(A_1): pass class B(object): pass class B_1(B): pass class C(object)...
agpl-3.0
-687,299,191,354,298,600
36.960961
147
0.730638
false
ironmagma/pumpkinpy
gentests.py
1
6418
# Legal boring crap follows. In simple english, you can use this # code in your own project, be your project commercial or free. # Just be sure to include the license and stuff. The "copyright" # here is just for technical reasons. # # Copyright 2011, Philip Peterson. # # This file is part of Pumpkinpy. # # Pumpkinpy ...
gpl-3.0
8,480,880,373,297,608,000
27.026201
129
0.581178
false
genialis/resolwe
resolwe/permissions/tests/test_data.py
1
16467
# pylint: disable=missing-docstring import shutil import unittest from datetime import timedelta from django.utils.timezone import now from guardian.shortcuts import remove_perm from rest_framework import exceptions, status from resolwe.flow.models import Collection, Data from resolwe.flow.serializers import Contrib...
apache-2.0
-7,378,601,748,642,533,000
35.350993
92
0.569381
false
babyliynfg/cross
tools/project-creator/Python2.6.6/Lib/test/test_site.py
1
10065
"""Tests for 'site'. Tests assume the initial paths in sys.path once the interpreter has begun executing have not been removed. """ import unittest from test.test_support import TestSkipped, run_unittest, TESTFN, EnvironmentVarGuard import __builtin__ import os import sys import encodings import subproces...
mit
8,762,692,940,380,901,000
36.269962
84
0.582216
false
Hybrid-Cloud/badam
patches_tool/aws_patch/aws_deps/libcloud/test/compute/test_ecp.py
1
5290
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not ...
apache-2.0
-9,108,211,097,120,088,000
38.381679
120
0.63535
false
yishayv/lyacorr
bins_3d.py
1
6348
import numpy as np from flux_accumulator import AccumulatorBase class Bins3D(AccumulatorBase): def __init__(self, dims, ranges, ar_existing_data=None, filename=''): """ :param dims: the shape of the bins :param ranges: a 2-by-3 array representing the minimum and maximum ranges of the 3 co...
mit
7,669,056,047,634,645,000
35.274286
102
0.571991
false
thefactory/marathon-logger
stores.py
1
1282
import collections import logging import logging.handlers import urlparse class InMemoryStore(object): def __init__(self, url): qa = urlparse.parse_qs(url.query) max_length = int(qa.get('max_length', ['100'])[0]) print 'Configuring in-memory store with {settings}'.format(settings={"max_l...
mit
-1,999,994,656,430,669,800
26.891304
110
0.641186
false
TobiasNils/python-seabreeze
seabreeze/pyseabreeze/interfaces/nonlinearity.py
1
1329
from .common import SeaBreezeError, get_pyseabreeze_decorator from .eeprom import EEPromFeature from .communication import USBCommOBP import struct convert_exceptions = get_pyseabreeze_decorator('interfaces.nonlinearity') class NonlinearityCoefficientsEEPromFeature(EEPromFeature): def has_nonlinearity_coeffs_...
mit
2,730,541,682,065,142,300
31.414634
75
0.674944
false
damix911/flask-bees
bees/bees.py
1
8469
from flask import jsonify, request, Response from pkg_resources import resource_string from jinja2 import Template try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse _sessions = {} def _bind(func): def f(): try: data = request.get_data() ...
mit
-5,643,322,122,070,927,000
25.632075
127
0.516236
false
googleapis/googleapis-gen
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/resources/types/ad_group_criterion.py
1
19851
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
7,287,281,758,435,695,000
34.639138
130
0.615939
false
elthariel/dff
api/taskmanager/scheduler.py
1
2094
# DFF -- An Open Source Digital Forensics Framework # Copyright (C) 2009-2010 ArxSys # This program is free software, distributed under the terms of # the GNU General Public License Version 2. See the LICENSE file # at the top of the source tree. # # See http://www.digital-forensic.org for more information about this...
gpl-2.0
-5,724,887,189,141,149,000
24.228916
69
0.694842
false
acdh-oeaw/dig_ed_cat
editions/gexf.py
1
2221
import lxml.etree as ET gexf_doc = """ <gexf xmlns="http://www.gexf.net/1.2draft" version="1.2"> <meta lastmodifieddate="{}"> <creator>https://dig-ed-cat.acdh.oeaw.ac.at</creator> <description>The dig-ed-cat-net</description> </meta> <graph defaultedgetype="directed"> <attributes cl...
mit
4,560,908,193,529,713,700
30.728571
76
0.60018
false
PolicyStat/selenium-old
py/selenium/webdriver/firefox/webdriver.py
1
4132
# Copyright 2008-2009 WebDriver committers # Copyright 2008-2009 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 requ...
apache-2.0
-7,566,230,301,118,693,000
37.981132
82
0.656825
false
RAPD/RAPD
src/plugins/subcontractors/aimless.py
1
39406
"""Functions for parsing aimless logs""" """ This file is part of RAPD Copyright (C) 2017, Cornell University All rights reserved. RAPD 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, version 3. RAPD is...
agpl-3.0
-3,794,603,102,263,967,000
36.926853
96
0.371593
false
amarlearning/InternetBots
Internet Bots/InstaFollowerHike.py
1
4950
# Importing all library that are used! from random import randint from selenium import webdriver from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait import time def main(): # Yeah, I know it consumes a lot of RAM. # But still i don't know why i always use th...
mit
-376,612,834,524,541,100
40.307692
126
0.702222
false
Hackplayers/Empire-mod-Hpys-tests
lib/modules/powershell/privesc/sherlock.py
1
3385
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): # metadata info about the module, not modified during runtime self.info = { # name for the module that will appear in module menus 'Name': 'Sherlock', # list of one or more a...
bsd-3-clause
5,871,520,895,381,051,000
33.540816
97
0.558346
false
tweakoz/micro_ork
ork.build/scripts/ork/build/localopts.py
1
3830
#!python ############################################################################### # Orkid SCONS Build System # Copyright 2010, Michael T. Mayers # email: michael@tweakoz.com # The Orkid Build System is published under the GPL 2.0 license # see http://www.gnu.org/licenses/gpl-2.0.html #####################...
mit
6,112,334,687,408,975,000
30.457627
122
0.522977
false
google/glome
python/test/test_vectors.py
1
2619
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
apache-2.0
2,867,019,371,586,286,600
38.681818
75
0.735777
false
simondlevy/RealtimePlotter
serialplot.py
1
1736
#!/usr/bin/env python3 ''' Real-time plot demo using serial input Copyright (C) 2015 Simon D. Levy This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your...
lgpl-3.0
-6,705,574,446,413,509,000
21.842105
68
0.613479
false
jpodeszwik/linux_screenshoter
linux_screenshoter.py
1
1512
import sys from PyQt5.QtWidgets import QApplication, QSystemTrayIcon, QMenu, QAction from PyQt5.QtGui import QGuiApplication, QIcon from paramiko import SSHClient from scp import SCPClient import paramiko from datetime import date import time import configparser class Screenshoter: def __init__(self): conf...
mit
3,792,304,751,172,548,000
31.170213
95
0.697751
false
atodorov/blivet
blivet/devicelibs/edd.py
1
31887
# # edd.py # BIOS EDD data parsing functions # # Copyright 2010-2015 Red Hat, Inc. # # 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 la...
gpl-2.0
7,004,648,706,878,743,000
42.265943
116
0.536676
false
hshindo/POS-Tagging-benchmark
Theano/lstm.py
1
3354
__author__ = 'hiroki' import numpy as np import theano import theano.tensor as T from nn_utils import sigmoid, tanh, sample_weights class LSTM(object): def __init__(self, w, d, n_layer, vocab_size, n_in, n_hid...
mit
4,942,429,985,262,088,000
32.878788
98
0.501491
false
t-woerner/firewalld
src/firewall/core/io/zone.py
1
39512
# -*- coding: utf-8 -*- # # Copyright (C) 2011-2016 Red Hat, Inc. # # Authors: # Thomas Woerner <twoerner@redhat.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 2 of the Li...
gpl-2.0
6,991,319,823,909,082,000
39.154472
153
0.493243
false
kayak/fireant
fireant/queries/builder/dimension_latest_query_builder.py
1
2026
import pandas as pd from fireant.dataset.fields import Field from fireant.utils import ( alias_for_alias_selector, immutable, ) from fireant.queries.builder.query_builder import QueryBuilder, QueryException, add_hints from fireant.queries.execution import fetch_data class DimensionLatestQueryBuilder(QueryBui...
apache-2.0
8,149,102,516,528,368,000
37.961538
113
0.677196
false
bdarnell/tornado
tornado/routing.py
1
25147
# Copyright 2015 The Tornado Authors # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
apache-2.0
-6,161,237,517,187,118,000
34.072524
100
0.622142
false
aserranoh/picc
picc/coff.py
1
21846
'''Inspect Microchip's PIC objects in COFF format. Copyright 2016 Antonio Serrano Hernandez This file is part of picc. picc 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 (...
gpl-3.0
-3,627,026,681,919,204,400
35.289037
83
0.570219
false
Kotaimen/georest
georest/geo/feature.py
1
6761
# -*- encoding: utf-8 -*- __author__ = 'kotaimen' __date__ = '5/29/14' """ georest.geo.feature ~~~~~~~~~~~~~~~~~~~ Geo Feature object """ import copy import six import shapely.geometry.base import geojson.base from . import jsonhelper as json from .key import Key from .geometry import Geometry from .s...
bsd-2-clause
5,473,928,329,352,390,000
29.872146
79
0.591037
false
jobovy/galpy
galpy/potential/SpiralArmsPotential.py
1
29343
############################################################################### # SpiralArmsPotential.py: class that implements the spiral arms potential # from Cox and Gomez (2002) # # https://arxiv.org/abs/astro-ph/0207635 # # Phi(r, phi, z) = -4*pi*G*H*rho0*exp(-(r-r0)/Rs)*sum(Cn/(Kn*Dn)...
bsd-3-clause
-5,433,908,138,395,258,000
42.024927
367
0.458781
false
bswartz/cinder
cinder/tests/unit/api/contrib/test_services.py
1
27106
# Copyright 2012 IBM Corp. # 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 app...
apache-2.0
2,180,490,940,826,424,800
39.6997
78
0.470892
false
xiaohan2012/cotrain
util.py
1
1501
def sample_from_list_and_split(items, n, rng): """Sample n examples from items using random generator rng >>> from numpy.random import RandomState >>> rng = RandomState(1) >>> items = ['a', 'b', 'c', 'd', 'e', 'f'] >>> sample_from_list_and_split(items, 2, rng) (['b', 'c'], ['a', 'd', 'e',...
mit
5,379,581,322,555,363,000
36.525
113
0.568954
false
Fokko/incubator-airflow
tests/contrib/sensors/test_jira_sensor_test.py
1
2859
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
-2,613,276,581,240,930,300
31.862069
78
0.644281
false
Azure/azure-documentdb-python
test/session_token_unit_tests.py
1
3972
import unittest import uuid import pytest import azure.cosmos.documents as documents from azure.cosmos.vector_session_token import VectorSessionToken from azure.cosmos.errors import CosmosError @pytest.mark.usefixtures("teardown") class SessionTokenUnitTest(unittest.TestCase): """Test to ensure escaping of non-asc...
mit
4,109,298,509,410,830,000
48.65
160
0.70569
false
clovertrail/cloudinit-bis
cloudinit/util.py
1
73447
# vi: ts=4 expandtab # # Copyright (C) 2012 Canonical Ltd. # Copyright (C) 2012, 2013 Hewlett-Packard Development Company, L.P. # Copyright (C) 2012 Yahoo! Inc. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Juerg Haefliger <juerg.haefliger@hp.com> # Author: Joshua Harlow <harlowja@yaho...
gpl-3.0
7,621,861,078,958,051,000
29.475934
79
0.566585
false
moacirnq/camdroid_server_usp
config.py
1
1175
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or '123456' SQLALCHEMY_COMMIT_ON_TEARDOWN = True FLASKY_MAIL_SUBJECT_PREFIX = '[Flasky]' FLASKY_MAIL_SENDER = 'Flasky Admin <camdroid_usp@gmail.com>' FLASKY_ADMIN = os.environ.get(...
gpl-2.0
-776,576,909,438,492,900
29.921053
79
0.673191
false
oli-kester/advanced-av-examples
amp-osc-lv2/.waf-1.8.5-3556be08f33a5066528395b11fed89fa/waflib/ConfigSet.py
2
3763
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import copy,re,os from waflib import Logs,Utils re_imp=re.compile('^(#)*?([^#=]*?)\ =\ (.*?)$',re.M) class ConfigSet(object): __slots__=('table','parent') def __init__(self,...
gpl-2.0
6,939,244,725,267,612,000
23.756579
102
0.658251
false
selvakarthik21/newspaper
newspaperdemo/source/source.py
1
15524
# -*- coding: utf-8 -*- """ Source objects abstract online news source websites & domains. www.cnn.com would be its own source. """ __title__ = 'newspaper' __author__ = 'Lucas Ou-Yang' __license__ = 'MIT' __copyright__ = 'Copyright 2014, Lucas Ou-Yang' import logging from urllib.parse import urljoin, urlsplit, urlunsp...
mit
-3,759,305,088,933,924,000
34.935185
94
0.570278
false
HomeRad/TorCleaner
wc/filter/rules/Rule.py
1
9905
# -*- coding: iso-8859-1 -*- # Copyright (C) 2000-2009 Bastian Kleineidam """ Basic rule class and routines. """ import re from wc.XmlUtils import xmlquote, xmlquoteattr, xmlunquote from . import register_rule def compileRegex(obj, attr, fullmatch=False, flags=0): """ Regex-compile object attribute into <attr...
gpl-2.0
-2,222,222,467,976,321,000
30.951613
77
0.512872
false
picca/hkl
tests/bindings/polarisation.py
1
13010
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import math import unittest from collections import namedtuple from gi.repository import GLib from gi.repository import Hkl from numpy import (array, cross, dot, empty, hstack, reshape, vstack) from numpy.linalg import inv, norm ######### # Types # ######### D...
gpl-3.0
-9,094,135,834,537,775,000
33.879357
173
0.533513
false
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/sphinx/ext/apidoc.py
1
18689
""" sphinx.ext.apidoc ~~~~~~~~~~~~~~~~~ Parses a directory tree looking for Python modules and packages and creates ReST files appropriately to create code documentation with Sphinx. It also creates a modules index (named modules.<suffix>). This is derived from the "sphinx-autopackage" script...
mit
-8,916,738,436,180,479,000
39.712418
112
0.568417
false
iModels/mbuild
mbuild/utils/conversion.py
1
6621
"""mBuild conversion utilities.""" import numpy as np def RB_to_OPLS(c0, c1, c2, c3, c4, c5): """Convert Ryckaert-Bellemans type dihedrals to OPLS type. Parameters ---------- c0, c1, c2, c3, c4, c5 : Ryckaert-Belleman coefficients (in kcal/mol) Returns ------- opls_coeffs : np.array, sha...
mit
4,898,210,305,402,490,000
24.762646
79
0.508987
false
piohhmy/euler
p010.py
1
1626
import math from timeit import Timer def solve_p10_sieve(): return sum(sieve_primes_up_to(2000000)) def solve_p10_sieve_w_generator(): return sum(prime_sieve_generator(2000000)) def sieve_primes_up_to(num): num_list = list(range(num)) num_list[1] = 0 # cross out 1, special case i = 2 while ...
mit
8,637,730,465,433,145,000
28.563636
76
0.630996
false
calaldees/KaraKara
website/tests/conftest.py
1
3304
import pytest import logging log = logging.getLogger(__name__) from .data.queue import queue from .data.tracks import tags, attachments, tracks, tracks_volume, track_unicode_special from .data.tracks_random import random_tracks from .data.auth import users # Markers -------------------------------------------------...
gpl-3.0
-65,503,384,737,367,784
29.311927
163
0.674334
false
EmanueleCannizzaro/scons
test/MSVC/batch-longlines.py
1
2071
#!/usr/bin/env python # # Copyright (c) 2001 - 2016 The SCons Foundation # # 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 right...
mit
6,209,692,841,461,162,000
31.95082
102
0.703525
false
manahl/arctic
tests/integration/tickstore/test_ts_read.py
1
30190
# -*- coding: utf-8 -*- from datetime import datetime as dt import numpy as np import pandas as pd import pytest import six from mock import patch, call, Mock from numpy.testing.utils import assert_array_equal from pandas import DatetimeIndex from pandas.util.testing import assert_frame_equal from pymongo import ReadP...
lgpl-2.1
-355,126,673,599,106,400
41.866477
181
0.490655
false
WeskerYuan/flydan
sitl.py
1
12399
#! /usr/bin/python """ Software-in-the-loop simulation script for the multi quadcopter flocking control. This is the main script for the multi quadcopter flocking control (SITL). The script runs under the dronekit-sitl environment. A high-level XBee module should be connected for the inter communication between the d...
apache-2.0
6,329,591,831,560,588,000
37.153846
116
0.642874
false
leiferikb/bitpop
build/scripts/slave/recipe_modules/tryserver/api.py
1
4689
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from slave import recipe_api PATCH_STORAGE_RIETVELD = 'rietveld' PATCH_STORAGE_GIT = 'git' PATCH_STORAGE_SVN = 'svn' class TryserverApi(recipe_api.Recip...
gpl-3.0
1,195,131,682,166,935,300
34.522727
80
0.637449
false
cedriclaunay/gaffer
python/GafferScene/AlembicPath.py
1
2881
########################################################################## # # Copyright (c) 2012, John Haddon. 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 so...
bsd-3-clause
-6,129,575,662,980,831,000
32.5
94
0.67789
false
RHInception/re-cfg-seed
test/test_re_cfg_seed.py
1
6904
# Copyright (C) 2014 SEE AUTHORS FILE # # 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 distr...
agpl-3.0
-2,944,015,659,756,107,000
32.192308
85
0.553592
false
mjschultz/django-password-policies
setup.py
1
1293
from setuptools import setup, find_packages install_requires=['django>=1.5', 'django-easysettings', 'pytz'] try: import importlib except ImportError: install_requires.append('importlib') setup( name='django-password-policies', version=__import__('password_policies').__version__, description='A D...
bsd-3-clause
-4,197,474,598,995,179,500
32.153846
72
0.677494
false
strets123/acascraper
setup.py
1
1573
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup readme = open('README.rst').read() history = open('HISTORY.rst').read().replace('.. :changelog:', '') requirements = [ # TODO: put package requireme...
bsd-3-clause
-5,841,190,816,320,650,000
23.59375
66
0.612206
false
PaulWay/insights-core
insights/combiners/journald_conf.py
1
10493
""" Journald configuration ====================== Combiner for parsing of journald configuration. man journald.conf describes where various journald config files can reside and how they take precedence one over another. The combiner implements the logic and provides an interface for querying active settings. The jour...
apache-2.0
6,694,605,664,212,472,000
46.479638
105
0.686362
false