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 |
|---|---|---|---|---|---|---|---|---|---|---|
tensorflow/agents | tf_agents/policies/policy_info_updater_wrapper_test.py | 1 | 4131 | # coding=utf-8
# Copyright 2020 The TF-Agents Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | -8,272,719,503,736,344,000 | 34.307692 | 80 | 0.670782 | false |
micropython/micropython | examples/bluetooth/ble_bonding_peripheral.py | 7 | 6806 | # This example demonstrates a simple temperature sensor peripheral.
#
# The sensor's local value updates every second, and it will notify
# any connected central every 10 seconds.
#
# Work-in-progress demo of implementing bonding and passkey auth.
import bluetooth
import random
import struct
import time
import json
im... | mit | -7,538,598,152,803,447,000 | 34.082474 | 98 | 0.576256 | false |
uwescience/raco | raco/operator_test.py | 1 | 6417 | import unittest
import raco.fakedb
from raco.relation_key import RelationKey
from raco.algebra import *
from raco.expression import *
import raco.relation_key as relation_key
from raco.expression import StateVar
class TestQueryFunctions():
emp_table = collections.Counter([
# id dept_id name salary
... | bsd-3-clause | -5,599,851,410,658,585,000 | 42.067114 | 78 | 0.601839 | false |
dlazz/ansible | lib/ansible/executor/action_write_locks.py | 140 | 1911 | # (c) 2016 - Red Hat, Inc. <info@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 versi... | gpl-3.0 | -5,606,496,526,016,088,000 | 42.431818 | 100 | 0.725798 | false |
plivo/plivo-python | tests/resources/test_multipartycalls.py | 1 | 22887 | # -*- coding: utf-8 -*-
import json
from plivo.base import (ListResponseObject)
from plivo.exceptions import ValidationError
from plivo.resources import MultiPartyCall, MultiPartyCallParticipant
from plivo.utils.signature_v3 import construct_get_url
from tests.base import PlivoResourceTestCase
from tests.decorators im... | mit | 6,622,311,979,294,217,000 | 49.747228 | 120 | 0.600341 | false |
gaqzi/ansible-modules-extras | monitoring/zabbix_hostmacro.py | 91 | 7996 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013-2014, Epic Games, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (... | gpl-3.0 | -3,729,917,556,150,006,300 | 33.765217 | 130 | 0.612181 | false |
cfei18/incubator-airflow | airflow/contrib/kubernetes/pod_generator.py | 10 | 4846 | # 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 | 4,749,823,094,371,973,000 | 28.369697 | 80 | 0.546017 | false |
Taffer/courses | algs-2/week-5/tsp.py | 1 | 4969 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
In this assignment you will implement one or more algorithms for the travelling
salesman problem, such as the dynamic programming algorithm covered in the
video lectures. Here is a data file describing a TSP instance. The first line
indicates the number of cities. E... | cc0-1.0 | 4,215,287,711,296,059,400 | 33.435714 | 106 | 0.550494 | false |
PatriGotts3/Patrick | py/openage/convert/gamedata/sound.py | 46 | 1288 | from .. import dataformat
from struct import Struct, unpack_from
from ..util import dbg, zstr
from .empiresdat import endianness
class SoundItem(dataformat.Exportable):
name_struct = "sound_item"
name_struct_file = "sound"
struct_description = "one possible file for a sound."
data_format = ... | gpl-3.0 | -302,138,318,042,517,100 | 29.666667 | 80 | 0.592391 | false |
Cinntax/home-assistant | homeassistant/components/velux/cover.py | 2 | 3262 | """Support for Velux covers."""
from homeassistant.components.cover import (
ATTR_POSITION,
SUPPORT_CLOSE,
SUPPORT_OPEN,
SUPPORT_SET_POSITION,
SUPPORT_STOP,
CoverDevice,
)
from homeassistant.core import callback
from . import DATA_VELUX
async def async_setup_platform(hass, config, async_add_e... | apache-2.0 | -5,465,765,020,156,761,000 | 29.485981 | 86 | 0.629675 | false |
stonebig/numba | numba/cuda/tests/cudapy/test_globals.py | 7 | 1384 | import numpy as np
from numba import cuda, int32, float32
from numba.cuda.testing import unittest, CUDATestCase
N = 100
def simple_smem(ary):
sm = cuda.shared.array(N, int32)
i = cuda.grid(1)
if i == 0:
for j in range(N):
sm[j] = j
cuda.syncthreads()
ary[i] = sm[i]
S0 = 10
S... | bsd-2-clause | -5,207,772,284,643,175,000 | 22.066667 | 72 | 0.549133 | false |
justathoughtor2/atomicApe | cygwin/lib/python2.7/site-packages/pylint/test/functional/dangerous_default_value.py | 26 | 2198 | # pylint: disable=missing-docstring
HEHE = {}
def function1(value=[]): # [dangerous-default-value]
"""docstring"""
return value
def function2(value=HEHE): # [dangerous-default-value]
"""docstring"""
return value
def function3(value):
"""docstring"""
return value
def function4(value=set()):... | gpl-3.0 | 9,121,321,689,752,976,000 | 26.822785 | 80 | 0.66333 | false |
hackerbot/DjangoDev | tests/custom_methods/models.py | 66 | 1260 | """
Giving models custom methods
Any method you add to a model will be available to instances.
"""
import datetime
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Article(models.Model):
headline = models.CharField(max_length=100)
... | bsd-3-clause | 5,170,940,489,893,098,000 | 30.5 | 85 | 0.618254 | false |
slisson/intellij-community | plugins/hg4idea/testData/bin/mercurial/windows.py | 93 | 10768 | # windows.py - Windows utility function implementations for Mercurial
#
# Copyright 2005-2009 Matt Mackall <mpm@selenic.com> and others
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from i18n import _
import osutil, encoding
im... | apache-2.0 | -5,848,597,343,549,444,000 | 30.0317 | 80 | 0.624443 | false |
gaolichuang/py-task-framework | nova/android/api/androids.py | 1 | 6058 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | apache-2.0 | -3,414,899,740,788,204,000 | 35.065476 | 89 | 0.644932 | false |
svenstaro/ansible | lib/ansible/modules/system/pamd.py | 48 | 20246 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Kenneth D. Evensen <kevensen@redhat.com>
#
# This file is part of Ansible (sort of)
#
# 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 vers... | gpl-3.0 | 5,253,559,781,563,742,000 | 34.644366 | 79 | 0.550874 | false |
Distrotech/urlgrabber | urlgrabber/byterange.py | 2 | 17143 | # 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 your option) any later version.
#
# This library is distributed in the hope that it w... | lgpl-2.1 | -1,420,810,477,897,479,700 | 36.025918 | 111 | 0.57522 | false |
mindnervestech/mnrp | addons/report_webkit/webkit_report.py | 234 | 16702 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com)
# All Right Reserved
#
# Author : Nicolas Bessi (Camptocamp)
# Contributor(s) : Florent Xicluna (Wingo SA)
#
# WARNING: This program as such is intended... | agpl-3.0 | -3,197,779,269,458,478,000 | 42.046392 | 131 | 0.578074 | false |
jcchin/Hyperloop_v2 | src/hyperloop/Python/structural_optimization.py | 4 | 17480 | from __future__ import print_function
import numpy as np
import matplotlib.pylab as plt
from openmdao.api import IndepVarComp, Component, Group, Problem, ExecComp, ScipyOptimizer
class StructuralOptimization(Component):
"""
Notes
-----
Estimates tube tunnel cost and pylon material cost
Optimizes t... | apache-2.0 | -786,222,439,212,988,300 | 40.621429 | 146 | 0.526831 | false |
blorgon9000/pyopus | demo/evaluation/01-simulator-spectre/runme.py | 1 | 3218 | # Test Spectre simulator interface
from pyopus.simulator import simulatorClass
if __name__=='__main__':
# Job list for simulator
jobList=[
{ # First job - op analysis
'name': 'dcop',
'definitions': [
{ 'file': 'cmos180n.scs', 'section': 'tm' },
{ 'file': 'opamp.scs' }
],
'param... | gpl-3.0 | 180,936,264,081,400,450 | 20.054795 | 78 | 0.505594 | false |
SpotlightKid/aescrypt | test_aescrypt.py | 1 | 4393 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Test suite for aescrypt.py."""
from __future__ import print_function, unicode_literals
from io import BytesIO
from aescrypt import encrypt, decrypt
from Crypto.Cipher import AES
from nose.tools import raises
password = 'q1w2e3r4'
plaintext = """\
Lorem ipsum dolor s... | mit | -7,785,273,851,161,321,000 | 35.608333 | 79 | 0.709083 | false |
ArcherSys/ArcherSys | Lib/site-packages/jupyter_core/tests/dotipython/profile_default/ipython_kernel_config.py | 24 | 15358 | # Configuration file for ipython-kernel.
c = get_config()
#------------------------------------------------------------------------------
# IPKernelApp configuration
#------------------------------------------------------------------------------
# IPython: an enhanced interactive Python shell.
# IPKernelApp will in... | mit | 5,421,142,911,177,714,000 | 36.642157 | 562 | 0.703607 | false |
analurandis/Tur | backend/venv/Lib/site-packages/git/test/test_repo.py | 2 | 27790 | # test_repo.py
# Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors
#
# This module is part of GitPython and is released under
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
from git.test.lib import (
patch,
TestBase,
with_rw_repo,
fixture,
assert_false... | mit | -7,678,527,409,440,398,000 | 35.326797 | 120 | 0.583843 | false |
brandond/ansible | lib/ansible/modules/remote_management/ucs/ucs_disk_group_policy.py | 21 | 16473 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 | -7,868,553,690,273,857,000 | 37.929078 | 139 | 0.602417 | false |
vlachoudis/sl4a | python/src/Lib/distutils/version.py | 50 | 11486 | #
# distutils/version.py
#
# Implements multiple version numbering conventions for the
# Python Module Distribution Utilities.
#
# $Id: version.py 71270 2009-04-05 21:11:43Z georg.brandl $
#
"""Provides classes to represent module version numbers (one class for
each style of version numbering). There are currently tw... | apache-2.0 | 3,461,679,928,174,825,000 | 37.414716 | 79 | 0.65323 | false |
therealAJ/torch | vision/analysis.py | 1 | 1069 | import config
import httplib
import urllib
import base64
import sys
import requests
# #### HTTP Headers + Encoding the URL
def vision(filepath):
file = open(filepath, 'rb').read()
files = {'file': file}
headers = {
'Content-Type': 'application/octet-stream',
'Ocp-Apim-Subscription-Key': c... | mit | -6,862,799,391,377,058,000 | 24.452381 | 79 | 0.600561 | false |
popazerty/obh-test1 | lib/python/Screens/InfoBarGenerics.py | 4 | 114010 | from ChannelSelection import ChannelSelection, BouquetSelector, SilentBouquetSelector
from Components.ActionMap import ActionMap, HelpableActionMap
from Components.ActionMap import NumberActionMap
from Components.Harddisk import harddiskmanager
from Components.Input import Input
from Components.Label import Label
from... | gpl-2.0 | -5,962,498,440,173,883,000 | 33.257813 | 267 | 0.719963 | false |
desmovalvo/virtualsib-part2bis | tools/explo2/SS_HelloWorld_reactiveNode.py | 5 | 1712 | import Node
import time
import sys
# Create a node instance
# Programmer can give any name
# The infrastucture will assign unigue names ???
node = Node.ParticipantNode("HelloWorld reactive")
# Discover Smart Spaces around you
# Use the technologies used at the "vertical business domain"
# E.g. mDNS, UPnP, UDDI, B... | lgpl-3.0 | 5,411,659,622,510,113,000 | 24.552239 | 85 | 0.679322 | false |
huguesv/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/cryptography/hazmat/primitives/asymmetric/ed448.py | 13 | 2322 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import abc
import six
from cryptography.exceptions import UnsupportedAl... | apache-2.0 | -8,163,310,347,269,767,000 | 28.392405 | 79 | 0.639966 | false |
jswope00/GAI | cms/djangoapps/contentstore/features/component.py | 2 | 6265 | # pylint: disable=C0111
# pylint: disable=W0621
# Lettuce formats proposed definitions for unimplemented steps with the
# argument name "step" instead of "_step" and pylint does not like that.
# pylint: disable=W0613
from lettuce import world, step
from nose.tools import assert_true, assert_in # pylint: disable=E061... | agpl-3.0 | -7,972,234,179,230,192,000 | 34 | 106 | 0.636393 | false |
dreibh/planetlab-lxc-plcapi | PLC/Methods/UpdateNodeGroup.py | 1 | 1428 | from PLC.Faults import *
from PLC.Method import Method
from PLC.Parameter import Parameter, Mixed
from PLC.NodeGroups import NodeGroup, NodeGroups
from PLC.Auth import Auth
can_update = lambda field_value: field_value[0] in ['groupname','value']
class UpdateNodeGroup(Method):
"""
Updates a custom node group.
... | bsd-3-clause | 4,292,266,281,882,480,600 | 30.733333 | 89 | 0.642857 | false |
Dino0631/RedRain-Bot | lib/youtube_dl/extractor/rmcdecouverte.py | 31 | 1704 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from .brightcove import BrightcoveLegacyIE
from ..compat import (
compat_parse_qs,
compat_urlparse,
)
class RMCDecouverteIE(InfoExtractor):
_VALID_URL = r'https?://rmcdecouverte\.bfmtv\.com/mediaplayer-replay.*?\bid... | gpl-3.0 | -9,193,579,174,040,321,000 | 36.866667 | 147 | 0.611502 | false |
USGSDenverPychron/pychron | pychron/canvas/canvas2D/base_data_canvas.py | 1 | 7538 | # ===============================================================================
# Copyright 2011 Jake Ross
#
# 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/licens... | apache-2.0 | -8,265,133,174,522,210,000 | 28.104247 | 81 | 0.517777 | false |
hfp/tensorflow-xsmm | tensorflow/compiler/tests/reduce_window_test.py | 22 | 3522 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -3,100,178,065,687,168,500 | 33.529412 | 80 | 0.576377 | false |
tokibito/django-csvutils | csvutils/forms.py | 1 | 2017 | #:coding=utf-8:
import csv
from django import forms
from django.forms.formsets import (
TOTAL_FORM_COUNT, INITIAL_FORM_COUNT, MAX_NUM_FORM_COUNT,
DELETION_FIELD_NAME, BaseFormSet, formset_factory
)
from django.forms.models import modelformset_factory, BaseModelFormSet
from utils import UnicodeReader
def csv... | bsd-3-clause | 4,705,574,106,901,738,000 | 33.775862 | 100 | 0.633614 | false |
HPCGISLab/TwitterMethods | tweetproc/geo.py | 1 | 1741 | #!/usr/bin/python
"""
Copyright (c) 2014 High-Performance Computing and GIS (HPCGIS) Laboratory. All rights reserved.
Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Authors and contributors: Eric Shook (eshook@kent.edu);
Website: http://hpcgis.geog.kent.edu
"""
import... | bsd-3-clause | -1,810,211,721,775,555,600 | 29.54386 | 97 | 0.553705 | false |
dims/test-infra | gubernator/filters_test.py | 14 | 6842 | #!/usr/bin/env python
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | -1,103,014,228,959,136,800 | 39.97006 | 98 | 0.564163 | false |
tangp3/gpdb | gpMgmt/bin/gppylib/system/environment.py | 20 | 3823 | #!/usr/bin/env python
#
# Copyright (c) Greenplum Inc 2010. All Rights Reserved.
#
from gppylib import gplog, pgconf
from gppylib.commands import gp
from gppylib.db import catalog, dbconn
from gppylib.utils import toNonNoneString, checkNotNone
logger = gplog.get_default_logger()
class GpMasterEnvironment:
"""
... | apache-2.0 | 6,088,565,105,380,580,000 | 42.942529 | 115 | 0.672247 | false |
PetePriority/home-assistant | homeassistant/components/group/reproduce_state.py | 11 | 1149 | """Module that groups code required to handle state restore for component."""
from typing import Iterable, Optional
from homeassistant.core import Context, State
from homeassistant.helpers.typing import HomeAssistantType
from homeassistant.loader import bind_hass
@bind_hass
async def async_reproduce_states(hass: Hom... | apache-2.0 | 6,179,982,369,096,936,000 | 40.035714 | 77 | 0.605744 | false |
agaffney/ansible | hacking/build_library/build_ansible/command_plugins/file_deprecated_issues.py | 63 | 5460 | # -*- coding: utf-8 -*-
# (c) 2017, Matt Martz <matt@sivel.net>
# (c) 2019, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import argpar... | gpl-3.0 | 5,385,607,955,389,102,000 | 34.686275 | 99 | 0.599634 | false |
2014c2g4/2015cda_g7 | static/Brython3.1.0-20150301-090019/Lib/sys.py | 109 | 4959 | # hack to return special attributes
from _sys import *
from javascript import JSObject
has_local_storage=__BRYTHON__.has_local_storage
has_session_storage = __BRYTHON__.has_session_storage
has_json=__BRYTHON__.has_json
argv = ['__main__']
base_exec_prefix = __BRYTHON__.brython_path
base_prefix = __BRYTHON__.brython... | gpl-3.0 | -4,438,241,983,687,053,300 | 27.176136 | 153 | 0.632991 | false |
ccomb/OpenUpgrade | addons/board/controllers.py | 44 | 1981 | # -*- coding: utf-8 -*-
from xml.etree import ElementTree
from openerp.addons.web.controllers.main import load_actions_from_ir_values
from openerp.addons.web.http import Controller, route, request
class Board(Controller):
@route('/board/add_to_dashboard', type='json', auth='user')
def add_to_dashboard(self, m... | agpl-3.0 | -3,231,587,812,749,857,300 | 49.794872 | 99 | 0.49369 | false |
edulramirez/nova | nova/tests/functional/db/test_cell_mapping.py | 43 | 3091 | # 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 writing, software
# d... | apache-2.0 | -4,471,875,916,688,600,000 | 40.77027 | 79 | 0.640246 | false |
atosorigin/ansible | test/units/module_utils/basic/test__log_invocation.py | 169 | 1797 | # -*- coding: utf-8 -*-
# (c) 2016, James Cammarata <jimi@sngx.net>
# (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import pytest
ARGS = dict(foo=False, bar=... | gpl-3.0 | 493,147,803,859,165,000 | 31.672727 | 126 | 0.619922 | false |
nelmiux/CarnotKE | jyhton/Lib/test/test_zlib_jy.py | 23 | 1039 | """Misc zlib tests
Made for Jython.
"""
import unittest
import zlib
from array import array
from test import test_support
class ArrayTestCase(unittest.TestCase):
def test_array(self):
self._test_array(zlib.compress, zlib.decompress)
def test_array_compressobj(self):
def compress(value):
... | apache-2.0 | -5,590,856,568,018,971,000 | 27.081081 | 76 | 0.641001 | false |
cogeorg/BlackRhino | examples/Georg2012/networkx/algorithms/centrality/load.py | 13 | 6019 | """
Load centrality.
"""
# Copyright (C) 2004-2010 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
__author__ = "\n".join(['Aric Hagberg (hagberg@lanl.gov)',
'Pieter Swart (swart@la... | gpl-3.0 | -3,420,675,718,788,104,700 | 31.535135 | 82 | 0.598604 | false |
BonexGu/Blik2D-SDK | Blik2D/addon/tensorflow-1.2.1_for_blik/tensorflow/contrib/factorization/python/ops/gmm.py | 47 | 5877 | # 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... | mit | 5,530,176,464,408,076,000 | 37.664474 | 85 | 0.667177 | false |
vmturbo/nova | nova/tests/unit/test_conf.py | 5 | 3768 | # Copyright 2016 HPE, 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 to in writing, sof... | apache-2.0 | 8,575,269,983,892,839,000 | 37.060606 | 76 | 0.626327 | false |
bud4/samba | python/samba/tests/registry.py | 1 | 2444 | # Unix SMB/CIFS implementation.
# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) a... | gpl-3.0 | 2,811,753,070,063,138,000 | 31.586667 | 79 | 0.687398 | false |
elijah513/fabric | fabric/network.py | 19 | 25040 | """
Classes and subroutines dealing with network connections and related topics.
"""
from __future__ import with_statement
from functools import wraps
import getpass
import os
import re
import time
import socket
import sys
from StringIO import StringIO
from fabric.auth import get_password, set_password
from fabric.... | bsd-2-clause | 3,373,295,977,121,165,000 | 36.317437 | 164 | 0.621446 | false |
mdxy2010/forlinux-ok6410 | u-boot15/tools/patman/get_maintainer.py | 57 | 1238 | # Copyright (c) 2012 The Chromium OS Authors.
#
# SPDX-License-Identifier: GPL-2.0+
#
import command
import gitutil
import os
def FindGetMaintainer():
"""Look for the get_maintainer.pl script.
Returns:
If the script is found we'll return a path to it; else None.
"""
try_list = [
os.pa... | gpl-2.0 | -721,629,190,842,688,800 | 25.340426 | 74 | 0.634895 | false |
cjgrady/compression | poc/src/scripts/addFileSizes.py | 1 | 1109 | """
@summary: Adds file sizes to csv file
"""
import csv
import os
inCsvFn = '/data/geo716/final project/data/projections2.csv'
outCsvFn = '/data/geo716/final project/data/projections.csv'
binDir = '/data/geo716/final project/data/bins/'
rleDir = '/data/geo716/final project/data/rles/'
hilbertDir = '/data/geo716/fina... | gpl-2.0 | -1,368,783,571,387,142,000 | 26.04878 | 60 | 0.603246 | false |
acshi/osf.io | scripts/migration/migrate_registration_extra_again.py | 6 | 4147 | """
Changes existing question.extra on all registrations and draft registrations
to a list. Required for multiple files attached to a question.
"""
import sys
import logging
from modularodm import Q
from website.app import init_app
from scripts import utils as scripts_utils
from website.models import Node, DraftRegist... | apache-2.0 | 7,371,923,188,198,622,000 | 43.117021 | 148 | 0.542802 | false |
JohnKendrick/PDielec | PDielec/GUI/ScenarioTab.py | 1 | 32714 | # -*- coding: utf8 -*-
from PyQt5.QtWidgets import QPushButton, QWidget
from PyQt5.QtWidgets import QComboBox, QLabel, QLineEdit, QDoubleSpinBox
from PyQt5.QtWidgets import QVBoxLayout, QHBoxLayout, QFormLayout
from PyQt5.QtWidgets import QSpinBox
from PyQt5.QtCore import Qt
from PDielec.Constants import ... | mit | -6,811,763,940,735,617,000 | 47.314623 | 324 | 0.646366 | false |
sudkannan/xen-hv | dist/install/usr/lib64/python2.6/site-packages/xen/xend/server/tests/test_controllers.py | 49 | 2066 | import os
import re
import unittest
import xen.xend.XendOptions
xen.xend.XendOptions.XendOptions.config_default = '/dev/null'
from xen.xend.server import netif
FAKE_DOMID = 42
FAKE_DEVID = 63
xoptions = xen.xend.XendOptions.instance()
class test_controllers(unittest.TestCase):
def testNetif(self):
... | gpl-2.0 | -8,684,571,741,557,667,000 | 24.506173 | 75 | 0.605034 | false |
adsabs/adsabs-pyingest | pyingest/parsers/iop.py | 1 | 4766 | #!/usr/bin/env python
from __future__ import print_function
from __future__ import absolute_import
from past.builtins import basestring
import string
from pyingest.config.utils import u2asc
from .jats import JATSParser
from .author_init import AuthorInitial
from pyingest.config.config import *
from pyingest.parsers.en... | mit | -3,569,219,109,739,658,000 | 30.562914 | 96 | 0.484893 | false |
Ensighten/ansible | lib/ansible/utils/cmd_functions.py | 160 | 1955 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | gpl-3.0 | 8,541,835,875,833,706,000 | 32.135593 | 81 | 0.627621 | false |
Chilledheart/gyp | test/copies/gyptest-default.py | 264 | 1268 | #!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies file copies using the build tool default.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('copies.gyp', chdir='src'... | bsd-3-clause | 3,650,144,472,295,686,000 | 30.7 | 79 | 0.571767 | false |
fldc/CouchPotatoServer | couchpotato/core/media/movie/providers/automation/hummingbird.py | 44 | 2345 | from couchpotato.core.logger import CPLog
from couchpotato.core.media.movie.providers.automation.base import Automation
log = CPLog(__name__)
autoload = 'Hummingbird'
class Hummingbird(Automation):
def getIMDBids(self):
movies = []
for movie in self.getWatchlist():
imdb = self.search(movie[0], movie[1])
... | gpl-3.0 | -1,326,674,079,616,135,200 | 21.548077 | 90 | 0.592324 | false |
joachimmetz/dfvfs | tests/vfs/gzip_file_system.py | 2 | 2511 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for the file system implementation using gzip."""
import unittest
from dfvfs.lib import definitions
from dfvfs.path import factory as path_spec_factory
from dfvfs.resolver import context
from dfvfs.vfs import gzip_file_system
from tests import test_lib as shared... | apache-2.0 | -3,193,405,720,637,602,300 | 31.192308 | 73 | 0.715651 | false |
GNOME/gedit-plugins | plugins/translate/translate/__init__.py | 1 | 7109 | # -*- coding: utf-8 -*-
#
# Copyrignt (C) 2017 Jordi Mas <jmas@softcatala.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any l... | gpl-2.0 | -3,041,369,959,623,184,400 | 32.691943 | 96 | 0.643269 | false |
kjw0106/boto | tests/integration/logs/test_layer1.py | 114 | 1814 | # Copyright (c) 2014 Amazon.com, Inc. or its affiliates.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the right... | mit | -918,266,762,408,040,800 | 41.186047 | 74 | 0.708931 | false |
tpodowd/boto | tests/unit/ec2/test_spotinstance.py | 114 | 5101 | from tests.unit import AWSMockServiceTestCase
from boto.ec2.connection import EC2Connection
class TestCancelSpotInstanceRequests(AWSMockServiceTestCase):
connection_class = EC2Connection
def default_body(self):
return b"""
<CancelSpotInstanceRequestsResponse xmlns="http://ec2.amazonaws.... | mit | -8,027,481,329,946,462,000 | 45.372727 | 101 | 0.583219 | false |
alhashash/odoomrp-wip | account_treasury_forecast/wizard/wiz_create_invoice.py | 31 | 2577 | # -*- encoding: utf-8 -*-
##############################################################################
#
# 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 Free Software Foundation, either version 3 of the... | agpl-3.0 | 920,959,059,785,803,100 | 46.722222 | 79 | 0.563834 | false |
zifeo/nest-simulator | pynest/examples/testiaf.py | 9 | 4011 | # -*- coding: utf-8 -*-
#
# testiaf.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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
# (... | gpl-2.0 | 6,934,015,709,891,981,000 | 29.853846 | 78 | 0.711793 | false |
serensoner/CouchPotatoServer | libs/guessit/transfo/split_path_components.py | 150 | 1292 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2012 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... | gpl-3.0 | -4,375,744,320,823,382,500 | 34.888889 | 75 | 0.732972 | false |
appliedx/edx-platform | common/djangoapps/request_cache/middleware.py | 98 | 1225 | import threading
class _RequestCache(threading.local):
"""
A thread-local for storing the per-request cache.
"""
def __init__(self):
super(_RequestCache, self).__init__()
self.data = {}
self.request = None
REQUEST_CACHE = _RequestCache()
class RequestCache(object):
@cla... | agpl-3.0 | -5,532,169,978,383,666,000 | 23.5 | 80 | 0.590204 | false |
brocade/pysdn | samples/sampleopenflow/demos/demo32.py | 1 | 7216 | #!/usr/bin/python
# Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, INC
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright n... | bsd-3-clause | -6,552,272,290,496,929,000 | 35.261307 | 78 | 0.528686 | false |
iancmcc/txrestapi | txrestapi/tests.py | 1 | 6276 | import txrestapi
__package__="txrestapi"
import re
import os.path
import doctest
from six import PY2, b, u
from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks
from twisted.web.resource import Resource, NoResource
from twisted.web.server import Request, Site
from twisted.web.client im... | mit | 4,429,126,560,370,019,300 | 31.020408 | 90 | 0.567718 | false |
fernandezcuesta/ansible | lib/ansible/modules/notification/hipchat.py | 8 | 6387 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.0',
... | gpl-3.0 | 6,378,471,264,055,971,000 | 28.298165 | 103 | 0.616721 | false |
apache/airflow | tests/api_connexion/endpoints/test_pool_endpoint.py | 3 | 21313 | # 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,031,777,688,801,046,000 | 35.308348 | 109 | 0.516868 | false |
zstackorg/zstack-woodpecker | integrationtest/vm/virtualrouter/pf/test_pf_qos.py | 2 | 3086 | '''
New Integration Test for pf vip qos.
@author: chenyuanxu
'''
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.test_state as test_state
import zstackwoodpecker.zstack_test.zstack_test_port_forwarding as zstack_pf_header
import apibinding.inventory... | apache-2.0 | 8,277,833,984,798,690,000 | 34.471264 | 180 | 0.701879 | false |
i5o/sugar | src/jarabe/model/neighborhood.py | 9 | 45287 | # Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# ... | gpl-2.0 | -3,046,276,115,985,024,000 | 40.095281 | 79 | 0.574116 | false |
WholeGrainGoats/servo | tests/wpt/web-platform-tests/tools/pytest/testing/test_assertion.py | 170 | 19078 | # -*- coding: utf-8 -*-
import sys
import textwrap
import _pytest.assertion as plugin
import _pytest._code
import py
import pytest
from _pytest.assertion import reinterpret
from _pytest.assertion import util
PY3 = sys.version_info >= (3, 0)
@pytest.fixture
def mock_config():
class Config(object):
verbos... | mpl-2.0 | 5,861,076,838,529,801,000 | 29.35828 | 111 | 0.477839 | false |
azureplus/hue | apps/sqoop/src/sqoop/client/link.py | 33 | 3050 | # 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 file ex... | apache-2.0 | 650,738,742,025,169,300 | 35.746988 | 162 | 0.687541 | false |
JonasAZou/hellodjango | hello/passwordsafe/views.py | 1 | 6213 | #-*- encoding: utf-8 -*-
from django.contrib.auth import authenticate, login as login_user, logout as logout_user
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.shortcuts import render, get_object_or_404
from django.core.urlresolvers import reverse
fro... | mit | 1,957,217,833,394,355,000 | 34.293103 | 100 | 0.601042 | false |
hongruiqi/uboot | board/pxa255_idp/pxa_reg_calcs.py | 267 | 11108 | #!/usr/bin/python
# (C) Copyright 2004
# BEC Systems <http://bec-systems.com>
# Cliff Brake <cliff.brake@gmail.com>
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the Li... | gpl-2.0 | -684,583,150,444,385,300 | 34.717042 | 128 | 0.552395 | false |
camptocamp/odoo | addons/point_of_sale/controllers/main.py | 9 | 3010 | # -*- coding: utf-8 -*-
import logging
import simplejson
import os
import openerp
import time
import random
from openerp import http
from openerp.http import request
from openerp.addons.web.controllers.main import module_boot, login_redirect
_logger = logging.getLogger(__name__)
html_template = """<!DOCTYPE html>
<h... | agpl-3.0 | 1,906,714,851,618,637,300 | 39.675676 | 119 | 0.596013 | false |
aktech/sympy | sympy/physics/quantum/tests/test_represent.py | 124 | 5124 | from sympy import Float, I, Integer, Matrix
from sympy.external import import_module
from sympy.utilities.pytest import skip
from sympy.physics.quantum.dagger import Dagger
from sympy.physics.quantum.represent import (represent, rep_innerproduct,
rep_expectation, enumerate_... | bsd-3-clause | 6,487,489,925,658,206,000 | 26.255319 | 79 | 0.616511 | false |
ikoula/cloudstack | tools/ngui/config.py | 7 | 1025 | #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 thi... | gpl-2.0 | -4,074,500,605,323,136,000 | 47.809524 | 98 | 0.816585 | false |
martinbuc/missionplanner | Lib/site-packages/scipy/optimize/tests/test_linesearch.py | 53 | 8856 | """
Tests for line search routines
"""
import sys
from numpy.testing import assert_, assert_equal, dec, \
assert_array_almost_equal, assert_array_almost_equal_nulp
import scipy.optimize.linesearch as ls
import numpy as np
def assert_wolfe(s, phi, derphi, c1=1e-4, c2=0.9, err_msg=""):
"""
Check that stro... | gpl-3.0 | 3,960,776,984,562,247,000 | 34.709677 | 158 | 0.506436 | false |
vineodd/PIMSim | GEM5Simulation/gem5/src/dev/arm/RealView.py | 2 | 44262 | # Copyright (c) 2009-2018 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functiona... | gpl-3.0 | -7,550,908,812,702,500,000 | 38.875676 | 103 | 0.627175 | false |
dragondjf/md2html | Cheetah/ImportManager.py | 16 | 17547 | """
Provides an emulator/replacement for Python's standard import system.
@@TR: Be warned that Import Hooks are in the deepest, darkest corner of Python's
jungle. If you need to start hacking with this, be prepared to get lost for a
while. Also note, this module predates the newstyle import hooks in Python 2.3
http:/... | mit | -6,878,072,827,268,643,000 | 31.434381 | 103 | 0.491651 | false |
awatts/boto | boto/cloudtrail/layer1.py | 125 | 17002 | # Copyright (c) 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights ... | mit | 6,112,272,619,033,306,000 | 44.459893 | 108 | 0.659393 | false |
JT5D/Alfred-Popclip-Sublime | Sublime Text 2/Python PEP8 Autoformat/libs/lib2to3/fixes/fix_dict.py | 7 | 3798 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Fixer for dict methods.
d.keys() -> list(d.keys())
d.items() -> list(d.items())
d.values() -> list(d.values())
d.iterkeys() -> iter(d.keys())
d.iteritems() -> iter(d.items())
d.itervalues() -> iter(d.values())
d.v... | gpl-2.0 | -4,492,957,381,323,675,600 | 35.171429 | 78 | 0.563191 | false |
Varentsov/servo | tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/servo.py | 8 | 2582 | import os
from .base import NullBrowser, ExecutorBrowser, require_arg
from ..executors import executor_kwargs as base_executor_kwargs
from ..executors.executorservo import ServoTestharnessExecutor, ServoRefTestExecutor, ServoWdspecExecutor
here = os.path.join(os.path.split(__file__)[0])
__wptrunner__ = {
"produc... | mpl-2.0 | -600,341,861,695,467,300 | 30.487805 | 105 | 0.617351 | false |
nitin-cherian/LifeLongLearning | Web_Development_Python/RealPython/flask-hello-world/env/lib/python3.5/site-packages/werkzeug/urls.py | 216 | 36710 | # -*- coding: utf-8 -*-
"""
werkzeug.urls
~~~~~~~~~~~~~
``werkzeug.urls`` used to provide several wrapper functions for Python 2
urlparse, whose main purpose were to work around the behavior of the Py2
stdlib and its lack of unicode support. While this was already a somewhat
inconvenient situat... | mit | 3,670,937,643,344,451,000 | 35.556773 | 83 | 0.591042 | false |
escorciav/linux-utils | hacks/compress_folder.py | 1 | 2153 | #!/bin/env python
"""
Compress and delete a folder if 50% of the files inside it are less than 2MB.
It only considers files in the first level of the folder.
"""
import os
import shutil
import sys
import tarfile
from contextlib import contextmanager
@contextmanager
def cd(newdir):
prevdir = os.getcwd()
os.... | mit | -2,992,386,942,273,787,000 | 26.961039 | 77 | 0.632606 | false |
loco-odoo/localizacion_co | openerp/addons/hr_timesheet_sheet/wizard/__init__.py | 443 | 1075 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 9,143,351,188,883,748,000 | 42 | 78 | 0.616744 | false |
drufat/vispy | vispy/visuals/sphere.py | 7 | 3002 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... | bsd-3-clause | -3,606,892,992,771,220,500 | 37.487179 | 79 | 0.551299 | false |
WillisXChen/django-oscar | oscar/lib/python2.7/site-packages/IPython/qt/console/completion_lexer.py | 13 | 2495 | # System library imports
from pygments.token import Token, is_token_subtype
class CompletionLexer(object):
""" Uses Pygments and some auxillary information to lex code snippets for
symbol contexts.
"""
# Maps Lexer names to a list of possible name separators
separator_map = { 'C' : [ '.', '->... | bsd-3-clause | -3,375,714,283,601,491,000 | 32.716216 | 80 | 0.551503 | false |
cocoon-project/restful-workshop | src/server/bottle.py | 1 | 127304 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Bottle is a fast and simple micro-framework for small web applications. It
offers request dispatching (Routes) with url parameter support, templates,
a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and
template engines - all in a single file an... | gpl-2.0 | -4,503,846,915,300,445,700 | 38.695666 | 103 | 0.581969 | false |
Fusion-Rom/android_external_chromium_org | tools/telemetry/telemetry/core/backends/chrome/ios_browser_finder.py | 25 | 4184 | # 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.
"""Finds iOS browsers that can be controlled by telemetry."""
import logging
import re
import subprocess
from telemetry import decorators
from telemetry.co... | bsd-3-clause | 2,149,223,894,804,121,000 | 32.206349 | 80 | 0.698375 | false |
knittledan/imageResizer | PIL/mac/PIL/PcfFontFile.py | 26 | 6192 | #
# THIS IS WORK IN PROGRESS
#
# The Python Imaging Library
# $Id$
#
# portable compiled font file parser
#
# history:
# 1997-08-19 fl created
# 2003-09-13 fl fixed loading of unicode fonts
#
# Copyright (c) 1997-2003 by Secret Labs AB.
# Copyright (c) 1997-2003 by Fredrik Lundh.
#
# See the README file for informa... | mit | 4,257,648,992,811,391,000 | 23.571429 | 78 | 0.49031 | false |
OSVR/UIforETWbins | bin/IdentifyChromeProcesses.py | 1 | 5681 | # 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 by applicable... | apache-2.0 | 551,444,391,405,233,900 | 40.699248 | 149 | 0.641134 | false |
ar4s/django | django/core/files/uploadhandler.py | 3 | 6820 | """
Base file upload handler classes, and the built-in concrete subclasses
"""
from __future__ import unicode_literals
from io import BytesIO
from django.conf import settings
from django.core.files.uploadedfile import TemporaryUploadedFile, InMemoryUploadedFile
from django.utils.encoding import python_2_unicode_comp... | bsd-3-clause | -5,018,980,800,277,319,000 | 32.106796 | 118 | 0.626979 | false |
RedbackThomson/LoLShadow | sleekxmpp/plugins/xep_0224/attention.py | 14 | 2180 | """
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2011 Nathanael C. Fritz, Lance J.T. Stout
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
import logging
from sleekxmpp.stanza import Message
from sleekxmpp.xmlstream import register_stanza_plugin
from sleekxmpp.xmls... | mit | 9,166,633,211,221,871,000 | 28.066667 | 77 | 0.622018 | false |
tectronics/prometeo-erp | hr/views/leaverequests.py | 3 | 5705 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This file is part of the prometeo project.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option... | lgpl-3.0 | 1,340,729,805,008,758,300 | 39.75 | 131 | 0.696757 | false |
maithreyee/python-koans | python3/koans/about_methods.py | 82 | 5312 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Partially based on AboutMethods in the Ruby Koans
#
from runner.koan import *
def my_global_function(a,b):
return a + b
class AboutMethods(Koan):
def test_calling_a_global_function(self):
self.assertEqual(__, my_global_function(2,3))
# NOTE: Wro... | mit | 5,708,703,170,067,578,000 | 31.588957 | 91 | 0.551017 | false |
petrutlucian94/nova | nova/virt/vmwareapi/images.py | 7 | 19145 | # Copyright (c) 2012 VMware, Inc.
# Copyright (c) 2011 Citrix Systems, Inc.
# Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://w... | apache-2.0 | 4,146,142,582,840,697,000 | 38.719917 | 79 | 0.595926 | 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.