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
UCL-INGI/INGInious
inginious/frontend/pages/social.py
1
3533
# -*- coding: utf-8 -*- # # This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for # more information about the licensing of this file. """ Auth page """ import flask from flask import redirect from werkzeug.exceptions import NotFound from inginious.frontend.pages.utils import INGIniousPage, ING...
agpl-3.0
-8,940,223,133,305,532,000
39.147727
127
0.643363
false
azumimuo/family-xbmc-addon
script.module.urlresolver/lib/urlresolver/plugins/videa.py
8
1958
# -*- coding: UTF-8 -*- """ Kodi urlresolver plugin Copyright (C) 2016 alifrezser 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 ...
gpl-2.0
-1,950,565,024,365,163,300
40.659574
137
0.64096
false
dhague/vpower
tests/test_TacxBlueMotionPowerCalculatorTest.py
1
1059
import unittest from TacxBlueMotionPowerCalculator import TacxBlueMotionPowerCalculator class TacxBlueMotionPowerCalculatorTest(unittest.TestCase): def setUp(self): self.calculator = TacxBlueMotionPowerCalculator() def test_calculation_min(self): power = self.calculator.power_from_speed(0.0)...
mit
-1,306,788,333,065,921,800
32.09375
71
0.68933
false
bolshoibooze/hone
HostAgent/agentFreFrp.py
2
6185
################################################################################ # The Frenetic Project # # frenetic@frenetic-lang.org # #############################################################################...
bsd-3-clause
8,711,936,058,368,937,000
36.259036
105
0.544705
false
strahlex/machinekit
src/hal/user_comps/hal_temp_atlas.py
6
5185
#!/usr/bin/python2 # encoding: utf-8 """ Temperature.py Created by Alexander Rössler on 2014-03-24. """ from fdm.r2temp import R2Temp import argparse import time import sys import hal # The CRAMPS board thermistor input has one side grounded and the other side # pulled high through a 1.00K resistor to 1.8V. Follo...
lgpl-2.1
5,192,329,056,751,742,000
31.603774
163
0.615162
false
Danziger/Pluralsight-Network-Penetration-Testing-Using-Python-and-Kali-Linux
004 - Basic Sniffer/main.py
1
2136
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket import struct from ctypes import * class IPHeader(Structure): _fields_ = [ ('ihl', c_ubyte, 4), ('version', c_ubyte, 4), ('tos', c_ubyte), ('len', c_ushort), ('id', ...
mit
8,306,098,989,645,829,000
26.371795
127
0.542643
false
msemple1111/kahoot-hack
lib/requests/packages/urllib3/connection.py
64
12593
from __future__ import absolute_import import datetime import logging import os import sys import socket from socket import error as SocketError, timeout as SocketTimeout import warnings from .packages import six from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection from .packages.six.moves.http...
gpl-3.0
8,271,093,526,011,952,000
33.407104
99
0.602875
false
wkarmistead/InvestmentAnalysisDashboard
pyBackend/dataLayer/InputTechnicalAnalysis.py
1
1167
import os import csv from Application import * class InputTechnicalAnalysis(object): ''' InputTechnicalAnalysis loads the input file TechnicalIndicators.csv ''' Inputs = [] def __init__(self): self._rootPath = Application.getRootDirectory() # Get application root directory ...
gpl-2.0
-6,288,703,280,737,684,000
28.2
110
0.554413
false
Omegaphora/external_chromium_org
tools/telemetry/telemetry/core/backends/chrome/android_browser_finder_unittest.py
25
3287
# Copyright 2013 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 unittest from telemetry import benchmark from telemetry.core import browser_options from telemetry.core.platform import android_device from telemetry...
bsd-3-clause
-839,076,410,411,410,700
35.932584
78
0.701856
false
slyphon/pants
src/python/pants/base/deprecated.py
6
5205
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import inspect impor...
apache-2.0
2,845,797,601,874,219,500
38.732824
98
0.712584
false
rghe/ansible
test/units/modules/cloud/amazon/test_ec2_vpc_vpn.py
64
15038
# (c) 2017 Red Hat Inc. # # This file is part of Ansible # # Ansible 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. # # Ansible is dis...
gpl-3.0
6,453,196,867,225,699,000
40.541436
156
0.681008
false
madmax983/h2o-3
py2/h2o_objects.py
20
37914
import sys, getpass, os, psutil, time, requests, errno, threading, inspect, shlex import h2o_os_util, h2o_print as h2p, h2o_args import h2o_nodes from h2o_test import \ tmp_dir, tmp_file, flatfile_pathname, spawn_cmd, find_file, verboseprint, \ dump_json, log, check_sandbox_for_errors import json, platform, re ...
apache-2.0
599,930,942,550,395,000
40.709571
124
0.566123
false
inmomentsoftware/pledgeservice
testlib/setuptools/lib2to3_ex.py
907
1998
""" Customized Mixin2to3 support: - adds support for converting doctests This module raises an ImportError on Python 2. """ from distutils.util import Mixin2to3 as _Mixin2to3 from distutils import log from lib2to3.refactor import RefactoringTool, get_fixers_from_package import setuptools class DistutilsRefactorin...
agpl-3.0
-357,288,759,115,870,100
33.448276
77
0.638639
false
google/grr
grr/core/grr_response_core/lib/rdfvalues/client.py
1
21251
#!/usr/bin/env python """AFF4 RDFValue implementations for client information. This module contains the RDFValue implementations used to communicate with the client. """ import binascii import hashlib import logging import platform import re import socket import struct import sys from typing import Mapping, Text imp...
apache-2.0
-8,787,325,504,680,991,000
29.402003
94
0.669757
false
cermegno/Redis-test
_V3/step3.py
1
1699
#!/usr/bin/env python3 import os import redis import json from flask import Flask, render_template, redirect, request, url_for, make_response if 'VCAP_SERVICES' in os.environ: VCAP_SERVICES = json.loads(os.environ['VCAP_SERVICES']) CREDENTIALS = VCAP_SERVICES["rediscloud"][0]["credentials"] r = redis.Redis...
mit
6,666,768,699,018,775,000
30.462963
109
0.600942
false
Integral-Technology-Solutions/ConfigNOW-4.3
Lib/xml/dom/minidom.py
3
30458
"""\ minidom.py -- a lightweight DOM implementation. parse("foo.xml") parseString("<foo><bar/></foo>") Todo: ===== * convenience methods for getting elements and text. * more testing * bring some of the writer and linearizer code into conformance with this interface * SAX 2 namespaces """ import string ...
mit
-5,702,962,677,824,761,000
32.251092
79
0.587432
false
mikewiebe-ansible/ansible
lib/ansible/modules/cloud/xenserver/xenserver_guest.py
11
98114
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, Bojan Vitnik <bvitnik@mainstream.rs> # 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 ANSIBLE_METADATA = {'metadata_versi...
gpl-3.0
5,442,651,141,572,682,000
49.757372
158
0.502497
false
punalpatel/st2
st2common/st2common/controllers.py
5
1728
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
apache-2.0
-2,003,888,449,885,351,200
39.186047
88
0.686343
false
aselle/tensorflow
tensorflow/contrib/learn/python/learn/learn_io/data_feeder.py
39
32726
# Copyright 2016 The TensorFlow 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 required by applica...
apache-2.0
290,992,274,688,850,050
34.610446
100
0.622991
false
hslatman/spiderfoot
ext/dns/rdtypes/ANY/NSEC3.py
42
6807
# Copyright (C) 2004-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
gpl-2.0
2,991,551,544,845,615,000
35.994565
89
0.556192
false
Nexenta/cinder
cinder/wsgi/wsgi.py
9
1282
# 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 # di...
apache-2.0
-7,105,520,794,665,259,000
26.869565
77
0.734789
false
louietsai/python-for-android
python3-alpha/python3-src/android-scripts/say_chat.py
46
2159
__author__ = "Brian Lenihan <brian.lenihan@gmail.com" __copyright__ = "Copyright (c) 2012 Python for Android Project" __license__ = "Apache License, Version 2.0" import logging import android from pyxmpp2.jid import JID from pyxmpp2.client import Client from pyxmpp2.settings import XMPPSettings from pyxmpp2.interface...
apache-2.0
5,032,170,297,765,571,000
28.575342
85
0.695692
false
dmitry-sobolev/ansible
lib/ansible/modules/database/proxysql/proxysql_mysql_users.py
12
17560
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible 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. #...
gpl-3.0
4,281,554,724,992,882,700
32.639847
82
0.55074
false
jwlawson/tensorflow
tensorflow/python/grappler/layout_optimizer_test.py
2
47275
# Copyright 2017 The TensorFlow 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 required by applica...
apache-2.0
3,080,800,411,145,399,000
37.094279
80
0.649815
false
Tomtomgo/phantomjs
src/breakpad/src/tools/gyp/test/variables/gyptest-commands-repeated.py
138
1476
#!/usr/bin/env python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Test variable expansion of '<!()' syntax commands where they are evaluated more then once.. """ import os import TestGyp test = TestG...
bsd-3-clause
6,736,336,160,778,618,000
31.8
77
0.723577
false
navicore/pollenc
pollen/login_preparer.py
2
1040
# Copyright Amaret, Inc 2011-2015. All rights reserved. # pylint: disable=missing-docstring # pylint: disable=bad-whitespace ''' Pollen Cloud Compiler Client ''' import hashlib import time import os import random from pollen.scrlogger import ScrLogger from pollen import utils LOGGER = ScrLogger() class LoginPrepar...
gpl-2.0
-2,292,360,193,135,506,000
22.636364
73
0.527885
false
LPM-HMS/COSMOS2
cosmos/api.py
2
6632
# from .core.cmd_fxn.io import find, out_dir, forward import contextlib import importlib import inspect import json import pprint from functools import wraps import funcsigs import os import re from decorator import decorator import sys from cosmos import ( WorkflowStatus, StageStatus, TaskStatus, NOO...
gpl-3.0
5,722,000,943,041,026,000
27.34188
110
0.610977
false
andythigpen/home-assistant
tests/test_component_api.py
8
11764
""" tests.test_component_http ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests Home Assistant HTTP component does what it should do. """ # pylint: disable=protected-access,too-many-public-methods import unittest import json import requests import homeassistant as ha import homeassistant.bootstrap as bootstrap import homeassistant....
mit
-7,333,776,132,767,621,000
31.142077
79
0.575655
false
chaffra/sympy
sympy/integrals/tests/test_risch.py
31
33684
"""Most of these tests come from the examples in Bronstein's book.""" from sympy import (Poly, I, S, Function, log, symbols, exp, tan, sqrt, Symbol, Lambda, sin, Eq, Piecewise, factor) from sympy.integrals.risch import (gcdex_diophantine, frac_in, as_poly_1t, derivation, splitfactor, splitfactor_sqf, canonical_...
bsd-3-clause
5,649,143,867,817,384,000
48.976261
108
0.515052
false
lmyrefelt/CouchPotatoServer
libs/rsa/bigfile.py
196
3101
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Unl...
gpl-3.0
-70,967,278,045,172,890
34.632184
79
0.704516
false
darren-wang/gl
glance/db/sqlalchemy/migrate_repo/versions/020_drop_images_table_location.py
19
1191
# Copyright 2013 OpenStack Foundation # 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 requ...
apache-2.0
-3,228,969,611,975,779,300
33.028571
78
0.734677
false
praekelt/django-photologue
photologue/admin.py
2
2551
""" Newforms Admin configuration for Photologue """ from django.contrib import admin from django.contrib.contenttypes import generic from models import * class GalleryAdmin(admin.ModelAdmin): list_display = ('title', 'date_added', 'photo_count', 'is_public') list_filter = ['date_added', 'is_public'...
bsd-3-clause
5,865,225,377,445,091,000
32.472973
117
0.597805
false
kytvi2p/Sigil
3rdparty/python/Lib/test/test_locale.py
8
20616
from test.support import verbose import unittest import locale import sys import codecs class BaseLocalizedTest(unittest.TestCase): # # Base class for tests using a real locale # @classmethod def setUpClass(cls): if sys.platform == 'darwin': import os tlocs = ("en_U...
gpl-3.0
-7,645,076,335,487,071,000
38.041667
81
0.583584
false
samsu/neutron
services/firewall/agents/firewall_agent_api.py
7
2606
# Copyright (c) 2013 OpenStack Foundation # 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 ...
apache-2.0
-1,260,615,240,563,021,000
32.844156
79
0.630084
false
jefftc/changlab
Betsy/Betsy/modules/summarize_coverage_at_positions.py
1
4182
from Module import AbstractModule # Chrom Pos <Sample> [<Sample> ...] # # Each value in the matrix is: # <ref>/<alt>/<vaf> class Module(AbstractModule): def __init__(self): AbstractModule.__init__(self) def run( self, network, in_data, out_attributes, user_options, num_cores, out...
mit
-7,750,360,248,861,434,000
35.365217
69
0.512673
false
weimingtom/python-for-android
python3-alpha/python3-src/Mac/Tools/Doc/HelpIndexingTool/Miscellaneous_Standards.py
48
1206
"""Suite Miscellaneous Standards: Useful events that aren\xd5t in any other suite Level 0, version 0 Generated from /Developer/Applications/Apple Help Indexing Tool.app AETE/AEUT resource version 1/1, language 0, script 0 """ import aetools import MacOS _code = 'misc' class Miscellaneous_Standards_Events: def ...
apache-2.0
8,141,006,515,259,970,000
23.612245
81
0.645108
false
wtsi-hgi/startfortest
useintest/modules/irods/services.py
1
6234
import json import logging import math import os from abc import abstractmethod, ABCMeta from typing import List, Type, Callable, Sequence from useintest.modules.irods.models import IrodsUser, IrodsDockerisedService, Version from useintest.services.controllers import DockerisedServiceController _DOCKER_REPOSITORY = "...
mit
-5,683,519,541,828,859,000
41.993103
121
0.662977
false
2uller/LotF
App/Lib/test/test_xmlrpc.py
3
40092
import base64 import datetime import sys import time import unittest import xmlrpclib import SimpleXMLRPCServer import mimetools import httplib import socket import StringIO import os import re from test import test_support try: import threading except ImportError: threading = None try: ...
gpl-2.0
-3,652,680,698,381,343,000
37.037975
88
0.597601
false
kennedyshead/home-assistant
tests/components/netatmo/test_sensor.py
2
7387
"""The tests for the Netatmo sensor platform.""" from unittest.mock import patch import pytest from homeassistant.components.netatmo import sensor from homeassistant.components.netatmo.sensor import MODULE_TYPE_WIND from homeassistant.helpers import entity_registry as er from .common import TEST_TIME, selected_platf...
apache-2.0
-2,420,705,939,923,388,000
30.434043
87
0.585082
false
CiuffysHub/MITMf
mitmflib-0.18.4/mitmflib/impacket/ICMP6.py
2
19485
# Copyright (c) 2003-2012 CORE Security Technologies # # This software is provided under under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # for more information. # import array import struct from ImpactPacket import Header, Data from IP6_Address import IP6_Addres...
gpl-3.0
-2,535,200,844,698,131,000
35.973435
149
0.560174
false
ESS-LLP/erpnext
erpnext/config/manufacturing.py
5
3100
from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "label": _("Production"), "icon": "fa fa-star", "items": [ { "type": "doctype", "name": "Work Order", "description": _("Orders released for production."), }, { "type": "doctype", "na...
gpl-3.0
98,584,626,762,956,050
19.394737
75
0.484516
false
weblyzard/ewrt
tests/access/test_http_retrieve.py
1
3950
#!/usr/bin/env python ''' @package eWRT.access.http provides access to resources using http ''' from __future__ import print_function # (C)opyrights 2008-2012 by Albert Weichselbraun <albert@weblyzard.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Gen...
gpl-3.0
5,425,730,444,471,328,000
31.916667
78
0.608608
false
lightsofapollo/git-repo
subcmds/download.py
53
3231
# # Copyright (C) 2008 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 la...
apache-2.0
2,711,639,455,694,409,700
30.368932
74
0.590529
false
gfrd/gfrd
test/FirstPassageGreensFunction1D_test.py
1
4825
#!/usr/bin/env python __author__ = 'Laurens Bossen' __copyright__ = '' import unittest import _gfrd as mod import numpy class FirstPassageGreensFunction1DTestCase( unittest.TestCase ): def setUp( self ): pass def tearDown( self ): pass def test_Instantiation( self ): D =...
gpl-2.0
-2,032,633,601,663,918,800
20.162281
75
0.482694
false
mrtns/libphonenumber-csharp
csharp/lib/copyres.py
14
1217
import os, re, shutil def copygeocoding(source, prefix, dest): entries = [] for root, dirs, files in os.walk(source): for f in files: if not re.search(r'^\d+\.txt$', f): continue country = f[:-4] s = os.path.join(root, f) lang = ...
apache-2.0
954,216,544,326,395,500
34.878788
70
0.476582
false
apagac/cfme_tests
sprout/appliances/models.py
2
65154
# -*- coding: utf-8 -*- import base64 import re import yaml import pickle # NOQA import wrapanapi from wrapanapi import VmState, Openshift from wrapanapi.exceptions import VMInstanceNotFound from cached_property import cached_property from celery import chain from contextlib import contextmanager from datetime impo...
gpl-2.0
2,860,931,409,050,904,000
37.967703
100
0.609141
false
ShivaShinde/gspread
gspread/client.py
1
21604
# -*- coding: utf-8 -*- """ gspread.client ~~~~~~~~~~~~~~ This module contains Client class responsible for communicating with Google Data API. """ import re <<<<<<< 46798d67c38d2cf8e1c751b684897cdc98598205 <<<<<<< a69cd84f789e21aa91b9c488abd3dc4ac39c8361 import json try: import xml.etree.cElementTree as Elemen...
mit
-6,377,260,525,045,894,000
30.174603
110
0.583364
false
ClimbsRocks/scikit-learn
examples/ensemble/plot_forest_importances_faces.py
403
1519
""" ================================================= Pixel importances with a parallel forest of trees ================================================= This example shows the use of forests of trees to evaluate the importance of the pixels in an image classification task (faces). The hotter the pixel, the more impor...
bsd-3-clause
6,676,720,760,813,918,000
30
77
0.664911
false
carljm/ansible-modules-extras
system/puppet.py
27
6730
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # This module 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 late...
gpl-3.0
-7,811,166,872,591,247,000
30.448598
114
0.603418
false
timle1/try_django_1_10
accounts/forms.py
1
2285
from django import forms from django.contrib.auth import ( authenticate, get_user_model, login, logout, ) User = get_user_model() class UserLoginForm(forms.Form): username = forms.CharField() password = forms.CharField(widget=forms.PasswordInput) def clean(self, *args, **kwargs): ...
mit
-221,259,243,183,548,930
33.104478
83
0.611816
false
Appono/oheurydices
vendor/distribute-0.6.36/setuptools/tests/test_sandbox.py
204
1724
"""develop tests """ import sys import os import shutil import unittest import tempfile from setuptools.sandbox import DirectorySandbox, SandboxViolation def has_win32com(): """ Run this to determine if the local machine has win32com, and if it does, include additional tests. """ if not sys.platfo...
mit
-6,560,244,156,683,427,000
25.121212
85
0.566705
false
johnchronis/exareme
exareme-tools/madis/src/lib/chardet/charsetprober.py
216
1914
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All ...
mit
-5,165,851,629,797,804,000
30.9
69
0.643678
false
ddervs/bad-boids
boids/tests/test_boids.py
1
2868
import os import yaml from mock import patch from numpy.testing import assert_array_almost_equal from matplotlib import animation import boids.boids.boids as boids from nose.tools import assert_raises config_filename = 'boids/config.yaml' config = yaml.load(open(config_filename)) def test_boids_fixtures(): regr...
mit
-878,038,788,587,189,600
34.85
95
0.693515
false
mozvip/CouchPotatoServer
libs/sqlalchemy/util/__init__.py
17
1742
# util/__init__.py # Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from compat import callable, cmp, reduce, defaultdict, py25_dict, \ threading, py...
gpl-3.0
5,750,118,927,331,202,000
50.235294
84
0.756028
false
aferr/LatticeMemCtl
tests/long/se/30.eon/test.py
21
1743
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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 ...
bsd-3-clause
5,542,740,960,022,946,000
51.818182
72
0.791165
false
Skeen/OctoPrint
src/octoprint/_version.py
29
10232
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (build by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
agpl-3.0
-3,688,153,528,691,005,000
35.805755
115
0.575352
false
Azulinho/ansible
lib/ansible/module_utils/database.py
108
5859
# 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 license # to the complete wo...
gpl-3.0
-737,346,316,209,430,800
43.386364
134
0.661205
false
postlund/home-assistant
script/scaffold/templates/device_trigger/integration/device_trigger.py
10
3251
"""Provides device automations for NEW_NAME.""" from typing import List import voluptuous as vol from homeassistant.components.automation import AutomationActionType, state from homeassistant.components.device_automation import TRIGGER_BASE_SCHEMA from homeassistant.const import ( CONF_DEVICE_ID, CONF_DOMAIN,...
apache-2.0
-8,100,626,246,827,356,000
30.259615
80
0.645647
false
loveheaven/ocropy
OLD/distance.py
15
2661
################################################################ ### Native code neural network with backpropagation training. ################################################################ from __future__ import with_statement __all__ = "MLP".split() from numpy import * from pylab import * from scipy import * fro...
apache-2.0
-1,624,625,440,010,160,600
27.010526
84
0.574972
false
agconti/njode
env/lib/python2.7/site-packages/setuptools/tests/test_develop.py
125
3607
"""develop tests """ import os import shutil import site import sys import tempfile import unittest from distutils.errors import DistutilsError from setuptools.command.develop import develop from setuptools.command import easy_install as easy_install_pkg from setuptools.compat import StringIO from setuptools.dist impo...
bsd-3-clause
5,088,071,974,720,702,000
28.08871
129
0.545329
false
quoclieu/codebrew17-starving
env/lib/python3.5/site-packages/pip/_vendor/requests/packages/urllib3/request.py
714
5988
from __future__ import absolute_import try: from urllib.parse import urlencode except ImportError: from urllib import urlencode from .filepost import encode_multipart_formdata __all__ = ['RequestMethods'] class RequestMethods(object): """ Convenience mixin for classes who implement a :meth:`urlopen...
mit
-2,614,286,235,755,984,400
38.655629
99
0.605711
false
MQQiang/kbengine
kbe/src/lib/python/Lib/email/__init__.py
98
1789
# Copyright (C) 2001-2007 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """A package for parsing, handling, and generating email messages.""" __version__ = '5.1.0' __all__ = [ 'base64mime', 'charset', 'encoders', 'errors', 'feedparser', 'generator', 'he...
lgpl-3.0
1,214,651,590,929,845,000
26.523077
77
0.669089
false
SUSE/azure-sdk-for-python
azure-mgmt-keyvault/azure/mgmt/keyvault/key_vault_management_client.py
4
3598
# 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. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
4,325,015,009,582,918,000
40.356322
106
0.690384
false
jtrag/namebench
libnamebench/cli.py
173
4760
#!/usr/bin/env python # Copyright 2009 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...
apache-2.0
-5,725,650,622,492,174,000
34.522388
98
0.640756
false
chenyyx/scikit-learn-doc-zh
examples/en/cross_decomposition/plot_compare_cross_decomposition.py
55
4953
""" =================================== Compare cross decomposition methods =================================== Simple usage of various cross decomposition algorithms: - PLSCanonical - PLSRegression, with multivariate response, a.k.a. PLS2 - PLSRegression, with univariate response, a.k.a. PLS1 - CCA Given 2 multivari...
gpl-3.0
7,051,958,866,071,015,000
30.954839
79
0.579043
false
mapfau/xbmc
addons/metadata.demo.tv/demo.py
5
10505
#!/usr/bin/env python # -*- coding: UTF-8 -*- import xbmcplugin,xbmcgui,xbmc,xbmcaddon import os,sys,urllib def get_params(): param=[] paramstring=sys.argv[2] if len(paramstring)>=2: params=sys.argv[2] cleanedparams=params.replace('?','') if (par...
gpl-2.0
-4,037,075,887,573,031,400
50.990099
115
0.628928
false
pleaseproject/python-for-android
python3-alpha/python3-src/Lib/lib2to3/btm_utils.py
374
10011
"Utility functions used by the btm_matcher module" from . import pytree from .pgen2 import grammar, token from .pygram import pattern_symbols, python_symbols syms = pattern_symbols pysyms = python_symbols tokens = grammar.opmap token_labels = token TYPE_ANY = -1 TYPE_ALTERNATIVES = -2 TYPE_GROUP = -3 class MinNode(...
apache-2.0
-6,749,505,841,695,469,000
34.374558
83
0.551194
false
squall1988/lquant
backtest/finance/risk/cumulative.py
1
17396
# # Copyright 2014 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...
bsd-2-clause
-439,556,583,847,101,000
35.700422
79
0.609393
false
ajyoon/brown
tests/test_core/test_font.py
1
2603
import unittest from brown.core import brown from brown.core.font import Font class TestFont(unittest.TestCase): def setUp(self): brown.setup() def test_init(self): test_font = Font('Bravura', 12, 2, False) assert(test_font.family_name == 'Bravura') assert(test_font.size == ...
gpl-3.0
-9,084,556,615,831,381,000
39.046154
73
0.529005
false
SunPowered/pypi_py3
setup.py
1
1085
""" A simple setuptools file """ from setuptools import setup setup( name="PyPi_py3", version='0.1 dev', description='Ensure proper python3 adherence among pypi package maintainers', long_description="""Inspired by Guido's talk at PyCon2015, many packages on the pypi repository are still ...
mit
-8,999,620,628,796,216,000
37.75
109
0.628571
false
aavrug/askbot-devel
askbot/migrations/0015_rename_forum_contenttypes_to_askbot.py
20
26626
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): "Write your forwards methods here." content_types = orm['contenttypes.ContentType'].objects.filter(app_label='forum...
gpl-3.0
-2,084,543,248,844,373,800
85.168285
209
0.556073
false
Plain-Andy-legacy/android_external_chromium_org
tools/site_compare/commands/compare2.py
189
6517
# Copyright (c) 2011 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. """SiteCompare command to invoke the same page in two versions of a browser. Does the easiest compatibility test: equality comparison between two differ...
bsd-3-clause
-4,854,326,497,376,379,000
37.335294
80
0.6325
false
SmokinCaterpillar/pypet
pypet/tests/integration/pipeline_test.py
2
10281
__author__ = 'Robert Meyer' import os import logging import platform from pypet.tests.testutils.ioutils import unittest from pypet.trajectory import Trajectory from pypet.environment import Environment from pypet.parameter import Parameter from pypet.tests.testutils.ioutils import run_suite, make_temp_dir, \ get...
bsd-3-clause
-3,902,704,749,492,992,000
28.631124
102
0.553059
false
hcs/mailman
src/mailman/interfaces/roster.py
3
2015
# Copyright (C) 2007-2012 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
gpl-3.0
-1,353,650,857,617,409,000
29.074627
78
0.675434
false
molobrakos/home-assistant
homeassistant/components/ads/__init__.py
5
9643
"""Support for Automation Device Specification (ADS).""" import threading import struct import logging import ctypes from collections import namedtuple import asyncio import async_timeout import voluptuous as vol from homeassistant.const import ( CONF_DEVICE, CONF_IP_ADDRESS, CONF_PORT, EVENT_HOMEASSISTANT_STOP) ...
apache-2.0
587,972,490,438,348,700
31.79932
79
0.603547
false
rsignell-usgs/notebook
system-test/Theme_2_Extreme_Events/Scenario_2A/ModelDataCompare_Waves/Model_Obs_Compare_Waves.py
3
12427
# -*- coding: utf-8 -*- # <nbformat>3.0</nbformat> # <markdowncell> # ># IOOS System Test: [Extreme Events Theme:](https://github.com/ioos/system-test/wiki/Development-of-Test-Themes#theme-2-extreme-events) Coastal Inundation # <markdowncell> # ### Can we compare observed and modeled wave parameters? # This notebo...
mit
-8,173,206,812,633,169,000
34.005634
215
0.620021
false
codeparticle/Tenable.io-SDK-for-Python
examples/scans.py
1
3840
import os from datetime import datetime from time import time from tenable_io.api.models import Scan from tenable_io.api.scans import ScanExportRequest from tenable_io.client import TenableIOClient from tenable_io.exceptions import TenableIOApiException def example(test_name, test_file): # Generate unique name...
mit
-4,311,403,439,590,557,700
25.666667
96
0.641406
false
ilo10/scikit-learn
sklearn/feature_extraction/tests/test_image.py
205
10378
# Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org> # Gael Varoquaux <gael.varoquaux@normalesup.org> # License: BSD 3 clause import numpy as np import scipy as sp from scipy import ndimage from nose.tools import assert_equal, assert_true from numpy.testing import assert_raises from sklearn...
bsd-3-clause
2,881,793,852,591,251,000
34.786207
79
0.596165
false
nimasmi/wagtail
wagtail/admin/action_menu.py
1
7466
"""Handles rendering of the list of actions in the footer of the page create/edit views.""" from django.conf import settings from django.forms import Media, MediaDefiningClass from django.template.loader import render_to_string from django.urls import reverse from django.utils.functional import cached_property from dj...
bsd-3-clause
-4,665,969,247,646,113,000
33.88785
114
0.633137
false
yatsek/autokey
src/lib/qtui/enginesettings.py
50
2667
#!/usr/bin/env python # coding=UTF-8 # # Generated by pykdeuic4 from enginesettings.ui on Sun Mar 4 11:39:39 2012 # # WARNING! All changes to this file will be lost. from PyKDE4 import kdecore from PyKDE4 import kdeui from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: ...
gpl-3.0
-6,269,237,609,565,102,000
45.789474
136
0.72141
false
bwrsandman/OpenUpgrade
addons/base_report_designer/plugin/openerp_report_designer/bin/script/__init__.py
384
1414
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
6,152,603,619,983,358,000
34.35
81
0.695191
false
jeremiahyan/odoo
addons/hr_presence/models/hr_employee.py
4
8595
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from ast import literal_eval from odoo import fields, models, _, api from odoo.exceptions import UserError from odoo.fields import Datetime _logger = logging.getLogger(__name__) class Employee(models.A...
gpl-3.0
-8,186,867,757,653,941,000
43.304124
177
0.572542
false
vincepandolfo/django
tests/auth_tests/test_mixins.py
9
8497
from django.contrib.auth import models from django.contrib.auth.mixins import ( LoginRequiredMixin, PermissionRequiredMixin, UserPassesTestMixin, ) from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied from django.http import HttpResponse from django.test import Re...
bsd-3-clause
7,734,807,388,867,897,000
32.062257
103
0.655408
false
kumar-physics/eppic-pipeline
src/EPPICpipeline/CheckDatabase.py
1
5808
''' Created on Jan 22, 2015 @author: baskaran_k ''' from commands import getstatusoutput import MySQLdb import sys from string import atof class CheckDatabase: def __init__(self,database,outfolder): self.outFolder=outfolder self.mysqluser='eppicweb' self.mysqlhost='eppic01.psi.c...
gpl-2.0
5,864,444,014,894,652,000
50.866071
225
0.620523
false
devs4v/devs4v-information-retrieval15
project/venv/lib/python2.7/site-packages/django/contrib/sessions/backends/signed_cookies.py
88
2797
from django.conf import settings from django.contrib.sessions.backends.base import SessionBase from django.core import signing class SessionStore(SessionBase): def load(self): """ We load the data from the key itself instead of fetching from some external data store. Opposite of _get_sess...
mit
-5,529,468,041,866,250,000
33.9625
78
0.612084
false
yugangzhang/chxanalys
versioneer.py
367
62474
# Version: 0.15 """ The Versioneer ============== * like a rocketeer, but for versions! * https://github.com/warner/python-versioneer * Brian Warner * License: Public Domain * Compatible With: python2.6, 2.7, 3.2, 3.3, 3.4, and pypy * [![Latest Version] (https://pypip.in/version/versioneer/badge.svg?style=flat) ](ht...
bsd-3-clause
8,502,981,294,104,416,000
35.771042
79
0.622611
false
jgraham/servo
tests/wpt/web-platform-tests/tools/html5lib/utils/spider.py
436
4157
#!/usr/bin/env python """Spider to try and find bugs in the parser. Requires httplib2 and elementtree usage: import spider s = spider.Spider() s.spider("http://www.google.com", maxURLs=100) """ import urllib.request, urllib.error, urllib.parse import urllib.robotparser import md5 import httplib2 import html5lib fro...
mpl-2.0
-7,673,185,183,562,274,000
33.07377
79
0.573731
false
eepalms/gem5-newcache
src/arch/x86/isa/insts/x87/stack_management/__init__.py
91
2317
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
-7,661,851,755,039,031,000
49.369565
72
0.782909
false
ShiYw/Sigil
3rdparty/python/Lib/lib2to3/pgen2/conv.py
134
9642
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Convert graminit.[ch] spit out by pgen to Python code. Pgen is the Python parser generator. It is useful to quickly create a parser from a grammar file in Python's grammar notation. But I don't wa...
gpl-3.0
-1,254,301,039,452,545,500
36.51751
78
0.523128
false
piantado/LOTlib
LOTlib/Projects/Quantifier/Run/Search_SimpleMCMC.py
4
2024
# -*- coding: utf-8 -*- """ All out rational-rules style gibbs on lexicons. For MPI or local. This is much slower than the vectorized versions. MPI run: $ mpiexec --hostfile ../../hosts.mpich2 -n 15 python Search_MCMC.py """ from LOTlib.MPI.MPI_map import MPI_map from LOTlib import mh_sample from LOTlib.FiniteBestSe...
gpl-3.0
3,591,056,608,734,715,400
28.764706
101
0.652174
false
macs03/demo-cms
cms/lib/python2.7/site-packages/django/utils/unittest/result.py
570
6105
"""Test result object""" import sys import traceback import unittest from StringIO import StringIO from django.utils.unittest import util from django.utils.unittest.compatibility import wraps __unittest = True def failfast(method): @wraps(method) def inner(self, *args, **kw): if getattr(self, 'fail...
mit
354,638,548,941,076,350
32.360656
79
0.584439
false
ageron/tensorflow
tensorflow/python/keras/preprocessing/image.py
13
21213
# Copyright 2015 The TensorFlow 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 required by applica...
apache-2.0
8,424,306,850,181,933,000
38.724719
80
0.640173
false
baloo/shinken
test/test_business_correlator.py
1
49745
#!/usr/bin/env python2.6 # Copyright (C) 2009-2010 : # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # t...
agpl-3.0
503,043,338,405,936,900
39.344688
125
0.578189
false
pixelrebel/st2
st2common/tests/unit/test_resource_registrar.py
3
2270
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
apache-2.0
5,052,710,003,597,958,000
36.833333
87
0.72511
false
coingraham/lena
lambda/requests/cookies.py
177
17387
# -*- coding: utf-8 -*- """ Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports. """ import copy import time import calendar import collections from .compat import cookielib, urlparse, urlunparse, Morsel try: import threading ...
mit
-7,002,916,717,599,987,000
34.702259
111
0.628688
false
umglurf/juleol
migrations/versions/8eb7162afee7_.py
1
1418
# SPDX-FileCopyrightText: 2020 Håvard Moen <post@haavard.name> # # SPDX-License-Identifier: GPL-3.0-or-later """add oauth Revision ID: 8eb7162afee7 Revises: f0ba66f2e9b2 Create Date: 2020-11-01 16:10:08.345978 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '8...
gpl-3.0
8,033,514,362,129,257,000
31.204545
95
0.676782
false
google/grr
grr/client/grr_response_client/windows/installers.py
1
17420
#!/usr/bin/env python """These are windows specific installers. NOTE: Subprocess module is broken on windows in that pipes are not handled correctly. See for example: http://bugs.python.org/issue3905 This problem seems to go away when we use pipes for all standard handles: https://launchpadlibrarian.net/134750748/py...
apache-2.0
8,571,547,781,535,366,000
33.023438
80
0.679851
false
lduarte1991/edx-platform
lms/djangoapps/django_comment_client/base/tests.py
1
93420
# -*- coding: utf-8 -*- """Tests for django comment client views.""" import json import logging import mock from contextlib import contextmanager import ddt import pytest from django.contrib.auth.models import User from django.core.management import call_command from django.core.urlresolvers import reverse from django...
agpl-3.0
-9,174,631,517,351,777,000
38.702082
148
0.599171
false
Catstyle/mongoengine
tests/migration/convert_to_new_inheritance_model.py
30
1533
# -*- coding: utf-8 -*- import unittest from mongoengine import Document, connect from mongoengine.connection import get_db from mongoengine.fields import StringField __all__ = ('ConvertToNewInheritanceModel', ) class ConvertToNewInheritanceModel(unittest.TestCase): def setUp(self): connect(db='mongoen...
mit
-5,438,383,357,133,952,000
29.058824
70
0.581213
false
nyalldawson/QGIS
tests/src/python/test_authmanager_password_ows.py
15
10673
# -*- coding: utf-8 -*- """ Tests for auth manager WMS/WFS using QGIS Server through HTTP Basic enabled qgis_wrapped_server.py. This is an integration test for QGIS Desktop Auth Manager WFS and WMS provider and QGIS Server WFS/WMS that check if QGIS can use a stored auth manager auth configuration to access an HTTP Ba...
gpl-2.0
-123,809,565,966,111,490
36.003472
202
0.599324
false