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 |
|---|---|---|---|---|---|---|---|---|---|---|
tuxos/Django-facebook | django_facebook/model_managers.py | 24 | 4038 | from django.db.models.query_utils import Q
from django.core.cache import cache
from django.db import models
import operator
import random
from datetime import timedelta
from django_facebook.utils import compatible_datetime as datetime
from django.contrib.contenttypes.models import ContentType
import logging
from open_f... | bsd-3-clause | -3,469,644,271,317,094,000 | 35.378378 | 77 | 0.618871 | false |
3dfxsoftware/cbss-addons | mrp_account_variation/mrp_account_variation_price.py | 1 | 6744 | # -*- encoding: utf-8 -*-
###########################################################################
# Module Writen to OpenERP, Open Source Management Solution
#
# Copyright (c) 2012 Vauxoo - http://www.vauxoo.com
# All Rights Reserved.
# info@vauxoo.com
###################################################... | gpl-2.0 | -8,633,944,059,571,746,000 | 53.829268 | 144 | 0.495996 | false |
Beauhurst/django | django/dispatch/dispatcher.py | 42 | 10848 | import threading
import weakref
from django.utils.inspect import func_accepts_kwargs
def _make_id(target):
if hasattr(target, '__func__'):
return (id(target.__self__), id(target.__func__))
return id(target)
NONE_ID = _make_id(None)
# A marker for caching
NO_RECEIVERS = object()
class Signal:
... | bsd-3-clause | -437,877,725,116,368,500 | 35.525253 | 94 | 0.578355 | false |
ylatuya/Flumotion | flumotion/component/bouncers/htpasswdcrypt.py | 1 | 3023 | # -*- Mode: Python; test-case-name: flumotion.test.test_htpasswdcrypt -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# Flumotion - a streaming media server
# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com).
# All rights reserved.
# This file may be distributed and/or modified under the terms of
# the GNU General P... | gpl-2.0 | 8,956,194,976,419,535,000 | 34.988095 | 75 | 0.668872 | false |
alexmogavero/home-assistant | tests/components/cover/test_rfxtrx.py | 25 | 9031 | """The tests for the Rfxtrx cover platform."""
import unittest
import pytest
from homeassistant.setup import setup_component
from homeassistant.components import rfxtrx as rfxtrx_core
from tests.common import get_test_home_assistant, mock_component
@pytest.mark.skipif("os.environ.get('RFXTRX') != 'RUN'")
class Tes... | apache-2.0 | 3,968,820,133,911,462,400 | 40.237443 | 75 | 0.515779 | false |
funkshelper/woodcore | qa/rpc-tests/bip68-sequence.py | 101 | 18382 | #!/usr/bin/env python3
# Copyright (c) 2014-2016 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 BIP68 implementation
#
from test_framework.test_framework import BitcoinTestFramework
from test... | mit | 6,696,879,635,127,895,000 | 41.948598 | 119 | 0.609999 | false |
adamrvfisher/TechnicalAnalysisLibrary | PriceRelativeRemoteSignalSmartPositionMAOptimizerTwoAsset.py | 1 | 6253 | # -*- coding: utf-8 -*-
"""
Created on Wed Aug 30 19:07:37 2017
@author: AmatVictoriaCuramIII
"""
#Changes are pretty much immaterial, use VXV/VIX
import numpy as np
import random as rand
import pandas as pd
import time as t
from DatabaseGrabber import DatabaseGrabber
from YahooGrabber import YahooGrabbe... | apache-2.0 | 6,798,670,654,914,419,000 | 32.180328 | 122 | 0.613466 | false |
WhireCrow/openwrt-mt7620 | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/test/test_sys_setprofile.py | 123 | 11378 | import gc
import pprint
import sys
import unittest
from test import test_support
class TestGetProfile(unittest.TestCase):
def setUp(self):
sys.setprofile(None)
def tearDown(self):
sys.setprofile(None)
def test_empty(self):
self.assertIsNone(sys.getprofile())
def test_setget(... | gpl-2.0 | 9,222,026,446,636,794,000 | 28.476684 | 78 | 0.413869 | false |
lukeiwanski/tensorflow | tensorflow/contrib/distributions/python/kernel_tests/quantized_distribution_test.py | 90 | 17822 | # 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 | 6,343,259,286,200,531,000 | 41.033019 | 80 | 0.609808 | false |
llange/pynag | tests/test_plugins.py | 2 | 19560 |
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
import os
import sys
# Make sure we import from working tree
pynagbase = os.path.dirname(os.path.realpath(__file__ + "/.."))
sys.path.insert(0, pynagbase)
import unittest2 as unittest
import time
i... | gpl-2.0 | 4,002,242,174,300,456,000 | 31.654424 | 101 | 0.579192 | false |
jmakov/ggrc-core | src/ggrc_basic_permissions/roles/ProgramAuditEditor.py | 2 | 2313 | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
scope = "Audit Implied"
description = """
A user with the ProgramEditor role f... | apache-2.0 | 6,369,214,554,049,544,000 | 23.347368 | 78 | 0.493731 | false |
vicky2135/lucious | oscar/lib/python2.7/site-packages/unidecode/x0c7.py | 253 | 4564 | data = (
'wek', # 0x00
'wet', # 0x01
'wep', # 0x02
'weh', # 0x03
'wi', # 0x04
'wig', # 0x05
'wigg', # 0x06
'wigs', # 0x07
'win', # 0x08
'winj', # 0x09
'winh', # 0x0a
'wid', # 0x0b
'wil', # 0x0c
'wilg', # 0x0d
'wilm', # 0x0e
'wilb', # 0x0f
'wils', # 0x10
'wilt', # 0x... | bsd-3-clause | 914,169,476,958,655,700 | 16.689922 | 19 | 0.437555 | false |
CoDEmanX/ArangoDB | 3rdParty/V8-4.3.61/tools/testrunner/server/presence_handler.py | 123 | 4443 | # 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... | apache-2.0 | -7,909,353,077,618,786,000 | 36.025 | 76 | 0.705604 | false |
wbsoft/frescobaldi | frescobaldi_app/quickinsert/widget.py | 3 | 4449 | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2014 by Wilbert Berendsen
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
... | gpl-2.0 | -1,566,643,808,655,453,000 | 34.879032 | 105 | 0.639919 | false |
cszipper/PyAIML3 | build/lib.linux-x86_64-2.7/aiml/DefaultSubs.py | 14 | 3743 | """This file contains the default (English) substitutions for the
PyAIML kernel. These substitutions may be overridden by using the
Kernel.loadSubs(filename) method. The filename specified should refer
to a Windows-style INI file with the following format:
# lines that start with '#' are comments
# T... | bsd-2-clause | -6,177,530,144,578,082,000 | 21.99359 | 70 | 0.500134 | false |
iut-ibk/DynaMind-UrbanSim | 3rdparty/opus/src/washtenaw/estimation/my_estimation_config.py | 2 | 1595 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2005-2009 University of Washington
# See opus_core/LICENSE
import os
from opus_core.database_management.configurations.scenario_database_configuration import ScenarioDatabaseConfiguration
from opus_core.database_management.configurations.estimation_dat... | gpl-2.0 | -6,409,995,824,124,711,000 | 41.162162 | 122 | 0.709718 | false |
azumimuo/family-xbmc-addon | script.module.youtube.dl/lib/youtube_dl/extractor/sztvhu.py | 71 | 1673 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class SztvHuIE(InfoExtractor):
_VALID_URL = r'https?://(?:(?:www\.)?sztv\.hu|www\.tvszombathely\.hu)/(?:[^/]+)/.+-(?P<id>[0-9]+)'
_TEST = {
'url': 'http://sztv.hu/hirek/cserkeszek-nepszerusitettek-a-kornyezettud... | gpl-2.0 | -976,433,385,954,136,800 | 39.195122 | 193 | 0.567961 | false |
Godiyos/python-for-android | python3-alpha/python3-src/Lib/concurrent/futures/_base.py | 47 | 19248 | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
import collections
import functools
import logging
import threading
import time
FIRST_COMPLETED = 'FIRST_COMPLETED'
FIRST_EXCEPTION = 'FIRST_EXCEPTION'
ALL_COMPLETED... | apache-2.0 | -4,800,203,474,880,341,000 | 32.94709 | 80 | 0.589256 | false |
haad/ansible | lib/ansible/modules/cloud/misc/virt_net.py | 21 | 18988 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Maciej Delmanowski <drybjed@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
ANSIBLE_METADATA = {'metadata_version': '1.1... | gpl-3.0 | 8,639,155,382,856,250,000 | 29.478331 | 101 | 0.554561 | false |
mezz64/home-assistant | homeassistant/components/eafm/sensor.py | 10 | 5296 | """Support for guages from flood monitoring API."""
from datetime import timedelta
import logging
from aioeafm import get_station
import async_timeout
from homeassistant.const import ATTR_ATTRIBUTION, LENGTH_METERS
from homeassistant.helpers.aiohttp_client import async_get_clientsession
from homeassistant.helpers.upd... | apache-2.0 | -3,497,942,130,513,002,000 | 30.903614 | 103 | 0.636707 | false |
SUSE-Cloud/glance | glance/api/v2/router.py | 3 | 4823 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apac... | apache-2.0 | 5,623,299,975,287,384,000 | 42.45045 | 78 | 0.526021 | false |
jdstregz/sky-scraper | prototypes/prototypeGoogle/prototypeGoogle/spiders/google_splider_v2.py | 1 | 2718 | import scrapy
import csv
import psycopg2
import re
from scrapy_splash import SplashRequest
class GoogleSpider(scrapy.Spider):
name = "googlev2"
def start_requests(self):
urls = [
'https://cloud.google.com/compute/pricing',
]
for url in urls:
yield scrapy.Reque... | mit | -6,989,790,705,977,628,000 | 34.763158 | 103 | 0.511773 | false |
Priyansh2/test | ltrc/extractor/classification/test.py | 1 | 7909 | # -*- coding: utf-8 -*-
#! /usr/bin/env python3
from gensim import corpora, models
import gensim
from operator import itemgetter
import numpy as np
import sys
import os
import re
import codecs
import io
import math
from scipy import sparse
from sklearn.cross_validation import train_test_split
from sklearn.feature_extra... | gpl-3.0 | 267,324,775,521,480,350 | 27.420455 | 152 | 0.656804 | false |
chshu/openthread | tests/toranj/test-040-network-data-stable-full.py | 7 | 10584 | #!/usr/bin/env python3
#
# Copyright (c) 2020, The OpenThread 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:
# 1. Redistributions of source code must retain the above copyright
# ... | bsd-3-clause | -5,753,763,611,351,932,000 | 33.701639 | 121 | 0.608749 | false |
HPPTECH/hpp_IOSTressTest | Refer/IOST_OLD_SRC/IOST_0.09/IOST_WMain_CTRL.py | 3 | 2475 | #!/usr/bin/python
#======================================================================
#
# Project : hpp_IOStressTest
# File : IOST_WMain_CTRL.py
# Date : Oct 20, 2016
# Author : HuuHoang Nguyen
# Contact : hhnguyen@apm.com
# : hoangnh.hpp@gmail.com
# License : MIT License
# Copyright : 2016
#... | mit | -630,265,380,822,391,600 | 31.142857 | 144 | 0.517576 | false |
cindyyu/kuma | vendor/packages/pygments/styles/tango.py | 135 | 7096 | # -*- coding: utf-8 -*-
"""
pygments.styles.tango
~~~~~~~~~~~~~~~~~~~~~
The Crunchy default Style inspired from the color palette from
the Tango Icon Theme Guidelines.
http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines
Butter: #fce94f #edd400 #c4a000
Orange: #fcaf3e ... | mpl-2.0 | -2,242,186,655,149,316,900 | 49.326241 | 83 | 0.488444 | false |
flopezag/fiware-backlog | kernel/NM_LabReporter.py | 1 | 1450 | import pickle
import os
from kernel import settings
from kconfig import helpdeskBookByName, labsBookByName
from kernel.DataBoard import Data
from kernel.NM_Aggregates import Deck, WorkBacklog
from kernel.NM_BacklogReporter import BacklogReporter
from kernel.NM_HelpDeskReporter import DeckReporter
__author__ = 'Manuel... | apache-2.0 | -6,884,752,266,492,382,000 | 29.851064 | 73 | 0.653103 | false |
Eleonore9/data-wrangler | data_wrangler/views/blog.py | 1 | 1084 | # -*- coding: utf-8 -*-
"""Public section, including homepage and signup."""
from flask import Blueprint
from data_wrangler.services.blog import get_page, get_post_detail
from data_wrangler.utils import flash_errors, render_extensions
blueprint = Blueprint('blog', __name__, static_folder="../static")
@blueprint.rou... | bsd-3-clause | 3,096,713,615,023,136,000 | 23.088889 | 123 | 0.620849 | false |
msabramo/pip | tests/functional/test_install_vcs_git.py | 34 | 3757 | import pytest
from mock import patch
from pip.vcs.git import Git
from tests.lib import _create_test_package
from tests.lib.git_submodule_helpers import (
_change_test_package_submodule,
_pull_in_submodule_changes_to_module,
_create_test_package_with_submodule,
)
@pytest.mark.network
def test_get_refs_sh... | mit | 9,024,788,119,103,728,000 | 30.308333 | 77 | 0.640671 | false |
waynesun09/virt-test | virttest/libvirt_xml/base.py | 13 | 9021 | import logging
import imp
from autotest.client import utils
from virttest import propcan, xml_utils, virsh
from virttest.libvirt_xml import xcepts
class LibvirtXMLBase(propcan.PropCanBase):
"""
Base class for common attributes/methods applying to all sub-classes
Properties:
xml:
vir... | gpl-2.0 | 257,554,170,881,305,920 | 34.656126 | 86 | 0.557144 | false |
sinhrks/numpy | numpy/polynomial/chebyshev.py | 79 | 61966 | """
Objects for dealing with Chebyshev series.
This module provides a number of objects (mostly functions) useful for
dealing with Chebyshev series, including a `Chebyshev` class that
encapsulates the usual arithmetic operations. (General information
on how this module represents and works with such polynomials is in... | bsd-3-clause | 8,237,236,611,144,444,000 | 29.139105 | 79 | 0.598038 | false |
alexlo03/ansible | lib/ansible/modules/cloud/azure/azure_rm_routetable_facts.py | 25 | 5564 | #!/usr/bin/python
#
# Copyright (c) 2018 Yuwei Zhou, <yuwzho@microsoft.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_version': '1.1',
... | gpl-3.0 | 6,860,225,584,078,210,000 | 26.27451 | 153 | 0.603882 | false |
ryfeus/lambda-packs | Tensorflow_Pandas_Numpy/source3.6/tensorflow/core/framework/reader_base_pb2.py | 2 | 3527 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tensorflow/core/framework/reader_base.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protob... | mit | -4,281,672,487,298,366,000 | 37.336957 | 384 | 0.732067 | false |
Nelca/buildMLSystem | ch02/figure4_5.py | 3 | 1999 | # This code is supporting material for the book
# Building Machine Learning Systems with Python
# by Willi Richert and Luis Pedro Coelho
# published by PACKT Publishing
#
# It is made available under the MIT License
COLOUR_FIGURE = False
from matplotlib import pyplot as plt
from matplotlib.colors import ListedColorma... | mit | -2,669,473,976,653,041,000 | 29.753846 | 73 | 0.604302 | false |
kfox1111/horizon | openstack_dashboard/openstack/common/policy.py | 8 | 28726 | # Copyright (c) 2012 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 | -5,935,089,766,688,624,000 | 30.088745 | 78 | 0.59883 | false |
dbremner/bite-project | deps/gdata-python-client/tests/gdata_tests/auth_test.py | 126 | 26859 | #!/usr/bin/env python
#
# Copyright (C) 2007, 2008 Google 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 require... | apache-2.0 | 6,595,188,902,928,712,000 | 45.203866 | 80 | 0.659369 | false |
dya2/python-for-android | python-build/python-libs/ase/scripts/test.py | 64 | 5166 | import sys
import types
# Test imports.
import android
import BeautifulSoup
import gdata.docs.service
import sqlite3
import termios
import time
import xmpp
droid = android.Android()
def event_loop():
for i in range(10):
e = droid.eventPoll(1)
if e.result is not None:
return True
time.sleep(2)
... | apache-2.0 | 4,750,180,195,933,168,000 | 22.916667 | 80 | 0.714479 | false |
dameiss/wireshark-aeron | tools/dftestlib/double.py | 40 | 2523 | # Copyright (c) 2013 by Gilbert Ramirez <gram@alumni.rice.edu>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# Th... | gpl-2.0 | 6,826,605,197,554,127,000 | 31.346154 | 79 | 0.66191 | false |
OpenPymeMx/OCB | addons/pad/pad.py | 13 | 4352 | # -*- coding: utf-8 -*-
from openerp.osv import fields, osv
import random
import re
import string
import urllib2
import logging
from openerp import SUPERUSER_ID
from openerp.tools.translate import _
from openerp.tools import html2plaintext
from py_etherpad import EtherpadLiteClient
_logger = logging.getLogger(__name__... | agpl-3.0 | -4,513,307,251,359,748,600 | 37.513274 | 105 | 0.568704 | false |
cryptobanana/ansible | test/units/modules/network/f5/test_bigip_qkview.py | 7 | 5831 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import sys
from nose.plugins.skip import SkipTest
i... | gpl-3.0 | 2,997,915,807,348,350,000 | 32.32 | 91 | 0.645687 | false |
seanchen/taiga-back | taiga/timeline/apps.py | 4 | 1595 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the F... | agpl-3.0 | 8,337,602,091,691,569,000 | 45.852941 | 110 | 0.716259 | false |
vitiral/micropython | tests/extmod/uctypes_native_le.py | 59 | 2037 | # This test is exactly like uctypes_le.py, but uses native structure layout.
# Codepaths for packed vs native structures are different. This test only works
# on little-endian machine (no matter if 32 or 64 bit).
import sys
import uctypes
if sys.byteorder != "little":
print("SKIP")
sys.exit()
desc = {
"s... | mit | 1,728,596,080,744,334,600 | 25.802632 | 79 | 0.602847 | false |
highweb-project/highweb-webcl-html5spec | net/data/verify_certificate_chain_unittest/generate-intermediary-basic-constraints-not-critical.py | 16 | 1043 | #!/usr/bin/python
# Copyright (c) 2015 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.
"""Certificate chain with 1 intermediary and a trusted root. The intermediary
has a basic constraints extension but does not mark it as... | bsd-3-clause | 8,660,191,586,527,775,000 | 36.25 | 77 | 0.777565 | false |
thatchristoph/namebench | tools/convert_server_list.py | 174 | 2968 | #!/usr/bin/env python
# Copyright 2009 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 | 1,338,148,758,525,089,000 | 31.26087 | 93 | 0.666442 | false |
hujiajie/chromium-crosswalk | tools/telemetry/catapult_base/cloud_storage_unittest.py | 8 | 8049 | # 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 unittest
import mock
from telemetry.testing import system_stub
from catapult_base import cloud_storage
def _FakeReadHash(_):
return 'h... | bsd-3-clause | 2,369,564,273,310,720,500 | 40.489691 | 79 | 0.6694 | false |
uaarg/missioncommander | main.py | 1 | 6136 | #!/usr/bin/python3
import sys, getopt
import log, logging
import os
import argparse
import signal
import threading
from config import *
import ivylinker
from ui import UI
from database import importxml
from md5checker import findMD5
from interop.client import AsyncClient
from interoperability import MissionInformat... | gpl-2.0 | 1,842,211,435,797,874,700 | 34.062857 | 138 | 0.629074 | false |
bbenko/shinkicker | django/core/handlers/modpython.py | 189 | 8279 | import os
from pprint import pformat
import sys
from warnings import warn
from django import http
from django.core import signals
from django.core.handlers.base import BaseHandler
from django.core.urlresolvers import set_script_prefix
from django.utils import datastructures
from django.utils.encoding import force_unic... | bsd-3-clause | -6,181,710,131,483,981,000 | 37.868545 | 99 | 0.573016 | false |
bezi/globalizr | globalizr/api/interfaces/companies.py | 1 | 2501 | import urllib2
import urllib
import json
import subprocess
def genAllCodes():
base_url = "http://query.yahooapis.com/v1/public/yql?format=json&env=store%3A%2F%2F\
datatables.org%2Falltableswithkeys&q="
codes = []
for industry in range(110, 137):
print "Industry: {}".format(industry)
query =... | mit | -1,462,815,173,813,234,400 | 31.064103 | 98 | 0.618553 | false |
frappe/frappe | frappe/email/doctype/email_account/test_email_account.py | 2 | 17096 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
import os
import email
import unittest
from datetime import datetime, timedelta
from frappe.email.receive import InboundMail, SentEmailInInboxError, Email
from frappe.email.email_body import get_message_id
import frappe
from frappe... | mit | 2,346,094,777,151,231,000 | 38.850816 | 122 | 0.717595 | false |
colelloa/python | duplicate_image.py | 1 | 1959 | from PIL import Image, ImageDraw
#image naming convention xcoord_ycoord_alpha.png
#where coords are those of left corner of box to fill
class ImageDuplicator:
def __init__(self, orig_path, diameter, root_dir):
self.BALL_DIAMETER = diameter
self.IMAGE_ROOT_DIRECTORY = root_dir
# open gras... | mit | -8,115,650,315,585,772,000 | 35.277778 | 120 | 0.624809 | false |
fpgaminer/listen-to-bitcoin-mining | pyglet/gl/wglext_nv.py | 9 | 71630 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | gpl-3.0 | 4,712,760,499,822,136,000 | 77.80088 | 191 | 0.775373 | false |
OliverWalter/amdtk | recipes/wsj_segments/local/get_docs_from_prompts.py | 3 | 11222 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# author : Santosh
# e-mail : kcraj2[AT]gmail[DOT]com
# Date created : 08 Jul 2016
# Last modified : 11 Jul 2016
"""------------------------------------------------------------------------
Browse the WSJ0 and WSJ1 corpora, parse the prompts (transcriptions),
and categori... | bsd-2-clause | -9,068,913,868,851,805,000 | 30.880682 | 96 | 0.491178 | false |
polltooh/FineGrainedAction | nn/gen_test_file_fc7.py | 1 | 2206 | import os
import cv2
import random
import numpy as np
image_dir = "/home/mscvadmin/action/FineGrainedAction/data/test_image/"
frame_dir = "/home/mscvadmin/action/FineGrainedAction/data/test_video/"
def delete_last_empty_line(s):
while(len(s) >= 1 and s[-1] == '\n'):
s = s[:-1]
return s
# assume there... | mit | -8,346,766,049,986,246,000 | 29.638889 | 93 | 0.528558 | false |
drkitty/bitty | assembler/test.py | 1 | 1687 | #!/usr/bin/env python3
import ast
import difflib
import glob
import subprocess as sub
import sys
from sys import stdout, stderr
TEMP = "/tmp/28d8vjsdfu239ur0z89fd8f23pq2038h8vc"
devnull = open("/dev/null", "w")
def main(asm_name):
fail = []
for testname in sorted(glob.glob("test-lex/*")):
stdout... | mit | 1,119,640,627,648,061,000 | 27.59322 | 75 | 0.516894 | false |
asm-products/movie-database-service | ani/lib/python2.7/site-packages/django/db/models/aggregates.py | 114 | 2601 | """
Classes to represent the definitions of aggregate functions.
"""
from django.db.models.constants import LOOKUP_SEP
def refs_aggregate(lookup_parts, aggregates):
"""
A little helper method to check if the lookup_parts contains references
to the given aggregates set. Because the LOOKUP_SEP is contained i... | agpl-3.0 | -4,974,884,120,256,210,000 | 31.5125 | 82 | 0.653979 | false |
adrian-ionescu/apache-spark | examples/src/main/python/streaming/queue_stream.py | 150 | 1763 | #
# 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 us... | apache-2.0 | 305,609,836,016,770,050 | 34.979592 | 83 | 0.733976 | false |
r-owen/stui | TUI/Inst/GuideMonitor/GuideMonitorWindow.py | 1 | 12690 | #!/usr/bin/env python
"""Seeing monitor
History:
2010-10-01 ROwen Initial version.
2010-11-17 ROwen Added measured and applied offsets for all guider corrections.
Split RA, Dec and rotator into separate graphs.
Added net rotator offset.
2010-11-19 ROwen Display scaleFac... | bsd-3-clause | 4,874,801,192,465,124,000 | 35.570605 | 108 | 0.597478 | false |
glorizen/nupic | tests/unit/nupic/algorithms/nab_detector_test.py | 31 | 10843 | #! /usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2015, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions... | agpl-3.0 | -985,888,417,480,998,700 | 38.144404 | 80 | 0.517938 | false |
liyongyue/dnsspider | build/lib/dns/rdtypes/ANY/CERT.py | 2 | 4317 | # Copyright (C) 2003-2005 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ... | isc | 8,848,514,047,058,042,000 | 31.954198 | 79 | 0.607135 | false |
frankvdp/django | tests/auth_tests/test_remote_user.py | 70 | 10801 | from datetime import datetime
from django.conf import settings
from django.contrib.auth import authenticate
from django.contrib.auth.backends import RemoteUserBackend
from django.contrib.auth.middleware import RemoteUserMiddleware
from django.contrib.auth.models import User
from django.test import TestCase, modify_set... | bsd-3-clause | -3,455,319,999,352,703,000 | 38.709559 | 87 | 0.650495 | false |
divio/djangocms-text-ckeditor | djangocms_text_ckeditor/migrations/0004_auto_20160706_1339.py | 1 | 1795 | import re
from django.db import migrations, models
def _replace_text_body(model, input_pattern, output_tag, id_format):
regex = re.compile(input_pattern)
def _do_replace(match):
before_id, plugin_id, after_id = match.groups()
if not plugin_id:
return ''
bits = []
... | bsd-3-clause | 4,020,027,121,985,164,300 | 25.791045 | 86 | 0.579944 | false |
criccomini/airflow | tests/contrib/hooks/test_aws_hook.py | 6 | 7498 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 | 1,843,894,473,552,219,600 | 38.882979 | 90 | 0.627501 | false |
filipenf/ansible | lib/ansible/plugins/lookup/csvfile.py | 9 | 3502 | # (c) 2013, Jan-Piet Mens <jpmens(at)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) any later ver... | gpl-3.0 | 3,937,501,607,743,720,400 | 31.12844 | 135 | 0.578241 | false |
jswope00/griffinx | common/lib/xmodule/xmodule/modulestore/tests/test_modulestore.py | 197 | 2393 | """
Defines a test function, check_has_course_method, useful in various modulestore tests.
This file should potentially be renamed "utilties" since this file contains no tests.
"""
from nose.tools import assert_equals, assert_true, assert_false # pylint: disable=no-name-in-module
def check_has_course_method(modules... | agpl-3.0 | -5,838,147,499,481,411,000 | 48.854167 | 110 | 0.562056 | false |
stewartsmith/drizzle | tests/qp_tests/randgen_basic/drizzledumpRestoreRandom_test.py | 4 | 1462 | #! /usr/bin/env python
# -*- mode: python; indent-tabs-mode: nil; -*-
# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
#
# Copyright (C) 2011 Patrick Crews
#
#
# 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 Softwar... | gpl-2.0 | 4,707,290,693,600,450,000 | 37.473684 | 166 | 0.73461 | false |
auag92/n2dm | Asap-3.8.4/Python/asap3/nanoparticle_mc/resizecluster.py | 1 | 1944 | from asap3 import CoordinationNumbers
import numpy as np
from asap3.MonteCarlo.Moves import SurfaceMove
from ase import Atom
import random as rd
def mychoice(a, n):
"Replaces numpy.random.choice(a, n, False) as our numpy is ancient."
a = list(a)
while len(a) > n:
# Remove a random element
del a[np.random.randin... | mit | -7,125,198,609,288,652,000 | 28.014925 | 69 | 0.715021 | false |
tedder/ansible | lib/ansible/modules/remote_management/manageiq/manageiq_group.py | 14 | 23075 | #!/usr/bin/python
#
# (c) 2018, Evert Mulder <evertmulder@gmail.com> (base on manageiq_user.py by Daniel Korn <korndaniel1@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 So... | gpl-3.0 | 939,897,909,068,341,000 | 35.111111 | 130 | 0.608364 | false |
buguelos/odoo | addons/point_of_sale/wizard/pos_details.py | 225 | 2386 | # -*- 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 | -448,489,068,511,652,700 | 39.440678 | 126 | 0.593881 | false |
yausern/stlab | TimeDomain_v2/Tektronix_AWG520.py | 2 | 24579 | # Tektronix_AWG520.py class, to perform the communication between the Wrapper and the device
# Pieter de Groot <pieterdegroot@gmail.com>, 2008
# Martijn Schaafsma <qtlab@mcschaafsma.nl>, 2008
# Vishal Ranjan, 2012
# ron schutjens, 2012
# Modified by: Sarwan Peiter
# This program is free software; you can redistribute i... | gpl-3.0 | 6,727,424,527,997,197,000 | 31.171466 | 140 | 0.536108 | false |
inveniosoftware/invenio-previewer | tests/test_utils.py | 1 | 2173 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016-2019 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Test of utilities module."""
from __future__ import absolute_import, print_functi... | mit | 2,723,281,987,887,316,500 | 35.561404 | 79 | 0.648273 | false |
40323240/personal-cdw11 | users/a/g7/ag7_40123149_3.py | 2 | 5212 | # 各組分別在各自的 .py 程式中建立應用程式 (第1步/總共3步)
from flask import Blueprint, render_template, make_response
# 利用 Blueprint建立 ag1, 並且 url 前綴為 /ag1, 並設定 template 存放目錄
ag7_40123149_3 = Blueprint('ag7_40123149_3', __name__, url_prefix='/ag7_40123149', template_folder='templates')
# scrum1_task1 為完整可以單獨執行的繪圖程式
@ag7_40123149_3.route('... | agpl-3.0 | 7,253,899,661,306,857,000 | 31.492537 | 136 | 0.66927 | false |
pombredanne/splash | splash/tests/stress.py | 3 | 8128 | from __future__ import print_function
import sys, requests, random, optparse, time, json
from itertools import islice
from threading import Thread
from collections import Counter
import requests
import six
from six.moves.queue import Queue
from .utils import SplashServer, MockServer
class StressTest():
def __i... | bsd-3-clause | -6,256,039,235,229,162,000 | 32.586777 | 113 | 0.579109 | false |
qnub/django-cms | cms/south_migrations/0067_auto__add_field_aliaspluginmodel_alias_placeholder__chg_field_aliasplu.py | 59 | 18849 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'AliasPluginModel.alias_placeholder'
db.add_column(u'cms_a... | bsd-3-clause | -1,347,039,009,236,921,000 | 85.866359 | 196 | 0.56194 | false |
endlessm/chromium-browser | third_party/skia/infra/bots/recipe_modules/run/api.py | 12 | 3526 | # Copyright 2016 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.
# pylint: disable=W0201
from recipe_engine import recipe_api
TEST_DEFAULT_ASSET_VERSION = '42'
class SkiaStepApi(recipe_api.RecipeApi):
def __init__... | bsd-3-clause | -3,220,419,665,156,599,000 | 34.979592 | 79 | 0.613159 | false |
razr1/mx | cocos2d/download-deps.py | 63 | 12254 | #!/usr/bin/env python
#coding=utf-8
#
# ./download-deps.py
#
# Download Cocos2D-X resources from github (https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin) and extract from ZIP
#
# Helps prevent repo bloat due to large binary files since they can
# be hosted separately.
#
"""*************************************... | mit | -2,050,856,840,059,090,700 | 38.529032 | 171 | 0.570834 | false |
NcLang/vimrc | sources_non_forked/YouCompleteMe/third_party/pythonfutures/concurrent/futures/_compat.py | 179 | 4645 | from keyword import iskeyword as _iskeyword
from operator import itemgetter as _itemgetter
import sys as _sys
def namedtuple(typename, field_names):
"""Returns a new subclass of tuple with named fields.
>>> Point = namedtuple('Point', 'x y')
>>> Point.__doc__ # docstring for the new cla... | mit | -3,798,047,253,644,358,000 | 44.990099 | 126 | 0.57761 | false |
jundongl/PyFeaST | skfeature/example/test_CIFE.py | 3 | 1485 | import scipy.io
from sklearn.metrics import accuracy_score
from sklearn import cross_validation
from sklearn import svm
from skfeature.function.information_theoretical_based import CIFE
def main():
# load data
mat = scipy.io.loadmat('../data/colon.mat')
X = mat['X'] # data
X = X.astype(float)
y... | gpl-2.0 | 6,160,666,183,929,817,000 | 31.282609 | 89 | 0.649158 | false |
brunoflores/tapiriik | tapiriik/services/tcx.py | 9 | 22210 | from lxml import etree
from pytz import UTC
import copy
import dateutil.parser
from datetime import timedelta
from .interchange import WaypointType, Activity, ActivityStatistic, ActivityStatistics, ActivityStatisticUnit, ActivityType, Waypoint, Location, Lap, LapIntensity, LapTriggerMethod
from .devices import De... | apache-2.0 | 7,438,945,518,449,190,000 | 54.370558 | 231 | 0.588789 | false |
j-carpentier/nova | nova/tests/unit/api/openstack/compute/test_floating_ip_pools.py | 35 | 3017 | # Copyright (c) 2011 X.commerce, a business unit of eBay 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/LICENS... | apache-2.0 | -6,558,860,579,997,474,000 | 37.189873 | 78 | 0.677494 | false |
Aristocles/CouchPotatoServer | libs/gntp/core.py | 92 | 13975 | # Copyright: 2013 Paul Traylor
# These sources are released under the terms of the MIT license: see LICENSE
import hashlib
import re
import time
import gntp.shim
import gntp.errors as errors
__all__ = [
'GNTPRegister',
'GNTPNotice',
'GNTPSubscribe',
'GNTPOK',
'GNTPError',
'parse_gntp',
]
#GNTP/<version> <mess... | gpl-3.0 | -7,711,407,530,393,372,000 | 26.348337 | 105 | 0.68873 | false |
DirkHoffmann/indico | indico/util/console.py | 3 | 4266 | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
import fcntl
import re
import struct
import sys
import termios
import time
from datetime import timedelta
... | gpl-3.0 | -2,418,993,817,250,831,000 | 33.967213 | 117 | 0.616503 | false |
cloud9ers/gurumate | environment/lib/python2.7/site-packages/IPython/utils/growl.py | 3 | 1872 | # encoding: utf-8
"""
Utilities using Growl on OS X for notifications.
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distribute... | lgpl-3.0 | 8,336,149,397,165,798,000 | 27.8 | 80 | 0.464744 | false |
fkolacek/FIT-VUT | bp-revok/python/lib/python2.7/encodings/iso8859_14.py | 593 | 13908 | """ Python Character Mapping Codec iso8859_14 generated from 'MAPPINGS/ISO8859/8859-14.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,734,846,067,370,254,000 | 44.302932 | 109 | 0.538683 | false |
adamgreen/mbed | tools/host_tests/host_tests_plugins/host_test_plugins.py | 92 | 4881 | """
mbed SDK
Copyright (c) 2011-2013 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... | apache-2.0 | -1,361,654,492,172,033,500 | 40.016807 | 109 | 0.535751 | false |
vitan/hue | desktop/core/ext-py/tablib-develop/tablib/packages/odf/dr3d.py | 99 | 1445 | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2007 Søren Roug, European Environment Agency
#
# This library 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 2.1 of the License, or (at you... | apache-2.0 | -8,653,605,950,497,615,000 | 32.581395 | 80 | 0.730609 | false |
kubernetes-client/python | kubernetes/client/models/v1_config_map_node_config_source.py | 1 | 8452 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.18
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | apache-2.0 | 90,421,405,438,156,780 | 34.662447 | 172 | 0.628964 | false |
sndnvaps/git_repo | command.py | 18 | 3745 | #
# Copyright (C) 2008 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | 2,519,484,619,184,530,000 | 25.188811 | 74 | 0.61522 | false |
RadioFreeAsia/RDacity | lib-src/lv2/lilv/waflib/TaskGen.py | 177 | 11938 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
import copy,re,os
from waflib import Task,Utils,Logs,Errors,ConfigSet,Node
feats=Utils.defaultdict(set)
class task_gen(object):
mappings={}
prec=Utils.defaultdict(list)
def... | gpl-2.0 | -8,510,423,232,437,553,000 | 28.476543 | 162 | 0.669626 | false |
Ctrip-DI/Hue-Ctrip-DI | sparksql/setup.py | 1 | 1746 | # Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this fi... | mit | 6,863,880,040,831,617,000 | 35.148936 | 74 | 0.681558 | false |
mltsp/mltsp | cesium/features/cadence_features.py | 5 | 3420 | import numpy as np
import scipy.stats as stats
__all__ = ['double_to_single_step', 'cad_prob', 'delta_t_hist',
'normalize_hist', 'find_sorted_peaks', 'peak_ratio', 'peak_bin']
def double_to_single_step(cads):
"""Ratios (t[i+2] - t[i]) / (t[i+1] - t[i])."""
cads = np.asarray(cads)
return (cads... | bsd-3-clause | 5,714,128,961,917,529,000 | 38.310345 | 90 | 0.604678 | false |
lisa-lab/pylearn2 | pylearn2/models/gsn.py | 44 | 36324 | """
Generative Stochastic Networks
This is described in:
- "Generalized Denoising Auto-Encoders as Generative Models" Bengio, Yao, Alain,
Vincent. arXiv:1305.6663
- "Deep Generative Stochastic Networks Trainable by Backprop" Bengio,
Thibodeau-Laufer. arXiv:1306.1091
There is an example of training both unsuper... | bsd-3-clause | -1,899,487,928,995,066,600 | 37.890792 | 87 | 0.584847 | false |
Arvedui/i3pystatus | i3pystatus/alsa.py | 11 | 5178 | from alsaaudio import Mixer, ALSAAudioError
from math import exp, log, log10, ceil, floor
from i3pystatus import IntervalModule
class ALSA(IntervalModule):
"""
Shows volume of ALSA mixer. You can also use this for inputs, btw.
Requires pyalsaaudio
.. rubric:: Available formatters
* `{volume}` ... | mit | -63,280,878,965,796,344 | 28.19774 | 104 | 0.563854 | false |
dch312/scipy | scipy/optimize/zeros.py | 55 | 19069 | from __future__ import division, print_function, absolute_import
import warnings
from . import _zeros
from numpy import finfo, sign, sqrt
_iter = 100
_xtol = 1e-12
_rtol = finfo(float).eps * 2
__all__ = ['newton', 'bisect', 'ridder', 'brentq', 'brenth']
CONVERGED = 'converged'
SIGNERR = 'sign error'
CONVERR = 'con... | bsd-3-clause | -424,685,853,891,526,900 | 36.317025 | 80 | 0.614663 | false |
raymondxyang/tensorflow | tensorflow/python/training/adam_test.py | 51 | 12346 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 6,978,781,171,636,073,000 | 40.569024 | 80 | 0.61769 | false |
w3nd1go/android_external_skia | platform_tools/android/tests/android_framework_gyp_tests.py | 145 | 2418 | #!/usr/bin/python
# Copyright 2014 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Test gyp_to_android.py
"""
import os
import shutil
import sys
import tempfile
import test_variables
import unittest
sys.path.append(test_variables.ANDROID_DIR)
... | bsd-3-clause | 2,526,342,065,306,455,600 | 28.851852 | 77 | 0.657982 | false |
djeraseit/eucalyptus | clc/eucadmin/eucadmin/deregisterobjectstoragegateway.py | 6 | 1507 | # Copyright 2011-2012 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software 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 ... | gpl-3.0 | 922,138,030,520,451,100 | 50.965517 | 83 | 0.79562 | false |
KohlsTechnology/ansible | lib/ansible/modules/network/cloudengine/ce_vlan.py | 13 | 20876 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | gpl-3.0 | -4,917,634,777,496,140,000 | 29.654919 | 121 | 0.54977 | false |
AstromechZA/validoot | setup.py | 1 | 1644 | import os
import sys
from setuptools import setup
from setuptools.command.test import test
here = os.path.abspath(os.path.dirname(__file__))
class PyTest(test):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
def initialize_options(self):
test.initialize_options(self)
... | mit | 8,325,278,315,053,313,000 | 25.095238 | 78 | 0.618613 | false |
valentin-krasontovitsch/ansible | test/units/modules/network/f5/test_bigip_gtm_virtual_server.py | 21 | 5644 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import json
import pytest
import sys
if sys.version_info < (2... | gpl-3.0 | -7,681,164,542,512,457,000 | 31.068182 | 101 | 0.604713 | false |
RichIsMyName/PicklingToolsRepo | Xm/ptools161/python/XMTime.py | 3 | 26838 | """
Python class that wraps the X-Midas time facilities. The XMTime
is represented as two floats, one which contains the integral number
of seconds since the epoch, the other which contains the fractional number.
The following is always true of an XMTime:
self.integral == round(self.integral)
0.0 <= self.fractional <... | bsd-3-clause | 7,108,724,988,790,959,000 | 39.602118 | 79 | 0.558834 | 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.