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
endlessm/chromium-browser
third_party/catapult/telemetry/telemetry/timeline/thread.py
1
9786
# 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. import telemetry.timeline.async_slice as async_slice_module import telemetry.timeline.event_container as event_container import telemetry.timeline.flow_event ...
bsd-3-clause
-2,363,025,247,585,198,600
35.514925
80
0.647456
false
saguas/jasper_erpnext_report
jasper_erpnext_report/utils/jasper_iter_hooks.py
1
1437
from __future__ import unicode_literals __author__ = 'luissaguas' import frappe from frappe import _ """ HOOKS: jasper_after_sendmail(data, url, file_name, file_path); jasper_before_sendmail(data, file_name, output, url, **kargs); jasper_after_get_report(file_name, file_output, url, filepath); jasper_before_get_...
mit
6,848,915,279,601,715,000
30.933333
125
0.712596
false
MySmile/sfchat
apps/csp/tests/test_view.py
1
2904
import unittest import json from django.test.client import Client class CSPReportTest(unittest.TestCase): def setUp(self): self.client = Client() self.csp_report_valid = {"csp-report": {"blocked-uri":"self", "document-uri":...
bsd-3-clause
8,138,226,308,682,014,000
62.130435
551
0.46832
false
tbtraltaa/medianshape
medianshape/simplicial/surfgen.py
1
10038
# encoding: utf-8 ''' 2D surface embedded in 3D ------------------------- ''' from __future__ import absolute_import import importlib import os import numpy as np from medianshape.simplicial import pointgen3d, mesh, utils from medianshape.simplicial.meshgen import meshgen2d import matplotlib.pyplot as plt from mpl_t...
gpl-3.0
-5,031,703,206,285,976,000
37.1673
90
0.5789
false
alex/kombu-fernet-serializers
setup.py
1
1648
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import kombu_fernet try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() packages = [ 'kombu_fernet', 'kombu...
mit
423,783,469,457,479,940
25.580645
78
0.633495
false
egnyte/python-egnyte
egnyte/events.py
1
4981
from __future__ import unicode_literals import time from egnyte import base, exc, resources class Event(base.Resource): """ Event data. Attributes: * id - event id * timestamp - date of event in iso8061 format * action_source - event source: WebUI, SyncEngine, Mobile or PublicAPI * ac...
mit
-2,821,686,280,432,498,700
37.022901
199
0.636418
false
tensorport/mnist
mnist.py
1
11743
# MIT License, see LICENSE # Copyright (c) 2018 Clusterone Inc. # Author: Adrian Yi, adrian@clusterone.com from __future__ import print_function import json import os from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter import tensorflow as tf from clusterone import get_data_path, get_logs_path from u...
mit
-7,291,830,831,649,347,000
47.127049
120
0.606489
false
globaltoken/globaltoken
test/functional/rpc_rawtransaction.py
1
18199
#!/usr/bin/env python3 # Copyright (c) 2014-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the rawtransaction RPCs. Test the following RPCs: - createrawtransaction - signrawtransacti...
mit
7,541,542,807,572,354,000
54.654434
233
0.658882
false
L337hium/dhquery
dhquery.py
1
7156
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim:fileencoding=utf-8 # vim:tabstop=2 from random import Random from optparse import OptionParser from pydhcplib.dhcp_packet import DhcpPacket from pydhcplib.dhcp_network import DhcpClient from pydhcplib.type_hw_addr import hwmac from pydhcplib.type_ipv4 import ipv4 imp...
gpl-2.0
-6,692,521,198,314,802,000
29.712446
157
0.670486
false
thica/ORCA-Remote
src/ORCA/utils/Platform/generic/generic_CheckPermissions.py
1
1299
# -*- coding: utf-8 -*- """ ORCA Open Remote Control Application Copyright (C) 2013-2020 Carsten Thielepape Please contact me by : http://www.orca-remote.org/ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publi...
gpl-3.0
-3,520,251,617,699,083,300
37.363636
85
0.714396
false
AHJenin/acm-type-problems
Timus/AC/1197-Lonesome_Knight.py
1
1209
#!/usr/bin/env python3 # # FILE: 1197-Lonesome_Knight.py # # @author: Arafat Hasan Jenin <opendoor.arafat[at]gmail[dot]com> # # LINK: # # DATE CREATED: 15-06-18 15:40:41 (+06) # LAST MODIFIED: 15-06-18 17:29:41 (+06) # # VERDICT: Accepted # # DEVELOPMENT HISTORY: # Date Version Description # ---------------...
mit
8,361,550,323,378,487,000
27.116279
78
0.322581
false
nikofil/invenio-search-ui
invenio_search_ui/views.py
1
2169
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015, 2016 CERN. # # Invenio 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-2.0
7,984,396,494,800,520,000
30.897059
76
0.68142
false
dmilith/SublimeText3-dmilith
Packages/pyte/all/pyte/screens.py
1
46773
# -*- coding: utf-8 -*- """ pyte.screens ~~~~~~~~~~~~ This module provides classes for terminal screens, currently it contains three screens with different features: * :class:`~pyte.screens.Screen` -- base screen implementation, which handles all the core escape sequences, recognized by ...
mit
3,143,114,599,980,431,000
34.434091
79
0.564834
false
suraj-jayakumar/lstm-rnn-ad
src/testdata/random_data_time_series/generate_data.py
1
1042
# -*- coding: utf-8 -*- """ Created on Tue Feb 23 11:15:12 2016 @author: suraj """ import random import numpy as np import pickle import matplotlib.pyplot as plt attachRateList = [] for i in range(3360): attachRateList.append(random.uniform(4,6)) attachRateList = np.array(attachRateList) encoded_attach_rate...
apache-2.0
-7,580,691,378,354,332,000
23.809524
245
0.716891
false
kalyptorisk/daversy
src/daversy/difflib_ext.py
1
8527
import re, difflib def merge_group(list, func, start=True, end=True): l, r, s = list[0] first = ['',' class="first"'][start] last = ['',' class="last"'][end] if len(list) == 1: if start and end: return LINE_FORMAT % func(' class="first last"', l, r) else: retur...
gpl-2.0
-9,172,895,471,794,657,000
26.156051
129
0.606661
false
sugarlabs/sugar-toolkit-gtk3
src/sugar3/graphics/radiotoolbutton.py
1
7756
# Copyright (C) 2007, Red Hat, Inc. # Copyright (C) 2007-2008, One Laptop Per Child # # 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 of the License, or (at your option...
lgpl-2.1
3,167,136,973,559,909,400
29.777778
76
0.618747
false
hackthemarket/pystrat
sim.py
1
10697
# simple trading strategy simulator import pandas as pd from pandas.tools.plotting import autocorrelation_plot from pandas.tools.plotting import scatter_matrix import numpy as np from scipy import stats import sklearn from sklearn import preprocessing as pp import matplotlib as mpl import matplotlib.pyplot as plt f...
gpl-3.0
3,906,262,475,805,889,000
32.015432
84
0.597177
false
douglaskastle/bootswatch
convert_bootswatch_mutara.py
1
7972
import re import os values = { # 'uc': 'Grissom', 'lc': 'mutara', 'header': 'Michroma', 'body': 'Play', 'website': 'mavek_org', # 'cl': '#116BB7', } def main(): src = 'cyborg' cmd = 'cp -r {0}/* {1}'.format(src, values['lc']) os.system(cmd) infile = "{0}/bootsw...
mit
-6,429,890,791,821,344,000
53.97931
159
0.49147
false
sony/nnabla
python/src/nnabla/models/imagenet/densenet.py
1
2722
# Copyright 2019,2020,2021 Sony 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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
apache-2.0
6,252,650,887,576,425,000
38.449275
179
0.669361
false
robertostling/efselab
scripts/conll2tab.py
1
1221
# Script to convert CoNLL files with tag+morphology into the simple two-column # format assumed by efselab. # # If only the tag is required, conversion can more easily be done like this: # # cut -f 2,4 file.conll >file.tab """ cat /home/corpora/SUC3.0/corpus/conll/blogs.conll /home/corpora/SUC3.0/corpus/conll/suc-trai...
gpl-3.0
-248,659,985,629,635,300
34.911765
161
0.600328
false
grengojbo/st2
st2actions/st2actions/config.py
1
3073
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
apache-2.0
-5,164,267,192,846,856,000
33.144444
99
0.663196
false
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/eggs/nose-0.11.1-py2.7.egg/nose/proxy.py
1
5945
""" Result Proxy ------------ The result proxy wraps the result instance given to each test. It performs two functions: enabling extended error/failure reporting and calling plugins. As each result event is fired, plugins are called with the same event; however, plugins are called with the nose.case.Test instance tha...
gpl-3.0
5,547,417,367,787,775,000
34.386905
77
0.622876
false
meowtec/page-navigator
example.py
1
2364
# coding:utf-8 html_tpl = ''' <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <style type="text/css"> .nav{ margin: 10px 0; font-size: 12px; font-family: "Helvetica", "Arial", sans-serif; } .nav a{ text-decoration: none; color: #000...
mit
-406,984,751,838,615,360
24.736264
134
0.551665
false
ehovind/extensible-ebook-converter
eecon_fetcher.py
1
3151
#!/usr/bin/env python """ This file is part of Extensible eBook Converter (EeCon), an advanced ebook analysis and conversion tool. Copyright (C) 2012 Espen Hovind <espehov@ifi.uio.no> EeCon is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the ...
gpl-3.0
6,881,548,638,896,659,000
29.009524
80
0.535386
false
albert12132/templar
templar/cli/templar.py
1
2179
"""Command-line interface for templar.""" from templar.api import config from templar.api import publish from templar.exceptions import TemplarError import templar import argparse import logging import sys LOGGING_FORMAT = '%(levelname)s %(filename)s:%(lineno)d> %(message)s' logging.basicConfig(format=LOGGING_FORMAT...
mit
-8,073,542,425,977,757,000
33.046875
77
0.58972
false
hammerlab/immuno
immuno/immunogenicity.py
1
5849
# Copyright (c) 2014. Mount Sinai School of Medicine # # 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...
apache-2.0
-1,123,639,031,035,863,000
35.786164
80
0.618396
false
Gabriel-p/mcs_rot_angles
aux_modules/validation_set.py
1
10176
import os from astropy.io import ascii from astropy.table import Table from astropy.coordinates import Distance, Angle, SkyCoord from astropy import units as u import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import sys # Change path so that we can import functions from the '...
gpl-3.0
-6,003,738,110,879,360,000
34.552448
79
0.564123
false
wxgeo/geophar
wxgeometrie/sympy/polys/tests/test_numberfields.py
4
28618
"""Tests for computational algebraic number field theory. """ from sympy import (S, Rational, Symbol, Poly, sqrt, I, oo, Tuple, expand, pi, cos, sin, exp) from sympy.utilities.pytest import raises, slow from sympy.core.compatibility import range from sympy.polys.numberfields import ( minimal_polynomial, ...
gpl-2.0
-7,219,002,142,231,568,000
37.005312
154
0.586379
false
nioinnovation/safepickle
safepickle/encoding.py
1
1118
from .types import TypesManager def encode(obj): """ Encodes an item preparing it to be json serializable Encode relies on defined custom types to provide encoding, which in turn are responsible of using the 'encode' function parameter passed to them to recursively encoded contained items. ...
apache-2.0
-3,217,787,463,624,583,700
23.844444
77
0.627907
false
pligor/predicting-future-product-prices
04_time_series_prediction/gp_opt/price_history_27_gp_opt.py
1
6918
from models.model_21_price_history_seq2seq_dyn_dec_ins import PriceHistorySeq2SeqDynDecIns import pickle import dill from os import path, remove import numpy as np from skopt.space.space import Integer, Real, Categorical from skopt import gp_minimize import tensorflow as tf from mylibs.jupyter_notebook_helper import M...
agpl-3.0
-3,510,144,819,399,291,400
44.81457
131
0.616941
false
marcomaccio/python-docs-samples
scripts/auto_link_to_docs.py
1
3864
#!/usr/bin/env python # Copyright (C) 2013 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 applic...
apache-2.0
8,503,063,250,779,012,000
25.833333
77
0.627329
false
mlgruby/mining
mining/utils/__init__.py
1
1603
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import re import os import unicodedata import ConfigParser from bson import ObjectId from datetime import datetime from mining.settings import PROJECT_PATH def slugfy(text): slug = unicodedata.normalize("NFKD", text).encode("UTF-8", "ignore") slug = r...
mit
-5,695,078,317,404,336,000
24.046875
77
0.592639
false
inspirehep/inspire-schemas
tests/unit/test_job_builder.py
1
16050
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2019 CERN. # # INSPIRE 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...
gpl-2.0
1,155,045,660,382,006,500
24.516693
94
0.607788
false
FireBladeNooT/Medusa_1_6
lib/github/tests/IssueComment.py
1
3235
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
2,692,575,707,421,382,000
57.818182
118
0.51221
false
dominicelse/scipy
benchmarks/benchmarks/sparse.py
1
10059
""" Simple benchmarks for the sparse module """ from __future__ import division, print_function, absolute_import import warnings import time import timeit import numpy import numpy as np from numpy import ones, array, asarray, empty, random, zeros try: from scipy import sparse from scipy.sparse import (csr_m...
bsd-3-clause
3,352,419,571,991,209,000
27.019499
77
0.532856
false
googleapis/googleapis-gen
google/ads/googleads/v8/googleads-py/tests/unit/gapic/googleads.v8/services/test_custom_audience_service.py
1
35288
# -*- 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,432,984,637,234,446,000
42.836025
217
0.682555
false
coronary/RandomEpisode
depends/Lib/site-packages/tmdbsimple/people.py
1
7235
# -*- coding: utf-8 -*- """ tmdbsimple.people ~~~~~~~~~~~~~~~~~ This module implements the People, Credits, and Jobs functionality of tmdbsimple. Created by Celia Oakley on 2013-10-31. :copyright: (c) 2013-2017 by Celia Oakley :license: GPLv3, see LICENSE for more details """ from .base import TMDB class People(T...
mit
481,468,421,621,754,600
27.710317
80
0.581617
false
ruslanloman/nova
nova/virt/libvirt/volume/volume.py
1
16814
# Copyright 2011 OpenStack Foundation # (c) Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # ...
apache-2.0
-3,995,553,806,361,658,000
40.210784
79
0.591352
false
Quihico/repository.spartacus
script.trtv/streaming.py
1
24691
# -*- coding: utf-8 -*- # # Copyright (C) 2014 Sean Poyser and Richard Dean (write2dixie@gmail.com) - With acknowledgement to some original code by twinther (Tommy Winther) # import xbmc from xml.etree import ElementTree from xml.parsers.expat import ExpatError import ConfigParser import os import re import xbm...
gpl-2.0
8,102,808,333,039,620,000
40.849153
403
0.507108
false
moorecoin/MooreCoinMiningAlgorithm
contrib/devtools/update-translations.py
1
6779
#!/usr/bin/python # copyright (c) 2014 wladimir j. van der laan # distributed under the mit software license, see the accompanying # file copying or http://www.opensource.org/licenses/mit-license.php. ''' run this script from the root of the repository to update all translations from transifex. it will do the following...
mit
-6,915,173,566,015,647,000
35.446237
121
0.618675
false
kssim/efp
making_decisions/python/bmi_calculator.py
1
1254
# Pratice 19. BMI Calculator # Output: # Your BMI is 19.5. # You are within the ideal weight range. # Or # Your BMI is 32.5. # You are overweight. You should see your doctor. # Formula: # bmi = (weight / (height x height)) x 703 # Standard: # BMI 18.5 ~ 25 is nomal weight. # Constraint: # - Ensure your ...
mit
-8,714,691,810,336,679,000
28.162791
86
0.606858
false
barsnadcat/evegant
Process.py
1
1289
from unittest import TestCase from unittest.mock import Mock from Schemes import Blueprint from ItemStack import ItemStack class TestProcess(TestCase): def test_InitProcess(self): scheme = Blueprint(0, "Name", 0, [ItemStack(0, 1)], ItemStack(0, 1)) process = Process(scheme) assert process.inputs[0].ammount =...
gpl-3.0
3,894,875,797,590,188,500
22.436364
70
0.706749
false
redsolution/django-menu-proxy
menuproxy/utils.py
1
10086
# -*- coding: utf-8 -*- from django import conf from django.core.cache import cache from importpath import importpath METHODS = ( 'replace', # Указывает, что объект point следует заменить объектом object 'insert', # Указывает, что к списку дочерних элементов inside-правила нужно добавить элемент object 'c...
gpl-3.0
7,323,693,844,569,859,000
35.032727
124
0.598345
false
nirvn/QGIS
tests/src/python/test_provider_ogr_gpkg.py
1
28594
# -*- coding: utf-8 -*- """QGIS Unit tests for the OGR/GPKG provider. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version....
gpl-2.0
7,914,798,326,296,936,000
40.44058
128
0.627474
false
laurentb/weboob
weboob/core/ouiboube.py
1
19192
# -*- coding: utf-8 -*- # Copyright(C) 2010-2014 Romain Bignon # # This file is part of weboob. # # weboob 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
7,523,653,314,922,785,000
37.079365
139
0.616298
false
samuel-phan/mssh-copy-id
msshcopyid/cli.py
1
9466
from __future__ import unicode_literals import argparse import datetime import logging import os import socket import sys import traceback import paramiko import msshcopyid from msshcopyid.constants import DEFAULT_KNOWN_HOSTS from msshcopyid.constants import DEFAULT_SSH_DSA from msshcopyid.constants import DEFAULT_S...
mit
-8,442,804,895,174,885,000
41.63964
120
0.584196
false
oneraghavan/portcache
setup.py
1
2150
from setuptools import setup setup(name='portcache', version='0.3 ', description='A simple cache for port from remote service', url='https://github.com/oneraghavan/portcache', author='Raghavan', author_email='oneraghavan@gmail.com', license='MIT', packages=['portcache'],...
mit
51,269,814,623,588,696
50.190476
156
0.596279
false
phil65/KodiDevKit
script.py
1
3245
# -*- coding: utf8 -*- # Copyright (C) 2017 - Philipp Temminghoff <phil65@kodi.tv> # This program is Free Software see LICENSE file for details import os import sys import codecs import logging RESULTS_FILE = "results.txt" settings = {"kodi_path": "C:/Kodi", "portable_mode": True, "language_...
gpl-3.0
-1,780,904,815,994,852,400
35.460674
111
0.572265
false
Abjad/abjad
tests/test_NumberedPitchClass.py
1
1452
import typing import pytest import abjad values: typing.List[typing.Tuple] = [] values.extend((x / 2, (x / 2) % 12) for x in range(-48, 49)) values.extend( [ ("bf,", 10), ("c'", 0), ("cs'", 1), ("gff''", 5), ("", 0), ("dss,,", 4), ("fake", ValueError), ...
gpl-3.0
-7,251,316,322,670,107,000
27.470588
62
0.522039
false
seecr/meresco-solr
meresco/solr/fields2solrdoc.py
1
2921
## begin license ## # # "Meresco Solr" is a set of components and tools # to integrate Solr into "Meresco." # # Copyright (C) 2011-2013 Seecr (Seek You Too B.V.) http://seecr.nl # Copyright (C) 2012 SURF http://www.surf.nl # Copyright (C) 2012-2013 Stichting Kennisnet http://www.kennisnet.nl # # This file is part of "...
gpl-2.0
5,766,375,609,882,647,000
40.140845
121
0.6734
false
lasote/conan
conans/client/cmd/new.py
1
9249
import re from conans.errors import ConanException from conans.model.ref import ConanFileReference from conans.client.cmd.new_ci import ci_get_files conanfile = """from conans import ConanFile, CMake, tools class {package_name}Conan(ConanFile): name = "{name}" version = "{version}" license = "<Put the p...
mit
-2,767,009,680,822,622,700
32.51087
112
0.601362
false
grschafer/BejeweledBot
train/agent.py
1
2406
from pybrain.rl.agents.logging import LoggingAgent from pybrain.rl.agents.learning import LearningAgent from scipy import where from random import choice class BejeweledAgent(LearningAgent): def getAction(self): # get best action for every state observation # overlay all action values for every st...
mit
1,512,328,622,695,829,200
41.210526
88
0.618038
false
annahs/atmos_research
LEO_calc_coating_from_meas_scat_amp_and_write_to_db.py
1
3857
import sys import os import datetime import pickle import numpy as np import matplotlib.pyplot as plt from pprint import pprint import sqlite3 import calendar from datetime import datetime #id INTEGER PRIMARY KEY AUTOINCREMENT, #sp2b_file TEXT, #file_index INT, #instr TEXT, #instr_locn TEXT, #particle_type TEXT, #...
mit
-3,604,193,547,735,604,000
29.611111
207
0.721027
false
LPgenerator/django-cacheops
cacheops/redis.py
1
3494
from __future__ import absolute_import import warnings from contextlib import contextmanager import six from funcy import decorator, identity, memoize, LazyObject import redis from redis.sentinel import Sentinel from .conf import settings if settings.CACHEOPS_DEGRADE_ON_FAILURE: @decorator def handle_connect...
bsd-3-clause
-5,793,251,046,439,883,000
29.382609
93
0.591013
false
rhhayward/podcast_generator
podcast_generator/PodcastCreator.py
1
4935
import urllib.request as urllib from lxml import etree import os from os.path import basename from urllib.parse import urlparse ### PodcastCreator is the class that ### takes a set of downloaders, ### sets their settings, takes ### their downloaded files and ### makes them into an rss file ### for use with p...
gpl-3.0
4,101,729,319,851,635,700
34.25
102
0.61459
false
RedHatQE/cfme_tests
cfme/tests/automate/custom_button/test_service_objects.py
1
25666
import fauxfactory import pytest from widgetastic_patternfly import Dropdown from cfme.services.myservice import MyService from cfme.tests.automate.custom_button import CustomButtonSSUIDropdwon from cfme.tests.automate.custom_button import log_request_check from cfme.tests.automate.custom_button import TextInputDialog...
gpl-2.0
6,226,643,836,394,651,000
35.149296
99
0.614237
false
cefn/firmware-codesign-readinglog
ui/index.py
1
2487
#!/usr/bin/python import sys,os,glob,urlparse,urllib,subprocess def setcwd(): realpath = os.path.realpath(sys.argv[0]) dname = os.path.dirname(realpath) os.chdir(dname) # sets working directory based on path to index.py setcwd() # loads local python modules, relative to index.py sys.path.append(os.path....
mit
-1,832,972,551,694,617,600
24.916667
112
0.657821
false
jason-neal/spectrum_overload
spectrum_overload/differential.py
1
1536
# -*- coding: utf-8 -*- """Differential Class which takes the difference between two spectra.""" from typing import Any, Dict, Optional from spectrum_overload.spectrum import Spectrum # TODO: Add in s-profile from # Ferluga 1997: Separating the spectra of binary stars-I. A simple method: Secondary reconstruction c...
mit
1,857,235,720,947,687,000
31.680851
99
0.646484
false
sidrakesh93/grpc-tools
benchmarking/performance_db/performance_db_frontend/app/views.py
1
3289
# # Copyright 2015 Google Inc. All Rights Reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the fo...
bsd-3-clause
2,365,342,280,328,738,000
35.544444
79
0.725753
false
great-expectations/great_expectations
great_expectations/expectations/core/expect_column_values_to_be_in_type_list.py
1
17690
import logging from typing import Dict, Optional import numpy as np import pandas as pd from great_expectations.core import ExpectationConfiguration from great_expectations.exceptions import InvalidExpectationConfigurationError from great_expectations.execution_engine import ( ExecutionEngine, PandasExecution...
apache-2.0
-3,555,744,648,507,275,300
40.721698
120
0.585246
false
SU-ECE-17-7/ibeis
ibeis/algo/hots/word_index.py
1
9442
# -*- coding: utf-8 -*- """ TODO: DEPRICATE OR REFACTOR INTO SMK python -c "import doctest, ibeis; print(doctest.testmod(ibeis.algo.hots.word_index))" python -m doctest -v ibeis/algo/hots/word_index.py python -m doctest ibeis/algo/hots/word_index.py """ from __future__ import absolute_import, division, print_function ...
apache-2.0
-6,176,846,014,270,310,000
35.7393
108
0.596484
false
faneshion/MatchZoo
matchzoo/engine/base_preprocessor.py
1
4116
""":class:`BasePreprocessor` define input and ouutput for processors.""" import abc import functools import typing from pathlib import Path import dill import matchzoo as mz def validate_context(func): """Validate context in the preprocessor.""" @functools.wraps(func) def transform_wrapper(self, *args...
apache-2.0
-928,447,038,971,826,800
28.191489
78
0.622449
false
bolkedebruin/airflow
airflow/operators/hive_stats_operator.py
1
1212
# -*- 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,665,886,250,090,306,000
40.793103
98
0.768977
false
domeger/SplunkTAforPuppetEnterprise
bin/SplunkTAforPuppetEnterprise_rh_puppet_enterprise_overview_enforcement.py
1
1978
import splunktaforpuppetenterprise_declare from splunktaucclib.rest_handler.endpoint import ( field, validator, RestModel, DataInputModel, ) from splunktaucclib.rest_handler import admin_external, util from splunk_aoblib.rest_migration import ConfigMigrationHandler util.remove_http_proxy_env_vars() ...
apache-2.0
2,639,743,791,885,354,000
19.183673
63
0.5364
false
hugdiniz/anuarioDjango
yearbook/migrations/0005_auto_20141214_0017.py
1
1444
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('yearbook', '0004_auto_20141212_1558'), ] operations = [ migrations.RemoveField( model_name='lotacao', ...
gpl-2.0
-4,371,260,729,932,835,000
31.088889
113
0.572022
false
MeteorKepler/RICGA
ricga/eval_tools/pycocoevalcap/tokenizer/ptbtokenizer.py
1
2833
#!/usr/bin/env python # # File Name : ptbtokenizer.py # # Description : Do the PTB Tokenization and remove punctuations. # # Creation Date : 29-12-2014 # Last Modified : Thu Mar 19 09:53:35 2015 # Authors : Hao Fang <hfang@uw.edu> and Tsung-Yi Lin <tl483@cornell.edu> import os import subprocess import tempfile # pat...
apache-2.0
4,010,289,009,320,253,400
41.283582
114
0.484998
false
frederica07/Dragon_Programming_Process
PyOpenGL-3.0.2/OpenGL/GL/ARB/robustness_isolation.py
1
1333
'''OpenGL extension ARB.robustness_isolation This module customises the behaviour of the OpenGL.raw.GL.ARB.robustness_isolation to provide a more Python-friendly API Overview (from the spec) GL_ARB_robustness and supporting window system extensions allow creating an OpenGL context supporting graphics reset noti...
bsd-2-clause
-7,856,028,671,895,230,000
40.6875
67
0.814704
false
guoxiaoyong/simple-useful
cxx_learn/cronx/spider/spider_daily_ftse100.py
2
2199
#!/usr/bin/python # -*- coding: utf-8 -*- import urllib2; import re; import string; import sys; from BeautifulSoup import BeautifulSoup month_num = { 'Jan' : '01', 'Feb' : '02', 'Mar' : '03', 'Apr' : '04', 'May' : '05', 'Jun' : '06', 'Jul' : '07', 'Aug' : '08', 'Sep' : '09', 'Oct' : '10', 'Nov' : ...
cc0-1.0
-2,231,879,005,828,900,900
29.123288
108
0.612551
false
YAmikep/django-xmlmapping
setup.py
1
3687
""" Based entirely on Django's own ``setup.py`` for now. """ from distutils.core import setup from distutils.command.install_data import install_data from distutils.command.install import INSTALL_SCHEMES import os import sys class osx_install_data(install_data): # On MacOS, the platform-specific lib di...
bsd-3-clause
3,709,194,845,001,403,000
35.622449
106
0.652834
false
aewallin/openvoronoi
python_examples/line-segment/lineseg_3.py
1
4439
import openvoronoi as ovd import ovdvtk import time import vtk import datetime import math import random import os def drawLine(myscreen, p1, p2): myscreen.addActor(ovdvtk.Line(p1=(p1.x, p1.y, 0), p2=(p2.x, p2.y, 0), color=ovdvtk.yellow)) def writeFrame(w2if, lwr, n): w2if.Modified() current_dir = os.g...
lgpl-2.1
1,067,751,821,632,725,200
24.80814
95
0.573327
false
ebrelsford/django-phillydata
phillydata/opa/migrations/0001_initial.py
1
3517
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('owners', '0001_initial'), ] operations = [ migrations.CreateModel( name='AccountOwner', fields=[ ...
bsd-3-clause
-6,894,110,242,630,896,000
70.77551
220
0.637475
false
ncullen93/pyBN
pyBN/inference/marginal_exact/exact_bp.py
1
2676
__author__ = """N. Cullen <ncullen.th@dartmouth.edu>""" from pyBN.classes.factor import Factor from pyBN.classes.factorization import Factorization from pyBN.utils.graph import * from copy import deepcopy, copy import numpy as np import json def exact_bp(bn, target=None, evidence=None, downward_pass=False): """ ...
mit
-26,576,409,045,976,944
26.885417
70
0.705531
false
clody23/MToolBox
MToolBox/mt-classifier.py
1
13234
#!/usr/bin/env python import getopt, sys, re, os, glob, csv from classifier import tree, NGclassify, consts, datatypes, parse_mhcs from bioinf.seqs import SeqList import io_modules.csv import io_modules.old_table import io_modules.serialize import os.path # folder where to find data for haplogroup classification and...
gpl-3.0
-3,761,935,509,628,710,000
37.58309
164
0.65241
false
ianrust/coinbase_autotrader
automated_bittrader.py
1
4459
import json,urllib2,csv,time,smtplib,string,os os.chdir('/home/ian/Documents') # Buy and sell urls sell_url = "https://coinbase.com/api/v1/sells" buy_url = "https://coinbase.com/api/v1/buys" sell_price_url = "https://coinbase.com/api/v1/prices/sell" buy_price_url = "https://coinbase.com/api/v1/prices/buy" headers = {...
mit
3,535,470,929,085,376,500
35.85124
372
0.742095
false
EmanueleCannizzaro/scons
src/engine/SCons/Tool/JavaCommonTests.py
1
14898
# # 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 rights to use, copy, modify, merge...
mit
2,604,112,111,457,939,000
24.597938
133
0.541616
false
drcoms/jlu-drcom-client
jlu-drcom-py3/newclinet-py3.py
1
12355
#!/usr/bin/env python # coding: utf-8 # license: AGPL-V3 import re import socket import struct import time from hashlib import md5 import sys import os import random import platform # CONFIG server = '10.100.61.3' username = b'XXXXX' # 用户名 password = b'XXXXX' ...
agpl-3.0
-4,541,838,971,522,397,000
30.159898
175
0.531237
false
lizardsystem/lizard-layers
lizard_layers/migrations/0005_auto__add_field_areavalue_flag__add_field_areavalue_comment.py
1
13178
# 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 'AreaValue.flag' db.add_column('lizard_layers_areavalue', 'flag', self.gf('django.db.models...
gpl-3.0
-7,289,027,439,874,857,000
76.976331
182
0.550159
false
fametrano/BitcoinBlockchainTechnology
btclib/rfc6979.py
1
4053
#!/usr/bin/env python3 # Copyright (C) 2017-2020 The btclib developers # # This file is part of btclib. It is subject to the license terms in the # LICENSE file found in the top-level directory of this distribution. # # No part of btclib including this file, may be copied, modified, propagated, # or distributed except...
mit
-3,713,050,999,322,462,700
37.6
77
0.668887
false
spaghetti-/rosdep
src/rosdep2/platforms/arch.py
1
3009
#!/usr/bin/env python # Copyright (c) 2009, Willow Garage, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # n...
bsd-3-clause
6,367,772,519,631,742,000
40.791667
99
0.730808
false
vlas-sokolov/multicube
multicube/astro_toolbox.py
1
5386
import numpy as np from astropy.io import fits import os # TODO: rewrite this to have multiple components generated here. # Having a bundle of test filaments would be very nice. def make_test_cube(shape=(30,9,9), outfile='test.fits', sigma=None, seed=0, writeSN=False ): """ Generate...
mit
4,295,004,884,687,607,000
34.202614
76
0.615856
false
mitodl/micromasters
micromasters/settings.py
1
21620
""" Django settings for MicroMasters. """ import logging import os import platform from urllib.parse import urljoin import dj_database_url from celery.schedules import crontab from django.core.exceptions import ImproperlyConfigured from micromasters.envs import ( get_any, get_bool, get_int, get_list_of...
bsd-3-clause
-1,614,179,403,656,989,200
33.208861
115
0.673312
false
flavour/tldrmp
modules/s3db/survey.py
1
135539
# -*- coding: utf-8 -*- """ Sahana Eden Survey Tool @copyright: 2011-2013 (c) Sahana Software Foundation @license: MIT ADAT - Assessment Data Analysis Tool For more details see the blueprint at: http://eden.sahanafoundation.org/wiki/BluePrint/SurveyTool/ADAT Permission is hereby granted, fr...
mit
4,581,564,324,637,390,300
38.911366
195
0.471481
false
AIFDR/inasafe-django
django_project/realtime/migrations/0050_reporttemplate.py
2
1641
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('realtime', '0049_auto_20180320_0406'), ] operations = [ migrations.CreateModel( name='ReportTemplate', ...
bsd-2-clause
-3,155,160,990,121,272,300
53.7
176
0.622182
false
supernifty/mgsa
mgsa/analyze_bam.py
1
2071
import argparse import collections import numpy import sys import bio import config parser = argparse.ArgumentParser(description='Analyze BAM') parser.add_argument('bam', metavar='bam', help='bam file to analyze') parser.add_argument('--buckets', metavar='buckets', type=int, default=10, help='number of buckets') par...
mit
6,292,994,006,158,052,000
45.022222
123
0.649445
false
minlexx/pyevemon
esi_client/models/get_characters_character_id_mail_labels_forbidden.py
1
3097
# coding: utf-8 """ EVE Swagger Interface An OpenAPI for EVE Online OpenAPI spec version: 0.4.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class GetCharactersCharacterIdMailLabelsForbidden(object): "...
gpl-3.0
-9,000,179,383,787,860,000
25.470085
84
0.539554
false
jortel/gofer
test/unit/messaging/adapter/amqp/test_model.py
1
5194
# Copyright (c) 2014 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied, # including the impl...
lgpl-2.1
-3,331,366,972,671,112,700
32.294872
96
0.652869
false
dafrito/trac-mirror
trac/ticket/default_workflow.py
1
21721
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2009 Edgewall Software # Copyright (C) 2006 Alec Thomas # Copyright (C) 2007 Eli Carter # Copyright (C) 2007 Christian Boos <cboos@edgewall.org> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part ...
bsd-3-clause
-5,058,617,368,730,896,000
42.268924
79
0.569173
false
cs207-project/TimeSeries
procs/_corr.py
1
4794
import numpy.fft as nfft import numpy as np import timeseries as ts from scipy.stats import norm # import pyfftw import sys #sys.path.append("/Users/yuhantang/CS207/TimeSeries/procs") from .interface import * def createfromlist(l): d = new_darray(len(l)) for i in range(0,len(l)): darray_set(d,i,l[i]) ...
mit
2,104,750,453,322,507,300
29.929032
103
0.623905
false
benjaminoh1/tensorflowcookbook
Chapter 07/bag_of_words.py
1
6082
# Working with Bag of Words #--------------------------------------- # # In this example, we will download and preprocess the ham/spam # text data. We will then use a one-hot-encoding to make a # bag of words set of features to use in logistic regression. # # We will use these one-hot-vectors for logistic regression...
mit
-8,116,889,667,283,109,000
33.5625
101
0.694015
false
antiface/ThinkBayes2
code/cookie3.py
1
1095
"""This file contains code for use with "Think Bayes", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function, division import thinkbayes2 class Cookie(thinkbayes2.Suite): """A map fro...
gpl-2.0
7,652,526,682,298,288,000
23.333333
60
0.628311
false
dvro/scikit-protopy
protopy/base.py
1
4528
"""Base and mixin classes for instance reduction techniques""" # Author: Dayvid Victor <dvro@cin.ufpe.br> # License: BSD Style import warnings from abc import ABCMeta, abstractmethod from sklearn.base import BaseEstimator, ClassifierMixin from sklearn.neighbors.classification import KNeighborsClassifier from sklearn...
bsd-2-clause
-6,141,545,886,733,990,000
28.38961
79
0.607601
false
vguzmanp/cloud-in-one
main_crypto.py
1
1392
#!/usr/bin/env python3 import getpass import argparse import shutil from core.databaseManager import DatabaseManager from core.securityModule import SecurityModule def processFile(file_in_name, file_out_name, encrypt_flag): user = input("CLOUD-IN-ONE Username: ") password = getpass.getpass() databaseMa...
mit
120,298,394,218,790,240
28
75
0.666667
false
PaesslerAG/django-performance-testing
settings.py
1
1267
# Django settings for autodata project. DEBUG = True TEMPLATE_DEBUG = DEBUG TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ # Insert your TEMPLATE_CONTEXT_PR...
bsd-3-clause
3,754,765,840,320,147,000
27.155556
78
0.598264
false
TestInABox/openstackinabox
openstackinabox/tests/services/cinder/v1/volumes/test_retrieve.py
1
1154
""" """ import unittest import requests import stackinabox.util.requests_mock.core from stackinabox.stack import StackInABox from openstackinabox.services.cinder import CinderV1Service from openstackinabox.services.keystone import KeystoneV2Service class TestCinderV1Retrieve(unittest.TestCase): def setUp(self)...
apache-2.0
-2,659,424,865,563,916,000
30.189189
75
0.672444
false
owlabs/incubator-airflow
airflow/models/taskreschedule.py
1
3374
# -*- 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
-3,710,862,593,287,448,000
38.694118
83
0.648785
false
cykerway/wmwm
setup.py
1
7315
#!/usr/bin/env python3 ''' setuptools based setup module; see <https://packaging.python.org/en/latest/distributing.html>; ''' from os import path from setuptools import find_packages from setuptools import setup here = path.abspath(path.dirname(__file__)) ## get long description from readme file; with open(path.j...
gpl-3.0
-8,959,277,930,186,001,000
30.530172
136
0.579357
false
nicko96/Chrome-Infra
glyco/glucose/install.py
1
8024
# Copyright 2015 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. import hashlib import httplib2 import logging import os import sys import urllib from glucose import util LOGGER = logging.getLogger(__name__) DEFAULT_CAC...
bsd-3-clause
3,545,463,092,387,777,500
32.157025
80
0.61154
false
google-research/google-research
fairness_teaching/baseline/all_real.py
1
5585
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
-3,787,352,119,502,906,000
45.157025
137
0.669651
false
laumann/servo
components/script/dom/bindings/codegen/CodegenRust.py
1
243619
# 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/. # Common codegen classes. from collections import defaultdict import operator import re import string import textwrap ...
mpl-2.0
7,539,845,005,135,834,000
38.54212
119
0.575087
false
rwl/puddle
puddle/resource/action/properties_action.py
1
3749
#------------------------------------------------------------------------------ # Copyright (C) 2009 Richard W. Lincoln # # 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 restrictio...
mit
-6,371,690,640,377,739,000
41.123596
79
0.51107
false