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
camradal/ansible
lib/ansible/modules/system/known_hosts.py
5
11771
#!/usr/bin/python """ Ansible module to manage the ssh known_hosts file. Copyright(c) 2014, Matthew Vernon <mcv21@cam.ac.uk> 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 Li...
gpl-3.0
-5,673,645,964,484,363,000
36.487261
247
0.617959
false
junhuac/MQUIC
depot_tools/recipe_modules/bot_update/test_api.py
1
2904
# Copyright 2014 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 hashlib import os import struct import sys from recipe_engine import recipe_test_api # TODO(phajdan.jr): Clean up this somewhat ugly import. sys.path...
mit
-1,615,092,609,187,564,500
32.767442
76
0.608471
false
dxwu/BinderFilter
resources/android-toolchain-16/lib/python2.7/poplib.py
223
12388
"""A POP3 client class. Based on the J. Myers POP3 draft, Jan. 96 """ # Author: David Ascher <david_ascher@brown.edu> # [heavily stealing from nntplib.py] # Updated: Piers Lauder <piers@cs.su.oz.au> [Jul '97] # String method conversion and test jig improvements by ESR, February 2001. # Added the POP3_SSL clas...
mit
4,646,459,837,317,496,000
28.707434
107
0.540523
false
MicheleDamian/ConnectopicMapping
setup.py
1
1540
from codecs import open from os import path from setuptools import setup, Extension from Cython.Distutils import build_ext import numpy here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f....
apache-2.0
-6,841,245,839,327,593,000
27
126
0.602597
false
beegieb/mltools
deeplearning/graphrbm.py
1
5949
from core.generalized import GeneralizedModel from utils.functions import * from scipy import * from numpy.random import normal, permutation, rand, uniform LAYER_MODEL_FNS = { 'binary': sigmoid, 'linear': linear } LAYER_SAMPLE_FNS = { 'binary': sample_bernoulli, 'linear': l...
gpl-2.0
-6,428,061,415,852,867,000
37.882353
126
0.536561
false
luofei98/qgis
python/plugins/processing/algs/grass7/Grass7AlgorithmProvider.py
3
4313
# -*- coding: utf-8 -*- """ *************************************************************************** Grass7AlgorithmProvider.py --------------------- Date : April 2014 Copyright : (C) 2014 by Victor Olaya Email : volayaf at gmail dot com ****************...
gpl-2.0
7,504,399,362,855,730,000
39.308411
80
0.553907
false
Workday/OpenFrame
tools/telemetry/third_party/gsutilz/third_party/oauth2client/tests/test_clientsecrets.py
21
4735
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
bsd-3-clause
-2,033,972,133,132,039,700
30.566667
74
0.657022
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.1/Lib/encodings/iso8859_9.py
272
13156
""" Python Character Mapping Codec iso8859_9 generated from 'MAPPINGS/ISO8859/8859-9.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,errors='...
mit
-1,135,512,566,861,696,100
41.85342
107
0.516874
false
liorvh/golismero
golismero/api/data/vulnerability/__init__.py
8
46532
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Vulnerability types. """ __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/o...
gpl-2.0
-3,394,399,860,206,913,500
30.849418
79
0.453924
false
thresholdsoftware/asylum
openerp/addons/mrp/report/mrp_report.py
56
3807
# -*- 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...
agpl-3.0
-1,378,711,086,179,262,200
35.605769
89
0.510901
false
sql-sith/cdc2015
battleship_3.py
1
2381
''' What could be better: - what if the guesses are not valid ints? - let them know if it's a near miss (a la Sub Search)? - variable-sized grid? - variable number of ships? - show location of ship when player loses? ''' from random import randint from reportlab.lib.validators import isInt def get...
gpl-3.0
6,800,413,790,641,531,000
25.455556
79
0.566569
false
dougn/HalfCaff
halfcaff/power.py
1
3449
import ctypes import CoreFoundation import objc import subprocess import time ## from http://benden.us/journal/2014/OS-X-Power-Management-No-Sleep-Howto/ ## http://alistra.ghost.io/2015/03/15/making-your-os-x-not-sleep-while-running-scripts/ def SetUpIOFramework(): # load the IOKit library framework = c...
mit
640,726,170,178,251,900
32.823529
92
0.657292
false
benthomasson/behave
bin/toxcmd3.py
17
9591
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- """ Provides a command container for additional tox commands, used in "tox.ini". COMMANDS: * copytree * copy * py2to3 REQUIRES: * argparse """ from glob import glob import argparse import inspect import os.path import shutil import sys import collections __aut...
bsd-2-clause
-383,114,469,906,161,340
34.522222
84
0.542071
false
azoft-dev-team/imagrium
env/Lib/test/test_userstring.py
88
4850
#!/usr/bin/env python # UserString is a wrapper around the native builtin string type. # UserString instances should behave similar to builtin string objects. import string from test import test_support, string_tests from UserString import UserString, MutableString import warnings class UserStringTest( string_tes...
mit
4,140,968,833,444,293,600
31.993197
77
0.562887
false
supersven/intellij-community
python/lib/Lib/encodings/iso8859_6.py
593
11089
""" Python Character Mapping Codec iso8859_6 generated from 'MAPPINGS/ISO8859/8859-6.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,errors='...
apache-2.0
-8,483,962,562,026,857,000
35.120521
107
0.505817
false
drawks/ansible
lib/ansible/modules/storage/zfs/zfs_delegate_admin.py
44
9524
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2015, Nate Coraor <nate@coraor.org> # 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 = {'status': ['preview'], ...
gpl-3.0
1,551,428,559,449,991,200
34.537313
141
0.583683
false
marshmallow-code/marshmallow-sqlalchemy
tests/test_sqlalchemy_schema.py
1
16699
import pytest from marshmallow import validate, ValidationError, Schema import marshmallow import sqlalchemy as sa from marshmallow_sqlalchemy import SQLAlchemySchema, SQLAlchemyAutoSchema, auto_field from marshmallow_sqlalchemy.exceptions import IncorrectSchemaTypeError from marshmallow_sqlalchemy.fields import Rela...
mit
4,509,065,766,554,883,600
29.251812
96
0.639978
false
lukedeo/fancy-cnn
prepare_yelp_sentences.py
2
6769
""" prepare_yelp_sentences.py description: prepare the yelp data for training in convolutional recurrent architectures over sentences """ from nlpdatahandlers import YelpDataHandler import cPickle as pickle import logging import numpy as np from textclf.wordvectors.glove import GloVeBox LOGGER_PREFIX = ' %s' loggi...
mit
-4,112,279,185,386,516,000
47.35
112
0.635692
false
orchidinfosys/odoo
addons/account/__openerp__.py
2
3530
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name' : 'Invoicing', 'version' : '1.1', 'summary': 'Send Invoices and Track Payments', 'sequence': 30, 'description': """ Invoicing & Payments ==================== The specific and easy-to-use Invoi...
gpl-3.0
8,341,655,798,388,975,000
43.125
274
0.641643
false
andreparrish/python-for-android
python3-alpha/python3-src/Lib/test/test_sys.py
47
32005
import unittest, test.support import sys, io, os import struct import subprocess import textwrap import warnings import operator import codecs # count the number of test runs, used to create unique # strings to intern in test_intern() numruns = 0 try: import threading except ImportError: threading = None cla...
apache-2.0
5,990,607,000,349,025,000
35.745121
100
0.574473
false
pchauncey/ansible
lib/ansible/modules/cloud/amazon/ec2_vpc_vgw.py
29
20182
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterf...
gpl-3.0
8,837,059,709,543,430,000
33.736661
143
0.603954
false
fuesika/teispice
examples/tlinew.py
2
1090
from eispice import * from numpy import matrix R0 = [[0.861113, 0], [0, 0.861113]] L0 = [[231.832e-9, 38.1483e-9],[38.1483e-9, 231.819e-9]] G0 = [[0,0],[0,0]] C0 = [[156.163e-12, -8.60102e-12],[-8.60102e-12, 156.193e-12]] Rs = [[0.368757e-3, 0],[0, 0.368757e-3]] Gd = [[0,0],[0,0]] cct = Circuit("TlineW Test") cct.Vs...
gpl-2.0
8,733,098,670,098,121,000
27.684211
62
0.550459
false
Gogistics/prjGogistics
prjGogisticsWINEVER/src/bs4/tests/test_docs.py
607
1067
"Test harness for doctests." # pylint: disable-msg=E0611,W0142 __metaclass__ = type __all__ = [ 'additional_tests', ] import atexit import doctest import os #from pkg_resources import ( # resource_filename, resource_exists, resource_listdir, cleanup_resources) import unittest DOCTEST_FLAGS = ( doctes...
mit
4,805,859,257,241,553,000
28.638889
77
0.621368
false
jcrudy/clinvoc
clinvoc/hcpcs.py
1
2356
from .base import RegexVocabulary, left_pad, NoWildcardsVocabulary, NoRangeFillVocabulary, NoCheckVocabulary,\ ProcedureVocabulary, ModifierVocabulary import re from itertools import product _hcpcs_split_regex = re.compile('^([A-Z]*)([0-9]+)([A-Z]*)$') def hcpcs_split(code): match = _hcpcs_split_regex.match(co...
mit
8,568,495,687,981,875,000
39.637931
143
0.611205
false
webgeodatavore/django
django/db/backends/mysql/operations.py
45
8598
from __future__ import unicode_literals import uuid from django.conf import settings from django.db.backends.base.operations import BaseDatabaseOperations from django.utils import six, timezone from django.utils.encoding import force_text class DatabaseOperations(BaseDatabaseOperations): compiler_module = "djan...
bsd-3-clause
-7,587,598,404,426,333,000
39.17757
113
0.602698
false
napkindrawing/ansible
lib/ansible/parsing/dataloader.py
7
18437
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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 of the License, or # (at your option) an...
gpl-3.0
8,281,397,058,065,748,000
39.971111
147
0.599121
false
somsak/youtube-dl
youtube_dl/extractor/miomio.py
95
3521
# coding: utf-8 from __future__ import unicode_literals import random from .common import InfoExtractor from ..utils import ( xpath_text, int_or_none, ExtractorError, ) class MioMioIE(InfoExtractor): IE_NAME = 'miomio.tv' _VALID_URL = r'https?://(?:www\.)?miomio\.tv/watch/cc(?P<id>[0-9]+)' _...
unlicense
-2,657,055,580,431,713,000
31.424528
118
0.515857
false
jimi-c/ansible
lib/ansible/modules/cloud/vmware/vmware_host_config_manager.py
3
7965
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # 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...
gpl-3.0
-1,420,054,209,329,440,300
38.430693
148
0.605524
false
runt18/mojo
build/android/pylib/android_commands_unittest.py
94
7591
# Copyright 2014 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 os import shutil import sys import unittest sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir)) from pylib import android_commands ...
bsd-3-clause
7,449,633,624,389,807,000
38.743455
80
0.642998
false
minhphung171093/GreenERP_V8
openerp/addons/crm/report/report_businessopp.py
377
6269
# -*- 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,028,644,126,593,737,000
32.513369
109
0.551779
false
public-ink/public-ink
server/appengine/lib/numpy/distutils/tests/test_fcompiler_gnu.py
155
2242
from __future__ import division, absolute_import, print_function from numpy.testing import TestCase, assert_, run_module_suite import numpy.distutils.fcompiler g77_version_strings = [ ('GNU Fortran 0.5.25 20010319 (prerelease)', '0.5.25'), ('GNU Fortran (GCC 3.2) 3.2 20020814 (release)', '3.2'), ('GNU Fo...
gpl-3.0
7,692,173,002,616,862,000
36.366667
76
0.596789
false
dakcarto/QGIS
python/console/console.py
1
35613
# -*- coding:utf-8 -*- """ /*************************************************************************** Python Console for QGIS ------------------- begin : 2012-09-10 copyright : (C) 2012 by Salvatore Larosa email : lrssvtml (at) gmail (dot) com ***...
gpl-2.0
1,771,148,628,907,987,200
46.866935
129
0.679808
false
KitKatXperience/platform_external_chromium_org
native_client_sdk/src/build_tools/tests/verify_ppapi_test.py
24
7271
#!/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 os import sys import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) BUILD_TOOLS_DIR = os.path.dirname(SCR...
bsd-3-clause
4,809,976,938,769,030,000
36.479381
80
0.634988
false
byt3smith/CIRTKit
modules/reversing/viper/rats/bluebanana.py
1
1370
# Originally written by Kevin Breen (@KevTheHermit): # https://github.com/kevthehermit/RATDecoders/blob/master/BlueBanana.py import os import sys import string from zipfile import ZipFile from cStringIO import StringIO from Crypto.Cipher import AES from lib.common.out import * def decrypt_aes(key, data): cipher ...
mit
4,726,444,674,849,123,000
25.862745
71
0.644526
false
yarikoptic/pystatsmodels
statsmodels/examples/l1_demo/short_demo.py
3
3644
""" You can fit your LikelihoodModel using l1 regularization by changing the method argument and adding an argument alpha. See code for details. The Story --------- The maximum likelihood (ML) solution works well when the number of data points is large and the noise is small. When the ML solution starts "bre...
bsd-3-clause
-3,944,161,987,425,712,000
30.686957
76
0.708288
false
bbrieber/emacs-for-python
python-libs/epy-unittest.py
12
1091
from Pymacs import Let, lisp from unittest import TestLoader from itertools import groupby import os def symbol(sym): return lisp[sym] def discover(root_dir): if not os.path.exists(root_dir): return [] loader = TestLoader() prev_dir = os.curdir os.chdir(root_dir) tests = loader....
gpl-3.0
6,809,901,525,342,803,000
26.974359
93
0.551787
false
h0wl/FuzzLabs
engine/requests/file_JPEG_S.py
7
8600
# ============================================================================= # JPEG Image Descriptor - SMALL # This file is part of the FuzzLabs Fuzzing Framework # # Author: FuzzLabs # Date: 21/07/2015 # # Original file MD5 sum: 4dde17f30fee6e6120a58d890a4ec572 # Original file SHA1 sum: 1e1d1c90b4b0dd9ad5719b...
gpl-2.0
8,122,997,504,461,036,000
45.236559
79
0.407442
false
Zhongqilong/mykbengineer
kbe/res/scripts/common/Lib/configparser.py
84
49437
"""Configuration file parser. A configuration file consists of sections, lead by a "[section]" header, and followed by "name: value" entries, with continuations and such in the style of RFC 822. Intrinsic defaults can be specified by passing them into the ConfigParser constructor as a dictionary. class: ConfigParse...
lgpl-3.0
-26,229,911,488,841,292
38.423445
79
0.563485
false
konfabproject/konfab-consumer
ebdata/templatemaker/tests/hole.py
1
3954
# Copyright 2007,2008,2009,2011 Everyblock LLC, OpenPlans, and contributors # # This file is part of ebdata # # ebdata 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
5,427,475,276,229,239,000
32.794872
87
0.648963
false
wangxiangyu/horizon
openstack_dashboard/dashboards/project/databases/forms.py
34
3867
# Copyright 2014 Tesora Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
apache-2.0
-5,199,158,023,174,501,000
40.580645
78
0.594518
false
StackPointCloud/libcloud
libcloud/dns/drivers/softlayer.py
28
7480
# 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 use ...
apache-2.0
7,969,865,861,730,515,000
33.62963
77
0.554144
false
stuartarchibald/numba
numba/cuda/intrinsic_wrapper.py
7
2240
from .decorators import jit import numba @jit(device=True) def all_sync(mask, predicate): """ If for all threads in the masked warp the predicate is true, then a non-zero value is returned, otherwise 0 is returned. """ return numba.cuda.vote_sync_intrinsic(mask, 0, predicate)[1] @jit(device=True...
bsd-2-clause
3,589,966,496,341,739,000
28.090909
77
0.679464
false
hamzehd/edx-platform
common/test/acceptance/pages/lms/video/video.py
19
27462
""" Video player in the courseware. """ import time import json import requests from selenium.webdriver.common.action_chains import ActionChains from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise, Promise from bok_choy.javascript import wait_for_js, js_defined import logging log = l...
agpl-3.0
7,238,807,932,326,319,000
31.194607
136
0.604508
false
robocomp/robocomp-robolab
components/hardware/imu/pyimu/src/specificworker.py
1
2340
# # Copyright (C) 2018 by YOUR NAME HERE # # This file is part of RoboComp # # RoboComp 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...
gpl-3.0
8,535,201,848,486,149,000
22.877551
85
0.675214
false
conrado/ansible-modules-core
database/mysql/mysql_db.py
82
14607
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Mark Theunissen <mark.theunissen@gmail.com> # Sponsored by Four Kitchens http://fourkitchens.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 publishe...
gpl-3.0
-1,652,969,957,859,320,300
35.5175
243
0.613199
false
chrissmall22/odl-client
odlclient/rest.py
1
4785
#!/usr/bin/env python # # Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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
-7,721,396,479,626,288,000
29.09434
76
0.526228
false
equialgo/scikit-learn
examples/cluster/plot_adjusted_for_chance_measures.py
105
4300
""" ========================================================== Adjustment for chance in clustering performance evaluation ========================================================== The following plots demonstrate the impact of the number of clusters and number of samples on various clustering performance evaluation me...
bsd-3-clause
5,074,094,482,073,142,000
34.245902
79
0.678372
false
laysakura/chainer
cupy/logic/ops.py
9
1033
from cupy import elementwise from cupy.logic import ufunc logical_and = ufunc.create_comparison( 'logical_and', '&&', '''Computes the logical AND of two arrays. .. seealso:: :data:`numpy.logical_and` ''') logical_or = ufunc.create_comparison( 'logical_or', '||', '''Computes the logical OR o...
mit
-4,107,433,952,279,871,500
23.023256
76
0.494676
false
MarkTheF4rth/youtube-dl
youtube_dl/extractor/googlesearch.py
168
1699
from __future__ import unicode_literals import itertools import re from .common import SearchInfoExtractor from ..compat import ( compat_urllib_parse, ) class GoogleSearchIE(SearchInfoExtractor): IE_DESC = 'Google Video search' _MAX_RESULTS = 1000 IE_NAME = 'video.google:search' _SEARCH_KEY = 'g...
unlicense
7,468,050,033,507,384,000
27.79661
78
0.495586
false
mbauskar/phr-frappe
frappe/model/base_document.py
9
11588
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, json, sys from frappe import _ from frappe.utils import cint, flt, now, cstr, strip_html from frappe.model import default_fields from frappe.model.naming import ...
mit
5,929,331,658,885,164,000
28.561224
99
0.64446
false
onesfreedom/pybuilder
src/unittest/python/graph_utils_tests.py
7
2674
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2015 PyBuilder Team # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/l...
apache-2.0
-4,157,933,927,285,329,400
47.618182
101
0.68362
false
donkirkby/django
tests/auth_tests/test_views.py
16
45028
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime import itertools import os import re from importlib import import_module from django.apps import apps from django.conf import settings from django.contrib.admin.models import LogEntry from django.contrib.auth import REDIRECT_FIELD_NAME, S...
bsd-3-clause
8,589,866,044,975,295,000
42.503382
119
0.622796
false
schwartzmx/ansible-modules-extras
packaging/os/svr4pkg.py
51
7426
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Boyd Adamson <boyd () boydadamson.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 of th...
gpl-3.0
-78,121,445,247,495,820
30.735043
147
0.640048
false
idrogeno/FusionOE
lib/python/Screens/StreamingClientsInfo.py
9
1536
from Screen import Screen from Components.ActionMap import ActionMap from Components.Converter.ClientsStreaming import ClientsStreaming import skin import gettext from Components.Sources.StaticText import StaticText class StreamingClientsInfo(Screen): skin ="""<screen name="StreamingClientsInfo" position="center,cen...
gpl-2.0
-8,719,988,240,791,214,000
50.233333
169
0.703125
false
ryfeus/lambda-packs
Tensorflow_OpenCV_Nightly/source/google/protobuf/internal/unknown_fields_test.py
32
13868
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that t...
mit
3,619,408,251,631,022,600
40.27381
80
0.736516
false
tiagocardosos/stoq
stoqlib/gui/test/test_loandetails.py
2
1257
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2012 Async Open Source <http://www.async.com.br> ## All rights reserved ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundati...
gpl-2.0
-3,917,520,003,586,745,000
34.914286
71
0.719968
false
jeremiahyan/odoo
addons/google_calendar/utils/google_event.py
1
8268
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.api import model from odoo.tools import email_normalize from odoo.tools.sql import existing_tables import pytz import logging from typing import Iterator, Mapping from collections import abc from dateutil.parser...
gpl-3.0
-5,635,967,555,580,390,000
39.930693
144
0.627842
false
siutanwong/scikit-learn
sklearn/ensemble/tests/test_forest.py
48
35412
""" Testing for the forest module (sklearn.ensemble.forest). """ # Authors: Gilles Louppe, # Brian Holt, # Andreas Mueller, # Arnaud Joly # License: BSD 3 clause import pickle from collections import defaultdict from itertools import product import numpy as np from scipy.sparse import csr_...
bsd-3-clause
2,230,522,442,040,708,900
34.806876
79
0.634757
false
atheed/servo
tests/wpt/web-platform-tests/tools/manifest/tests/test_XMLParser.py
142
1445
from xml.etree.ElementTree import ParseError import pytest from ..XMLParser import XMLParser @pytest.mark.parametrize("s", [ '<foo>&nbsp;</foo>', '<!DOCTYPE foo><foo>&nbsp;</foo>', '<!DOCTYPE foo PUBLIC "fake" "id"><foo>&nbsp;</foo>', '<!DOCTYPE foo PUBLIC "fake" "http://www.w3.org/TR/xhtml1/DTD/xht...
mpl-2.0
1,075,377,116,652,391,400
25.759259
135
0.584775
false
ROMFactory/android_external_chromium_org
third_party/protobuf/python/google/protobuf/internal/service_reflection_test.py
560
5127
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # ...
bsd-3-clause
3,022,611,202,802,454,500
36.698529
80
0.718354
false
charlesty/rpi2_xtrinsic
mag3110.py
1
3719
#!/usr/bin/env python2 # MAG3110 : Three-axis magnetometer # This script can calibrate the sensor and acquire data. # It will output magnetic field on the three axis in micro Tesla. import smbus import os import time # I2C constants bus = smbus.SMBus(1) # 0 if /dev/i2c-0 exists, 1 if /dev/i2c-1 exists ADDR = 0x0E ...
gpl-2.0
2,842,566,241,768,165,000
23.793333
88
0.584566
false
jcanizales/grpc
src/python/grpcio/grpc/beta/utilities.py
34
5375
# Copyright 2015, 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 conditions and the f...
bsd-3-clause
-3,381,853,775,496,093,000
31.77439
79
0.703814
false
vaginessa/pyload
module/plugins/internal/XFSAccount.py
2
5941
# -*- coding: utf-8 -*- import re import time import urlparse from module.plugins.internal.Account import Account from module.plugins.internal.Plugin import parse_html_form, set_cookie class XFSAccount(Account): __name__ = "XFSAccount" __type__ = "account" __version__ = "0.42" __status__ = "t...
gpl-3.0
6,896,582,789,753,240,000
32.755682
119
0.488975
false
kastriothaliti/techstitution
venv/lib/python2.7/site-packages/pip/pep425tags.py
340
10980
"""Generate and work with PEP 425 Compatibility Tags.""" from __future__ import absolute_import import re import sys import warnings import platform import logging try: import sysconfig except ImportError: # pragma nocover # Python < 2.7 import distutils.sysconfig as sysconfig import distutils.util from...
gpl-3.0
-3,817,812,162,630,652,400
32.888889
79
0.575228
false
sup95/zulip
zerver/views/webhooks/pingdom.py
8
2521
# Webhooks for external integrations. from __future__ import absolute_import from typing import Any from django.utils.translation import ugettext as _ from django.http import HttpRequest, HttpResponse from zerver.lib.actions import check_send_message from zerver.lib.response import json_success, json_error from zerve...
apache-2.0
-8,689,973,539,675,336,000
31.320513
118
0.685839
false
mzizzi/ansible
lib/ansible/modules/utilities/logic/include_role.py
13
2819
#!/usr/bin/python # -*- mode: python -*- # Ansible is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the...
gpl-3.0
6,882,314,412,814,773,000
28.364583
147
0.675062
false
slank/ansible
lib/ansible/module_utils/cloud.py
119
3974
# # (c) 2016 Allen Sanabria, <asanabria@linuxdynasty.org> # # 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...
gpl-3.0
-5,903,903,732,050,982,000
35.796296
97
0.586311
false
teoliphant/scipy
scipy/io/matlab/tests/test_streams.py
4
2621
""" Testing """ import os import sys if sys.version_info[0] >= 3: from io import BytesIO cStringIO = BytesIO else: from cStringIO import StringIO as cStringIO from StringIO import StringIO as BytesIO from tempfile import mkstemp import numpy as np from numpy.compat import asbytes from nose.tools ...
bsd-3-clause
4,488,755,487,063,359,000
24.201923
74
0.595574
false
ionanrozenfeld/networkx
networkx/algorithms/isomorphism/isomorphvf2.py
18
36806
# -*- coding: utf-8 -*- """ ************* VF2 Algorithm ************* An implementation of VF2 algorithm for graph ismorphism testing. The simplest interface to use this module is to call networkx.is_isomorphic(). Introduction ------------ The GraphMatcher and DiGraphMatcher are responsible for matching graphs or d...
bsd-3-clause
-4,545,792,115,301,867,500
37.140933
129
0.586019
false
silvermagic/jhbuild
scripts/changecvsroot.py
5
1619
#!/usr/bin/env python2 # jhbuild - a tool to ease building collections of source packages # Copyright (C) 2001-2006 James Henstridge # # changecvsroot.py: script to alter the CVS root of a working copy # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Pu...
gpl-2.0
2,891,171,039,786,022,400
40.512821
78
0.668931
false
alexschlueter/cern-root
tutorials/pyroot/fillrandom.py
17
1676
# # To see the output of this macro, click begin_html <a href="gif/fillrandom.gif">here</a>. end_html # from ROOT import TCanvas, TPad, TFormula, TF1, TPaveLabel, TH1F, TFile from ROOT import gROOT, gBenchmark gROOT.Reset() c1 = TCanvas( 'c1', 'The FillRandom example', 200, 10, 700, 900 ) c1.SetFillColor( 18 ) pad...
lgpl-2.1
-6,002,776,160,795,692,000
26.032258
99
0.693914
false
syslo/gaminator
gaminator-src/events.py
1
1959
# -*- coding: utf-8 -*- import heapq from .thing_type import _ThingType def PTI_decorator__event(name): def decorator(f): if not hasattr(f, "_gaminator_events"): f._gaminator_events = [] f._gaminator_events.append(name) return f return decorator class _EventEmitterMix...
mit
-4,131,366,528,037,351,400
30.596774
80
0.536498
false
zhujzhuo/openstack-trove
trove/db/sqlalchemy/migrate_repo/versions/015_add_service_type.py
10
1315
# Copyright 2012 OpenStack Foundation # # 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 ...
apache-2.0
653,993,261,125,735,700
35.527778
78
0.729278
false
windyuuy/opera
chromium/src/v8/tools/testrunner/objects/peer.py
123
3561
# Copyright 2012 the V8 project authors. 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 conditi...
bsd-3-clause
-8,131,430,595,924,002,000
43.5125
76
0.707105
false
vikas-parashar/zulip
zerver/views/webhooks/helloworld.py
11
1540
# Webhooks for external integrations. from __future__ import absolute_import from django.utils.translation import ugettext as _ from zerver.lib.actions import check_send_message from zerver.lib.response import json_success, json_error from zerver.decorator import REQ, has_request_variables, api_key_only_webhook_view fr...
apache-2.0
6,963,355,227,092,842,000
43
131
0.707792
false
pymedusa/Medusa
ext/boto/manage/cmdshell.py
153
14739
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
gpl-3.0
8,296,726,779,816,999,000
35.213759
106
0.593188
false
hynnet/openwrt-mt7620
staging_dir/host/lib/python2.7/unittest/__init__.py
228
2719
""" Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's Smalltalk testing framework. This module contains the core framework classes that form the basis of specific test cases and suites (TestCase, TestSuite etc.), and also a text-based utility class for running the tests and reporting the resu...
gpl-2.0
-2,000,719,867,264,461,600
38.405797
80
0.73299
false
Mic92/ansible
test/units/playbook/test_play_context.py
17
13272
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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 of the License, or # (at your option) an...
gpl-3.0
5,874,342,918,160,298,000
42.090909
217
0.596745
false
pylbert/upm
examples/python/urm37-uart.py
6
2109
#!/usr/bin/env python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 # witho...
mit
-5,290,045,190,295,932,000
37.345455
82
0.723566
false
hujiajie/chromium-crosswalk
tools/export_tarball/export_v8_tarball.py
118
3960
#!/usr/bin/env python # 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. """Creates a tarball with V8 sources, but without .svn directories. This allows easy packaging of V8, synchronized with browser re...
bsd-3-clause
-1,120,929,867,217,171,600
28.333333
80
0.690152
false
LIKAIMO/MissionPlanner
Lib/site-packages/scipy/lib/lapack/tests/common.py
63
1358
import numpy as np from scipy.lib.lapack import flapack, clapack FUNCS_TP = {'ssygv' : np.float32, 'dsygv': np.float, 'ssygvd' : np.float32, 'dsygvd' : np.float, 'ssyev' : np.float32, 'dsyev': np.float, 'ssyevr' : np.float32, 'dsyevr' : np.float, ...
gpl-3.0
4,408,467,111,961,145,300
25.115385
74
0.57732
false
Zord13appdesa/python-for-android
python-modules/twisted/twisted/persisted/journal/picklelog.py
64
1199
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # # -*- test-case-name: twisted.test.test_journal -*- """Logging that uses pickles. TODO: add log that logs to a file. """ # twisted imports from twisted.persisted import dirdbm from twisted.internet import defer from zope.interface ...
apache-2.0
4,352,274,596,519,881,700
23.979167
57
0.623019
false
rogeriofalcone/treeio
knowledge/models.py
1
5381
# encoding: utf-8 # Copyright 2011 Tree.io Limited # This file is part of Treeio. # License www.tree.io/license """ Knowledge base module objects """ from django.db import models from treeio.core.models import Object from django.core.urlresolvers import reverse from django.template import defaultfilters from unidecode...
mit
314,713,070,055,077,760
29.573864
101
0.606393
false
leigh123linux/cinnamon-screensaver
src/dbusdepot/cinnamonClient.py
2
1184
#!/usr/bin/python3 from gi.repository import Gio, CScreensaver from dbusdepot.baseClient import BaseClient class CinnamonClient(BaseClient): """ Simple client to talk to Cinnamon's dbus interface. Currently its only use is for attempting to force an exit from overview and expo mode (both of which do...
gpl-2.0
-1,040,680,234,618,697,600
36
118
0.615709
false
dewtx29/python_ann
project/num/c++/forword.py
1
1567
from math import cos,sin, factorial import random import matplotlib.pyplot as plt def randominput(n): listA = [] for i in range(0,n): ran = random.random() listB = [i, ran] listA.append( listB) return listA def forward(listinput, x): dataSize = len(listinput) #print ...
gpl-3.0
-3,792,764,029,025,245,700
14.213592
50
0.54499
false
Kilhog/odoo
openerp/cli/__init__.py
185
2008
import logging import sys import os import openerp from openerp import tools from openerp.modules import module _logger = logging.getLogger(__name__) commands = {} class CommandType(type): def __init__(cls, name, bases, attrs): super(CommandType, cls).__init__(name, bases, attrs) name = getattr(...
agpl-3.0
4,385,052,942,743,597,000
27.685714
109
0.6001
false
zerocool240/plugin.video.amerika
servers/sharpfile.py
44
1445
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para sharpfile # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core imp...
gpl-2.0
3,909,946,683,095,571,500
31.818182
91
0.590028
false
snnn/tensorflow
tensorflow/python/ops/distributions/categorical.py
3
12597
# 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
3,392,479,759,605,627,400
35.302594
80
0.649837
false
bryceliu/ansible
lib/ansible/parsing/utils/jsonify.py
203
1451
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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 of the License, or # (at your option) an...
gpl-3.0
-3,559,407,061,008,803,300
31.244444
85
0.701585
false
newerthcom/savagerebirth
libs/python-2.72/Lib/copy.py
253
11519
"""Generic (shallow and deep) copying operations. Interface summary: import copy x = copy.copy(y) # make a shallow copy of y x = copy.deepcopy(y) # make a deep copy of y For module specific errors, copy.Error is raised. The difference between shallow and deep copying is only relev...
gpl-2.0
-1,054,003,147,895,281,800
25.602771
75
0.558121
false
brunolimawd/talk-nodebots-roll-out
node_modules/grunt-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py
388
91069
# Copyright (c) 2013 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. # Notes: # # This is all roughly based on the Makefile system used by the Linux # kernel, but is a non-recursive make -- we put the entire dependency # graph in fr...
mit
-6,898,548,258,972,905,000
40.022072
180
0.629797
false
vinhlh/bite-project
server/handlers/test_cycles.py
17
1174
# Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
9,162,570,769,169,583,000
30.72973
74
0.736797
false
akatsoulas/remo
remo/base/views.py
3
10033
import feedparser import json import logging import requests from django import http from django.db.models import Q from django.conf import settings from django.contrib import messages from django.contrib.auth.models import User from django.core.cache import cache from django.views.decorators.csrf import csrf_exempt f...
bsd-3-clause
320,932,547,237,746,500
36.297398
83
0.631915
false
TathagataChakraborti/resource-conflicts
PLANROB-2015/seq-sat-lama/Python-2.5.2/Lib/test/test_re.py
6
36239
import sys sys.path = ['.'] + sys.path from test.test_support import verbose, run_unittest import re from re import Scanner import sys, os, traceback from weakref import proxy # Misc tests from Tim Peters' re.doc # WARNING: Don't change details in these tests if you don't know # what you're doing. Some of these test...
mit
2,427,663,558,424,314,400
44.355444
85
0.479621
false
zhoulingjun/django
tests/admin_changelist/tests.py
155
40267
from __future__ import unicode_literals import datetime from django.contrib import admin from django.contrib.admin.models import LogEntry from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.templatetags.admin_list import pagination from django.contrib.admin.tests import AdminS...
bsd-3-clause
7,677,081,249,970,092,000
45.497691
151
0.62771
false
adamncasey/servo
components/script/dom/bindings/codegen/parser/WebIDL.py
6
275842
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ A WebIDL parser. """ from ply import lex, yacc import re import os import traceback import math import string from ...
mpl-2.0
-9,152,738,800,427,638,000
38.400371
158
0.561477
false
blackball/an-test6
pyspherematch-only/libkd/setup.py
1
1350
from distutils.core import setup, Extension import numpy import os.path numpy_inc = (os.path.dirname(numpy.__file__) + '/core/include/numpy') c_module = Extension('spherematch_c', sources = ['pyspherematch.c'], include_dirs = [ numpy_inc, ...
gpl-2.0
-7,994,802,313,039,538,000
45.551724
134
0.49037
false
alexsavio/scikit-learn
sklearn/learning_curve.py
7
15161
"""Utilities to evaluate models with respect to a variable """ # Author: Alexander Fabisch <afabisch@informatik.uni-bremen.de> # # License: BSD 3 clause import warnings import numpy as np from .base import is_classifier, clone from .cross_validation import check_cv from .externals.joblib import Parallel, delayed fro...
bsd-3-clause
6,927,321,034,623,746,000
41.949008
79
0.641119
false
tomtor/QGIS
python/processing/__init__.py
45
1256
# -#- coding: utf-8 -#- ########################################################################### # __init__.py # --------------------- # Date : November 2018 # Copyright : (C) 2018 by Nathan Woodrow # Email : woodrow dot nathan at gmail dot com ##############...
gpl-2.0
-3,569,471,068,127,177,000
39.516129
79
0.431529
false
davidnmurray/iris
lib/iris/tests/unit/cube/test_Cube__operators.py
4
5793
# (C) British Crown Copyright 2016, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any later ve...
gpl-3.0
6,204,909,985,384,515,000
34.323171
79
0.624892
false