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 |
|---|---|---|---|---|---|---|---|---|---|---|
jdugge/QGIS | tests/src/python/test_qgsserver_wfs.py | 7 | 34015 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsServer WFS.
From build dir, run: ctest -R PyQgsServerWFS -V
.. 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 Licen... | gpl-2.0 | -1,979,046,791,227,349,800 | 47.110325 | 350 | 0.616864 | false |
Mauricio3000/fk_ik_sine_rig | tests/test_rig/test_sine_rig.py | 1 | 1187 | import unittest
import pymel.core as pm
from tool.errors import errors
from tool.rig import sine_rig
class Test_sine_rig(unittest.TestCase):
def test_sine_rig_build_errors(self):
self.assertRaises(errors.InputError, sine_rig.build)
self.assertRaises(errors.InputError, sine_rig.build,
... | gpl-3.0 | 1,519,589,025,920,111,400 | 31.081081 | 72 | 0.608256 | false |
AltSchool/django | tests/gis_tests/layermap/models.py | 235 | 2523 | from django.utils.encoding import python_2_unicode_compatible
from ..models import models
@python_2_unicode_compatible
class NamedModel(models.Model):
name = models.CharField(max_length=25)
objects = models.GeoManager()
class Meta:
abstract = True
required_db_features = ['gis_enabled']
... | bsd-3-clause | 6,786,598,340,705,368,000 | 23.028571 | 95 | 0.62505 | false |
collective/cyn.in | products/WebServerAuth/tests/test_extraction.py | 4 | 2764 | """Unit tests for extraction plugin"""
from Products.PloneTestCase import PloneTestCase
from Products.CMFCore.utils import getToolByName
from Products.WebServerAuth.utils import firstInstanceOfClass
from Products.WebServerAuth.plugin import usernameKey, defaultUsernameHeader, stripDomainNamesKey, usernameHeaderKey
fro... | gpl-3.0 | 2,585,586,399,240,321,500 | 42.1875 | 140 | 0.72178 | false |
dhanunjaya/neutron | neutron/agent/l3/dvr.py | 26 | 2827 | # Copyright (c) 2014 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-2.0
#
# Unless required by applicable ... | apache-2.0 | 7,444,266,319,862,596,000 | 34.78481 | 79 | 0.619031 | false |
ThiagoGarciaAlves/erpnext | erpnext/accounts/doctype/cost_center/cost_center.py | 16 | 2789 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import msgprint, _
from frappe.utils.nestedset import NestedSet
class CostCenter(NestedSet):
nsm_parent_field = 'parent_co... | agpl-3.0 | -780,211,647,400,351,400 | 33.8625 | 134 | 0.71029 | false |
watchdogpolska/feder | feder/institutions/migrations/0008_auto_20161001_2053.py | 1 | 2085 | # Generated by Django 1.10.1 on 2016-10-01 20:53
import django.utils.timezone
import model_utils.fields
from django.db import migrations, models
def forwards_func(apps, schema_editor):
# We get the model from the versioned app registry;
# if we directly import it, it'll be the wrong version
Institution =... | mit | 1,577,158,346,231,072,800 | 34.338983 | 87 | 0.596163 | false |
mandeepdhami/netvirt-ctrl | cli/midw.py | 3 | 18056 | #
# Copyright (c) 2012,2013 Big Switch Networks, Inc.
#
# Licensed under the Eclipse Public License, Version 1.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.eclipse.org/legal/epl-v10.html
#
# Unless required by applica... | epl-1.0 | -706,108,455,022,081,500 | 33.132325 | 101 | 0.553057 | false |
doug-fish/horizon | openstack_dashboard/test/api_tests/cinder_tests.py | 21 | 8000 | # Copyright 2012 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 agre... | apache-2.0 | 3,727,324,006,380,202,000 | 41.328042 | 79 | 0.668125 | false |
chrishokamp/fuel | fuel/converters/caltech101_silhouettes.py | 12 | 2497 | import os
import h5py
from scipy.io import loadmat
from fuel.converters.base import fill_hdf5_file, MissingInputFiles
def convert_silhouettes(size, directory, output_directory,
output_file=None):
""" Convert the CalTech 101 Silhouettes Datasets.
Parameters
----------
size : ... | mit | 2,978,130,629,956,573,000 | 31.855263 | 76 | 0.611934 | false |
norangmangto/pypi-default | setup.py | 1 | 4103 | """A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
import re
import ... | gpl-3.0 | 4,317,205,714,384,958,500 | 34.37069 | 94 | 0.665367 | false |
jabesq/home-assistant | homeassistant/components/caldav/calendar.py | 1 | 9850 | """Support for WebDav Calendar."""
import copy
from datetime import datetime, timedelta
import logging
import re
import voluptuous as vol
from homeassistant.components.calendar import (
ENTITY_ID_FORMAT, PLATFORM_SCHEMA, CalendarEventDevice, calculate_offset,
get_date, is_offset_reached)
from homeassistant.co... | apache-2.0 | 5,990,035,734,490,488,000 | 33.805654 | 79 | 0.6 | false |
charukiewicz/beer-manager | venv/lib/python3.4/site-packages/jinja2/testsuite/filters.py | 394 | 19169 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.filters
~~~~~~~~~~~~~~~~~~~~~~~~
Tests for the jinja filters.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import unittest
from jinja2.testsuite import JinjaTestCase
from jinja2 import Markup, Environment
fro... | mit | 1,293,905,689,546,073,600 | 36.221359 | 88 | 0.474151 | false |
i945/An | An/extra_apps/xadmin/migrations/0002_log.py | 15 | 1849 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-15 05:50
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
... | mit | 4,311,930,304,461,944,300 | 46.410256 | 181 | 0.619254 | false |
houzhenggang/OpenWRT-1 | scripts/dl_cleanup.py | 202 | 5942 | #!/usr/bin/env python
"""
# OpenWRT download directory cleanup utility.
# Delete all but the very last version of the program tarballs.
#
# Copyright (C) 2010 Michael Buesch <mb@bu3sch.de>
# Copyright (C) 2013 OpenWrt.org
"""
import sys
import os
import re
import getopt
# Commandline options
opt_dryrun = False
def ... | gpl-2.0 | -406,450,484,268,978,940 | 24.722944 | 84 | 0.616627 | false |
tianchaijz/MTHTTPServerWFM | MTHTTPServerWFM.py | 1 | 19948 | #!/usr/bin/env python
# encoding: utf-8
"""Multiple Threading HTTP Server With File Management.
This program is extended from the standard `SimpleHTTPServer` module by adding
upload and delete file features.
"""
__version__ = "0.31"
__all__ = ["HTTPRequestHandlerWFM"]
__author__ = "Jinzheng Zhang"
__email__ = "tian... | mit | -3,933,337,580,770,203,600 | 31.278317 | 79 | 0.536595 | false |
siosio/intellij-community | plugins/hg4idea/testData/bin/mercurial/verify.py | 93 | 10933 | # verify.py - repository integrity checking for Mercurial
#
# Copyright 2006, 2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from node import nullid, short
from i18n import _
import os
import r... | apache-2.0 | -4,930,357,445,557,989,000 | 33.380503 | 78 | 0.480198 | false |
leiferikb/bitpop | depot_tools/third_party/pylint/reporters/html.py | 20 | 2541 | # Copyright (c) 2003-2006 Sylvain Thenault (thenault@gmail.com).
# Copyright (c) 2003-2011 LOGILAB S.A. (Paris, FRANCE).
# 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 L... | gpl-3.0 | -2,432,774,537,931,149,300 | 35.826087 | 82 | 0.658796 | false |
CMPUT410W15T02/CMPUT410W15-project | testenv/lib/python2.7/site-packages/django/contrib/contenttypes/forms.py | 93 | 3837 | from __future__ import unicode_literals
from django.db import models
from django.forms import ModelForm, modelformset_factory
from django.forms.models import BaseModelFormSet
from django.contrib.contenttypes.models import ContentType
class BaseGenericInlineFormSet(BaseModelFormSet):
"""
A formset for generic... | gpl-2.0 | 1,935,249,024,444,285,200 | 42.11236 | 91 | 0.576753 | false |
kelvin13/Knockout | pygments/lexers/configs.py | 21 | 27854 | # -*- coding: utf-8 -*-
"""
pygments.lexers.configs
~~~~~~~~~~~~~~~~~~~~~~~
Lexers for configuration file formats.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, default, words, bygro... | gpl-3.0 | -11,670,821,120,337,016 | 32.680774 | 82 | 0.476808 | false |
alexlo03/ansible | lib/ansible/modules/cloud/ovirt/ovirt_host_pm.py | 8 | 8366 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUME... | gpl-3.0 | -2,942,656,587,338,930,000 | 31.176923 | 149 | 0.588573 | false |
nearai/program_synthesis | program_synthesis/naps/uast/uast.py | 1 | 66502 | from __future__ import print_function
import functools
import six
import sys
import time
import math
import numpy as np
import re
from operator import mul
from sortedcontainers import SortedDict, SortedSet
from .uast_watcher import WatcherEvent, tuplify
DEBUG_INFO = False
LARGEST_INT = 2 ** 64
OBJECT = "object"
B... | apache-2.0 | -7,174,344,005,736,294,000 | 37.396074 | 257 | 0.52006 | false |
jni/networkx | networkx/algorithms/components/connected.py | 10 | 4068 | # -*- coding: utf-8 -*-
"""
Connected components.
"""
# Copyright (C) 2004-2013 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
from networkx.utils.decorators import not_implemented_for
... | bsd-3-clause | 6,864,915,984,074,193,000 | 21.726257 | 76 | 0.577434 | false |
NickShaffner/rhea | rhea/build/boards/xilinx/_xula.py | 2 | 7089 | #
# Copyright (c) 2014-2015 Christopher Felton
#
from rhea.build import FPGA
from rhea.build.extintf import Port
# @todo: get SDRAM interface from rhea.cores.sdram
# from ...extintf._sdram import SDRAM
from rhea.build.toolflow import ISE
class Xula(FPGA):
vendor = 'xilinx'
family = 'spartan3A'
device = '... | mit | 4,330,671,391,191,900,700 | 34.808081 | 102 | 0.411765 | false |
insertnamehere1/maraschino | lib/sqlalchemy/dialects/sybase/base.py | 22 | 15166 | # sybase/base.py
# Copyright (C) 2010-2011 the SQLAlchemy authors and contributors <see AUTHORS file>
# get_select_precolumns(), limit_clause() implementation
# copyright (C) 2007 Fisch Asset Management
# AG http://www.fam.ch, with coding by Alexander Houben
# alexander.houben@thor-solutions.ch
#
# This module is par... | mit | -7,744,394,957,950,036,000 | 33.9447 | 84 | 0.57497 | false |
raghavs1108/DataPlotter | examples/GLVolumeItem.py | 28 | 1968 | # -*- coding: utf-8 -*-
"""
Demonstrates GLVolumeItem for displaying volumetric data.
"""
## Add path to library (just for examples; you do not need this)
import initExample
from pyqtgraph.Qt import QtCore, QtGui
import pyqtgraph.opengl as gl
app = QtGui.QApplication([])
w = gl.GLViewWidget()
w.opts['distance'] = 2... | mit | -246,080,326,094,674,560 | 27.521739 | 151 | 0.556402 | false |
ktan2020/legacy-automation | win/Lib/hotshot/log.py | 20 | 6433 | import _hotshot
import os.path
import parser
import symbol
from _hotshot import \
WHAT_ENTER, \
WHAT_EXIT, \
WHAT_LINENO, \
WHAT_DEFINE_FILE, \
WHAT_DEFINE_FUNC, \
WHAT_ADD_INFO
__all__ = ["LogReader", "ENTER", "EXIT", "LINE"]
ENTER = WHAT_ENTER
EXIT = WHAT_EXIT
LI... | mit | -1,654,632,130,999,827,000 | 31.159794 | 74 | 0.535986 | false |
e-dorigatti/pyspider | pyspider/libs/multiprocessing_queue.py | 14 | 2808 | import six
import platform
import multiprocessing
from multiprocessing.queues import Queue as BaseQueue
# The SharedCounter and Queue classes come from:
# https://github.com/vterron/lemon/commit/9ca6b4b
class SharedCounter(object):
""" A synchronized shared counter.
The locking done by multiprocessing.Value ... | apache-2.0 | 761,477,861,795,602,600 | 37.465753 | 88 | 0.689459 | false |
zoeyangyy/event-extraction | tf_test/lstm-pos.py | 1 | 7622 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import gensim
import tensorflow as tf
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)
from tensorflow.contrib import rnn
import numpy as np
'''
For Chinese word segmentation.
https://github.com/yongyehuang/Tensorflow-Tutor... | mit | -2,135,096,933,725,471,700 | 44.14557 | 162 | 0.626192 | false |
longman694/youtube-dl | youtube_dl/extractor/tass.py | 64 | 2016 | # coding: utf-8
from __future__ import unicode_literals
import json
from .common import InfoExtractor
from ..utils import (
js_to_json,
qualities,
)
class TassIE(InfoExtractor):
_VALID_URL = r'https?://(?:tass\.ru|itar-tass\.com)/[^/]+/(?P<id>\d+)'
_TESTS = [
{
'url': 'http://tas... | unlicense | 3,388,902,929,332,979,000 | 29.758065 | 104 | 0.510225 | false |
ryfeus/lambda-packs | Tensorflow_OpenCV_Nightly/source/tensorflow/contrib/keras/python/keras/applications/vgg16.py | 30 | 9077 | # 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... | mit | 4,905,423,992,466,024,000 | 39.704036 | 145 | 0.649884 | false |
iivic/BoiseStateX | common/test/acceptance/tests/studio/test_studio_general.py | 105 | 5669 | """
Acceptance tests for Studio.
"""
from unittest import skip
from bok_choy.web_app_test import WebAppTest
from ...pages.studio.asset_index import AssetIndexPage
from ...pages.studio.auto_auth import AutoAuthPage
from ...pages.studio.checklists import ChecklistsPage
from ...pages.studio.course_info import CourseUpda... | agpl-3.0 | -7,413,236,907,907,949,000 | 34.654088 | 115 | 0.643676 | false |
cloudfoundry/php-buildpack-legacy | builds/runtimes/python-2.7.6/lib/python2.7/test/test_posixpath.py | 71 | 17716 | import unittest
from test import test_support, test_genericpath
import posixpath, os
from posixpath import realpath, abspath, dirname, basename
# An absolute path to a temporary filename for testing. We can't rely on TESTFN
# being an absolute path, so we need this.
ABSTFN = abspath(test_support.TESTFN)
def skip_if... | mit | 5,584,871,833,094,406,000 | 40.881797 | 97 | 0.510894 | false |
cloudfoundry/php-buildpack-legacy | builds/runtimes/python-2.7.6/lib/python2.7/test/test_cfgparser.py | 71 | 27744 | import ConfigParser
import StringIO
import os
import unittest
import UserDict
from test import test_support
class SortedDict(UserDict.UserDict):
def items(self):
result = self.data.items()
result.sort()
return result
def keys(self):
result = self.data.keys()
result.so... | mit | 3,451,846,095,849,251,000 | 36.593496 | 81 | 0.540333 | false |
ondrejmular/pcs | pcs/utils.py | 3 | 87422 | # pylint: disable=too-many-lines
import os
import sys
import subprocess
import xml.dom.minidom
from xml.dom.minidom import parseString
import xml.etree.ElementTree as ET
import re
import json
import tempfile
import signal
import time
from io import BytesIO
import tarfile
import getpass
import base64
import threading
im... | gpl-2.0 | -3,652,873,456,273,879,600 | 29.302253 | 81 | 0.580872 | false |
woodpecker1/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/memoized.py | 211 | 2482 | # Copyright (c) 2010 Google 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | bsd-3-clause | -1,470,874,230,422,904,000 | 44.127273 | 81 | 0.72079 | false |
MycChiu/tensorflow | tensorflow/contrib/tensor_forest/python/kernel_tests/sample_inputs_op_test.py | 56 | 6058 | # 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 | -4,207,030,896,651,375,000 | 35.939024 | 80 | 0.579234 | false |
loveward/yingsuo | shadowsocks/obfsplugin/http_simple.py | 4 | 12316 | #!/usr/bin/env python
#
# Copyright 2015-2015 breakwa11
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | -6,484,642,626,102,714,000 | 38.22293 | 212 | 0.561221 | false |
amisrs/angular-flask | angular_flask/lib/python2.7/site-packages/pip/commands/uninstall.py | 798 | 2884 | from __future__ import absolute_import
import pip
from pip.wheel import WheelCache
from pip.req import InstallRequirement, RequirementSet, parse_requirements
from pip.basecommand import Command
from pip.exceptions import InstallationError
class UninstallCommand(Command):
"""
Uninstall packages.
pip is a... | mit | -8,289,653,058,113,993,000 | 36.947368 | 79 | 0.557559 | false |
else/mosquitto | test/lib/02-subscribe-qos2.py | 7 | 2349 | #!/usr/bin/env python
# Test whether a client sends a correct SUBSCRIBE to a topic with QoS 2.
# The client should connect to port 1888 with keepalive=60, clean session set,
# and client id subscribe-qos2-test
# The test will send a CONNACK message to the client with rc=0. Upon receiving
# the CONNACK and verifying t... | bsd-3-clause | 72,890,002,800,830,670 | 30.32 | 129 | 0.702852 | false |
Scaravex/clue-hackathon | clustering/time_profile_cluster.py | 2 | 1438 | # -*- coding: utf-8 -*-
"""
Created on Sun Mar 19 11:21:47 2017
@author: mskara
"""
import pandas as pd
import matplotlib.pyplot as plt
from src.pre_process import load_binary
def create_profile_for_symptoms(df, date_range=15):
profiles = {}
for symptom in symptoms:
temp = df[df['symptom'... | apache-2.0 | 3,036,550,866,882,399,000 | 25.653846 | 93 | 0.61822 | false |
bottompawn/kbengine | kbe/res/scripts/common/Lib/multiprocessing/process.py | 98 | 9144 | #
# Module providing the `Process` class which emulates `threading.Thread`
#
# multiprocessing/process.py
#
# Copyright (c) 2006-2008, R Oudkerk
# Licensed to PSF under a Contributor Agreement.
#
__all__ = ['BaseProcess', 'current_process', 'active_children']
#
# Imports
#
import os
import sys
import signal
import i... | lgpl-3.0 | -8,225,947,735,917,851,000 | 26.542169 | 79 | 0.55479 | false |
onceuponatimeforever/oh-mainline | vendor/packages/oauthlib/oauthlib/oauth2/rfc6749/request_validator.py | 36 | 19514 | # -*- coding: utf-8 -*-
"""
oauthlib.oauth2.rfc6749.grant_types
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
from __future__ import unicode_literals, absolute_import
import logging
log = logging.getLogger(__name__)
class RequestValidator(object):
def client_authentication_required(self, request, *args, **kwargs):
... | agpl-3.0 | 9,155,208,478,471,030,000 | 41.421739 | 98 | 0.647689 | false |
nathanaevitas/odoo | openerp/addons/purchase/company.py | 383 | 1576 | # -*- 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 | 856,910,815,874,831,600 | 39.410256 | 78 | 0.59835 | false |
willprice/arduino-sphere-project | scripts/example_direction_finder/temboo/Library/EnviroFacts/Toxins/FacilitiesSearchByZip.py | 5 | 4077 | # -*- coding: utf-8 -*-
###############################################################################
#
# FacilitiesSearchByZip
# Retrieves a list of EPA-regulated facilities in the Toxics Release Inventory (TRI) database within a given area code.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
#... | gpl-2.0 | 4,873,499,442,515,005,000 | 41.030928 | 241 | 0.690459 | false |
swdream/neutron | neutron/notifiers/batch_notifier.py | 56 | 2337 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | -8,365,651,242,111,858,000 | 34.409091 | 79 | 0.658109 | false |
Wuteyan/VTK | Examples/Rendering/Python/FilterCADPart.py | 42 | 2338 | #!/usr/bin/env python
# This simple example shows how to do simple filtering in a pipeline.
# See CADPart.py and Cylinder.py for related information.
import vtk
from vtk.util.colors import light_grey
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# This creates a polygonal cylinder model w... | bsd-3-clause | 5,723,253,235,102,922,000 | 34.424242 | 71 | 0.782293 | false |
beckdaniel/GPy | GPy/util/mocap.py | 8 | 27243 | import os
import numpy as np
import math
from GPy.util import datasets as dat
class vertex:
def __init__(self, name, id, parents=[], children=[], meta = {}):
self.name = name
self.id = id
self.parents = parents
self.children = children
self.meta = meta
def __str__(self)... | bsd-3-clause | 8,130,540,121,383,769,000 | 37.697443 | 175 | 0.476893 | false |
JoseBlanca/franklin | test/utils/seqio_utils_test.py | 1 | 3293 | '''
Created on 2009 uzt 28
@author: peio
'''
# Copyright 2009 Jose Blanca, Peio Ziarsolo, COMAV-Univ. Politecnica Valencia
# This file is part of franklin.
# franklin 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 Softwar... | agpl-3.0 | -7,245,098,904,904,350,000 | 34.031915 | 77 | 0.633769 | false |
mcfletch/AutobahnPython | examples/twisted/wamp/auth/persona/server.py | 7 | 9085 | ###############################################################################
##
## Copyright (C) 2011-2014 Tavendo GmbH
##
## Licensed under the Apache License, Version 2.0 (the "License");
## you may not use this file except in compliance with the License.
## You may obtain a copy of the License at
##
## h... | apache-2.0 | -6,196,339,740,024,204,000 | 29.901361 | 141 | 0.628398 | false |
JamesShaeffer/QGIS | python/plugins/db_manager/dlg_export_vector.py | 62 | 8183 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
Name : DB Manager
Description : Database manager plugin for QGIS
Date : Oct 13, 2011
copyright : (C) 2011 by Giuseppe Sucameli
email : brush.tyler@... | gpl-2.0 | -2,010,138,386,699,219,700 | 39.711443 | 115 | 0.569351 | false |
mookaka/mywebblog | www/pymonitor.py | 1 | 1762 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'mookaka'
import os, sys, time, subprocess
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
command = ['echo', 'ok']
process = None
def log(s):
print('[Monitor] %s' % s)
class MyFileSystemEventHandler(FileSys... | mit | 3,119,803,086,193,035,000 | 23.150685 | 94 | 0.616345 | false |
jpaalasm/pyglet | tests/window/WINDOW_SET_VSYNC.py | 29 | 2009 | #!/usr/bin/env python
'''Test that vsync can be set.
Expected behaviour:
A window will alternate between red and green fill.
- Press "v" to toggle vsync on/off. "Tearing" should only be visible
when vsync is off (as indicated at the terminal).
Not all video drivers support vsync. On Linux,... | bsd-3-clause | -3,449,217,366,242,979,300 | 30.390625 | 79 | 0.632653 | false |
PatKayongo/patkayongo.github.io | node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/lexers/_phpbuiltins.py | 95 | 122088 | # -*- coding: utf-8 -*-
"""
pygments.lexers._phpbuiltins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file loads the function names and their modules from the
php webpage and generates itself.
Do not alter the MODULES dict by hand!
WARNING: the generation transfers quite much data over your
... | mit | 5,825,247,256,443,771,000 | 31.238711 | 87 | 0.441067 | false |
mkennedy04/knodj | env/Lib/site-packages/django/contrib/auth/decorators.py | 117 | 3021 | from functools import wraps
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.core.exceptions import PermissionDenied
from django.shortcuts import resolve_url
from django.utils.decorators import available_attrs
from django.utils.six.moves.urllib.parse import urlparse
de... | mit | -4,808,921,252,019,324,000 | 39.824324 | 91 | 0.66435 | false |
ihipi/Sick-Beard | sickbeard/name_cache.py | 14 | 2259 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of t... | gpl-3.0 | 7,818,124,436,004,360,000 | 31.716418 | 106 | 0.679062 | false |
roy2220/srs | trunk/research/code-statistic/csr.py | 5 | 3514 | #!/usr/bin/python
'''
The MIT License (MIT)
Copyright (c) 2013-2016 SRS(ossrs)
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,... | mit | -9,024,249,489,790,281,000 | 36.784946 | 113 | 0.626636 | false |
hawk-lord/gnucash | src/optional/python-bindings/example_scripts/quotes_historic.py | 13 | 2473 | #!/usr/bin/env python
# quotes_historic.py -- Example Script to read historic quote data into gnucash
#
## @file
# @brief Example Script to read historic stock data into gnucash
# @author Peter Holtermann
# @date January 2011
# @ingroup python_bindings_examples
#
# Call the perl-script @code
# ./get_... | gpl-2.0 | 1,794,412,660,025,033,700 | 25.880435 | 112 | 0.680954 | false |
PopCap/GameIdea | Engine/Source/ThirdParty/HTML5/emsdk/Win64/python/2.7.5.3_64bit/Lib/ctypes/test/test_cast.py | 81 | 3212 | from ctypes import *
import unittest
import sys
class Test(unittest.TestCase):
def test_array2pointer(self):
array = (c_int * 3)(42, 17, 2)
# casting an array to a pointer works.
ptr = cast(array, POINTER(c_int))
self.assertEqual([ptr[i] for i in range(3)], [42, 17, 2])
i... | bsd-2-clause | -3,888,873,864,979,485,700 | 35.089888 | 90 | 0.502179 | false |
zuku1985/scikit-learn | sklearn/utils/tests/test_multiclass.py | 58 | 14316 |
from __future__ import division
import numpy as np
import scipy.sparse as sp
from itertools import product
from sklearn.externals.six.moves import xrange
from sklearn.externals.six import iteritems
from scipy.sparse import issparse
from scipy.sparse import csc_matrix
from scipy.sparse import csr_matrix
from scipy.sp... | bsd-3-clause | 511,293,348,379,041,200 | 37.278075 | 79 | 0.534088 | false |
bformet/django-admin-bootstrapped | django_admin_bootstrapped/renderers.py | 20 | 2302 | from __future__ import absolute_import
from django.contrib.auth.forms import ReadOnlyPasswordHashWidget
from django.contrib.admin.widgets import (AdminDateWidget, AdminTimeWidget,
AdminSplitDateTime, RelatedFieldWidgetWrapper)
from django.forms import (FileInput, CheckboxInput... | apache-2.0 | -3,745,653,991,261,056,500 | 42.433962 | 94 | 0.629018 | false |
yuanzhao/gpdb | src/test/tinc/tincrepo/mpp/lib/mpp_tl.py | 12 | 1154 | """
Copyright (c) 2004-Present Pivotal Software, Inc.
This program and the accompanying materials are made available under
the terms of the 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.... | apache-2.0 | -7,988,780,380,947,063,000 | 36.225806 | 130 | 0.759099 | false |
ryanolson/couchdb-python | perftest.py | 7 | 1440 | """
Simple peformance tests.
"""
import sys
import time
import couchdb
def main():
print 'sys.version : %r' % (sys.version,)
print 'sys.platform : %r' % (sys.platform,)
tests = [create_doc, create_bulk_docs]
if len(sys.argv) > 1:
tests = [test for test in tests if test.__name__ in sys.argv... | bsd-3-clause | -1,501,872,776,643,004,400 | 23 | 86 | 0.546528 | false |
kunalgrover05/Mediawiki-pagelang | maintenance/language/zhtable/Makefile.py | 63 | 14541 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @author Philip
import tarfile as tf
import zipfile as zf
import os, re, shutil, sys, platform
pyversion = platform.python_version()
islinux = platform.system().lower() == 'linux'
if pyversion[:3] in ['2.6', '2.7']:
import urllib as urllib_request
import codecs
... | gpl-2.0 | -5,167,589,613,223,338,000 | 33.539192 | 126 | 0.553951 | false |
with-git/tensorflow | tensorflow/python/eager/benchmarks_test.py | 5 | 4874 | # 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 | -3,579,026,650,850,242,600 | 32.613793 | 80 | 0.676652 | false |
rest-of/the-deck | lambda/lib/python2.7/site-packages/pip/_vendor/progress/counter.py | 510 | 1502 | # -*- coding: utf-8 -*-
# Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS P... | mit | 6,100,494,108,667,746,000 | 30.404255 | 74 | 0.684959 | false |
hzy001/ansible | lib/ansible/plugins/callback/hipchat.py | 101 | 5867 | # (C) 2014, Matt Martz <matt@sivel.net>
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
#... | gpl-3.0 | -6,617,036,219,651,750,000 | 37.346405 | 107 | 0.591785 | false |
tianyang-li/de-novo-rna-seq-quant-1 | util/trinity_0.py | 1 | 3040 | #!/usr/bin/env python
# Copyright (C) 2012 Tianyang Li
# tmy1018@gmail.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | gpl-3.0 | 3,560,122,842,697,105,000 | 24.123967 | 122 | 0.538158 | false |
sawenzel/root | interpreter/llvm/src/utils/lint/common_lint.py | 147 | 2589 | #!/usr/bin/python
#
# Common lint functions applicable to multiple types of files.
import re
def VerifyLineLength(filename, lines, max_length):
"""Checks to make sure the file has no lines with lines exceeding the length
limit.
Args:
filename: the file under consideration as string
lines: contents of t... | lgpl-2.1 | 4,966,973,305,257,724,000 | 25.690722 | 78 | 0.668212 | false |
toshywoshy/ansible | lib/ansible/module_utils/aws/iam.py | 60 | 2118 | # 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 traceback
try:
from botocore.exceptions import ClientError, NoCredentialsError
except Im... | gpl-3.0 | -5,774,802,890,351,353,000 | 42.22449 | 135 | 0.654391 | false |
GreenRecycleBin/servo | tests/wpt/web-platform-tests/tools/html5lib/setup.py | 418 | 1694 | from distutils.core import setup
import os
import codecs
classifiers=[
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Pyt... | mpl-2.0 | 4,715,814,492,737,516,000 | 37.5 | 92 | 0.615112 | false |
chadoe/xbmc | addons/service.xbmc.versioncheck/service.py | 58 | 3959 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Team-XBMC
#
# 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... | gpl-2.0 | 3,708,791,664,689,183,000 | 37.067308 | 118 | 0.626421 | false |
mancoast/CPythonPyc_test | fail/300_test_httpservers.py | 3 | 11640 | """Unittests for the various HTTPServer modules.
Written by Cody A.W. Somerville <cody-somerville@ubuntu.com>,
Josip Dzolonga, and Michael Otteneder for the 2007/08 GHOP contest.
"""
from http.server import BaseHTTPRequestHandler, HTTPServer, \
SimpleHTTPRequestHandler, CGIHTTPRequestHandler
import os
import sy... | gpl-3.0 | 1,020,503,780,278,987,000 | 31.696629 | 77 | 0.599914 | false |
mrquim/repository.mrquim | repo/script.module.pycryptodome/lib/Crypto/SelfTest/Protocol/test_KDF.py | 5 | 16508 | # -*- coding: utf-8 -*-
#
# SelfTest/Protocol/test_KDF.py: Self-test for key derivation functions
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is... | gpl-2.0 | -2,932,617,852,454,835,000 | 35.766147 | 115 | 0.525079 | false |
dllsf/odootest | addons/crm_partner_assign/wizard/crm_forward_to_partner.py | 377 | 10606 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... | agpl-3.0 | 6,313,116,168,425,577,000 | 49.504762 | 236 | 0.591175 | false |
rockyzhang/zhangyanhit-python-for-android-mips | python-modules/twisted/twisted/test/test_abstract.py | 61 | 2546 | # Copyright (c) 2007 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for generic file descriptor based reactor support code.
"""
from twisted.trial.unittest import TestCase
from twisted.internet.abstract import isIPAddress
class AddressTests(TestCase):
"""
Tests for address-related functi... | apache-2.0 | -247,295,502,386,415,600 | 29.674699 | 74 | 0.626866 | false |
mylene-campana/hpp-rbprm-corba | script/tests/hrp2_city1_path.py | 1 | 9565 | #/usr/bin/env python
# author: Mylene Campana (mcampana@laas.fr)
# Script which goes with hpp-rbprm-corba package.
# The script launches a skeleton-robot and a groundcrouch environment.
# It defines init and final configs, and solve them with RBPRM.
# Range Of Motions are spheres linked to the 4 end-effectors
#blender... | lgpl-3.0 | 1,061,759,997,378,215,700 | 30.055195 | 145 | 0.715316 | false |
Weihonghao/ECM | Vpy34/lib/python3.5/site-packages/pandas/compat/numpy/__init__.py | 3 | 2213 | """ support numpy compatiblitiy across versions """
import re
import numpy as np
from distutils.version import LooseVersion
from pandas.compat import string_types, string_and_binary_types
# numpy versioning
_np_version = np.__version__
_nlv = LooseVersion(_np_version)
_np_version_under1p8 = _nlv < '1.8'
_np_version_... | agpl-3.0 | -806,873,962,559,849,900 | 27.74026 | 74 | 0.584727 | false |
bukzor/sympy | sympy/matrices/expressions/tests/test_trace.py | 83 | 2693 | from sympy.core import Lambda, S, symbols
from sympy.concrete import Sum
from sympy.functions import adjoint, conjugate, transpose
from sympy.matrices import eye, Matrix, ShapeError, ImmutableMatrix
from sympy.matrices.expressions import (
Adjoint, Identity, FunctionMatrix, MatrixExpr, MatrixSymbol, Trace,
Zero... | bsd-3-clause | -2,727,246,780,708,139,000 | 27.347368 | 71 | 0.606387 | false |
adit-chandra/tensorflow | tensorflow/lite/testing/op_tests/tile.py | 4 | 2453 | # 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 | 617,433,764,874,577,800 | 37.936508 | 80 | 0.657155 | false |
dpinney/omf | omf/solvers/VB.py | 1 | 29740 | import pandas as pd
import pulp
import numpy as np
from numpy import *
class VirtualBattery(object):
""" Base class for abstraction. """
def __init__(self, ambient_temp, capacitance, resistance, rated_power, COP, deadband, setpoint, tcl_number):
# C :thermal capacitance
# R : thermal resistance... | gpl-2.0 | -7,106,010,621,946,928,000 | 45.834646 | 308 | 0.581607 | false |
ablavatski/draw | tests/test_attention.py | 7 | 4359 |
import unittest
import theano
import numpy as np
from theano import tensor as T
from draw.attention import *
floatX = theano.config.floatX
def test_batched_dot():
a = T.ftensor3('a')
b = T.ftensor3('b')
c = my_batched_dot(a, b)
# Test in with values
dim1, dim2, dim3, dim4 = 10, 12, 15, 20
... | mit | -8,603,040,143,491,723,000 | 28.856164 | 90 | 0.578802 | false |
raccoongang/socraticqs2 | mysite/lti/tests.py | 1 | 21256 | # coding=utf-8
import json
import oauth2
from datetime import date, timedelta
import unittest
from mock import patch, Mock
from ddt import ddt, data, unpack
from django.utils import timezone
from django.test import TestCase, Client
from django.contrib.auth.models import User
from django.core.urlresolvers import rever... | apache-2.0 | 8,832,074,296,113,942,000 | 39.170132 | 102 | 0.615718 | false |
lkhomenk/integration_tests | cfme/automate/dialogs/service_dialogs.py | 6 | 4707 | import attr
from cached_property import cached_property
from navmazing import NavigateToAttribute, NavigateToSibling
from widgetastic.utils import Fillable
from widgetastic.widget import Text
from widgetastic_patternfly import CandidateNotFound
from cfme.exceptions import ItemNotFound
from cfme.modeling.base import Ba... | gpl-2.0 | 7,005,621,286,888,689,000 | 28.791139 | 92 | 0.665604 | false |
samhoo/askbot-realworld | askbot/migrations/0044_migrate_has_custom_avatar_field.py | 20 | 27460 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from askbot.utils.console import print_action
from unidecode import unidecode
class Migration(DataMigration):
def forwards(self, orm):
"Write your forwards methods here."
print... | gpl-3.0 | -5,655,925,277,057,785,000 | 84.01548 | 221 | 0.556883 | false |
gentledevil/ansible | lib/ansible/plugins/action/include_vars.py | 82 | 1853 | # (c) 2013-2014, Benno Joy <benno@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later vers... | gpl-3.0 | -5,914,072,489,739,361,000 | 36.816327 | 97 | 0.67728 | false |
dga4654dan/UTM-Demo | V_1_0_2_1/UtmDemo_Sfs_2.9.0/UtmDemo_Sfs_2.9.0_Server/lib/Lib/test/test_bisect.py | 15 | 5533 | from test_support import TestFailed
import bisect
import sys
nerrors = 0
def check_bisect(func, list, elt, expected):
global nerrors
got = func(list, elt)
if got != expected:
print >> sys.stderr, \
"expected %s(%s, %s) -> %s, but got %s" % (func.__name__,
... | gpl-2.0 | 6,152,643,465,653,147,000 | 42.566929 | 78 | 0.587746 | false |
hogarthj/ansible | test/units/parsing/utils/test_yaml.py | 159 | 1176 | # -*- coding: utf-8 -*-
# (c) 2017, Ansible Project
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | gpl-3.0 | 7,001,523,356,449,801,000 | 33.588235 | 135 | 0.714286 | false |
bala4901/odoo | addons/website/models/test_models.py | 56 | 1285 | # -*- coding: utf-8 -*-
from openerp.osv import orm, fields
class test_converter(orm.Model):
_name = 'website.converter.test'
_columns = {
'char': fields.char(),
'integer': fields.integer(),
'float': fields.float(),
'numeric': fields.float(digits=(16, 2)),
'many2one': f... | agpl-3.0 | 6,485,907,611,561,294,000 | 31.641026 | 81 | 0.527101 | false |
2uller/LotF | App/Tools/Scripts/texcheck.py | 12 | 9489 | """ TeXcheck.py -- rough syntax checking on Python style LaTeX documents.
Written by Raymond D. Hettinger <python at rcn.com>
Copyright (c) 2003 Python Software Foundation. All rights reserved.
Designed to catch common markup errors including:
* Unbalanced or mismatched parenthesis, brackets, and braces.... | gpl-2.0 | 5,462,484,294,102,322,000 | 38.725322 | 134 | 0.595532 | false |
xor10/adsbypasser | deploy/mirrors/summary.py | 5 | 4293 | import re
import sys
from markdown.blockprocessors import BlockProcessor
from markdown.preprocessors import Preprocessor
from markdown.preprocessors import ReferencePreprocessor
from markdown.extensions import Extension
from markdown import markdown
from util import to_abs_path
_CHANGELOG_PATH = to_abs_path('../../... | bsd-2-clause | -6,001,352,532,895,937,000 | 24.252941 | 126 | 0.583042 | false |
wbrefvem/openshift-ansible | playbooks/common/openshift-cluster/upgrades/library/openshift_upgrade_config.py | 35 | 5312 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Ansible module for modifying OpenShift configs during an upgrade"""
import os
import yaml
DOCUMENTATION = '''
---
module: openshift_upgrade_config
short_description: OpenShift Upgrade Config
author: Jason DeTiberus
requirements: [ ]
'''
EXAMPLES = '''
'''
def modify_api_... | apache-2.0 | 3,197,807,509,417,617,000 | 32.834395 | 100 | 0.630271 | false |
etkirsch/scikit-learn | sklearn/datasets/species_distributions.py | 198 | 7923 | """
=============================
Species distribution dataset
=============================
This dataset represents the geographic distribution of species.
The dataset is provided by Phillips et. al. (2006).
The two species are:
- `"Bradypus variegatus"
<http://www.iucnredlist.org/apps/redlist/details/3038/0>`_... | bsd-3-clause | -2,717,994,734,983,694,000 | 30.070588 | 79 | 0.621608 | false |
freddierice/volatility | volatility/plugins/linux/vma_cache.py | 58 | 2724 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility 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 o... | gpl-2.0 | -4,814,854,956,437,420,000 | 28.934066 | 103 | 0.57232 | false |
rrampage/rethinkdb | external/v8_3.30.33.16/buildtools/checkdeps/rules.py | 65 | 6692 | # Copyright 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Base classes to represent dependency rules, used by checkdeps.py"""
import os
import re
class Rule(object):
"""Specifies a single rule for an includ... | agpl-3.0 | 5,304,136,728,670,381,000 | 36.595506 | 80 | 0.662283 | false |
manthansharma/kivy | kivy/core/camera/__init__.py | 15 | 4285 | '''
Camera
======
Core class for acquiring the camera and converting its input into a
:class:`~kivy.graphics.texture.Texture`.
.. versionchanged:: 1.10.0
The pygst and videocapture providers have been removed.
.. versionchanged:: 1.8.0
There is now 2 distinct Gstreamer implementation: one using Gi/Gst
wo... | mit | 8,243,352,725,636,989,000 | 27.952703 | 79 | 0.599767 | false |
J-Rios/TelegramBots | MolaBot/TSjson.py | 1 | 10795 | # -*- coding: utf-8 -*-
'''
Script: MolaBot.py
Descripcion:
Bot de Telegram que gestiona todo un sistema de reputaciones de los usuarios pertenecientes a
un grupo. Permite a un usuario, dar "Likes" a los mensajes de otros, y el numero global de
"Likes" (la suma de todos los likes de todos los mensa... | gpl-3.0 | -775,332,901,642,964,100 | 54.208333 | 227 | 0.624629 | false |
powlo/script.module.pydevd | lib/test_pydevd_reload/test_pydevd_reload.py | 53 | 11450 | import os # @NoMove
import sys # @NoMove
sys.path.insert(0, os.path.realpath(os.path.abspath('..')))
import pydevd_reload
import tempfile
import unittest
SAMPLE_CODE = """
class C:
def foo(self):
return 0
@classmethod
def bar(cls):
return (0, 0)
@staticmethod
def stomp():
... | epl-1.0 | 6,842,175,070,290,498,000 | 21.189922 | 94 | 0.529258 | false |
smiller171/ansible-modules-core | system/service.py | 8 | 57233 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of... | gpl-3.0 | -4,609,616,486,088,734,000 | 36.927767 | 150 | 0.553125 | false |
ominux/scikit-learn | examples/cluster/plot_adjusted_for_chance_measures.py | 1 | 4105 | """
==========================================================
Adjustment for chance in clustering performance evaluation
==========================================================
The following plots demonstrate the impact of the number of clusters and
number of samples on various clustering performance evaluation me... | bsd-3-clause | 304,915,694,155,107,840 | 34.387931 | 78 | 0.677223 | 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.