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
jieyu/maple
script/maple/benchmark/aget_bug2_training.py
1
1607
"""Copyright 2011 The University of Michigan 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 writi...
apache-2.0
-3,940,439,966,726,479,400
31.14
126
0.667082
false
al8/raspberrypi-photosensor
photosensor.py
1
2036
#!/usr/bin/env python from __future__ import print_function # Example for RC timing reading for Raspberry Pi # Must be used with GPIO 0.3.1a or later - earlier verions # are not fast enough! import argparse import time import sys import atexit import RPi.GPIO as GPIO GPIO.setmode(GPIO.BCM) g_RCpin = None def R...
mit
-7,217,418,351,592,861,000
31.83871
164
0.641454
false
oseledets/pybtex
pybtex/style/labels/alpha.py
1
6453
# -*- coding: utf-8 -*- # Copyright (c) 2010, 2011, 2012 Andrey Golovizin # # 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...
mit
3,171,189,926,441,258,500
36.511628
79
0.566491
false
alisheykhi/SocialPDA
Degree_Anonimity.py
1
2374
from graph_util import ReadGraph from micro_pda import MicroPDA from particle_pda1 import ParticlePDA from swarm_pda import SwarmPDA from Measurments import measurmnets import time import datetime import pymysql import json # avg , std , best for 30 times run, # file name = datasetName_Beta_k_Delta_l # levels = low, ...
apache-2.0
-1,964,974,860,067,055,400
33.926471
152
0.680286
false
willprice/arduino-sphere-project
scripts/example_direction_finder/temboo/Library/Fitbit/Activities/GetActivityWeeklyGoals.py
1
4593
# -*- coding: utf-8 -*- ############################################################################### # # GetActivityWeeklyGoals # Get a user's current weekly activity goals. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
gpl-2.0
-8,695,528,798,487,133,000
41.925234
209
0.689092
false
DoubleGremlin181/Scripting
Wikipedia.py
1
1131
#A script to check if any two wikipedia pages have any common wiki links #TODO: Check on multiple levels, i.e. check if any of the linked wikis on the pages have a common wiki link import requests import wikipedia from bs4 import BeautifulSoup def get_list(page): links_page=["/wiki/"+page.split("/")[4]] dat...
gpl-3.0
-1,919,865,110,978,478,600
25.302326
107
0.641026
false
f-prettyland/angr
angr/exploration_techniques/tracer.py
1
16414
import os import logging import claripy from . import ExplorationTechnique, Cacher from .. import BP_BEFORE from ..calling_conventions import SYSCALL_CC from ..errors import AngrTracerError, SimMemoryError, SimEngineError from ..storage.file import SimFile l = logging.getLogger("angr.exploration_techniques.tracer")...
bsd-2-clause
2,718,564,388,932,743,000
42.42328
133
0.569148
false
antoine-de/navitia
source/jormungandr/jormungandr/interfaces/v1/Coord.py
1
3363
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
agpl-3.0
307,073,991,383,605,900
37.655172
99
0.627119
false
stdlib-js/stdlib
lib/node_modules/@stdlib/math/base/special/riemann-zeta/benchmark/python/scipy/benchmark.py
1
2194
#!/usr/bin/env python # # @license Apache-2.0 # # Copyright (c) 2018 The Stdlib 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 # # ...
apache-2.0
1,624,637,104,917,445,400
21.618557
74
0.628532
false
dblia/nosql-ganeti
lib/objects.py
1
62582
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google 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 later...
gpl-2.0
-6,233,949,203,984,161,000
27.919593
80
0.644546
false
DarthMaulware/EquationGroupLeaks
Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/lib-tk/tkColorChooser.py
1
1064
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: tkColorChooser.py from tkCommonDialog import Dialog class Chooser(Dialog): """Ask for a color""" command = 'tk_chooseColor' def _fixopt...
unlicense
8,246,888,322,872,728,000
26.307692
70
0.56485
false
frederica07/Dragon_Programming_Process
PyOpenGL-3.0.2/OpenGL/GL/ARB/multi_draw_indirect.py
1
1260
'''OpenGL extension ARB.multi_draw_indirect This module customises the behaviour of the OpenGL.raw.GL.ARB.multi_draw_indirect to provide a more Python-friendly API Overview (from the spec) The ARB_draw_indirect extension (included in OpenGL 4.0) introduced mechanisms whereby the parameters for a draw function m...
bsd-2-clause
-8,670,190,848,074,992,000
42.482759
75
0.807937
false
fungusakafungus/cloudformation-jsonschema
tests/test_examples.py
1
1130
import json import pytest import glob import val schema = json.load(open('schema.json')) @pytest.mark.parametrize("template", glob.glob('tests/examples-*/*.template')) def test_template(template): if 'troposphere/EMR_Cluster' in template: pytest.skip('troposphere/EMR_Cluster uses undocumented AWS::EMR::...
mit
-5,412,805,403,236,675,000
27.974359
99
0.717699
false
hilljb/pyclojure
pyclojure/clojure.py
1
2708
#!/usr/bin/python2 """ A Python module wrapping nrepl to interact with a Leiningen Clojure REPL. Some notes: - All return values are unicode objects inside a dictionary. - You need to explicitly kill the repl before exiting. Example: >>> import clojure >>> repl = clojure.NREPL() nREPL server started on port 57041 on...
epl-1.0
-8,702,635,536,927,137,000
26.08
92
0.553176
false
aewallin/opencamlib
examples/python/waterline/waterline_2_tux_adapt.py
1
3113
import ocl import camvtk import time import vtk import datetime import math def drawLoops(myscreen, loops, loopcolor): nloop = 0 for lop in loops: n = 0 N = len(lop) first_point=ocl.Point(-1,-1,5) previous=ocl.Point(-1,-1,5) for p in lop: if n==0: # don't dra...
lgpl-2.1
-864,676,445,629,931,900
30.444444
138
0.592033
false
hackfestca/cnb
cnb/modAvailable/CNBMMChuckKukDo.py
1
1398
#!/usr/bin/python # -*- coding: utf-8 -*- ''' CNB Matrix Module - chuckkukdo ''' from cnb.cnbMatrixModule import CNBMatrixModule class CNBMMChuckKukDo(CNBMatrixModule): """ """ name = 'chuckkukdo' usage = 'chuckkukdo' desc = 'Print the Chuck Kuk Do (http://en.wikipedia.org/wiki/Chun_Kuk_Do)' ...
gpl-3.0
5,698,115,309,628,994,000
33.097561
133
0.679542
false
krishnab-datakind/mining-data-acquisition
data_gather/PackageConstants.py
1
4082
#!/usr/bin/python """ Package constants """ ## MIT License ## ## Copyright (c) 2017, krishna bhogaonker ## 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 wit...
mit
-3,745,854,114,414,277,600
48.780488
463
0.430671
false
quentinhardy/odat
HttpUriType.py
1
3512
#!/usr/bin/python # -*- coding: utf-8 -*- from Http import Http import logging from Utils import ErrorSQLRequest, checkOptionsGivenByTheUser from Constants import * class HttpUriType (Http): ''' Allow the user to send HTTP request ''' def __init__(self,args): ''' Constructor ''' logging.debug("HttpUriTyp...
lgpl-3.0
-7,563,020,273,250,675,000
36.763441
133
0.687927
false
popazerty/dvbapp-gui2
skin.py
1
33432
from Tools.Profile import profile profile("LOAD:ElementTree") import xml.etree.cElementTree import os profile("LOAD:enigma_skin") from enigma import eSize, ePoint, eRect, gFont, eWindow, eLabel, ePixmap, eWindowStyleManager, addFont, gRGB, eWindowStyleSkinned, getDesktop from Components.config import ConfigSubsection,...
gpl-2.0
5,488,487,470,184,430,000
32.465465
231
0.679559
false
filannim/ManTIME
mantime/settings.py
1
1226
#!/usr/bin/env python # # Copyright 2014 Michele Filannino # # gnTEAM, School of Computer Science, University of Manchester. # All rights reserved. This program and the accompanying materials # are made available under the terms of the GNU General Public License. # # author: Michele Filannino # email: fila...
bsd-2-clause
6,687,968,761,473,981,000
37.3125
78
0.730016
false
seomoz/roger-mesos-tools
bin/roger.py
1
2779
#!/usr/bin/python from __future__ import print_function import os import sys import subprocess import re import importlib from cli.utils import Utils def print_help_opt(opt, desc): print(" {} {}".format(opt.ljust(13), desc)) def roger_help(root, commands): print("usage: roger [-h] [-v] command [arg...]\n...
apache-2.0
-4,948,606,142,957,857,000
30.224719
79
0.592659
false
rkh/travispy
setup.py
1
1655
from setuptools import setup from setuptools.command.test import test as TestCommand import sys class PyTest(TestCommand): user_options = [('pytest-args=', 'a', 'Arguments to pass to py.test')] def initialize_options(self): TestCommand.initialize_options(self) self.pytest_args = [] def ...
gpl-3.0
-2,048,252,582,661,187,300
29.090909
75
0.622961
false
jegger/kivy
kivy/tests/test_uix_textinput.py
1
2204
''' uix.textinput tests ======================== ''' import unittest from kivy.tests.common import GraphicUnitTest from kivy.uix.textinput import TextInput class TextInputTest(unittest.TestCase): def test_focusable_when_disabled(self): ti = TextInput() ti.disabled = True ti.focused = Tr...
mit
-2,391,985,931,788,283,000
25.878049
79
0.582123
false
AllanYangZhou/oppia
core/domain/collection_jobs_one_off.py
1
3306
# coding: utf-8 # # Copyright 2017 The Oppia Authors. 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 requi...
apache-2.0
595,232,431,969,137,900
37
79
0.662432
false
UniPiTechnology/evok
tornadorpc_evok/base.py
1
13270
""" ============================ Base RPC Handler for Tornado ============================ This is a basic server implementation, designed for use within the Tornado framework. The classes in this library should not be used directly, but rather though the XML or JSON RPC implementations. You can use the utility functio...
apache-2.0
1,557,004,587,630,101,800
31.208738
89
0.597589
false
0verchenko/Utils
googleapis_mock.py
1
5420
import random import json import datetime import ssl from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer def change_host_file_configuration(for_disabling=False, path_to_hosts_file='C:\\Windows\\System32\\drivers\\etc\\hosts'): def check_if_hosts_file_hacked(path='C:\\Windows\\System32\\drivers\\etc\\hos...
apache-2.0
-5,844,384,114,319,613,000
43.065041
128
0.537823
false
softelnet/sponge
sponge-kb/sponge-kb-designer/src/main/resources/sponge/designer/storage.py
1
1331
""" Sponge Knowledge Base WARNING: THIS IS A WORK IN PROGRESS! """ from org.openksavi.sponge.core.action import BaseActionMeta, BaseActionBuilder from java.util.concurrent.atomic import AtomicInteger from java.util.concurrent import CopyOnWriteArrayList import re def onInit(): global STORAGE STORAGE = creat...
apache-2.0
5,470,633,246,581,718,000
29.953488
125
0.700225
false
spacy-io/spaCy
spacy/tests/test_cli.py
1
16278
import pytest from click import NoSuchOption from spacy.training import docs_to_json, offsets_to_biluo_tags from spacy.training.converters import iob_to_docs, conll_ner_to_docs, conllu_to_docs from spacy.schemas import ProjectConfigSchema, RecommendationSchema, validate from spacy.lang.nl import Dutch from spacy.util i...
mit
-3,833,332,398,481,140,700
36.648148
128
0.555337
false
timkofu/jobhuntr
search/tests.py
1
1257
from webtest import TestApp from jobhuntr.wsgi import application from django.test import TestCase from django.test import Client from django.utils.six import StringIO from django.urls import reverse from django.core.management import call_command from django.test.utils import setup_test_environment #setup_test_envir...
mit
1,716,138,064,455,852,300
29.658537
79
0.682578
false
AerisCloud/AerisCloud
aeriscloud/s3.py
1
2331
import math import requests import time import xml.etree.ElementTree as ET # from .config import config class S3: def __init__(self, bucket, endpoint_url=None): """ The S3 class provides methods to manage files from a bucket. :param bucket: The bucket to use :type bucket: String ...
mit
3,940,088,200,830,511,600
27.084337
70
0.517375
false
GNOME/gedit-latex
latex/latex/completion.py
1
12450
# -*- coding: utf-8 -*- # This file is part of the Gedit LaTeX Plugin # # Copyright (C) 2010 Michael Zeising # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public Licence as published by the Free Software # Foundation; either version 2 of the Licence, o...
gpl-3.0
2,227,404,283,291,466,000
30.518987
130
0.592048
false
uranusjr/pystandardpaths
standardpaths/base.py
1
7132
#!/usr/bin/env python # -*- coding: utf-8 -*- import enum import importlib import platform class Location(enum.Enum): """Describe the different locations that can be queried using functions such as :func:`.get_writable_path` and :func:`.get_standard_paths`. Some of the values in this enum represent a us...
bsd-3-clause
6,039,331,955,097,506,000
33.454106
79
0.695177
false
Psycojoker/dierentheater
scraper/utils.py
1
4715
# -*- coding:Utf-8 -*- # Dieren Theater - lachambre.be to json sausage machine # Copyright (C) 2012 Laurent Peuch <cortex@worlddomination.be> # # 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 ...
agpl-3.0
1,099,140,688,297,136,500
29.419355
92
0.577943
false
agx/git-buildpackage
tests/testutils/debiangittestrepo.py
1
1333
# vim: set fileencoding=utf-8 : from .. import context import os import unittest import gbp.deb.git class DebianGitTestRepo(unittest.TestCase): """Scratch repo for a single unit test""" def setUp(self, repo_cls=None): name = 'test_repo' self.tmpdir = context.new_tmpdir(__name__) i...
gpl-2.0
3,140,142,410,044,956,000
27.361702
70
0.602401
false
pablocscode/TFG-CAEBAT
representacion2.0.py
1
3399
# -*- coding: utf-8 -*- """ Created on Mon Apr 10 10:14:31 2017 @author: Pablo Objetivos: -Representar de forma dinámica los resultados del archivo profiles.out para cualquier tiempo Guía: -Este script debe encontrarse en la misma carpeta que los archivos profiles.out y halfcells.out """ import numpy as ...
gpl-3.0
-8,595,424,597,173,040
28.781818
95
0.661843
false
EmreAtes/spack
lib/spack/spack/build_systems/autotools.py
1
19376
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-7,559,344,240,667,162,000
40.848812
111
0.566887
false
imageio/imageio
setup.py
1
6721
# -*- coding: utf-8 -*- # Copyright (C) 2014-2020, imageio contributors # # imageio is distributed under the terms of the (new) BSD License. # The full license can be found in 'license.txt'. # styletest: skip """ Release: * Write release notes * Increase __version__ * git tag the release (and push the tag to ...
bsd-2-clause
234,741,061,991,115,100
27.478814
118
0.635768
false
TYPO3-Documentation/sphinxcontrib.t3tablerows
setup.py
1
2480
from __future__ import absolute_import from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file with open(path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f: long_description = f.re...
bsd-2-clause
3,198,431,805,503,910,000
33.929577
98
0.674597
false
ohrstrom/obp-media-preflight-api
app/preflight/models.py
1
3533
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.utils.encoding import python_2_unicode_compatible import logging import os import uuid import hashlib from datetime import timedelta from django.db import models from django.db.models.signals import post_save, pre_save, post_delete from djang...
gpl-3.0
2,993,727,627,394,881,000
26.387597
85
0.658081
false
googleapis/googleapis-gen
google/cloud/videointelligence/v1/videointelligence-v1-py/google/cloud/videointelligence_v1/__init__.py
1
4435
# -*- 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
3,950,516,235,427,323,400
37.232759
84
0.842165
false
chris-ch/myledger-online-bookkeeping
_old/server/src/oas/models.py
1
16991
""" Django model for OAS. CREATE DATABASE IF NOT EXISTS `accounting` CHARACTER SET utf8 COLLATE utf8_general_ci; USE `accounting`; -- at this point run manage.py syncdb DROP TABLE IF EXISTS `oas_template_journal_entry`; DROP TABLE IF EXISTS `oas_template_journal_entry_group`; DROP TABLE IF EXISTS `oas_template_name...
mit
1,577,952,250,280,129,500
38.331019
117
0.682244
false
sadikovi/queue
test/__init__.py
1
2186
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright 2016 sadikovi # # 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 requir...
apache-2.0
6,212,667,995,313,246,000
28.146667
86
0.666057
false
devilry/devilry-django
devilry/devilry_group/tests/test_feedbackfeed_builders/test_feedbackfeed_sidebarbuilder.py
1
2101
# Django imports from django.conf import settings from django.test import TestCase from django.utils import timezone from model_bakery import baker # Devilry imports from devilry.devilry_group import devilry_group_baker_factories from devilry.devilry_group.feedbackfeed_builder import builder_base from devilry.devilry_...
bsd-3-clause
577,152,114,106,916,900
45.711111
112
0.707758
false
mignev/startappsync
gitconfig/core.py
1
3702
import os import sys from re import search from gitconfig.config import ( ConfigDict, ConfigFile, ) if sys.version_info < (2, 7): from ordereddict import OrderedDict from collections import MutableMapping else: from collections import ( OrderedDict, MutableMapping, ) c...
mit
-6,701,524,496,558,599,000
28.616
82
0.567261
false
tuxxi/OpenBurn
openburn/application/propellant_db.py
1
2142
from typing import Dict import jsonpickle from qtpy.QtCore import QObject, Signal from openburn.core.propellant import OpenBurnPropellant class PropellantDatabase(QObject): database_ready = Signal() propellant_added = Signal(str) propellant_edited = Signal(str) propellant_removed = Signal(str) ...
gpl-3.0
4,604,087,554,832,698,400
32.46875
80
0.637722
false
agancsos/python
LinkedInSort_in_Python.py
1
2716
#!/bin/python class linkedinSort: project_name=\"\"; project_month=\"\"; project_year=0; def month_to_int(self): month=self.project_month; if month == \"January\": return 1; if month == \"February\": return 2; if month == \"March\": return 3; if month == \"April\": return 4;...
mit
8,169,540,432,007,339,000
28.188889
129
0.662003
false
jocelynj/weboob
weboob/applications/qhavesex/qhavesex.py
1
1273
# -*- coding: utf-8 -*- # Copyright(C) 2010 Romain Bignon # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in the hope that it will b...
gpl-3.0
7,059,353,888,160,273,000
34.361111
76
0.732129
false
mwrlabs/veripy
contrib/rfc3633/rr/basic_message_exchange.py
1
3313
from contrib.rfc3315.constants import * from contrib.rfc3633.dhcpv6_pd import DHCPv6PDHelper from scapy.all import * from veripy.assertions import * from veripy.models import IPAddress class BasicMessageExchangeTestCase(DHCPv6PDHelper): """ DHCPv6-PD Basic Message Exchange Verify that a device can proper...
gpl-3.0
-1,700,819,788,144,245,000
58.178571
170
0.699064
false
sidorov-si/ngser
filter_gbk_by_cds.py
1
3272
#!/usr/bin/env python """ Filter GBK file by CDS: retain only those records which have correct CDS. Correct CDS must: 1) contain a 'product' field; 2) have length that is a multiple of 3; 3) have start and stop codons. Usage: filter_gbk_by_cds.py -i <input_GBK_file> -o <output_GBK_file> Options: -h --help ...
gpl-2.0
-5,694,534,526,533,918,000
34.565217
97
0.587408
false
rolisz/walter_experiments
motion/control.py
1
1293
from ssc32 import * from time import sleep from smooth import getPositions # Run with sudo ssc = SSC32('/dev/ttyUSB0', 115200) ssc[0].degrees = 20 ssc[0].max = 2500 ssc[0].min = 500 ssc[0].deg_max = +90.0 ssc[0].deg_min = -90.0 #TODO: fix library so it doesn't take 100ms for the first instruction # And which overrides...
mit
2,671,244,723,943,717,400
22.089286
76
0.63109
false
pghant/big-theta
scraper/EquationScraper/pipelines.py
1
3154
# -*- coding: utf-8 -*- from py2neo import authenticate, Graph, Node, Relationship from scrapy import signals, exceptions from scrapy.exporters import JsonLinesItemExporter, PprintItemExporter from .latex import utils as latexutils class EquationscraperPipeline(object): def __init__(self): self.jsl_expo...
mit
-8,319,851,079,591,015,000
35.674419
100
0.55929
false
Teagan42/home-assistant
homeassistant/components/homekit_controller/config_flow.py
1
14739
"""Config flow to configure homekit_controller.""" import json import logging import os import re import homekit from homekit.controller.ip_implementation import IpPairing import voluptuous as vol from homeassistant import config_entries from homeassistant.core import callback from .connection import get_accessory_n...
apache-2.0
554,822,641,521,625,800
37.283117
90
0.587285
false
mmilutinovic1313/zipline-with-algorithms
tests/test_sources.py
1
7302
# # Copyright 2013 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
apache-2.0
1,614,067,241,080,615,000
40.022472
75
0.574363
false
renzon/gaecookie
setup.py
1
4928
import codecs import os import sys from distutils.util import convert_path from fnmatch import fnmatchcase from setuptools import setup, find_packages def read(fname): return codecs.open(os.path.join(os.path.dirname(__file__), fname)).read() # Provided as an attribute, so you can append to these instead # of r...
mit
6,134,216,573,355,813,000
33.950355
86
0.551136
false
peret/visualize-bovw
tests/test_caltech_manager.py
1
8382
import unittest from datamanagers.CaltechManager import CaltechManager from datamanagers import InvalidDatasetException, NoSuchCategoryException import os import numpy as np from sklearn.decomposition import PCA from test_datamanager import BASE_PATH class TestCaltechManager(unittest.TestCase): def setUp(self): ...
gpl-2.0
71,504,931,090,516,424
56.417808
117
0.620496
false
Mendelone/forex_trading
Algorithm.Python/CustomDataBitcoinAlgorithm.py
1
5264
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Li...
apache-2.0
-5,720,431,468,602,672,000
40.769841
174
0.605663
false
jiejieling/RdsMonitor
src/api/controller/BaseController.py
1
3536
from dataprovider.dataprovider import RedisLiveDataProvider import tornado.ioloop import tornado.web import dateutil.parser class BaseController(tornado.web.RequestHandler): def initialize(self): self.stats_provider = RedisLiveDataProvider().get_provider() def datetime_to_list(self, datetime): """Converts a d...
mit
2,281,642,187,381,527,300
29.222222
72
0.670532
false
Aloomaio/googleads-python-lib
examples/ad_manager/v201808/inventory_service/update_ad_units.py
1
2752
#!/usr/bin/env python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
7,114,115,951,235,613,000
32.560976
78
0.665334
false
iagcl/data_pipeline
tests/applier/data_greenplum_cdc_applier.py
1
3253
# 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 u...
apache-2.0
3,493,367,925,225,126,000
40.177215
135
0.664617
false
glts/django-progress
migrations/0002_auto__add_field_challenge_done.py
1
4079
# -*- 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 'Challenge.done' db.add_column('progress_challenge', 'done', self.gf('d...
mit
-60,077,277,886,440,990
55.666667
158
0.541554
false
google-research/google-research
bigg/bigg/torch_ops/tensor_ops.py
1
3956
# 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
5,617,877,974,705,925,000
28.969697
74
0.571284
false
PurpleMyst/porcupine
porcupine/plugins/statusbar.py
1
1725
from tkinter import ttk from porcupine import get_tab_manager, utils # i have experimented with a logging handler that displays logging # messages in the label, but it's not as good idea as it sounds like, # not all INFO messages are something that users should see all the time # this widget is kind of weird class ...
mit
-7,980,209,914,607,490,000
29.263158
79
0.628406
false
rgeorgi/intent
intent/utils/dicts.py
1
20697
""" Created on Aug 26, 2013 @author: rgeorgi """ import sys, re, unittest from collections import defaultdict, Callable, OrderedDict class CountDict(object): def __init__(self): self._dict = defaultdict(int) def add(self, key, value=1): self[key] += value def __str__(self): retu...
mit
124,940,156,392,500,220
28.152113
114
0.454172
false
shoyer/numpy
numpy/core/function_base.py
2
16480
from __future__ import division, absolute_import, print_function import functools import warnings import operator from . import numeric as _nx from .numeric import (result_type, NaN, shares_memory, MAY_SHARE_BOUNDS, TooHardError, asanyarray, ndim) from numpy.core.multiarray import add_docstring ...
bsd-3-clause
124,672,043,304,796,380
34.44086
88
0.600303
false
harikishen/addons-server
src/olympia/api/fields.py
1
10385
from django.conf import settings from django.core.exceptions import ObjectDoesNotExist, ValidationError from django.utils.encoding import smart_text from django.utils.translation import get_language, ugettext_lazy as _ from rest_framework import fields, serializers from olympia.amo.utils import to_language from olymp...
bsd-3-clause
9,180,062,847,117,697,000
37.040293
79
0.62494
false
mppmu/secdec
examples/box1L/integrate_box1L.py
1
1796
from __future__ import print_function from pySecDec.integral_interface import IntegralLibrary import sympy as sp # load c++ library box1L = IntegralLibrary('box1L/box1L_pylink.so') # choose integrator box1L.use_Vegas(flags=2) # ``flags=2``: verbose --> see Cuba manual # integrate str_integral_without_prefactor, str_...
gpl-3.0
-5,924,396,011,331,012,000
50.314286
146
0.712695
false
devicehive/devicehive-python
tests/test_api_network.py
1
17181
# Copyright (C) 2018 DataArt # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-3,097,000,737,378,666,000
38.047727
80
0.647867
false
pombredanne/unuk
src/unuk/contrib/eventweb/resources.py
1
1601
import logging from unuk.core import exceptions logger = logging.getLogger('eventweb') class WSGIResource(object): def __init__(self, server): self.server = server self.handler = server.handler def __call__(self, environ, start_response): handler = self.handler.get_ha...
bsd-3-clause
-2,716,399,108,737,009,700
32.375
76
0.571518
false
singingwolfboy/flask-dance-google
tests/conftest.py
1
1092
import os import sys from pathlib import Path import pytest from betamax import Betamax from flask_dance.consumer.storage import MemoryStorage from flask_dance.contrib.google import google toplevel = Path(__file__).parent.parent sys.path.insert(0, str(toplevel)) from google import app as flask_app, google_bp GOOGLE...
mit
2,641,468,074,866,768,400
23.818182
79
0.728022
false
hyperopt/hyperopt-nnet
hpnnet/nips2011_dbn.py
1
5468
""" Deep Belief Network (DBN) search spaces used in [1] and [2]. The functions in this file return pyll graphs that can be used as the `space` argument to e.g. `hyperopt.fmin`. The pyll graphs include hyperparameter constructs (e.g. `hyperopt.hp.uniform`) so `hyperopt.fmin` can perform hyperparameter optimization. Se...
bsd-3-clause
-6,206,191,359,409,669,000
34.051282
78
0.544989
false
petertseng/x-common
bin/check-immutability.py
1
1580
#!/usr/bin/env python import json import subprocess import sys oldf = sys.argv[1] newf = sys.argv[2] immutable_keys = ('property', 'input', 'expected') # Use jq to flatten the test data, and parse it old = json.loads(subprocess.run([f"jq -r '[.. | objects | select(.uuid != null)]' {oldf}"], stdout=subprocess.PIPE,...
mit
-3,237,632,367,559,430,000
28.259259
151
0.640506
false
ssfrr/advenshare
mouserver/mouserver/server.py
1
6082
import websocket import json import logging import coloredlogs import sys import ssl from getopt import gnu_getopt, GetoptError from mouserver_ext import grab_window, Window import random import string import time class Mouserver: def __init__(self, ws_url, session, window): self.ws_url = ws_url ...
mit
6,848,767,843,313,734,000
30.189744
87
0.554916
false
dmlc/tvm
python/tvm/topi/vision/rcnn/roi_align.py
1
3987
# 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 u...
apache-2.0
9,211,143,365,963,043,000
35.916667
98
0.605217
false
tasleson/lvm-dubstep
lvmdbus/cmdhandler.py
1
14945
# Copyright (C) 2015-2016 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2. # # You should have received a copy of the GNU General Public License # a...
gpl-2.0
-7,792,544,381,953,663,000
23.14378
79
0.658147
false
gmimano/commcaretest
corehq/apps/reports/filters/fixtures.py
1
5198
import json from django.core.urlresolvers import reverse from django.utils.translation import ugettext_noop from corehq.apps.fixtures.models import FixtureDataType, FixtureDataItem from corehq.apps.locations.util import load_locs_json, location_hierarchy_config from corehq.apps.reports.filters.base import BaseReportFil...
bsd-3-clause
-391,699,841,776,118,460
40.919355
130
0.563294
false
mathieudesro/pathos
pathos/pp_map.py
1
7526
#!/usr/bin/env python # Based on code by Kirk Strauser <kirk@strauser.com> # Rev: 1139; Date: 2008-04-16 # (also see code in pathos.pp) # # 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
8,449,697,180,205,107,000
40.811111
84
0.671273
false
HSASec/ProFuzz
Connector_tcp.py
1
1675
import socket import sys import getopt import DataGenerator import time import thread tcp = socket.socket(socket.AF_INET, socket.SOCK_STREAM) usage = sys.argv[0] +' -h <host> -p <port> [-l <length>] [-c <command>]' def main(argv): try: opts, args = getopt.getopt(sys.argv[1:],"h:p:l:") e...
gpl-3.0
-1,375,576,282,421,108,200
22.661765
72
0.492537
false
red-hat-storage/errata-tool
errata_tool/tests/conftest.py
1
6415
import json import os from errata_tool import ErrataConnector, Erratum from errata_tool.build import Build from errata_tool.products import ProductList from errata_tool.product import Product from errata_tool.product_version import ProductVersion from errata_tool.release import Release from errata_tool.variant import V...
mit
-4,197,443,629,954,272,000
31.729592
77
0.69431
false
ergoregion/Rota-Program
Rota_System/Saving/Excell/Population.py
1
5654
__author__ = 'Neil Butcher' from Error import ExcellImportExportError import xlwt, xlrd from Rota_System.Roles import GlobalRoleList, role from Rota_System.Worker import Worker from Rota_System.StandardTimes import date_string, get_date def name(an_object): return an_object.name class PopulationSavingObject(ob...
mit
-4,878,196,566,270,454,000
33.901235
119
0.581889
false
sarielsaz/sarielsaz
test/functional/mempool_packages.py
1
10532
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Sarielsaz Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test descendant package tracking code.""" from test_framework.test_framework import SarielsazTestFra...
mit
2,006,913,425,574,037,200
42.520661
154
0.621534
false
kirchenreich/osm-api-cache
osmcache/models.py
1
2003
from sqlalchemy import ( BigInteger, Binary, Column, DateTime, Integer, Numeric, String, ) from sqlalchemy.dialects.postgresql import JSON, TIMESTAMP from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.sql import func Base = declarative_base() class OsmBase(Base): ...
mit
-8,110,983,343,575,887,000
24.0375
75
0.688967
false
coassets/initial-d
sample_project/urls.py
1
1537
from django.conf.urls.defaults import * from django.conf import settings from crm.xmlrpc import rpc_handler # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # crm and contactinfo URLs (required) (r'^crm/', include('crm.urls')...
gpl-2.0
-1,501,874,727,447,595,000
30.367347
76
0.615485
false
ajrbyers/mondroid
src/monitor/management/commands/install_droids.py
1
1680
from django.core.management.base import BaseCommand, CommandError from django.contrib.auth.models import User from django.core.mail import send_mail from django.conf import settings from monitor import models from crontab import CronTab import os import sys try: action = sys.argv[1:][1] except: action = '' def fi...
gpl-2.0
6,182,176,925,109,408,000
26.557377
148
0.685119
false
probablytom/msci-model
resp_base/ResponsibleWorkflows.py
1
2256
from theatre_ag.theatre_ag.workflow import treat_as_workflow from .Constraints import Deadline from random import random, choice class CourseworkWorkflow: def __init__(self): self.agent = None self.competence = {'essays_written': 0.95, 'working_programs': 0.95} def...
mit
5,694,300,392,099,812,000
39.285714
122
0.655142
false
miyosuda/intro-to-dl-android
python-scripts/example1.py
1
4036
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function # MNISTデータロード用のクラスをimport from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf import numpy as np # MNISTデータセットをダウンロード mnist = input_data.read_data_sets(...
apache-2.0
-2,668,570,235,435,249,000
22.471698
76
0.735531
false
frisk028/flask-app-umn-courses
courses/public/forms.py
1
5377
# -*- coding: utf-8 -*- from flask_wtf import Form from wtforms import TextField, SelectField, SelectMultipleField, widgets from wtforms.validators import DataRequired import json import os class MultiCheckboxField(SelectMultipleField): widget = widgets.ListWidget(prefix_label=False) option_widget = widgets.C...
mit
-3,242,450,863,080,279,000
54.43299
134
0.590664
false
rjschwei/azure-sdk-for-python
unreleased/azure-mgmt-intune/setup.py
1
2533
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------...
mit
7,684,601,118,646,094,000
31.896104
91
0.597315
false
ST-Data-Mining/crater
wei/cart_file.py
1
2810
from __future__ import division import sys from os import listdir from table import * from os.path import isfile, join from settings import * from cart_de import * from sk import * from time import strftime from rf_cart_prediction import * def myrdiv(d): def pre(dist): l=dist.items()[0][-1] k = dist.items()[0][0]...
mit
-6,055,038,081,396,519,000
24.554545
68
0.609964
false
WilJoey/tn_ckan
ckan/controllers/group.py
1
36100
import re import os import logging import genshi import cgi import datetime from urllib import urlencode from pylons.i18n import get_lang import ckan.lib.base as base import ckan.lib.helpers as h import ckan.lib.maintain as maintain import ckan.lib.navl.dictization_functions as dict_fns import ckan.logic as logic imp...
mit
8,639,835,599,501,780,000
38.496718
93
0.531163
false
lonnen/socorro
socorro/unittest/external/es/test_super_search_fields.py
1
10900
# 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/. import copy import datetime import pytest from socorro.lib import BadArgumentError from socorro.external.es.super_sear...
mpl-2.0
-3,324,909,418,101,104,600
31.831325
91
0.475596
false
anthonyfok/frescobaldi
frescobaldi_app/snippet/insert.py
1
9303
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # 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 ...
gpl-2.0
-6,613,117,712,532,106,000
31.872792
101
0.603031
false
flyte/pi-mqtt-gpio
tests/modules/test_raspberrypi.py
1
10361
import pytest import time from pi_mqtt_gpio.modules import raspberrypi, PinDirection, PinPullup, InterruptEdge pytestmark = pytest.mark.hw_raspberrypi """ Attention: The following tests will only work with hardware modifikations. Definition of wired connected GPIOs, always connect xxx_OUTPUT with xxx_INPUT. You may...
mit
-6,436,631,038,160,396,000
33.652174
90
0.690763
false
aiven/journalpump
journalpump/journalpump.py
1
28684
# Copyright 2015, Aiven, https://aiven.io/ # # This file is under the Apache License, Version 2.0. # See the file `LICENSE` for details. from . import geohash, statsd from .daemon import ServiceDaemon from .senders import ( AWSCloudWatchSender, ElasticsearchSender, FileSender, GoogleCloudLoggingSender, KafkaSender,...
apache-2.0
7,405,992,903,869,244,000
36.643045
125
0.573386
false
hofschroeer/shinysdr
shinysdr/test/test_types.py
1
4610
# Copyright 2013, 2014, 2015 Kevin Reid <kpreid@switchb.org> # # This file is part of ShinySDR. # # ShinySDR 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 opt...
gpl-3.0
-7,255,775,303,882,669,000
37.107438
99
0.52538
false
skylifewww/pangolinland
article/models.py
1
11009
# -*- coding: utf-8 -*- from django.contrib.auth.models import User # from iosDevCourse.users.models import User from django.db import models from embed_video.fields import EmbedVideoField from django.core.urlresolvers import reverse from mptt.models import MPTTModel, TreeForeignKey from ckeditor.fields import RichT...
mit
3,099,177,084,353,075,700
37.350877
147
0.647575
false
fkie-cad/FACT_core
src/plugins/analysis/file_system_metadata/test/test_file_system_metadata_routes.py
1
6342
# pylint: disable=invalid-name from base64 import b64encode from unittest import TestCase from flask import Flask from flask_restx import Api from helperFunctions.database import ConnectTo from test.common_helper import create_test_file_object, create_test_firmware, get_config_for_testing from test.unit.web_interface...
gpl-3.0
907,264,697,385,160,200
39.139241
125
0.645853
false
cuckoobox/cuckoo
cuckoo/data/web/local_settings.py
1
1355
# Copyright (C) 2013 Claudio Guarnieri. # Copyright (C) 2014-2017 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import web.errors # Maximum upload size (10GB, so there's basically no limit). MAX_UPLOAD_SIZE = 10*1024*1024*...
mit
-6,930,075,890,209,785,000
33.74359
82
0.743911
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.1/Lib/textwrap.py
1
15708
"""Text wrapping and filling. """ # Copyright (C) 1999-2001 Gregory P. Ward. # Copyright (C) 2002, 2003 Python Software Foundation. # Written by Greg Ward <gward@python.net> __revision__ = "$Id: textwrap.py 67747 2008-12-13 23:20:54Z antoine.pitrou $" import string, re __all__ = ['TextWrapper', 'wrap', 'fill', 'ded...
mit
-7,864,780,077,585,546,000
39.380463
80
0.592564
false
Karosuo/Linux_tools
xls_handlers/xls_sum_venv/lib/python3.6/site-packages/xlsxwriter/chart_column.py
1
3545
############################################################################### # # ChartColumn - A class for writing the Excel XLSX Column charts. # # Copyright 2013-2019, John McNamara, jmcnamara@cpan.org # from . import chart class ChartColumn(chart.Chart): """ A class for writing the Excel XLSX Column ch...
gpl-3.0
-2,085,466,959,176,181,800
26.061069
79
0.464598
false
jf-parent/webbase
{{cookiecutter.project_name}}/jobs/send_email.py
1
34162
# -*- encoding:utf8 -*- # patched for python 3.5 import os import json import memcache import requests import logging import base64 from hashlib import md5 logging.basicConfig(format='%(levelname)-8s [%(asctime)s] %(message)s', level=logging.DEBUG) def send_email(rest_api_id, rest_api_secret, email): print("Se...
mit
5,319,612,941,020,626,000
45.990371
205
0.584948
false