repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
Lujeni/ansible
lib/ansible/module_utils/hetzner.py
10
5986
# -*- coding: utf-8 -*- # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own lic...
gpl-3.0
-298,158,531,239,043,460
34.005848
139
0.622619
false
pando85/gourmet
gourmet/gtk_extras/timeEntry.py
6
4398
### Copyright (C) 2005 Thomas M. Hinkle ### Copyright (C) 2009 Rolf Leggewie ### ### This library 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) an...
gpl-2.0
-5,533,820,669,749,137,000
34.184
111
0.577763
false
devGregA/code
scrapy/core/scraper.py
9
8992
"""This module implements the Scraper component which parses responses and extracts information from them""" from collections import deque from twisted.python.failure import Failure from twisted.internet import defer from scrapy.utils.defer import defer_result, defer_succeed, parallel, iter_errback from scrapy.utils...
bsd-3-clause
8,148,322,741,549,687,000
40.62963
103
0.636788
false
xen0l/ansible
lib/ansible/plugins/inventory/script.py
6
8459
# Copyright (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' invento...
gpl-3.0
30,018,334,422,511,492
39.668269
146
0.581156
false
nullishzero/Portage
pym/_emerge/EbuildMerge.py
8
1973
# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from _emerge.CompositeTask import CompositeTask from portage import os from portage.dbapi._MergeProcess import MergeProcess class EbuildMerge(CompositeTask): __slots__ = ("exit_hook", "find_blockers", "logger"...
gpl-2.0
-4,844,223,992,076,462,000
33.017241
70
0.687278
false
emilroz/openmicroscopy
examples/Training/markup.py
3
10816
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2014 University of Dundee & Open Microscopy Environment. # All Rights Reserved. # Use is subject to license terms supplied in LICENSE.txt # """ This script parses a list of text files and generates Wiki output. E.g. $ python markup.py ...
gpl-2.0
6,194,083,919,877,627,000
29.467606
139
0.5527
false
mostateresnet/django-resnet-survey
setup.py
1
1104
import os import sys from setuptools import setup, find_packages def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='django-resnet-survey', version='0.1', description='Very simple survey app made with django', long_description=read('README.md'), au...
mit
6,995,968,578,881,168,000
27.307692
70
0.615942
false
mixja/eap-sim-lab
lib/pyscard-1.6.16/smartcard/Examples/framework/sample_ATR.py
3
1473
#! /usr/bin/env python """ Sample script for the smartcard.ATR utility class. __author__ = "http://www.gemalto.com" Copyright 2001-2009 gemalto Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com This file is part of pyscard. pyscard is free software; you can redistribute it and/or modify it under the...
mit
4,910,726,669,414,712,000
36.769231
75
0.741344
false
xsteadfastx/subsonic-xbmc-addon
plugin.audio.subsonic/resources/lib/requests/models.py
2
26945
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import HTTPBasicAuth ...
mit
-220,950,383,986,727,650
32.142681
119
0.567267
false
rohitwaghchaure/frappe
frappe/tests/test_global_search.py
1
4662
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import unittest import frappe from frappe.utils import global_search from frappe.test_runner import make_test_objects import frappe.utils class TestGlobalSearch(unittest.TestCas...
mit
4,174,737,366,077,080,600
40.633929
166
0.736165
false
philpep/testinfra
testinfra/backend/openshift.py
1
1712
# 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 # distributed under th...
apache-2.0
362,022,122,710,024,450
37.909091
74
0.634346
false
aigamo/primecloud-controller
iaas-gw/src/iaasgw/client/vCloudiaasclient.py
5
49263
# coding: UTF-8 # # Copyright 2014 by SCSK Corporation. # # This file is part of PrimeCloud Controller(TM). # # PrimeCloud Controller(TM) 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 versi...
gpl-2.0
-5,055,009,846,600,980,000
32.043018
140
0.496404
false
goddardl/cortex
test/IECore/CoordinateSystemTest.py
12
5463
########################################################################## # # Copyright (c) 2008-2011, Image Engine Design 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: # # * Redis...
bsd-3-clause
-598,794,855,232,643,600
33.796178
113
0.679846
false
jalilag/apspir
objedit/subindextable.py
10
43958
#!/usr/bin/env python # -*- coding: utf-8 -*- #This file is part of CanFestival, a library implementing CanOpen Stack. # #Copyright (C): Edouard TISSERANT, Francis DUPIN and Laurent BESSARD # #See COPYING file for copyrights details. # #This library is free software; you can redistribute it and/or #modify it under th...
lgpl-2.1
-4,548,165,522,337,977,300
45.813632
147
0.567087
false
youprofit/scikit-image
skimage/feature/tests/test_orb.py
20
6215
import numpy as np from numpy.testing import assert_equal, assert_almost_equal, run_module_suite from skimage.feature import ORB from skimage import data from skimage.color import rgb2gray from skimage._shared.testing import test_parallel img = rgb2gray(data.lena()) @test_parallel() def test_keypoints_orb_desired_n...
bsd-3-clause
494,025,806,176,672,700
53.043478
116
0.534352
false
CompMusic/essentia
test/src/unittest/spectral/test_spectralcontrast.py
10
4457
#!/usr/bin/env python # Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
agpl-3.0
3,425,264,114,211,224,000
37.756522
88
0.645501
false
mbarbon/wapiti
src/file/vulnerabilityxmlparser.py
1
3757
#!/usr/bin/env python # XML Report Generator Module for Wapiti Project # Wapiti Project (http://wapiti.sourceforge.net) # # David del Pozo # Alberto Pastor # Copyright (C) 2008 Informatica Gesfor # ICT Romulus (http://www.ict-romulus.eu) # # This program is free software; you can redistribute it and/or modify # it und...
gpl-2.0
-5,089,041,232,667,480,000
33.787037
76
0.656907
false
amenonsen/ansible
test/units/modules/network/f5/test_bigip_device_ha_group.py
22
7470
# -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
-6,894,789,936,368,118,000
31.478261
104
0.530522
false
davols/WhatManager2
WhatManager2/management/commands/what_meta_fixer.py
4
1349
from django.core.management.base import BaseCommand from django.db import transaction from home.models import WhatTorrent class Command(BaseCommand): help = 'Fixes missing entries in what_meta by iterating `WhatTorrent`s.' def handle(self, *args, **options): print 'Running what_meta fixer...' ...
mit
5,698,572,313,436,174,000
41.15625
86
0.548554
false
stumoodie/PathwayEditor
libs/antlr-3.4/runtime/Python/antlr3/tokens.py
20
11959
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # 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 ...
apache-2.0
638,587,864,638,592,100
27.610048
87
0.605402
false
Rhizi/rhizi
rhizi/rz_api_common.py
5
3606
# This file is part of rhizi, a collaborative knowledge graph editor. # Copyright (C) 2014-2015 Rhizi # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of...
agpl-3.0
1,825,989,486,518,577,700
38.195652
122
0.679978
false
danieldc/cloudtunes
cloudtunes-server/cloudtunes/settings/defaults.py
13
2703
import sys from os import path import logging from tornado.options import parse_command_line, options, define from cloudtunes.log import CloudtunesLogFormatter PACKAGE_ROOT = path.dirname(path.dirname(__file__)) ROOT = path.dirname(PACKAGE_ROOT) define('port', default=8001, help='run on the given port', type=int) ...
bsd-3-clause
4,062,958,205,558,327,300
24.990385
68
0.530152
false
JohnDenker/brython
www/tests/issues.py
1
9780
# issue 5 assert(isinstance(__debug__,bool)) # issue #6 : unknown encoding: windows-1250 s = "Dziś jeść ryby" b = s.encode('windows-1250') assert b == b'Dzi\x9c je\x9c\xe6 ryby' assert b.decode('windows-1250') == "Dziś jeść ryby" # issue #7 : attribute set on module is not available from inside the module import inje...
bsd-3-clause
1,729,866,972,702,748,200
19.111111
101
0.614487
false
hradec/gaffer
python/GafferTest/IECorePreviewTest/MessagesTest.py
7
11804
########################################################################## # # Copyright (c) 2020, Cinesite VFX Ltd. 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 ...
bsd-3-clause
-9,020,621,841,446,465,000
27.650485
101
0.674602
false
google/timesketch
contrib/gcs_importer.py
1
7472
# Copyright 2020 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 required by applicable law or a...
apache-2.0
-569,849,790,712,848,500
34.580952
79
0.662875
false
hellhovnd/django
django/contrib/admin/sites.py
4
18932
from functools import update_wrapper from django.http import Http404, HttpResponseRedirect from django.contrib.admin import ModelAdmin, actions from django.contrib.admin.forms import AdminAuthenticationForm from django.contrib.auth import logout as auth_logout, REDIRECT_FIELD_NAME from django.contrib.contenttypes impor...
bsd-3-clause
3,075,761,306,525,674,000
40.336245
121
0.5618
false
unseenlaser/python-for-android
python-modules/twisted/twisted/internet/_dumbwin32proc.py
60
11110
# -*- test-case-name: twisted.test.test_process -*- # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ http://isometric.sixsided.org/_/gates_in_the_head/ """ import os # Win32 imports import win32api import win32con import win32event import win32file import win32pipe import win32pr...
apache-2.0
-6,333,346,795,396,061,000
31.676471
93
0.617012
false
espadrine/opera
chromium/src/third_party/WebKit/Source/core/scripts/action_makenames.py
2
7453
#!/usr/bin/python # # Copyright (C) 2009 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 ...
bsd-3-clause
-1,392,541,420,756,519,700
39.950549
117
0.686972
false
Nick-Hall/gramps
gramps/plugins/quickview/siblings.py
10
2730
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2007-2008 Brian G. Matherly # # 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; ...
gpl-2.0
-6,824,467,217,679,716,000
36.916667
79
0.66044
false
wemanuel/smry
smry/server-auth/ls/google-cloud-sdk/lib/apiclient/errors.py
12
3444
#!/usr/bin/python2.4 # # Copyright 2014 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 require...
apache-2.0
8,058,671,178,606,029,000
23.6
75
0.683798
false
jobovy/apogee
apogee/test/test_allStar.py
1
11655
import copy import numpy import apogee.tools.read as apread from apogee.tools import bitmask, paramIndx, elemIndx _DATA= apread.allStar(raw=True) #such that we can re-use it in different tests from _util import known_failure def test_telescope(): #Test the telescope tag against the APSTAR_ID onemIndx= numpy.ar...
bsd-3-clause
4,388,152,785,872,560,600
55.304348
264
0.582154
false
lepmik/nest-simulator
pynest/nest/tests/test_sp/test_disconnect_multiple.py
7
9713
# -*- coding: utf-8 -*- # # test_disconnect_multiple.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 th...
gpl-2.0
-3,868,591,746,955,287,000
39.810924
79
0.498816
false
TobbeTripitaka/src
user/fomels/steepd.py
3
1722
#!/usr/bin/env python 'Steepest-descent method' ## Copyright (C) 2008 University of Texas at Austin ## ## 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 Licen...
gpl-2.0
6,386,223,832,854,620,000
30.309091
78
0.590012
false
karidon/Nnm_club_parser
template.py
1
2915
# -*- coding: utf-8 -*- from __future__ import unicode_literals __author__ = 'karidon' __email__ = 'Genek_x@mail.ru' __date__ = '2016-05-10' def save_html(projects, path, mode='w'): ''' Сохраняет нащ список в файл HML. :category: str (category films) :param projects: list :param path: str :mode: str (режим зап...
gpl-2.0
-6,166,498,592,405,527,000
31.797619
124
0.566606
false
openstack/sahara-dashboard
sahara_dashboard/content/data_processing/jobs/jobs/tests.py
1
3082
# 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 # distributed under t...
apache-2.0
-8,253,138,707,710,880,000
39.552632
78
0.616807
false
TimYi/pybuilder
src/main/python/pybuilder/plugins/python/pyfix_unittest_plugin.py
7
1416
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2015 PyBuilder Team # # 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/l...
apache-2.0
671,588,175,894,485,200
34.4
116
0.735169
false
jinxiaoye1987/RyzomCore
nel/tools/build_gamedata/processes/sheet_id/2_build.py
3
2057
#!/usr/bin/python # # \file 2_build.py # \brief Build sheet_id # \date 2009-06-03 10:47GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Build sheet_id # # NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> # Copyright (C) 2010 Winch Gate Property Limited # # This program is free...
agpl-3.0
313,693,223,034,468,540
31.650794
232
0.724356
false
guewen/odoo
openerp/addons/base/tests/test_acl.py
41
6032
import unittest2 from lxml import etree import openerp from openerp.tools.misc import mute_logger from openerp.tests import common # test group that demo user should not have GROUP_TECHNICAL_FEATURES = 'base.group_no_one' class TestACL(common.TransactionCase): def setUp(self): super(TestACL, self).setU...
agpl-3.0
-4,600,665,028,816,539,600
54.33945
118
0.639755
false
390910131/Misago
misago/core/tests/test_momentjs.py
8
1276
from django.conf import settings from django.test import TestCase from misago.core.momentjs import list_available_locales, get_locale_path class MomentJSTests(TestCase): def test_list_available_locales(self): """list_available_locales returns list of locales""" TEST_CASES = ( 'af', ...
gpl-2.0
-7,768,394,679,325,975,000
23.538462
79
0.484326
false
tboyce1/home-assistant
homeassistant/components/light/scsgate.py
19
3349
""" Support for SCSGate lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.scsgate/ """ import logging import voluptuous as vol import homeassistant.components.scsgate as scsgate from homeassistant.components.light import (Light, PLATFORM_SCH...
apache-2.0
6,436,838,442,553,438,000
26.908333
78
0.610033
false
byt3bl33d3r/Veil-Evasion
modules/payloads/template.py
4
1980
""" Description of the payload. Addtional notes, sources, links, etc. Author of the module. """ # framework import to access shellcode generation from modules.common import shellcode # framework import to access common helper methods, including randomization from modules.common import helpers # framework impor...
gpl-3.0
6,042,473,314,929,948,000
30.428571
99
0.65
false
carvalhomb/tsmells
guess/src/Lib/xml/dom/DocumentFragment.py
2
1418
######################################################################## # # File Name: DocumentFragment.py # # Documentation: http://docs.4suite.com/4DOM/DocumentFragment.py.html # """ WWW: http://4suite.com/4DOM e-mail: support@4suite.com Copyright (c) 2000 Fourthought Inc, USA. ...
gpl-2.0
6,940,060,919,489,865,000
29.511111
76
0.523272
false
cyberitsolutions/alloc-cli
alloccli/mbox.py
1
2667
"""alloccli subcommand for downloading alloc comments to mbox file.""" import tempfile import os import subprocess from sys import stdout from contextlib import closing from .alloc import alloc class mbox(alloc): """Download a task's emails to an mbox file.""" # Setup the options that this cli can accept ...
agpl-3.0
8,695,259,717,809,778,000
30.376471
89
0.52231
false
tymofij/werkzeug
tests/contrib/test_iterio.py
30
5488
# -*- coding: utf-8 -*- """ tests.iterio ~~~~~~~~~~~~ Tests the iterio object. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import pytest from tests import strict_eq from werkzeug.contrib.iterio import IterIO, greenlet class TestIterO(object): de...
bsd-3-clause
-8,026,106,812,219,098,000
28.989071
74
0.501822
false
apyrgio/ganeti
lib/cmdlib/instance_query.py
2
11500
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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: # # 1. Redistributions of source code must retain the above copyri...
bsd-2-clause
1,510,076,378,824,684,500
36.096774
79
0.637739
false
jimsimon/sky_engine
sky/tools/webkitpy/layout_tests/controllers/manager.py
10
23875
# Copyright (C) 2010 Google Inc. All rights reserved. # Copyright (C) 2010 Gabor Rapcsanyi (rgabor@inf.u-szeged.hu), University of Szeged # # 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
-5,684,303,257,549,471,000
48.226804
192
0.655204
false
JudoWill/ResearchNotebooks
ContestWin.py
1
2452
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <codecell> from selenium import webdriver from selenium.common.exceptions import TimeoutException, StaleElementReferenceException from selenium.webdriver.support.ui import WebDriverWait import bs4 import urllib2 import time # <codecell> def get_current_artist():...
mit
7,580,593,206,299,301,000
24.278351
113
0.652529
false
alerta/python-alerta-client
setup.py
2
1614
#!/usr/bin/env python import os import setuptools def read(filename): return open(os.path.join(os.path.dirname(__file__), filename)).read() setuptools.setup( name='alerta', version=read('VERSION'), description='Alerta unified command-line tool and SDK', long_description=read('README.md'), ...
apache-2.0
-4,274,909,027,068,212,000
29.45283
73
0.615861
false
platformio/platformio
tests/package/test_pack.py
1
5781
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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 appli...
apache-2.0
-2,632,341,368,601,307,600
37.798658
88
0.61114
false
i2y/mochi
mochi/core/constants.py
3
2266
import ast from .global_env import global_env from mochi.parser import Symbol # ----------------------------------------------- # EOF Class class Eof(object): def __repr__(self): return "EOF" def __str__(self): return "EOF" #----------------------------------------------- # constants EOF = ...
mit
5,757,378,737,250,850,000
23.117021
49
0.4594
false
gening/markdown_note
markdown_note/note_rmdir.py
1
1311
# coding: utf-8 """ authors: gening date: 2017-08-15 18:45:24 version: 1.0.1 desc: delete an empty folder detached to its markdown file. usage: ./note_rmdir.py <md_file_name> """ from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import os impo...
mit
-8,507,560,112,559,617,000
25.755102
80
0.654462
false
offlinehacker/flumotion
flumotion/component/muxers/webm.py
1
1434
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public License version 2 as published by # the Free ...
gpl-2.0
-1,925,629,782,845,716,200
34.85
74
0.736402
false
SimpleITK/SimpleITK
Examples/ImageRegistrationMethod1/ImageRegistrationMethod1.py
4
2327
#!/usr/bin/env python # ========================================================================= # # Copyright NumFOCUS # # 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:/...
apache-2.0
-1,651,407,721,188,440,800
33.731343
116
0.691018
false
CanonicalLtd/landscape-client
landscape/client/manager/tests/test_plugin.py
1
4110
from twisted.internet.defer import Deferred from landscape.client.tests.helpers import LandscapeTest from landscape.client.tests.helpers import ManagerHelper from landscape.client.manager.plugin import ManagerPlugin, SUCCEEDED, FAILED class BrokerPluginTest(LandscapeTest): helpers = [ManagerHelper] def tes...
gpl-2.0
551,846,246,184,726,800
39.693069
79
0.608029
false
RasaHQ/rasa_core
tests/core/test_dialogues.py
1
1367
import json import jsonpickle import pytest from rasa.core import utils from rasa.core.domain import Domain from rasa.core.tracker_store import InMemoryTrackerStore from tests.core.utilities import tracker_from_dialogue_file from tests.core.conftest import TEST_DIALOGUES, EXAMPLE_DOMAINS @pytest.mark.parametrize("f...
apache-2.0
-4,248,341,281,015,927,000
34.973684
70
0.752743
false
ikargis/horizon_fod
horizon/test/urls.py
3
1545
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
691,911,654,505,577,200
33.333333
78
0.718447
false
umitproject/umpa
umit/umpa/protocols/_layer4.py
1
4489
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2008-2009 Adriano Monteiro Marques. # # Author: Bartosz SKOWRON <getxsick at gmail dot com> # # 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 S...
lgpl-2.1
-1,053,505,410,817,154,600
31.528986
78
0.638672
false
wbyne/QGIS
python/plugins/processing/algs/qgis/LinesIntersection.py
1
5177
# -*- coding: utf-8 -*- """ *************************************************************************** LinesIntersection.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *********************...
gpl-2.0
5,613,628,603,960,018,000
38.219697
117
0.532355
false
insiderr/insiderr-app
ios-patches/basemodules/twisted/words/protocols/irc.py
26
115360
# -*- test-case-name: twisted.words.test.test_irc -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Internet Relay Chat protocol for client and server. Future Plans ============ The way the IRCClient class works here encourages people to implement IRC clients by subclassing the ephemera...
gpl-3.0
-250,563,550,933,231,500
29.713525
112
0.577575
false
dpac-vlsi/SynchroTrace
util/configs/example/ruby_direct_test.py
8
4459
# Copyright (c) 2006-2007 The Regents of The University of Michigan # Copyright (c) 2009 Advanced Micro Devices, 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 co...
bsd-3-clause
7,195,518,720,051,425,000
34.672
77
0.709352
false
dcneeme/droidcontroller
pid.py
1
15883
#------------------------------------------------------------------------------- # PID.py # A simple implementation of a PID controller and also the threestep motor control #------------------------------------------------------------------------------- # Heavily modified PID source from the book "Real-World Instrument...
gpl-3.0
-1,855,959,136,888,601,900
46.414925
237
0.568029
false
virtualnobi/MediaFiler
nobi/wx/Menu.py
1
1806
""" (c) by nobisoft 2016- """ # Imports ## Standard ## Contributed import wx ## nobi ## Project # Class class Menu(wx.Menu): """An extension of wx.Menu - it allows to insert a menu item after another one identified by ID - it (shall sometime) reduce subsequent separators to one automatically """ ...
gpl-3.0
4,786,442,484,183,353,000
30.137931
105
0.583056
false
jamesbdunlop/defaultMayaLibrary
xml_export/uv_getUVs.py
2
14895
from apps.app_logger import log import maya.api.OpenMaya as om import maya.cmds as cmds import config_constants as configCONST def _uvMapIndex(pathToGeo, mapName): x = 0 p = True maps = {} while p: if cmds.getAttr('%s.uvSet[%s].uvSetName' % (pathToGeo, x)): maps[cmds.getAttr('%s.uv...
apache-2.0
-8,915,309,298,227,669,000
57.1875
223
0.591675
false
chromium/chromium
third_party/blink/renderer/build/scripts/writer_test_util.py
6
3534
# Copyright 2021 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 contextlib import difflib import filecmp import os import shutil import tempfile import unittest from json5_generator import Json5File, Writer @con...
bsd-3-clause
-8,408,895,125,960,388,000
30.837838
74
0.644312
false
Zerknechterer/pyload
module/plugins/hoster/SendspaceCom.py
1
2311
# -*- coding: utf-8 -*- import re from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo class SendspaceCom(SimpleHoster): __name__ = "SendspaceCom" __type__ = "hoster" __version__ = "0.17" __pattern__ = r'https?://(?:www\.)?sendspace\.com/file/\w+' __config__ = [(...
gpl-3.0
-340,626,205,837,711,300
37.516667
137
0.539593
false
hanvo/MusicCloud
Crawler/Install Files/pygame/test/test_utils/png.py
19
155395
#!/usr/bin/env python # $URL: http://pypng.googlecode.com/svn/trunk/code/png.py $ # $Rev: 228 $ # png.py - PNG encoder/decoder in pure Python # # Modified for Pygame in Oct., 2012 to work with Python 3.x. # # Copyright (C) 2006 Johann C. Rocholl <johann@browsershots.org> # Portions Copyright (C) 2009 David Jones <dr...
bsd-3-clause
-2,471,159,973,479,759,400
40.001319
117
0.640284
false
jbornschein/y2k
caltech/sbn-nade.py
6
1843
import numpy as np from learning.dataset import CalTechSilhouettes from learning.termination import LogLikelihoodIncrease, EarlyStopping from learning.monitor import MonitorLL, DLogModelParams, SampleFromP from learning.training import Trainer from learning.models.rws import LayerStack from learning.models.sbn imp...
agpl-3.0
-6,987,051,185,225,650,000
20.183908
93
0.592512
false
imatge-upc/trecvid-2015
scripts/python/display.py
1
5149
import numpy as np import matplotlib.pyplot as plt import cv2 import os import pickle import evaluate as eval from get_params import get_params """ Run this to save figures displaying top 12 results of the ranking for each query.""" params = get_params() # Image paths DB_IMAGES = os.path.join(params['root'],'...
mit
-868,938,235,470,008,200
31.435065
147
0.594096
false
jinxiaoye1987/RyzomCore
nel/tools/build_gamedata/processes/anim/3_install.py
3
1732
#!/usr/bin/python # # \file 3_install.py # \brief Install anim # \date 2009-03-10 13:13GMT # \author Jan Boon (Kaetemi) # Python port of game data build pipeline. # Install anim # # NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/> # Copyright (C) 2010 Winch Gate Property Limited # # This program is free s...
agpl-3.0
1,373,817,630,931,381,000
29.385965
75
0.717667
false
ASMlover/study
python/proto/google/protobuf/internal/python_message.py
1
42917
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-2-clause
4,198,976,967,410,636,300
35.965547
80
0.700282
false
danellecline/mbari-aesa
test/split_images.py
1
3285
#!/usr/bin/env python __author__ = 'Danelle Cline' __copyright__ = '2016' __license__ = 'GPL v3' __contact__ = 'dcline at mbari.org' __doc__ = ''' Reads in AESA training images and splits into training/test/validation set @var __date__: Date of last svn commit @undocumented: __doc__ parser @status: production @...
gpl-3.0
6,930,534,936,888,665,000
30.285714
125
0.595129
false
CloudServer/nova
nova/consoleauth/rpcapi.py
51
3682
# Copyright 2013 Red Hat, 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 agre...
apache-2.0
6,924,779,524,255,266,000
36.191919
79
0.616241
false
h3llrais3r/SickRage
lib/tornado/test/twisted_test.py
18
27826
# Author: Ovidiu Predescu # Date: July 2011 # # 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 ...
gpl-3.0
3,854,676,761,329,528,300
37.065663
93
0.624991
false
wbg-optronix-lab/emergence-lab
core/urls/project.py
2
1961
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.conf.urls import url import core.views urlpatterns = [ # url(r'^$', # core.views.ProjectListView.as_view(), name='project_list'), url(r'^create/$', core.views.ProjectCreateView.as_view(), name='projec...
mit
-5,325,597,419,552,490,000
42.577778
77
0.595105
false
isezen/pytkm
compression.py
1
3010
#!/usr/bin/python # -*- coding: utf-8 -*- # pylint: disable=C0103, C0321, W0212 """Compression utility for 7z and zip files. Optimized for csv files.""" import os import zipfile as zipf import pylzma def compress(f, rename_to=None, big_data=False, f_type='7z'): """ Compresses a file. Optimized for csv files....
mit
-2,574,618,834,693,519,000
29.714286
79
0.53289
false
jammerful/buildbot
master/buildbot/worker_transition.py
11
11459
# This file is part of Buildbot. Buildbot 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 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
-2,315,338,362,696,529,000
33.20597
92
0.666987
false
geotagx/pybossa
test/test_uploader/test_local_uploader.py
1
7471
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2015 SciFabric LTD. # # PyBossa is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
agpl-3.0
8,128,730,163,763,250,000
45.403727
109
0.647704
false
valmynd/MediaFetcher
src/plugins/youtube_dl/youtube_dl/extractor/crackle.py
1
5817
# coding: utf-8 from __future__ import unicode_literals, division import hashlib import hmac import re import time from .common import InfoExtractor from ..compat import compat_HTTPError from ..utils import ( determine_ext, float_or_none, int_or_none, parse_age_limit, parse_duration, url_or_none, ExtractorErro...
gpl-3.0
-6,836,645,360,470,241,000
27.79703
117
0.618188
false
Debian/debile
debile/master/arches.py
2
3766
# Copyright (c) 2012-2013 Paul Tagliamonte <paultag@debian.org> # # 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, ...
mit
-7,822,004,619,686,526,000
33.87037
76
0.642857
false
rajarammallya/melange
melange/common/config.py
2
2102
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack LLC. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # ...
apache-2.0
3,419,125,939,191,101,400
31.338462
78
0.685062
false
mathias-nyman/mittn
mittn/headlessscanner/test_dbtools.py
2
8099
import unittest import tempfile import uuid import os import mittn.headlessscanner.dbtools as dbtools import datetime import socket import json import sqlalchemy from sqlalchemy import create_engine, Table, Column, MetaData, exc, types class dbtools_test_case(unittest.TestCase): def setUp(self): # Create ...
apache-2.0
-3,506,958,445,289,969,000
45.545977
133
0.523398
false
boracho/reddit-librarian
librarianbot.py
1
1346
import praw import time import json sub_philo = 'philosophy' sub_science = 'science' library = '' key_flair = 'psychology' keyword_philo = 'consciousness' keyword_test = 'snow' keyword_test_two = 'intersection' keyword_sci = 'quantum' already_posted_id = [] already_posted_url = [] r = praw.Reddit(user_agent = 'Librar...
mit
8,054,340,248,041,795,000
34.421053
113
0.625557
false
eugenejen/AutobahnPython
examples/twisted/wamp/work/pubsub/server.py
14
3020
############################################################################### ## ## Copyright (C) 2013 Tavendo GmbH ## ## 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:/...
apache-2.0
2,489,533,038,190,035,500
27.490566
122
0.628477
false
cartertech/odoo-hr-ng
hr_policy_absence/__init__.py
1
1070
#-*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2015 One Click Software (http://oneclick.solutions) # and Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # This program is free software: you ca...
agpl-3.0
-6,444,817,049,636,742,000
45.521739
80
0.615888
false
Daniel-CA/odoomrp-wip-public
partner_risk_insurance/__openerp__.py
28
1474
# -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the...
agpl-3.0
-3,977,420,785,175,846,400
37.763158
78
0.575696
false
SPARLab/BikeMaps
spirit/utils/forms.py
1
1737
#-*- coding: utf-8 -*- from django import forms from django.utils.html import conditional_escape, mark_safe from six import smart_text class NestedModelChoiceField(forms.ModelChoiceField): """A ModelChoiceField that groups parents and childrens""" # TODO: subclass ModelChoiceIterator, remove _populate_choice...
mit
5,185,146,625,280,223,000
39.395349
106
0.644214
false
bootc/owfs-cvsimport
module/swig/python/examples/xmlrpc_server.py
1
2373
#! /usr/bin/env python """ ::BOH $Id$ Copyright (c) 2005 Peter Kropf. All rights reserved. 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 l...
gpl-2.0
-1,502,286,951,648,837,600
29.818182
75
0.720607
false
betterlife/psi
tests/thirdparty/local_image_store_test.py
2
1772
from __future__ import print_function import os import unittest import uuid import io from werkzeug.datastructures import FileStorage from psi.app.thirdparty.local_image_store import LocalImageStore from tests.base_test_case import BaseTestCase class TestLocalImageStore(BaseTestCase): def setUp(self): s...
mit
-3,454,109,550,331,404,000
31.814815
118
0.64842
false
crepererum/invenio
invenio/modules/bulletin/format_elements/bfe_webjournal_sub_navigation.py
13
6484
# -*- coding: utf-8 -*- # $Id: bfe_webjournal_CERNBulletinSubNavigation.py,v 1.13 2009/02/12 10:00:57 jerome Exp $ # # This file is part of Invenio. # Copyright (C) 2009, 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # publ...
gpl-2.0
-3,365,103,016,537,588,700
39.779874
101
0.524368
false
jck/myhdl
myhdl/_bin.py
4
1623
# This file is part of the myhdl library, a Python package for using # Python as a Hardware Description Language. # # Copyright (C) 2003-2008 Jan Decaluwe # # The myhdl 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 t...
lgpl-2.1
1,026,983,746,684,243,300
29.622642
74
0.649415
false
iut-ibk/DynaMind-UrbanSim
3rdparty/opus/src/urbansim/gridcell/is_vacant_land.py
2
1727
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.variables.variable import Variable from urbansim.functions import attribute_label from numpy import logical_not class is_vacant_land(Variable): """Returns 1 if vacant land ...
gpl-2.0
-4,363,778,423,606,772,000
31.901961
86
0.543717
false
Panagiotis-Kon/empower-runtime
empower/core/vap.py
1
2577
#!/usr/bin/env python3 # # Copyright (c) 2016 Roberto Riggio # # 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 applicabl...
apache-2.0
-1,850,319,026,677,174,800
27.318681
75
0.619325
false
shadowmint/nwidget
lib/pyglet-1.4.4/pyglet/image/atlas.py
42
9104
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
apache-2.0
8,840,669,249,644,559,000
34.150579
78
0.621046
false
chipaca/snapcraft
tests/unit/meta/test_application.py
2
9746
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2019-2021 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
gpl-3.0
-3,080,333,936,170,977,300
31.378738
88
0.546275
false
apehua/pilas
pilasengine/interprete/lanas_ui.py
2
2136
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'pilasengine/interprete/lanas.ui' # # by: PyQt4 UI code generator 4.11.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: d...
lgpl-3.0
-6,399,663,227,094,866,000
34.016393
87
0.692416
false
schmidtc/pysal
pysal/contrib/handler/tests/test_error_spet_sparse.py
1
20565
import unittest import pysal import numpy as np from scipy import sparse #from pysal.spreg import error_sp_het as HET from functools import partial from pysal.contrib.handler import Model GM_Error_Het = partial(Model, mtype='GM_Error_Het') GM_Endog_Error_Het = partial(Model, mtype='GM_Endog_Error_Het') GM_Combo_Het = ...
bsd-3-clause
3,940,776,996,582,257,000
47.502358
249
0.576903
false
idan/oauthlib
tests/oauth2/rfc6749/endpoints/test_extra_credentials.py
1
2611
"""Ensure extra credentials can be supplied for inclusion in tokens. """ from unittest import mock from oauthlib.oauth2 import ( BackendApplicationServer, LegacyApplicationServer, MobileApplicationServer, RequestValidator, WebApplicationServer, ) from tests.unittest import TestCase class ExtraCredentialsTes...
bsd-3-clause
3,686,196,729,399,241,700
36.84058
79
0.642283
false
comiconomenclaturist/Airtime
python_apps/pypo/pypo/testpypoliqqueue.py
12
2336
from pypoliqqueue import PypoLiqQueue from telnetliquidsoap import DummyTelnetLiquidsoap, TelnetLiquidsoap from Queue import Queue from threading import Lock import sys import signal import logging from datetime import datetime from datetime import timedelta def keyboardInterruptHandler(signum, frame): logger =...
gpl-3.0
8,531,366,200,700,141,000
22.836735
80
0.602312
false
jml/flocker
flocker/ca/test/test_ca.py
3
25789
# Copyright ClusterHQ Inc. See LICENSE file for details. """ Tests for certification logic in ``flocker.ca._ca`` """ import datetime import os from uuid import uuid4, UUID from Crypto.Util import asn1 from OpenSSL import crypto from twisted.trial.unittest import SynchronousTestCase from twisted.python.filepath im...
apache-2.0
4,754,824,312,859,952,000
37.149408
79
0.575788
false
chrisfilo/Neurosynth
neurosynth/analysis/meta.py
1
10482
""" Meta-analysis tools """ import logging import numpy as np from scipy.stats import norm from neurosynth.base import imageutils from neurosynth.analysis import stats from os.path import join, exists from os import makedirs logger = logging.getLogger('neurosynth.meta') def analyze_features(dataset, features=None, ...
mit
-9,200,291,890,323,377,000
45.586667
93
0.59979
false