repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
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
2.776079
false
false
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
3.398504
false
false
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
4.332159
false
false
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
4.132199
false
false
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
4.193211
false
false
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
2.921463
false
false
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
3.322404
false
false
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
3.388889
false
false
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
3.744872
false
false
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
3.287356
true
false
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
3.80614
false
false
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
3.41451
true
false
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
3.779646
true
false
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
3.991228
false
false
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
3.254066
true
false
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
3.176335
false
false
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
2.368304
false
false
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
3.9818
false
false
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
3.593413
false
false
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
3.154724
true
false
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
3.515254
false
false
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
3.862551
false
false
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
3.819756
false
false
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
4.238185
false
false
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
2.296807
false
false
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
4.698318
false
false
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
3.86922
false
false
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
3.203046
false
false
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
4.634509
false
false
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
3.401929
false
false
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
3.873112
false
false
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
3.818966
false
false
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
3.653581
false
false
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
4.106537
false
false
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
3.177542
false
false
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
3.080444
false
false
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
4.632287
false
false
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
4.280934
false
false
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
3.123028
false
false
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
4.801418
false
false
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
3.918736
false
false
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
3.672348
false
false
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
3.027076
false
false
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
4.247379
true
false
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
4.334942
false
false
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
3.662978
false
false
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
4.546738
false
false
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
3.221673
false
false
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
3.057026
false
false
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
3.77675
true
false
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
3.418244
true
false
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
3.746531
false
false
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
2.718931
false
false
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
4.251073
false
false
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
3.246008
true
false
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
4.147137
false
false
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
3.093925
false
false
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
3.085389
false
false
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
3.607507
false
false
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
3.501867
false
false
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
4.080737
false
false
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
4.397959
false
false
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
3.827251
true
true
false
todd-x86/tkplus
exception.py
1
1522
from form import Form from button import Button from label import Label from image import Image from memo import Memo import os import Tkinter as tk import traceback def handle_exception(ex, stacktrace=None): err_icon = os.path.join(os.path.dirname(__file__), 'graphics', 'icon_error.gif') frm = Form(caption='E...
apache-2.0
-826,496,938,995,160,800
31.382979
84
0.618922
false
3.658654
false
false
false
lingfliu/smart_tuwa
twrt/testbed/massive_scene_test.py
1
3298
import socket import time import sys import random import math import threading msg_header = 'AADD' msg_stamp = '\x00\x00\x00\x00' msg_id_gw = '2016A008' msg_id_dev = '00000000' msg_devtype = '\x01\x00' msg_auth_key = '88888888' msg_auth_datatype = '\x1c\x00' msg_auth = msg_header+msg_stamp+msg_id_gw+msg_id_dev+ms...
apache-2.0
-1,788,681,679,811,182,000
28.711712
229
0.583081
false
2.674777
false
false
false
charlesll/RamPy
legacy_code/IR_dec_comb.py
1
6585
# -*- coding: utf-8 -*- """ Created on Tue Jul 22 07:54:05 2014 @author: charleslelosq Carnegie Institution for Science """ import sys sys.path.append("/Users/charleslelosq/Documents/RamPy/lib-charles/") import csv import numpy as np import scipy import matplotlib import matplotlib.gridspec as gridspec from pylab ...
gpl-2.0
1,000,396,658,416,147,200
38.668675
193
0.632194
false
3.256677
false
false
false
tarikgwa/nfd
newfies/mod_registration/forms.py
1
1850
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2014 Star2Billing S.L. # # The primar...
mpl-2.0
7,480,438,449,943,020,000
30.896552
76
0.6
false
3.790984
false
false
false
argonemyth/argonemyth-blog
blog/migrations/0008_auto__add_field_photo_orientation.py
1
8412
# -*- coding: 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 'Photo.orientation' db.add_column(u'blog_photo', 'orientation', self.gf...
gpl-3.0
-4,360,855,887,661,198,000
72.798246
187
0.552306
false
3.658982
false
false
false
astroScott/TeachingUtilities
classutils.py
1
5241
import os from configparser import ConfigParser import string from numpy import std, mean def read_config(file = 'configdata.cfg'): """ read the configuration file, by default configdata.cfg. returns a dict containing relevant config info. """ config = ConfigParser() config.read(file) asse...
gpl-2.0
-6,433,354,924,796,667,000
29.47093
96
0.552566
false
4.13981
true
false
false
batra-mlp-lab/DIGITS
digits/dataset/tasks/analyze_db.py
1
4644
# Copyright (c) 2015, NVIDIA CORPORATION. All rights reserved. import sys import os.path import re import digits from digits.utils import subclass, override from digits.task import Task # NOTE: Increment this everytime the pickled object PICKLE_VERSION = 1 @subclass class AnalyzeDbTask(Task): """ Reads inf...
bsd-3-clause
8,634,382,080,693,580,000
29.352941
106
0.566322
false
3.932261
false
false
false
JSeam2/IsoGraph
old/gen_iso_graph.py
1
4050
# -*- coding: utf-8 -*- """ Generate adjacency matrices of isomorphic graphs task 1) Check the sizes of isomorphic graphs you want to generate 2) Store them in different numpy files for various graph sizes Build a table for example: ______________________________________ | Graph 1 | Graph 2 | Is Isomorphic? | |-----...
mit
-5,893,967,120,085,904,000
27.814286
130
0.57883
false
3.538596
false
false
false
adamfisk/littleshoot-client
server/common/appengine/patch/common/appenginepatch/ragendja/forms.py
1
11392
from copy import deepcopy import re from django.utils.datastructures import SortedDict, MultiValueDict from django.utils.html import conditional_escape from django.utils.encoding import StrAndUnicode, smart_unicode, force_unicode from django.utils.safestring import mark_safe from django.forms.widgets import flatatt fr...
gpl-2.0
5,366,842,550,476,129,000
39.397163
196
0.561271
false
3.84605
false
false
false
sokolic/miniSASS
minisass_registration/forms.py
1
6601
from django import forms from django.utils.translation import ugettext_lazy as _ from django.conf import settings # Frank Sokolic: June 2018 - Disabled all the recaptcha code as version 1 is no longer supported #from cmsplugin_contact.nospam.widgets import RecaptchaChallenge, RecaptchaResponse from registration.forms ...
gpl-3.0
-6,425,227,694,695,306,000
43.904762
177
0.609302
false
3.90823
false
false
false
EvolutionClip/pyload
module/plugins/hooks/OverLoadMe.py
1
1605
# -*- coding: utf-8 -*- from module.plugins.internal.MultiHook import MultiHook class OverLoadMe(MultiHook): __name__ = "OverLoadMe" __type__ = "hook" __version__ = "0.04" __config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"), ...
gpl-3.0
841,295,249,525,964,800
50.774194
138
0.456075
false
3.758782
false
false
false
zathras777/pywind
pywind/elexon/cmd.py
1
11805
from datetime import timedelta, time, datetime, date from pywind.elexon.api import B1420, B1330, B1320, FUELINST, \ DERSYSDATA, DERBMDATA, BMUNITSEARCH, \ B1610, B1630, UOU2T52W from pywind.elexon.unit import BalancingData from pywind.utils import StdoutForma...
unlicense
6,573,191,138,269,887,000
35.661491
122
0.55036
false
3.676425
false
false
false
qsnake/gpaw
gpaw/test/wannier_ethylene.py
1
2008
import os from ase import Atom, Atoms from gpaw import GPAW from gpaw.test import equal from gpaw.wannier import Wannier import numpy as np # GPAW wannier example for ethylene corresponding to the ASE Wannier # tutorial. a = 6.0 # Size of unit cell (Angstrom) ethylene = Atoms([Atom('H', (-1.235,-0.936 , 0 )), ...
gpl-3.0
-7,751,138,382,603,430,000
29.424242
75
0.575697
false
2.800558
false
false
false
jpypi/dup-image-search
simple_hash/fast_simple_hash.py
1
1638
#!/usr/bin/env python2 """ simple_hash.py Generates a hash using the "simple" method outlined on: http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html :author: Brandon Arrendondo :author: James Jenkins :license: MIT """ import sys import argparse import numpy import glo...
mit
3,918,191,656,420,829,000
23.818182
79
0.617827
false
3.739726
false
false
false
gamingrobot/SpockBot
spockbot/plugins/helpers/entities.py
1
6663
""" An entity tracker """ from spockbot.mcdata.utils import Info from spockbot.plugins.base import PluginBase, pl_announce class MCEntity(Info): eid = 0 status = 0 nbt = None metadata = None class MovementEntity(MCEntity): x = 0 y = 0 z = 0 yaw = 0 pitch = 0 on_ground = True ...
mit
-3,606,966,926,603,620,400
31.34466
70
0.585922
false
3.580333
false
false
false
boundlessgeo/qgis-connect-plugin
boundlessconnect/connect.py
1
16927
# -*- coding: utf-8 -*- from builtins import object import os import re import json import base64 import urllib2 import tempfile from copy import copy import webbrowser from qgis.PyQt.QtGui import QIcon, QCursor from qgis.PyQt.QtCore import Qt, QUrl, QFile, QEventLoop from qgis.PyQt.QtWidgets import QMessageBox, QAp...
gpl-2.0
3,266,682,857,822,858,000
33.19596
170
0.555858
false
4.404632
false
false
false
xxn59/weat
app/views.py
1
14710
from flask import render_template, flash, redirect, session, url_for, request, g, make_response from flask.ext.login import login_user, logout_user, current_user, login_required from . import db, lm from . import app from .forms import LoginForm, SignupForm, FoodForm, ChangePasswordForm, AddFoodForm, EditForm from date...
mit
-8,336,185,183,291,548,000
34.617433
118
0.547927
false
3.796129
false
false
false
wmealem/VerbTrainer
languages/spanish.py
1
8117
# Spanish verb conjugations from collections import namedtuple, OrderedDict # Spanish has two forms of the sps familiar - 'tú' and 'vos' SpanishCategory = namedtuple('SpanishCategory', 'fps sps spsv tps fpp spp tpp') _PRONOUNS = SpanishCategory('yo', 'tú', 'vos', 'él/ella/usted', 'nosotros/...
mit
232,128,548,254,710,900
38.880597
81
0.513473
false
3.306931
false
false
false
GoogleCloudPlatform/declarative-resource-client-library
python/services/iam/role.py
1
11094
# 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 by applicable law o...
apache-2.0
-2,879,384,759,754,092,000
38.201413
87
0.655129
false
3.989213
false
false
false
zadarastorage/zadarapy
zadarapy/vpsaos/drives.py
1
2669
# Copyright 2019 Zadara Storage, Inc. # Originally authored by Jeremy Brown - https://github.com/jwbrown77 # # 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
2,293,885,315,494,486,800
36.069444
77
0.694642
false
3.807418
false
false
false
igordejanovic/textX
tests/functional/test_metamodel/test_model_params.py
1
5362
from __future__ import unicode_literals from click.testing import CliRunner import os.path from pytest import raises from textx import metamodel_from_str from textx.cli import textx from textx.exceptions import TextXError from textx.generators import gen_file, get_output_filename from textx import language, generator...
mit
5,578,914,488,214,486,000
31.49697
85
0.614323
false
3.516066
true
false
false
mulkieran/justbytes
src/justbytes/_errors.py
1
3871
# Copyright (C) 2015 - 2019 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or any later version. # # This library is distributed in t...
gpl-2.0
-550,328,828,070,604,900
30.471545
86
0.671144
false
4.189394
false
false
false
edx/xblock-lti-consumer
lti_consumer/migrations/0002_ltiagslineitem.py
1
1256
# Generated by Django 2.2.16 on 2020-09-29 21:48 from django.db import migrations, models import django.db.models.deletion import opaque_keys.edx.django.models class Migration(migrations.Migration): dependencies = [ ('lti_consumer', '0001_initial'), ] operations = [ migrations.CreateMod...
agpl-3.0
6,771,993,912,979,698,000
42.310345
161
0.61465
false
3.937304
false
false
false
Micronaet/micronaet-migration
base_accounting_program/accounting.py
1
14040
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
agpl-3.0
3,122,961,838,378,075,600
37.565934
86
0.557701
false
4.016595
false
false
false
inertialsense/InertialSenseSDK
python/pylib/ISToolsDataSorted.py
1
51887
''' Created on Feb 22, 2014 @author: waltj ''' from numbers import Number import numpy as np import os import glob import sys import simplekml import ctypes as ct import pylib.pose as pose import pylib.filterTools as ft # Profiling code import time as systime from numpy import uint8 as u8 from numpy import uint16 as...
mit
-7,239,151,973,451,428,000
32.260897
170
0.488658
false
3.37279
false
false
false
rsip22/101
Python/OO/cheapest_options/models/establishment.py
1
1339
import random from constants import PRICE_TABLE from enums import client class Establishment: """ Class for an establishment in the chain. Attributes: name: (str) name of the establishment stars: (int) establishment category is_rewards: (bool) establishment client participates in...
gpl-2.0
1,346,721,449,851,784,400
30.880952
83
0.659447
false
3.542328
false
false
false
majek/rons
rons/parser.py
1
4184
''' Recursive decoder for Redis protocol. The code is quite reasonable and has no external dependencies whatsoever. To test run: $ python -m doctest parser.py -v ''' import collections import itertools class ProtocolError(Exception): pass EMPTY=0 BULK=1 MULTIBULK=2 _State = collections.namedtuple('State', ['s', 'l'...
mit
6,675,986,615,087,071,000
33.578512
234
0.48088
false
2.838535
true
false
false
jameskyle/KExperiment
Scripts/create_task_list.py
1
1800
#!/opt/local/bin/python import os import sys import re import fnmatch PROJECT_NAME = "KExperiment" source_reg = re.compile(".*\.(cpp|h)$") task_reg = re.compile("^\s*/+\s*(TODO|FIXME|BUG|NOTE|HACK):?\s*(.*)$", re.I) source_match = source_reg.match task_match = task_reg.match def main(): output = os.path.join(os....
gpl-3.0
-2,010,988,968,146,286,000
28.52459
76
0.468333
false
3.6
false
false
false
energyPATHWAYS/energyPATHWAYS
energyPATHWAYS/dispatch_maintenance.py
1
7610
from pyomo.environ import * import numpy as np import util import config as cfg import pdb import pandas as pd import copy import dispatch_budget import logging def surplus_capacity(model): return model.surplus_capacity + model.peak_penalty * model.weight_on_peak_penalty def define_penalty_to_preference_high_cos...
mit
2,130,111,249,588,512,000
54.152174
159
0.719054
false
3.291522
false
false
false
ryfeus/lambda-packs
Selenium_PhantomJS/source/service.py
1
1299
#!/usr/bin/env python import httplib2 import datetime import time import os import selenium import json import boto3 import requests from dateutil.parser import parse from selenium import webdriver from selenium.webdriver.support.ui import Select from selenium.webdriver.common.keys import Keys from selenium.webdriver...
mit
6,113,150,174,686,944,000
29.928571
173
0.774442
false
3.339332
false
false
false
GermanRuizMarcos/Classical-Composer-Classification
code_10_1/classification.py
1
30838
''' AUDIO CLASSICAL COMPOSER IDENTIFICATION BASED ON: A SPECTRAL BANDWISE FEATURE-BASED SYSTEM ''' import essentia from essentia.standard import * import glob import numpy as np import arff from scipy import stats import collections import cv2 import matplotlib import matplotlib.pyplot as plt #### gabor filters d...
gpl-3.0
-2,955,891,104,601,257,000
25.267462
147
0.573027
false
2.515745
false
false
false
luoshao23/ML_algorithm
Clustering/Pred_KNN.py
1
4903
from random import random, randint import math import numpy as np import plotly.plotly as py import plotly.graph_objs as go weightdomain = [(0, 20)] * 4 def wineprice(rating, age): peak_age = rating - 50 price = float(rating) / 2 if age > peak_age: price = price * (5 - (age - peak_age)) else...
mit
7,932,099,514,344,801,000
22.68599
79
0.564756
false
3.07591
true
false
false
simonjbeaumont/planex
planex/init.py
1
1365
#!/usr/bin/env python """ Creates or regenerates a Makefile with special planex-init comments """ import os import logging MAKEFILE_PATH = "/usr/share/planex" def create_makefile(): """ Checks if a Makefile exists with special planex-init comments in it. If not, it creates or regenerates the Makefile while...
lgpl-2.1
3,865,575,972,869,228,500
23.818182
76
0.628571
false
3.802228
false
false
false
jic-dtool/dtool-create
setup.py
1
1165
from setuptools import setup url = "https://github.com/jic-dtool/dtool-create" version = "0.23.4" readme = open('README.rst').read() setup( name="dtool-create", packages=["dtool_create"], package_data={"dtool_create": ["templates/*"]}, version=version, description="Dtool plugin for creating datase...
mit
-483,211,250,469,324,000
28.125
54
0.582833
false
3.319088
false
false
false
Flexget/Flexget
setup.py
1
2371
import sys from pathlib import Path from typing import List from setuptools import find_packages, setup long_description = Path('README.rst').read_text() # Populates __version__ without importing the package __version__ = None with open('flexget/_version.py', encoding='utf-8') as ver_file: exec(ver_file.read()) ...
mit
3,086,470,307,157,315,600
34.38806
118
0.640658
false
3.842788
false
false
false
katarzynamazur/esxi_scripts
copy_register_vms/lifesaver.py
1
1457
#!/usr/bin/env python3 import sys def help(): print("\nUsage:\n\t./{0} {1} {2}\n\n".format(sys.argv[0], "change_from", "change_to")) if __name__ == "__main__": if len(sys.argv) != 4 : help() else: chgfrom = str(sys.argv[1]) chgto = str(sys.argv[2]) snapnum = str(sys.arg...
gpl-3.0
-6,288,058,962,950,913,000
34.536585
163
0.482498
false
3.126609
false
false
false
vickyting0910/opengeocoding
2reinter.py
1
3991
import pandas as pd import glob import time import numpy as num inter=sorted(glob.glob('*****.csv')) w='*****.xlsx' table1=pd.read_excel(w, '*****', index_col=None, na_values=['NA']).fillna(0) w='*****.csv' tab=pd.read_csv(w).fillna(0) tab.is_copy = False pd.options.mode.chained_assignment = None t1=time.time() ...
bsd-2-clause
1,550,327,785,720,675,800
41.457447
465
0.600601
false
2.294997
false
false
false