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 |
|---|---|---|---|---|---|---|---|---|---|---|
vschw/smartmeter_release | odroidw_meter.py | 1 | 10958 | #! /usr/bin/env python
# Filename: odroidw_meter.py
# -*- coding: utf-8 -*-
"""Smart meter application module for Odroid W.
Setup Description
#################
This application module utilizes the external 12-bit MCP3208 ADC connected
to the Odroid W via SPI to be used as a real-time smart-power-meter. Current
clamps i... | gpl-2.0 | 8,411,001,507,309,361,000 | 30.67052 | 105 | 0.59509 | false |
GoogleChrome/chromium-dashboard | pages/schedule.py | 1 | 3561 | from __future__ import division
from __future__ import print_function
# -*- coding: utf-8 -*-
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.a... | apache-2.0 | -2,647,520,758,082,218,500 | 31.081081 | 103 | 0.683235 | false |
alex-dot/upwdchg | setup.py | 2 | 3635 | #!/usr/bin/env python
# -*- mode:python; tab-width:4; c-basic-offset:4; intent-tabs-mode:nil; -*-
# ex: filetype=python tabstop=4 softtabstop=4 shiftwidth=4 expandtab autoindent smartindent
# Modules
from distutils.core import setup
import os
# Helpers
def filesInDir( sDirectory ):
__lsfilesInDir = list()
for... | gpl-3.0 | -8,705,279,897,825,712,000 | 47.466667 | 100 | 0.667675 | false |
repotvsupertuga/tvsupertuga.repository | script.module.beautifulsoup4/lib/bs4/builder/_lxml.py | 446 | 8661 | __all__ = [
'LXMLTreeBuilderForXML',
'LXMLTreeBuilder',
]
from io import BytesIO
from StringIO import StringIO
import collections
from lxml import etree
from bs4.element import Comment, Doctype, NamespacedAttribute
from bs4.builder import (
FAST,
HTML,
HTMLTreeBuilder,
PERMISSIVE,
Parse... | gpl-2.0 | -6,811,964,650,761,371,000 | 36.171674 | 82 | 0.611477 | false |
exelearning/iteexe | twisted/internet/_pollingfile.py | 14 | 7804 | # -*- test-case-name: twisted.web2.test -*-
"""
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 implements
from twisted.internet.interfaces import IConsumer, IProducer
MIN_TIMEOUT = 0.000000001
MAX... | gpl-2.0 | 7,581,959,966,331,219,000 | 29.248062 | 134 | 0.570349 | false |
TheBigW/DRC | DRCFileTool.py | 1 | 11014 | # DRC.py
# Copyright (C) 2013 - Tobias Wenig
# tobiaswenig@yahoo.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 late... | gpl-3.0 | 4,140,215,412,281,875,000 | 38.905797 | 118 | 0.623116 | false |
rexshihaoren/scikit-learn | sklearn/pipeline.py | 162 | 21103 | """
The :mod:`sklearn.pipeline` module implements utilities to build a composite
estimator, as a chain of transforms and estimators.
"""
# Author: Edouard Duchesnay
# Gael Varoquaux
# Virgile Fritsch
# Alexandre Gramfort
# Lars Buitinck
# Licence: BSD
from collections import defaultdict... | bsd-3-clause | -2,975,895,941,124,072,000 | 35.957968 | 89 | 0.598067 | false |
seyko2/openvz_rhel6_kernel_mirror | tools/perf/scripts/python/syscall-counts-by-pid.py | 34 | 1923 | # system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... | gpl-2.0 | 2,409,434,596,420,111,400 | 26.869565 | 77 | 0.615185 | false |
popazerty/dvbapp-gui2 | lib/python/Components/Converter/ServiceInfo.py | 2 | 9104 | from Components.Converter.Converter import Converter
from enigma import iServiceInformation, iPlayableService
from Components.Element import cached
from os import path
WIDESCREEN = [3, 4, 7, 8, 0xB, 0xC, 0xF, 0x10]
class ServiceInfo(Converter, object):
HAS_TELETEXT = 0
IS_MULTICHANNEL = 1
IS_CRYPTED = 2
IS_WIDES... | gpl-2.0 | -1,731,800,645,046,284,300 | 35.562249 | 107 | 0.704416 | false |
dstanek/keystone | keystone/contrib/federation/schema.py | 14 | 2401 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | apache-2.0 | 6,341,864,997,086,658,000 | 29.392405 | 75 | 0.612661 | false |
bhansa/fireball | pyvenv/Lib/site-packages/wheel/wininst2wheel.py | 62 | 7772 | #!/usr/bin/env python
import distutils.dist
import os.path
import re
import sys
import tempfile
import zipfile
from argparse import ArgumentParser
from glob import iglob
from shutil import rmtree
import wheel.bdist_wheel
from wheel.archive import archive_wheelfile
egg_info_re = re.compile(r'''(^|/)(?P<name>[^/]+?)-(?... | gpl-3.0 | 5,705,257,655,773,716,000 | 34.815668 | 83 | 0.622877 | false |
lgeiger/ide-python | lib/debugger/VendorLib/vs-py-debugger/pythonFiles/jedi/__main__.py | 28 | 1427 | import sys
from os.path import join, dirname, abspath, isdir
def _start_linter():
"""
This is a pre-alpha API. You're not supposed to use it at all, except for
testing. It will very likely change.
"""
import jedi
if '--debug' in sys.argv:
jedi.set_debug_function()
for path in sys... | mit | -5,183,893,565,658,811,000 | 28.729167 | 79 | 0.52698 | false |
netman92/coala | tests/misc/ShellTest.py | 34 | 3511 | from contextlib import ExitStack
import os
import sys
from tempfile import NamedTemporaryFile
import unittest
from coalib.misc.Shell import run_interactive_shell_command, run_shell_command
class RunShellCommandTest(unittest.TestCase):
@staticmethod
def construct_testscript_command(scriptname):
retur... | agpl-3.0 | 2,662,207,384,232,746,500 | 36.752688 | 78 | 0.594702 | false |
alb-i986/selenium | py/selenium/webdriver/ie/webdriver.py | 25 | 2186 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | -5,993,200,331,769,734,000 | 34.258065 | 79 | 0.687557 | false |
ogenstad/ansible | lib/ansible/modules/cloud/amazon/iam_role.py | 17 | 19354 | #!/usr/bin/python
# 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'}
DOCUMENTATION = '''
---
module: iam_role
short_description: Manage ... | gpl-3.0 | -858,562,261,009,659,300 | 42.78733 | 156 | 0.612535 | false |
sometallgit/AutoUploader | Python27/Lib/bsddb/dbobj.py | 100 | 11331 | #-------------------------------------------------------------------------
# This file contains real Python object wrappers for DB and DBEnv
# C "objects" that can be usefully subclassed. The previous SWIG
# based interface allowed this thanks to SWIG's shadow classes.
# -- Gregory P. Smith
#--------------------... | mit | -4,604,540,564,523,372,500 | 41.597744 | 76 | 0.599241 | false |
afdelgado/askbot | askbot/migrations/0063_transplant_question_closed_datas.py | 18 | 28030 | # 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 ProgressBar
class Migration(DataMigration):
def forwards(self, orm):
message = "Marking closed threads"
num_questions = orm.Question.objects.co... | gpl-3.0 | -6,148,073,332,836,942,000 | 84.718654 | 221 | 0.559508 | false |
SMMAR11/smmaranim | app/functions/form_init.py | 1 | 8799 | # coding: utf-8
'''
Mise en forme d'un gabarit normé pour chaque champ d'un formulaire
_form : Objet formulaire
Retourne un tableau associatif
'''
def sub(_form) :
# Imports
from bs4 import BeautifulSoup
from django.template.defaultfilters import safe
from smmaranim.custom_settings import ERROR_MESSAGES
from smm... | gpl-3.0 | 6,114,091,654,026,802,000 | 29.394464 | 103 | 0.595013 | false |
chauhanhardik/populo | openedx/core/djangoapps/user_api/views.py | 31 | 32766 | """HTTP end-points for the User API. """
import copy
from opaque_keys import InvalidKeyError
from django.conf import settings
from django.contrib.auth.models import User
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.core.exceptions import ImproperlyConfigured, NON_FIELD_E... | agpl-3.0 | -8,174,678,464,339,786,000 | 35.857143 | 126 | 0.615852 | false |
cloudera/hue | desktop/core/ext-py/SQLAlchemy-1.3.17/test/orm/test_options.py | 2 | 83938 | import sqlalchemy as sa
from sqlalchemy import Column
from sqlalchemy import ForeignKey
from sqlalchemy import inspect
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy import testing
from sqlalchemy.orm import aliased
from sqlalchemy.orm import class_mapper
from sqlalchemy.orm import column_... | apache-2.0 | 8,712,694,367,230,479,000 | 31.197161 | 79 | 0.530928 | false |
endolith/pyeq2 | Examples/Simple/FitOneNamedEquation_2D.py | 3 | 4299 | from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
import os, sys, inspect
# ensure pyeq2 can be imported
if -1 != sys.path[0].find('pyeq2-master'):raise Exception('Please rename git checkout directory from "pyeq2-master" to "pyeq2"')
importDir = os.p... | bsd-2-clause | -7,897,971,577,850,000,000 | 31.568182 | 158 | 0.678995 | false |
umitproject/openmonitor-desktop-agent | umit/icm/agent/gui/dashboard/timeline/TimeLine.py | 1 | 4235 | # Copyright (C) 2007 Adriano Monteiro Marques
#
# Authors: Tianwei Liu <liutianweidlut@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your... | gpl-2.0 | -8,969,286,868,669,900,000 | 29.035461 | 115 | 0.585124 | false |
polyanskiy/refractiveindex.info-scripts | scripts/Adachi 1989 - InGaAs.py | 1 | 3831 | # -*- coding: utf-8 -*-
# Author: Mikhail Polyanskiy
# Last modified: 2017-07-08
# Original data: Adachi 1989, https://doi.org/10.1063/1.343580
# In(1-x)Ga(x)As; x=0.48
import numpy as np
import matplotlib.pyplot as plt
π = np.pi
# model parameters
E0 = 0.75 #eV
Δ0 = 1.04-E0 #eV
E1 = 2.57 #eV
Δ1 = 2.83-... | gpl-3.0 | 8,756,025,169,520,439,000 | 23.46 | 79 | 0.53108 | false |
timlinux/QGIS | tests/src/python/test_qgsvectorlayerutils.py | 12 | 31288 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsVectorLayerUtils.
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"... | gpl-2.0 | 2,187,202,926,839,775,500 | 44.018705 | 125 | 0.633534 | false |
bgshin/doc-classify-multi-gpu | src/cnntw/cnn_model.py | 1 | 7389 |
import tensorflow as tf
import re
FLAGS = tf.app.flags.FLAGS
tf.app.flags.DEFINE_boolean('use_fp16', False,
"""Train the model using fp16.""")
TOWER_NAME = 'tower'
NUM_CLASSES = 3
def _variable_on_cpu(name, shape, initializer):
"""Helper to create a Variable stored on CPU memory.
... | apache-2.0 | -6,378,224,369,926,593,000 | 33.853774 | 132 | 0.620382 | false |
lao605/product-definition-center | pdc/apps/changeset/middleware.py | 4 | 3389 | #
# Copyright (c) 2015 Red Hat
# Licensed under The MIT License (MIT)
# http://opensource.org/licenses/MIT
#
import sys
import logging
from datetime import datetime
from django.db import transaction
from . import models
# trap wrong HTTP methods
from django.http import HttpResponse
from rest_framework import status
i... | mit | -8,231,514,074,134,529,000 | 44.186667 | 119 | 0.577456 | false |
tboyce1/home-assistant | homeassistant/components/sensor/vera.py | 6 | 3739 | """
Support for Vera sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.vera/
"""
import logging
from datetime import timedelta
from homeassistant.const import (
TEMP_CELSIUS, TEMP_FAHRENHEIT)
from homeassistant.helpers.entity import Ent... | apache-2.0 | 7,774,714,933,723,919,000 | 37.153061 | 76 | 0.647767 | false |
mitchcapper/mythbox | resources/lib/decorator/decorator.py | 40 | 6890 | """
Decorator module, see
http://www.phyast.pitt.edu/~micheles/python/documentation.html
for the documentation and below for the licence.
"""
## The basic trick is to generate the source code for the decorated function
## with the right signature and to evaluate it.
## Uncomment the statement 'print >> sys.stderr, fun... | gpl-2.0 | -7,828,925,976,780,528,000 | 36.043011 | 78 | 0.634253 | false |
OpenHID/code-vr | languages/python/server.py | 1 | 6388 | # Example of simple echo server
# www.solusipse.net
import socket
import os
import subprocess
import fileinput
from export import export_json
from parse import parse
import json
def listen():
connection = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
connection.setsockopt(socket.SOL_SOCKET,... | mit | 2,742,407,488,133,922,300 | 38.443038 | 85 | 0.450219 | false |
jelloslinger/aiodownload | docs/conf.py | 1 | 5741 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# aiodownload documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 15 14:47:21 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
... | mit | 2,295,261,529,103,601,700 | 28.441026 | 79 | 0.667305 | false |
eeshangarg/oh-mainline | vendor/packages/gdata/src/gdata/docs/__init__.py | 263 | 8993 | #!/usr/bin/python
#
# Copyright 2009 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 b... | agpl-3.0 | 8,153,151,730,733,746,000 | 32.431227 | 80 | 0.677416 | false |
omeripek/arguman.org | web/main/settings.py | 1 | 4666 | """
Django settings for arguman project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
im... | mit | -2,332,800,715,150,183,000 | 24.637363 | 71 | 0.702315 | false |
vertexproject/synapse | synapse/models/language.py | 1 | 2640 | import synapse.lib.module as s_module
class LangModule(s_module.CoreModule):
def getModelDefs(self):
name = 'lang'
ctors = ()
forms = (
('lang:idiom', {}, (
('url', ('inet:url', {}), {
'doc': 'Authoritative URL for the idiom.'
... | apache-2.0 | 4,415,985,487,001,416,000 | 31.195122 | 88 | 0.331061 | false |
georgetown-analytics/machine-learning | examples/FrancoMBM/Wine.py | 1 | 6158 |
# importing libraries
import sys
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import scipy as sp
import IPython
from IPython.display import display
import sklearn
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier
from sklearn.p... | mit | 6,510,756,284,120,494,000 | 32.595506 | 164 | 0.679441 | false |
cntnboys/302-project | Webapps/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py | 156 | 1864 | """
urllib3 - Thread-safe connection pooling and re-using.
"""
__author__ = 'Andrey Petrov (andrey.petrov@shazow.net)'
__license__ = 'MIT'
__version__ = 'dev'
from .connectionpool import (
HTTPConnectionPool,
HTTPSConnectionPool,
connection_from_url
)
from . import exceptions
from .filepost import encod... | apache-2.0 | 896,606,099,922,629,600 | 27.242424 | 84 | 0.72103 | false |
aesaae/ardupilot_str | Tools/ardupilotwaf/boards.py | 1 | 6536 | #!/usr/bin/env python
# encoding: utf-8
import sys
import waflib
_board_classes = {}
class BoardMeta(type):
def __init__(cls, name, bases, dct):
super(BoardMeta, cls).__init__(name, bases, dct)
if name == 'Board':
return
_board_classes[name] = cls
class Board:
def config... | gpl-3.0 | 421,841,126,112,058,000 | 26.812766 | 78 | 0.551102 | false |
bc-python-tools/orpyste | test/ast/test_mode.py | 1 | 1729 | #!/usr/bin/env python3
# --------------------- #
# -- SEVERAL IMPORTS -- #
# --------------------- #
import json
from mistool.os_use import PPath
# ------------------- #
# -- MODULE TESTED -- #
# ------------------- #
from orpyste.parse import ast
# ----------------------- #
# -- GENERAL CONSTANTS -- #
# ------... | gpl-3.0 | -3,319,867,613,342,031,000 | 21.75 | 68 | 0.499132 | false |
sorz/isi | store/store/utils.py | 1 | 1373 | from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
def make_page(object_list, page, per_page=8, neighbor_count=5):
"""Return a Django Page object with a list of neighbor pages.
"neighbor pages" is some pages next to the current page.
e.g. page 6 may has neighbor page 5, 4, 3 and 7, ... | mit | -5,893,655,477,452,378,000 | 36.108108 | 88 | 0.670066 | false |
kontais/EFI-MIPS | ToolKit/cmds/python/Lib/encodings/mac_greek.py | 15 | 7567 | """ Python Character Mapping Codec generated from 'GREEK.TXT' with gencodec.py.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
(c) Copyright 2000 Guido van Rossum.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,error... | bsd-3-clause | -7,664,700,960,503,120,000 | 43.511765 | 79 | 0.662085 | false |
panagiotisl/bigtop | bigtop-packages/src/charm/kafka/layer-kafka/tests/01-deploy.py | 10 | 1603 | #!/usr/bin/env python3
# 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 "Lic... | apache-2.0 | 7,317,516,872,764,128,000 | 33.106383 | 74 | 0.688709 | false |
rwightman/pytorch-image-models | timm/models/layers/blur_pool.py | 1 | 1591 | """
BlurPool layer inspired by
- Kornia's Max_BlurPool2d
- Making Convolutional Networks Shift-Invariant Again :cite:`zhang2019shiftinvar`
Hacked together by Chris Ha and Ross Wightman
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
from .padding import get_padding
class ... | apache-2.0 | -5,379,620,639,065,342,000 | 36.880952 | 106 | 0.668762 | false |
shyamalschandra/scikit-learn | sklearn/datasets/species_distributions.py | 64 | 7917 | """
=============================
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 | -5,493,121,684,391,614,000 | 29.925781 | 79 | 0.622205 | false |
MolarAmbiguity/OctoPrint | src/octoprint/util/__init__.py | 6 | 5838 | # coding=utf-8
__author__ = "Gina Häußge <osd@foosel.net>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
import os
import traceback
import sys
import time
import re
import tempfile
from flask import make_response
from octoprint.settings import settings, default_settings
def... | agpl-3.0 | -5,592,984,480,444,918,000 | 24.709251 | 158 | 0.690884 | false |
jpautom/scikit-learn | sklearn/datasets/tests/test_samples_generator.py | 181 | 15664 | from __future__ import division
from collections import defaultdict
from functools import partial
import numpy as np
import scipy.sparse as sp
from sklearn.externals.six.moves import zip
from sklearn.utils.testing import assert_equal
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing imp... | bsd-3-clause | 5,276,342,247,457,484,000 | 42.270718 | 79 | 0.555924 | false |
papados/ordersys | Lib/encodings/shift_jis.py | 816 | 1039 | #
# shift_jis.py: Python Unicode Codec for SHIFT_JIS
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_jp, codecs
import _multibytecodec as mbc
codec = _codecs_jp.getcodec('shift_jis')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEncoder(mbc.Multib... | unlicense | -6,840,274,632,620,791,000 | 25.641026 | 74 | 0.699711 | false |
bmhatfield/Diamond | src/collectors/endecadgraph/endecadgraph.py | 57 | 3912 | # coding=utf-8
"""
Collects stats from Endeca Dgraph/MDEX server.
Tested with: Endeca Information Access Platform version 6.3.0.655584
=== Authors
Jan van Bemmelen <jvanbemmelen@bol.com>
Renzo Toma <rtoma@bol.com>
"""
import diamond.collector
import urllib2
from StringIO import StringIO
import re
import sys
if sys... | mit | -1,886,359,644,175,667,200 | 30.296 | 80 | 0.533487 | false |
btrzcinski/netchat | py-client/client.py | 1 | 4786 | #! /usr/local/bin/python2.5
"""
The Py-Client serves as a lightweight altenative to the graphical
NetChat J-Client. Using curses to manage input and output, it is
entirely terminal-based, and can be configured to run to taste via
command line arguments.
"""
import os.path
import signal
import sys
from twisted.inter... | gpl-2.0 | 903,049,996,325,625,300 | 29.679487 | 93 | 0.652319 | false |
hurdlea/SimpleCV | SimpleCV/Features/BOFFeatureExtractor.py | 11 | 12465 | from SimpleCV.base import *
from SimpleCV.ImageClass import Image
from SimpleCV.Features.FeatureExtractorBase import *
class BOFFeatureExtractor(object):
"""
For a discussion of bag of features please see:
http://en.wikipedia.org/wiki/Bag_of_words_model_in_computer_vision
Initialize the bag of feature... | bsd-3-clause | -2,338,045,533,383,895,000 | 38.571429 | 120 | 0.569996 | false |
chenxuhua/linux | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/EventClass.py | 4653 | 3596 | # EventClass.py
#
# This is a library defining some events types classes, which could
# be used by other scripts to analyzing the perf samples.
#
# Currently there are just a few classes defined for examples,
# PerfEvent is the base class for all perf event sample, PebsEvent
# is a HW base Intel x86 PEBS event, and use... | gpl-2.0 | -4,083,911,650,214,047,000 | 37.255319 | 125 | 0.561179 | false |
willingc/oh-mainline | vendor/packages/scrapy/scrapy/tests/test_utils_signal.py | 44 | 2995 | from twisted.trial import unittest
from twisted.python import log as txlog
from twisted.python.failure import Failure
from twisted.internet import defer, reactor
from scrapy.xlib.pydispatch import dispatcher
from scrapy.utils.signal import send_catch_log, send_catch_log_deferred
from scrapy import log
class SendCatch... | agpl-3.0 | -333,461,608,849,552,900 | 34.654762 | 89 | 0.671119 | false |
zhouyuan/teuthology | docs/conf.py | 10 | 8236 | # -*- coding: utf-8 -*-
#
# teuthology documentation build configuration file, created by
# sphinx-quickstart on Thu Aug 7 12:30:36 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
... | mit | 1,324,946,570,244,081,400 | 30.676923 | 79 | 0.707625 | false |
wesley1001/dokomoforms | dokomoforms/handlers/api/batch.py | 1 | 1110 | """API endpoints dealing with batch operations."""
import tornado.web
import dokomoforms.api.batch as batch_api
from dokomoforms.db.survey import IncorrectQuestionIdError
from dokomoforms.handlers.util.base import APIHandler, \
catch_bare_integrity_error, \
get_json_request_body, validation_message
class Batc... | gpl-3.0 | -3,566,422,798,761,538,000 | 41.692308 | 79 | 0.675676 | false |
UnknownStudio/Codeic | ScratchPlus/kurt/kurt/__init__.py | 2 | 74227 | # Copyright (C) 2012 Tim Radvan
#
# This file is part of Kurt.
#
# Kurt 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.
#
# Kurt... | mpl-2.0 | 7,442,405,851,834,008,000 | 28.89408 | 83 | 0.544505 | false |
AlphaSmartDog/DeepLearningNotes | Note-1 RNN-DNC择时/Note-1-2 PonderingDNCore L2正则化示例/sonnet/python/ops/nest_test.py | 6 | 6219 | # Copyright 2017 The Sonnet 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 l... | mit | 484,361,944,834,077,440 | 31.904762 | 80 | 0.598328 | false |
annarev/tensorflow | tensorflow/python/keras/layers/serialization.py | 2 | 8373 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -5,814,856,272,789,045,000 | 46.845714 | 132 | 0.7689 | false |
flyballlabs/threatdetectionservice | api/venv/lib/python2.7/site-packages/wheel/wininst2wheel.py | 93 | 7863 | #!/usr/bin/env python
import os.path
import re
import sys
import tempfile
import zipfile
import wheel.bdist_wheel
import distutils.dist
from distutils.archive_util import make_archive
from shutil import rmtree
from wheel.archive import archive_wheelfile
from argparse import ArgumentParser
from glob import iglob
egg_in... | apache-2.0 | 9,004,560,711,534,544,000 | 35.402778 | 78 | 0.620883 | false |
spcui/autotest | frontend/tko/views.py | 6 | 1101 | import django.http
from autotest.frontend.tko import rpc_interface, graphing_utils
from autotest.frontend.tko import csv_encoder
from autotest.frontend.afe import rpc_handler, rpc_utils
rpc_handler_obj = rpc_handler.RpcHandler((rpc_interface,),
document_module=rpc_interface)
d... | gpl-2.0 | -863,800,946,014,363,000 | 32.363636 | 78 | 0.720254 | false |
40223136/w17test1 | static/Brython3.1.1-20150328-091302/Lib/_struct.py | 726 | 13787 | #
# This module is a pure Python version of pypy.module.struct.
# It is only imported if the vastly faster pypy.module.struct is not
# compiled in. For now we keep this version for reference and
# because pypy.module.struct is not ootype-backend-friendly yet.
#
# this module 'borrowed' from
# https://bitbucket.org/p... | gpl-3.0 | 81,680,007,183,432,940 | 31.516509 | 95 | 0.547907 | false |
bpgc-cte/python2017 | Week 7/django/lib/python3.6/site-packages/django/core/management/commands/runserver.py | 39 | 6518 | from __future__ import unicode_literals
import errno
import os
import re
import socket
import sys
from datetime import datetime
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.core.servers.basehttp import (
WSGIServer, get_internal_wsgi_application, r... | mit | -6,907,975,460,398,108,000 | 37.116959 | 88 | 0.57487 | false |
ChronoMonochrome/android_external_chromium_org | tools/telemetry/telemetry/page/actions/scroll_unittest.py | 23 | 4546 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
from telemetry.core import util
from telemetry.page import page as page_module
from telemetry.page.actions import scroll
from telemetry.unittes... | bsd-3-clause | -2,650,569,820,485,704,000 | 42.711538 | 79 | 0.677739 | false |
takeshineshiro/python-novaclient | novaclient/tests/unit/v2/fakes.py | 3 | 85577 | # Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2011 OpenStack Foundation
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.a... | apache-2.0 | -266,764,670,803,885,540 | 35.49339 | 79 | 0.439405 | false |
leiferikb/bitpop | depot_tools/third_party/gsutil/gslib/commands/version.py | 51 | 5060 | # Copyright 2011 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 a... | gpl-3.0 | 7,645,953,542,607,643,000 | 32.733333 | 79 | 0.68083 | false |
markduan/qingcloud-sdk-python | qingcloud/misc/json_tool.py | 3 | 1673 | # =========================================================================
# Copyright 2012-present Yunify, Inc.
# -------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this work except in compliance with the Licens... | apache-2.0 | 8,811,650,739,518,200,000 | 33.142857 | 75 | 0.544531 | false |
AOKP/external_chromium_org | third_party/protobuf/python/google/protobuf/internal/enum_type_wrapper.py | 292 | 3541 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions o... | bsd-3-clause | -1,417,791,087,447,473,200 | 38.786517 | 76 | 0.724372 | false |
trolldbois/python-haystack-reverse | haystack/reverse/heuristics/dsa.py | 1 | 18223 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Loic Jaquemet loic.jaquemet+python@gmail.com
#
import array
import collections
import logging
import numbers
from haystack.reverse import fieldtypes
from haystack.reverse import re_string
from haystack.reverse.heuristics import model
log = logging.... | gpl-3.0 | 2,291,094,607,135,357,700 | 40.795872 | 125 | 0.56522 | false |
eduNEXT/edunext-ecommerce | ecommerce/core/tests/test_views.py | 1 | 5846 | """Tests of the service health endpoint."""
from __future__ import absolute_import
import mock
from django.conf import settings
from django.contrib.auth import get_user, get_user_model
from django.db import DatabaseError
from django.test.utils import override_settings
from django.urls import reverse
from rest_framewor... | agpl-3.0 | 1,286,296,911,161,248,000 | 39.881119 | 112 | 0.682689 | false |
Huskerboy/startbootstrap-freelancer | freelancer_env/Lib/encodings/koi8_t.py | 101 | 13193 | """ Python Character Mapping Codec koi8_t
"""
# http://ru.wikipedia.org/wiki/КОИ-8
# http://www.opensource.apple.com/source/libiconv/libiconv-4/libiconv/tests/KOI8-T.TXT
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,err... | mit | -8,829,252,054,491,697,000 | 41.824675 | 86 | 0.540788 | false |
yufengg/tensorflow | tensorflow/python/platform/flags_test.py | 79 | 3046 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 2,013,311,585,402,235,600 | 30.081633 | 80 | 0.688772 | false |
UnrememberMe/pants | tests/python/pants_test/util/test_osutil.py | 1 | 1440 | # coding=utf-8
# Copyright 2014 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)
import logging
from... | apache-2.0 | 6,999,456,427,979,407,000 | 37.918919 | 95 | 0.6875 | false |
dydek/django | tests/null_fk/tests.py | 352 | 2982 | from __future__ import unicode_literals
from django.db.models import Q
from django.test import TestCase
from .models import (
Comment, Forum, Item, Post, PropertyValue, SystemDetails, SystemInfo,
)
class NullFkTests(TestCase):
def test_null_fk(self):
d = SystemDetails.objects.create(details='First ... | bsd-3-clause | -3,822,586,389,093,900,300 | 41.6 | 99 | 0.620054 | false |
wbinventor/openmc | openmc/summary.py | 1 | 7606 | from collections.abc import Iterable
import re
import warnings
import numpy as np
import h5py
import openmc
import openmc.checkvalue as cv
from openmc.region import Region
_VERSION_SUMMARY = 6
class Summary(object):
"""Summary of geometry, materials, and tallies used in a simulation.
Attributes
------... | mit | 2,415,475,767,599,424,500 | 32.359649 | 81 | 0.572048 | false |
spidercensus/py-junos-eznc | setup.py | 3 | 1830 | from setuptools import setup, find_packages
import sys
# parse requirements
req_lines = [line.strip() for line in open(
'requirements.txt').readlines()]
install_reqs = list(filter(None, req_lines))
if sys.version_info[:2] == (2, 6):
install_reqs.append('importlib>=1.0.3')
setup(
name="junos-eznc",
nam... | apache-2.0 | -4,326,474,895,221,679,600 | 37.125 | 79 | 0.623497 | false |
glatard/nipype | nipype/interfaces/spm/base.py | 9 | 18367 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""The spm module provides basic functions for interfacing with SPM tools.
In order to use the standalone MCR version of spm, you need to ensure that
the following commands are executed at the beginning o... | bsd-3-clause | 6,885,619,359,335,938,000 | 34.943249 | 80 | 0.522187 | false |
edgarRd/incubator-airflow | tests/contrib/sensors/test_aws_redshift_cluster_sensor.py | 5 | 3429 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 | 2,952,761,640,272,566,000 | 37.1 | 88 | 0.589093 | false |
technologiescollege/s2a_fr | s2a/Python/Lib/test/test_htmlparser.py | 50 | 24838 | """Tests for HTMLParser.py."""
import HTMLParser
import pprint
import unittest
from test import test_support
class EventCollector(HTMLParser.HTMLParser):
def __init__(self):
self.events = []
self.append = self.events.append
HTMLParser.HTMLParser.__init__(self)
def get_events(self):
... | gpl-3.0 | 2,415,930,822,194,837,000 | 39.718033 | 83 | 0.447298 | false |
gavin-feng/odoo | openerp/http.py | 7 | 60957 | # -*- coding: utf-8 -*-
#----------------------------------------------------------
# OpenERP HTTP layer
#----------------------------------------------------------
import ast
import collections
import contextlib
import datetime
import errno
import functools
import getpass
import inspect
import logging
import mimetypes... | agpl-3.0 | -8,348,468,202,319,687,000 | 36.955791 | 178 | 0.581344 | false |
hobson/pug-dj | pug/dj/miner/management/commands/inspect_dbs.py | 1 | 4927 | import sys
import os
import re
from StringIO import StringIO
from django.conf import settings
from django.core.management import call_command
# 1. turn this into a management command `inspectdbs`
# 2. create a Model mixin that stores attributes in the Meta class per this:
# http://stackoverflow.com/questions/10884... | mit | -5,481,200,463,839,576,000 | 51.414894 | 173 | 0.564644 | false |
bpow/gemini | gemini/scripts/gemini_install.py | 2 | 18433 | #!/usr/bin/env python
"""Installer for gemini: a lightweight db framework for disease and population genetics.
https://github.com/arq5x/gemini
Handles installation of:
- Required third party software
- Required Python libraries
- Gemini application
- Associated data files
Requires: Python 2.7 (or 2.6 and argparse),... | mit | 6,702,677,346,410,973,000 | 43.958537 | 123 | 0.60549 | false |
uwafsl/MissionPlanner | Lib/site-packages/numpy/core/machar.py | 83 | 10658 | """
Machine arithmetics - determine the parameters of the
floating-point arithmetic system
"""
# Author: Pearu Peterson, September 2003
__all__ = ['MachAr']
from numpy.core.fromnumeric import any
from numpy.core.numeric import seterr
# Need to speed this up...especially for longfloat
class MachAr(object):
"""
... | gpl-3.0 | -92,400,106,806,611,540 | 30.439528 | 84 | 0.499906 | false |
machinelearningnanodegree/stanford-cs231 | solutions/levin/assignment2/FullyConectedNets/batchnormalization.py | 1 | 14980 | import sys
import os
from astropy.units import ys
sys.path.insert(0, os.path.abspath('..'))
import random
import numpy as np
import matplotlib.pyplot as plt
from assignment2.cs231n.layers import affine_forward
from assignment2.cs231n.layers import affine_backward
from assignment2.cs231n.layers import relu_forward
fro... | mit | 9,042,966,836,862,213,000 | 38.949333 | 100 | 0.551669 | false |
redhat-openstack/rally | tests/unit/task/test_scenario.py | 6 | 10463 | # Copyright 2013: Mirantis 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 b... | apache-2.0 | 1,001,337,616,612,287,200 | 37.326007 | 79 | 0.611966 | false |
cogeorg/black_rhino | examples/firesales_simple/networkx/linalg/graphmatrix.py | 35 | 5008 | """
Adjacency matrix and incidence matrix of graphs.
"""
# Copyright (C) 2004-2011 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
__author__ = "\n".join(['Aric Hagberg (hagberg@lanl.go... | gpl-3.0 | -3,414,203,368,398,243,000 | 31.102564 | 79 | 0.607827 | false |
intfrr/powerline-shell | segments/hg.py | 20 | 1246 | import os
import subprocess
def get_hg_status():
has_modified_files = False
has_untracked_files = False
has_missing_files = False
output = subprocess.Popen(['hg', 'status'],
stdout=subprocess.PIPE).communicate()[0]
for line in output.split('\n'):
if line == '':
conti... | mit | 5,406,515,323,854,362,000 | 30.948718 | 80 | 0.571429 | false |
wkrzemien/DIRAC | DataManagementSystem/Service/FileCatalogProxyHandler.py | 9 | 3580 | ########################################################################
# $HeadURL $
# File: FileCatalogProxyHandler.py
########################################################################
"""
:mod: FileCatalogProxyHandler
.. module: FileCatalogProxyHandler
:synopsis: This is a service which represents a DIS... | gpl-3.0 | 245,290,820,717,235,620 | 34.445545 | 97 | 0.651397 | false |
hoatle/odoo | addons/hr_timesheet/__init__.py | 410 | 1104 | # -*- 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... | agpl-3.0 | -8,004,366,716,214,419,000 | 39.888889 | 79 | 0.615942 | false |
bigdatauniversity/edx-platform | lms/djangoapps/lti_provider/models.py | 33 | 5750 | """
Database models for the LTI provider feature.
This app uses migrations. If you make changes to this model, be sure to create
an appropriate migration file and check it in at the same time as your model
changes. To do that,
1. Go to the edx-platform dir
2. ./manage.py lms schemamigration lti_provider --auto "descr... | agpl-3.0 | -8,735,274,756,650,178,000 | 41.592593 | 99 | 0.710783 | false |
gdub/django | tests/introspection/models.py | 103 | 1079 | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Reporter(models.Model):
first_name = models.CharField(max_length=30)
last_name = models.CharField(max_length=30)
email = models.EmailField(... | bsd-3-clause | 8,626,541,442,578,208,000 | 27.394737 | 61 | 0.663577 | false |
tomasreimers/tensorflow-emscripten | tensorflow/contrib/rnn/python/ops/gru_ops.py | 31 | 5438 | # 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,851,479,191,236,914,000 | 29.550562 | 82 | 0.620816 | false |
hkwi/twink | twink/ofp4/parse.py | 1 | 34533 |
from __future__ import absolute_import
import struct
from collections import namedtuple
from . import *
_len = len
_type = type
def _align(length):
return (length+7)//8*8
class _pos(object):
offset = 0
def _cursor(offset):
if isinstance(offset, _pos):
return offset
elif isinstance(offset, i... | apache-2.0 | -8,165,771,693,035,206,000 | 31.1093 | 114 | 0.700171 | false |
chromium/chromium | third_party/blink/web_tests/external/wpt/webdriver/tests/get_timeouts/get.py | 42 | 1278 | from tests.support.asserts import assert_success
def get_timeouts(session):
return session.transport.send(
"GET", "session/{session_id}/timeouts".format(**vars(session)))
def test_get_timeouts(session):
response = get_timeouts(session)
assert_success(response)
assert "value" in response.bod... | bsd-3-clause | 2,045,596,474,737,401,000 | 28.72093 | 71 | 0.688576 | false |
dguerri/ansible-modules-core | cloud/openstack/quantum_floating_ip_associate.py | 11 | 8181 | #!/usr/bin/python
#coding: utf-8 -*-
# (c) 2013, Benno Joy <benno@ansible.com>
#
# This module 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 | 4,061,843,772,056,367,000 | 34.881579 | 142 | 0.630119 | false |
eric-stanley/youtube-dl | youtube_dl/extractor/eitb.py | 130 | 1458 | # encoding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from .brightcove import BrightcoveIE
from ..utils import ExtractorError
class EitbIE(InfoExtractor):
IE_NAME = 'eitb.tv'
_VALID_URL = r'https?://www\.eitb\.tv/(eu/bideoa|es/video)/[^/]+/(?P<playlist_id>\d+)... | unlicense | -6,721,273,146,772,423,000 | 36.358974 | 128 | 0.612903 | false |
ak-67/ZeroNet | src/lib/pybitcointools/test_stealth.py | 36 | 4274 | import bitcoin as bc
import sys
import unittest
class TestStealth(unittest.TestCase):
def setUp(self):
if sys.getrecursionlimit() < 1000:
sys.setrecursionlimit(1000)
self.addr = 'vJmtjxSDxNPXL4RNapp9ARdqKz3uJyf1EDGjr1Fgqs9c8mYsVH82h8wvnA4i5rtJ57mr3kor1EVJrd4e5upACJd58... | gpl-2.0 | 1,051,257,491,905,021,700 | 45.456522 | 132 | 0.692092 | false |
wackymaster/QTClock | Libraries/numpy/core/tests/test_memmap.py | 26 | 4305 | from __future__ import division, absolute_import, print_function
import sys
import os
import shutil
from tempfile import NamedTemporaryFile, TemporaryFile, mktemp, mkdtemp
from numpy import memmap
from numpy import arange, allclose, asarray
from numpy.testing import (
TestCase, run_module_suite, assert_, assert_e... | mit | 3,227,647,160,473,733,600 | 32.115385 | 85 | 0.568177 | false |
iniverno/RnR-LLC | simics-3.0-install/simics-3.0.31/amd64-linux/lib/python2.4/ftplib.py | 11 | 26935 | """An FTP client class and some helper functions.
Based on RFC 959: File Transfer Protocol (FTP), by J. Postel and J. Reynolds
Example:
>>> from ftplib import FTP
>>> ftp = FTP('ftp.python.org') # connect to host, default port
>>> ftp.login() # default, i.e.: user anonymous, passwd anonymous@
'230 Guest login ok, ac... | gpl-2.0 | 3,533,293,896,304,792,000 | 32.171182 | 101 | 0.541415 | false |
Zhongqilong/kbengine | kbe/src/lib/python/Lib/inspect.py | 63 | 104117 | """Get useful information from live Python objects.
This module encapsulates the interface provided by the internal special
attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion.
It also provides some help for examining source code and class layout.
Here are some of the useful functions provided by this module:... | lgpl-3.0 | 1,408,887,618,278,944,500 | 36.737224 | 84 | 0.581673 | false |
arju88nair/projectCulminate | venv/lib/python3.5/site-packages/astroid/helpers.py | 3 | 5450 | # Copyright (c) 2015-2016 Cara Vinson <ceridwenv@gmail.com>
# Copyright (c) 2015-2016 Claudiu Popa <pcmanticore@gmail.com>
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
# For details: https://github.com/PyCQA/astroid/blob/master/COPYING.LESSER
"""
Various helper utilities.
"""... | apache-2.0 | 2,952,127,329,181,948,400 | 30.50289 | 85 | 0.651193 | false |
Nowheresly/odoo | addons/payment_buckaroo/controllers/main.py | 53 | 1155 | # -*- coding: utf-8 -*-
try:
import simplejson as json
except ImportError:
import json
import logging
import pprint
import werkzeug
from openerp import http, SUPERUSER_ID
from openerp.http import request
_logger = logging.getLogger(__name__)
class BuckarooController(http.Controller):
_return_url = '/pa... | agpl-3.0 | -8,534,195,200,755,097,000 | 32 | 130 | 0.664935 | false |
pmarques/ansible | test/lib/ansible_test/_internal/commands/sanity/bin_symlinks.py | 13 | 3587 | """Sanity test for symlinks in the bin directory."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
from ... import types as t
from . import (
SanityVersionNeutral,
SanityMessage,
SanityFailure,
SanitySuccess,
)
from ...config import (
SanityCon... | gpl-3.0 | 3,233,978,374,093,269,500 | 31.609091 | 154 | 0.597993 | false |
zangree/ryu | ryu/tests/unit/packet/test_lldp.py | 17 | 22983 | # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
#
# 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 applicab... | apache-2.0 | 185,941,386,292,228,930 | 42.860687 | 79 | 0.499413 | 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.