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 |
|---|---|---|---|---|---|---|---|---|---|---|
guillaume-philippon/aquilon | lib/aquilon/worker/processes.py | 1 | 37384 | # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2011,2012,2013,2014,2015,2016 Contributor
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You ma... | apache-2.0 | -3,919,078,780,565,027,300 | 38.268908 | 93 | 0.56369 | false |
kofkings/RSA_python | RSA.py | 1 | 5017 | import random
from fractions import gcd
def RSA(plainText):
# Generate Key
# p, q is 2 random large prime (512 bit)
p = generateLargePrime(512)
q = generateLargePrime(512)
while p == q:
q = generateLargePrime(512)
n = p * q
totientN = (p - 1) * (q - 1)
# PublicKey = random in (... | gpl-3.0 | -909,668,281,237,158,000 | 31.577922 | 128 | 0.551525 | false |
CuriosoInformatico/HoneyCheck | dhcp_watchmen.py | 1 | 3960 | import logging.config
logging.getLogger('scapy.runtime').setLevel(logging.ERROR)
from threading import Thread
from scapy.all import *
import time
logger = logging.getLogger(name='elchicodepython.honeycheck')
def exec_array( array, **kwargs):
for object, method in array:
method(object, **kwargs) # == ob... | mit | -4,649,280,454,114,588,000 | 29.461538 | 217 | 0.60202 | false |
MotorolaMobilityLLC/external-chromium_org | third_party/gtk+/gtk/compose-parse.py | 149 | 34346 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# compose-parse.py, version 1.3
#
# multifunction script that helps manage the compose sequence table in GTK+ (gtk/gtkimcontextsimple.c)
# the script produces statistics and information about the whole process, run with --help for more.
#
# You may need to switch your pyt... | bsd-3-clause | 6,037,398,277,350,444,000 | 34.408247 | 159 | 0.650236 | false |
byndcivilization/toy-infrastructure | flask-app/venv/lib/python3.6/site-packages/pip/utils/ui.py | 490 | 11597 | from __future__ import absolute_import
from __future__ import division
import itertools
import sys
from signal import signal, SIGINT, default_int_handler
import time
import contextlib
import logging
from pip.compat import WINDOWS
from pip.utils import format_size
from pip.utils.logging import get_indentation
from pip... | gpl-3.0 | 891,597,668,929,074,700 | 32.712209 | 79 | 0.626972 | false |
DavidNorman/tensorflow | tensorflow/python/kernel_tests/proto/proto_op_test_base.py | 22 | 16705 | # =============================================================================
# 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
#... | apache-2.0 | 1,390,804,497,032,073,200 | 36.455157 | 79 | 0.687698 | false |
WPMedia/dd-agent | utils/proxy.py | 8 | 2497 | # (C) Datadog, Inc. 2010-2016
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import logging
import os
from urllib import getproxies
from urlparse import urlparse
log = logging.getLogger(__name__)
def set_no_proxy_settings():
"""
Starting with Agent 5.0.0, there should always be ... | bsd-3-clause | 1,284,470,710,304,016,100 | 33.680556 | 80 | 0.61674 | false |
LinusU/ansible | lib/ansible/cli/vault.py | 52 | 5972 | # (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 | 8,620,554,293,985,795,000 | 37.282051 | 130 | 0.63714 | false |
knuevena/americorps-backend | orgmember.py | 1 | 4018 | from user import User
from db import Base, Session
from sqlalchemy import *
from sqlalchemy.orm import relation, sessionmaker
from datetime import datetime, date
from attendee import Attendee
from werkzeug.security import generate_password_hash, check_password_hash
from flask import json
from sqlalchemy import exc
from... | mit | -7,297,201,248,992,420,000 | 28.985075 | 90 | 0.583126 | false |
linkedin/indextank-service | api/boto/ec2/__init__.py | 10 | 2038 | # Copyright (c) 2006-2008 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... | apache-2.0 | 5,631,090,319,108,407,000 | 38.192308 | 74 | 0.721786 | false |
apagac/cfme_tests | cfme/tests/infrastructure/test_vm_power_control.py | 1 | 27862 | # -*- coding: utf-8 -*-
import random
import time
import pytest
from cfme import test_requirements
from cfme.base.credential import Credential
from cfme.base.login import BaseLoggedInPage
from cfme.infrastructure.provider import InfraProvider
from cfme.infrastructure.provider.rhevm import RHEVMProvider
from cfme.infr... | gpl-2.0 | -5,335,879,599,311,816,000 | 37.643551 | 100 | 0.642524 | false |
NeovaHealth/odoo | addons/stock_account/wizard/stock_return_picking.py | 342 | 2715 | # -*- 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 | 3,767,616,101,702,959,000 | 44.25 | 140 | 0.610313 | false |
aperigault/ansible | lib/ansible/modules/storage/netapp/na_ontap_cluster.py | 26 | 10668 | #!/usr/bin/python
# (c) 2017, NetApp, 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',
'status': ['preview'],
... | gpl-3.0 | -3,072,040,109,049,848,000 | 36.170732 | 107 | 0.585677 | false |
linked67/p2pool-lire | wstools/TimeoutSocket.py | 293 | 5293 | """Based on code from timeout_socket.py, with some tweaks for compatibility.
These tweaks should really be rolled back into timeout_socket, but it's
not totally clear who is maintaining it at this point. In the meantime,
we'll use a different module name for our tweaked version to avoid any
confusion.
T... | gpl-3.0 | -547,586,595,110,253,060 | 28.569832 | 76 | 0.481579 | false |
sugartom/tensorflow-alien | tensorflow/contrib/bayesflow/__init__.py | 57 | 1871 | # 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 | 1,181,532,653,937,965,600 | 44.634146 | 82 | 0.737573 | false |
NEricN/RobotCSimulator | Python/App/Lib/site-packages/pip/backwardcompat/__init__.py | 394 | 3756 | """Stuff that differs in different Python versions and platform
distributions."""
import os
import imp
import sys
import site
__all__ = ['WindowsError']
uses_pycache = hasattr(imp, 'cache_from_source')
class NeverUsedException(Exception):
"""this exception should never be raised"""
try:
WindowsError = Wind... | apache-2.0 | -3,374,340,698,131,972,000 | 26.217391 | 86 | 0.657881 | false |
localu/metagoofil | hachoir_parser/container/swf.py | 84 | 16477 | """
SWF (Macromedia/Adobe Flash) file parser.
Documentation:
- Alexis' SWF Reference:
http://www.m2osw.com/swf_alexref.html
- http://www.half-serious.com/swf/format/
- http://www.anotherbigidea.com/javaswf/
- http://www.gnu.org/software/gnash/
Author: Victor Stinner
Creation date: 29 october 2006
"""
from ha... | gpl-2.0 | 4,026,999,455,771,335,700 | 37.053118 | 109 | 0.588032 | false |
chen0031/Dato-Core | src/unity/python/doc/scripts/doxypy-0.4.2.py | 15 | 14005 | #!/usr/bin/env python
__applicationName__ = "doxypy"
__blurb__ = """
doxypy is an input filter for Doxygen. It preprocesses python
files so that docstrings of classes and functions are reformatted
into Doxygen-conform documentation blocks.
"""
__doc__ = __blurb__ + \
"""
In order to make Doxygen preprocess files thro... | agpl-3.0 | -4,336,987,864,930,660,400 | 32.828502 | 114 | 0.696251 | false |
rplevka/selenium | py/test/selenium/webdriver/common/rendered_webelement_tests.py | 63 | 3233 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | -8,606,255,659,226,520,000 | 38.91358 | 100 | 0.700588 | false |
slohse/ansible | lib/ansible/modules/system/alternatives.py | 29 | 5286 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Gabe Mulley <gabe.mulley@gmail.com>
# (c) 2015, David Wittman <dwittman@gmail.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
... | gpl-3.0 | -5,584,142,614,335,149,000 | 31.036364 | 125 | 0.602913 | false |
mapr/hue | desktop/core/ext-py/Django-1.6.10/tests/model_fields/test_imagefield.py | 54 | 16032 | from __future__ import absolute_import
import os
import shutil
from django.core.exceptions import ImproperlyConfigured
from django.core.files import File
from django.core.files.images import ImageFile
from django.test import TestCase
from django.utils._os import upath
from django.utils.unittest import skipIf
try:
... | apache-2.0 | 5,925,871,952,473,017,000 | 35.60274 | 80 | 0.637226 | false |
rfinn/LCS | paper1code/LCSreadmaster.v2.py | 1 | 46244 | #!/usr/bin/env python
import pyfits
from LCScommon import *
from pylab import *
import os
import mystuff as my
#these correpond to area w/more uniform covereage
MKW824um=array([220.16377,3.4883817,1.3137727,2.5,12.7456],'f')
MKW1124um=array([202.36305,11.746882,1.2454248,2.9,206.4],'f')
NGC24um=array([244.30994,34.933... | gpl-3.0 | 1,974,420,544,544,963,800 | 37.925926 | 202 | 0.580919 | false |
Endika/edx-platform | common/lib/xmodule/xmodule/modulestore/tests/test_mixed_modulestore.py | 7 | 136521 | """
Unit tests for the Mixed Modulestore, with DDT for the various stores (Split, Draft, XML)
"""
from collections import namedtuple
import datetime
import logging
import ddt
import itertools
import mimetypes
from uuid import uuid4
from contextlib import contextmanager
from mock import patch, Mock, call
# Mixed module... | agpl-3.0 | 8,417,558,621,369,573,000 | 44.812416 | 159 | 0.635243 | false |
openshift/openshift-tools | scripts/monitoring/cron-send-os-skydns-checks.py | 12 | 6971 | #!/usr/bin/env python
# vim: expandtab:tabstop=4:shiftwidth=4
'''
Send Openshift Master SkyDNS metric checks to Zagg
Openshift uses SkyDNS to locate services inside of the cluster.
Openshift implements SkyDNS a bit different. Normally SkyDNS uses etcd as a backend
for the DNS data to be stored. Openshift us... | apache-2.0 | -2,316,351,571,682,302,500 | 37.092896 | 116 | 0.613255 | false |
CVL-GitHub/karaage | karaage/legacy/institutes/south_migrations/0002_move_instutute_models_to_institutes_app.py | 3 | 8280 | # -*- coding: utf-8 -*-
from south.v2 import SchemaMigration
class Migration(SchemaMigration):
depends_on = (
("people", "0012_move_instutute_models_to_institutes_app"),
)
def forwards(self, orm):
# moved logic to karaage.people.migrations.0012_move_instutute_models_to_institutes_app
... | gpl-3.0 | 7,906,931,934,150,283,000 | 79.38835 | 250 | 0.550966 | false |
morphis/home-assistant | homeassistant/components/light/yeelight.py | 4 | 10411 | """
Support for Xiaomi Yeelight Wifi color bulb.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.yeelight/
"""
import logging
import colorsys
import voluptuous as vol
from homeassistant.util.color import (
color_temperature_mired_to_kelvin as ... | apache-2.0 | -7,655,247,535,868,886,000 | 32.261981 | 79 | 0.584862 | false |
yohanko88/gem5-DC | src/python/m5/params.py | 7 | 69061 | # Copyright (c) 2012-2014 ARM Limited
# 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 implementation of the functiona... | bsd-3-clause | -1,208,349,046,389,557,500 | 31.40779 | 84 | 0.574666 | false |
h8rift/android_kernel_htc_msm8960-evita-1_85 | tools/perf/scripts/python/check-perf-trace.py | 11214 | 2503 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... | gpl-2.0 | 4,573,170,353,502,690,000 | 29.52439 | 78 | 0.642829 | false |
mikebrevard/UnixAdministration | vagrant/etc/data/genData/venv/lib/python3.4/site-packages/setuptools/depends.py | 462 | 6370 | import sys
import imp
import marshal
from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN
from distutils.version import StrictVersion
from setuptools import compat
__all__ = [
'Require', 'find_module', 'get_module_constant', 'extract_constant'
]
class Require:
"""A prerequisite to building or inst... | mit | 1,575,771,434,378,027,500 | 28.627907 | 78 | 0.599215 | false |
arkmaxim/grpc | src/python/grpcio/grpc/framework/foundation/logging_pool.py | 21 | 3030 | # 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 | 8,552,951,231,461,415,000 | 35.95122 | 79 | 0.738614 | false |
pingpan2013/sensor-box-project | sensor_project/sensor_box.py | 1 | 6325 | #!/usr/bin/env python
#
# File Name: sensor_box.py
#
# Desc:
# Control the sensor to get humidity and moisture infomation
# If internet is down, store the result into local files
# else send the data to the database
#
import os
import time
import datetime
import logging
import subprocess
import RPi.GPIO as GPIO
impo... | gpl-3.0 | 153,513,993,433,730,660 | 38.285714 | 83 | 0.543083 | false |
ict-felix/stack | modules/resource/manager/transit-network/src/proxy_interface.py | 2 | 1172 | # Copyright 2014-2015 National Institute of Advanced Industrial Science and Technology
#
# 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
#
# U... | apache-2.0 | 3,965,946,899,514,179,600 | 26.904762 | 86 | 0.734642 | false |
apophys/freeipa | ipaclient/remote_plugins/2_156/netgroup.py | 16 | 24373 | #
# Copyright (C) 2016 FreeIPA Contributors see COPYING for license
#
# pylint: disable=unused-import
import six
from . import Command, Method, Object
from ipalib import api, parameters, output
from ipalib.parameters import DefaultFrom
from ipalib.plugable import Registry
from ipalib.text import _
from ipapython.dn ... | gpl-3.0 | 3,399,233,281,070,995,500 | 27.176879 | 162 | 0.473352 | false |
pjbull/mkdocs | mkdocs/commands/new.py | 30 | 1433 | # coding: utf-8
from __future__ import unicode_literals
import io
import logging
import os
config_text = 'site_name: My Docs\n'
index_text = """# Welcome to MkDocs
For full documentation visit [mkdocs.org](http://mkdocs.org).
## Commands
* `mkdocs new [dir-name]` - Create a new project.
* `mkdocs serve` - Start th... | bsd-2-clause | 2,044,111,099,377,121,500 | 25.537037 | 66 | 0.649686 | false |
jameskdev/lge-kernel-batman_skt | tools/perf/python/twatch.py | 3213 | 1338 | #! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
# Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... | gpl-2.0 | 606,358,078,985,005,200 | 31.634146 | 93 | 0.669656 | false |
damonkohler/sl4a | python/xmpppy/doc/examples/xtalk.py | 87 | 2951 | #!/usr/bin/python
# $Id: xtalk.py,v 1.4 2008/08/09 17:00:18 normanr Exp $
import sys,os,xmpp,time,select
class Bot:
def __init__(self,jabber,remotejid):
self.jabber = jabber
self.remotejid = remotejid
def register_handlers(self):
self.jabber.RegisterHandler('message',self.xmpp_message... | apache-2.0 | 2,296,433,828,746,531,800 | 34.554217 | 199 | 0.582853 | false |
yesudeep/cmc | app/console/app/pygments/styles/native.py | 23 | 1917 | # -*- coding: utf-8 -*-
"""
pygments.styles.native
~~~~~~~~~~~~~~~~~~~~~~
pygments version of my "native" vim theme.
:copyright: 2006-2007 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, String... | mit | 9,144,831,126,393,611,000 | 28.492308 | 67 | 0.51591 | false |
zzicewind/linux | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 1891 | 3300 | # Core.py - Python extension for perf script, core functions
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
from collections import defaultdict
def aut... | gpl-2.0 | 4,907,189,462,197,784,000 | 26.04918 | 86 | 0.598182 | false |
mindpin/mindpin_oppia | core/controllers/reader.py | 1 | 11151 | # Copyright 2014 The Oppia 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 applicable ... | apache-2.0 | 2,130,386,595,372,999,000 | 38.402827 | 80 | 0.62676 | false |
madan96/sympy | sympy/printing/rcode.py | 7 | 14467 | """
R code printer
The RCodePrinter converts single sympy expressions into single R expressions,
using the functions defined in math.h where possible.
"""
from __future__ import print_function, division
from sympy.core import S
from sympy.core.compatibility import string_types, range
from sympy.codegen.ast import... | bsd-3-clause | -3,705,948,427,523,972,600 | 34.114078 | 111 | 0.564941 | false |
jss-emr/openerp-7-src | openerp/addons/l10n_br/__init__.py | 430 | 1403 | # -*- encoding: utf-8 -*-
###############################################################################
# #
# Copyright (C) 2009 Renato Lima - Akretion #
# ... | agpl-3.0 | 2,489,140,001,022,693,400 | 65.809524 | 79 | 0.391304 | false |
siconos/siconos-deb | wrap/doxy2swig.py | 1 | 17516 | #!/usr/bin/env python
"""Doxygen XML to SWIG docstring converter.
Usage:
doxy2swig.py [options] input.xml output.i
Converts Doxygen generated XML files into a file containing docstrings
that can be used by SWIG-1.3.x. Note that you need to get SWIG
version > 1.3.23 or use Robin Dunn's docstring patch to be able t... | apache-2.0 | 5,929,007,981,534,552,000 | 32.427481 | 94 | 0.524606 | false |
TechInvestLab/dot15926 | editor_qt/iso15926/patterns/patterns_actions.py | 1 | 15984 | """
.15925 Editor
Copyright 2014 TechInvestLab.ru dot15926@gmail.com
.15925 Editor 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.0 of the License, or (at your option) any later version.... | lgpl-3.0 | 7,084,697,861,847,309,000 | 33.226981 | 165 | 0.581519 | false |
vprime/puuuu | env/lib/python2.7/site-packages/django/utils/translation/trans_real.py | 35 | 25577 | """Translation helper functions."""
from __future__ import unicode_literals
import locale
import os
import re
import sys
import gettext as gettext_module
from threading import local
import warnings
from django.utils.importlib import import_module
from django.utils.datastructures import SortedDict
from django.utils.en... | mit | 2,143,377,446,980,991,000 | 36.835799 | 143 | 0.57407 | false |
towerjoo/mindsbook | django/contrib/localflavor/es/forms.py | 309 | 7537 | # -*- coding: utf-8 -*-
"""
Spanish-specific Form helpers
"""
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import RegexField, Select
from django.utils.translation import ugettext_lazy as _
import re
class ESPostalCodeField(RegexField):
"""
A... | bsd-3-clause | -8,684,023,893,457,458,000 | 39.740541 | 160 | 0.611782 | false |
GarciaPL/TrafficCity | Streets4MPI/utils.py | 2 | 1073 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# utils.py
# Copyright 2012 Joachim Nitschke
#
# This file is part of Streets4MPI.
#
# Streets4MPI 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... | gpl-2.0 | -8,991,258,293,936,046,000 | 29.657143 | 70 | 0.706431 | false |
google-research/privateFM | privateFM/FM_simulate.py | 1 | 4753 | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 3,542,566,447,659,207,000 | 32.95 | 106 | 0.524721 | false |
GoogleCloudPlatform/training-data-analyst | courses/machine_learning/deepdive2/structured/labs/serving/application/lib/click/_compat.py | 19 | 23399 | import re
import io
import os
import sys
import codecs
from weakref import WeakKeyDictionary
PY2 = sys.version_info[0] == 2
CYGWIN = sys.platform.startswith('cygwin')
# Determine local App Engine environment, per Google's own suggestion
APP_ENGINE = ('APPENGINE_RUNTIME' in os.environ and
'Development/' ... | apache-2.0 | -1,365,738,049,940,437,000 | 32.284495 | 80 | 0.587632 | false |
CCI-MOC/nova | nova/config.py | 14 | 2488 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2012 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the ... | apache-2.0 | 7,662,810,754,682,524,000 | 40.466667 | 78 | 0.649116 | false |
fx19880617/helix | helix-core/src/main/scripts/integration-test/script/pexpect.py | 11 | 76727 | #
# 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... | apache-2.0 | 2,595,335,226,405,041,700 | 40.162554 | 205 | 0.604142 | false |
google/llvm-propeller | lldb/test/API/lang/objc/objc-struct-argument/TestObjCStructArgument.py | 3 | 2329 | """Test passing structs to Objective-C methods."""
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class TestObjCStructArgument(TestBase):
mydir = TestBase.compute_mydir(__file__)
def setUp(self):
# Call super's setUp()... | apache-2.0 | -3,360,934,878,902,984,700 | 34.287879 | 175 | 0.629025 | false |
sharifulgeo/networkx | networkx/algorithms/components/tests/test_semiconnected.py | 64 | 1901 | from itertools import chain
import networkx as nx
from nose.tools import *
class TestIsSemiconnected(object):
def test_undirected(self):
assert_raises(nx.NetworkXNotImplemented, nx.is_semiconnected,
nx.Graph())
assert_raises(nx.NetworkXNotImplemented, nx.is_semiconnected,
... | bsd-3-clause | -6,045,707,382,820,668,000 | 34.867925 | 77 | 0.556549 | false |
oliviertilmans/ipmininet | ipmininet/host/config/named.py | 1 | 15108 | """Base classes to configure a Named daemon"""
import os
from typing import List, Union, Sequence, Optional
from ipaddress import IPv4Address, IPv6Address, ip_address
from mininet.log import lg
from ipmininet.overlay import Overlay
from ipmininet.utils import realIntfList, find_node, has_cmd
from ipmininet.router.con... | gpl-2.0 | -5,009,223,093,324,447,000 | 38.34375 | 80 | 0.551893 | false |
a113n/bcbio-nextgen | bcbio/distributed/multi.py | 4 | 3761 | """Run tasks in parallel on a single machine using multiple cores.
"""
import functools
try:
import joblib
except ImportError:
joblib = False
from bcbio.distributed import resources
from bcbio.log import logger, setup_local_logging
from bcbio.pipeline import config_utils
from bcbio.provenance import diagnosti... | mit | 44,629,325,778,426,500 | 41.258427 | 134 | 0.608881 | false |
quizlet/grpc | tools/run_tests/python_utils/upload_test_results.py | 7 | 4239 | #!/usr/bin/env python
# Copyright 2017 gRPC authors.
#
# 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 | 5,109,806,664,730,658,000 | 38.616822 | 113 | 0.674687 | false |
tcheehow/MissionPlanner | Lib/email/_parseaddr.py | 53 | 16241 | # Copyright (C) 2002-2007 Python Software Foundation
# Contact: email-sig@python.org
"""Email address parsing code.
Lifted directly from rfc822.py. This should eventually be rewritten.
"""
__all__ = [
'mktime_tz',
'parsedate',
'parsedate_tz',
'quote',
]
import time
SPACE = ' '... | gpl-3.0 | -7,104,405,601,707,556,000 | 30.678068 | 78 | 0.512961 | false |
Sjors/bitcoin | test/functional/wallet_backup.py | 22 | 8943 | #!/usr/bin/env python3
# Copyright (c) 2014-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet backup features.
Test case is:
4 nodes. 1 2 and 3 send transactions between each other... | mit | -367,623,148,411,312,060 | 37.882609 | 187 | 0.634686 | false |
santisiri/popego | envs/ALPHA-POPEGO/lib/python2.5/site-packages/twisted/test/test_error.py | 20 | 4619 |
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.trial import unittest
from twisted.internet import error
import socket
class TestStringification(unittest.TestCase):
"""Test that the exceptions have useful stringifications.
"""
listOfTests = [
#(out... | bsd-3-clause | -828,514,530,527,048,600 | 28.420382 | 97 | 0.579996 | false |
amyvmiwei/neon | neon/util/param.py | 4 | 1219 | # ----------------------------------------------------------------------------
# Copyright 2014 Nervana 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
#
# http://www.apache.o... | apache-2.0 | 4,460,993,313,797,256,000 | 38.322581 | 78 | 0.606235 | false |
tysonclugg/django | tests/template_loader/tests.py | 153 | 7435 | from django.template import TemplateDoesNotExist
from django.template.loader import (
get_template, render_to_string, select_template,
)
from django.test import SimpleTestCase, override_settings
from django.test.client import RequestFactory
@override_settings(TEMPLATES=[{
'BACKEND': 'django.template.backends.... | bsd-3-clause | -6,058,954,020,228,486,000 | 43.255952 | 83 | 0.628245 | false |
wearpants/osf.io | website/addons/box/tests/test_serializer.py | 11 | 1096 | # -*- coding: utf-8 -*-
"""Serializer tests for the Box addon."""
import mock
from nose.tools import * # noqa (PEP8 asserts)
from website.addons.base.testing.serializers import StorageAddonSerializerTestSuiteMixin
from website.addons.box.tests.utils import MockBox
from website.addons.box.tests.factories import BoxAcc... | apache-2.0 | -2,965,500,493,141,645,300 | 28.621622 | 88 | 0.708029 | false |
TorpedoXL/namebench | libnamebench/nameserver_list.py | 173 | 24485 | # Copyright 2009 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | 7,145,423,561,848,634,000 | 36.211246 | 140 | 0.669349 | false |
yesbox/ansible | test/units/module_utils/basic/test_known_hosts.py | 74 | 2365 | # -*- coding: utf-8 -*-
# (c) 2015, Michael Scherer <mscherer@redhat.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 ... | gpl-3.0 | 3,376,311,801,116,542,000 | 42 | 83 | 0.621987 | false |
NYU-DevOps-Fall2017-PromotionsTeam/promotions | features/steps/promotion_steps.py | 1 | 7975 | from os import getenv
import requests
from behave import *
import json
from app import server
from verify import expect
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions
WAIT_SECONDS = 30
BASE_URL = getenv('BAS... | apache-2.0 | -5,777,792,518,639,897,000 | 33.829694 | 102 | 0.614169 | false |
wuyuewen/libcloud | libcloud/test/common/test_gandi.py | 66 | 1293 | # 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 | 2,610,235,585,873,094,000 | 42.1 | 74 | 0.720031 | false |
erikge/watch_gyp | test/generator-output/gyptest-rules.py | 19 | 1839 | #!/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 --generator-output= behavior when using rules.
"""
import TestGyp
# Android doesn't support --generator-output.
test = TestGy... | bsd-3-clause | -7,982,053,386,074,177,000 | 29.65 | 72 | 0.700924 | false |
googleapis/python-compute | google/cloud/compute_v1/services/region_notification_endpoints/transports/__init__.py | 1 | 1104 | # -*- 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 or... | apache-2.0 | 3,745,248,837,120,232,400 | 33.5 | 74 | 0.774457 | false |
Mappy/PyLR | pylr/parser.py | 1 | 15704 | # -*- coding: utf-8 -*-
''' Location parser
.. moduleauthor:: David Marteau <david.marteau@mappy.com>
'''
from collections import namedtuple
from bitstring import BitStream
from .utils import lazyproperty
from .constants import (LATEST_BINARY_VERSION,
BINARY_VERSION_2,
... | apache-2.0 | -743,408,833,915,572,900 | 30.035573 | 122 | 0.59972 | false |
ArchiveLabs/dweb_gateway | python/Multihash.py | 1 | 5374 | """
A set of classes to hold different kinds of hashes etc and convert between them,
Much of this was adapted from https://github.com/tehmaze/python-multihash,
which seems to have evolved from the pip3 multihash, which is seriously broken.
"""
import hashlib
import struct
import sha3
import pyblake2
import base58
imp... | agpl-3.0 | -774,083,055,685,155,600 | 35.564626 | 214 | 0.610346 | false |
Fat-Zer/FreeCAD_sf_master | src/Mod/Path/PathScripts/PathArray.py | 4 | 11223 | # -*- coding: utf-8 -*-
# ***************************************************************************
# * Copyright (c) 2015 Yorik van Havre <yorik@uncreated.net> *
# * *
# * This program is free software; you can redistribute it a... | lgpl-2.1 | -3,158,016,290,778,695,700 | 38.657244 | 137 | 0.505123 | false |
repotvsupertuga/tvsupertuga.repository | script.module.streamlink.base/resources/lib/streamlink/plugins/atresplayer.py | 4 | 2806 | from __future__ import print_function
import logging
import re
from functools import partial
from streamlink.plugin import Plugin
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream, DASHStream
from streamlink.utils import parse_json, update_scheme, search_dict
log = logging.getLogger(... | gpl-2.0 | 1,943,419,945,016,499,700 | 35.441558 | 102 | 0.560941 | false |
CERNDocumentServer/invenio | modules/webjournal/lib/webjournal_unit_tests.py | 3 | 2784 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2009, 2010, 2011 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your optio... | gpl-2.0 | -1,126,148,306,465,278,200 | 31 | 74 | 0.665948 | false |
CuriousLearner/standup | src/updates/views.py | 1 | 1310 | from django.shortcuts import render, get_object_or_404
from django.views.generic import DetailView
from authen.models import User
from fraternity.models import Team, Project
from .models import Post, Hashtag
class GetUserPosts(DetailView):
model = Post
template_name = 'posts.html'
context_object_name = '... | gpl-3.0 | -1,561,476,055,481,549,600 | 27.478261 | 76 | 0.693893 | false |
zasdfgbnm/tensorflow | tensorflow/contrib/text/python/ops/skip_gram_ops.py | 76 | 21608 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -1,664,382,466,397,084,200 | 47.124722 | 80 | 0.657997 | false |
epfl-idevelop/jahia2wp | src/parser/sitemap_node.py | 1 | 1306 | from anytree import Node, RenderTree
class SitemapNode(Node):
"""
A SitemapNode represents a node of the sitemap. The root node
(the homepage) is available as a property of the Site class,
e.g. site.sitemaps["en"] for the English sitemap. This class
is an extension of Node, from the anytree librar... | mit | -6,438,769,800,397,549,000 | 30.095238 | 83 | 0.630168 | false |
Vimos/scikit-learn | sklearn/preprocessing/_function_transformer.py | 41 | 3475 | from ..base import BaseEstimator, TransformerMixin
from ..utils import check_array
def _identity(X):
"""The identity function.
"""
return X
class FunctionTransformer(BaseEstimator, TransformerMixin):
"""Constructs a transformer from an arbitrary callable.
A FunctionTransformer forwards its X (a... | bsd-3-clause | 3,600,143,690,742,221,300 | 35.968085 | 77 | 0.664173 | false |
lfcnassif/MultiContentViewer | release/modules/ext/libreoffice/program/python-core-3.3.0/lib/email/_policybase.py | 94 | 14327 | """Policy framework for the email package.
Allows fine grained feature control of how the package parses and emits data.
"""
import abc
from email import header
from email import charset as _charset
from email.utils import _has_surrogates
__all__ = [
'Policy',
'Compat32',
'compat32',
]
class _Polic... | lgpl-3.0 | 405,503,029,564,227,460 | 39.019553 | 80 | 0.62281 | false |
MSFTOSSMgmt/WPSDSCLinux | Providers/Scripts/3.x/Scripts/nxFileInventory.py | 2 | 14839 | #!/usr/bin/env python
# ====================================
# Copyright (c) Microsoft Corporation.
# All rights reserved.
# See license.txt for license information.
# ====================================
from __future__ import print_function
from __future__ import with_statement
from contextlib import contextmanag... | mit | 8,424,978,946,264,072,000 | 36.28392 | 162 | 0.60004 | false |
gtaylor/python-colormath | examples/delta_e_matrix.py | 1 | 1329 | # -*- coding: utf-8 -*-
"""
For a massive matrix of colors and color labels you can download
the follow two files
# http://lyst-classifiers.s3.amazonaws.com/color/lab-colors.pk
# http://lyst-classifiers.s3.amazonaws.com/color/lab-matrix.pk
lab-colors is a cPickled list of color names and lab-matrix is a
cPickled (n,3... | bsd-3-clause | -516,180,357,757,013,440 | 32.225 | 77 | 0.725357 | false |
tima/ansible | lib/ansible/modules/notification/catapult.py | 49 | 4362 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Jonathan Mainguy <jon@soh.re>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
# basis of code taken from the ansible twillio and nexmo modules
from __future__ import absolute_import, division, print_function
__metacla... | gpl-3.0 | -7,566,080,823,899,159,000 | 26.607595 | 124 | 0.626547 | false |
kingvuplus/ts-gui-3 | lib/python/Components/Harddisk.py | 3 | 28983 | import os
import time
from Tools.CList import CList
from Tools.HardwareInfo import HardwareInfo
from SystemInfo import SystemInfo
from Components.Console import Console
import Task
def readFile(filename):
file = open(filename)
data = file.read().strip()
file.close()
return data
def getProcMounts():
try:
mounts... | gpl-2.0 | -7,066,420,760,872,267,000 | 28.726154 | 155 | 0.660042 | false |
bluesea/zulip | tools/deprecated/finbot/monthdelta.py | 115 | 6015 | """monthdelta
Date calculation with months: MonthDelta class and monthmod() function.
"""
__all__ = ['MonthDelta', 'monthmod']
from datetime import date, timedelta
class MonthDelta:
"""Number of months offset from a date or datetime.
MonthDeltas allow date calculation without regard to the different length... | apache-2.0 | -8,215,349,254,980,246,000 | 38.834437 | 78 | 0.594846 | false |
Niknakflak/-tg-station | tools/midi2piano/pyperclip/windows.py | 110 | 5405 | """
This module implements clipboard handling on Windows using ctypes.
"""
import time
import contextlib
import ctypes
from ctypes import c_size_t, sizeof, c_wchar_p, get_errno, c_wchar
from .exceptions import PyperclipWindowsException
class CheckedCall(object):
def __init__(self, f):
super(CheckedCall, s... | agpl-3.0 | -7,541,857,786,765,652,000 | 34.794702 | 102 | 0.619426 | false |
huguesv/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/cryptography/hazmat/backends/openssl/encode_asn1.py | 3 | 23428 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import calendar
import ipaddress
import six
from cryptography import ut... | apache-2.0 | -2,780,456,879,164,116,000 | 34.659056 | 79 | 0.648071 | false |
mafiya69/sympy | sympy/physics/quantum/matrixutils.py | 87 | 10287 | """Utilities to deal with sympy.Matrix, numpy and scipy.sparse."""
from __future__ import print_function, division
from sympy import Matrix, I, Expr, Integer
from sympy.core.compatibility import range
from sympy.matrices import eye, zeros
from sympy.external import import_module
__all__ = [
'numpy_ndarray',
... | bsd-3-clause | 4,157,450,685,658,916,400 | 28.731214 | 81 | 0.61427 | false |
moondrop-entertainment/django-nonrel-drawp | tests/regressiontests/test_utils/tests.py | 49 | 4833 | import sys
from django.test import TestCase, skipUnlessDBFeature, skipIfDBFeature
from models import Person
if sys.version_info >= (2, 5):
from tests_25 import AssertNumQueriesContextManagerTests
class SkippingTestCase(TestCase):
def test_skip_unless_db_feature(self):
"A test that might be skipped ... | bsd-3-clause | -6,226,504,442,065,110,000 | 31.006623 | 119 | 0.614111 | false |
esakellari/my_root_for_test | interpreter/llvm/src/utils/lldbDataFormatters.py | 20 | 3286 | """
LLDB Formatters for LLVM data types.
Load into LLDB with 'command script import /path/to/lldbDataFormatters.py'
"""
def __lldb_init_module(debugger, internal_dict):
debugger.HandleCommand('type category define -e llvm -l c++')
debugger.HandleCommand('type synthetic add -w llvm '
... | lgpl-2.1 | -4,810,880,401,290,550,000 | 36.340909 | 77 | 0.585514 | false |
NukeAOSP/external_chromium | chrome/common/extensions/docs/build/build.py | 65 | 8905 | #!/usr/bin/python
# Copyright (c) 2009 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.
"""Docbuilder for extension docs."""
import os
import os.path
import shutil
import sys
import time
import urllib
from subprocess impo... | bsd-3-clause | 1,454,790,565,341,433,300 | 34.907258 | 79 | 0.662774 | false |
yarothetimble/todo | todo/settings.py | 1 | 3215 | """
Django settings for todo project.
Generated by 'django-admin startproject' using Django 1.10.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
#... | mit | -4,724,965,881,914,911,000 | 24.72 | 91 | 0.676516 | false |
walchko/pygecko | retired/old_version/original/bin/mjpeg_server.py | 1 | 4736 | #!/usr/bin/env python
import cv2
from BaseHTTPServer import BaseHTTPRequestHandler
from BaseHTTPServer import HTTPServer
import time
import argparse
from opencvutils import Camera
import socket as Socket
# import errno
# threaded version
# http://stackoverflow.com/questions/12650238/processing-simultaneous-asynchrono... | mit | -4,184,404,571,273,389,600 | 27.878049 | 156 | 0.660895 | false |
fjbatresv/odoo | addons/membership/membership.py | 21 | 27956 | # -*- 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 | 9,196,029,208,628,437,000 | 49.089606 | 207 | 0.546297 | false |
XiaosongWei/crosswalk-test-suite | apptools/apptools-android-tests/apptools/create_basic.py | 3 | 2943 | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... | bsd-3-clause | 3,077,379,759,572,491,000 | 38.77027 | 80 | 0.66055 | false |
williamthegrey/swift | test/unit/common/middleware/test_xprofile.py | 5 | 23334 | # Copyright (c) 2010-2012 OpenStack, 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 or agreed to ... | apache-2.0 | -5,307,352,246,750,098,000 | 43.959538 | 79 | 0.566984 | false |
ttanner/kryptomime | tests/test_smime.py | 1 | 3239 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# S/MIME unit tests
#
# This file is part of kryptomime, a Python module for email kryptography.
# Copyright © 2013,2014 Thomas Tanner <tanner@gmx.net>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public ... | lgpl-3.0 | 1,652,476,232,261,151,500 | 37.547619 | 100 | 0.722977 | false |
Pythonity/icon-font-to-png | icon_font_to_png/icon_font.py | 1 | 6185 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import os
import re
from collections import OrderedDict
import tinycss
from PIL import Image, ImageFont, ImageDraw
from six import unichr
class IconFont(object):
"""Base class that represents web icon font"""
def __init__(self,... | mit | -5,177,220,675,095,560,000 | 34.342857 | 79 | 0.546645 | false |
h3biomed/ansible | lib/ansible/modules/storage/netapp/na_ontap_lun_copy.py | 28 | 5680 | #!/usr/bin/python
# (c) 2019, NetApp, 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',
'status': ['preview'],
... | gpl-3.0 | 3,392,423,968,817,683,000 | 30.038251 | 130 | 0.619718 | false |
aabbox/kbengine | kbe/res/scripts/common/Lib/test/test__osx_support.py | 72 | 11776 | """
Test suite for _osx_support: shared OS X support functions.
"""
import os
import platform
import shutil
import stat
import sys
import unittest
import test.support
import _osx_support
@unittest.skipUnless(sys.platform.startswith("darwin"), "requires OS X")
class Test_OSXSupport(unittest.TestCase):
def setUp... | lgpl-3.0 | 230,854,177,398,231,500 | 40.907473 | 81 | 0.538978 | false |
tokenly/counterparty-lib | counterpartylib/lib/messages/execute.py | 3 | 7034 | #! /usr/bin/python3
"""Execute arbitrary data as a smart contract."""
import struct
import binascii
import logging
logger = logging.getLogger(__name__)
from counterpartylib.lib import (util, config, exceptions)
from .scriptlib import (utils, blocks, processblock)
FORMAT = '>20sQQQ'
LENGTH = 44
ID = 101
def initial... | mit | -5,049,471,412,072,452,000 | 34.846939 | 182 | 0.557928 | false |
whereismyjetpack/ansible | lib/ansible/modules/cloud/ovirt/ovirt_snapshots_facts.py | 13 | 4318 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (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
#... | gpl-3.0 | 1,357,778,639,397,574,700 | 30.75 | 138 | 0.6327 | false |
JPFrancoia/scikit-learn | sklearn/neural_network/tests/test_rbm.py | 225 | 6278 | import sys
import re
import numpy as np
from scipy.sparse import csc_matrix, csr_matrix, lil_matrix
from sklearn.utils.testing import (assert_almost_equal, assert_array_equal,
assert_true)
from sklearn.datasets import load_digits
from sklearn.externals.six.moves import cStringIO as ... | bsd-3-clause | -2,102,907,588,695,011,000 | 31.360825 | 79 | 0.607996 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.