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 |
|---|---|---|---|---|---|---|---|---|---|---|
Titulacion-Sistemas/PythonTitulacion-EV | Lib/site-packages/pywin32-219-py2.7-win32.egg/Demos/security/setuserobjectsecurity.py | 40 | 3016 | import win32security,win32api,win32con, win32process
new_privs = ((win32security.LookupPrivilegeValue('',win32security.SE_SECURITY_NAME),win32con.SE_PRIVILEGE_ENABLED),
(win32security.LookupPrivilegeValue('',win32security.SE_TCB_NAME),win32con.SE_PRIVILEGE_ENABLED),
(win32security.LookupPrivil... | mit | 2,301,787,141,668,699,100 | 70.809524 | 145 | 0.784814 | false |
torchingloom/edx-platform | common/test/acceptance/tests/test_video_module.py | 1 | 8440 | # -*- coding: utf-8 -*-
"""
Acceptance tests for Video.
"""
from .helpers import UniqueCourseTest
from ..pages.lms.video import VideoPage
from ..pages.lms.tab_nav import TabNavPage
from ..pages.studio.auto_auth import AutoAuthPage
from ..pages.lms.course_info import CourseInfoPage
from ..fixtures.course import Course... | agpl-3.0 | -1,301,197,963,544,666,000 | 36.757848 | 123 | 0.656532 | false |
shahbaz17/zamboni | mkt/search/utils.py | 11 | 2062 | from math import log10
from django.core.exceptions import ObjectDoesNotExist
from elasticsearch_dsl.search import Search as dslSearch
from statsd import statsd
from mkt.constants.base import VALID_STATUSES
class Search(dslSearch):
def execute(self):
with statsd.timer('search.execute'):
res... | bsd-3-clause | 3,757,628,039,419,821,600 | 26.493333 | 79 | 0.682832 | false |
abhidrona/gn-osc-custom | sites/demo/apps/order/migrations/0012_auto__add_field_paymentevent_reference.py | 16 | 33636 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'PaymentEvent.reference'
db.add_column('order_paymentevent', 'reference',
... | bsd-3-clause | -6,012,413,438,466,147,000 | 87.518421 | 222 | 0.554049 | false |
oeeagle/quantum | neutron/tests/unit/nec/test_nec_agent.py | 8 | 15285 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013 NEC Corporation. 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.or... | apache-2.0 | -1,741,444,274,570,635,000 | 40.762295 | 78 | 0.56683 | false |
tyll/fas | fas/openssl_fas.py | 11 | 3067 | # Pretty much all copied from pyOpenSSL's certgen.py example and func's certs.py
# func's certs.py is GPLv2+
# pyOpenSSL is LGPL (Probably v2+)
# The pyOpenSSL examples may be under the same license but I'm not certain.
from OpenSSL import crypto
TYPE_RSA = crypto.TYPE_RSA
TYPE_DSA = crypto.TYPE_DSA
def retrieve_key_... | gpl-2.0 | -6,602,643,282,092,527,000 | 35.082353 | 97 | 0.60613 | false |
omelnic/sphinxsearch | api/test.py | 53 | 3218 | #
# $Id$
#
from sphinxapi import *
import sys, time
if not sys.argv[1:]:
print "Usage: python test.py [OPTIONS] query words\n"
print "Options are:"
print "-h, --host <HOST>\tconnect to searchd at host HOST"
print "-p, --port\t\tconnect to searchd at port PORT"
print "-i, --index <IDX>\tsearch through index(es) s... | gpl-2.0 | -244,419,007,079,106,430 | 25.162602 | 110 | 0.613735 | false |
KanchanChauhan/erpnext | erpnext/startup/notifications.py | 4 | 1797 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
def get_notification_config():
return { "for_doctype":
{
"Issue": {"status": "Open"},
"Warranty Claim": {"status": "Open"},
"Task": {"statu... | gpl-3.0 | 5,711,930,620,060,550,000 | 29.457627 | 84 | 0.529772 | false |
eoogbe/api-client-staging | generated/python/googleapis-common-protos/google/api/system_parameter_pb2.py | 17 | 6134 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/api/system_parameter.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import ... | bsd-3-clause | -6,732,051,986,223,500,000 | 34.662791 | 540 | 0.723508 | false |
fxia22/ASM_xf | PythonD/lib/python2.4/distutils/archive_util.py | 4 | 6235 | """distutils.archive_util
Utility functions for creating archive files (tarballs, zip files,
that sort of thing)."""
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id: archive_util.py,v 1.17 2004/11/10 22:23:13 loewis Exp $"
import os
from distutils.errors import DistutilsExecError
from d... | gpl-2.0 | -1,661,600,822,790,931,200 | 35.040462 | 79 | 0.600481 | false |
mattbasta/amo-validator | validator/testcases/javascript/call_definitions.py | 1 | 37806 | import math
import re
import types
import actions
import traverser as js_traverser
import predefinedentities
from jstypes import *
from validator.constants import BUGZILLA_BUG
from validator.compat import (FX6_DEFINITION, FX7_DEFINITION, FX8_DEFINITION,
FX9_DEFINITION, FX11_DEFINITION, TB... | bsd-3-clause | -1,926,923,344,626,253,000 | 39.5209 | 105 | 0.630403 | false |
pigeonflight/strider-plone | docker/appengine/lib/django-1.2/tests/regressiontests/model_regress/tests.py | 39 | 6781 | import datetime
from operator import attrgetter
from django.conf import settings
from django.core.exceptions import ValidationError
from django.db import DEFAULT_DB_ALIAS
from django.test import TestCase
from django.utils import tzinfo
from models import (Worker, Article, Party, Event, Department,
BrokenUnicodeMe... | mit | 3,786,846,503,533,743,600 | 37.748571 | 88 | 0.595045 | false |
cmbiwer/pycbc | pycbc/events/coinc.py | 4 | 43750 | # Copyright (C) 2015 Alex Nitz
#
# 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) any later version.
#
# This program is distributed in the ... | gpl-3.0 | 1,872,111,178,446,909,000 | 36.618229 | 99 | 0.592137 | false |
CS-SI/QGIS | tests/src/python/test_qgsvectorlayer.py | 5 | 116398 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsVectorLayer.
.. note:: 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 | 6,515,476,166,798,083,000 | 38.020449 | 156 | 0.631205 | false |
Ooblioob/collab | core/search/migrations/0001_initial.py | 5 | 1468 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'SearchableTool'
db.create_table('search_searchabletool', (
('id', self.gf(
... | cc0-1.0 | -8,727,851,953,255,818,000 | 37.631579 | 115 | 0.574251 | false |
vrkansagara/YouCompleteMe | python/ycm/tests/vimsupport_test.py | 17 | 21475 | #!/usr/bin/env python
#
# Copyright (C) 2015 YouCompleteMe contributors
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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... | gpl-3.0 | 4,640,869,676,536,221,000 | 40.061185 | 79 | 0.415506 | false |
Nitaco/ansible | lib/ansible/modules/web_infrastructure/acme_account.py | 5 | 10667 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016 Michael Gruener <michael.gruener@chaosmoon.net>
# 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_versio... | gpl-3.0 | 3,072,615,707,154,420,000 | 40.185328 | 143 | 0.587419 | false |
ricmoo/pycoind | pycoind/util/pyaes/__init__.py | 1 | 2000 | # The MIT License (MIT)
#
# Copyright (c) 2014 Richard Moore
#
# 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, mod... | mit | 6,698,085,499,154,688,000 | 37.461538 | 165 | 0.7675 | false |
pipermerriam/flex | tests/core/test_request_response_objects.py | 1 | 1186 | import json
from tests.factories import (
RequestFactory,
ResponseFactory,
)
def test_path_property():
request = RequestFactory(url='http://www.example.com/blog/25')
assert request.path == '/blog/25'
def test_query_property():
request = RequestFactory(url='http://www.example.com/api/?token=1234... | mit | -2,722,564,760,945,885,700 | 28.65 | 86 | 0.683811 | false |
cytec/SickRage | sickbeard/metadata/helpers.py | 8 | 1427 | # coding=utf-8
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage 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 | -2,856,614,144,597,314,000 | 31.431818 | 96 | 0.710582 | false |
Huskerboy/startbootstrap-freelancer | freelancer_env/Lib/importlib/_bootstrap_external.py | 14 | 53530 | """Core implementation of path-based import.
This module is NOT meant to be directly imported! It has been designed such
that it can be bootstrapped into Python as the implementation of import. As
such it requires the injection of specific modules and attributes in order to
work. One should use importlib as the public... | mit | 7,853,289,310,978,786,000 | 36.459762 | 105 | 0.603568 | false |
jzmq/pinot | pinot-core/src/test/resources/generate-test-data.py | 13 | 1397 | #!/usr/bin/env python
import sys
import argparse
from fastavro import writer
parser = argparse.ArgumentParser()
parser.add_argument('output_file', help='Output Avro data file')
parser.add_argument('--num_records', dest='num_records', default=1024, type=int, help='Number of records to generate (default: 1024)')
parser.... | apache-2.0 | 4,366,480,388,065,149,000 | 30.75 | 134 | 0.584825 | false |
emilhetty/home-assistant | homeassistant/components/notify/googlevoice.py | 6 | 1966 | """
Google Voice SMS platform for notify component.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.google_voice/
"""
import logging
from homeassistant.components.notify import (
ATTR_TARGET, DOMAIN, BaseNotificationService)
from homeassistant... | mit | 6,817,606,275,318,964,000 | 32.322034 | 78 | 0.639878 | false |
catsop/CATMAID | django/applications/catmaid/control/tree_util.py | 6 | 8539 | # A 'tree' is a networkx.DiGraph with a single root node (a node without parents)
from operator import itemgetter
from networkx import Graph, DiGraph
from collections import defaultdict
from math import sqrt
from itertools import izip, islice
from catmaid.models import Treenode
def find_root(tree):
""" Search and... | gpl-3.0 | -1,000,174,684,129,467,300 | 36.951111 | 157 | 0.619276 | false |
brokenjacobs/ansible | test/units/modules/network/ovs/test_openvswitch_bridge.py | 76 | 8367 | #
# (c) 2016 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is d... | gpl-3.0 | 911,727,464,442,620,500 | 40.626866 | 92 | 0.542369 | false |
roopali8/keystone | keystone/contrib/federation/migrate_repo/versions/007_add_remote_id_table.py | 5 | 1590 | # 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
# distributed under t... | apache-2.0 | 8,542,104,801,404,637,000 | 35.976744 | 75 | 0.634591 | false |
xmendez/wfuzz | tests/filters/test_filter.py | 1 | 2559 | import pytest
@pytest.mark.parametrize(
"filter_string, expected_result",
[
("h=28 or w=6 or l=2", True),
("r.params.get.param2='2'", True),
("r.headers.response.Location", "https://wfuzz.readthedocs.io/en/latest/"),
("r.headers.response.notthere", {}),
("r.params.get.n... | gpl-2.0 | 4,073,724,681,760,500,700 | 35.042254 | 88 | 0.585776 | false |
blindroot/django-configurations | configurations/importer.py | 6 | 7851 | import imp
import logging
import os
import sys
from optparse import OptionParser, make_option
from django import VERSION as DJANGO_VERSION
from django.conf import ENVIRONMENT_VARIABLE as SETTINGS_ENVIRONMENT_VARIABLE
from django.core.exceptions import ImproperlyConfigured
from django.core.management import base
from ... | bsd-3-clause | -5,393,841,920,821,505,000 | 38.651515 | 85 | 0.55407 | false |
pipermerriam/populus | populus/utils/cli.py | 1 | 8587 | from __future__ import absolute_import
import itertools
import logging
import time
import click
from populus.compilation import (
compile_project_contracts,
)
from .accounts import (
is_account_locked,
)
from .compile import (
write_compiled_sources,
)
from .contracts import (
verify_contract_byteco... | mit | 2,283,328,859,386,170,600 | 30.921933 | 94 | 0.607663 | false |
vmindru/ansible | lib/ansible/modules/cloud/google/gcp_compute_backend_service_facts.py | 9 | 15181 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | gpl-3.0 | 2,921,857,776,443,479,600 | 36.299754 | 133 | 0.601937 | false |
NullSoldier/django | tests/admin_inlines/tests.py | 7 | 44052 | from __future__ import unicode_literals
import datetime
import warnings
from django.contrib.admin import ModelAdmin, TabularInline
from django.contrib.admin.helpers import InlineAdminForm
from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase
from django.contrib.auth.models import Permission, User
from... | bsd-3-clause | 6,686,960,844,427,906,000 | 51.194313 | 237 | 0.656565 | false |
MrOrioleCashback/snippets | TPCh13.py | 1 | 2805 | import string, random
words = open("Alice's Adventures in Wonderland by Lewis Carroll.txt").read().split('\n')
xwords = open('words.txt').read().split('\n')
emma = open('Emma by Jane Austen.txt').read().split('\n')
def break_book_into_words(book):
#apostrophes are a problem, don't => dont
lower_book = ''
... | mit | 5,371,614,007,502,265,000 | 25.772277 | 101 | 0.658467 | false |
pokelondon/pokeradio | web/pokeradio/history/migrations/0002_auto__add_field_artist_spotify_artist_href.py | 1 | 5505 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Artist.spotify_artist_href'
db.add_column(u'history_artist', 'spotify_artist_href',
... | gpl-3.0 | -3,604,173,036,591,177,000 | 63.776471 | 187 | 0.553315 | false |
J861449197/edx-platform | lms/djangoapps/courseware/features/problems.py | 98 | 6831 | '''
Steps for problem.feature lettuce tests
'''
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
from lettuce import world, step
from common import i_am_registered_for_the_course, visit_scenario_item
from problems_setup import PROBLEM_DICT, answer_problem, problem_has_answer, add_problem_to_... | agpl-3.0 | -9,082,729,012,766,834,000 | 35.725806 | 105 | 0.667399 | false |
NMGRL/pychron | pychron/core/ui/display_editor.py | 2 | 1224 | # ===============================================================================
# Copyright 2013 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 | 5,500,330,575,019,692,000 | 47.96 | 81 | 0.55719 | false |
sydhenry/cookiecutter-django | cookiecutter-django/users/tests/test_admin.py | 264 | 1308 | from test_plus.test import TestCase
from ..admin import MyUserCreationForm
class TestMyUserCreationForm(TestCase):
def setUp(self):
self.user = self.make_user()
def test_clean_username_success(self):
# Instantiate the form with a new username
form = MyUserCreationForm({
... | bsd-3-clause | -8,902,569,344,838,986,000 | 31.7 | 78 | 0.613914 | false |
sknepneklab/SAMoS | configurations/MakeConfigurations/regular_rods.py | 1 | 4354 | # * *************************************************************
# *
# * Soft Active Mater on Surfaces (SAMoS)
# *
# * Author: Rastko Sknepnek
# *
# * Division of Physics
# * School of Engineering, Physics and Mathematics
# * University of Dundee
# *
# * (c) 2013, 2014
# *
# * School of Scienc... | gpl-3.0 | 2,822,522,284,727,716,000 | 28.221477 | 129 | 0.567294 | false |
sathnaga/virt-test | virttest/libvirt_xml/network_xml.py | 2 | 14137 | """
Module simplifying manipulation of XML described at
http://libvirt.org/formatnetwork.html
"""
import logging
from virttest import virsh, xml_utils
from virttest.libvirt_xml import base, xcepts, accessors
class RangeList(list):
"""
A list of start & end address tuples
"""
def __init__(self, iterab... | gpl-2.0 | 7,180,164,706,376,847,000 | 34.880711 | 80 | 0.582585 | false |
laurent-george/weboob | modules/lcl/enterprise/browser.py | 1 | 4998 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2013 Romain Bignon, Pierre Mazière, Noé Rubinstein
#
# This file is part of weboob.
#
# weboob 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 versio... | agpl-3.0 | 5,826,358,378,076,278,000 | 38.03125 | 102 | 0.658727 | false |
jonparrott/gcloud-python | bigtable/docs/conf.py | 3 | 10244 | # -*- coding: utf-8 -*-
#
# google-cloud-bigtable documentation build configuration file
#
# 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 have a default; values ... | apache-2.0 | 5,656,987,388,377,241,000 | 32.045161 | 79 | 0.707927 | false |
xiandiancloud/edx-platform | lms/djangoapps/courseware/tests/test_word_cloud.py | 36 | 8306 | # -*- coding: utf-8 -*-
"""Word cloud integration tests using mongo modulestore."""
import json
from operator import itemgetter
from . import BaseTestXmodule
from xmodule.x_module import STUDENT_VIEW
class TestWordCloud(BaseTestXmodule):
"""Integration test for word cloud xmodule."""
CATEGORY = "word_cloud"... | agpl-3.0 | -5,611,771,255,116,472,000 | 31.52549 | 109 | 0.513865 | false |
mKeRix/home-assistant | homeassistant/components/wink/light.py | 21 | 3635 | """Support for Wink lights."""
import pywink
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
ATTR_HS_COLOR,
SUPPORT_BRIGHTNESS,
SUPPORT_COLOR,
SUPPORT_COLOR_TEMP,
LightEntity,
)
from homeassistant.util import color as color_util
from homeassistant.util.color i... | mit | 8,727,966,485,092,963,000 | 30.885965 | 76 | 0.602201 | false |
OTL/rostensorflow | image_recognition.py | 1 | 1825 | import rospy
from sensor_msgs.msg import Image
from std_msgs.msg import String
from cv_bridge import CvBridge
import cv2
import numpy as np
import tensorflow as tf
import classify_image
class RosTensorFlow():
def __init__(self):
classify_image.maybe_download_and_extract()
self._session = tf.Sessio... | apache-2.0 | 4,946,340,999,908,181,000 | 35.5 | 81 | 0.619178 | false |
gfyoung/pandas | pandas/tests/arrays/boolean/test_logical.py | 7 | 8486 | import operator
import numpy as np
import pytest
import pandas as pd
import pandas._testing as tm
from pandas.arrays import BooleanArray
from pandas.tests.extension.base import BaseOpsUtil
class TestLogicalOps(BaseOpsUtil):
def test_numpy_scalars_ok(self, all_logical_operators):
a = pd.array([True, Fals... | bsd-3-clause | 758,823,823,078,913,000 | 36.056769 | 88 | 0.574122 | false |
chrys87/orca-beep | test/keystrokes/firefox/line_nav_lists.py | 1 | 9274 | #!/usr/bin/python
"""Test of HTML list presentation."""
from macaroon.playback import *
import utils
sequence = MacroSequence()
#sequence.append(WaitForDocLoad())
sequence.append(PauseAction(5000))
# Work around some new quirk in Gecko that causes this test to fail if
# run via the test harness rather than manuall... | lgpl-2.1 | 5,777,635,288,224,504,000 | 44.239024 | 136 | 0.701316 | false |
CodigoSur/cyclope | cyclope/apps/polls/admin.py | 1 | 1951 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2010-2013 Código Sur Sociedad Civil.
# All rights reserved.
#
# This file is part of Cyclope.
#
# Cyclope 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 Foundat... | gpl-3.0 | -4,866,996,846,209,687,000 | 33.821429 | 81 | 0.718462 | false |
zhuyongyong/crosswalk-test-suite | apptools/apptools-android-tests/apptools/create_package_abbreviated_command.py | 11 | 10018 | #!/usr/bin/env python
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of conditions and t... | bsd-3-clause | 5,482,392,828,444,217,000 | 44.744292 | 185 | 0.56109 | false |
DirectXMan12/nova-hacking | nova/api/openstack/compute/contrib/availability_zone.py | 3 | 7124 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 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://www.apache.org/licenses/LICENSE-... | apache-2.0 | 7,858,427,632,126,551,000 | 38.577778 | 79 | 0.605138 | false |
pombredanne/cogen | setup.py | 4 | 2337 | #!/usr/bin/python
try:
import setuptools
except ImportError:
import ez_setup
ez_setup.use_setuptools()
from setuptools import setup, find_packages
import sys, os
from cogen import __version__ as version
setup(
name='cogen',
version=version,
description='''
Coroutines... | mit | -4,863,374,876,923,735,000 | 34.546875 | 115 | 0.57424 | false |
timothyparez/PyBitmessage | src/bitmessagecli.py | 2 | 72448 | #!/usr/bin/python2.7
# Created by Adam Melton (.dok) referenceing https://bitmessage.org/wiki/API_Reference for API documentation
# Distributed under the MIT/X11 software license. See http://www.opensource.org/licenses/mit-license.php.
# This is an example of a daemon client for PyBitmessage 0.4.2, by .dok (Version 0.... | mit | -1,198,784,415,036,042,800 | 39.746907 | 269 | 0.537834 | false |
eonpatapon/neutron | neutron/db/l3_db.py | 2 | 66385 | # Copyright 2012 VMware, 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 a... | apache-2.0 | -2,101,790,706,035,030,500 | 45.815938 | 79 | 0.56213 | false |
junhuac/MQUIC | depot_tools/external_bin/gsutil/gsutil_4.15/gsutil/third_party/rsa/rsa/_version200.py | 177 | 15007 | """RSA module
Module for calculating large primes, and RSA encryption, decryption,
signing and verification. Includes generating public and private keys.
WARNING: this implementation does not use random padding, compression of the
cleartext input to prevent repetitions, or other common security improvements.
Use with... | mit | 2,866,996,364,587,566,000 | 27.36862 | 97 | 0.58646 | false |
singhkays/azure-quickstart-templates | 201-vmss-bottle-autoscale/workserver.py | 103 | 1704 | # workserver.py - simple HTTP server with a do_work / stop_work API
# GET /do_work activates a worker thread which uses CPU
# GET /stop_work signals worker thread to stop
import math
import socket
import threading
import time
from bottle import route, run
hostname = socket.gethostname()
hostport = 9000
keepworking = ... | mit | -6,479,978,269,447,849,000 | 24.432836 | 106 | 0.647887 | false |
nirmeshk/oh-mainline | vendor/packages/twisted/twisted/names/dns.py | 18 | 53586 | # -*- test-case-name: twisted.names.test.test_dns -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
DNS protocol implementation.
Future Plans:
- Get rid of some toplevels, maybe.
@author: Moshe Zadka
@author: Jean-Paul Calderone
"""
__all__ = [
'IEncodable', 'IRecord',
'A'... | agpl-3.0 | 6,579,916,286,523,771,000 | 27.188322 | 131 | 0.588531 | false |
GodBlessPP/cadp_w12 | wsgi/pybean.py | 562 | 8617 | #coding: utf-8
import sqlite3
from pkg_resources import parse_version
__version__ = "0.2.1"
__author__ = "Mickael Desfrenes"
__email__ = "desfrenes@gmail.com"
# Yen 2013.04.08, 將 Python2 的 .next() 改為 next(), 以便在 Python 3 中使用
class SQLiteWriter(object):
"""
In frozen mode (the default), the writer will not a... | gpl-3.0 | -4,366,353,739,331,036,700 | 36.378261 | 114 | 0.547051 | false |
vritant/subscription-manager | src/subscription_manager/release.py | 3 | 6540 | #
# Subscription manager command line utility. This script is a modified version of
# cp_client.py from candlepin scripts
#
# Copyright (c) 2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, inc... | gpl-2.0 | -7,836,841,297,476,258,000 | 33.787234 | 81 | 0.616361 | false |
ehashman/oh-mainline | vendor/packages/docutils/docutils/utils/math/math2html.py | 106 | 174512 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# math2html: convert LaTeX equations to HTML output.
#
# Copyright (C) 2009-2011 Alex Fernández
#
# Released under the terms of the `2-Clause BSD license'_, in short:
# Copying and distribution of this file, with or without modification,
# are permitted in any m... | agpl-3.0 | 4,836,645,472,827,265,000 | 31.98895 | 587 | 0.627187 | false |
openstack/python-openstacksdk | openstack/tests/functional/cloud/test_aggregate.py | 2 | 2014 | # 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
# distributed under t... | apache-2.0 | -5,888,178,051,362,407,000 | 33.724138 | 75 | 0.66286 | false |
phase-dev/phase | libmproxy/protocol/tcp.py | 1 | 2582 | from . import ProtocolHandler
import select, socket
from cStringIO import StringIO
class TCPHandler(ProtocolHandler):
"""
TCPHandler acts as a generic TCP forwarder.
Data will be .log()ed, but not stored any further.
"""
def handle_messages(self):
self.c.establish_server_connection()
... | gpl-3.0 | -7,613,661,209,883,940,000 | 42.762712 | 96 | 0.460883 | false |
tudorbarascu/QGIS | python/plugins/processing/algs/gdal/proximity.py | 15 | 9534 | # -*- coding: utf-8 -*-
"""
***************************************************************************
proximity.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*****************************... | gpl-2.0 | -3,383,223,660,067,158,500 | 45.057971 | 146 | 0.512796 | false |
beiko-lab/gengis | bin/Lib/ctypes/test/test_funcptr.py | 4 | 4029 | import os, unittest
from ctypes import *
try:
WINFUNCTYPE
except NameError:
# fake to enable this test on Linux
WINFUNCTYPE = CFUNCTYPE
import _ctypes_test
lib = CDLL(_ctypes_test.__file__)
class CFuncPtrTestCase(unittest.TestCase):
def test_basic(self):
X = WINFUNCTYPE(c_int, c... | gpl-3.0 | 7,703,325,020,606,129,000 | 29.724409 | 87 | 0.527426 | false |
cfarquhar/openstack-ansible | tests/test_filesystem.py | 2 | 3423 | #!/usr/bin/env python
#
# 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, softwar... | apache-2.0 | -2,290,378,671,726,318,000 | 32.23301 | 77 | 0.670757 | false |
eandersson/amqpstorm | amqpstorm/management/basic.py | 1 | 3707 | from amqpstorm.compatibility import json
from amqpstorm.compatibility import quote
from amqpstorm.management.base import ManagementHandler
from amqpstorm.message import Message
API_BASIC_PUBLISH = 'exchanges/%s/%s/publish'
API_BASIC_GET_MESSAGE = 'queues/%s/%s/get'
class Basic(ManagementHandler):
def publish(sel... | mit | -1,420,141,744,971,172,900 | 36.826531 | 78 | 0.523874 | false |
X-dark/Flexget | flexget/plugins/search_sceneaccess.py | 5 | 11553 | from __future__ import unicode_literals, division, absolute_import
import logging
import re
from urllib import quote
from flexget import plugin
from flexget import validator
from flexget.entry import Entry
from flexget.event import event
from flexget.utils.soup import get_soup
from flexget.utils.search import torrent... | mit | 7,390,487,376,487,742,000 | 39.823322 | 120 | 0.490176 | false |
mambocab/cassandra-dtest | jmx_auth_test.py | 1 | 3388 | from distutils.version import LooseVersion
from ccmlib.node import NodetoolError
from dtest import Tester
from jmxutils import apply_jmx_authentication
from tools import known_failure, since
@since('3.6')
class TestJMXAuth(Tester):
@known_failure(failure_source='test',
jira_url='https://issu... | apache-2.0 | 8,053,595,103,393,788,000 | 46.055556 | 108 | 0.681818 | false |
tensorflow/datasets | tensorflow_datasets/image_classification/stanford_online_products.py | 1 | 3281 | # coding=utf-8
# Copyright 2021 The TensorFlow Datasets 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 appl... | apache-2.0 | 7,825,471,403,142,207,000 | 35.455556 | 86 | 0.647668 | false |
Ervii/garage-time | garage/src/python/pants/base/payload.py | 2 | 3803 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (nested_scopes, generators, division, absolute_import, with_statement,
print_function, unicode_literals)
from hashlib import ... | apache-2.0 | 5,104,917,238,181,663,000 | 33.261261 | 99 | 0.674468 | false |
JasonYao/SkullhouseNYU | letsEncrypt/Emailer.py | 2 | 2667 | import requests
import secrets
import os
import datetime
import subprocess
__author__ = 'Jason Yao'
def setup_logging():
log = "logs"
if not os.path.exists(log):
os.makedirs(log)
date = datetime.datetime.now()
log_file_name = "logs/" + date.strftime('%Y-%m-%d') + ".log"
return open(log_... | gpl-2.0 | -3,861,953,599,973,504,000 | 31.13253 | 117 | 0.652418 | false |
ZhaoCJ/django | tests/file_uploads/tests.py | 3 | 17584 | #! -*- coding: utf-8 -*-
from __future__ import unicode_literals
import base64
import errno
import hashlib
import json
import os
import shutil
import tempfile as sys_tempfile
import unittest
from django.core.files import temp as tempfile
from django.core.files.uploadedfile import SimpleUploadedFile
from django.http.m... | bsd-3-clause | -463,967,044,001,194,900 | 38.064444 | 110 | 0.570681 | false |
altairpearl/RIOT | dist/tools/cc2538-bsl/cc2538-bsl.py | 2 | 42557 | #!/usr/bin/env python2
# Copyright (c) 2014, Jelmer Tiete <jelmer@tiete.be>.
# 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
... | lgpl-2.1 | -1,672,125,343,625,858,000 | 36.102877 | 184 | 0.551801 | false |
alkyl1978/gnuradio | gr-blocks/python/blocks/qa_hier_block2.py | 21 | 16253 | #!/usr/bin/env python
from gnuradio import gr, gr_unittest, blocks
import numpy
import time
class add_ff(gr.sync_block):
def __init__(self):
gr.sync_block.__init__(
self,
name = "add_ff",
in_sig = [numpy.float32, numpy.float32],
out_sig = [numpy.float32],
... | gpl-3.0 | -6,298,540,642,147,032,000 | 35.441704 | 83 | 0.578785 | false |
Karel-van-de-Plassche/bokeh | bokeh/command/subcommands/tests/test_svg.py | 6 | 5078 | from __future__ import absolute_import
import argparse
import pytest
import os
import sys
is_python2 = sys.version_info[0] == 2
import bokeh.command.subcommands.svg as scsvg
from bokeh.command.bootstrap import main
from bokeh.util.testing import TmpDir, WorkingDir, with_directory_contents
from . import basic_svg_sc... | bsd-3-clause | 4,272,813,196,190,819,000 | 30.7375 | 141 | 0.571288 | false |
comocheng/RMG-Py | rmgpy/cantherm/output.py | 11 | 6891 | #!/usr/bin/env python
# encoding: utf-8
################################################################################
#
# RMG - Reaction Mechanism Generator
#
# Copyright (c) 2002-2009 Prof. William H. Green (whgreen@mit.edu) and the
# RMG Team (rmg_dev@mit.edu)
#
# Permission is hereby granted, free of cha... | mit | 8,650,736,439,939,714,000 | 38.83237 | 151 | 0.564795 | false |
beeftornado/sentry | tests/snuba/snuba/test_query_subscription_consumer.py | 1 | 7108 | from __future__ import absolute_import
from copy import deepcopy
from datetime import timedelta
from uuid import uuid4
import pytz
from confluent_kafka import Producer
from dateutil.parser import parse as parse_date
from django.conf import settings
from django.test.utils import override_settings
from exam import fixt... | bsd-3-clause | 5,257,182,840,837,318,000 | 34.718593 | 100 | 0.617192 | false |
ghchinoy/tensorflow | tensorflow/python/training/coordinator.py | 36 | 18001 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -1,249,794,374,664,365,300 | 34.365422 | 80 | 0.652019 | false |
boberfly/gaffer | python/GafferVDBTest/__init__.py | 7 | 2212 | ##########################################################################
#
# Copyright (c) 2017, 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:
#
# * Redistrib... | bsd-3-clause | 3,547,454,250,888,360,400 | 46.06383 | 77 | 0.711573 | false |
karban/agros2d | resources/python/logilab/common/daemon.py | 3 | 6267 | # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... | gpl-2.0 | 7,552,632,244,564,295,000 | 32.875676 | 81 | 0.595819 | false |
shenhzou654321/TDDDemo | pythonNotes/sort.py | 2 | 1901 |
# sort three num
count=0
print 'please input three num for sort'
while count <3:
print 'please input num%d'%(count+1)
input=raw_input('num%d='%(count+1))
if input.isdigit()==False:
print 'input error, not a num'
continue
count+=1
if count==1:
num1=input
#print 'num1 is',num1
elif count==2:
num2=inpu... | mit | 1,496,095,537,843,354,000 | 19.391304 | 59 | 0.629867 | false |
TridevGuha/django | tests/model_regress/tests.py | 326 | 8962 | from __future__ import unicode_literals
import datetime
from operator import attrgetter
from django.core.exceptions import ValidationError
from django.db import router
from django.db.models.sql import InsertQuery
from django.test import TestCase, skipUnlessDBFeature
from django.utils import six
from django.utils.time... | bsd-3-clause | 5,660,637,949,106,592,000 | 36.033058 | 89 | 0.599755 | false |
google/ci_edit | app/program_window.py | 1 | 16356 | # Copyright 2018 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 or agreed to in writing, ... | apache-2.0 | -7,972,255,237,851,548,000 | 38.602906 | 87 | 0.566642 | false |
ImreToth/XWaves | frontend/src/main/frontend/node/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py | 1825 | 17014 | # 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.
"""GYP backend that generates Eclipse CDT settings files.
This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML
files that can be importe... | gpl-3.0 | 8,946,110,586,338,787,000 | 39.032941 | 80 | 0.64394 | false |
samsu/neutron | plugins/vmware/common/securitygroups.py | 36 | 5218 | # Copyright 2013 VMware, 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 a... | apache-2.0 | 3,209,902,488,341,877,000 | 37.940299 | 79 | 0.608087 | false |
saurabh6790/frappe | frappe/recorder.py | 1 | 4779 | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
from collections import Counter
import datetime
import inspect
import json
import re
import time
import frappe
import sqlparse
from frappe import _
RECOR... | mit | -2,882,549,083,641,912,300 | 24.020942 | 87 | 0.692404 | false |
rgeoghegan/pycco | pycco/main.py | 1 | 18920 | #!/usr/bin/env python
"""
"**Pycco**" is a Python port of [Docco](http://jashkenas.github.com/docco/):
the original quick-and-dirty, hundred-line-long, literate-programming-style
documentation generator. It produces HTML that displays your comments
alongside your code. Comments are passed through
[Markdown](http://dar... | mit | -3,977,158,397,097,458,000 | 35.384615 | 149 | 0.59297 | false |
vivekananda/fbeats | django/contrib/flatpages/forms.py | 79 | 1727 | from django import forms
from django.conf import settings
from django.contrib.flatpages.models import FlatPage
from django.utils.translation import ugettext, ugettext_lazy as _
class FlatpageForm(forms.ModelForm):
url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/\.~]+$',
help_text = _("... | bsd-3-clause | 6,969,579,051,976,524,000 | 41.121951 | 90 | 0.599884 | false |
andykimpe/chromium-test-npapi | tools/cr/cr/actions/gyp.py | 59 | 1257 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A module to add gyp support to cr."""
import cr
import os
GYP_DEFINE_PREFIX = 'GYP_DEF_'
class GypPrepareOut(cr.PrepareOut):
"""A prepare action that... | bsd-3-clause | -7,877,372,615,570,455,000 | 31.230769 | 79 | 0.658711 | false |
keedio/hue | desktop/core/ext-py/Django-1.6.10/tests/model_inheritance_same_model_name/tests.py | 58 | 1517 | from __future__ import absolute_import
from django.test import TestCase
from model_inheritance.models import Title
class InheritanceSameModelNameTests(TestCase):
def setUp(self):
# The Title model has distinct accessors for both
# model_inheritance.Copy and model_inheritance_same_model_name.Cop... | apache-2.0 | -548,925,635,253,502,100 | 41.138889 | 97 | 0.653922 | false |
pieter-lazzaro/packer | scripts/sort-md-list.py | 31 | 2144 | #!/usr/bin/env python
"""
sort-md-list.py sorts markdown lists
Use this script to prepare sections of the changelog.
this script expects a bulleted markdown list in stdout
for example
./sort-md-list.py - <<EOF
* builder/amazon: Only delete temporary key if we created one. [GH-4850]
* core: Correctly reject config f... | mpl-2.0 | -3,276,013,685,567,438,000 | 28.369863 | 85 | 0.634328 | false |
LearnEra/LearnEraPlaftform | common/djangoapps/course_action_state/managers.py | 25 | 5737 | """
Model Managers for Course Actions
"""
import traceback
from django.db import models, transaction
class CourseActionStateManager(models.Manager):
"""
An abstract Model Manager class for Course Action State models.
This abstract class expects child classes to define the ACTION (string) field.
"""
... | agpl-3.0 | 2,618,509,633,972,930,000 | 36.743421 | 122 | 0.628377 | false |
jaehyuk/bds-files | chapter-11-alignment/alnstat/alnstat.py | 9 | 1169 | import sys
import pysam
from collections import Counter
if len(sys.argv) < 2:
sys.exit("usage: alnstat.py in.bam")
fname = sys.argv[1]
mode = "rb" if fname.endswith(".bam") else "r"
bamfile = pysam.AlignmentFile(fname, mode)
stats = Counter()
for read in bamfile:
stats["total"] += 1
stats['qcfail'] += in... | mit | 7,298,424,081,696,719,000 | 28.225 | 73 | 0.617622 | false |
PaulWay/spacewalk | scripts/datasource-query-usage.py | 20 | 2089 | #!/usr/bin/python
#
# Copyright (c) 2008 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have ... | gpl-2.0 | 8,658,991,478,672,216,000 | 29.720588 | 92 | 0.661082 | false |
openilabs/falconlab | env/lib/python2.7/site-packages/tests/test_error_handlers.py | 1 | 3233 | import json
import falcon
import falcon.testing as testing
def capture_error(ex, req, resp, params):
resp.status = falcon.HTTP_723
resp.body = 'error: %s' % str(ex)
def handle_error_first(ex, req, resp, params):
resp.status = falcon.HTTP_200
resp.body = 'first error handler'
class CustomBaseExcep... | mit | 3,647,493,085,903,961,000 | 30.38835 | 74 | 0.66378 | false |
Distrotech/intellij-community | python/helpers/pydev/pydevd_reload.py | 54 | 16015 | """
Based on the python xreload.
Changes
======================
1. we don't recreate the old namespace from new classes. Rather, we keep the existing namespace,
load a new version of it and update only some of the things we can inplace. That way, we don't break
things such as singletons or end up with a second repres... | apache-2.0 | 7,722,570,998,820,485,000 | 34.353201 | 128 | 0.564221 | false |
TheTimmy/spack | var/spack/repos/builtin/packages/py-fastaindex/package.py | 3 | 1696 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | 4,372,227,119,605,843,500 | 44.837838 | 87 | 0.679835 | false |
kpanic/lymph | iris/events/simple.py | 1 | 1201 | from iris.core.interfaces import Interface
from iris.core.decorators import rpc
from iris.events.base import BaseEventSystem
from iris.core.events import Event
class SimpleBrokerClient(Interface):
service_type = 'simple_broker_client'
register_with_coordinator = False
@rpc()
def event(self, channel, ... | apache-2.0 | 2,760,609,053,171,624,400 | 28.292683 | 79 | 0.641132 | false |
outboxafrica/pimaa | PiMaa/sensors/lib/GrovePi/setup.py | 3 | 1891 | #!/usr/bin/python #!/usr/bin/env python
#
# GrovePi Python Setup
#
# The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi
#
# Have a question about this example? Ask on the forums here: http://forum.dexterindustries.com/c/grovepi
#
'... | gpl-3.0 | 7,510,111,706,947,704,000 | 41.977273 | 139 | 0.782655 | false |
bigdataelephants/scikit-learn | sklearn/preprocessing/label.py | 8 | 28313 | # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Mathieu Blondel <mathieu@mblondel.org>
# Olivier Grisel <olivier.grisel@ensta.org>
# Andreas Mueller <amueller@ais.uni-bonn.de>
# Joel Nothman <joel.nothman@gmail.com>
# Hamzeh Alsalhi <ha258@cornell.edu>
# Licens... | bsd-3-clause | 943,851,409,905,378,200 | 32.348645 | 79 | 0.574012 | false |
cloudera/hue | desktop/core/ext-py/vine-1.2.0/t/unit/test_promises.py | 2 | 9202 | from __future__ import absolute_import, unicode_literals
import pytest
import sys
import traceback
from collections import deque
from struct import pack, unpack
import weakref
from case import Mock
from vine.funtools import wrap
from vine.promises import promise
class test_promise:
def test_example(self):
... | apache-2.0 | 4,252,555,437,787,777,000 | 25.366762 | 63 | 0.517822 | false |
icloudrnd/automation_tools | openstack_dashboard/api/vpn.py | 44 | 14830 | # Copyright 2013, Mirantis 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 agre... | apache-2.0 | -359,157,310,327,756,160 | 38.441489 | 79 | 0.654889 | false |
0jpq0/kbengine | kbe/src/lib/python/Lib/email/parser.py | 86 | 5045 | # Copyright (C) 2001-2007 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', 'BytesParser', 'BytesHeaderParser',
'FeedParser', 'BytesFeedParser']
from io ... | lgpl-3.0 | -3,946,299,496,832,863,000 | 36.37037 | 78 | 0.671358 | 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.