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 |
|---|---|---|---|---|---|---|---|---|---|---|
crossbario/crossbar-examples | work/multisub.py | 3 | 3259 | from twisted.internet import reactor
from twisted.internet.defer import inlineCallbacks
from autobahn.wamp.types import PublishOptions, SubscribeOptions
from autobahn.twisted.wamp import ApplicationSession
from autobahn.twisted.wamp import ApplicationRunner
from autobahn.twisted.util import sleep
class MyComponent(A... | apache-2.0 | 1,699,325,372,147,598,600 | 31.59 | 76 | 0.63455 | false |
avatar29A/pyfuzzy | fuzzy/norm/HarmonicMean.py | 1 | 1128 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2009 Rene Liebscher
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option) any
# later version.... | mit | 6,804,174,271,077,154,000 | 34.25 | 80 | 0.691489 | false |
GdZ/scriptfile | software/googleAppEngine/lib/django_1_3/django/db/backends/oracle/introspection.py | 210 | 5106 | from django.db.backends import BaseDatabaseIntrospection
import cx_Oracle
import re
foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)")
class DatabaseIntrospection(BaseDatabaseIntrospection):
# Maps type objects to Django Field types.
data_types_re... | mit | -2,323,550,722,440,173,000 | 40.852459 | 113 | 0.624755 | false |
Midrya/chromium | third_party/boto/core/auth.py | 68 | 3150 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without... | bsd-3-clause | 9,043,606,454,965,595,000 | 39.384615 | 76 | 0.651111 | false |
applicationdevm/XlsxWriter | xlsxwriter/test/comparison/test_chart_data_labels03.py | 8 | 1743 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | bsd-2-clause | 5,531,700,634,167,231,000 | 25.014925 | 79 | 0.53012 | false |
AutorestCI/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/verification_ip_flow_parameters.py | 1 | 3503 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 2,786,242,515,689,114,600 | 44.493506 | 155 | 0.630888 | false |
MatthewWilkes/django-oscar | src/oscar/apps/search/app.py | 33 | 1040 | from django.conf.urls import url
from haystack.views import search_view_factory
from oscar.core.application import Application
from oscar.core.loading import get_class
from oscar.apps.search import facets
class SearchApplication(Application):
name = 'search'
search_view = get_class('search.views', 'FacetedSe... | bsd-3-clause | -2,561,677,991,656,586,000 | 29.588235 | 79 | 0.6375 | false |
sarvex/tensorflow | tensorflow/lite/testing/op_tests/elu.py | 17 | 2060 | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -3,008,720,789,276,297,700 | 37.867925 | 80 | 0.657767 | false |
GNOME/conduit | test/soup/env/__init__.py | 2 | 1235 |
import os, sys
from soup.utils.pluginloader import PluginLoader
class EnvironmentWrapper(object):
@classmethod
def enabled(cls, opts):
return True
def prepare_environment(self):
""" Modify the environment that the tests are running in """
pass
def decorate_test(self, test):... | gpl-2.0 | 4,498,911,734,564,035,000 | 24.204082 | 85 | 0.603239 | false |
jctanner/ansible | test/units/modules/test_pip.py | 35 | 1502 | # Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
import pytest
from ansible.modules import pip
pytestmark = pytest.mark.usefixtures('p... | gpl-3.0 | 540,761,454,920,487,550 | 38.526316 | 102 | 0.663782 | false |
tsgit/invenio | modules/bibcheck/lib/plugins/rename_subfield_filter.py | 2 | 2388 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2013, 2016 CERN.
##
## Invenio 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 opt... | gpl-2.0 | -3,023,848,831,367,696,000 | 36.904762 | 79 | 0.675879 | false |
xbmcmegapack/plugin.video.megapack.dev | resources/lib/menus/home_languages_japanese.py | 1 | 1113 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
This file is part of XBMC Mega Pack Addon.
Copyright (C) 2014 Wolverine (xbmcmegapack@gmail.com)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Softwar... | gpl-3.0 | 1,024,013,777,023,516,400 | 37.344828 | 76 | 0.69577 | false |
caraya/ebook-experiments | python-xml-gen/xml-gen.py | 2 | 2180 | #!/usr/bin/env python
import mimetypes
import glob
import os
import os.path
# Initialize the mimetypes database
mimetypes.init()
# Create the package.opf file
package = open('package.opf', 'w')
# The glob below should encompass everything under
# OEBPS. Right now I'm trying to remove empty directories
# and the pac... | mit | -2,435,993,341,242,262,000 | 29.704225 | 95 | 0.68211 | false |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/nbconvert/filters/latex.py | 10 | 1868 | """Latex filters.
Module of useful filters for processing Latex within Jinja latex templates.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in th... | gpl-3.0 | -421,763,220,644,157,000 | 28.1875 | 116 | 0.400428 | false |
mlperf/training_results_v0.5 | v0.5.0/google/cloud_v3.8/gnmt-tpuv3-8/code/gnmt/model/staging/models/rough/mask_rcnn/utils.py | 8 | 2663 | # Copyright 2018 Google. 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 agree... | apache-2.0 | -1,370,703,552,964,764,200 | 31.084337 | 80 | 0.677056 | false |
ak15199/rop | art/cascade.py | 1 | 1744 | from ._baseclass import ArtBaseClass
import numpy as np
from opc.colors import BLACK
from opc.hue import hsvToRgb
from math import fmod, sin, cos, sqrt
class ClearTrain(object):
def __init__(self, length):
self.length = length
self.points = [(0, 0) for i in range(length)]
self.head = 0
... | gpl-3.0 | -2,830,745,037,535,038,500 | 22.890411 | 76 | 0.576835 | false |
pedropenna/.emacs.d | elpa/floobits-20160804.1135/floo/common/api.py | 2 | 7200 | import sys
import base64
import json
import subprocess
import traceback
from functools import wraps
try:
import ssl
except ImportError:
ssl = False
PY2 = sys.version_info < (3, 0)
try:
import __builtin__
str_instances = (str, __builtin__.basestring)
except Exception:
str_instances = (str, )
try... | gpl-3.0 | -8,100,493,360,234,685,000 | 28.032258 | 128 | 0.585 | false |
zhjunlang/kbengine | kbe/src/lib/python/Lib/distutils/tests/test_build_clib.py | 95 | 4978 | """Tests for distutils.command.build_clib."""
import unittest
import os
import sys
from test.support import run_unittest
from distutils.command.build_clib import build_clib
from distutils.errors import DistutilsSetupError
from distutils.tests import support
from distutils.spawn import find_executable
class BuildCLib... | lgpl-3.0 | 422,059,862,898,152,300 | 33.811189 | 77 | 0.580755 | false |
chaluemwut/fbserver | venv/lib/python2.7/site-packages/sklearn/decomposition/tests/test_nmf.py | 33 | 6189 | import numpy as np
from scipy import linalg
from sklearn.decomposition import nmf
from sklearn.utils.testing import assert_true
from sklearn.utils.testing import assert_false
from sklearn.utils.testing import raises
from sklearn.utils.testing import assert_array_almost_equal
from sklearn.utils.testing import assert_gr... | apache-2.0 | -6,324,934,617,351,334,000 | 33.575419 | 79 | 0.620456 | false |
evilhero/mylar | lib/comictaggerlib/pageloader.py | 1 | 2202 | """A PyQT4 class to load a page image from a ComicArchive in a background thread"""
# Copyright 2012-2014 Anthony Beville
# 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.apa... | gpl-3.0 | 4,563,070,539,260,776,000 | 30.457143 | 83 | 0.682561 | false |
leosartaj/autosign | tests/helper.py | 1 | 1238 | #!/usr/bin/env python2
##
# autosign
# https://github.com/leosartaj/autosign.git
#
# copyright (c) 2014 sartaj singh
# licensed under the mit license.
##
import shutil, os
from autosign import config
"""
Helper functions for performing tests
"""
def newFile(fName):
"""
Touch a new file
"""
with ope... | mit | -5,767,580,852,233,561,000 | 27.790698 | 86 | 0.689015 | false |
nicoboss/Floatmotion | OpenGL/GL/ARB/internalformat_query.py | 9 | 1526 | '''OpenGL extension ARB.internalformat_query
This module customises the behaviour of the
OpenGL.raw.GL.ARB.internalformat_query to provide a more
Python-friendly API
Overview (from the spec)
OpenGL 4.1 has a number of queries to indicate the maximum number of
samples available for different formats. These give ... | agpl-3.0 | -1,894,705,947,695,225,000 | 38.153846 | 71 | 0.800786 | false |
justmearc/zero-phone | app-list.py | 1 | 2441 | #List of all apps and menu to open them
#copyright (c) 2015 Tyler Spadgenske
#GPL License
###############################
#To be packaged with stock TYOS
###############################
import sys, time
import pygame
class Run():
def __init__(self, fona):
#Stuff to follow app protocol
self.exit = ... | mit | -1,388,046,174,135,384,600 | 34.897059 | 113 | 0.544449 | false |
sumedhasingla/VTK | ThirdParty/Twisted/twisted/internet/test/test_gtkreactor.py | 28 | 2861 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests to ensure all attributes of L{twisted.internet.gtkreactor} are
deprecated.
"""
import sys
from twisted.trial.unittest import TestCase
class GtkReactorDeprecation(TestCase):
"""
Tests to ensure all attributes of L{twisted.int... | bsd-3-clause | 3,133,090,654,484,564,500 | 29.115789 | 79 | 0.624956 | false |
mgit-at/ansible | lib/ansible/plugins/lookup/keyring.py | 59 | 1901 | # (c) 2016, Samuel Boucher <boucher.samuel.c@gmail.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
lookup: keyring
author:
... | gpl-3.0 | 788,699,212,251,529,100 | 27.80303 | 102 | 0.658601 | false |
mzdaniel/oh-mainline | vendor/packages/twisted/twisted/web/static.py | 20 | 35712 | # -*- test-case-name: twisted.web.test.test_static -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Static resources for L{twisted.web}.
"""
import os
import warnings
import urllib
import itertools
import cgi
import time
from zope.interface import implements
from twisted.web import se... | agpl-3.0 | 5,341,144,946,917,862,000 | 31.975069 | 123 | 0.591818 | false |
by46/tunicorn | tunicorn/packages/werkzeug/serving.py | 73 | 27736 | # -*- coding: utf-8 -*-
"""
werkzeug.serving
~~~~~~~~~~~~~~~~
There are many ways to serve a WSGI application. While you're developing
it you usually don't want a full blown webserver like Apache but a simple
standalone one. From Python 2.5 onwards there is the `wsgiref`_ server in
the standa... | mit | -7,378,603,220,714,229,000 | 36.380054 | 81 | 0.591506 | false |
majora2007/plexpy | lib/apscheduler/schedulers/tornado.py | 33 | 1792 | from __future__ import absolute_import
from datetime import timedelta
from functools import wraps
from apscheduler.schedulers.base import BaseScheduler
from apscheduler.util import maybe_ref
try:
from tornado.ioloop import IOLoop
except ImportError: # pragma: nocover
raise ImportError('TornadoScheduler requi... | gpl-3.0 | -1,246,745,085,226,435,000 | 28.866667 | 98 | 0.599888 | false |
MartialD/hyperspy | hyperspy/events.py | 5 | 18478 | import inspect
import collections
from contextlib import contextmanager
from functools import wraps # Used in exec statement
import re
class Events(object):
"""
Events container.
All available events are attributes of this class.
"""
def __init__(self):
self._events = {}
@contex... | gpl-3.0 | -2,710,473,116,656,770,600 | 33.345725 | 95 | 0.546975 | false |
calfonso/ansible | lib/ansible/modules/web_infrastructure/ansible_tower/tower_inventory.py | 18 | 3741 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2017, Wayne Witzel III <wayne@riotousliving.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1... | gpl-3.0 | 8,383,005,935,507,504,000 | 30.175 | 122 | 0.642876 | false |
tcpcloud/contrail-controller | src/discovery/tests/test_dsa.py | 2 | 20448 | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import sys
import gevent
import uuid
import time
sys.path.append("../config/common/tests")
from testtools.matchers import Equals, Contains, Not
from test_utils import *
import test_common
import test_case
from vnc_api.vnc_api import *
from vnc_api.g... | apache-2.0 | 8,585,418,364,734,015,000 | 39.652087 | 114 | 0.556827 | false |
Acehaidrey/incubator-airflow | airflow/contrib/hooks/spark_submit_hook.py | 7 | 1178 | #
# 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... | apache-2.0 | -1,499,789,411,635,660,300 | 39.62069 | 97 | 0.769949 | false |
lepture/pythondotorg | jobs/forms.py | 8 | 3256 | from django import forms
from django.forms.widgets import CheckboxSelectMultiple
from django.utils.translation import ugettext_lazy as _
from django_comments_xtd.conf import settings as comments_settings
from django_comments_xtd.forms import CommentForm
from django_comments_xtd.models import TmpXtdComment
from .model... | apache-2.0 | -7,899,614,748,248,372,000 | 32.22449 | 87 | 0.579238 | false |
paweljasinski/ironpython3 | Src/StdLib/Lib/lib2to3/fixes/fix_raise.py | 203 | 2926 | """Fixer for 'raise E, V, T'
raise -> raise
raise E -> raise E
raise E, V -> raise E(V)
raise E, V, T -> raise E(V).with_traceback(T)
raise E, None, T -> raise E.with_traceback(T)
raise (((E, E'), E''), E'''), V -> raise E(V)
raise "foo", V, T -> warns about string exceptions
CAVEATS:... | apache-2.0 | -8,475,699,751,188,116,000 | 31.511111 | 80 | 0.539645 | false |
freieslabor/laborbot-modules | modules/asl.py | 1 | 3040 | # coding=utf8
"""
asl.py - Willie Freies Labor Activity Streams Lite Module
Licensed under a Mozilla Public License 2.0.
"""
from willie.module import commands, interval
import urllib2, json, os, pickle
from datetime import datetime, timedelta
ASL_QUERY = '-wiki.*&-sensor.traffic-light&-sensor.mate-o-meter&-twitter.re... | mpl-2.0 | -3,572,736,699,201,131,000 | 28.514563 | 81 | 0.630263 | false |
torbjoernk/easybuild-easyblocks | easybuild/easyblocks/n/netcdf4_python.py | 14 | 2883 | ##
# Copyright 2013 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (http://w... | gpl-2.0 | 8,277,056,511,676,264,000 | 36.934211 | 114 | 0.665626 | false |
ucloud/uai-sdk | uaitrain/api/modify_train_job_memo.py | 1 | 2173 | # Copyright 2017 The UAI-SDK 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 applicable... | apache-2.0 | 2,292,107,278,880,466,200 | 46.23913 | 119 | 0.617119 | false |
JonathanStein/odoo | addons/portal_project_issue/tests/__init__.py | 260 | 1086 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 | -262,621,620,265,328,100 | 44.25 | 78 | 0.619705 | false |
yongtang/tensorflow | tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/hash_table_v1.py | 10 | 3322 | # Copyright 2019 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 | -7,851,913,876,231,427,000 | 35.108696 | 90 | 0.640879 | false |
arseneyr/essentia | test/src/unittest/highlevel/test_intensity.py | 1 | 2586 | #!/usr/bin/env python
# Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia 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 ... | agpl-3.0 | 3,888,760,385,554,009,600 | 37.181818 | 81 | 0.685615 | false |
meghana1995/sympy | sympy/series/order.py | 4 | 15386 | from __future__ import print_function, division
from sympy.core import S, sympify, Expr, Rational, Symbol, Dummy
from sympy.core import Add, Mul, expand_power_base, expand_log
from sympy.core.cache import cacheit
from sympy.core.compatibility import default_sort_key, is_sequence
from sympy.core.containers import Tuple... | bsd-3-clause | -1,408,847,501,742,124,300 | 33.575281 | 95 | 0.478357 | false |
gurinderhans/pysnap | pysnap/__init__.py | 3 | 12642 | #!/usr/bin/env python
import json
import os.path
from time import time
from pysnap.utils import (encrypt, decrypt, decrypt_story,
make_media_id, request)
MEDIA_IMAGE = 0
MEDIA_VIDEO = 1
MEDIA_VIDEO_NOAUDIO = 2
FRIEND_CONFIRMED = 0
FRIEND_UNCONFIRMED = 1
FRIEND_BLOCKED = 2
PRIVACY_EVERYONE ... | mit | 3,976,883,354,588,239,000 | 29.985294 | 87 | 0.544534 | false |
grap/OCB | addons/account_budget/report/analytic_account_budget_report.py | 53 | 7537 | # -*- 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 | 6,843,926,783,451,323,000 | 42.819767 | 214 | 0.441024 | false |
KaranToor/MA450 | google-cloud-sdk/lib/surface/test/android/devices/__init__.py | 4 | 1372 | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 | 6,308,503,419,114,939,000 | 32.463415 | 78 | 0.707726 | false |
CydarLtd/ansible | lib/ansible/modules/cloud/amazon/ecs_service_facts.py | 50 | 9143 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... | gpl-3.0 | 3,941,370,142,836,584,000 | 36.625514 | 326 | 0.627365 | false |
tealover/nova | nova/tests/unit/objects/test_agent.py | 53 | 3762 | # Copyright 2014 Red Hat, 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 a... | apache-2.0 | -2,289,234,575,542,990,000 | 35.524272 | 79 | 0.631845 | false |
googlefonts/TachyFont | run_time/src/gae_server/third_party/old-fonttools-master/Lib/fontTools/ttLib/tables/C_O_L_R_.py | 11 | 5313 | # Copyright 2013 Google, Inc. All Rights Reserved.
#
# Google Author(s): Behdad Esfahbod
from __future__ import print_function, division, absolute_import
from fontTools.misc.py23 import *
from fontTools.misc.textTools import safeEval
from . import DefaultTable
import operator
import struct
class table_C_O_L_R_(Defau... | apache-2.0 | -8,570,704,256,580,740,000 | 32 | 131 | 0.714286 | false |
muchbeli/bitcoin-abe | Abe/upgrade.py | 20 | 43693 | #!/usr/bin/env python
# Copyright(C) 2011,2012,2013,2014 by Abe developers.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any lat... | agpl-3.0 | -3,312,561,648,587,022,000 | 36.248934 | 107 | 0.569588 | false |
tumbl3w33d/ansible | lib/ansible/modules/cloud/google/gcp_compute_vpn_tunnel.py | 13 | 17413 | #!/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 | 3,954,824,000,292,367,400 | 32.746124 | 128 | 0.644633 | false |
adrianholovaty/django | tests/regressiontests/queries/models.py | 4 | 9168 | """
Various complex queries that have been problematic in the past.
"""
import threading
from django.db import models
class DumbCategory(models.Model):
pass
class NamedCategory(DumbCategory):
name = models.CharField(max_length=10)
class Tag(models.Model):
name = models.CharField(max_length=10)
par... | bsd-3-clause | 4,670,105,564,179,148,000 | 24.898305 | 83 | 0.669721 | false |
savoirfairelinux/django | django/contrib/gis/measure.py | 81 | 11948 | # Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz>
# 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,
#... | bsd-3-clause | -7,842,586,172,666,411,000 | 34.87988 | 112 | 0.572062 | false |
VisionistInc/advent-of-code-2016 | joshgordon/01/parse_1.py | 1 | 2606 | from operator import add, sub
import sys
#image stuff
from PIL import Image, ImageDraw
#Read in the directions
with open(sys.argv[1]) as f:
directions = f.read()[:-1]
directions.strip()
directions = directions.split(', ')
compass = 0
# Compass directions:
# 0 : north
# 1 : east
# 2 : south
# 3 : west
# turning R... | mit | 1,687,627,983,739,428,400 | 27.326087 | 142 | 0.634305 | false |
shakamunyi/tensorflow | tensorflow/contrib/batching/__init__.py | 85 | 1029 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -993,843,223,294,653,300 | 38.576923 | 80 | 0.710398 | false |
auerj/flask-oauthlib | flask_oauthlib/contrib/apps.py | 6 | 7551 | """
flask_oauthlib.contrib.apps
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The bundle of remote app factories for famous third platforms.
Usage::
from flask import Flask
from flask_oauthlib.client import OAuth
from flask_oauthlib.contrib.apps import github
app = Flask(__name__)
... | bsd-3-clause | 8,106,985,589,484,534,000 | 31.973799 | 76 | 0.639518 | false |
15Dkatz/pants | tests/python/pants_test/backend/graph_info/tasks/test_cloc.py | 16 | 2934 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.backend.g... | apache-2.0 | 1,779,570,866,198,465,500 | 48.728814 | 99 | 0.656101 | false |
clayz/crazy-quiz-web | lib/wtforms/fields/simple.py | 38 | 1834 | import warnings
from .. import widgets
from .core import StringField, BooleanField
__all__ = (
'BooleanField', 'TextAreaField', 'PasswordField', 'FileField',
'HiddenField', 'SubmitField', 'TextField'
)
class TextField(StringField):
"""
Legacy alias for StringField
.. deprecated:: 2.0
"""
... | apache-2.0 | 8,442,609,807,450,330,000 | 25.57971 | 105 | 0.664122 | false |
ajaali/django | tests/gis_tests/geoadmin/tests.py | 304 | 3157 | from __future__ import unicode_literals
from django.contrib.gis import admin
from django.contrib.gis.geos import Point
from django.test import TestCase, override_settings, skipUnlessDBFeature
from .admin import UnmodifiableAdmin
from .models import City, site
@skipUnlessDBFeature("gis_enabled")
@override_settings(R... | bsd-3-clause | 4,941,068,504,891,635,000 | 42.246575 | 107 | 0.656636 | false |
drglove/SickRage | SickBeard.py | 2 | 21428 | #!/usr/bin/env python2
# 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 ve... | gpl-3.0 | -4,067,535,248,048,385,000 | 38.903166 | 148 | 0.566642 | false |
sixones/vitality | dbscripts/dump_attrs.py | 1 | 4004 | import MySQLdb
import dump_table
from optparse import OptionParser
import db_config
#calculate the ship attribute tables.
def dumpAttribute(conn,query,attrNum):
cursor = conn.cursor()
cursor.execute(query)
rowcount = int(cursor.rowcount)
conn.query("BEGIN;");
for i in range (0,rowcount):
... | gpl-3.0 | 3,528,943,919,900,190,700 | 27 | 125 | 0.605894 | false |
tkaitchuck/nupic | py/nupic/research/TP_R.py | 1 | 127081 | #! /usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditi... | gpl-3.0 | -1,353,485,262,097,781,800 | 38.295609 | 93 | 0.591245 | false |
AdamRTomkins/libSpineML | libSpineML/smlUtils.py | 1 | 10142 | """
A script to convert the drosophila connectome into SpineML
This build upon the pure data to add in the required infered network components:
# Install libSpineML from source
# https://github.com/AdamRTomkins/libSpineML
"""
from __future__ import division
from libSpineML import smlExperiment as exp
from libSpine... | gpl-3.0 | -6,867,137,729,421,636,000 | 33.148148 | 217 | 0.547624 | false |
arju88nair/projectCulminate | venv/lib/python3.5/encodings/shift_jisx0213.py | 816 | 1059 | #
# shift_jisx0213.py: Python Unicode Codec for SHIFT_JISX0213
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_jp, codecs
import _multibytecodec as mbc
codec = _codecs_jp.getcodec('shift_jisx0213')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEnc... | apache-2.0 | 905,091,867,592,527,700 | 26.153846 | 74 | 0.705382 | false |
yannickcr/CouchPotatoServer | couchpotato/core/media/_base/providers/torrent/thepiratebay.py | 7 | 6057 | import re
import traceback
from bs4 import BeautifulSoup
from couchpotato.core.helpers.encoding import toUnicode
from couchpotato.core.helpers.variable import tryInt
from couchpotato.core.logger import CPLog
from couchpotato.core.media._base.providers.torrent.base import TorrentMagnetProvider
import six
log = CPLog(... | gpl-3.0 | 4,449,166,736,608,754,700 | 34.421053 | 129 | 0.448902 | false |
yaukwankiu/twstocks | mark1.py | 1 | 9719 | # -*- coding: utf8 -*-
############################
# imports
import time
import datetime
import urllib2
import re
import os
import pickle
import numpy as np
import matplotlib.pyplot as plt
############################
# defining the parameters
currentPriceRegex = re.compile(r'(?<=\<td\ align\=\"center\"\ bgcolor\... | cc0-1.0 | -1,207,213,852,021,772,300 | 34.028881 | 137 | 0.510667 | false |
pplatek/odoo | addons/account/wizard/account_journal_select.py | 385 | 2068 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 9,087,506,490,914,794,000 | 41.204082 | 115 | 0.599613 | false |
cyrusin/tornado | tornado/test/runtests.py | 1 | 7199 | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function, with_statement
import gc
import locale # system locale module, not tornado.locale
import logging
import operator
import textwrap
import sys
from tornado.httpclient import AsyncHTTPClient
from tornado.httpserver import HTTPServer
f... | apache-2.0 | 6,708,545,689,651,259,000 | 38.773481 | 80 | 0.667315 | false |
Bunshinn/myPython | 智联职位爬取/jobs_of_data_analysis_on_zhilian.py | 1 | 2488 | # -*- coding: utf-8 -*-
"""
@author: QQ:412319433
"""
import requests
from bs4 import BeautifulSoup
import sqlite3
import time
s = time.clock()
def htmlparse(bs, tag, attr = None, attrs= None):
'''
bs : BeautifulSoup对象
tag : 要处理的标签名
attr : 要获取属性值的属性名
attrs : 要查找的属性值对
'''
content ... | gpl-3.0 | -7,930,567,278,160,025,000 | 26.896552 | 130 | 0.590684 | false |
popbones/jieba | test/parallel/test_pos.py | 65 | 4862 | #encoding=utf-8
from __future__ import print_function
import sys
sys.path.append("../../")
import jieba
jieba.enable_parallel(4)
import jieba.posseg as pseg
def cuttest(test_sent):
result = pseg.cut(test_sent)
for w in result:
print(w.word, "/", w.flag, ", ", end=' ')
print("")
if __name__ == "... | mit | 542,678,786,288,057,800 | 27.36 | 128 | 0.664669 | false |
Z2PackDev/bandstructure_utils | bands_inspect/eigenvals.py | 2 | 3489 | # -*- coding: utf-8 -*-
# (c) 2017-2019, ETH Zurich, Institut fuer Theoretische Physik
# Author: Dominik Gresch <greschd@gmx.ch>
"""
Defines the data container for eigenvalue data (bandstructures).
"""
import types
import numpy as np
from fsc.export import export
from fsc.hdf5_io import HDF5Enabled, subscribe_hdf5
... | gpl-3.0 | -6,525,068,427,602,443,000 | 34.602041 | 184 | 0.657495 | false |
windyuuy/opera | chromium/src/tools/gyp/test/copies/gyptest-all.py | 264 | 1289 | #!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies file copies using an explicit build target of 'all'.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp('copies.gyp', ... | bsd-3-clause | 3,228,956,825,494,597,600 | 31.225 | 79 | 0.573313 | false |
lukas-ke/faint-graphics-editor | build-sys/build_sys/help_util/markup_regex.py | 1 | 2539 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright 2014 Lukas Kemmer
#
# 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
#
# Unl... | apache-2.0 | 3,467,779,492,464,068,600 | 26.211111 | 69 | 0.625049 | false |
pchauncey/ansible | lib/ansible/modules/windows/win_regmerge.py | 33 | 3903 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Jon Hawkesworth (@jhawkesworth) <figs@unity.demon.co.uk>
#
# 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, eith... | gpl-3.0 | 3,714,793,376,246,487,000 | 40.521277 | 157 | 0.72867 | false |
apostle/apostle.py | apostle/mail.py | 1 | 2161 | import json
import base64
class Mail(object):
"""
An object that represents a single email to be sent via Apostle.io
Arbitrary attributes can be added at runtime and will be sent as
the 'data' key to Apostle.io
"""
# The template slug to be sent
template_id = None
# The email address to be sent to
email =... | mit | -7,646,918,179,894,455,000 | 20.39604 | 67 | 0.667284 | false |
petrjasek/superdesk-core | superdesk/data_updates/00007_20180321-092824_archive.py | 2 | 1613 | # -*- coding: utf-8; -*-
# This file is part of Superdesk.
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
#
# Author : tomas
# Creation: 2018-03-21 09:28
import superdesk
import subp... | agpl-3.0 | 1,907,262,362,286,055,000 | 34.844444 | 120 | 0.656541 | false |
yangkf1985/tornado | tornado/httpclient.py | 104 | 26658 | """Blocking and non-blocking HTTP client interfaces.
This module defines a common interface shared by two implementations,
``simple_httpclient`` and ``curl_httpclient``. Applications may either
instantiate their chosen implementation class directly or use the
`AsyncHTTPClient` class from this module, which selects an... | apache-2.0 | 1,591,728,485,178,218,200 | 39.637195 | 83 | 0.634894 | false |
joeyb/joeyb-blog | externals/pygments/styles/autumn.py | 24 | 2123 | # -*- coding: utf-8 -*-
"""
pygments.styles.autumn
~~~~~~~~~~~~~~~~~~~~~~
A colorful style, inspired by the terminal highlighting style.
:copyright: 2006-2007 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from pygments.style import Style
from pygments.token import Keyword, N... | mit | -4,123,342,518,449,250,300 | 31.661538 | 67 | 0.451248 | false |
kblin/supybot-gsoc | src/log.py | 5 | 15607 | ###
# Copyright (c) 2002-2005, Jeremiah Fincher
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of co... | bsd-3-clause | 5,084,999,566,719,224,000 | 36.973236 | 80 | 0.658102 | false |
rosmo/ansible | lib/ansible/plugins/lookup/varnames.py | 50 | 2238 | # (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = """
lookup: varnames
author: Ansible Core
version_added: "2.8"
short_descriptio... | gpl-3.0 | -755,187,860,963,240,300 | 26.975 | 117 | 0.625112 | false |
discosultan/quake-console | Samples/Sandbox/Lib/encodings/cp874.py | 593 | 12851 | """ Python Character Mapping Codec cp874 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP874.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,inpu... | mit | 3,834,994,175,145,080,300 | 40.859935 | 117 | 0.537001 | false |
kyonetca/onionshare | onionshare/web.py | 1 | 7477 | # -*- coding: utf-8 -*-
"""
OnionShare | https://onionshare.org/
Copyright (C) 2014 Micah Lee <micah@micahflee.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, o... | gpl-3.0 | 3,071,253,640,633,947,600 | 30.548523 | 115 | 0.628862 | false |
kmad1729/website | django/utils/dictconfig.py | 335 | 22939 | # This is a copy of the Python logging.config.dictconfig module,
# reproduced with permission. It is provided here for backwards
# compatibility for Python versions prior to 2.7.
#
# Copyright 2009-2010 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# docu... | bsd-3-clause | 7,956,951,303,685,020,000 | 40.481013 | 105 | 0.524914 | false |
cntnboys/410Lab6 | v1/lib/python2.7/site-packages/django/contrib/gis/tests/geo3d/tests.py | 62 | 12075 | from __future__ import unicode_literals
import os
import re
from unittest import skipUnless
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.tests.utils import postgis
from django.test import TestCase
from django.utils._os import upath
if HAS_GEOS:
... | apache-2.0 | -8,742,414,372,079,134,000 | 42.435252 | 676 | 0.621035 | false |
mdrumond/tensorflow | tensorflow/contrib/slim/python/slim/data/prefetch_queue_test.py | 76 | 8616 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 5,359,957,426,143,318,000 | 36.46087 | 80 | 0.639392 | false |
vpramo/contrail-sandesh | library/python/pysandesh/example/pysandesh_example/generator.py | 6 | 4239 | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import gevent
from gevent import monkey; monkey.patch_all()
from pysandesh.sandesh_base import *
from gen_py.generator_msg.ttypes import *
from pysandesh_example.gen_py.vn.ttypes import *
from pysandesh_example.gen_py.vm.ttypes import *
import sandes... | apache-2.0 | -7,726,470,150,763,354,000 | 41.39 | 90 | 0.566879 | false |
vitan/hue | desktop/core/ext-py/Pygments-1.3.1/pygments/cmdline.py | 75 | 13055 | # -*- coding: utf-8 -*-
"""
pygments.cmdline
~~~~~~~~~~~~~~~~
Command line interface.
:copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import sys
import getopt
from textwrap import dedent
from pygments import __version__, highlight
fro... | apache-2.0 | 4,737,250,634,268,025,000 | 29.360465 | 88 | 0.533282 | false |
torchingloom/edx-platform | cms/djangoapps/contentstore/features/course-settings.py | 21 | 7212 | # pylint: disable=C0111
# pylint: disable=W0621
from lettuce import world, step
from terrain.steps import reload_the_page
from selenium.webdriver.common.keys import Keys
from common import type_in_codemirror, upload_file
from django.conf import settings
from nose.tools import assert_true, assert_false, assert_equal ... | agpl-3.0 | -8,549,933,146,764,732,000 | 34.70297 | 104 | 0.693566 | false |
xwolf12/django | django/contrib/admin/checks.py | 18 | 38392 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from itertools import chain
from django.contrib.admin.utils import (
NotRelationField, flatten, get_fields_from_path,
)
from django.core import checks
from django.core.exceptions import FieldDoesNotExist
from django.db import models
from django.forms... | bsd-3-clause | -4,487,395,336,906,940,400 | 38.784456 | 117 | 0.508335 | false |
edmorley/django | django/db/migrations/serializer.py | 24 | 13457 | import builtins
import collections
import datetime
import decimal
import enum
import functools
import math
import re
import types
import uuid
from django.db import models
from django.db.migrations.operations.base import Operation
from django.db.migrations.utils import COMPILED_REGEX_TYPE, RegexObject
from django.utils... | bsd-3-clause | -3,544,122,349,378,438,700 | 35.272237 | 110 | 0.646355 | false |
Dexhub/MTX | src/mem/slicc/ast/TypeFieldMethodAST.py | 18 | 2396 | # Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
# Copyright (c) 2009 The Hewlett-Packard Development Company
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source co... | bsd-3-clause | 8,156,488,763,210,748,000 | 45.076923 | 72 | 0.734975 | false |
yl565/statsmodels | statsmodels/tools/tests/test_grouputils.py | 31 | 11494 | import numpy as np
import pandas as pd
from statsmodels.tools.grouputils import Grouping
from statsmodels.tools.tools import categorical
from statsmodels.datasets import grunfeld, anes96
from pandas.util import testing as ptesting
class CheckGrouping(object):
def test_reindex(self):
# smoke test
... | bsd-3-clause | 2,364,959,529,594,079,700 | 44.976 | 75 | 0.510875 | false |
waidyanatha/sambro-eden | tests/climate/__init__.py | 56 | 3002 |
ClimateDataPortal = local_import('ClimateDataPortal')
def clear_tables():
ClimateDataPortal.place.truncate()
ClimateDataPortal.rainfall_mm.truncate()
ClimateDataPortal.temperature_celsius.truncate()
db.commit()
#clear_tables()
def frange(start, end, inc=1.0):
value = start
i = 0
while Tru... | mit | 652,093,233,734,299,600 | 28.722772 | 100 | 0.580946 | false |
pwoodworth/intellij-community | python/lib/Lib/tarfile.py | 80 | 74279 | #!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
#-------------------------------------------------------------------
# tarfile.py
#-------------------------------------------------------------------
# Copyright (C) 2002 Lars Gustäbel <lars@gustaebel.de>
# All rights reserved.
#
# Permission is hereby granted, fre... | apache-2.0 | -6,563,060,241,502,352,000 | 33.088573 | 103 | 0.530675 | false |
takeflight/django | django/conf/urls/i18n.py | 113 | 1193 | import warnings
from django.conf import settings
from django.conf.urls import patterns, url
from django.core.urlresolvers import LocaleRegexURLResolver
from django.utils import six
from django.utils.deprecation import RemovedInDjango20Warning
from django.views.i18n import set_language
def i18n_patterns(prefix, *args... | bsd-3-clause | 2,184,773,994,159,004,200 | 33.085714 | 81 | 0.687343 | false |
lucasgr7/silverplate | crawler/tests/test_crawler.py | 1 | 2392 | from django.test import TestCase
from crawler.engine import LinkFinder, IngredientFinder
import urllib.request
from ..models import DataIngredient
class CrawlerTestCase(TestCase):
def test_links_finder_count(self):
"""Test the count of links in link finder is equal to the expected amount"""
finde... | mit | 581,321,212,618,160,100 | 43.296296 | 116 | 0.65092 | false |
hackersql/sq1map | plugins/dbms/maxdb/takeover.py | 3 | 1050 | #!/usr/bin/env python
"""
Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
from lib.core.exception import SqlmapUnsupportedFeatureException
from plugins.generic.takeover import Takeover as GenericTakeover
class Takeover(GenericTakeover):
def __i... | gpl-3.0 | 8,086,133,898,571,220,000 | 32.870968 | 70 | 0.704762 | false |
c0defreak/python-for-android | python-modules/twisted/twisted/internet/_pollingfile.py | 59 | 8276 | # -*- test-case-name: twisted.internet.test.test_pollingfile -*-
# Copyright (c) 2001-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Implements a simple polling interface for file descriptors that don't work with
select() - this is pretty much only useful on Windows.
"""
from zope.interface import i... | apache-2.0 | 8,206,350,166,591,729,000 | 28.663082 | 83 | 0.57129 | false |
miptliot/edx-platform | openedx/core/djangoapps/user_api/tests/test_middleware.py | 152 | 4415 | """Tests for user API middleware"""
from mock import Mock, patch
from unittest import TestCase
from django.http import HttpResponse
from django.test.client import RequestFactory
from student.tests.factories import UserFactory, AnonymousUserFactory
from ..tests.factories import UserCourseTagFactory
from ..middleware ... | agpl-3.0 | 8,190,054,952,610,059,000 | 33.492188 | 114 | 0.63171 | false |
jittat/adm2 | application/migrations-temp/0032_add_is_offline_to_applicant.py | 2 | 9317 | # -*- coding: utf-8 -*-
from south.db import db
from django.db import models
from adm.application.models import *
class Migration:
def forwards(self, orm):
# Adding field 'Applicant.is_offline'
db.add_column('application_applicant', 'is_offline', orm['application.applicant:is_offline... | agpl-3.0 | -6,247,462,442,828,655,000 | 74.747967 | 186 | 0.558227 | false |
jmcarbo/openerp7 | openerp/addons/project/company.py | 55 | 1543 | # -*- 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 | 3,064,398,588,989,552,600 | 40.702703 | 84 | 0.631886 | false |
absoludity/servo | tests/wpt/web-platform-tests/annotation-protocol/tools/protocol-server.py | 71 | 14265 | # protocol-server
#
# a reference implementation of the Web Annotation Protocol
#
# Developed by Benjamin Young (@bigbulehat) and Shane McCarron (@halindrome).
# Sponsored by Spec-Ops (https://spec-ops.io)
#
# Copyright (c) 2016 Spec-Ops
#
# for license information, see http://www.w3.org/Consortium/Legal/2008/04-testsu... | mpl-2.0 | 593,461,468,408,870,100 | 32.097448 | 154 | 0.645145 | 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.