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 |
|---|---|---|---|---|---|---|---|---|---|---|
xaccc/videoapiserver | SpaceService.py | 1 | 11937 | #coding=utf-8
#-*- encoding: utf-8 -*-
from datetime import datetime, timedelta
from MySQL import MySQL
from random import randint
import Config
import Utils
import UserService
def space_list(data):
userId = UserService.user_id(data['UserKey'])
db = MySQL()
spaceListInstance = db.list('SELECT * FROM `space` WHE... | gpl-2.0 | 9,200,986,936,091,648,000 | 25.981481 | 187 | 0.613385 | false |
bregman-arie/ansible | lib/ansible/parsing/metadata.py | 117 | 10058 | # (c) 2017, Toshio Kuratomi <tkuratomi@ansible.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... | gpl-3.0 | -8,643,398,653,256,565,000 | 40.053061 | 103 | 0.545834 | false |
sudovijay/youtube-dl | test/test_utils.py | 40 | 27918 | #!/usr/bin/env python
# coding: utf-8
from __future__ import unicode_literals
# Allow direct execution
import os
import sys
import unittest
sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
# Various small unit tests
import io
import json
import xml.etree.ElementTree
from youtube_dl.u... | unlicense | 7,723,359,546,420,188,000 | 41.74808 | 157 | 0.585181 | false |
CopeX/odoo | addons/stock_dropshipping/stock_dropshipping.py | 46 | 1896 | # coding: utf-8
from openerp import models, api, _
from openerp.exceptions import Warning
class sale_order_line(models.Model):
_inherit = 'sale.order.line'
@api.multi
def _check_routing(self, product, warehouse):
""" skip stock verification if the route goes from supplier to customer
... | agpl-3.0 | 6,018,823,980,715,951,000 | 41.133333 | 222 | 0.625527 | false |
ratoaq2/Flexget | flexget/plugins/filter/subtitle_queue.py | 8 | 19097 | from __future__ import unicode_literals, division, absolute_import
import glob
import logging
import os
import urllib
import urlparse
import os.path
from sqlalchemy import Column, Integer, String, ForeignKey, or_, and_, DateTime, Boolean
from sqlalchemy.orm import backref, relationship
from sqlalchemy.schema import Ta... | mit | 7,902,008,403,501,130,000 | 43.828638 | 116 | 0.525318 | false |
KitKatXperience/platform_external_chromium_org | build/android/gyp/jar.py | 35 | 1915 | #!/usr/bin/env python
#
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import fnmatch
import optparse
import os
import sys
from util import build_utils
from util import md5_check
def DoJar(options):
... | bsd-3-clause | -3,968,661,552,946,152,400 | 29.887097 | 79 | 0.702872 | false |
Inspq/ansible | lib/ansible/modules/notification/jabber.py | 17 | 4809 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2015, Brian Coca <bcoca@ansible.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 Licen... | gpl-3.0 | 8,805,772,578,654,278,000 | 26.169492 | 90 | 0.638386 | false |
proyectosdeley/proyectos_de_ley | proyectos_de_ley/pdl_scraper/spiders/proyecto_spider_2006.py | 1 | 5398 | # -*- coding: utf-8 -*-
import re
import short_url
import scrapy
from scrapy.spiders import CrawlSpider, Rule
from scrapy.linkextractors import LinkExtractor
from pdl_scraper.items import PdlScraperItem
LEGISLATURA = 2006
class ProyectoSpider2006(CrawlSpider):
name = "proyecto_2006"
allowed_domains = ["ww... | mit | 8,898,225,354,939,945,000 | 39.283582 | 106 | 0.521675 | false |
syci/OCB | openerp/addons/base/module/wizard/base_language_install.py | 40 | 1792 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp import tools
from openerp.osv import osv, fields
from openerp.tools.translate import _
class base_language_install(osv.osv_memory):
""" Install Language"""
_name = "base.language.install"
_desc... | agpl-3.0 | -8,904,761,629,933,925,000 | 38.822222 | 179 | 0.567522 | false |
cctaylor/googleads-python-lib | examples/dfp/v201502/order_service/create_orders.py | 3 | 1835 | #!/usr/bin/python
#
# Copyright 2015 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 b... | apache-2.0 | -7,156,005,660,952,277,000 | 29.583333 | 74 | 0.695368 | false |
q1ang/vnpy | vn.lts/pyscript/lts_struct.py | 47 | 80727 | # encoding: UTF-8
structDict = {}
#//////////////////////////////////////////////////////////////////////
#@company shanghai liber information Technology Co.,Ltd
#@file SecurityFtdcUserApiStruct.h
#@brief 定义业务数据结构
#//////////////////////////////////////////////////////////////////////
#响应信息
CSecurityFtdcRsp... | mit | 8,387,837,431,079,133,000 | 29.640328 | 109 | 0.821907 | false |
claudep/translate | translate/convert/test_json2po.py | 1 | 2735 | #!/usr/bin/env python
from translate.convert import json2po, test_convert
from translate.misc import wStringIO
from translate.storage import jsonl10n
class TestJson2PO:
def json2po(self, jsonsource, template=None, filter=None):
"""helper that converts json source to po source without requiring files"""
... | gpl-2.0 | 5,918,884,741,558,409,000 | 30.079545 | 89 | 0.602925 | false |
chrisdearman/micropython | tests/basics/special_methods.py | 28 | 2100 | class Cud():
def __init__(self):
print("__init__ called")
def __repr__(self):
print("__repr__ called")
return ""
def __lt__(self, other):
print("__lt__ called")
def __le__(self, other):
print("__le__ called")
def __eq__(self, other):
print("__eq__... | mit | 1,322,333,261,505,647,900 | 18.444444 | 36 | 0.476667 | false |
wayne2000/myProg | myPython/SComConf.py | 1 | 10821 | #!/usr/bin/python
__author__ = 'Wei'
from Tkinter import *
import Tkinter as tk
import tkMessageBox
import serial
import time
import thread
import traceback
import binascii
class ScrolledText(tk.Frame):
def __init__(self, parent, *args, **kwargs):
tk.Frame.__init__(self, parent)
self.text = tk.Te... | gpl-2.0 | 3,617,652,179,609,533,400 | 35.681356 | 129 | 0.565475 | false |
jendap/tensorflow | tensorflow/python/ops/template.py | 3 | 29586 | # 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 | -4,949,484,577,743,494,000 | 42.002907 | 101 | 0.674103 | false |
ykim362/mxnet | example/speech_recognition/config_util.py | 52 | 3911 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 8,243,891,010,711,572,000 | 37.343137 | 105 | 0.64945 | false |
pedrobaeza/OpenUpgrade | addons/account/wizard/pos_box.py | 185 | 3431 | from openerp.osv import fields, osv
import openerp.addons.decimal_precision as dp
from openerp.tools.translate import _
class CashBox(osv.osv_memory):
_register = False
_columns = {
'name' : fields.char('Reason', required=True),
# Attention, we don't set a domain, because there is a journal_typ... | agpl-3.0 | 982,658,717,772,197,600 | 40.337349 | 166 | 0.583212 | false |
lexor90/node-compiler | node/deps/v8/tools/release/check_clusterfuzz.py | 10 | 5501 | #!/usr/bin/env python
# Copyright 2014 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Script to check for new clusterfuzz issues since the last rolled v8 revision.
Returns a json list with test case IDs if any.
Se... | mit | -7,466,832,910,154,135,000 | 23.127193 | 79 | 0.618797 | false |
zouppen/simulavr | regress/timertest/timer_16bit_normal.py | 5 | 2481 | from vcdtestutil import VCDTestCase, VCDTestLoader, mSec
class TestCase(VCDTestCase):
p2irq = {
"atmega128": "IRQ.VECTOR14",
"at90s4433": "IRQ.VECTOR5",
"at90s8515": "IRQ.VECTOR6",
"atmega48": "IRQ.VECTOR13",
}
def setUp(self):
self.getVCD()
self.setClock(4000000)
self.processo... | gpl-2.0 | -4,561,736,661,851,272,700 | 28.535714 | 91 | 0.646514 | false |
x75/mavlink | pymavlink/generator/lib/minixsv/minixsvWrapper.py | 3 | 2396 | #!/usr/local/bin/python
import sys
import getopt
from genxmlif import GenXmlIfError
from xsvalErrorHandler import ErrorHandler, XsvalError
from minixsv import *
from pyxsval import parseAndValidate
##########################################
# minixsv Wrapper for calling minixs... | lgpl-3.0 | 4,794,823,912,429,429,000 | 29.526316 | 86 | 0.528381 | false |
encukou/freeipa | ipaserver/plugins/dns.py | 1 | 166682 | # Authors:
# Martin Kosek <mkosek@redhat.com>
# Pavel Zuna <pzuna@redhat.com>
#
# Copyright (C) 2010 Red Hat
# see file 'COPYING' for use and warranty information
#
# 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 Fr... | gpl-3.0 | 230,642,211,439,992,130 | 35.481068 | 892 | 0.564188 | false |
CJ8664/servo | tests/wpt/web-platform-tests/tools/py/py/_builtin.py | 259 | 6521 | import sys
try:
reversed = reversed
except NameError:
def reversed(sequence):
"""reversed(sequence) -> reverse iterator over values of the sequence
Return a reverse iterator
"""
if hasattr(sequence, '__reversed__'):
return sequence.__reversed__()
if not hasa... | mpl-2.0 | 8,322,437,629,610,798,000 | 25.294355 | 78 | 0.541328 | false |
Lingotek/filesystem-connector | python2/ltk/actions/rm_action.py | 2 | 9792 | from ltk.actions.action import *
class RmAction(Action):
def __init__(self, path):
Action.__init__(self, path)
self.use_delete = False
def rm_action(self, file_patterns, **kwargs):
try:
removed_folder = False
for pattern in file_patterns:
if os.p... | mit | 4,722,171,739,073,180,000 | 48.705584 | 200 | 0.529718 | false |
redhat-openstack/django | django/utils/version.py | 228 | 1785 | from __future__ import unicode_literals
import datetime
import os
import subprocess
def get_version(version=None):
"Returns a PEP 386-compliant version number from VERSION."
if version is None:
from django import VERSION as version
else:
assert len(version) == 5
assert version[3] i... | bsd-3-clause | 8,714,828,245,782,790,000 | 34 | 79 | 0.631933 | false |
trdean/grEME | gr-qtgui/apps/plot_psd_base.py | 11 | 5358 | #!/usr/bin/env python
#
# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# ... | gpl-3.0 | 3,860,505,649,040,011,300 | 31.871166 | 97 | 0.588279 | false |
google-code/betsynetpdf | sumatrapdf/scripts/metadata/metadata.py | 20 | 7301 | import types
def is_valid_signed(bits, val):
if type(val) not in (types.IntType, types.LongType): return False
e = bits - 1
min_val = -(2 ** e)
if val < min_val: return False
max_val = (2 ** e) - 1
if val > max_val: return False
return True
def is_valid_unsigned(bits, val):
... | gpl-3.0 | -325,171,988,607,077,570 | 26.189189 | 99 | 0.548829 | false |
Sing-Li/go-buildpack | builds/runtimes/python-2.7.6/lib/python2.7/test/test_capi.py | 50 | 4656 | # Run the _testcapi module tests (tests for the Python/C API): by defn,
# these are all functions _testcapi exports whose name begins with 'test_'.
from __future__ import with_statement
import sys
import time
import random
import unittest
from test import test_support
try:
import thread
import threading
excep... | mit | 5,065,930,601,938,481,000 | 32.257143 | 84 | 0.57689 | false |
azureplus/hue | desktop/core/ext-py/Django-1.6.10/django/db/backends/mysql/creation.py | 114 | 3158 | from django.db.backends.creation import BaseDatabaseCreation
class DatabaseCreation(BaseDatabaseCreation):
# This dictionary maps Field objects to their associated MySQL column
# types, as strings. Column-type strings can contain format strings; they'll
# be interpolated against the values of Field.__dict_... | apache-2.0 | -7,512,706,412,560,939,000 | 44.114286 | 105 | 0.594047 | false |
Edraak/circleci-edx-platform | common/djangoapps/util/milestones_helpers.py | 1 | 14429 | # pylint: disable=invalid-name
"""
Utility library for working with the edx-milestones app
"""
from django.conf import settings
from django.utils.translation import ugettext as _
from opaque_keys import InvalidKeyError
from opaque_keys.edx.keys import CourseKey
from openedx.core.djangoapps.content.course_overviews.m... | agpl-3.0 | -6,682,827,721,839,642,000 | 34.715347 | 115 | 0.689168 | false |
zoidbergwill/lint-review | tests/tools/test_pep8.py | 2 | 2254 | from lintreview.review import Problems
from lintreview.review import Comment
from lintreview.tools.pep8 import Pep8
from unittest import TestCase
from nose.tools import eq_
class TestPep8(TestCase):
fixtures = [
'tests/fixtures/pep8/no_errors.py',
'tests/fixtures/pep8/has_errors.py',
]
d... | mit | -8,107,542,606,593,252,000 | 33.676923 | 89 | 0.620231 | false |
bcornwellmott/erpnext | erpnext/accounts/report/trial_balance_for_party/trial_balance_for_party.py | 34 | 5770 | # Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt, cint
from erpnext.accounts.report.trial_balance.trial_balance import validate_filters
def exe... | gpl-3.0 | 87,055,841,221,271,680 | 24.995495 | 101 | 0.644541 | false |
nooperpudd/pulsar | pulsar/apps/data/pulsards/startds.py | 5 | 1813 | import asyncio
from pulsar import when_monitor_start, get_application, task, send
from pulsar.apps.data import create_store
from pulsar.apps.ds import PulsarDS
def start_pulsar_ds(arbiter, host, workers=0):
lock = getattr(arbiter, 'lock', None)
if lock is None:
arbiter.lock = lock = asyncio.Lock()
... | bsd-3-clause | 1,852,974,214,985,352,400 | 28.721311 | 74 | 0.585218 | false |
adelina-t/nova | nova/tests/unit/cells/test_cells_filters.py | 30 | 7223 | # Copyright (c) 2012-2013 Rackspace Hosting
# 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
#
# Unles... | apache-2.0 | 6,730,653,321,418,510,000 | 40.511494 | 79 | 0.594351 | false |
alexmandujano/django | django/contrib/gis/db/backends/base.py | 112 | 11144 | """
Base/mixin classes for the spatial backend database operations and the
`SpatialRefSys` model the backend.
"""
import re
from django.contrib.gis import gdal
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
class BaseSpatialOperations(object):
"""
This module holds... | bsd-3-clause | -3,216,805,215,106,670,600 | 30.931232 | 248 | 0.599785 | false |
halvertoluke/edx-platform | lms/djangoapps/branding/tests/test_models.py | 134 | 1938 | """
Tests for the Video Branding configuration.
"""
from django.test import TestCase
from django.core.exceptions import ValidationError
from nose.plugins.attrib import attr
from branding.models import BrandingInfoConfig
@attr('shard_1')
class BrandingInfoConfigTest(TestCase):
"""
Test the BrandingInfoConfig ... | agpl-3.0 | -7,875,841,347,921,021,000 | 30.258065 | 81 | 0.585655 | false |
ypu/tp-qemu | qemu/tests/timerdevice_boot.py | 3 | 8045 | import logging
import re
import time
from autotest.client.shared import error
from autotest.client import utils
from virttest import data_dir, storage, utils_disk, utils_test, env_process
from virttest import funcatexit
@error.context_aware
def run(test, params, env):
"""
Timer device boot guest:
1) Sync... | gpl-2.0 | 8,021,890,625,950,087,000 | 45.235632 | 82 | 0.571038 | false |
ayesandarmoe/microblog_flask_tutorial | flask/lib/python2.7/codecs.py | 33 | 35555 | """ codecs -- Python Codec Registry, API and helpers.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""#"
import __builtin__, sys
### Registry and builtin stateless codec functions
try:
from _codecs import *
except ImportError, why:
raise SystemErr... | gpl-2.0 | 1,934,212,341,282,552,800 | 31.29337 | 131 | 0.612825 | false |
2013Commons/HUE-SHARK | desktop/core/ext-py/Django-1.2.3/tests/regressiontests/forms/localflavor/za.py | 33 | 1256 | tests = r"""
# ZAIDField #################################################################
ZAIDField validates that the date is a valid birthdate and that the value
has a valid checksum. It allows spaces and dashes, and returns a plain
string of digits.
>>> from django.contrib.localflavor.za.forms import ZAIDField
>>... | apache-2.0 | 8,135,649,488,657,277,000 | 30.4 | 77 | 0.649682 | false |
muralidcis/git-cola | cola/hotkeys.py | 1 | 2975 | from PyQt4.QtGui import QKeySequence
from PyQt4.QtCore import Qt
# A-G
STAGE_MODIFIED = Qt.AltModifier | Qt.Key_A
WORD_LEFT = Qt.Key_B
BRANCH = Qt.ControlModifier | Qt.Key_B
CHECKOUT = Qt.AltModifier | Qt.Key_B
CHERRY_PICK = Qt.ControlModifier | Qt.ShiftModifier | Qt.Key_C
DIFFSTAT = Qt.AltModifier | Qt.Key_D
DIFF = Q... | gpl-2.0 | -8,457,839,893,000,161,000 | 31.336957 | 70 | 0.738824 | false |
soumith/fbthrift | thrift/test/py/constants_test.py | 9 | 2021 | # 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 | -995,489,508,034,962,600 | 41.104167 | 70 | 0.714498 | false |
vmax-feihu/hue | desktop/core/ext-py/Django-1.6.10/django/contrib/gis/geos/tests/test_io.py | 105 | 4181 | from __future__ import unicode_literals
import binascii
import unittest
from django.contrib.gis import memoryview
from django.utils.unittest import skipUnless
from ..import HAS_GEOS
if HAS_GEOS:
from .. import GEOSGeometry, WKTReader, WKTWriter, WKBReader, WKBWriter, geos_version_info
@skipUnless(HAS_GEOS, "G... | apache-2.0 | -5,127,027,004,685,991,000 | 35.043103 | 94 | 0.628558 | false |
persandstrom/home-assistant | homeassistant/components/deconz/config_flow.py | 3 | 6271 | """Config flow to configure deCONZ component."""
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.core import callback
from homeassistant.const import CONF_API_KEY, CONF_HOST, CONF_PORT
from homeassistant.helpers import aiohttp_client
from homeassistant.util.json import load_json
... | apache-2.0 | 6,026,308,809,721,899,000 | 35.248555 | 78 | 0.609632 | false |
jkonecny12/blivet | blivet/devices/lib.py | 6 | 5915 | # devices/lib.py
#
# Copyright (C) 2009-2014 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in th... | lgpl-2.1 | 5,348,647,374,490,313,000 | 32.044693 | 80 | 0.626036 | false |
Maccimo/intellij-community | python/helpers/pydev/_pydev_bundle/_pydev_completer.py | 10 | 6762 | import sys
if sys.version_info[0] >= 3:
import builtins as __builtin__ # Py3
else:
import __builtin__
try:
import java.lang #@UnusedImport
from _pydev_bundle import _pydev_jy_imports_tipper
_pydev_imports_tipper = _pydev_jy_imports_tipper
except ImportError:
IS_JYTHON = False
from _pydev_b... | apache-2.0 | 5,153,233,097,012,609,000 | 34.21875 | 126 | 0.552499 | false |
cloudify-incubator/cloudify-utilities-plugin | cloudify_ssh_key/operations.py | 1 | 9384 | ######
# Copyright (c) 2016-2018 Cloudify Platform Ltd. 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 re... | apache-2.0 | 6,431,289,155,430,326,000 | 36.83871 | 78 | 0.650256 | false |
51x/EveryCon | chaos_test/test2-v3d4s.py | 1 | 6251 | jA0EAwMCWguE8aVZVWVgyey4FXnPY1gLFI14rvxeJekDYz0ux5SwAl3Loh3iLdQN
W3XHLJhfj+ygfQuY+ol2b21gh7VswD7w4NZ2Grkdo5lDH4DP5X0tlGi+jsRNe9WS
vS5qYn+nO54KxgzIRQdSneALo3vCBm+waDnsuMSTpGOIXIujdOZJd2LacUMNXbhx
ViCl9T788kkWKVGv8i/AOfYfafaCKdp8S1Ycc9Lo62iOyP0dOdfjAvg9Mx7iMVH7
5XDRwP3wvizS/NKgH6eP0Cp3VR+XLMyvrTrzAKCej8TIEQYHq92Z4ToPcNj0... | agpl-3.0 | 7,667,935,982,364,671,000 | 62.785714 | 64 | 0.954727 | false |
iansweeney/imuduino-btle | Arduino/libraries/FreeIMU/debug/timing.py | 21 | 2849 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
time.py - Tests the output coming from an Arduino with FreeIMU for speed.
Load the Arduino with the FreeIMU_serial program.
Copyright (C) 2012 Fabio Varesano <fvaresano@yahoo.it>
Development of this code has been supported by the Department of Computer Science,
Universi... | apache-2.0 | -1,078,986,393,772,597,100 | 32.505882 | 281 | 0.751053 | false |
ProjectQ-Framework/FermiLib | src/fermilib/utils/_jellium.py | 1 | 18174 | # Copyright 2017 ProjectQ-Framework (www.projectq.ch)
#
# 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 app... | apache-2.0 | -1,563,208,865,584,730,000 | 35.789474 | 79 | 0.600198 | false |
andela-earinde/bellatrix-py | app/js/lib/lib/modules/distutils/bcppcompiler.py | 250 | 14941 | """distutils.bcppcompiler
Contains BorlandCCompiler, an implementation of the abstract CCompiler class
for the Borland C++ compiler.
"""
# This implementation by Lyle Johnson, based on the original msvccompiler.py
# module and using the directions originally published by Gordon Williams.
# XXX looks like there's a L... | mit | 2,919,574,859,391,668,000 | 36.92132 | 80 | 0.526939 | false |
philanthropy-u/edx-platform | openedx/core/djangoapps/user_authn/views/login.py | 1 | 15901 | """
Views for login / logout and associated functionality
Much of this file was broken out from views.py, previous history can be found there.
"""
import logging
from django.conf import settings
from django.contrib.auth import authenticate, login as django_login
from django.contrib.auth.decorators import login_requi... | agpl-3.0 | 9,218,306,495,900,049,000 | 39.46056 | 120 | 0.677316 | false |
zayneanderson/aima-python | submissions/aardvark/mygames.py | 21 | 5147 | from collections import namedtuple
from games import (Game)
class GameState:
def __init__(self, to_move, board, label=None, depth=8):
self.to_move = to_move
self.board = board
self.label = label
self.maxDepth = depth
def __str__(self):
if self.label == None:
... | mit | 8,383,315,945,076,855,000 | 26.529412 | 77 | 0.476394 | false |
okfn/ckanext-groupadmin | ckanext/groupadmin/authz.py | 1 | 1227 | '''This module monkey patches functions in ckan/authz.py and updates the
default roles with custom roles and decorates
has_user_permission_for_group_org_org to allow a GroupAdmin to admin groups.
GroupAdmins can manage all organizations/groups, but have no other sysadmin
powers.
'''
from ckan import authz, model
from c... | agpl-3.0 | 7,620,675,631,685,714,000 | 36.181818 | 76 | 0.700896 | false |
cogmission/nupic | examples/opf/experiments/multistep/hotgym_best_tp_5step/description.py | 6 | 3184 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 | -5,527,034,005,855,722,000 | 57.962963 | 107 | 0.399183 | false |
bbockelm/root | interpreter/llvm/src/tools/clang/bindings/python/tests/cindex/util.py | 88 | 2293 | # This file provides common utility functions for the test suite.
from clang.cindex import Cursor
from clang.cindex import TranslationUnit
def get_tu(source, lang='c', all_warnings=False, flags=[]):
"""Obtain a translation unit from source and language.
By default, the translation unit is created from source... | lgpl-2.1 | 8,638,005,954,773,849,000 | 29.573333 | 78 | 0.655909 | false |
2014c2g4/2015cda0623 | static/Brython3.1.3-20150514-095342/Lib/site-packages/header.py | 91 | 2444 | from browser import document as doc
from browser.html import *
trans_menu = {
'menu_console':{'en':'Console','es':'Consola','fr':'Console', 'pt':'Console'},
'menu_editor':{'en':'Editor','es':'Editor','fr':'Editeur', 'pt':'Editor'},
'menu_gallery':{'en':'Gallery','es':'Galería','fr':'Galerie', 'pt':'Galeri... | gpl-3.0 | -6,727,534,110,121,561,000 | 34.838235 | 101 | 0.53057 | false |
kingmotley/SickRage | lib/sqlalchemy/testing/assertions.py | 75 | 15418 | # testing/assertions.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from __future__ import absolute_import
from . import util as testutil
from sqla... | gpl-3.0 | -3,370,482,203,899,602,000 | 34.120729 | 86 | 0.577183 | false |
bakerlover/project2 | lib/werkzeug/testsuite/contrib/fixers.py | 102 | 7333 | # -*- coding: utf-8 -*-
"""
werkzeug.testsuite.fixers
~~~~~~~~~~~~~~~~~~~~~~~~~
Server / Browser fixers.
:copyright: (c) 2013 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import unittest
from werkzeug.testsuite import WerkzeugTestCase
from werkzeug.datastructures import Res... | apache-2.0 | 5,027,278,681,077,932,000 | 36.994819 | 94 | 0.606437 | false |
taedori81/saleor | saleor/registration/models.py | 11 | 2121 | from __future__ import unicode_literals
from datetime import timedelta
from uuid import uuid4
from django.db import models
from django.contrib.auth import authenticate, get_user_model
from django.conf import settings
from django.core.urlresolvers import reverse
from django.utils import timezone
now = timezone.now
de... | bsd-3-clause | 8,252,267,149,148,449,000 | 29.3 | 92 | 0.700141 | false |
nikolas/django-extensions | django_extensions/management/commands/admin_generator.py | 23 | 11785 | # -*- coding: utf-8 -*-
'''
The Django Admin Generator is a project which can automatically generate
(scaffold) a Django Admin for you. By doing this it will introspect your
models and automatically generate an Admin with properties like:
- `list_display` for all local fields
- `list_filter` for foreign keys with fe... | mit | 995,295,894,609,594,900 | 32.671429 | 92 | 0.585066 | false |
jnfsmile/zinnia | zinnia/tests/test_mixins.py | 7 | 17107 | """Test cases for Zinnia's mixins"""
from datetime import date
from django.test import TestCase
from django.contrib.sites.models import Site
from django.core.exceptions import ImproperlyConfigured
from django.contrib.auth.tests.utils import skipIfCustomUser
from zinnia.models.entry import Entry
from zinnia.models.aut... | bsd-3-clause | -3,895,342,853,868,860,000 | 45.486413 | 79 | 0.606652 | false |
gak/VintageousEx | tests/test_range.py | 1 | 3362 | import unittest
import re
from VintageousEx.test_runner import g_test_view
from VintageousEx.tests import select_bof
from VintageousEx.tests import select_eof
from VintageousEx.tests import select_line
from VintageousEx.vex.ex_range import EX_RANGE
from VintageousEx.vex.ex_range import new_calculate_range
f... | mit | 707,222,297,688,296,100 | 34.945055 | 82 | 0.608269 | false |
Morloth1274/EVE-Online-POCO-manager | tests/test_corp.py | 1 | 37117 | import mock
from tests.compat import unittest
from tests.utils import APITestCase
import evelink.api as evelink_api
import evelink.corp as evelink_corp
API_RESULT_SENTINEL = evelink_api.APIResult(mock.sentinel.api_result, 12345, 67890)
class CorpTestCase(APITestCase):
def setUp(self):
super(CorpTestC... | mit | 2,065,270,934,566,970,600 | 38.111697 | 103 | 0.466848 | false |
andmos/ansible | packaging/sdist/check-link-behavior.py | 114 | 1290 | #!/usr/bin/env python
"""Checks for link behavior required for sdist to retain symlinks."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import platform
import shutil
import sys
import tempfile
def main():
"""Main program entry point."""
temp_dir = tempf... | gpl-3.0 | -8,241,324,313,227,378,000 | 24.294118 | 96 | 0.615504 | false |
erigones/esdc-ce | api/mon/base/api_views.py | 1 | 7159 | from logging import getLogger
from django.http import Http404
from api.api_views import APIView
# noinspection PyProtectedMember
from api.fields import get_boolean_value
from api.exceptions import PermissionDenied
from api.task.response import FailureTaskResponse, mgmt_task_response
from api.mon import MonitoringServ... | apache-2.0 | -7,261,690,916,902,410,000 | 35.712821 | 114 | 0.603855 | false |
samsu/neutron | plugins/vmware/vshield/vcns.py | 7 | 11148 | # Copyright 2013 VMware, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | apache-2.0 | -4,546,187,534,790,633,000 | 36.16 | 78 | 0.602888 | false |
CiscoSystems/vespa | neutron/tests/unit/test_extension_ext_gw_mode.py | 5 | 17930 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Nicira Networks, 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.apac... | apache-2.0 | 8,398,811,226,250,974,000 | 41.287736 | 78 | 0.589292 | false |
alexryndin/ambari | ambari-server/src/main/resources/common-services/RANGER_KMS/0.5.0.2.3/package/scripts/status_params.py | 4 | 1772 | #!/usr/bin/env python
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License");... | apache-2.0 | -1,988,901,467,128,981,200 | 48.25 | 130 | 0.805869 | false |
fredmorcos/attic | projects/pet/archive/pet_python/Expense.py | 1 | 3174 | # This file is part of PET.
#
# PET 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.
#
# PET is distributed in the hope that it will be ... | isc | 2,117,728,532,537,696,800 | 32.765957 | 76 | 0.573724 | false |
Foxfanmedium/python_training | OnlineCoursera/mail_ru/Python_1/env/Lib/site-packages/pygments/lexer.py | 27 | 31054 | # -*- coding: utf-8 -*-
"""
pygments.lexer
~~~~~~~~~~~~~~
Base lexer classes.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import print_function
import re
import sys
import time
from pygments.filter import apply_f... | apache-2.0 | 8,813,109,235,455,041,000 | 34.653272 | 86 | 0.519965 | false |
kvar/ansible | lib/ansible/modules/network/f5/bigip_monitor_dns.py | 23 | 35117 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | 5,142,842,226,742,032,000 | 33.160506 | 121 | 0.614175 | false |
gencer/sentry | src/sentry/web/frontend/setup_wizard.py | 1 | 2553 | from __future__ import absolute_import
from sentry.cache import default_cache
from django.core.urlresolvers import reverse
from sentry.api import client
from sentry.models import ApiToken
from sentry.api.serializers import serialize
from sentry.web.frontend.base import BaseView
from sentry.web.helpers import render_t... | bsd-3-clause | -9,189,342,044,890,550,000 | 33.972603 | 96 | 0.592244 | false |
riteshshrv/trytond-amazon-mws_old | tests/test_views.py | 3 | 1208 | # -*- coding: utf-8 -*-
"""
test_views
Tests Views
"""
import sys
import os
DIR = os.path.abspath(os.path.normpath(
os.path.join(
__file__,
'..', '..', '..', '..', '..', 'trytond'
)
))
if os.path.isdir(DIR):
sys.path.insert(0, os.path.dirname(DIR))
import unittest
import trytond.t... | bsd-3-clause | -3,405,365,500,066,709,000 | 19.133333 | 67 | 0.576987 | false |
anarang/robottelo | tests/foreman/ui/test_variables.py | 2 | 31998 | # -*- encoding: utf-8 -*-
"""Test class for Puppet Smart Variables"""
from robottelo.decorators import (
run_only_on,
skip_if_bug_open,
stubbed,
tier1,
tier3
)
from robottelo.test import UITestCase
class SmartVariablesTestCase(UITestCase):
"""Implements Smart Variables tests in UI"""
@ru... | gpl-3.0 | 2,242,124,118,915,701,000 | 27.291777 | 85 | 0.616726 | false |
lightrabbit/PyBitmessage | src/pyelliptic/cipher.py | 24 | 2675 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Yann GUIBET <yannguibet@gmail.com>
# See LICENSE for details.
from pyelliptic.openssl import OpenSSL
class Cipher:
"""
Symmetric encryption
import pyelliptic
iv = pyelliptic.Cipher.gen_IV('aes-256-cfb')
ctx = pyell... | mit | -7,959,021,914,066,764,000 | 32.024691 | 78 | 0.571589 | false |
swtp1v07/Savu | savu/test/plugin_test.py | 1 | 6514 | # Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... | apache-2.0 | 1,237,722,341,539,480,600 | 34.021505 | 98 | 0.583512 | false |
TheWardoctor/Wardoctors-repo | plugin.video.ukturk/pyxbmct/addonwindow.py | 2 | 33753 | # -*- coding: utf-8 -*-
# PyXBMCt framework module
#
# PyXBMCt is a mini-framework for creating Kodi (XBMC) Python addons
# with arbitrary UI made of Controls - decendants of xbmcgui.Control class.
# The framework uses image textures from Kodi Confluence skin.
#
# Licence: GPL v.3 http://www.gnu.org/licenses/gpl.html
"... | apache-2.0 | 2,308,064,296,341,289,000 | 37.66323 | 301 | 0.637247 | false |
atplanet/ansible-modules-extras | network/snmp_facts.py | 64 | 13253 | #!/usr/bin/python
# This file is part of Networklore's snmp library for Ansible
#
# The module is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ... | gpl-3.0 | -5,114,707,062,175,901,000 | 35.111717 | 170 | 0.584698 | false |
jkur/mmm | mmm/forms.py | 1 | 1345 | from flask_wtf import Form
from wtforms import validators
from wtforms import StringField, PasswordField, BooleanField
from mmm.validators import validate_active_user, validate_domain_name, validate_email_username, validate_combined_email_address
from mmm.models import Domain
from mmm.fields import DomainField
class ... | gpl-3.0 | 1,034,963,670,701,454,700 | 45.37931 | 127 | 0.657993 | false |
lukeroge/CloudBot | cloudbot/util/timeformat.py | 16 | 6479 | """
timeformat.py
Contains functions to format time periods. Based on code from the Django project and CloudBot contributors.
The licensing for this module isn't solid, because I started working on this module before I had a proper
system for tracking code licences. If your code is in this file and you have any queri... | gpl-3.0 | -8,010,178,341,334,576,000 | 35.398876 | 107 | 0.632968 | false |
hyperized/ansible | lib/ansible/modules/network/check_point/cp_mgmt_package_facts.py | 20 | 3953 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage Check Point Firewall (c) 2019
#
# 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 o... | gpl-3.0 | 7,175,181,839,402,612,000 | 30.373016 | 141 | 0.676448 | false |
alphafoobar/intellij-community | python/lib/Lib/encodings/cp860.py | 593 | 34937 | """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP860.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_map)
def decode(self,input,errors='strict'):
... | apache-2.0 | 7,757,508,690,657,279,000 | 49.053009 | 97 | 0.607751 | false |
ClimateImpactLab/open-estimate | openest/models/curve.py | 1 | 7352 | import numpy as np
from .univariate_model import UnivariateModel
from scipy.interpolate import UnivariateSpline
from statsmodels.distributions.empirical_distribution import StepFunction
class UnivariateCurve(UnivariateModel):
def __init__(self, xx):
super(UnivariateCurve, self).__init__(xx_is_categorical=F... | gpl-3.0 | -8,992,992,314,522,749,000 | 34.346154 | 250 | 0.586915 | false |
dmsurti/mayavi | examples/mayavi/interactive/subclassing_mayavi_application.py | 8 | 2818 | #!/usr/bin/env python
"""
This script demonstrates how one can script the Mayavi application by
subclassing the application, create a new scene and create a few
simple modules.
This should be run as::
$ python test.py
"""
# Author: Prabhu Ramachandran <prabhu_r@users.sf.net>
# Copyright (c) 2005-2007, Enthought, ... | bsd-3-clause | -1,704,838,319,344,132,900 | 29.301075 | 81 | 0.611781 | false |
duyetdev/openerp-6.1.1 | openerp/addons/base_report_designer/plugin/openerp_report_designer/bin/script/ConvertFieldsToBraces.py | 6 | 3248 | ##########################################################################
#
# Portions of this file are under the following copyright and license:
#
#
# Copyright (c) 2003-2004 Danny Brewer
# d29583@groovegarden.com
#
# This library is free software; you can redistribute it and/or
# modify it under the ter... | agpl-3.0 | -2,174,614,371,997,651,700 | 36.333333 | 141 | 0.659175 | false |
Pointedstick/ReplicatorG | skein_engines/skeinforge-31/skeinforge_application/skeinforge_plugins/profile_plugins/extrusion.py | 2 | 2448 | """
This page is in the table of contents.
Extrusion is a script to set the extrusion profile for the skeinforge chain.
The displayed craft sequence is the sequence in which the tools craft the model and export the output.
On the extrusion dialog, clicking the 'Add Profile' button will duplicate the selected profile ... | gpl-2.0 | -5,228,756,255,439,439,000 | 37.25 | 352 | 0.754902 | false |
Work4Labs/lettuce | tests/integration/lib/Django-1.2.5/django/contrib/gis/gdal/prototypes/errcheck.py | 404 | 4207 | """
This module houses the error-checking routines used by the GDAL
ctypes prototypes.
"""
from ctypes import c_void_p, string_at
from django.contrib.gis.gdal.error import check_err, OGRException, SRSException
from django.contrib.gis.gdal.libgdal import lgdal
# Helper routines for retrieving pointers and/or values f... | gpl-3.0 | 3,294,816,963,816,750,600 | 32.125984 | 99 | 0.670549 | false |
tangjonathan/HKQuiz | node_modules/pryjs/node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/xcode.py | 126 | 1501 | # -*- coding: utf-8 -*-
"""
pygments.styles.xcode
~~~~~~~~~~~~~~~~~~~~~
Style similar to the `Xcode` default theme.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keyword, N... | mit | 5,279,618,557,816,837,000 | 28.431373 | 86 | 0.483678 | false |
SebasSBM/django | tests/forms_tests/widget_tests/test_clearablefileinput.py | 69 | 4360 | from django.core.files.uploadedfile import SimpleUploadedFile
from django.forms import ClearableFileInput
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
from .base import WidgetTest
@python_2_unicode_compatible
class FakeFieldFile(object):
"""
Quacks like a FieldFi... | bsd-3-clause | -5,933,264,404,170,220,000 | 33.603175 | 99 | 0.600917 | false |
ar7z1/ansible | test/units/parsing/yaml/test_dumper.py | 49 | 2314 | # coding: utf-8
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed i... | gpl-3.0 | 9,001,788,814,376,998,000 | 36.934426 | 137 | 0.696197 | false |
wetek-enigma/enigma2 | lib/python/Screens/ChoiceBox.py | 14 | 7656 | from Screens.Screen import Screen
from Components.ActionMap import NumberActionMap
from Components.Label import Label
from Components.ChoiceList import ChoiceEntryComponent, ChoiceList
from Components.Sources.StaticText import StaticText
from Components.Pixmap import Pixmap
import enigma
class ChoiceBox(Screen):
def ... | gpl-2.0 | 6,485,058,657,450,273,000 | 30.377049 | 173 | 0.638845 | false |
winstonsee/huhamhire-hosts | gui/hostsutil.py | 24 | 4139 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# hostsutil.py : Main entrance to GUI module of Hosts Setup Utility.
#
# Copyleft (C) 2014 - huhamhire hosts team <hosts@huhamhire.com>
# =====================================================================
# Licensed under the GNU General Public License, version 3. You... | gpl-3.0 | 7,342,227,022,685,517,000 | 31.335938 | 78 | 0.609568 | false |
kjc88/sl4a | python/src/Lib/distutils/command/build.py | 53 | 5598 | """distutils.command.build
Implements the Distutils 'build' command."""
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id: build.py 62197 2008-04-07 01:53:39Z mark.hammond $"
import sys, os
from distutils.core import Command
from distutils.errors import DistutilsOptionError
from distutils... | apache-2.0 | -3,191,338,575,643,480,000 | 34.43038 | 76 | 0.571454 | false |
DalikarFT/CFVOP | venv/Lib/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py | 359 | 13092 | from __future__ import absolute_import
import collections
import functools
import logging
try: # Python 3
from urllib.parse import urljoin
except ImportError:
from urlparse import urljoin
from ._collections import RecentlyUsedContainer
from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool
from ... | gpl-3.0 | -1,277,227,093,866,069,500 | 34.673025 | 86 | 0.626337 | false |
jacknjzhou/zerorpc-python | tests/test_server.py | 72 | 5945 | # -*- coding: utf-8 -*-
# Open Source Initiative OSI - The MIT License (MIT):Licensing
#
# The MIT License (MIT)
# Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Softwa... | mit | -892,211,245,218,003,000 | 25.189427 | 81 | 0.650631 | false |
toastdriven/django-budget | budget/categories/models.py | 1 | 1579 | import datetime
from decimal import Decimal
from django.db import models
from django.utils.translation import ugettext_lazy as _
class StandardMetadata(models.Model):
"""
A basic (abstract) model for metadata.
"""
created = models.DateTimeField(_('Created'), default=datetime.datetime.now)
updated ... | mit | -4,709,289,355,159,399,000 | 28.792453 | 83 | 0.663711 | false |
Jorge-Rodriguez/ansible | test/units/modules/network/f5/test_bigip_profile_tcp.py | 21 | 3343 | # -*- 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 | -8,019,986,213,044,042,000 | 27.818966 | 91 | 0.65869 | false |
eaplatanios/tensorflow | tensorflow/compiler/tests/xla_test.py | 6 | 9859 | # 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 | 8,058,724,228,768,463,000 | 37.814961 | 80 | 0.661933 | false |
ganeshgore/myremolab | server/src/build/lib.linux-i686-2.7/weblab/core/db.py | 2 | 32124 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2005 onwards University of Deusto
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
# This software consists of contributions made by many individuals,
# list... | bsd-2-clause | 4,854,411,994,246,085,000 | 42.58616 | 198 | 0.57862 | false |
ATIX-AG/ansible | lib/ansible/modules/clustering/consul_acl.py | 33 | 22133 | #!/usr/bin/python
#
# (c) 2015, Steve Gargan <steve.gargan@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,954,943,738,501,059,000 | 32.484115 | 119 | 0.645326 | false |
h3llrais3r/subliminal | subliminal/converters/thesubdb.py | 45 | 1123 | # -*- coding: utf-8 -*-
from babelfish import LanguageReverseConverter
from ..exceptions import ConfigurationError
class TheSubDBConverter(LanguageReverseConverter):
def __init__(self):
self.from_thesubdb = {'en': ('eng',), 'es': ('spa',), 'fr': ('fra',), 'it': ('ita',), 'nl': ('nld',),
... | mit | 5,536,875,908,838,532,000 | 42.192308 | 114 | 0.594835 | 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.