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
bolkedebruin/airflow
airflow/contrib/hooks/qubole_check_hook.py
1
1179
# -*- 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,712,620,564,980,570,600
39.655172
91
0.765055
false
sivy/boxpub
boxpub/__init__.py
1
6959
# _______ _______ __ __ _______ __ __ _______ # | _ || || |_| || || | | || _ | # | |_| || _ || || _ || | | || |_| | # | || | | | | | | |_| || |_| || | # | _ | | |_| | | | | ___|| || _ | # | |_| || || _ || | ...
mpl-2.0
7,306,741,248,592,084,000
24.39781
100
0.574652
false
data-refinery/data_refinery
workers/data_refinery_workers/processors/test_smasher.py
1
49277
import csv import json import os import shutil import sys import zipfile from io import StringIO from django.core.management import call_command from django.test import TestCase, tag from data_refinery_common.models import ( SurveyJob, ProcessorJob, OriginalFile, ProcessorJobOriginalFileAssociation, ...
bsd-3-clause
7,144,830,882,378,763,000
33.054596
107
0.577734
false
pwyliu/clancy
clancy/engage.py
1
1892
import getpass from .utils import goodquit_json, read_file from .redoctober import api_call def engage(args, password): """ Construct payloads and POST to Red October """ if args['create']: payload = {'Name': args['--user'], 'Password': password} goodquit_json(api_call('create', args,...
mit
5,020,975,873,342,050,000
32.785714
76
0.523784
false
erigones/ludolph-skeleton
ludolph_skeleton/hello_world.py
1
1567
""" This file is part of Ludolph: Skeleton plugin Copyright (C) 2015-2017 Erigones, s. r. o. See the LICENSE file for copying permission. """ import time from ludolph.command import CommandError, command from ludolph.plugins.plugin import LudolphPlugin from . import __version__ class HelloWorld(LudolphPlugin): ...
mit
1,480,646,476,157,939,000
26.491228
99
0.634971
false
tobykurien/MakerDroid
assetsrc/pycam.mp3/src/pycam/Exporters/EMCToolExporter.py
1
1454
# -*- coding: utf-8 -*- """ $Id: EMCToolExporter.py 629 2010-08-23 16:53:06Z sumpfralle $ Copyright 2010 Lars Kruse <devel@sumpfralle.de> This file is part of PyCAM. PyCAM 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 Fo...
gpl-3.0
-6,490,145,569,136,249,000
32.813953
71
0.662999
false
jcmgray/xarray
xarray/tests/test_formatting.py
1
5879
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import numpy as np import pandas as pd from xarray.core import formatting from xarray.core.pycompat import PY3 from . import TestCase, raises_regex class TestFormatting(TestCase): def test_get_indexer_at_least_n_items(sel...
apache-2.0
-2,457,367,356,922,792,000
34.606061
76
0.538553
false
j-be/vj-aerome-scent-controller
aerome_scent_controller.py
1
1957
import logging import serial import array class AeromeScentController (object): BLOCK_BEGIN = [0x1b] BLOCK_END = [0x0d] ACTIVATE_CONTROLLER = [0xe0, 0xe1, 0xe2, 0xe3, 0x0d] ALL_VALVES_HOLD = [0xee, 0xef] FLUSH_VALVE_ON = [0x26] FLUSH_VALVE_OFF = [0xa6] SCENT_VALVE_ON = 0x40 SCENT_VALV...
mit
5,824,470,294,240,700,000
31.081967
93
0.615738
false
dmsurti/reynolds-blender
reynolds_blender/fvschemes.py
1
6197
#------------------------------------------------------------------------------ # Reynolds-Blender | The Blender add-on for Reynolds, an OpenFoam toolbox. #------------------------------------------------------------------------------ # Copyright| #-----------------------------------------------------------------------...
gpl-3.0
-8,835,433,186,925,909,000
39.503268
85
0.555591
false
maximinus/SPQR
setup.py
1
2499
#!/usr/bin/python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it wi...
gpl-3.0
7,500,770,195,348,641,000
30.632911
78
0.732693
false
alexweav/Learny-McLearnface
LearnyMcLearnface/NeuralNetwork.py
1
5358
# -*- coding: utf-8 -*- """ Created on Fri May 06 14:34:21 2016 @author: Alexander Weaver """ import numpy as np from . import Layers as layers from . import Utils as utils class NeuralNetwork(object): """ Initializes a neural network. Takes a dictionary of initialization options. """ def __...
mit
-489,052,098,223,998,340
37.553957
110
0.591639
false
DailyActie/Surrogate-Model
01-codes/scipy-master/scipy/ndimage/morphology.py
1
80212
# Copyright (C) 2003-2005 Peter J. Verveer # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following d...
mit
3,503,458,796,533,075,000
35.862132
119
0.558495
false
kuzmoyev/Google-Calendar-Simple-API
tests/test_attendee.py
1
2820
from unittest import TestCase from gcsa.attendee import Attendee, ResponseStatus from gcsa.serializers.attendee_serializer import AttendeeSerializer class TestAttendeeSerializer(TestCase): def test_to_json(self): attendee = Attendee( email='mail@gmail.com', display_name='Guest', ...
mit
-4,699,221,430,244,430,000
40.470588
87
0.648582
false
ParanoidNemo/twolame
cloud.py
1
1896
#! /usr/bin/env python # Copyright (C) 2015 by Andrea Calzavacca <paranoid.nemo@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at ...
gpl-3.0
2,340,330,728,297,430,000
30.6
79
0.699367
false
mauriceyap/ccm-assistant
tests/test_alexa_main.py
1
4199
import unittest from mock import patch import alexa_main TEST_APPLICATION_ID = "aPpLiCaTiOnId12345" TEST_REQUEST_ID = "rEqUeStId123" class TestAlexaMain(unittest.TestCase): def setUp(self): alexa_main.config.APPLICATION_ID = TEST_APPLICATION_ID @patch("alexa_main.events.on_session_started") @p...
mit
-4,778,385,089,163,808,000
32.062992
99
0.535127
false
adobe/avmplus
halfmoon/templates/templates.py
1
36785
#!/usr/bin/env python # -*- Mode: Python; indent-tabs-mode: nil -*- # vi: set ts=2 sw=2 expandtab: # 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 os import Str...
mpl-2.0
1,539,823,929,326,712,300
33.15506
106
0.617453
false
tshi04/machine-learning-codes
headGAN-ff/model.py
1
2150
import re import numpy as np import tensorflow as tf class discriminator(object): def __init__(self): self.name = 'keydis' def __call__(self, input_data, reuse=False): with tf.variable_scope(self.name) as self.ds: if reuse: self.ds.reuse_variables() nf_l...
gpl-3.0
1,230,414,954,405,514,500
38.090909
118
0.61814
false
Zanzibar82/streamondemand.test
servers_sports/ucaster.py
1
3368
# -*- coding: utf-8 -*- #------------------------------------------------------------ # streamondemand - XBMC Plugin # Conector para ucaster # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core impo...
gpl-3.0
-695,613,796,193,651,600
48.529412
192
0.554632
false
Ultimaker/Cura
plugins/UltimakerMachineActions/UMOUpgradeSelection.py
1
1985
# Copyright (c) 2017 Ultimaker B.V. # Uranium is released under the terms of the LGPLv3 or higher. from UM.Settings.ContainerRegistry import ContainerRegistry from cura.MachineAction import MachineAction from PyQt5.QtCore import pyqtSlot, pyqtSignal, pyqtProperty from UM.i18n import i18nCatalog from UM.Application im...
lgpl-3.0
2,034,681,844,096,167,200
42.152174
107
0.723929
false
zeal4u/FCA_Faceted_Search
bin/web_backend.py
1
2649
# -*- coding: utf-8 -*- __author__ = 'jsz' __version__ = 0.1 import web import json from search_engine import SearchService from search_engine import FacetEncoder from models import BookEncoder # APIs exposed to front end urls = ( "/keyWordsSearch","KeyWordsSearch", "/facetSearch","FacetSear...
mit
5,996,236,848,290,108,000
21.155963
81
0.575983
false
and3rson/isc
examples/test_client.py
1
2134
#!/usr/bin/env python3.6 from isc.client import Client from threading import Thread, Event from time import time from random import random import logging ITERATIONS = 1 CONN_POOL_SIZE = 1 COUNT = 1000 class Process(Thread): def __init__(self, client): super(Process, self).__init__() self.procee...
gpl-3.0
511,173,291,182,243,840
20.77551
77
0.64761
false
Hoikas/korman
korman/exporter/logger.py
1
2584
# This file is part of Korman. # # Korman is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Korman is distributed i...
gpl-3.0
-5,733,352,604,971,628,000
32.558442
99
0.627709
false
rwl/openpowersystem
ucte/state_variables/sv_shunt_compensator_sections.py
1
3822
#------------------------------------------------------------------------------ # Copyright (C) 2009 Richard Lincoln # # 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; version 2 dated June...
agpl-3.0
-7,719,362,087,847,217,000
72.5
996
0.736002
false
Kotaimen/stonemason
stonemason/pyramid/geo/tms.py
1
10943
# -*- encoding: utf-8 -*- """ stonemason.pyramid.geo.geosys ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Geographic system """ __author__ = 'kotaimen' __date__ = '3/20/15' import collections from osgeo import osr from osgeo import ogr osr.UseExceptions() ogr.UseExceptions() from stonemason.pyramid import Pyramid fro...
mit
1,514,051,397,815,786,000
34.186495
118
0.607512
false
asciinema/asciinema
asciinema/__main__.py
1
5439
import locale import argparse import os import sys from asciinema import __version__ import asciinema.config as config from asciinema.commands.auth import AuthCommand from asciinema.commands.record import RecordCommand from asciinema.commands.play import PlayCommand from asciinema.commands.cat import CatCommand from a...
gpl-3.0
3,624,383,145,244,699,000
46.295652
188
0.706012
false
elsantodel90/RAAGo
aago_ranking/users/admin.py
1
1070
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django import forms from django.contrib import admin from django.contrib.auth.admin import UserAdmin as AuthUserAdmin from django.contrib.auth.forms import UserChangeForm, UserCreationForm from .models import User class MyUserChan...
gpl-3.0
-776,621,858,203,700,000
25.75
78
0.703738
false
caktus/ibid
ibid/plugins/core.py
1
11725
# Copyright (c) 2008-2010, Michael Gorven, Stefano Rivera # Released under terms of the MIT/X/Expat Licence. See COPYING for details. import re from datetime import datetime, timedelta from random import choice import logging import ibid from ibid.config import IntOption, ListOption, DictOption from ibid.plugins impo...
gpl-3.0
-4,911,617,517,799,839,000
37.316993
247
0.532367
false
openaid-IATI/deprecated-version-OIPA-v2
iati/data/migrations/0035_auto__add_indicatorcitydata.py
1
35113
# -*- 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 model 'IndicatorCityData' db.create_table('data_indicatorcitydata', ( ('id', self.gf('d...
agpl-3.0
-1,100,802,931,386,025,900
82.208531
182
0.552018
false
delftrobotics/keras-retinanet
tests/utils/test_transform.py
1
5871
import numpy as np from numpy.testing import assert_almost_equal from math import pi from keras_retinanet.utils.transform import ( colvec, transform_aabb, rotation, random_rotation, translation, random_translation, scaling, random_scaling, shear, random_shear, random_flip, random_transf...
apache-2.0
-2,944,925,750,333,459,000
37.880795
117
0.615909
false
ctu-geoforall-lab-sandbox/qgis-aerogen-plugin
aerogen.py
1
7702
# -*- coding: utf-8 -*- """ /*************************************************************************** AeroGen A QGIS plugin AeroGen Plugin ------------------- begin : 2017-04-24 git sha : $Format:%H$ ...
gpl-3.0
1,069,905,357,386,615,600
32.198276
79
0.550247
false
chiefenne/PyAero
src/SplineRefine.py
1
13180
import copy import numpy as np from scipy import interpolate from PySide2 import QtGui, QtCore from Utils import Utils import GraphicsItemsCollection as gic import GraphicsItem import ContourAnalysis as ca import logging logger = logging.getLogger(__name__) class SplineRefine: def __init__(...
mit
-7,586,054,523,396,383,000
34.611111
79
0.547117
false
PinguinoIDE/pinguino-ide
pinguino/qtgui/gide/bloques/inside/inside2_bool.py
1
1665
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '/home/yeison/Documentos/Desarrollo/Pinguino/GitHub/pinguino-ide/pinguino/qtgui/gide/bloques/inside/inside2_bool.ui' # # Created: Wed Mar 16 13:19:41 2016 # by: pyside-uic 0.2.15 running on PySide 1.2.4 # # WARNING! All changes made in t...
gpl-2.0
-4,333,316,980,457,685,500
38.642857
169
0.669069
false
emory-libraries/eulxml
eulxml/xmlmap/core.py
1
28298
# file eulxml/xmlmap/core.py # # Copyright 2010,2011 Emory University Libraries # # 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
6,997,299,404,527,287,000
40.675994
106
0.63478
false
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/scripts/freestyle/style_modules/blueprint_ellipses.py
1
1827
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
gpl-3.0
5,571,504,790,626,471,000
42.5
108
0.762452
false
citiususc/construe
construe/knowledge/abstraction_patterns/rhythm/patterns.py
1
5602
# -*- coding: utf-8 -*- # pylint: disable-msg= E1002, E1101 """ Created on Wed Nov 21 09:04:17 2012 This file contains the definition of a set of very simple abstraction patterns in order to perform rhythm interpretation on an ECG signal. @author: T. Teijeiro """ import copy import construe.knowledge.observables as ...
agpl-3.0
8,645,814,896,490,964,000
40.80597
79
0.661014
false
Azure/azure-sdk-for-python
sdk/storage/azure-storage-blob/tests/test_large_block_blob.py
1
16857
# coding: utf-8 # ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # --------------------------------------------------------------------...
mit
-1,553,217,074,981,763,000
40.117073
139
0.623599
false
hftools/hftools
hftools/file_formats/tests/test_common.py
1
6853
#----------------------------------------------------------------------------- # Copyright (c) 2014, HFTools Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #--------------------------------------------------...
bsd-3-clause
2,110,268,371,790,687,000
36.043243
78
0.468262
false
grow/pygrow
install.py
1
7591
#!/usr/bin/python2 # -*- coding: utf-8 -*- """Standalone Grow SDK installer. Downloads Grow SDK and sets up command aliases.""" import argparse import datetime import json import os import platform import re import sys import tempfile import urllib import urllib2 import zipfile DOWNLOAD_URL_FORMAT = 'https://github....
mit
-4,453,811,987,850,760,000
32.258772
100
0.576553
false
Angeldude/csound
tests/commandline/test.py
1
9537
#!/usr/bin/python # Csound Test Suite # By Steven Yi <stevenyi at gmail dot com> import os import sys from testUI import TestApplication from Tkinter import * parserType = "" showUIatClose = False ##csoundExecutable = r"C:/Users/new/csound-csound6-git/csound.exe " csoundExecutable ="" class Test: def __init__(...
lgpl-2.1
6,264,556,847,959,010,000
37.301205
117
0.594527
false
ImEmJay/AlexaPi
src/alexapi/device_platforms/hyperion.py
1
5251
from __future__ import print_function import json import threading import time import websocket import alexapi.bcolors as bcolors from baseplatform import BasePlatform class HyperionPlatform(BasePlatform): def __init__(self, config): if config['debug']: print("Initializing Hyperion platform") super(Hyperi...
mit
-990,850,973,479,044,700
29.352601
80
0.707103
false
gsobczyk/hamster
src/hamster/widgets/facttree.py
1
23335
# -*- coding: utf-8 -*- # Copyright (C) 2008-2009, 2014 Toms Bauģis <toms.baugis at gmail.com> # This file is part of Project Hamster. # Project Hamster 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, eithe...
gpl-3.0
-825,646,525,799,796,400
33.916168
171
0.572543
false
Answeror/aip
aip/imfs/baidupcs.py
1
3088
from .base import NameMixin, guarded from .error import ImfsError, NotFoundError from .utils import thumbnail from pprint import pformat from .. import img from datetime import datetime BASE = '/apps/aip/cache/' class PCSError(ImfsError): pass class BadResponse(PCSError): def __init__(self, r): s...
mit
4,479,358,954,816,668,000
23.507937
67
0.53886
false
dwavesystems/dimod
dimod/reference/composites/roofduality.py
1
2936
# Copyright 2019 D-Wave Systems 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...
apache-2.0
-527,168,984,225,831,500
36.641026
87
0.680858
false
aewallin/openvoronoi
src/test/pytest_ttt_alphabet/ttt_alphabet.py
1
3568
import truetypetracer as ttt import openvoronoi as ovd import time import sys def translate(segs,x,y): out = [] for seg in segs: seg2 = [] for p in seg: p2 = [] p2.append(p[0] + x) p2.append(p[1] + y) seg2.append(p2) #seg2.append(seg[3...
lgpl-2.1
-4,697,356,656,404,354,000
26.658915
88
0.571749
false
gannetson/sportschooldeopenlucht
apps/cowry/migrations/0001_initial.py
1
3506
# -*- 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 model 'Payment' db.create_table(u'cowry_payment', ( (u'id', self.gf('django.db.models.f...
bsd-3-clause
2,409,316,479,135,669,000
62.763636
196
0.596121
false
gangadhar-kadam/nassimapp
stock/doctype/purchase_receipt/purchase_receipt.py
1
12927
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cstr, flt, cint from webnotes.model.bean import getlist from webnotes.model.code import get_obj from webn...
agpl-3.0
7,571,372,898,239,984,000
35.724432
205
0.691034
false
zvoase/django-relax
relax/templatetags/couchdb.py
1
2778
# -*- coding: utf-8 -*- import re from django import template from django.template.defaultfilters import stringfilter from relax import json, settings register = template.Library() class SettingNode(template.Node): def __init__(self, setting_name, var_name=None, default_value=None): # The variabl...
mit
-2,214,768,308,070,269,200
39.275362
87
0.598632
false
MissionCriticalCloud/marvin
marvin/cloudstackAPI/prepareTemplate.py
1
6722
"""load template into primary storage""" from baseCmd import * from baseResponse import * class prepareTemplateCmd (baseCmd): typeInfo = {} def __init__(self): self.isAsync = "false" """template ID of the template to be prepared in primary storage(s).""" """Required""" self.te...
apache-2.0
6,533,930,235,692,661,000
39.739394
190
0.591937
false
shinose/qplaybox
packages/x11/driver/xf86-video-nvidia/scripts/make_nvidia_udev.py
1
2169
#!/usr/bin/env python import os import requests from lxml import html __cwd__ = os.path.dirname(os.path.realpath(__file__)) __rules__ = __cwd__ + '/../udev.d/96-nvidia.rules' __package__ = __cwd__ + '/../package.mk' # Get the Nvidia driver version currently being used for line in open(__package__, 'r'): if "...
gpl-2.0
-1,896,295,597,228,511,500
38.436364
166
0.659751
false
stivalet/PHP-Vuln-test-suite-generator
bin/core.py
1
3062
from Classes.Manifest import * from Flaws_generators.Generator_factory import * from Flaws_generators.Generation_functions import * import global_variables as g def main(argv): # List of flaws flaws = ["XSS", "IDOR", "Injection", "URF", "SM", "SDE"] flaw_list = [] #Gets options & arguments try: ...
mit
526,869,589,661,282,600
43.376812
457
0.612998
false
pjdufour/geonode
geonode/base/forms.py
1
13646
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
-3,462,400,340,119,322,600
36.081522
117
0.555767
false
whitews/FlowIO
examples/print_channels.py
1
1358
import flowio import os import sys if len(sys.argv) > 1: flow_dir = sys.argv[1] else: flow_dir = os.getcwd() files = os.listdir(flow_dir) for file in files: try: flow_data = flowio.FlowData("/".join([flow_dir,file])) except: continue print file + ':' for key in sorted(flow_da...
bsd-3-clause
-1,600,365,581,725,694,500
31.357143
76
0.562592
false
scalyr/scalyr-agent-2
scalyr_agent/compat.py
1
7997
# Copyright 2014-2020 Scalyr 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 writin...
apache-2.0
6,758,009,555,331,464,000
31.909465
110
0.615481
false
wiki2014/Learning-Summary
alps/cts/apps/CameraITS/tests/inprog/test_burst_sameness_fullres_auto.py
1
3382
# Copyright 2014 The Android Open Source Project # # 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 a...
gpl-3.0
4,365,159,712,139,811,000
34.978723
75
0.630692
false
shayn1234/apps-catalog
deployment/catalog-ci-jenkins/modules/catalog_ci/files/scripts/generate_names.py
1
1579
#!/usr/bin/python # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
-7,187,242,229,561,227,000
30.58
75
0.631412
false
aeppert/py-cifsdk
test/email/t1.py
1
2367
# -*- coding: utf-8 -*- msg = """ Delivered-To: support@barely3am.com Received: by 10.112.40.50 with SMTP id u18csp916705lbk; Sun, 19 Apr 2015 05:50:04 -0700 (PDT) X-Received: by 10.42.151.4 with SMTP id c4mr13784232icw.77.1429447803846; Sun, 19 Apr 2015 05:50:03 -0700 (PDT) Return-Path: <advertisebz09...
lgpl-3.0
-4,987,111,927,963,269,000
30.546667
173
0.724736
false
lrocheWB/navitia
source/jormungandr/jormungandr/scenarios/tests/qualifier_tests.py
1
13540
# 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
-3,661,965,739,037,925,000
34.07772
88
0.713885
false
lmorillas/catalogoprogramaseducativos
lib/extrae_info_wikispaces.py
1
4799
# -*- coding: utf-8 -*- import urlparse import re import json from amara.bindery import html from amara.lib import U import shelve catsh = shelve.open('catalogo.dat') def quita_punto(texto): if texto.endswith('.'): return texto[:-1] else: return texto def dame_texto(texto, inicio, fin): _ini ...
apache-2.0
9,024,883,634,799,330,000
27.855422
154
0.603549
false
tzuhsienli/resume-site
resume/settings.py
1
6235
# Django settings for resume project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('Administrator', 'li.tzuhsien@gmail.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'resumedb...
mit
4,027,110,781,063,915,000
33.832402
136
0.691259
false
outkaj/xpython
list-ops/list_ops_test.py
1
3318
import unittest import operator from list_ops import * class ListOpsTest(unittest.TestCase): # tests for map def test_map_square(self): self.assertEqual( (1, 4, 9, 16, 25, 36, 49, 64, 81, 100), tuple(map_clone( lambda x: x**2, (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) ...
mit
6,382,588,370,581,128,000
26.65
77
0.484027
false
nehudesi/MSim
module/tsutil.py
1
32434
''' Version: MRT v3.0 Type: Library Location: C:\MRT3.0\module Author: Chintan Patel Email: chintanlike@gmail.com ''' import math import datetime as dt #import numpy as np import module.qsdateutil as qsdateutil from math import sqrt import pandas as pd from copy import deepcopy import matplotlib.pyp...
agpl-3.0
-8,922,782,742,476,446,000
35.452656
118
0.588981
false
pipermerriam/flex
tests/loading/schema/paths/operation/responses/test_response_validation.py
1
2139
import pytest from flex.error_messages import MESSAGES from flex.exceptions import ( ValidationError, ) from flex.loading.schema.paths.path_item.operation.responses import ( responses_validator, ) def test_description_is_required(msg_assertions): with pytest.raises(ValidationError) as err: respon...
mit
-4,137,606,633,608,327,700
23.033708
69
0.603086
false
klmitch/nova
nova/tests/unit/scheduler/test_utils.py
1
80648
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
-4,330,534,855,583,730,700
40.614035
79
0.542183
false
willettk/gzhubble
python/fzeta_examples.py
1
5008
from matplotlib import pyplot as plt from astropy.table import Table from scipy import optimize from scipy.stats import distributions as dist import numpy as np # Load data data = Table.read("../data/ferengi_debiasable_data.fits") # Use only galaxies with surface brightness/redshift ranges that are considered "debia...
mit
-8,789,516,641,017,032,000
31.732026
124
0.608826
false
mozilla/kuma
kuma/core/validators.py
1
3885
# see also: http://github.com/tav/scripts/raw/master/validate_jsonp.py # Placed into the Public Domain by tav <tav@espians.com> """Validate Javascript Identifiers for use as JSON-P callback parameters.""" import re from unicodedata import category # -----------------------------------------------------------------...
mpl-2.0
3,343,287,382,419,359,000
32.491379
80
0.501673
false
datascopeanalytics/scrubadub
tests/test_detector_skype.py
1
2411
import faker import unittest from scrubadub.filth import SkypeFilth from base import BaseTestCase import scrubadub class SkypeTestCase(unittest.TestCase, BaseTestCase): def setUp(self): from scrubadub.detectors.skype import SkypeDetector scrubadub.detectors.register_detector(SkypeDetector, autol...
mit
-5,046,148,948,238,348,000
28.048193
75
0.589382
false
synth3tk/the-blue-alliance
tests/test_fms_api_event_list_parser.py
1
5508
import datetime import json import unittest2 from datafeeds.parsers.fms_api.fms_api_event_list_parser import FMSAPIEventListParser from google.appengine.ext import ndb from google.appengine.ext import testbed from consts.district_type import DistrictType from consts.event_type import EventType from models.event impo...
mit
-7,174,664,230,224,272,000
51.961538
123
0.662672
false
all-of-us/raw-data-repository
rdr_service/model/bq_workbench_workspace.py
1
9460
from rdr_service.model.bq_base import BQTable, BQSchema, BQView, BQField, BQFieldTypeEnum, BQFieldModeEnum, \ BQRecordField class BQWorkspaceRaceEthnicitySchema(BQSchema): race_ethnicity = BQField('race_ethnicity', BQFieldTypeEnum.STRING, BQFieldModeEnum.NULLABLE) race_ethnicity_id = BQField('race_ethnic...
bsd-3-clause
-1,766,450,911,606,441,000
54.321637
117
0.723996
false
Jaesin/OctoPrint
src/octoprint/vendor/sockjs/tornado/transports/jsonp.py
1
3693
# -*- coding: utf-8 -*- """ sockjs.tornado.transports.jsonp ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ JSONP transport implementation. """ import logging from tornado.web import asynchronous from octoprint.vendor.sockjs.tornado import proto from octoprint.vendor.sockjs.tornado.transports import pollingbase from oct...
agpl-3.0
-149,909,300,359,437,600
28.07874
84
0.581099
false
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/hplip/ui4/printernamecombobox.py
1
5122
# -*- coding: utf-8 -*- # # (c) Copyright 2001-2009 Hewlett-Packard Development Company, L.P. # # 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 opt...
gpl-3.0
8,314,230,958,582,028,000
32.045161
99
0.641156
false
coolblaze03/WSNNS3Port
doc/tutorial/source/conf.py
1
6980
# -*- coding: utf-8 -*- # # ns-3 documentation build configuration file, created by # sphinx-quickstart on Tue Dec 14 09:00:39 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
gpl-2.0
-6,015,266,642,801,439,000
31.314815
80
0.706017
false
IntersectAustralia/hcsvlab_robochef
hcsvlab_robochef/paradisec/rdf.py
1
1904
from hcsvlab_robochef.rdf.map import * PARADISEC = "PARADISEC" paradisecSpeakerMap = FieldMapper(AUSNC) paradisecSpeakerMap.add('name', mapto=FOAF.name) paradisecSpeakerMap.add('role', ignore=True) paradisecMap = MetadataMapper(PARADISEC, speakerMap=paradisecSpeakerMap, documentMap = get_generic_doc_mapper()) paradi...
gpl-3.0
-8,536,860,154,655,141,000
47.820513
112
0.798319
false
indro/t2c
apps/external_apps/ajax_validation/views.py
2
1452
from django import forms from django.http import HttpResponse from django.views.decorators.http import require_POST from ajax_validation.utils import LazyEncoder def validate(request, *args, **kwargs): form_class = kwargs.pop('form_class') extra_args_func = kwargs.pop('callback', lambda request, *args, **kwar...
mit
6,643,868,920,188,275,000
38.243243
96
0.588154
false
silentfuzzle/calibre
src/calibre/gui2/viewer/behavior_manager/behavior_manager_builder.py
1
6334
__license__ = 'GPL v3' __copyright__ = '2014, Emily Palmieri <silentfuzzle@gmail.com>' from calibre.gui2.viewer.behavior.adventurous_behavior import AdventurousBehavior from calibre.gui2.viewer.behavior.adventurous_base_behavior import BaseAdventurousBehavior from calibre.gui2.viewer.behavior.calibre_behavior impor...
gpl-3.0
4,841,253,666,804,379,000
50.495935
122
0.667193
false
bossiernesto/melta
test/core/test_syncronizer.py
1
2704
from unittest import TestCase, skip from test.fixture.class_repositories import person1, house2 from melta.core.object_converter import MeltaObjectConverter from melta.core.melta_syncronizer import MeltaSyncronizer import copy class TestSyncronizer(TestCase): def setUp(self): self.syncronizer = MeltaSyncro...
bsd-3-clause
-3,970,391,530,764,089,300
44.847458
116
0.70858
false
xianjunzhengbackup/code
data science/machine_learning_for_the_web/chapter_8/movie_reviews_analizer_app/webmining_server/pages/models.py
1
1215
from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ class SearchTerm(models.Model): term = models.CharField(_('search'), max_length=255) num_reviews = models.IntegerField(null=True,default=0) #display term on admin panel def __unico...
mit
3,143,095,247,785,500,000
42.428571
90
0.699588
false
ganga-devs/ganga
ganga/GangaAtlas/Lib/Athena/ganga-stagein.py
1
4800
#! /usr/bin/env python import os, sys from getopt import getopt,GetoptError from threading import Thread from commands import getstatusoutput from lfc import * def usage(): print 'Name:' print ' ganga-stagein.py' print print 'Arguments:' print ' logical names' print print 'Option...
gpl-2.0
-5,774,584,406,186,113,000
23.870466
115
0.527083
false
nrclark/grouplib
unit_tests/basic_test.py
1
2441
#!/usr/bin/env python import shutil import random import md5 import unittest import os import subprocess def sanitize(path): path = os.path.expanduser(path) path = os.path.expandvars(path) path = os.path.normpath(path) path = os.path.abspath(path) return path def run_make(Makefile=None, targets=N...
gpl-2.0
-5,865,620,327,662,661,000
29.135802
86
0.611635
false
none-da/zeshare
debug_toolbar/panels/headers.py
1
1292
from django.template.loader import render_to_string from debug_toolbar.panels import DebugPanel class HeaderDebugPanel(DebugPanel): """ A panel to display HTTP headers. """ name = 'Header' has_content = True # List of headers we want to display header_filter = ( 'CONTENT_TYPE', ...
bsd-3-clause
-9,078,421,765,086,998,000
23.865385
83
0.557276
false
elkingtonmcb/bcbio-nextgen
bcbio/variation/coverage_experimental.py
1
7319
import os import pandas as pd import subprocess from collections import Counter import numpy as np import math import pysam import pybedtools from bcbio.utils import (file_exists, tmpfile, chdir, splitext_plus, max_command_length, robust_partition_all) from bcbio.provenance import do from bcb...
mit
2,294,521,246,895,444,000
40.350282
118
0.515781
false
Kagami/kisa
lib/twisted/runner/test/test_procmon.py
1
18664
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.runner.procmon}. """ from twisted.trial import unittest from twisted.runner.procmon import LoggingProtocol, ProcessMonitor from twisted.internet.error import (ProcessDone, ProcessTerminated, ...
cc0-1.0
-1,454,100,166,417,864,700
34.348485
80
0.622857
false
boazmohar/pySparkUtils
test/test_change.py
1
2205
from builtins import str from pySparkUtils.utils import change import pytest pytestmark = pytest.mark.usefixtures("eng") def test_ip_wait(eng): with pytest.raises(RuntimeError) as ex: _ = change(sc=eng, master='local[2]', fail_on_timeout=True, wait='ips', min_ips=10, timeout=4) assert 'Time out' in st...
mit
2,964,898,981,211,689,500
29.205479
105
0.662585
false
tgquintela/TimeSeriesTools
TimeSeriesTools/TS_statistics/probabilitytools.py
1
2552
""" This module contains functions related with probability and complements the usual numpy or scipy tools. """ import numpy as np def compute_conditional_probs(probs, marginal_vars): """Function which computes the conditional probability from the joint probability. We have to inform about the dependant var...
mit
2,569,273,240,266,878,500
25.309278
79
0.635188
false
sherzberg/python-beanstalk-api
beanstalk/api/base.py
1
1554
import requests import json class IncorrectSetupException(Exception): pass class BeanstalkAuth(object): _instance = None def __new__(cls, domain, username, password): if not cls._instance: cls._instance = object.__new__(cls) return cls._instance def __init__(self, doma...
gpl-3.0
2,693,403,016,679,041,000
27.254545
83
0.570785
false
mehdisadeghi/saga-python
src/saga/adaptors/pbspro/pbsprojob.py
1
47635
__author__ = "Andre Merzky, Ole Weidner, Mark Santcroos" __copyright__ = "Copyright 2012-2015, The SAGA Project" __license__ = "MIT" """ PBSPro job adaptor implementation """ import threading import saga.url as surl import saga.utils.pty_shell as sups import saga.adaptors.base import saga.adaptors....
mit
4,840,097,012,143,292,000
36.156786
192
0.473454
false
sentriz/steely
steely/plugins/limp.py
1
3205
import sys import limp import limp.errors import limp.environment COMMAND = 'limp' __author__ = 'byxor' GLOBAL_DEFINITIONS = {} def main(bot, author_id, source_code, thread_id, thread_type, **kwargs): def send(message): bot.sendMessage(str(message), thread_id=thread_id, thread...
gpl-3.0
194,483,731,133,469,540
28.953271
162
0.558502
false
realestate-com-au/harpoon
harpoon/ship/network.py
1
1619
from docker.errors import APIError as DockerAPIError import logging import uuid log = logging.getLogger("harpoon.ship.network") class NetworkManager(object): def __init__(self, docker_api): self.networks = {} self.docker_api = docker_api def register(self, conf, container_name): if no...
mit
-949,235,595,282,341,400
35.795455
92
0.593576
false
calispac/digicampipe
digicampipe/tests/test_simtel_event_source.py
1
1938
import os from astropy import units as u import pkg_resources from digicampipe.io.simtel import simtel_event_source from digicampipe.io.event_stream import event_stream, calibration_event_stream example_file_path = pkg_resources.resource_filename( 'digicampipe', os.path.join( 'tests', 'resourc...
gpl-3.0
-3,126,107,879,200,445,000
21.022727
78
0.621775
false
polyaxon/polyaxon
core/polyaxon/pql/builder.py
1
15832
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
apache-2.0
-8,171,395,019,497,414,000
32.052192
99
0.600682
false
rschnapka/bank-payment
account_banking/wizard/banking_transaction_wizard.py
1
19506
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). # (C) 2011 - 2013 Therp BV (<http://therp.nl>). # (C) 2011 Smile (<http://smile.fr>). # All Rights Reserved # # This ...
agpl-3.0
-7,091,693,435,405,808,000
42.346667
79
0.501384
false
yephper/django
tests/model_formsets/tests.py
1
79070
from __future__ import unicode_literals import datetime import re from datetime import date from decimal import Decimal from django import forms from django.core.exceptions import ImproperlyConfigured from django.db import models from django.forms.models import ( BaseModelFormSet, _get_foreign_key, inl...
bsd-3-clause
6,083,113,462,328,456,000
44.051252
119
0.563627
false
gnome-prototypes-team/gnome-music
gnomemusic/query.py
1
42091
# Copyright (c) 2013 Arnel A. Borja <kyoushuu@yahoo.com> # Copyright (c) 2013 Vadim Rutkovsky <roignac@gmail.com> # Copyright (c) 2013 Seif Lotfy <seif@lotfy.com> # Copyright (c) 2013 Guillaume Quintard <guillaume.quintard@gmail.com> # # GNOME Music is free software; you can redistribute it and/or modify # it under the...
gpl-2.0
4,295,170,475,370,668,500
30.133136
122
0.436625
false
Yangqing/caffe2
caffe2/python/checkpoint.py
1
29797
# Copyright (c) 2016-present, Facebook, 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...
apache-2.0
7,775,444,930,955,179,000
38.571049
86
0.606202
false
SeavantUUz/silence
tools.py
1
1952
#coding: utf-8 __all__ = ['covert','line_resize','parse','draw_line','draw_screen','move','draw_input','check_pos'] import locale import logging locale.setlocale(locale.LC_ALL,'') code = locale.getpreferredencoding() def covert(string,code): new_string = string.decode('utf-8') lenth = len(new_string) ret...
mit
707,597,869,600,511,700
23.098765
100
0.553279
false
rvianello/rdkit
rdkit/Chem/UnitTestQED.py
4
4498
from __future__ import print_function from collections import namedtuple import doctest import os.path import unittest from rdkit import Chem from rdkit import RDConfig from rdkit.Chem import QED doLong = False TestData = namedtuple('TestData', 'lineNo,smiles,mol,expected') dataNCI200 = os.path.join(RDConfig.RDCode...
bsd-3-clause
-2,996,229,248,481,166,000
34.417323
100
0.659627
false
fatboystring/Wagtail-MVC
wagtail_mvc/views.py
1
1517
from django.views.generic import DetailView class WagtailMvcView(DetailView): """ Basic default wagtail mvc view class """ page = None def dispatch(self, request, *args, **kwargs): """ Pops the page out of the keyword args and stores it against the view instance :...
mit
-3,658,705,902,822,287,400
25.155172
77
0.57416
false
ibagrak/algae
gae/tests/test_i18n.py
1
3855
import webapp2 import webtest import unittest2 import copy import urllib import logging from google.appengine.ext import testbed from google.appengine.ext import db from webapp2_extras import json from webapp2_extras.appengine.auth import models as users import app import settings import handlers import re from core ...
mit
-3,105,536,637,220,046,300
35.367925
95
0.746304
false
shajoezhu/msprime
tskit_tests/test_vcf.py
1
9222
""" Test cases for VCF output in tskit. """ from __future__ import print_function from __future__ import division import collections import math import os import tempfile import unittest import msprime import vcf import tskit # Pysam is not available on windows, so we don't make it mandatory here. _pysam_imported = ...
gpl-3.0
174,891,526,295,170,660
37.26556
85
0.586315
false
fujicoin/fujicoin
test/functional/p2p_invalid_locator.py
1
2017
#!/usr/bin/env python3 # Copyright (c) 2015-2020 The Fujicoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test node responses to invalid locators. """ from test_framework.messages import msg_getheaders, msg_...
mit
-2,813,032,587,056,297,500
45.906977
135
0.662866
false
Mr-meet/PythonApplets
spiders_packege/xunlei_girl/PageProcessor.py
1
1671
from bs4 import BeautifulSoup import time from spiders_packege.unit.ResourcesDowmloader import ResourcesDownloader from spiders_packege.unit.ResourcesProcessor import ResourcesProcessor class PageProcessor: def __init__(self): pass def dealAllImg(basePath,list,webDriver): baseDetailUrl='http...
mit
5,768,753,674,798,561,000
36.860465
91
0.62815
false