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
ducngtuan/my-python3-koans-solution
python3/koans/about_method_bindings.py
1
2834
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * def function(): return "pineapple" def function2(): return "tractor" class Class: def method(self): return "parrot" class AboutMethodBindings(Koan): def test_methods_are_bound_to_an_object(self): obj = Class() ...
mit
3,105,656,744,688,928,300
30.488889
83
0.598447
false
Catstyle/mongoengine
tests/queryset/visitor.py
31
11227
import sys sys.path[0:0] = [""] import unittest from bson import ObjectId from datetime import datetime from mongoengine import * from mongoengine.queryset import Q from mongoengine.errors import InvalidQueryError __all__ = ("QTest",) class QTest(unittest.TestCase): def setUp(self): connect(db='mongo...
mit
7,884,317,629,190,980,000
31.077143
105
0.535673
false
Azure/azure-sdk-for-python
sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2015_04_01/operations/_operations.py
1
3943
# 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 may ...
mit
-4,611,799,744,513,533,000
41.858696
133
0.66599
false
themiken/mtasa-blue
vendor/google-breakpad/src/third_party/protobuf/protobuf/gtest/run_tests.py
199
2336
#!/usr/bin/env python # # Copyright 2008, 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 o...
gpl-3.0
8,409,595,477,486,939,000
37.933333
72
0.731164
false
myarjunar/QGIS
python/plugins/processing/tools/system.py
2
4090
# -*- coding: utf-8 -*- """ *************************************************************************** py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***************************************...
gpl-2.0
-835,955,942,696,460,300
25.558442
92
0.558924
false
rpp0/peapwn
mods/hostap/tests/hwsim/test_p2p_invitation.py
2
3747
#!/usr/bin/python # # P2P invitation test cases # Copyright (c) 2013, Jouni Malinen <j@w1.fi> # # This software may be distributed under the terms of the BSD license. # See README for more details. import logging logger = logging.getLogger() import hwsim_utils def test_p2p_go_invite(dev): """P2P GO inviting a cl...
gpl-2.0
-7,462,979,367,020,629,000
34.349057
87
0.646384
false
jeasoft/odoo
marcos_addons/marcos_stock/models.py
2
9346
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013-2015 Marcos Organizador de Negocios SRL http://marcos.do # Write by Eneldo Serrata (eneldo@marcos.do) # # This program is free software: you can redistribute it and/or modify # it under...
agpl-3.0
5,914,127,264,816,174,000
48.449735
193
0.569976
false
alexanderturner/ansible
lib/ansible/modules/cloud/google/gcdns_zone.py
25
12939
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2015 CallFire Inc. # # This file is part of Ansible. # # 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...
gpl-3.0
237,145,299,587,313,470
32.607792
113
0.576783
false
lpirl/ansible
lib/ansible/plugins/callback/tree.py
16
2413
# (c) 2012-2014, Ansible, 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 ...
gpl-3.0
-2,220,722,568,072,875,000
32.985915
141
0.67012
false
luogangyi/Ceilometer-oVirt
build/lib/ceilometer/tests/storage/test_impl_log.py
6
1104
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # Author: Doug Hellmann <doug.hellmann@dreamhost.com> # # 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/li...
apache-2.0
-5,830,061,464,844,043,000
35.8
75
0.667572
false
Khan/git-bigfile
vendor/boto/glacier/exceptions.py
185
2195
# -*- coding: utf-8 -*- # Copyright (c) 2012 Thomas Parslow http://almostobsolete.net/ # # 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 th...
mit
1,097,683,527,929,489,900
36.844828
74
0.644191
false
newsteinking/docker
tests/functional/test_install_vcs_svn.py
40
1055
import pytest from mock import patch from pip.vcs.subversion import Subversion @patch('pip.vcs.call_subprocess') @pytest.mark.network def test_obtain_should_recognize_auth_info_url(call_subprocess_mock, script): svn = Subversion(url='svn+http://username:password@svn.example.com/') svn.obtain(script.scratch_pa...
mit
1,827,018,771,436,010,800
38.074074
77
0.672986
false
hoosteeno/kuma
vendor/packages/pygments/lexers/markup.py
72
16886
# -*- coding: utf-8 -*- """ pygments.lexers.markup ~~~~~~~~~~~~~~~~~~~~~~ Lexers for non-HTML markup languages. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexers.html import HtmlLexer, XmlLexer from pygme...
mpl-2.0
515,085,694,636,692,400
32.63745
88
0.461507
false
maciekcc/tensorflow
tensorflow/contrib/image/__init__.py
38
1673
# 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
-8,258,183,441,078,376,000
36.177778
119
0.751345
false
jpedroan/megua
megua/megsiacua.py
1
4289
# coding=utf-8 """ MegSiacua -- Functions to work with one or a list of ExSiacua exercises. READ THIS: MegBook inherits this class! MegBook is the author front-end. AUTHORS: - Pedro Cruz (2016-01): first modifications for use in SMC. TESTS: check MegBook """ #*************************************************...
gpl-3.0
2,500,880,912,543,249,000
25.312883
103
0.523665
false
idea4bsd/idea4bsd
python/helpers/profiler/thriftpy/protocol/binary.py
35
10595
# -*- coding: utf-8 -*- from __future__ import absolute_import import struct from ..thrift import TType from .exc import TProtocolException # VERSION_MASK = 0xffff0000 VERSION_MASK = -65536 # VERSION_1 = 0x80010000 VERSION_1 = -2147418112 TYPE_MASK = 0x000000ff def pack_i8(byte): return struct.pack("!b", byt...
apache-2.0
5,573,174,384,781,323,000
25.355721
75
0.561208
false
lxn2/mxnet
python/mxnet/rnn/io.py
9
6562
# coding: utf-8 # pylint: disable=too-many-arguments, too-many-locals """Definition of various recurrent neural network cells.""" from __future__ import print_function import bisect import random import numpy as np from ..io import DataIter, DataBatch, DataDesc from .. import ndarray def encode_sentences(sentences, ...
apache-2.0
912,686,999,770,001,200
34.857923
95
0.562786
false
spacewalkproject/spacewalk
backend/server/test/test_registration.py
14
1054
# # Copyright (c) 2008--2015 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
-5,576,201,808,020,158,000
31.9375
73
0.746679
false
jostep/tensorflow
tensorflow/python/ops/math_grad_test.py
26
7137
# 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
7,162,715,261,675,340,000
38.430939
80
0.64663
false
resmo/ansible
test/units/modules/network/nxos/test_nxos_acl_interface.py
68
2902
# (c) 2016 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,588,675,338,364,701,000
39.873239
120
0.668849
false
chirilo/kuma
vendor/packages/pygments/formatters/other.py
73
5162
# -*- coding: utf-8 -*- """ pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments...
mpl-2.0
3,006,675,090,348,531,700
31.2625
77
0.559086
false
ajduncan/granolacms
fckeditor/editor/filemanager/connectors/py/wsgi.py
93
1629
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2008 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
gpl-2.0
5,490,402,758,054,730,000
26.086207
76
0.701044
false
randynobx/ansible
lib/ansible/modules/packaging/os/pkg5_publisher.py
71
5936
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2014 Peter Oliver <ansible@mavit.org.uk> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your o...
gpl-3.0
7,915,341,145,686,274,000
26.868545
76
0.603268
false
memtoko/django
django/contrib/gis/gdal/prototypes/raster.py
24
3671
""" This module houses the ctypes function prototypes for GDAL DataSource (raster) related data structures. """ from ctypes import POINTER, c_char_p, c_double, c_int, c_void_p from functools import partial from django.contrib.gis.gdal.libgdal import lgdal from django.contrib.gis.gdal.prototypes.generation import ( ...
bsd-3-clause
-618,642,140,955,185,200
55.476923
111
0.708799
false
hammerlab/cohorts
cohorts/plot.py
1
10847
# Copyright (c) 2017. Mount Sinai School of Medicine # # 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
-8,406,342,754,700,425,000
34.217532
163
0.614732
false
jricardo27/travelhelper
travelhelper/apps/lonelyplanet/views/country.py
1
1047
""" Lonely Planet Country Views """ from __future__ import absolute_import from django.views.generic import DetailView, ListView from core.views.base import BaseView from lonelyplanet.models.country import LPCountry class BaseLonelyPlanetCountryView(BaseView): """ Base class for Lonely Planet views """ ...
bsd-3-clause
1,105,330,584,903,369,300
23.928571
65
0.6915
false
TuSimple/mxnet
example/neural-style/model_vgg19.py
52
5975
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
-7,299,846,635,292,259,000
63.247312
152
0.657908
false
ct-23/home-assistant
tests/components/test_alert.py
10
7576
"""The tests for the Alert component.""" # pylint: disable=protected-access from copy import deepcopy import unittest from homeassistant.setup import setup_component from homeassistant.core import callback import homeassistant.components.alert as alert import homeassistant.components.notify as notify from homeassistan...
apache-2.0
3,407,191,534,580,611,600
35.248804
75
0.628036
false
shacker/django
django/db/backends/oracle/operations.py
6
24223
import datetime import re import uuid from django.conf import settings from django.db.backends.base.operations import BaseDatabaseOperations from django.db.backends.utils import strip_quotes, truncate_name from django.utils import timezone from django.utils.encoding import force_bytes from .base import Database from ...
bsd-3-clause
5,445,435,098,018,645,000
41.571178
114
0.581431
false
browniebroke/django-acme
setup.py
1
1938
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup version = '0.2.4' if sys.argv[-1] == 'publish': try: import wheel print("Wheel version: ", wheel.__version__) except ImportError: ...
mit
-4,677,205,198,864,799,000
28.815385
93
0.595459
false
bastibl/gr-ieee802-15-4
python/qa_interleaver_ii.py
4
3631
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2015 Felix Wunsch, Communications Engineering Lab (CEL) / Karlsruhe Institute of Technology (KIT) <wunsch.felix@googlemail.com>. # # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publis...
gpl-3.0
7,920,704,534,270,583,000
36.43299
140
0.644726
false
smalyshev/pywikibot-core
scripts/touch.py
3
3094
#!/usr/bin/python # -*- coding: utf-8 -*- """ This bot goes over multiple pages of a wiki, and edits them without changes. This is for example used to get category links in templates working. This script understands various command-line arguments: &params; -purge Do not touch but purge the page -botflag...
mit
8,683,094,214,395,688,000
26.380531
76
0.60181
false
Elandril/Sick-Beard
lib/hachoir_metadata/video.py
90
15568
from lib.hachoir_core.field import MissingField from lib.hachoir_metadata.metadata import (registerExtractor, Metadata, RootMetadata, MultipleMetadata) from lib.hachoir_metadata.metadata_item import QUALITY_GOOD from lib.hachoir_metadata.safe import fault_tolerant from lib.hachoir_parser.video import MovFile, AsfFi...
gpl-3.0
-7,046,750,376,496,746,000
36.786408
100
0.565712
false
hellwen/mytrade
mytrade/user/models.py
1
1859
# -*- coding: utf-8 -*- import datetime as dt from flask_login import UserMixin from mytrade.extensions import bcrypt from mytrade.database import ( Column, db, Model, ReferenceCol, relationship, SurrogatePK, ) class Role(SurrogatePK, Model): __tablename__ = 'roles' name = Column(db....
bsd-3-clause
7,507,989,217,086,062,000
29.47541
80
0.646584
false
jeffery9/mixprint_addons
account/project/wizard/account_analytic_balance_report.py
56
2147
# -*- 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
-6,140,205,735,614,084,000
36.017241
123
0.582208
false
cuboxi/android_external_chromium_org
third_party/tlslite/tlslite/messages.py
26
23028
"""Classes representing TLS messages.""" from utils.compat import * from utils.cryptomath import * from errors import * from utils.codec import * from constants import * from X509 import X509 from X509CertChain import X509CertChain # The sha module is deprecated in Python 2.6 try: import sha except ImportError: ...
bsd-3-clause
6,887,698,569,529,019,000
32.715959
79
0.571565
false
Kast0rTr0y/ansible
lib/ansible/cli/doc.py
14
13631
# (c) 2014, James Tanner <tanner.jc@gmail.com> # # 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 i...
gpl-3.0
5,473,053,820,904,313,000
37.834758
153
0.55095
false
Southpaw-TACTIC/Team
src/python/Lib/site-packages/PIL-1.1.7-py2.6-win32.egg/FpxImagePlugin.py
40
6181
# # THIS IS WORK IN PROGRESS # # The Python Imaging Library. # $Id$ # # FlashPix support for PIL # # History: # 97-01-25 fl Created (reads uncompressed RGB images only) # # Copyright (c) Secret Labs AB 1997. # Copyright (c) Fredrik Lundh 1997. # # See the README file for information on usage and redistribution. # _...
epl-1.0
527,052,531,017,367,000
26.59375
83
0.512538
false
openelisglobal/openelisglobal-sandbox
liquibase/HaitiLNSPMassive/scripts/testEntry.py
6
4008
#!/usr/bin/env python # -*- coding: utf-8 -*- test_names = [] current = [] test_sections = [] sample_types = [] descriptions = [] print_names = [] old_sort = [] uom = [] hand_edit = ['PaCO2','HCO3'] current_tests_file = open('testNameCurrent.txt','r') name_file = open('testNameDesired.txt','r') test_se...
mpl-2.0
7,939,958,902,451,442,000
32.273504
172
0.563124
false
michalbe/servo
src/components/script/dom/bindings/codegen/parser/tests/test_treatNonCallableAsNull.py
106
1379
import WebIDL def WebIDLTest(parser, harness): parser.parse(""" callback Function = any(any... arguments); interface TestTreatNonCallableAsNull1 { [TreatNonCallableAsNull] attribute Function? onfoo; attribute Function? onbar; }; """) results = parser.finish() ...
mpl-2.0
1,037,282,602,466,344,400
23.625
86
0.588107
false
popazerty/zde-e2
lib/python/Components/SelectionList.py
49
2073
from MenuList import MenuList from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN from enigma import eListboxPythonMultiContent, eListbox, gFont, RT_HALIGN_LEFT from Tools.LoadPixmap import LoadPixmap import skin selectionpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_defaul...
gpl-2.0
-5,271,258,925,766,132,000
38.113208
114
0.722624
false
qusp/orange3
Orange/tests/test_table.py
1
66916
import os import unittest from itertools import chain from math import isnan import random from Orange import data from Orange.data import filter from Orange.data import Unknown import numpy as np from unittest.mock import Mock, MagicMock, patch class TableTestCase(unittest.TestCase): def setUp(self): d...
bsd-2-clause
8,519,223,023,540,037,000
35.249187
107
0.539572
false
worthwhile/cmsplugin-remote-form
cmsplugin_remote_form/migrations/0001_initial.py
1
4950
# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-03-28 13:52 from django.db import migrations, models import django.db.models.deletion import jsonfield.fields class Migration(migrations.Migration): initial = True dependencies = [ ('cms', '0016_auto_20160608_1535'), ] operation...
bsd-3-clause
6,467,331,536,381,433,000
62.461538
710
0.617172
false
CoBiG2/RAD_Tools
struct_to_distruct.py
1
1435
#!/usr/bin/python3 # Copyright 2015 Francisco Pina Martins <f.pinamartins@gmail.com> # This file is part of struct_to_distruct. # struct_to_distruct 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-3.0
8,750,485,694,387,464,000
32.372093
103
0.716376
false
aaronsw/watchdog
vendor/webpy/web/contrib/template.py
100
3449
""" Interface to various templating engines. """ import os.path __all__ = [ "render_cheetah", "render_genshi", "render_mako", "cache", ] class render_cheetah: """Rendering interface to Cheetah Templates. Example: render = render_cheetah('templates') render.hello(name="cheetah") ...
agpl-3.0
3,006,471,150,392,787,000
25.328244
96
0.567701
false
rmfitzpatrick/ansible
lib/ansible/modules/network/cloudengine/ce_interface_ospf.py
27
31192
#!/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 distribut...
gpl-3.0
-4,707,849,614,671,062,000
37.508642
105
0.557226
false
thonkify/thonkify
src/lib/requests/help.py
6
3500
"""Module containing bug report helper(s).""" from __future__ import print_function import json import platform import sys import ssl import urllib3 import chardet from . import __version__ as requests_version try: from .packages.urllib3.contrib import pyopenssl except ImportError: pyopenssl = None Open...
mit
-4,539,133,314,692,168,000
29.434783
78
0.609143
false
saurabh6790/omnisys-lib
core/report/todo/todo.py
8
1238
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import webnotes from webnotes.widgets.reportview import execute as runreport from webnotes.utils import getdate def execute(filters=None): priority_map = {"High": 3, "Medium"...
mit
-1,130,042,285,006,686,600
36.515152
88
0.687399
false
xiangel/hue
apps/metastore/src/metastore/conf.py
3
1068
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
-563,571,150,249,095,300
37.142857
94
0.758427
false
Shaswat27/sympy
sympy/integrals/tests/test_rde.py
95
8769
"""Most of these tests come from the examples in Bronstein's book.""" from sympy import Poly, S, symbols, oo, I from sympy.integrals.risch import (DifferentialExtension, NonElementaryIntegralException) from sympy.integrals.rde import (order_at, order_at_oo, weak_normalizer, normal_denom, special_denom, bound_de...
bsd-3-clause
7,871,639,759,152,453,000
45.396825
158
0.5329
false
childsish/lhc-python
tests/test_collections/test_interval_set.py
1
1419
import unittest from lhc.collections import IntervalSet from lhc.interval import Interval class TestIntervalSet(unittest.TestCase): def test_add(self): set_ = IntervalSet() set_.add(Interval(0, 1000)) self.assertEqual(1, len(set_)) self.assertTrue(any(Interval(0, 1000) in bin fo...
gpl-2.0
-7,858,296,626,912,973,000
32.785714
91
0.637773
false
ltiao/networkx
networkx/__init__.py
40
2409
""" NetworkX ======== NetworkX (NX) is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks. https://networkx.lanl.gov/ Using ----- Just write in Python >>> import networkx as nx >>> G=nx.Graph() >>> G.add_edge(1,2) ...
bsd-3-clause
8,792,009,066,301,654,000
23.333333
79
0.69946
false
deltreey/ansible
contrib/inventory/zone.py
111
1463
#!/usr/bin/env python # (c) 2015, Dagobert Michelsen <dam@baltic-online.de> # # 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 # ...
gpl-3.0
-7,675,585,267,139,950,000
33.023256
81
0.692413
false
DataSenseAnalytics/AirlineApp
src/main/python/airlineapp/datamodel/flightmaster.py
1
1240
from smv import * from pyspark.sql.functions import * from airlineapp.datamodel import inputset from airlineapp.core import utils __all__ = ['FlightMaster'] class FlightMaster(SmvPyModule, SmvPyOutput): """Derive flight level master""" def requiresDS(self): return [inputset.DimFlightLeg, inputset.Di...
apache-2.0
-4,625,645,130,560,808,000
31.631579
96
0.537097
false
bitsuperlab/cpp-play2
programs/genesis_util/sort_objects.py
12
1421
#!/usr/bin/env python3 import argparse import json import sys def dump_json(obj, out, pretty): if pretty: json.dump(obj, out, indent=2, sort_keys=True) else: json.dump(obj, out, separators=(",", ":"), sort_keys=True) return def main(): parser = argparse.ArgumentParser(description="Sor...
mit
-2,283,874,853,241,711,400
31.295455
136
0.596763
false
surgebiswas/poker
PokerBots_2017/Johnny/numpy/distutils/command/config_compiler.py
250
4379
from __future__ import division, absolute_import, print_function from distutils.core import Command from numpy.distutils import log #XXX: Linker flags def show_fortran_compilers(_cache=[]): # Using cache to prevent infinite recursion if _cache: return _cache.append(1) from numpy.distutils.fcompiler i...
mit
645,621,622,751,228,700
34.032
104
0.565198
false
takluyver/xray
xray/indexing.py
1
8564
import numpy as np import utils def expanded_indexer(key, ndim): """Given a key for indexing an ndarray, return an equivalent key which is a tuple with length equal to the number of dimensions. The expansion is done by replacing all `Ellipsis` items with the right number of full slices and then paddi...
apache-2.0
-4,307,382,969,839,075,000
36.234783
86
0.601471
false
CollinsIchigo/hdx_2
venv/lib/python2.7/site-packages/requests/packages/urllib3/__init__.py
155
1864
""" urllib3 - Thread-safe connection pooling and re-using. """ __author__ = 'Andrey Petrov (andrey.petrov@shazow.net)' __license__ = 'MIT' __version__ = '1.10.2' from .connectionpool import ( HTTPConnectionPool, HTTPSConnectionPool, connection_from_url ) from . import exceptions from .filepost import en...
mit
814,086,576,797,377,500
27.242424
84
0.720494
false
Rudde/pyroscope
pyrocore/src/pyrocore/torrent/jobs.py
2
5864
# -*- coding: utf-8 -*- # pylint: disable=I0011 """ rTorrent Daemon Jobs. Copyright (c) 2012 The PyroScope Project <pyroscope.project@gmail.com> """ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foun...
gpl-2.0
-1,081,637,499,658,830,100
29.691099
104
0.587683
false
alexmogavero/home-assistant
tests/components/test_ffmpeg.py
19
7287
"""The tests for Home Assistant ffmpeg.""" import asyncio from unittest.mock import patch, MagicMock import homeassistant.components.ffmpeg as ffmpeg from homeassistant.setup import setup_component, async_setup_component from tests.common import ( get_test_home_assistant, assert_setup_component, mock_coro) clas...
apache-2.0
7,820,597,506,358,019,000
30.682609
74
0.660903
false
daicang/Leetcode-solutions
330-patching-array.py
1
1730
# 330-patching-array.py class Solution(object): def minPatches_wa(self, nums, n): # Wrong answer. not this method. """ :type nums: List[int] :type n: int :rtype: int """ # Example: # nums = [1, 2, 4, 9] # rbound = 1 + 2 + 4 = 7 count ...
mit
7,442,747,472,148,930,000
23.366197
70
0.404046
false
PietPtr/FinalProject
backend/restaurant/views.py
1
17334
from django.http import HttpResponseRedirect from django.shortcuts import render from django.http import HttpResponse from django.contrib.auth import authenticate, login, logout from django.contrib.auth.decorators import login_required, permission_required import json import random from django.views.decorators.csrf im...
gpl-3.0
-4,996,997,186,237,842,000
38.829885
116
0.611393
false
MassStash/m8whl_sense
tools/perf/scripts/python/net_dropmonitor.py
4235
1554
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
gpl-2.0
-8,525,557,432,236,439,000
20.583333
90
0.635779
false
466152112/scikit-learn
examples/covariance/plot_lw_vs_oas.py
248
2903
""" ============================= Ledoit-Wolf vs OAS estimation ============================= The usual covariance maximum likelihood estimate can be regularized using shrinkage. Ledoit and Wolf proposed a close formula to compute the asymptotically optimal shrinkage parameter (minimizing a MSE criterion), yielding th...
bsd-3-clause
5,178,886,435,225,950,000
33.975904
79
0.666552
false
maxpinto/Ptz
bootcamp/messages/models.py
16
2116
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from django.db.models import Max class Message(models.Model): user = models.ForeignKey(User, related_name='+') message = models.TextField(max_length=1000, blank=True) date = mode...
mit
138,295,017,897,181,420
40.509804
130
0.636106
false
ajmendez/PyMix
pymix/examples/csi.py
1
3862
import mixture # Example for context-specific independence (CSI) structure learning. # First we generate a data set from a three component mixture with a CSI like structure # in the distribution parameters. Then a five component CSI mixture is trained. # The training should recover the true number of components (thre...
gpl-2.0
3,429,499,038,193,374,000
32.293103
87
0.741067
false
GheRivero/ansible
lib/ansible/modules/network/nxos/nxos_ospf_vrf.py
36
16422
#!/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 distribut...
gpl-3.0
3,050,387,611,264,183,000
38.1
94
0.577579
false
RubenKelevra/rethinkdb
scripts/generate_rpc_templates.py
31
6985
#!/usr/bin/env python # Copyright 2010-2014 RethinkDB, all rights reserved. import sys """This script is used to generate the mailbox templates in `rethinkdb/src/rpc/mailbox/typed.hpp`. It is meant to be run as follows (assuming that the current directory is `rethinkdb/src/`): $ ../scripts/generate_rpc_templates.py >...
agpl-3.0
1,358,478,437,031,422,200
38.241573
137
0.539012
false
Quikling/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/basic/partition/manual/TEST.py
9
2617
#!/usr/bin/env python """ Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 co...
apache-2.0
-7,443,038,047,580,334,000
30.154762
76
0.654566
false
RockySteveJobs/python-for-android
python-modules/twisted/twisted/test/test_sip.py
59
33079
# -*- test-case-name: twisted.test.test_sip -*- # Copyright (c) 2001-2009 Twisted Matrix Laboratories. # See LICENSE for details. """Session Initialization Protocol tests.""" from twisted.trial import unittest, util from twisted.protocols import sip from twisted.internet import defer, reactor, utils from twisted.pyt...
apache-2.0
5,764,233,611,303,768,000
34.115711
200
0.598537
false
GdZ/scriptfile
software/googleAppEngine/google/appengine/_internal/django/core/management/commands/syncdb.py
23
8047
from optparse import make_option import sys from google.appengine._internal.django.conf import settings from google.appengine._internal.django.core.management.base import NoArgsCommand from google.appengine._internal.django.core.management.color import no_style from google.appengine._internal.django.core.management.sq...
mit
5,973,395,136,207,353,000
50.583333
139
0.58469
false
ayumilong/rethinkdb
test/common/unit.py
28
2161
#!/user/bin/env python # Copyright 2014-2015 RethinkDB, all rights reserved. import collections, os, subprocess, sys import test_framework, utils class AllUnitTests(test_framework.Test): def __init__(self, filters=[]): super(AllUnitTests, self).__init__() self.filters = filters self.confi...
agpl-3.0
1,335,005,496,373,305,000
35.627119
108
0.595558
false
wrobell/libms5803
ms5803/glue.py
1
1493
# # libms5803 - MS5803 pressure sensor library # # Copyright (C) 2014-2016 by Artur Wroblewski <wrobell@pld-linux.org> # # 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 L...
gpl-3.0
1,089,624,221,172,814,700
30.104167
73
0.656397
false
kotamat/vundle
sparkup/vim/ftplugin/html/sparkup.py
6
35770
#!/usr/bin/env python # -*- coding: utf-8 -*- version = "0.1.4" import getopt import sys import re # ============================================================================= def iteritems(obj): """iteritems() in python2 and items() in python3""" if sys.version[0] == '2': return obj.iteritems() ...
mit
-779,987,025,524,307,700
30.90901
143
0.45158
false
yokose-ks/edx-platform
common/lib/capa/capa/tests/test_input_templates.py
38
38744
""" Tests for the logic in input type mako templates. """ import unittest import capa import os.path import json from lxml import etree from mako.template import Template as MakoTemplate from mako import exceptions from capa.inputtypes import Status class TemplateError(Exception): """ Error occurred while ren...
agpl-3.0
1,364,153,708,564,199,200
39.826133
114
0.553505
false
nesl/sos-2x
modules/unit_test/modules/kernel/shared_mem/close/close_test.py
2
3085
import sys import os import pysos import signal # these two variables should be changed depending on the test drivers PID # and the type of message it will be sending, If you are using the generic_test.c # then it is likely these two values can stay the same TEST_MODULE = 0x80 MSG_TEST_DATA= 33 ALARM_LEN = 60 START_...
bsd-3-clause
293,273,426,491,288,100
35.72619
99
0.706969
false
tboyce021/home-assistant
homeassistant/components/soma/__init__.py
1
4506
"""Support for Soma Smartshades.""" import logging from api.soma_api import SomaApi from requests import RequestException import voluptuous as vol from homeassistant import config_entries from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_HOST, CONF_PORT import homeassistant.hel...
apache-2.0
2,223,246,334,010,516,200
30.075862
86
0.611185
false
kflavin/cobbler
cobbler/action_report.py
15
12031
""" Report from a cobbler master. FIXME: reinstante functionality for 2.0 Copyright 2007-2009, Red Hat, Inc and Others Anderson Silva <ansilva@redhat.com> Michael DeHaan <michael.dehaan AT gmail> This software may be freely redistributed under the terms of the GNU general public license. You should have received a c...
gpl-2.0
-3,771,870,200,517,992,000
32.794944
159
0.524146
false
gbaty/shiboken2
tests/samplebinding/bug_554_test.py
6
1283
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of the Shiboken Python Bindings Generator project. # # Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). # # Contact: PySide team <contact@pyside.org> # # This program is free software; you can redistribute it and/or # modify it under the terms...
gpl-2.0
116,412,803,764,950,530
31.075
70
0.720966
false
sovicak/AnonymniAnalytici
2018_02_15_cryptocurrencies_trading/algorithms/shared/mtma-1502733393810.py
1
6908
from pyalgotrade import strategy from pyalgotrade import plotter from pyalgotrade.tools import yahoofinance from pyalgotrade.technical import ma from pyalgotrade.technical import cumret from pyalgotrade.stratanalyzer import sharpe from pyalgotrade.stratanalyzer import returns class MarketTiming(strategy.Back...
mit
-914,008,535,557,503,000
39.119048
121
0.613926
false
La0/garmin-uploader
garmin_uploader/api.py
1
10018
import requests import re from garmin_uploader import logger URL_HOSTNAME = 'https://connect.garmin.com/modern/auth/hostname' URL_LOGIN = 'https://sso.garmin.com/sso/login' URL_POST_LOGIN = 'https://connect.garmin.com/modern/' URL_PROFILE = 'https://connect.garmin.com/modern/currentuser-service/user/info' # noqa URL...
gpl-2.0
-5,142,504,426,379,308,000
38.132813
116
0.574266
false
BlueShells/openshift-ansible
inventory/openstack/hosts/nova.py
11
6774
#!/usr/bin/env python2 # pylint: skip-file # (c) 2012, Marco Vito Moscaritolo <marco@agavee.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 Software Foundation, either version 3...
apache-2.0
-438,522,039,941,713,300
29.241071
91
0.621642
false
thecodinghub/news-for-good
news/Lib/site-packages/setuptools/command/upload_docs.py
173
7311
# -*- coding: utf-8 -*- """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to PyPI's pythonhosted.org). """ from base64 import standard_b64encode from distutils import log from distutils.errors import DistutilsOptionError import os import socket import zipfile import tempfile import ...
bsd-3-clause
-7,918,904,350,621,618,000
34.490291
84
0.573656
false
hpcloud/php-buildpack
lib/build_pack_utils/utils.py
41
10306
import os import sys import shutil import logging import codecs import inspect import re from string import Template from runner import check_output _log = logging.getLogger('utils') def safe_makedirs(path): try: os.makedirs(path) except OSError, e: # Ignore if it exists if e.errno !...
apache-2.0
8,759,656,479,821,475,000
32.790164
77
0.601882
false
tensorflow/lingvo
lingvo/core/base_input_generator_test.py
1
21940
# Lint as: python3 # Copyright 2018 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 ...
apache-2.0
4,575,806,084,268,615,700
34.501618
80
0.687876
false
mnschmit/piano-note-recognition
midi_comparaison.py
1
3581
#!/usr/bin/python usage=''' Usage: own_midi_comparaison.py filename.wav filename.mid [pitch_min pitch_max filtering] Mandatory arguments : two files to compare Optional arguments : pitch_min (smallest pitch considered), pitch_max (biggest pitch considered), filtering (true or false) ''' import sys fro...
gpl-2.0
6,337,332,334,131,109,000
26.128788
131
0.643675
false
lnielsen/invenio
invenio/legacy/websubmit/functions/Send_Modify_Mail.py
4
3919
## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 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 ## published by the Free Software Foundation; either version 2 of the ## License, or (at your ...
gpl-2.0
5,298,069,566,593,439,000
40.691489
165
0.627711
false
kinsney/sport
bike/models.py
1
5857
from django.db import models from participator.models import Participator,University from . import suitHeightChoices,howOldChoices,equipmentChoices,statusChoices,pledgeChoices,GENDER,speedChangeChoices,suspensionChoices,wheelSizeChoices,brakeTypeChoices,handlebarChoices from datetime import timedelta # Create your mode...
mit
-3,786,632,801,275,269,000
46.486957
185
0.696393
false
josefschneider/ptheremin
ptheremin.py
1
57135
#!/bin/env python """A software simulation of a theremin. A 2-dimension area serves for control of the instrument; the user drags the mouse on this area to control the frequency and amplitude. Several modes are provided that adds virtual "frets" to allow for the playing of the equal tempered tuning (or subsets of it...
gpl-2.0
1,856,848,760,374,521,600
47.958869
262
0.571961
false
75651/kbengine_cloud
kbe/res/scripts/common/Lib/encodings/cp875.py
272
12854
""" Python Character Mapping Codec cp875 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP875.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,input...
lgpl-3.0
340,772,370,574,957,600
40.869707
116
0.526451
false
annahs/atmos_research
NC_MAC_vs_alt_single_coating_thickness.py
1
16412
from pymiecoated import Mie import sys import os import numpy as np from pprint import pprint from datetime import datetime import mysql.connector import math import matplotlib.pyplot as plt import matplotlib.colors import calendar from scipy.optimize import curve_fit assumed_coating_th = [41,43,44,40,38,40,44,41,38,3...
mit
4,343,699,382,039,818,000
41.298969
551
0.675542
false
CPedrini/TateTRES
tornado/process.py
15
5233
#!/usr/bin/env python # # Copyright 2011 Facebook # # 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
-1,872,364,355,703,763,000
32.120253
82
0.637875
false
spaceof7/QGIS
tests/src/python/test_provider_tabfile.py
24
4558
# -*- coding: utf-8 -*- """QGIS Unit tests for the OGR/MapInfo tab provider. .. 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 v...
gpl-2.0
9,185,439,259,350,660,000
43.252427
108
0.676393
false
RedhawkSDR/integration-gnuhawk
gnuradio/gr-howto-write-a-block/python/qa_howto.py
8
1947
#!/usr/bin/env python # # Copyright 2004,2007 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 optio...
gpl-3.0
-6,350,309,316,082,320,000
32
75
0.638932
false
camptocamp/odoo
addons/sale_analytic_plans/__openerp__.py
119
1718
# -*- 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,922,125,986,663,503,000
40.902439
90
0.597206
false
gusyussh/learntosolveit
languages/python/algorithm_bipartite.py
2
2496
#!/usr/bin/python #$Id$ """ Program to find the bipartite match. Hopcroft-Karp bipartite max-cardinality matching and max independent set David Eppstein, UC Irvine, 27 Apr 2002 Explaination: TODO """ def bipartiteMatch(graph): '''Find maximum cardinality matching of a bipartite graph (U,V,E). The input format is...
bsd-3-clause
6,200,055,704,167,374,000
28.023256
77
0.665865
false
pysv/djep
pyconde/checkin/forms.py
1
5252
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.forms import formsets from django.utils.translation import ugettext_lazy as _ from crispy_forms.helper import FormHelper from cr...
bsd-3-clause
3,703,779,954,662,838,300
31.220859
96
0.615194
false
akesandgren/easybuild-easyblocks
easybuild/easyblocks/generic/cmakeninja.py
3
2149
## # Copyright 2019-2021 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
-8,645,487,330,965,562,000
37.375
96
0.718474
false
portnov/sverchok
utils/csg_core.py
6
2180
import math from sverchok.utils.csg_geom import * class CSG(object): """ ## License Copyright (c) 2011 Evan Wallace (http://madebyevan.com/), under the MIT license. Python port Copyright (c) 2012 Tim Knip (http://www.floorplanner.com), under the MIT license. """ def __init__(self): sel...
gpl-3.0
-8,342,219,904,690,375,000
24.348837
97
0.538532
false
davidshepherd7/Landau-Lifshitz-Gilbert-ODE-model
core/utils.py
1
16649
from __future__ import division from __future__ import absolute_import import collections import scipy as sp import scipy.linalg import itertools as it import operator as op import functools as ft import sympy import math from functools import partial as par from os.path import join as pjoin from math import sin, co...
gpl-3.0
442,083,561,420,793,700
26.428336
103
0.59469
false