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
pong3489/TEST_Mission
Lib/encodings/iso8859_4.py
93
13939
""" Python Character Mapping Codec iso8859_4 generated from 'MAPPINGS/ISO8859/8859-4.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,i...
gpl-3.0
-1,926,469,734,747,979,800
43.403909
107
0.524356
false
HopeFOAM/HopeFOAM
ThirdParty-0.1/ParaView-5.0.1/VTK/ThirdParty/Twisted/twisted/python/logfile.py
60
9711
# -*- test-case-name: twisted.test.test_logfile -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ A rotating, browsable log file. """ # System Imports import os, glob, time, stat from twisted.python import threadable class BaseLogFile: """ The base class for a log file that ...
gpl-3.0
2,447,210,389,858,534,000
29.065015
86
0.563382
false
lz1988/company-site
django/utils/http.py
27
8316
from __future__ import unicode_literals import calendar import datetime import re import sys try: from urllib import parse as urllib_parse except ImportError: # Python 2 import urllib as urllib_parse import urlparse urllib_parse.urlparse = urlparse.urlparse from email.utils import formatdate fro...
bsd-3-clause
-1,721,609,556,198,346,200
33.506224
84
0.637686
false
ericholscher/django
tests/model_forms/models.py
1
9652
""" XX. Generating HTML forms from models This is mostly just a reworking of the ``form_for_model``/``form_for_instance`` tests to use ``ModelForm``. As such, the text may not make sense in all cases, and the examples are probably a poor fit for the ``ModelForm`` syntax. In other words, most of these tests should be r...
bsd-3-clause
-4,134,840,767,337,318,400
30.854785
96
0.67385
false
mrahnis/orangery
orangery/cli/segment.py
1
2695
import sys import logging import time import json import click import pandas as pnd import matplotlib.pyplot as plt import orangery as o @click.command(options_metavar='<options>') @click.argument('areas_f', nargs=1, type=click.Path(exists=True), metavar='<areas_file>') @click.argument('materials_f', nargs=1, type=...
bsd-3-clause
-1,837,586,453,388,624,600
33.126582
157
0.590353
false
golismero/golismero
golismero/api/data/vulnerability/ssl/obsolete_protocol.py
8
2487
#!/usr/bin/env python # -*- coding: utf-8 -*- __license__= """ GoLismero 2.0 - The web knife - Copyright (C) 2011-2014 Golismero project site: https://github.com/golismero Golismero project mail: contact@golismero-project.com This program is free software; you can redistribute it and/or modify it under the terms of ...
gpl-2.0
5,010,218,122,050,914,000
31.723684
79
0.611178
false
sdague/home-assistant
tests/components/hvv_departures/test_config_flow.py
6
12742
"""Test the HVV Departures config flow.""" import json from pygti.exceptions import CannotConnect, InvalidAuth from homeassistant import data_entry_flow from homeassistant.components.hvv_departures.const import ( CONF_FILTER, CONF_REAL_TIME, CONF_STATION, DOMAIN, ) from homeassistant.config_entries im...
apache-2.0
-3,255,663,347,861,108,700
32.526316
124
0.596389
false
agnisparsha/aws-addsg-ec2
add_sg.py
1
1656
#!/usr/bin/python __author__ = 'agnisparsha' import requests from boto.ec2.connection import EC2Connection AWS_ACCESS_KEY_ID = '<access_key_id>' AWS_SECRET_ACCESS_KEY = '<access_secret_key>' AWS_REGION = '<eg,. us-east-1c>' def get_my_ip(): request = requests.get(r'http://jsonip.com') ip = request.json()['ip'] ...
mit
-138,288,841,464,133,150
23.352941
90
0.682971
false
blueboxgroup/neutron
neutron/tests/unit/ibm/test_sdnve_api.py
33
5707
# Copyright 2014 IBM Corp. # # 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 a...
apache-2.0
-6,709,889,531,486,600,000
38.909091
78
0.559488
false
Evervolv/android_external_chromium_org
tools/android/remove_strings.py
183
1426
#!/usr/bin/python # Copyright (c) 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. """Remove strings by name from a GRD file.""" import optparse import re import sys def RemoveStrings(grd_path, string_names): """R...
bsd-3-clause
9,060,857,803,600,395,000
28.102041
79
0.673212
false
kemalakyol48/python-for-android
python-modules/twisted/twisted/conch/test/test_default.py
60
6384
# Copyright (c) 2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.conch.client.default}. """ try: import Crypto.Cipher.DES3 import pyasn1 except ImportError: skip = "PyCrypto and PyASN1 required for twisted.conch.client.default." else: from twisted.conch.client.agent ...
apache-2.0
3,716,873,132,488,718,000
36.333333
79
0.650063
false
factorlibre/carrier-delivery
delivery_carrier_label_fedex/models/stock.py
1
11695
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2015 FactorLibre (http://www.factorlibre.com) # Hugo Santos <hugo.santos@factorlibre.com> # # This program is free software: you can redistribute it and/o...
agpl-3.0
-4,743,501,024,438,393,000
43.808429
79
0.640103
false
AICP/external_chromium_org
build/android/gyp/jar_toc.py
10
3101
#!/usr/bin/env python # # 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. """Creates a TOC file from a Java jar. The TOC file contains the non-package API of the jar. This includes all public/protected/pack...
bsd-3-clause
2,467,514,070,078,850,000
27.712963
80
0.685263
false
gtko/CouchPotatoServer
libs/pytwitter/__init__.py
104
175429
#!/usr/bin/env python # # vim: sw=2 ts=2 sts=2 # # Copyright 2007 The Python-Twitter Developers # # 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/LICE...
gpl-3.0
2,712,189,441,693,537,300
36.734782
163
0.541022
false
TOC-Shard/moul-scripts
Python/tldnEmgrPhase0.py
6
5064
# -*- coding: utf-8 -*- """ *==LICENSE==* CyanWorlds.com Engine - MMOG client, server and tools Copyright (C) 2011 Cyan Worlds, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3...
gpl-3.0
-7,320,302,021,394,180,000
35.171429
157
0.665877
false
johanvdw/rasterio
rasterio/rio/bands.py
1
4139
import logging import click from cligj import files_inout_arg, format_opt from .helpers import resolve_inout from . import options import rasterio from rasterio.five import zip_longest PHOTOMETRIC_CHOICES = [val.lower() for val in [ 'MINISBLACK', 'MINISWHITE', 'RGB', 'CMYK', 'YCBCR', 'CIELAB...
bsd-3-clause
4,040,134,509,051,732,000
32.92623
79
0.540952
false
simongoffin/my_odoo_tutorial
addons/l10n_ae/__openerp__.py
337
1579
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Tech Receptives (<http://techreceptives.com>). # # This program is free software: you can redistribute it and/or modify # it under the te...
agpl-3.0
-8,679,783,363,250,130,000
36.595238
78
0.573148
false
legalsylvain/OpenUpgrade
addons/account/wizard/account_fiscalyear_close.py
38
15050
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
7,835,884,698,357,114,000
53.905109
373
0.566139
false
The-Compiler/pytest
src/_pytest/warnings.py
12
4496
import sys import warnings from contextlib import contextmanager from typing import Generator from typing import Optional import pytest from _pytest.compat import TYPE_CHECKING from _pytest.config import apply_warning_filters from _pytest.config import Config from _pytest.config import parse_warning_filter from _pytes...
mit
2,670,697,595,352,020,500
31.345324
114
0.657028
false
unho/pootle
tests/models/directory.py
5
1789
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import pytest from django.core.exceptions i...
gpl-3.0
1,539,451,940,191,639,300
31.527273
79
0.713248
false
2014cdbg7/2014cdbg7
wsgi/static/Brython2.1.0-20140419-113919/Lib/io.py
58
9385
import builtins open = builtins.open # for seek() SEEK_SET = 0 SEEK_CUR = 1 SEEK_END = 2 r"""File-like objects that read from or write to a string buffer. This implements (nearly) all stdio methods. f = StringIO() # ready for writing f = StringIO(buf) # ready for reading f.close() # explicitly rel...
gpl-2.0
-6,194,098,002,369,862,000
31.140411
77
0.59105
false
saurabh6790/test-med-lib
webnotes/model/workflow.py
34
1073
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes def get_workflow_name(doctype): if getattr(webnotes.local, "workflow_names", None) is None: webnotes.local.workflow_names = {} if doctype not in webnotes...
mit
786,726,600,534,690,700
33.612903
84
0.726002
false
jpshort/odoo
openerp/addons/base/res/res_company.py
138
21310
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-7,301,280,854,799,674,000
50.598063
168
0.587236
false
Brickstertwo/git-commands
tests/functional/test_upstream.py
1
8926
import os import shutil import subprocess import tempfile import unittest import git import testutils class TestGitUpstream(unittest.TestCase): def _output(self, command): proc = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) return proc.communicate()[0].strip() ...
mit
8,326,335,555,505,767,000
33.068702
164
0.647771
false
TeachAtTUM/edx-platform
cms/djangoapps/contentstore/tests/test_contentstore.py
2
96426
# -*- coding: utf-8 -*- from __future__ import print_function import copy import shutil from datetime import timedelta from functools import wraps from json import loads from textwrap import dedent from unittest import SkipTest from uuid import uuid4 import ddt import django import lxml.html import mock from django....
agpl-3.0
7,523,542,223,036,729,000
42.275258
134
0.644863
false
Aasmi/scikit-learn
sklearn/decomposition/tests/test_nmf.py
32
6044
import numpy as np from scipy import linalg from sklearn.decomposition import nmf from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_false from sklearn.utils.testing import raises from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_gr...
bsd-3-clause
5,804,013,189,095,693,000
35.409639
79
0.62955
false
kishorvpatil/incubator-storm
storm-client/src/py/storm/Nimbus.py
2
370569
#!/usr/bin/env python # # 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
-7,315,500,533,450,908,000
33.125518
134
0.567749
false
matthewbauer/wesnoth
data/tools/unit_tree/overview.py
20
6049
#!/usr/bin/env python import glob, os, sys, time, re sys.path.append(os.path.join(os.path.dirname(__file__), "..")) import html_output def write_addon_overview(folder, addon): out = open(os.path.join(folder, "index.html"), "wb") def w(x): out.write(x.encode("utf8") + "\n") name = addon["name"] pa...
gpl-2.0
5,604,941,584,887,487,000
32.236264
105
0.458092
false
pombredanne/pants
contrib/android/src/python/pants/contrib/android/tasks/aapt_gen.py
4
8374
# coding=utf-8 # Copyright 2014 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 logging impor...
apache-2.0
5,322,369,636,066,025,000
47.404624
108
0.687366
false
RongxinZhang/bitcoinxt
qa/rpc-tests/bipdersig-p2p.py
20
6588
#!/usr/bin/env python2 # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from test_framework.mininode import CTransaction, N...
mit
3,599,412,557,434,702,000
35
100
0.605798
false
corvorepack/REPOIVAN
plugin.video.movie.ultra.7k/resources/regex/shidurlive.py
2
3960
# -*- coding: utf-8 -*- #------------------------------------------------------------ # Movie Ultra 7K Regex de Shidurlive # Version 0.1 (15.10.2014) #------------------------------------------------------------ # License: GPL (http://www.gnu.org/licenses/gpl-3.0.html) # Gracias a la librería plugintools de Jesús (www....
gpl-2.0
-3,782,073,819,712,368,600
33.973451
182
0.617409
false
scrollback/kuma
vendor/packages/logilab-common/test/unittest_changelog.py
6
1354
# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
mpl-2.0
2,650,791,716,896,528,400
35.594595
81
0.725997
false
bigswitch/nova
nova/conductor/tasks/migrate.py
1
3844
# 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,816,893,892,951,627,000
44.761905
78
0.637357
false
idovear/odoo
addons/base_iban/base_iban.py
278
8657
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
4,577,975,340,141,693,400
45.794595
181
0.601594
false
eruffaldi/python-docx
docx/oxml/shared.py
17
1623
# encoding: utf-8 """ Objects shared by modules in the docx.oxml subpackage. """ from __future__ import absolute_import from . import OxmlElement from .ns import qn from .simpletypes import ST_DecimalNumber, ST_OnOff, ST_String from .xmlchemy import BaseOxmlElement, OptionalAttribute, RequiredAttribute class CT_De...
mit
-1,570,735,959,552,730,600
28.509091
77
0.632779
false
DavidTingley/ephys-processing-pipeline
installation/klustaviewa-0.3.0/build/lib.linux-x86_64-2.7/kwiklib/dataio/tests/test_kwik.py
2
14009
"""HDF5 tools tests.""" # ----------------------------------------------------------------------------- # Imports # ----------------------------------------------------------------------------- import os import tempfile import numpy as np import tables as tb from nose import with_setup from kwiklib.utils...
gpl-3.0
8,093,015,974,532,962,000
31.354762
116
0.536798
false
sloanyang/gyp
test/mac/gyptest-app-error.py
164
1172
#!/usr/bin/env python # Copyright (c) 2012 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. """ Verifies that invalid strings files cause the build to fail. """ import TestCmd import TestGyp import sys if sys.platform == 'darwin'...
bsd-3-clause
-1,846,638,840,824,877,800
26.255814
76
0.65785
false
mchristopher/PokemonGo-DesktopMap
app/pylibs/osx64/gevent/monkey.py
5
24241
# Copyright (c) 2009-2012 Denis Bilenko. See LICENSE for details. # pylint: disable=redefined-outer-name """ Make the standard library cooperative. Patching ======== The primary purpose of this module is to carefully patch, in place, portions of the standard library with gevent-friendly functions that behave in the s...
mit
4,239,276,389,492,132,000
35.397898
117
0.63537
false
kwlzn/pex
pex/link.py
1
4085
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import import os import posixpath from collections import Iterable from .compatibility import PY3, WINDOWS, pathname2url from .compatibility import string...
apache-2.0
1,386,036,406,222,206,000
27.971631
96
0.659976
false
ChromiumWebApps/chromium
build/android/buildbot/bb_run_bot.py
1
10537
#!/usr/bin/env python # # Copyright (c) 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 collections import copy import json import os import pipes import re import subprocess import sys import bb_utils sys.pa...
bsd-3-clause
3,200,375,591,079,351,300
34.718644
80
0.641169
false
hyperized/ansible
lib/ansible/modules/network/f5/bigip_asm_dos_application.py
2
44296
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2019, 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
-2,159,185,728,689,146,600
32.865443
120
0.602447
false
eonpatapon/nova
nova/api/openstack/compute/plugins/v3/server_password.py
36
2525
# Copyright (c) 2012 Nebula, 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
-501,469,546,979,830,660
32.223684
78
0.680792
false
apark263/tensorflow
tensorflow/python/framework/tensor_shape_div_test.py
178
1495
# 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
-2,638,000,691,657,452,000
36.375
80
0.687625
false
SamYaple/neutron
neutron/plugins/ml2/drivers/brocade/db/models.py
63
4420
# Copyright 2014 Brocade Communications System, 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 # #...
apache-2.0
6,874,085,192,655,695,000
31.740741
79
0.625566
false
martonw/phantomjs
src/qt/qtwebkit/Source/ThirdParty/gtest/test/run_tests_util_test.py
233
23693
#!/usr/bin/env python # # Copyright 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 of...
bsd-3-clause
4,215,193,976,964,262,000
34.048817
80
0.618368
false
lancezlin/ml_template_py
lib/python2.7/site-packages/pygments/styles/vs.py
50
1073
# -*- coding: utf-8 -*- """ pygments.styles.vs ~~~~~~~~~~~~~~~~~~ Simple style with MS Visual Studio colors. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Name, Co...
mit
-1,148,068,761,308,688,500
27.236842
70
0.484623
false
gacarrillor/QGIS
python/plugins/db_manager/db_plugins/postgis/plugins/qgis_topoview/__init__.py
30
12901
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : TopoViewer plugin for DB Manager Description : Create a project to display topology schema on Qgis Date : Sep 23, 2011 copyright : (C) 2011 by Giuseppe Suc...
gpl-2.0
-5,199,456,056,618,554,000
40.616129
243
0.618092
false
gregbanks/suds
suds/bindings/document.py
204
5792
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser 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 will ...
lgpl-3.0
-8,903,534,803,013,495,000
35.20625
90
0.581664
false
whatsthehubbub/playpilots
ebi/stereoscoop/views.py
1
4573
from django.http import HttpResponse, HttpResponseRedirect, Http404, HttpResponseBadRequest from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext, Template from django.template.loader import get_template, render_to_string from stereoscoop.models import Stereosc...
mit
6,302,764,947,295,122,000
35.592
138
0.577739
false
bemineni/eldam
docs/conf.py
1
4905
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # eldam documentation build configuration file, created by # sphinx-quickstart on Wed Mar 22 23:22:44 2017. # # 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 # auto...
mit
2,512,671,904,221,549,000
28.727273
79
0.675025
false
teamfx/openjfx-8u-dev-rt
modules/web/src/main/native/Source/JavaScriptCore/inspector/scripts/codegen/generate_objc_frontend_dispatcher_implementation.py
1
7937
#!/usr/bin/env python # # Copyright (c) 2014-2016 Apple Inc. All rights reserved. # Copyright (c) 2014 University of Washington. 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. Redistribution...
gpl-2.0
-1,516,431,566,280,220,700
50.538961
173
0.665491
false
tomkralidis/QGIS
tests/src/python/test_qgsalignmentcombobox.py
18
2010
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsAlignmentComboBox From build dir, run: ctest -R PyQgsAlignmentComboBox -V .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2...
gpl-2.0
-849,772,492,226,678,700
33.067797
78
0.697015
false
pombredanne/mitmproxy
examples/tls_passthrough.py
15
4470
""" This inline script allows conditional TLS Interception based on a user-defined strategy. Example: > mitmdump -s tls_passthrough.py 1. curl --proxy http://localhost:8080 https://example.com --insecure // works - we'll also see the contents in mitmproxy 2. curl --proxy http://localhost:8080 https:...
mit
2,980,115,923,857,024,500
31.867647
97
0.677405
false
switchboardOp/ansible
lib/ansible/modules/cloud/linode/linode.py
7
26096
#!/usr/bin/python # 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 distributed...
gpl-3.0
7,612,114,155,938,202,000
36.494253
137
0.583806
false
Sodki/ansible-modules-extras
network/citrix/netscaler.py
143
5056
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to manage Citrix NetScaler entities (c) 2013, Nandor Sivok <nandor@gawker.com> 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 Softwa...
gpl-3.0
7,657,546,457,801,270,000
25.751323
129
0.628362
false
druuu/django
tests/template_tests/filter_tests/test_length_is.py
360
3204
from django.template.defaultfilters import length_is from django.test import SimpleTestCase from ..utils import setup class LengthIsTests(SimpleTestCase): @setup({'length_is01': '{% if some_list|length_is:"4" %}Four{% endif %}'}) def test_length_is01(self): output = self.engine.render_to_string('len...
bsd-3-clause
4,713,808,068,836,561,000
41.72
102
0.610175
false
runekaagaard/django-contrib-locking
django/contrib/auth/management/commands/changepassword.py
222
2100
from __future__ import unicode_literals import getpass from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS from django.utils.encoding import force_str class Command(BaseCommand): help = "Change a user's password ...
bsd-3-clause
654,342,691,050,569,600
32.870968
103
0.599524
false
arbrandes/edx-platform
lms/djangoapps/teams/serializers.py
4
8054
""" Defines serializers used by the Team API. """ from copy import deepcopy from django.conf import settings from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django_countries import countries from rest_framework import serializers from lms.djangoapps.teams.api imp...
agpl-3.0
-8,254,726,431,788,455,000
34.480176
109
0.652967
false
nkantar/Starminder
starminder/main/views.py
1
1457
from datetime import time from django.contrib.auth.decorators import login_required from django.urls import reverse_lazy from django.utils.decorators import method_decorator from django.views.generic import FormView, TemplateView from starminder.main.forms import ProfileForm class HomeView(TemplateView): templa...
bsd-3-clause
-4,001,593,533,563,013,000
28.14
65
0.608099
false
larsbs/nftablui
nftserver/app/validators/chain_validator.py
1
1311
from utils.nft_errors import NFTValidationError, abort from wrappers import table_wrapper, chain_wrapper def validate_new_chain(chain_json): chain = chain_json['chain'] validation_error = NFTValidationError('chain') # JSON errors if not chain: raise abort(400, 'No "chain" field in chain json')...
mit
4,938,551,485,939,931,000
36.457143
86
0.655988
false
TNT-Samuel/Coding-Projects
DNS Server/Source - Copy/Lib/site-packages/urllib3/contrib/ntlmpool.py
312
4478
""" NTLM authenticating pool, contributed by erikcederstran Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10 """ from __future__ import absolute_import from logging import getLogger from ntlm import ntlm from .. import HTTPSConnectionPool from ..packages.six.moves.http_client import HTTPSConnecti...
gpl-3.0
-1,187,309,112,912,639,500
38.982143
77
0.553149
false
open-synergy/website
website_event_register_free_with_sale/__openerp__.py
5
1591
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2015 Serv. Tecnol. Avanzados (http://www.serviciosbaeza.com) # Pedro M. Baeza <pedro.baeza@serviciosbaeza.com> # # This program is free software: you can redistribute it a...
agpl-3.0
-2,378,104,322,918,158,300
38.75
79
0.57673
false
linjoahow/lego_Automatic-assembly
static/Brython3.1.1-20150328-091302/Lib/browser/indexed_db.py
632
3008
class EventListener: def __init__(self, events=[]): self._events=events def append(self, event): self._events.append(event) def fire(self, e): for _event in self._events: _event(e) class IndexedDB: def __init__(self): if not __BRYTHON__.has_indexedDB: raise NotImple...
gpl-3.0
-428,803,171,436,740,400
27.377358
76
0.640625
false
shubhdev/edx-platform
cms/djangoapps/contentstore/views/tests/test_certificates.py
17
19874
#-*- coding: utf-8 -*- """ Group Configuration Tests. """ import json import mock from django.conf import settings from django.test.utils import override_settings from opaque_keys.edx.keys import AssetKey from opaque_keys.edx.locations import AssetLocation from contentstore.utils import reverse_course_url from cont...
agpl-3.0
-2,562,185,147,758,235,000
35.466055
115
0.604559
false
eerwitt/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/bijector_test_util.py
27
7584
# 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
-5,162,822,139,558,022,000
33.472727
80
0.665612
false
turbokongen/home-assistant
homeassistant/components/motion_blinds/sensor.py
2
6631
"""Support for Motion Blinds sensors.""" from motionblinds import BlindType from homeassistant.const import ( DEVICE_CLASS_BATTERY, DEVICE_CLASS_SIGNAL_STRENGTH, PERCENTAGE, SIGNAL_STRENGTH_DECIBELS_MILLIWATT, ) from homeassistant.helpers.entity import Entity from homeassistant.helpers.update_coordinat...
apache-2.0
6,920,956,356,975,630,000
31.033816
93
0.645755
false
sobercoder/gem5
src/arch/x86/isa/insts/general_purpose/rotate_and_shift/__init__.py
91
2283
# 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
707,337,912,029,965,200
50.886364
72
0.784494
false
iulian787/spack
lib/spack/spack/cmd/pkg.py
5
6418
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from __future__ import print_function import os import re import llnl.util.tty as tty from llnl.util.tty.colify import c...
lgpl-2.1
-8,509,721,853,835,470,000
28.990654
75
0.607199
false
vallsv/pyqtgraph
examples/crosshair.py
24
2649
""" Demonstrates some customized mouse interaction by drawing a crosshair that follows the mouse. """ import initExample ## Add path to library (just for examples; you do not need this) import numpy as np import pyqtgraph as pg from pyqtgraph.Qt import QtGui, QtCore from pyqtgraph.Point import Point #generate layo...
mit
330,864,330,968,782,660
29.448276
203
0.713099
false
SchoolIdolTomodachi/SchoolIdolAPI
api/migrations/0069_verificationrequest.py
4
1304
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('api', '0068_auto_20150914_1909'), ] ...
apache-2.0
1,072,181,588,602,426,600
41.064516
149
0.592791
false
epam/DLab
infrastructure-provisioning/src/dataengine-service/fabfile.py
1
4232
#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM 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 # #...
apache-2.0
-5,336,810,591,302,278,000
40.490196
131
0.605151
false
stadt-karlsruhe/ckanext-extractor
ckanext/extractor/tests/logic/test_action.py
1
13849
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2016-2018 Stadt Karlsruhe (www.karlsruhe.de) # # 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 Licen...
agpl-3.0
7,976,528,757,632,593,000
39.258721
80
0.604015
false
clchiou/garage
shipyard2/shipyard2/rules/xars.py
1
5976
"""Helpers for writing rules under //xars.""" __all__ = [ 'define_xar', 'define_zipapp', ] import dataclasses import logging from pathlib import Path import foreman from g1 import scripts from g1.bases.assertions import ASSERT from g1.containers import models as ctr_models from g1.operations.cores import mo...
mit
-1,104,088,123,513,359,700
27.869565
78
0.630857
false
xavierwu/scikit-learn
examples/applications/plot_species_distribution_modeling.py
254
7434
""" ============================= Species distribution modeling ============================= Modeling species' geographic distributions is an important problem in conservation biology. In this example we model the geographic distribution of two south american mammals given past observations and 14 environmental varia...
bsd-3-clause
8,771,255,734,620,422,000
34.740385
78
0.600753
false
physycom/QGIS
tests/src/python/test_qgscheckablecombobox.py
45
1824
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsCheckableComboBox .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. "...
gpl-2.0
-9,065,075,145,243,085,000
28.901639
78
0.660636
false
wangtuanjie/airflow
airflow/example_dags/example_python_operator.py
25
1190
from __future__ import print_function from builtins import range from airflow.operators import PythonOperator from airflow.models import DAG from datetime import datetime, timedelta import time from pprint import pprint seven_days_ago = datetime.combine(datetime.today() - timedelta(7), ...
apache-2.0
-5,597,496,403,316,065,000
23.791667
67
0.668067
false
yunhaowang/IDP-APA
utilities/py_idpapa_sam2gpd_for_sr_polya.py
1
4906
#!/usr/bin/env python import sys,re,time,argparse def main(args): # print >>sys.stdout, "Start analysis: " + time.strftime("%a,%d %b %Y %H:%M:%S") output_gpd(args.input,args.output,args.length,args.ratio) # print >>sys.stdout, "Finish analysis: " + time.strftime("%a,%d %b %Y %H:%M:%S") def extract_exon_length_from_c...
apache-2.0
-318,947,583,382,901,700
33.069444
149
0.622911
false
GovReady/govready-q
tools/simple_sar_server/sar_etl.py
1
3675
#!/usr/bin/env python3 ######################################################## # # A simple middleware to submit a scan report # assessment results # # Usage: # python sar_etl.py <apikey> <sar_service_url> [-s <system_id>] [-d <deployment_uuid>] # # Example: # python sar_etl.py eCXZbZwmBrtD5hgrJ8ptmJfvDA5vlDcc ht...
gpl-3.0
-3,437,708,121,165,892,600
25.630435
124
0.626667
false
huggingface/transformers
scripts/fsmt/fsmt-make-tiny-model.py
2
2179
#!/usr/bin/env python # coding: utf-8 # Copyright 2020 The HuggingFace Team. 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/LICENS...
apache-2.0
6,775,847,933,414,657,000
35.932203
114
0.755851
false
alkyl1978/gnuradio
gr-blocks/python/blocks/qa_throttle.py
57
1201
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
gpl-3.0
-1,486,894,400,943,468,800
30.605263
70
0.709409
false
mread/buck
third-party/py/pathlib/test_pathlib.py
1
77169
import collections import io import os import errno import pathlib import pickle import shutil import socket import stat import sys import tempfile import unittest from contextlib import contextmanager if sys.version_info < (2, 7): try: import unittest2 as unittest except ImportError: raise Imp...
apache-2.0
-8,724,157,216,409,732,000
38.594151
96
0.522645
false
mitocw/edx-platform
common/djangoapps/course_action_state/tests/test_rerun_manager.py
4
3853
""" Tests specific to the CourseRerunState Model and Manager. """ from django.test import TestCase from opaque_keys.edx.locations import CourseLocator from six import text_type from course_action_state.managers import CourseRerunUIStateManager from course_action_state.models import CourseRerunState from student.test...
agpl-3.0
2,640,582,403,480,159,700
33.711712
97
0.633532
false
tonnrueter/pymca_devel
PyMca/Median2DBrowser.py
1
7064
#/*########################################################################## # Copyright (C) 2004-2012 European Synchrotron Radiation Facility # # This file is part of the PyMca X-ray Fluorescence Toolkit developed at # the ESRF by the Software group. # # This toolkit is free software; you can redistribute it and/or m...
gpl-2.0
8,132,887,043,998,917,000
41.299401
80
0.613392
false
opendot/dotManager
main.py
1
23979
import sys import random from PyQt4 import QtGui, QtCore from RFID import * from DrupalConnector import * class MainWindow(QtGui.QMainWindow): def __init__(self): super(MainWindow, self).__init__() self.initUI() self.checkCardReader() def initUI(self): cWidget = QtGui.QWidget(self) vBox = QtG...
gpl-2.0
-7,849,247,187,257,269,000
29.821337
168
0.666333
false
cgourlay/readthedocs.org
readthedocs/projects/migrations/0002_add_vcs_type.py
5
7574
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Project.repo_type' db.add_column('projects_project', 'repo_type', self.gf('django.db.models.fields...
mit
6,003,529,919,951,223,000
72.533981
182
0.553736
false
eudicots/Cactus
cactus/skeleton/plugins/sprites.disabled.py
10
1164
import os import sys import pipes import shutil import subprocess """ This plugin uses glue to sprite images: http://glue.readthedocs.org/en/latest/quickstart.html Install: (Only if you want to sprite jpg too) brew install libjpeg sudo easy_install pip sudo pip uninstall pil sudo pip install pil sudo pip install gl...
bsd-3-clause
-314,924,541,978,610,750
20.555556
95
0.689003
false
gregdek/ansible
lib/ansible/modules/network/junos/junos_config.py
4
14862
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
53,359,031,677,221,704
34.301663
129
0.651864
false
neilLasrado/erpnext
erpnext/stock/stock_balance.py
1
9558
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import print_function, unicode_literals import frappe from frappe.utils import flt, cstr, nowdate, nowtime from erpnext.stock.utils import update_bin from erpnext.stock.stock_l...
gpl-3.0
-2,636,167,369,691,499,000
35.342205
169
0.681942
false
dajohnso/cfme_tests
cfme/infrastructure/host.py
1
22049
# -*- coding: utf-8 -*- """A model of an Infrastructure Host in CFME.""" from functools import partial from navmazing import NavigateToSibling, NavigateToAttribute from manageiq_client.api import APIException from selenium.common.exceptions import NoSuchElementException from cfme.base.credential import Credential as ...
gpl-2.0
3,506,028,274,038,528,500
35.205255
100
0.635675
false
manhong2112/CodeColle
Python/Pygame/pygame~/examples/macosx/macfont.py
17
4486
""" EXPERIMENTAL CODE! Here we load a .TTF font file, and display it in a basic pygame window. It demonstrates several of the Font object attributes. Nothing exciting in here, but it makes a great example for basic window, event, and font management. """ import pygame import math from pygame.locals import * from pyg...
mit
-5,460,450,337,192,549,000
31.985294
251
0.613464
false
googleads/google-ads-python
google/ads/googleads/v6/enums/types/app_payment_model_type.py
1
1113
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
1,739,647,493,004,364,500
28.289474
74
0.707098
false
ElDeveloper/scikit-learn
sklearn/datasets/tests/test_svmlight_format.py
228
11221
from bz2 import BZ2File import gzip from io import BytesIO import numpy as np import os import shutil from tempfile import NamedTemporaryFile from sklearn.externals.six import b from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert...
bsd-3-clause
1,731,821,493,593,053,700
30.877841
77
0.58346
false
bnprk/django-oscar
src/oscar/apps/customer/app.py
48
10703
from django.conf.urls import url from django.contrib.auth.decorators import login_required from django.views import generic from oscar.core.application import Application from oscar.core.loading import get_class class CustomerApplication(Application): name = 'customer' summary_view = get_class('customer.view...
bsd-3-clause
476,972,970,332,559,800
49.725118
79
0.54779
false
sergey-shandar/autorest
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/Lro/fixtures/acceptancetestslro/operations/lro_retrys_operations.py
14
25071
# 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
1,313,672,297,266,612,700
39.503236
140
0.61284
false
cristian99garcia/pilas-activity
pilas/actores/mapa.py
1
4881
# -*- encoding: utf-8 -*- # Pilas engine - A video game framework. # # Copyright 2010 - Hugo Ruscitti # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html) # # Website - http://www.pilas-engine.com.ar import pilas from pilas.actores import Actor class Mapa(Actor): """Representa mapas creados a partir de ...
gpl-3.0
7,962,052,435,224,557,000
36.523077
106
0.624231
false
pinkavaj/rstt
gr-rstt/python/nle2.py
1
4939
#!/usr/bin/python3 import numpy as np import matplotlib.pyplot as plt import sys class Src: def __init__(self, fname, block_size, navg = 1): self.offs = 0 self.navg = navg self.block_size = block_size self.data = np.fromfile(fname, dtype=np.float32) l = divmod(len(self.dat...
apache-2.0
-180,841,156,424,390,370
30.259494
95
0.4754
false
PingPesto/BitList
bitlist/views.py
1
4399
from bitlist.models.user import User from bitlist.models.song import Song from bitlist.models.playlist import Playlist import jobs import json import player from pyramid.security import remember from pyramid.security import forget from pyramid.view import view_config from pyramid.view import forbidden_view_config from ...
gpl-3.0
5,164,464,883,574,124,000
32.075188
75
0.655831
false
sillywilly42/simian
src/simian/settings.py
1
24724
#!/usr/bin/env python # # Copyright 2016 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
-5,074,332,502,927,518,000
28.293839
98
0.634889
false
Barrog/C4-Datapack
data/jscript/quests/7_ATripBegins/__init__.py
1
3040
# Created by CubicVirtuoso # Any problems feel free to drop by #l2j-datapack on irc.freenode.net import sys from net.sf.l2j.gameserver.model.quest import State from net.sf.l2j.gameserver.model.quest import QuestState from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest #NPCs MIRABEL = 7146 ARI...
gpl-2.0
1,377,519,367,177,967,900
29.707071
123
0.635855
false
hpcloud-mon/monasca-perf
monasca_perf/influx_load.py
1
2171
from urlparse import urlparse from threading import Thread import httplib, sys, multiprocessing from Queue import Queue import simplejson import time import base64 num_processes = int(sys.argv[1]) num_threads = int(sys.argv[2]) num_requests = int(sys.argv[3]) num_metrics_per_request = int(sys.argv[4]) series_name = sy...
apache-2.0
-673,545,697,651,099,100
26.1375
95
0.616306
false