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 |
|---|---|---|---|---|---|---|---|---|---|---|
mlyundin/scikit-learn | examples/decomposition/plot_pca_iris.py | 253 | 1801 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=========================================================
PCA example with Iris Data-set
=========================================================
Principal Component Analysis applied to the Iris dataset.
See `here <http://en.wikipedia.org/wiki/Iris_flower_data_set>`_ fo... | bsd-3-clause | -5,259,778,432,817,994,000 | 24.714286 | 73 | 0.567778 | false |
scith/htpc-manager_ynh | sources/libs/sqlobject/declarative.py | 10 | 7263 | """
Declarative objects.
Declarative objects have a simple protocol: you can use classes in
lieu of instances and they are equivalent, and any keyword arguments
you give to the constructor will override those instance variables.
(So if a class is received, we'll simply instantiate an instance with
no arguments).
You ... | gpl-3.0 | 4,964,667,106,897,932,000 | 34.602941 | 145 | 0.561338 | false |
fredericlepied/ansible | lib/ansible/modules/network/vyos/vyos_user.py | 11 | 10403 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Ansible by Red Hat, inc
#
# This file is part of Ansible by Red Hat
#
# 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 Li... | gpl-3.0 | -1,746,141,781,751,737,000 | 30.620061 | 94 | 0.632221 | false |
jillesme/phantomjs | src/breakpad/src/third_party/protobuf/protobuf/examples/add_person.py | 432 | 1656 | #! /usr/bin/python
# See README.txt for information and build instructions.
import addressbook_pb2
import sys
# This function fills in a Person message based on user input.
def PromptForAddress(person):
person.id = int(raw_input("Enter person ID number: "))
person.name = raw_input("Enter name: ")
email = raw_... | bsd-3-clause | -3,392,131,246,811,777,000 | 27.551724 | 76 | 0.676932 | false |
datascopeanalytics/traces | tests/test_docs.py | 1 | 1056 | import traces
from datetime import datetime
def test_quickstart():
time_series = traces.TimeSeries()
time_series[datetime(2042, 2, 1, 6, 0, 0)] = 0 # 6:00:00am
time_series[datetime(2042, 2, 1, 7, 45, 56)] = 1 # 7:45:56am
time_series[datetime(2042, 2, 1, 8, 51, 42)] = 0 # 8:51:42am
time_ser... | mit | 4,300,419,985,127,917,600 | 30.058824 | 67 | 0.573864 | false |
guolivar/totus-niwa | service/thirdparty/featureserver/FeatureServer/DataSource/DBM.py | 1 | 6212 | __author__ = "MetaCarta"
__copyright__ = "Copyright (c) 2006-2008 MetaCarta"
__license__ = "Clear BSD"
__version__ = "$Id: DBM.py 444 2008-03-19 01:35:35Z brentp $"
from FeatureServer.DataSource import DataSource
from FeatureServer.DataSource import Lock
from FeatureServer.Service.Action import Action
import anydbm
... | gpl-3.0 | -6,092,681,979,574,670,000 | 30.06 | 140 | 0.518191 | false |
GladeRom/android_external_chromium_org | tools/chrome_proxy/integration_tests/chrome_proxy_pagesets/top_20.py | 34 | 3245 | # 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.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class Top20Page(page_module.Page):
def __init__(se... | bsd-3-clause | 7,473,953,177,414,501,000 | 35.055556 | 95 | 0.651464 | false |
jkandasa/integration_tests | scripts/enable_internal_db.py | 8 | 1146 | #!/usr/bin/env python2
"""SSH in to a running appliance and set up an internal DB.
An optional region can be specified (default 0), and the script
will use the first available unpartitioned disk as the data volume
for postgresql.
Running this script against an already configured appliance is
unsupported, hilarity ma... | gpl-2.0 | 6,192,854,152,533,709,000 | 26.285714 | 70 | 0.690227 | false |
ryenus/vbox | src/VBox/HostServices/SharedOpenGL/crserverlib/get_sizes.py | 1 | 17633 | # Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
num_get_values = {
'GL_ACCUM_ALPHA_BITS' : 1,
'GL_ACCUM_BLUE_BITS' : 1,
'GL_ACCUM_CLEAR_VALUE': 4,
'GL_ACCUM_GREEN_BITS' : 1,
'GL_ACCUM_RED_BITS' : 1,
... | gpl-2.0 | 7,988,666,012,723,350,000 | 38.713964 | 105 | 0.595077 | false |
kushalbhola/MyStuff | Practice/PythonApplication/env/Lib/site-packages/pandas/tests/frame/test_nonunique_indexes.py | 2 | 18038 | import numpy as np
import pytest
import pandas as pd
from pandas import DataFrame, MultiIndex, Series, date_range
from pandas.tests.frame.common import TestData
import pandas.util.testing as tm
from pandas.util.testing import assert_frame_equal, assert_series_equal
class TestDataFrameNonuniqueIndexes(TestData):
... | apache-2.0 | 293,897,945,920,869,200 | 33.132576 | 88 | 0.455943 | false |
ZuluPro/libcloud | libcloud/dns/drivers/onapp.py | 10 | 10684 | # 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 | 3,356,851,954,810,707,500 | 31.180723 | 76 | 0.55672 | false |
gistic/PublicSpatialImpala | thirdparty/thrift-0.9.0/lib/py/src/TSerialization.py | 184 | 1387 | #
# 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 | -3,834,667,191,983,747,600 | 35.5 | 75 | 0.753425 | false |
gabrielcnr/pytest | testing/test_pluginmanager.py | 4 | 12014 | import pytest
import py
import os
from _pytest.config import get_config, PytestPluginManager
from _pytest.main import EXIT_NOTESTSCOLLECTED
@pytest.fixture
def pytestpm():
return PytestPluginManager()
class TestPytestPluginInteractions:
def test_addhooks_conftestplugin(self, testdir):
testdir.makepyf... | mit | -3,061,002,859,826,017,000 | 34.755952 | 85 | 0.598385 | false |
dzbarsky/servo | components/script/dom/bindings/codegen/parser/tests/test_special_methods_uniqueness.py | 241 | 1433 | import WebIDL
def WebIDLTest(parser, harness):
threw = False
try:
parser.parse("""
interface SpecialMethodUniqueness1 {
getter deleter boolean (DOMString name);
getter boolean (DOMString name);
};
""")
results = parser.finish()
ex... | mpl-2.0 | -8,941,170,251,327,639,000 | 22.112903 | 54 | 0.530356 | false |
linktlh/Toontown-journey | toontown/coghq/LaserGameRoll.py | 4 | 1977 | import random
from direct.distributed import ClockDelta
from direct.task import Task
from toontown.coghq import LaserGameBase
class LaserGameRoll(LaserGameBase.LaserGameBase):
def __init__(self, funcSuccess, funcFail, funcSendGrid, funcSetGrid):
LaserGameBase.LaserGameBase.__init__(self, funcSuccess, fun... | apache-2.0 | 6,616,388,150,910,226,000 | 24.675325 | 100 | 0.549823 | false |
framon/samba | buildtools/wafadmin/Runner.py | 16 | 5556 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2005-2008 (ita)
"Execute the tasks"
import os, sys, random, time, threading, traceback
try: from Queue import Queue
except ImportError: from queue import Queue
import Build, Utils, Logs, Options
from Logs import debug, error
from Constants import *
GAP = 15
run... | gpl-3.0 | 8,707,639,019,741,558,000 | 22.542373 | 89 | 0.676386 | false |
mchasal/compose | compose/project.py | 15 | 12276 | from __future__ import unicode_literals
from __future__ import absolute_import
from functools import reduce
import logging
from docker.errors import APIError
from .config import get_service_name_from_net, ConfigurationError
from .const import DEFAULT_TIMEOUT, LABEL_PROJECT, LABEL_SERVICE, LABEL_ONE_OFF
from .containe... | apache-2.0 | -3,246,921,781,161,121,000 | 33.483146 | 186 | 0.560362 | false |
mahendra-r/edx-platform | lms/djangoapps/certificates/tests/test_queue.py | 43 | 5953 | # -*- coding: utf-8 -*-
"""Tests for the XQueue certificates interface. """
from contextlib import contextmanager
import json
from mock import patch, Mock
from nose.plugins.attrib import attr
from django.test import TestCase
from django.test.utils import override_settings
from opaque_keys.edx.locator import CourseLoc... | agpl-3.0 | 6,997,514,362,479,994,000 | 38.157895 | 109 | 0.669523 | false |
linkedin/indextank-service | storefront/boto/s3/bucketlistresultset.py | 3 | 2380 | # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... | apache-2.0 | -6,267,443,312,373,075,000 | 40.754386 | 96 | 0.687395 | false |
ingenieroariel/geonode | geonode/upload/forms.py | 1 | 8421 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... | gpl-3.0 | 492,939,210,307,070,340 | 38.721698 | 88 | 0.606698 | false |
stanxii/wen9000 | node.js/node_modules/npm/node_modules/node-gyp/legacy/tools/gyp/pylib/gyp/generator/msvs.py | 41 | 109235 | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import copy
import ntpath
import os
import posixpath
import re
import subprocess
import sys
import gyp.common
import gyp.easy_xml as easy_xml
import gyp.MSVSNew a... | lgpl-2.1 | -8,163,682,286,098,596,000 | 36.218058 | 134 | 0.641049 | false |
vancepym/ogre | Tools/Blender2.6Export/ogre_mesh_exporter/global_properties.py | 16 | 9771 | # ##### BEGIN MIT LICENSE BLOCK #####
# Copyright (C) 2011 by Lih-Hern Pang
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to ... | mit | -5,635,659,593,871,601,000 | 33.284211 | 209 | 0.701361 | false |
LittleLama/Sick-Beard-BoxCar2 | cherrypy/lib/static.py | 39 | 14178 | import logging
import mimetypes
mimetypes.init()
mimetypes.types_map['.dwg'] = 'image/x-dwg'
mimetypes.types_map['.ico'] = 'image/x-icon'
mimetypes.types_map['.bz2'] = 'application/x-bzip2'
mimetypes.types_map['.gz'] = 'application/x-gzip'
import os
import re
import stat
import time
from urllib import unquote
import ... | gpl-3.0 | 3,149,126,068,219,001,300 | 39.976879 | 90 | 0.598886 | false |
havt/odoo | addons/account/product.py | 374 | 2897 | # -*- 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 | -4,300,921,492,807,791,600 | 43.569231 | 129 | 0.577149 | false |
open-io/oio-swift | tests/unit/controllers/test_container.py | 1 | 5114 | import unittest
from mock import patch
from mock import MagicMock as Mock
from oioswift.common.ring import FakeRing
from oioswift import server as proxy_server
from swift.common.swob import Request
from swift.proxy.controllers.base import headers_to_container_info
from swift.common.request_helpers import get_sys_meta_... | apache-2.0 | -9,132,456,947,462,701,000 | 41.264463 | 79 | 0.592687 | false |
libcrosswind/libcrosswind | platform/windows/compilers/x64/TDM-GCC-64/gdb64/bin/lib/idlelib/idle_test/test_calltips.py | 27 | 7140 | import unittest
import idlelib.CallTips as ct
CTi = ct.CallTips() # needed for get_entity test in 2.7
import textwrap
import types
import warnings
default_tip = ''
# Test Class TC is used in multiple get_argspec test methods
class TC(object):
'doc'
tip = "(ai=None, *args)"
def __init__(self, ai=None, *b)... | gpl-3.0 | 5,536,222,590,827,771,000 | 37.594595 | 82 | 0.558683 | false |
mogoweb/chromium-crosswalk | remoting/tools/verify_resources.py | 25 | 5148 | #!/usr/bin/env python
# Copyright (c) 2012 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.
"""Verifies that GRD resource files define all the strings used by a given
set of source files. For file formats where it is not po... | bsd-3-clause | 7,024,852,471,400,968,000 | 30.582822 | 80 | 0.632284 | false |
hydroshare/hydroshare | theme/templatetags/comments_tags.py | 1 | 3173 |
from future.builtins import int
from collections import defaultdict
from django.core.urlresolvers import reverse
from django.template.defaultfilters import linebreaksbr, urlize
from mezzanine import template
from mezzanine.conf import settings
from theme.forms import ThreadedCommentForm
from mezzanine.generic.model... | bsd-3-clause | -8,272,091,699,591,252,000 | 34.255556 | 82 | 0.698078 | false |
gilbertpilz/solum | solum/tests/objects/test_pipeline.py | 2 | 2831 | # Copyright 2014 - Rackspace US, 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 ... | apache-2.0 | 1,428,878,072,190,870,300 | 36.25 | 77 | 0.626987 | false |
PLyczkowski/Sticky-Keymap | 2.74/python/lib/tarfile.py | 80 | 90965 | #!/usr/bin/env python3
#-------------------------------------------------------------------
# tarfile.py
#-------------------------------------------------------------------
# Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de>
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any pers... | gpl-2.0 | -5,541,616,673,173,590,000 | 35.111552 | 103 | 0.540285 | false |
marcoantoniooliveira/labweb | oscar/lib/python2.7/site-packages/whoosh/query/terms.py | 39 | 17708 | # Copyright 2007 Matt Chaput. 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 notice,
# this list of conditions and the... | bsd-3-clause | -7,170,904,261,926,309,000 | 32.537879 | 80 | 0.589169 | false |
duncanwp/iris | lib/iris/experimental/__init__.py | 17 | 1074 | # (C) British Crown Copyright 2010 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | lgpl-3.0 | -4,453,205,441,519,182,000 | 40.307692 | 74 | 0.75419 | false |
veger/ansible | lib/ansible/modules/cloud/azure/azure_rm_containerinstance_facts.py | 33 | 9452 | #!/usr/bin/python
#
# Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | 6,795,814,746,785,511,000 | 32.164912 | 157 | 0.544964 | false |
chirilo/remo | vendor-local/lib/python/rest_framework/utils/serializer_helpers.py | 18 | 3752 | from __future__ import unicode_literals
import collections
from rest_framework.compat import OrderedDict, unicode_to_repr
class ReturnDict(OrderedDict):
"""
Return object from `serialier.data` for the `Serializer` class.
Includes a backlink to the serializer instance for renderers
to use if they need ... | bsd-3-clause | 2,045,609,699,276,944,400 | 30.266667 | 80 | 0.624733 | false |
krdlab/ansible-modules-core | cloud/amazon/ec2_key.py | 51 | 7841 | #!/usr/bin/python
# -*- 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.
#
... | gpl-3.0 | -1,606,291,014,715,016,700 | 31.135246 | 108 | 0.546869 | false |
yx91490/pgcli | pgcli/packages/counter.py | 20 | 6273 | #copied from http://code.activestate.com/recipes/576611-counter-class/
from operator import itemgetter
from heapq import nlargest
from itertools import repeat, ifilter
class Counter(dict):
'''Dict subclass for counting hashable objects. Sometimes called a bag
or multiset. Elements are stored as dictionary ... | bsd-3-clause | 746,782,599,030,463,100 | 32.545455 | 85 | 0.535629 | false |
popazerty/enigma2-4.3 | lib/python/Components/UsageConfig.py | 2 | 55113 | import os
from time import time
from enigma import eDVBDB, eEPGCache, setTunerTypePriorityOrder, setPreferredTuner, setSpinnerOnOff, setEnableTtCachingOnOff, eEnv, Misc_Options, eBackgroundFileEraser, eServiceEvent
from Components.About import about
from Components.Harddisk import harddiskmanager
from config import Con... | gpl-2.0 | -1,456,264,806,924,437,200 | 58.389009 | 374 | 0.6947 | false |
Peter92/MouseTrack | mousetracks/utils/sockets.py | 1 | 2511 | """This is part of the Mouse Tracks Python application.
Source: https://github.com/Peter92/MouseTracks
"""
#Easy to use wrappers for sockets
from __future__ import absolute_import
import psutil
import socket
import struct
from select import select
from .compatibility import pickle
def send_msg(sock, msg):
"""P... | gpl-3.0 | 1,274,394,929,446,219,000 | 26.010753 | 84 | 0.581442 | false |
namccart/gnuradio | gr-digital/python/digital/qa_burst_shaper.py | 18 | 14818 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2015 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 versio... | gpl-3.0 | 8,686,335,505,416,577,000 | 42.582353 | 83 | 0.526994 | false |
pombredanne/product-definition-center | pdc/apps/release/lib.py | 3 | 6715 | #
# Copyright (c) 2015 Red Hat
# Licensed under The MIT License (MIT)
# http://opensource.org/licenses/MIT
#
from django.core.exceptions import ValidationError
from django.db import transaction
import json
import productmd
from productmd.common import create_release_id
from pdc.apps.common import hacks as common_hack... | mit | -1,883,109,596,949,143,300 | 34.909091 | 103 | 0.618168 | false |
drufat/sympy | sympy/functions/special/tests/test_gamma_functions.py | 33 | 16080 | from sympy import (
Symbol, gamma, I, oo, nan, zoo, factorial, sqrt, Rational, log,
polygamma, EulerGamma, pi, uppergamma, S, expand_func, loggamma, sin,
cos, O, lowergamma, exp, erf, erfc, exp_polar, harmonic, zeta,conjugate)
from sympy.core.function import ArgumentIndexError
from sympy.utilities.randtest ... | bsd-3-clause | 4,201,365,259,345,325,600 | 36.835294 | 94 | 0.574005 | false |
ajjl/ITK | Modules/ThirdParty/pygccxml/src/pygccxml/declarations/typedef.py | 12 | 1454 | # Copyright 2014 Insight Software Consortium.
# Copyright 2004-2008 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0.
# See http://www.boost.org/LICENSE_1_0.txt
"""
defines class that describes C++ typedef declaration
"""
from . import declaration
from . import dependencies
class typedef... | apache-2.0 | -7,225,133,819,483,987,000 | 25.436364 | 64 | 0.624484 | false |
december-soul/beets-plugin-importplaycount | importplaycount.py | 1 | 3144 | # coding=utf-8
# Copyright 2014, Rafael Bodill http://github.com/rafi
# vim: set ts=8 sw=4 tw=80 et :
import logging
import requests
import json
from beets.plugins import BeetsPlugin
from beets import ui
from beets import dbcore
from beets import config
from pprint import pprint
from beets.dbcore import types
log = ... | gpl-2.0 | -5,922,102,897,227,746,000 | 33.173913 | 208 | 0.626272 | false |
kindy61/mako | test/test_filters.py | 1 | 7765 | # -*- coding: utf-8 -*-
from mako.template import Template
import unittest
from util import result_lines, flatten_result
class FilterTest(unittest.TestCase):
def test_basic(self):
t = Template("""
${x | myfilter}
""")
assert flatten_result(t.render(x="this is x", myfilter=lambda t: "MYFILT... | mit | -7,199,949,501,323,523,000 | 28.161654 | 142 | 0.437282 | false |
minorua/QGIS | python/plugins/processing/core/ProcessingResults.py | 15 | 1581 | # -*- coding: utf-8 -*-
"""
***************************************************************************
ProcessingResults.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*********************... | gpl-2.0 | 8,691,816,453,463,786,000 | 30.62 | 75 | 0.455408 | false |
engdan77/edoAutoHomeMobile | twisted/protocols/htb.py | 51 | 9330 | # -*- test-case-name: twisted.test.test_htb -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Hierarchical Token Bucket traffic shaping.
Patterned after U{Martin Devera's Hierarchical Token Bucket traffic
shaper for the Linux kernel<http://luxik.cdi.cz/~devik/qos/htb/>}.
@seealso: U{HT... | mit | 8,967,728,040,087,093,000 | 30.414141 | 77 | 0.633762 | false |
acsone/Arelle | arelle/plugin/xbrlDB/XbrlSemanticJsonDB.py | 2 | 49520 | '''
XbrlSemanticJsonDB.py implements an JSON database interface for Arelle, based
on a concrete realization of the Abstract Model PWD 2.0 layer. This is a semantic
representation of XBRL information.
This module may save directly to a JSON Server (TBD) or to append to a file of JSON.
This module provides the execu... | apache-2.0 | 1,309,872,667,584,775,700 | 50.583333 | 172 | 0.529261 | false |
akretion/pos-addons | tg_partner_firstname/tg_partner_firstname.py | 11 | 2548 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 - Thierry Godin. All Rights Reserved
# @author Thierry Godin <thierry@lapinmoutardepommedauphine.com>
#
# This program is free softw... | lgpl-3.0 | -6,088,853,987,410,746,000 | 32.90411 | 91 | 0.570251 | false |
purism/pdak | dak/dakdb/update76.py | 8 | 1666 | #!/usr/bin/env python
# coding=utf8
"""
Add list of closed bugs to changes table
@contact: Debian FTP Master <ftpmaster@debian.org>
@copyright: 2012 Ansgar Burchardt <ansgar@debian.org>
@license: GNU General Public License version 2 or later
"""
# This program is free software; you can redistribute it and/or modify
... | gpl-2.0 | -1,609,357,548,722,367,200 | 34.446809 | 110 | 0.653661 | false |
antsant/namebench | nb_third_party/graphy/backends/google_chart_api/__init__.py | 205 | 2023 | #!/usr/bin/python2.4
#
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | 4,969,626,415,838,115,000 | 39.46 | 77 | 0.760751 | false |
papoteur-mga/mageiaSync | setup.py | 1 | 1249 | from distutils.core import setup
import os
LOCALE_DIR= '/usr/share/locale'
locales = []
if os.path.exists('po/locale'):
for lang in os.listdir('po/locale'):
locales.append(os.path.join(lang, 'LC_MESSAGES'))
data_files = [("share/applications/", ["share/applications/mageiasync.desktop"]),
("... | gpl-3.0 | -8,755,315,272,496,259,000 | 36.848485 | 93 | 0.591673 | false |
abstract-open-solutions/OCB | addons/edi/__init__.py | 437 | 1157 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2011 OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 | -3,229,211,939,604,810,000 | 43.5 | 78 | 0.630078 | false |
ehashman/oh-mainline | vendor/packages/Django/tests/regressiontests/context_processors/tests.py | 96 | 1344 | """
Tests for Django's bundled context processors.
"""
from django.test import TestCase
class RequestContextProcessorTests(TestCase):
"""
Tests for the ``django.core.context_processors.request`` processor.
"""
urls = 'regressiontests.context_processors.urls'
def test_request_attributes(self):
... | agpl-3.0 | -4,363,970,325,847,624,700 | 35.324324 | 78 | 0.636161 | false |
tectronics/cortex-vfx | test/IECore/SWAReaderTest.py | 12 | 5143 | ##########################################################################
#
# Copyright (c) 2012, John Haddon. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of sou... | bsd-3-clause | 1,978,072,474,059,754,000 | 47.065421 | 108 | 0.702703 | false |
foodsnag/foodsnag-web | config.py | 1 | 1242 | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
APP_NAME = 'FoodSnag'
MAILER_NAME = 'Snagger'
MAILER_EMAIL = 'snagger@foodsnag.com'
MG_KEY = os.environ.get('MG_KEY')
MG_URL = 'https://api.mailgun.net/v3/sandbox86fa708b0be84193924a6900094a11cf.mailgun.org'
SECRET_KE... | mit | -8,743,636,698,525,172,000 | 26.6 | 93 | 0.663446 | false |
fr34k8/paimei | pida/basic_block.py | 7 | 9145 | #
# PIDA Basic Block
# Copyright (C) 2006 Pedram Amini <pedram.amini@gmail.com>
#
# $Id: basic_block.py 194 2007-04-05 15:31:53Z cameron $
#
# 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; ... | gpl-2.0 | -4,282,683,101,429,553,700 | 34.883065 | 120 | 0.528923 | false |
ProfessionalIT/professionalit-webiste | sdk/google_appengine/lib/grizzled/grizzled/proxy.py | 19 | 3984 | # NOTE: Documentation is intended to be processed by epydoc and contains
# epydoc markup.
"""
Overview
========
The ``grizzled.forwarder`` module contain classes that make building proxies
easier.
"""
from __future__ import absolute_import
__docformat__ = "restructuredtext en"
# -----------------------------------... | lgpl-3.0 | 6,374,495,788,170,516,000 | 32.762712 | 80 | 0.473394 | false |
Mariusz1970/enigma2 | lib/python/Screens/Ipkg.py | 65 | 3790 | from Components.ActionMap import ActionMap
from Components.Ipkg import IpkgComponent
from Components.Label import Label
from Components.Slider import Slider
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from enigma import eTimer
class Ipkg(Screen):
def __init__(self, session, cmdList=Non... | gpl-2.0 | 2,037,522,467,855,543,800 | 29.564516 | 250 | 0.713984 | false |
avirshup/DockerMake | test/helpers.py | 1 | 5035 | import os
import io
import tarfile
import sys
import pytest
import docker.errors
__client = None
if sys.version_info.major == 2:
file_not_found_error = IOError
else:
file_not_found_error = FileNotFoundError
def get_client():
"""
Returns:
docker.DockerClient
"""
global __client
i... | apache-2.0 | 231,213,801,155,634,050 | 26.513661 | 95 | 0.625223 | false |
fujunwei/chromium-crosswalk | tools/auto_bisect/bisect_results_test.py | 8 | 12580 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import unittest
from bisect_results import BisectResults
import source_control
class MockDepotRegistry(object):
def ChangeToDepotDir(self, dep... | bsd-3-clause | -6,049,962,066,716,451,000 | 40.655629 | 79 | 0.671224 | false |
eonpatapon/rally | rally/plugins/openstack/scenarios/ceilometer/queries.py | 14 | 4521 | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | apache-2.0 | 4,352,998,968,820,633,000 | 45.608247 | 78 | 0.677063 | false |
dneg/gaffer | python/GafferUI/TransformPlugValueWidget.py | 5 | 2819 | ##########################################################################
#
# Copyright (c) 2013, Image Engine Design 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:
#
# * Red... | bsd-3-clause | 3,923,988,517,844,417,500 | 39.855072 | 102 | 0.660163 | false |
HyperloopTeam/FullOpenMDAO | lib/python2.7/site-packages/pycrypto-2.3-py2.7-macosx-10.10-x86_64.egg/Crypto/SelfTest/Hash/test_MD2.py | 11 | 2251 | # -*- coding: utf-8 -*-
#
# SelfTest/Hash/MD2.py: Self-test for the MD2 hash function
#
# Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net>
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication ... | gpl-2.0 | 6,609,686,230,667,523,000 | 36.516667 | 73 | 0.673034 | false |
rrahn/gdf_tools | include/seqan/util/py_lib/seqan/dddoc/core.py | 18 | 37011 | #!/usr/bin/env python
import copy
import operator
import os
import os.path
import pickle
import string
import sys
# Constant for C++ files.
FILETYPE_CPP = 2
# Constant for DDDOC files.
FILETYPE_DDDOC = 1
# Constant for none of the above.
FILETYPE_OTHER = 0
SOURCE_ENCODING = 'iso8859-1'
# Extension of C++ files.
CPP... | gpl-3.0 | -5,976,380,026,296,472,000 | 34.828654 | 175 | 0.538921 | false |
bmhatfield/Diamond | src/collectors/slony/test/testslony.py | 31 | 3625 | #!/usr/bin/python
# coding=utf-8
###############################################################################
from test import CollectorTestCase
from test import get_collector_config
from test import run_only
from mock import patch
from slony import SlonyCollector
def run_only_if_psycopg2_is_available(func):
... | mit | -5,769,736,619,534,606,000 | 30.798246 | 79 | 0.510069 | false |
operasoftware/presto-testo | wpt/websockets/autobahn/oberstet-Autobahn-643d2ee/demo/streaming/frame_based_server.py | 4 | 1803 | ###############################################################################
##
## Copyright 2011 Tavendo GmbH
##
## 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
##
## ht... | bsd-3-clause | 5,910,651,103,912,731,000 | 34.795918 | 88 | 0.6467 | false |
gsssrao/MozDef | docker/conf/config.py | 14 | 1961 | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Copyright (c) 2014 Mozilla Corporation
#
# Contributors:
# Anthony Verez averez@mozilla.com
fro... | mpl-2.0 | -3,990,829,244,373,288,000 | 25.146667 | 97 | 0.559408 | false |
janeyuhui/volatilitux | core/config.py | 8 | 4033 |
from .kernel_struct import *
from .raw_dump import *
from .fingerprint import *
from xml.dom.minidom import parse, Document
import os.path
CONFIG_VERSION = 1.0
class Config:
init_task = None
arch = None
offsets = {}
dumpfile = None
debug = False
@classmethod
def setDebug(cls, debug=False):
... | gpl-2.0 | -3,633,211,295,116,639,000 | 26.073826 | 102 | 0.617158 | false |
tquizzle/Sick-Beard | sickbeard/clients/transmission.py | 30 | 4145 | # Author: Mr_Orange <mr_orange@hotmail.it>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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... | gpl-3.0 | 8,628,570,561,661,526,000 | 36.342342 | 132 | 0.552473 | false |
kevclarx/ansible | lib/ansible/modules/packaging/os/openbsd_pkg.py | 50 | 26182 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Patrik Lundin <patrik@sigterm.se>
#
# 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 Lic... | gpl-3.0 | -8,888,128,555,258,696,000 | 40.231496 | 156 | 0.573524 | false |
12mo2525/angularMail | node_modules/node-gyp/gyp/gyptest.py | 1752 | 8019 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
__doc__ = """
gyptest.py -- test runner for GYP tests.
"""
import os
import optparse
import subprocess
import sys
class CommandRunner(obje... | mit | 3,921,452,036,828,571,000 | 28.266423 | 78 | 0.59808 | false |
CadishShank/Ardour-5.0.2.0-Cad | tools/cstyle.py | 12 | 9136 | #!/usr/bin/python -tt
#
# Copyright (C) 2005-2012 Erik de Castro Lopo <erikd@mega-nerd.com>
#
# Released under the 2 clause BSD license.
"""
This program checks C code for compliance to coding standards used in
libsndfile and other projects I run.
"""
import re
import sys
class Preprocessor:
"""
Preprocess lines ... | gpl-2.0 | 4,316,457,760,109,447,700 | 33.606061 | 160 | 0.551226 | false |
bwsblake/lettercounter | django-norel-env/lib/python2.7/site-packages/django/db/models/sql/datastructures.py | 118 | 1115 | """
Useful auxilliary data structures for query construction. Not useful outside
the SQL domain.
"""
class EmptyResultSet(Exception):
pass
class MultiJoin(Exception):
"""
Used by join construction code to indicate the point at which a
multi-valued join was attempted (if the caller wants to treat that
... | mit | -4,795,290,361,349,960,000 | 24.930233 | 76 | 0.602691 | false |
rahimnathwani/django-countries | django_countries/ioc_data.py | 6 | 3977 | IOC_TO_ISO = {
'AFG': 'AF',
'ALB': 'AL',
'ALG': 'DZ',
'AND': 'AD',
'ANG': 'AO',
'ANT': 'AG',
'ARG': 'AR',
'ARM': 'AM',
'ARU': 'AW',
'ASA': 'AS',
'AUS': 'AU',
'AUT': 'AT',
'AZE': 'AZ',
'BAH': 'BS',
'BAN': 'BD',
'BAR': 'BB',
'BDI': 'BI',
'BEL': 'BE',... | mit | -9,033,245,457,678,440,000 | 16.914414 | 64 | 0.338446 | false |
pytest-dev/pytest | doc/en/conf.py | 2 | 13237 | #
# pytest documentation build configuration file, created by
# sphinx-quickstart on Fri Oct 8 17:54:28 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values hav... | mit | -6,366,589,322,623,497,000 | 30.362559 | 95 | 0.675179 | false |
testbetta/git-repo-pub | subcmds/rebase.py | 16 | 4796 | #
# Copyright (C) 2010 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | 3,237,998,515,413,097,500 | 32.774648 | 78 | 0.596747 | false |
TheBoegl/letsencrypt | tests/letstest/multitester.py | 1 | 20830 | """
Letsencrypt Integration Test Tool
- Configures (canned) boulder server
- Launches EC2 instances with a given list of AMIs for different distros
- Copies letsencrypt repo and puts it on the instances
- Runs letsencrypt tests (bash scripts) on all of these
- Logs execution and success/fail for debugging
Notes:
- ... | apache-2.0 | 8,239,710,991,521,104,000 | 37.86194 | 113 | 0.610226 | false |
jjbrophy47/sn_spam | independent/scripts/independent.py | 1 | 6452 | """
Module containing the Independent class to handle all operations pertaining
to the independent model.
"""
import os
import pandas as pd
class Independent:
"""Returns an Independent object that reads in the data, splits into sets,
trains and classifies, and writes the results."""
def __init__(self, co... | mit | 5,480,564,389,528,302,000 | 39.578616 | 79 | 0.591445 | false |
josesanch/django-oscar | sites/demo/apps/order/south_migrations/0003_auto__del_field_ordernote_date__add_field_ordernote_date_created__add_.py | 16 | 32376 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from django.utils.timezone import now
class Migration(SchemaMigration):
def forwards(self, orm):
db.rename_column('order_ordernote', 'date', 'date_created')
# Addi... | bsd-3-clause | 8,531,701,499,073,443,000 | 85.566845 | 222 | 0.554299 | false |
kashif/chainer | tests/chainer_tests/links_tests/activation_tests/test_simplified_dropconnect.py | 1 | 9315 | import os
import tempfile
import unittest
import numpy
import chainer
from chainer import cuda
from chainer import gradient_check
from chainer import links
from chainer.serializers import npz
from chainer import testing
from chainer.testing import attr
from chainer.testing import condition
from chainer.utils import t... | mit | 4,405,001,306,083,681,000 | 34.284091 | 78 | 0.588191 | false |
PanDAWMS/panda-jedi | pandajedi/jediddm/DDMInterface.py | 1 | 2256 | from pandajedi.jediconfig import jedi_config
from pandajedi.jedicore import Interaction
# interface to DDM
class DDMInterface:
# constructor
def __init__(self):
self.interfaceMap = {}
# setup interface
def setupInterface(self):
# parse config
for configStr in jedi_config.ddm.... | apache-2.0 | -5,697,655,182,095,574,000 | 27.556962 | 84 | 0.535461 | false |
pwoodworth/intellij-community | python/lib/Lib/email/Parser.py | 392 | 3300 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw, Thomas Wouters, Anthony Baxter
# Contact: email-sig@python.org
"""A parser of RFC 2822 and MIME email messages."""
__all__ = ['Parser', 'HeaderParser']
import warnings
from cStringIO import StringIO
from email.feedparser import FeedParser
... | apache-2.0 | -5,318,890,526,377,604,000 | 34.483871 | 78 | 0.624848 | false |
lanen/youtube-dl | youtube_dl/extractor/kickstarter.py | 111 | 2654 | # encoding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class KickStarterIE(InfoExtractor):
_VALID_URL = r'https?://www\.kickstarter\.com/projects/(?P<id>[^/]*)/.*'
_TESTS = [{
'url': 'https://www.kickstarter.com/projects/1404461844/intersection-the-story-of-josh-g... | unlicense | -7,067,527,939,780,323,000 | 36.914286 | 121 | 0.525622 | false |
chromium/gyp | pylib/gyp/generator/gypsh.py | 2779 | 1665 | # Copyright (c) 2011 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.
"""gypsh output module
gypsh is a GYP shell. It's not really a generator per se. All it does is
fire up an interactive Python session with a few local variables... | bsd-3-clause | 7,743,603,149,825,352,000 | 28.732143 | 79 | 0.703904 | false |
jarrahwu/tornado | tornado/log.py | 82 | 9819 | #!/usr/bin/env python
#
# Copyright 2012 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -7,631,701,674,883,525,000 | 40.256303 | 109 | 0.633771 | false |
yodalee/servo | tests/wpt/web-platform-tests/eventsource/resources/cors-cookie.py | 248 | 1220 | from datetime import datetime
def main(request, response):
last_event_id = request.headers.get("Last-Event-Id", "")
ident = request.GET.first('ident', "test")
cookie = "COOKIE" if ident in request.cookies else "NO_COOKIE"
origin = request.GET.first('origin', request.headers["origin"])
credentials =... | mpl-2.0 | 7,978,842,802,615,347,000 | 38.354839 | 79 | 0.621311 | false |
jhonatajh/mtasa-blue | vendor/google-breakpad/src/tools/gyp/test/configurations/inheritance/gyptest-inheritance.py | 430 | 1047 | #!/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 build of an executable in three different configurations.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('configur... | gpl-3.0 | 8,164,308,533,853,478,000 | 30.727273 | 72 | 0.577841 | false |
danieljaouen/ansible | lib/ansible/module_utils/scaleway.py | 6 | 4276 | import json
import sys
from ansible.module_utils.basic import env_fallback
from ansible.module_utils.urls import fetch_url
def scaleway_argument_spec():
return dict(
api_token=dict(required=True, fallback=(env_fallback, ['SCW_TOKEN', 'SCW_API_KEY', 'SCW_OAUTH_TOKEN', 'SCW_API_TOKEN']),
... | gpl-3.0 | 1,573,773,098,723,297,800 | 30.211679 | 128 | 0.582554 | false |
jfpla/odoo | addons/purchase/stock.py | 111 | 18604 | # -*- 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 | -2,372,116,081,887,773,000 | 57.319749 | 231 | 0.599065 | false |
ojengwa/grr | lib/flows/general/timelines.py | 5 | 2754 | #!/usr/bin/env python
# Copyright 2011 Google Inc. All Rights Reserved.
"""Calculates timelines from the client."""
from grr.lib import aff4
from grr.lib import data_store
from grr.lib import flow
from grr.lib import rdfvalue
from grr.lib import utils
from grr.proto import flows_pb2
class MACTimesArgs(rdfvalue.RDFPro... | apache-2.0 | 8,376,900,936,104,855,000 | 32.585366 | 75 | 0.659041 | false |
rocky/python-xdis | test_unit/test_marsh.py | 1 | 1343 | #!/usr/bin/env python
import os, unittest
from xdis.load import load_module
def get_srcdir():
filename = os.path.normcase(os.path.dirname(os.path.abspath(__file__)))
return os.path.realpath(filename)
srcdir = get_srcdir()
class TestMarshal(unittest.TestCase):
def test_basic(self):
"""Tests xdi... | gpl-2.0 | 632,181,724,801,595,300 | 36.305556 | 85 | 0.586001 | false |
robwarm/gpaw-symm | doc/devel/bigpicture.py | 1 | 9152 | """creates: bigpicture.svg bigpicture.png"""
import os
from math import pi, cos, sin
import numpy as np
import matplotlib
#matplotlib.use('Agg')
import matplotlib.patches as mpatches
import matplotlib.pyplot as plt
class Box:
def __init__(self, name, description=(), attributes=(), color='grey'):
self.na... | gpl-3.0 | -7,501,790,693,817,104,000 | 36.508197 | 174 | 0.51792 | false |
mtp1376/youtube-dl | youtube_dl/extractor/liveleak.py | 14 | 4214 | from __future__ import unicode_literals
import json
import re
from .common import InfoExtractor
from ..utils import int_or_none
class LiveLeakIE(InfoExtractor):
_VALID_URL = r'https?://(?:\w+\.)?liveleak\.com/view\?(?:.*?)i=(?P<id>[\w_]+)(?:.*)'
_TESTS = [{
'url': 'http://www.liveleak.com/view?i=757... | unlicense | -277,313,390,138,315,800 | 39.133333 | 223 | 0.508068 | false |
yekeqiang/luigi | test/instance_wrap_test.py | 4 | 3011 | # Copyright (c) 2012 Spotify AB
#
# 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, s... | apache-2.0 | -8,421,584,842,355,547,000 | 30.041237 | 96 | 0.664895 | false |
DESHRAJ/fjord | vendor/packages/html5lib/html5lib/html5parser.py | 95 | 115775 | try:
frozenset
except NameError:
# Import from the sets module for python 2.3
from sets import Set as set
from sets import ImmutableSet as frozenset
try:
any
except:
# Implement 'any' for python 2.4 and previous
def any(iterable):
for element in iterable:
if element:
... | bsd-3-clause | 6,437,826,723,308,856,000 | 41.361873 | 116 | 0.548849 | false |
UrusTeam/android_ndk_toolchain_cross | lib/python2.7/test/test_with.py | 88 | 26440 | #!/usr/bin/env python
"""Unit tests for the with statement specified in PEP 343."""
__author__ = "Mike Bland"
__email__ = "mbland at acm dot org"
import sys
import unittest
from collections import deque
from contextlib import GeneratorContextManager, contextmanager
from test.test_support import run_unittest
class... | gpl-2.0 | -3,088,992,426,235,267,000 | 34.253333 | 93 | 0.613616 | false |
preete-dixit-ck/incubator-airflow | tests/contrib/hooks/test_ssh_hook.py | 14 | 2342 | # -*- coding: utf-8 -*-
#
# 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
... | apache-2.0 | 7,162,591,811,685,305,000 | 32.457143 | 81 | 0.63877 | false |
photoninger/ansible | lib/ansible/modules/crypto/openssl_csr.py | 9 | 20902 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2017, Yanis Guenane <yanis+ansible@guenane.org>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': ... | gpl-3.0 | 1,751,537,763,652,358,700 | 39.196154 | 148 | 0.63726 | false |
LumPenPacK/NetworkExtractionFromImages | osx_build/nefi2_osx_amd64_xcode_2015/site-packages/networkx/tests/test_convert_pandas.py | 43 | 2177 | from nose import SkipTest
from nose.tools import assert_true
import networkx as nx
class TestConvertPandas(object):
numpy=1 # nosetests attribute, use nosetests -a 'not numpy' to skip test
@classmethod
def setupClass(cls):
try:
import pandas as pd
except ImportError:
... | bsd-2-clause | -3,473,546,875,328,870,400 | 37.192982 | 79 | 0.467616 | false |
fxfitz/ansible | lib/ansible/modules/network/radware/vdirect_file.py | 14 | 9277 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2017 Radware LTD.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | gpl-3.0 | -7,459,700,842,623,794,000 | 37.334711 | 119 | 0.651073 | 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.