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 |
|---|---|---|---|---|---|---|---|---|---|---|
deployed/django | django/db/backends/sqlite3/base.py | 6 | 23478 | """
SQLite3 backend for django.
Works with either the pysqlite2 module or the sqlite3 module in the
standard library.
"""
from __future__ import unicode_literals
import datetime
import decimal
import warnings
import re
from django.conf import settings
from django.db import utils
from django.db.backends import (utils... | bsd-3-clause | 4,698,769,421,483,548,000 | 40.407407 | 120 | 0.639152 | false |
ddurieux/alignak | alignak/objects/service.py | 1 | 80937 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors
#
# This file is part of Alignak.
#
# Alignak 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 S... | agpl-3.0 | -2,788,228,608,407,813,600 | 42.769064 | 117 | 0.572452 | false |
ingadhoc/odoo-addons | partner_vat_unique/partner.py | 10 | 1390 | # -*- encoding: utf-8 -*-
from openerp import models, api, _
from openerp.exceptions import Warning
class res_partner(models.Model):
_inherit = "res.partner"
@api.one
@api.constrains('vat', 'parent_id', 'company_id')
def check_vat_unique(self):
if not self.vat:
return True
... | agpl-3.0 | -9,106,443,438,993,461,000 | 33.75 | 211 | 0.52518 | false |
pombredanne/disco | tests/test_query.py | 11 | 3805 | from disco.test import TestCase, TestPipe
from disco.compat import bytes_to_str, str_to_bytes
from disco.worker.pipeline.worker import Stage
from disco.worker.task_io import task_input_stream
import csv
from functools import partial
import hashlib
PREFIX='/tmp/'
def read(interface, state, label, inp):
from disco ... | bsd-3-clause | 4,564,912,458,981,070,300 | 31.521368 | 95 | 0.58134 | false |
xujun10110/golismero | thirdparty_libs/nltk/toolbox.py | 12 | 17953 | # Natural Language Toolkit: Toolbox Reader
#
# Copyright (C) 2001-2012 NLTK Project
# Author: Greg Aumann <greg_aumann@sil.org>
# URL: <http://nltk.org>
# For license information, see LICENSE.TXT
"""
Module for reading, writing and manipulating
Toolbox databases and settings files.
"""
import os, re, codecs
from Stri... | gpl-2.0 | -2,184,836,355,627,718,400 | 35.122736 | 107 | 0.572272 | false |
devnook/cse-lrmi | main.py | 1 | 3718 | #!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | 7,341,933,721,958,709,000 | 29.983333 | 89 | 0.714094 | false |
caseyrollins/osf.io | website/profile/utils.py | 3 | 7386 | # -*- coding: utf-8 -*-
from framework import auth
from website import settings
from osf.models import Contributor
from addons.osfstorage.models import Region
from website.filters import profile_image_url
from osf.models.contributor import get_contributor_permissions
from osf.utils.permissions import reduce_permission... | apache-2.0 | 3,375,359,164,777,297,000 | 35.384236 | 156 | 0.585026 | false |
Eric-Gaudiello/tensorflow_dev | tensorflow_home/tensorflow_venv/lib/python3.4/site-packages/google/protobuf/json_format.py | 3 | 21174 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... | gpl-3.0 | -3,895,382,516,134,386,000 | 33.485342 | 80 | 0.676396 | false |
xflows/tf_core | tf_core/nltoolkit/lib/tagging_common_parallel.py | 1 | 5237 | import multiprocessing
from functools import partial
def tag_document(document,tagger,tagger_function,args,kwargs,input_annotation,output_annotation):
if document.features['contentType'] == "Text":
if not document.text:
pass
for annotation,subtext in document.get_annotations_with_text... | mit | 1,324,712,501,938,792,000 | 33.453947 | 136 | 0.625167 | false |
digris/openbroadcast.org | website/tools/mutagen/id3/_file.py | 2 | 12328 | # -*- coding: utf-8 -*-
# Copyright (C) 2005 Michael Urman
# 2006 Lukas Lalinsky
# 2013 Christoph Reiter
#
# 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 v... | gpl-3.0 | -1,115,696,369,756,836,000 | 28.075472 | 86 | 0.566029 | false |
Jumpscale/jumpscale_core8 | lib/JumpScale/clients/oauth/OauthInstance.py | 1 | 5063 | import urllib.request
import urllib.parse
import urllib.error
import string
import requests
import time
import random
from JumpScale import j
class AuthError(Exception):
pass
class UserInfo(object):
def __init__(self, username, emailaddress, groups):
self.username = username
self.emailadd... | apache-2.0 | -8,568,296,709,341,277,000 | 37.067669 | 116 | 0.598064 | false |
MelanieBittl/dolfin | site-packages/dolfin/mesh/boundarysubdomainfinder.py | 3 | 5586 | # Copyright (C) 2008 Kent-Andre Mardal
#
# This file is part of DOLFIN.
#
# DOLFIN 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 versio... | gpl-3.0 | -5,786,090,352,813,916,000 | 23.716814 | 84 | 0.57662 | false |
auduny/home-assistant | homeassistant/components/cloudflare/__init__.py | 7 | 2188 | """Update the IP addresses of your Cloudflare DNS records."""
from datetime import timedelta
import logging
import voluptuous as vol
from homeassistant.const import CONF_API_KEY, CONF_EMAIL, CONF_ZONE
import homeassistant.helpers.config_validation as cv
from homeassistant.helpers.event import track_time_interval
_LO... | apache-2.0 | -4,421,321,578,304,429,600 | 30.257143 | 76 | 0.691042 | false |
PLyczkowski/Sticky-Keymap | 2.74/scripts/addons_contrib/sequencer_tools/__init__.py | 2 | 4298 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# 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.
#
# This program is distrib... | gpl-2.0 | 3,772,550,606,359,670,300 | 36.684211 | 120 | 0.610568 | false |
linkerlin/shadowsocks-server | sserver.py | 2 | 10464 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 clowwindy
# Copyright (c) 2014 v3aqb
#
# 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 witho... | mit | 5,911,844,524,637,377,000 | 38.787072 | 177 | 0.578842 | false |
Lektorium-LLC/edx-platform | common/djangoapps/third_party_auth/tests/specs/base.py | 2 | 49399 | """Base integration test for provider implementations."""
import unittest
import json
import mock
from contextlib import contextmanager
from django import test
from django.contrib import auth
from django.contrib.auth import models as auth_models
from django.contrib.messages.storage import fallback
from django.contri... | agpl-3.0 | -8,740,238,712,259,354,000 | 50.672594 | 122 | 0.682544 | false |
niboshi/chainer | chainer/utils/array.py | 10 | 1688 | import warnings
import numpy
import six
import chainer
from chainer.backends import cuda
def as_vec(x):
warnings.warn(
'chainer.utils.array.as_vec is deprecated. Please refer to '
'numpy.ravel or other array backend functions to flatten ndarrays.',
DeprecationWarning)
if x.ndim == 1:... | mit | -1,171,037,528,298,418,000 | 24.969231 | 78 | 0.626185 | false |
gregorschatz/pymodbus3 | test/test_interfaces.py | 2 | 2632 | import unittest
from pymodbus3.interfaces import *
class _SingleInstance(Singleton):
pass
class ModbusInterfaceTestsTest(unittest.TestCase):
"""
This is the unittest for the pymodbus3.interfaces module
"""
def setUp(self):
""" Initializes the test environment """
pass
def t... | bsd-3-clause | -7,825,868,380,045,185,000 | 38.283582 | 94 | 0.639818 | false |
alex/remoteobjects | remoteobjects/dataobject.py | 1 | 9213 | # Copyright (c) 2009 Six Apart Ltd.
# 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 | -8,214,878,308,252,101,000 | 35.852 | 82 | 0.655704 | false |
cernops/neutron | neutron/tests/unit/services/loadbalancer/agent/test_api.py | 6 | 4603 | # Copyright 2013 New Dream Network, LLC (DreamHost)
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | apache-2.0 | 8,646,123,773,261,513,000 | 28.88961 | 79 | 0.578318 | false |
nitrocode/challenge-questionaire | app/app.py | 1 | 2601 | #!/usr/bin/env python
import questions
import json
from flask import Flask, render_template, request
# this has to be defined here
app = Flask(__name__)
app.config['DEBUG'] = True
qdata = None
@app.route('/')
def test():
return render_template('test.html')
@app.route('/edit')
def edit():
return render_tem... | mit | 7,117,368,930,344,871,000 | 22.862385 | 68 | 0.569781 | false |
NewpTone/stacklab-nova | nova/network/ldapdns.py | 7 | 13353 | # Copyright 2012 Andrew Bogott for the Wikimedia 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 requi... | apache-2.0 | -2,508,662,527,030,706,000 | 34.798928 | 79 | 0.558751 | false |
perfectsearch/sandman | code/buildscripts/l10n/martian.py | 1 | 3863 | #!/usr/bin/env python
#
# $Id: martian.py 9318 2011-06-10 02:37:10Z nathan_george $
#
# Proprietary and confidential.
# Copyright $Date:: 2011#$ Perfect Search Corporation.
# All rights reserved.
#
import random, re
_SUBST = {
'a': [u'a',u'\u00e1',u'\u00e2',u'\u00e3',u'\u00e5',u'\u0430',u'\u0410',u'\u0391',u'\u... | mit | 7,911,633,751,153,652,000 | 35.443396 | 146 | 0.550349 | false |
JarbasAI/JarbasAI | jarbas_skills/skill-reminder/__init__.py | 3 | 5237 | # Copyright 2016 Mycroft AI, Inc.
#
# This file is part of Mycroft Core.
#
# Mycroft Core 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 versio... | gpl-3.0 | -8,863,748,726,465,021,000 | 34.62585 | 76 | 0.568837 | false |
trimailov/timeflow | timeflow/stats.py | 1 | 10902 | import datetime as dt
import smtplib
from collections import defaultdict
from collections import OrderedDict
from timeflow.settings import Settings
from timeflow.utils import DATE_FORMAT
from timeflow.utils import DATETIME_FORMAT
from timeflow.utils import calc_time_diff
from timeflow.utils import date_begins
from ti... | mit | -1,327,857,093,059,372,500 | 31.640719 | 109 | 0.608604 | false |
Darthone/bug-free-octo-parakeet | docs/source/conf.py | 2 | 5299 | # -*- coding: utf-8 -*-
#
# Informed Finance Canary documentation build configuration file, created by
# sphinx-quickstart on Thu Mar 9 20:29:30 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
# autogener... | mit | -3,840,951,447,199,581,700 | 30.541667 | 87 | 0.683714 | false |
nachitoys/distributionalSemanticStabilityThesis | mkl.py | 2 | 6182 | from modshogun import *
from numpy import *
from sklearn.metrics import r2_score
from scipy.stats import randint
from scipy.stats import randint as sp_randint
from scipy.stats import expon
from mkl_regressor import *
from time import localtime, strftime
if __name__ == "__main__":
import Gnuplot, Gnuplot.funcutil... | gpl-2.0 | -2,368,194,713,678,559,700 | 66.195652 | 217 | 0.626658 | false |
isotoma/django-cms | cms/tests/sitemap.py | 18 | 6524 | # -*- coding: utf-8 -*-
from cms.models import Title, Page
from cms.sitemaps import CMSSitemap
from cms.test_utils.testcases import CMSTestCase
from cms.api import create_page, create_title
from cms.test_utils.util.context_managers import SettingsOverride
class SitemapTestCase(CMSTestCase):
def setUp(self):
... | bsd-3-clause | 4,840,892,718,469,946,000 | 41.363636 | 104 | 0.55794 | false |
rpmcpp/Audacity | lib-src/lv2/serd/waflib/extras/doxygen.py | 14 | 4734 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
from fnmatch import fnmatchcase
import os,os.path,re,stat
from waflib import Task,Utils,Node,Logs
from waflib.TaskGen import feature
DOXY_STR='${DOXYGEN} - '
DOXY_FMTS='html l... | gpl-2.0 | -1,094,926,839,967,606,800 | 32.104895 | 129 | 0.667934 | false |
yipenggao/moose | python/mooseutils/message.py | 4 | 3962 | import os
import traceback
from mooseutils import colorText
try:
from PyQt5 import QtWidgets, QtCore
MOOSE_USE_QT5 = True
except:
MOOSE_USE_QT5 = False
"""
Global for enabling/disabling debug mode.
"""
MOOSE_DEBUG_MODE = os.environ.get("MOOSE_PYTHON_DEBUG_MODE") == "1"
"""
Global for enabling/disabling t... | lgpl-2.1 | 270,579,507,329,784,160 | 32.576271 | 128 | 0.617113 | false |
wbardzinski/boo | lib/antlr-2.7.5/examples/python/transform/transform.py | 21 | 1906 | import sys
import antlr
class Visitor(antlr.ASTVisitor):
def __init__(self,*args):
super(Visitor,self).__init__(*args)
self.level = 0
if not args:
self.cout = sys.stdout
return
if isinstance(args[0],file):
self.cout = args[0]
return
assert 0
... | bsd-3-clause | 2,495,115,237,138,690,000 | 19.276596 | 46 | 0.5383 | false |
Krossom/python-for-android | python3-alpha/python3-src/Lib/tkinter/colorchooser.py | 128 | 1793 | # tk common colour chooser dialogue
#
# this module provides an interface to the native color dialogue
# available in Tk 4.2 and newer.
#
# written by Fredrik Lundh, May 1997
#
# fixed initialcolor handling in August 1998
#
#
# options (all have default values):
#
# - initialcolor: colour to mark as selected when dial... | apache-2.0 | 4,391,824,875,301,953,000 | 23.902778 | 70 | 0.607362 | false |
huard/scipy-work | scipy/sparse/linalg/dsolve/umfpack/umfpack.py | 2 | 23373 | """
Interface to the UMFPACK library.
--
Author: Robert Cimrman
"""
#from base import Struct, pause
import numpy as np
import scipy.sparse as sp
import re
try: # Silence import error.
import _umfpack as _um
except:
_um = None
assumeSortedIndices = False
##
# 10.01.2006, c
def configure( **kwargs ):
"""... | bsd-3-clause | -3,374,012,773,880,658,400 | 31.827247 | 88 | 0.53027 | false |
jhg/django | django/contrib/gis/db/backends/postgis/operations.py | 7 | 15047 | import re
from django.conf import settings
from django.contrib.gis.db.backends.base.operations import \
BaseSpatialOperations
from django.contrib.gis.db.backends.postgis.adapter import PostGISAdapter
from django.contrib.gis.db.backends.utils import SpatialOperator
from django.contrib.gis.geometry.backend import Ge... | bsd-3-clause | 904,794,644,061,299,300 | 40.68144 | 107 | 0.608095 | false |
freyley/trello-traceability | cmds.py | 1 | 10762 | #!/usr/bin/env python
import pickle
import sys
from datetime import timedelta, datetime
import dateutil
import pytz
import models, trellointerface
def make_db():
models.main()
def fill_db():
trellointerface.main()
def test_conn():
import settings
from trello import TrelloClient
trelloclient = T... | agpl-3.0 | -5,345,407,224,313,717,000 | 43.655602 | 180 | 0.597194 | false |
maartenq/ansible | lib/ansible/modules/network/avi/avi_network.py | 20 | 4997 | #!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
# Avi Version: 17.1.1
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses... | gpl-3.0 | -350,158,778,468,453,000 | 32.092715 | 126 | 0.611767 | false |
andyvand/cygsystem-config-llvm | src/InputController.py | 1 | 100355 | """This class represents the primary controller interface
for the LVM UI application.
"""
import string
import os
import re
import stat
import os.path
import gobject
from lvm_model import lvm_model
from CommandHandler import CommandHandler
from lvmui_constants import *
from CommandError import CommandError
import ... | gpl-2.0 | -661,362,197,953,986,600 | 42.015431 | 401 | 0.559245 | false |
av8ramit/tensorflow | tensorflow/contrib/framework/python/ops/accumulate_n_v2.py | 3 | 4363 | # 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 | 3,329,057,445,318,795,300 | 38.306306 | 80 | 0.67041 | false |
ddico/sale-workflow | sale_properties_dynamic_fields/__init__.py | 15 | 1047 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-15 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... | agpl-3.0 | -3,072,007,925,824,498,700 | 42.625 | 78 | 0.608405 | false |
funtoo/portage-funtoo | bin/dohtml.py | 1 | 6296 | #!/usr/bin/python
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# Typical usage:
# dohtml -r docs/*
# - put all files and directories in docs into /usr/share/doc/${PF}/html
# dohtml foo.html
# - put foo.html into /usr/share/doc/${PF}/html
#
#
# Detailed ... | gpl-2.0 | -243,913,840,125,863,680 | 29.862745 | 124 | 0.644377 | false |
anand-c-goog/tensorflow | tensorflow/contrib/rnn/python/kernel_tests/rnn_cell_test.py | 4 | 34623 | # 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 | -455,738,782,028,795,970 | 46.887967 | 80 | 0.549548 | false |
gburd/dbsql | src/py/misc/lru.py | 1 | 5206 | #-*- coding: ISO-8859-1 -*-
#
# DBSQL - A SQL database engine.
#
# Copyright (C) 2007-2008 The DBSQL Group, Inc. - All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public
# License as published by the Free Software Foundation;... | gpl-3.0 | -7,226,144,713,881,507,000 | 33.657534 | 134 | 0.516135 | false |
emineKoc/WiseWit | wisewit_front_end/node_modules/pygmentize-bundled/vendor/pygments/external/markdown-processor.py | 42 | 2041 | # -*- coding: utf-8 -*-
"""
The Pygments Markdown Preprocessor
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This fragment is a Markdown_ preprocessor that renders source code
to HTML via Pygments. To use it, invoke Markdown like so::
import markdown
html = markdown.markdown(someText, extension... | gpl-3.0 | -4,268,316,988,149,691,400 | 29.462687 | 88 | 0.644292 | false |
BenSto/pybikes | pybikes/keolis.py | 1 | 8806 | # -*- coding: utf-8 -*-
# Copyright (C) 2010-2012, eskerda <eskerda@gmail.com>
# Distributed under the AGPL license, see LICENSE.txt
import re
import json
from lxml import etree
import lxml.html
from .base import BikeShareSystem, BikeShareStation
from . import utils
xml_parser = etree.XMLParser(recover = True)
_re... | lgpl-3.0 | 1,940,034,154,309,682,200 | 33.252918 | 106 | 0.536522 | false |
pprett/statsmodels | statsmodels/sandbox/utils_old.py | 6 | 4092 | import numpy as np
import numpy.linalg as L
import scipy.interpolate
import scipy.linalg
__docformat__ = 'restructuredtext'
def recipr(X):
"""
Return the reciprocal of an array, setting all entries less than or
equal to 0 to 0. Therefore, it presumes that X should be positive in
general.
"""
x... | bsd-3-clause | 2,588,370,655,548,307,500 | 25.4 | 83 | 0.572825 | false |
jezdez/kuma | kuma/core/helpers.py | 3 | 10377 | import datetime
import HTMLParser
import json
import urllib
import bleach
import jinja2
import pytz
from babel import localedata
from babel.dates import format_date, format_datetime, format_time
from babel.numbers import format_decimal
from django.conf import settings
from django.contrib.messages.storage.base import L... | mpl-2.0 | -76,533,547,199,793,220 | 30.445455 | 79 | 0.630818 | false |
invenfantasy/software-factory | tools/sfmigration/examples/from_csv/export_issues.py | 1 | 2858 | #!/usr/bin/python
#
# Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# 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 r... | apache-2.0 | 8,085,852,480,952,090,000 | 37.621622 | 75 | 0.59972 | false |
pdebuyl/numpy | numpy/lib/_datasource.py | 7 | 22792 | """A file interface for handling local and remote data files.
The goal of datasource is to abstract some of the file system operations
when dealing with data files so the researcher doesn't have to know all the
low-level details. Through datasource, a researcher can obtain and use a
file with one function call, regar... | bsd-3-clause | -2,557,301,246,969,299,500 | 31.283286 | 80 | 0.584591 | false |
amanwriter/vyked | vyked/__init__.py | 1 | 1035 | __all__ = ['Host', 'TCPServiceClient', 'TCPService', 'HTTPService', 'HTTPServiceClient', 'api', 'request', 'subscribe',
'publish', 'xsubscribe', 'get', 'post', 'head', 'put', 'patch', 'delete', 'options', 'trace',
'Registry', 'RequestException', 'Response', 'Request', 'log', 'setup_logging',
... | mit | 6,902,178,428,097,031,000 | 63.6875 | 119 | 0.697585 | false |
jpbarraca/dRonin | python/ins/compare.py | 11 | 5497 | from cins import CINS
from pyins import PyINS
import unittest
from sympy import symbols, lambdify, sqrt
from sympy import MatrixSymbol, Matrix
from numpy import cos, sin, power
from sympy.matrices import *
from quaternions import *
import numpy
import math
import ins
VISUALIZE = False
class CompareFunctions(unittest... | gpl-3.0 | 5,129,304,335,787,355,000 | 30.780347 | 69 | 0.538112 | false |
TridevGuha/pywikibot-core | tests/isbn_tests.py | 2 | 8730 | # -*- coding: utf-8 -*-
"""Tests for isbn script."""
#
# (C) Pywikibot team, 2014-2015
#
# Distributed under the terms of the MIT license.
#
from __future__ import unicode_literals
import pywikibot
__version__ = '$Id$'
from pywikibot import Bot, Claim, ItemPage
from pywikibot.cosmetic_changes import CosmeticChanges... | mit | 1,830,913,979,204,939,000 | 35.991525 | 90 | 0.604353 | false |
tmylk/seldon-server | external/predictor/python/docker/vw_runtime/scripts/server.py | 2 | 1223 | import importlib
from flask import Flask, jsonify
from flask import request
app = Flask(__name__)
import json
import pprint
app.config.from_object('server_config')
_recs_mod = importlib.import_module(app.config['PREDICTION_ALG'])
def extract_input():
client = request.args.get('client')
j = json.loads(request.... | apache-2.0 | -8,166,791,802,808,382,000 | 24.479167 | 66 | 0.623876 | false |
miloszz/DIRAC | WorkloadManagementSystem/Agent/ThreadedMightyOptimizer.py | 7 | 10737 | ########################################################################
# $HeadURL$
# File : ThreadedMightyOptimizer.py
# Author : Adria Casajus
########################################################################
"""
SuperOptimizer
One optimizer to rule them all, one optimizer to find them,
one optimizer ... | gpl-3.0 | 209,051,821,181,226,140 | 36.673684 | 111 | 0.600447 | false |
EtienneOz/WebfontGenerator | scour/yocto_css.py | 8 | 2872 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# yocto-css, an extremely bare minimum CSS parser
#
# Copyright 2009 Jeff Schiller
#
# This file is part of Scour, http://www.codedread.com/scour/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance wi... | gpl-2.0 | 5,877,176,446,397,554,000 | 38.888889 | 79 | 0.652855 | false |
krader1961/python-mode | pymode/libs/astroid/scoped_nodes.py | 8 | 52820 | # copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of astroid.
#
# astroid 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
#... | lgpl-3.0 | -3,886,903,257,581,166,000 | 34.592992 | 90 | 0.558368 | false |
harisbal/pandas | pandas/tests/series/test_sorting.py | 2 | 9605 | # coding=utf-8
import random
import numpy as np
import pytest
from pandas import Categorical, DataFrame, IntervalIndex, MultiIndex, Series
import pandas.util.testing as tm
from pandas.util.testing import assert_almost_equal, assert_series_equal
from .common import TestData
class TestSeriesSorting(TestData):
... | bsd-3-clause | -8,371,191,273,254,857,000 | 36.084942 | 78 | 0.568246 | false |
citrix-openstack-build/nova | nova/tests/api/openstack/compute/contrib/test_certificates.py | 11 | 2810 | # Copyright (c) 2012 OpenStack Foundation
# 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 ... | apache-2.0 | -1,903,622,883,617,369,000 | 35.493506 | 78 | 0.672242 | false |
ns950/calibre | src/calibre/gui2/tweak_book/completion/worker.py | 14 | 7340 | #!/usr/bin/env python2
# vim:fileencoding=utf-8
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>'
import cPickle, os, sys
from threading import Thread, Event, Lock
from Queue... | gpl-3.0 | -4,758,162,357,571,931,000 | 34.288462 | 118 | 0.594823 | false |
cloudnull/ansible-modules-core | cloud/google/gce_lb.py | 9 | 12216 | #!/usr/bin/python
# Copyright 2013 Google Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later vers... | gpl-3.0 | 517,273,460,745,364,200 | 35.357143 | 93 | 0.615914 | false |
nullishzero/Portage | pym/portage/tests/unicode/test_string_format.py | 11 | 3238 | # Copyright 2010-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import unicode_literals
import sys
from portage import _encodings, _unicode_encode
from portage.exception import PortageException
from portage.tests import TestCase
from _emerge.DependencyArg im... | gpl-2.0 | 3,093,918,245,920,799,000 | 28.981481 | 75 | 0.701359 | false |
dynm/miasm | test/arch/aarch64/unit/asm_test.py | 5 | 1790 | #! /usr/bin/env python
import sys
import os
from miasm2.core.cpu import parse_ast
from miasm2.arch.aarch64.arch import mn_aarch64, base_expr, variable
from miasm2.core import parse_asm
from miasm2.expression.expression import *
from miasm2.core import asmbloc
from elfesteem.strpatchwork import StrPatchwork
from miasm2... | gpl-2.0 | -7,165,890,506,159,838,000 | 26.96875 | 94 | 0.643017 | false |
piyush0609/scipy | scipy/ndimage/interpolation.py | 36 | 26949 | # Copyright (C) 2003-2005 Peter J. Verveer
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following d... | bsd-3-clause | 354,336,398,864,894,400 | 37.27983 | 79 | 0.625997 | false |
Maillol/cricri | cricri/algo.py | 2 | 3076 | """
A collection of functions to perform operation on containers.
"""
from collections import defaultdict
def find_loop(graph):
"""
Find loop in *graph*
"""
loops_from_start = defaultdict(list)
def _walk(graph, start, end, visited_nodes, path):
"""
Find all pathes between *star... | gpl-3.0 | -1,602,775,323,397,272,000 | 26.464286 | 69 | 0.536736 | false |
lykops/lykops | library/connecter/ansible/callback/read.py | 1 | 14475 | import logging
from library.connecter.database.mongo import Op_Mongo
from library.utils.time_conv import timestamp2datetime
class Parse_Cblog():
def __init__(self, oper, log_router=False, mongoclient=None):
'''
根据condition_dict读取所有的callback日志
:parm
condition_dict:查询条件
... | apache-2.0 | -31,646,538,662,069,950 | 41.16358 | 157 | 0.436791 | false |
RiccardoRossi/pyKratos | pyKratos/triangle.py | 3 | 2711 | from __future__ import print_function, absolute_import, division
import math
from numpy import *
class Triangle:
def __init__(self, node_list):
if(len(node_list) != 3):
raise Exception("wrong number of nodes! should be 3!!")
self.nodes = node_list
for node in self.nodes:
... | bsd-2-clause | -4,895,764,524,958,060,000 | 34.207792 | 110 | 0.568056 | false |
r0x73/django-template | hooks/post_gen_project.py | 1 | 2145 | #!/usr/bin/env python
import os
import shutil
def install_drifter():
os.system('git init .')
os.system('curl -sS https://raw.githubusercontent.com/liip/drifter/master/install.sh | /bin/bash')
def set_parameter(path, key, value):
patched_lines = []
parameter_exists = False
with open(path) as f:... | mit | -3,953,665,156,925,937,700 | 30.544118 | 137 | 0.618648 | false |
mdavid/horizon | openstack_dashboard/dashboards/project/instances/workflows/resize_instance.py | 56 | 4103 | # Copyright 2013 CentRin Data, 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... | apache-2.0 | 590,134,987,125,771,900 | 38.451923 | 79 | 0.648062 | false |
jeremycline/pulp | server/test/unit/server/managers/repo/test_unit_association.py | 5 | 21452 | import mock
from .... import base
from pulp.devel import mock_plugins
from pulp.plugins.conduits.unit_import import ImportUnitConduit
from pulp.plugins.config import PluginCallConfiguration
from pulp.plugins.model import Unit
from pulp.plugins.types import database, model
from pulp.server.db import model as me_model
f... | gpl-2.0 | 2,821,766,446,309,598,700 | 48.657407 | 99 | 0.658167 | false |
viraintel/OWASP-Nettacker | lib/brute/smtp/engine.py | 1 | 13303 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import threading
import time
import socks
import socket
import smtplib
import json
import string
import random
import os
from core.alert import *
from core.targets import target_type
from core.targets import target_to_host
from core.load_modules import load_file_path
from ... | apache-2.0 | -7,298,699,669,627,891,000 | 43.343333 | 122 | 0.496655 | false |
arbrandes/edx-platform | lms/djangoapps/commerce/management/commands/tests/test_create_orders_for_old_enterprise_course_enrollmnet.py | 4 | 4541 | """
Test the create_orders_for_old_enterprise_course_enrollment management command
"""
import re
from io import StringIO
from unittest.mock import patch
from django.core.management import call_command
from django.test import TestCase, override_settings
from common.djangoapps.course_modes.models import CourseMode
fro... | agpl-3.0 | 7,827,564,943,324,703,000 | 45.336735 | 120 | 0.692138 | false |
Aravinthu/odoo | addons/product/models/res_config_settings.py | 11 | 2086 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
company_share_product = fields.Boolean(
'Share product to all companies',
h... | agpl-3.0 | 9,105,499,386,824,484,000 | 49.878049 | 168 | 0.691275 | false |
radical-software/mongo-mail-web | mongo_mail_web/utils.py | 1 | 5870 | # -*- coding: utf-8 -*-
import operator
import base64
import zlib
import json
import re
import logging
from datetime import datetime
from email.utils import parseaddr
from IPy import IP
from dateutil import tz
from . import constants
logger = logging.getLogger(__name__)
reg_received = re.compile(r'^.*\[(?P<host_ip... | bsd-3-clause | 2,407,284,289,076,300,300 | 24.814978 | 105 | 0.535154 | false |
AlCap23/Thesis | Python/Algorithms.py | 1 | 20278 | # coding: utf8
"""
Contains the Python package for Algorithm used
"""
# Import numpy
import numpy as np
# Step Information of SISO system
def Step_Info(y,t, p=0.02, yr = 1):
"""
Returns the Rise Time, Overshoot, Settling Time and Steady State
of a given signal. Requires y, yr, t and optional a percen... | gpl-3.0 | 744,544,014,905,445,900 | 32.236066 | 156 | 0.535836 | false |
awni/tensorflow | tensorflow/tensorboard/backend/server.py | 4 | 5850 | # Copyright 2015 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... | apache-2.0 | -8,770,988,719,488,214,000 | 33.210526 | 80 | 0.698632 | false |
lonnen/socorro | webapp-django/crashstats/signature/tests/test_views.py | 1 | 32115 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import json
from urllib.parse import quote
import mock
import pyquery
from django.urls import reverse
from django.util... | mpl-2.0 | 2,714,568,946,903,695,400 | 36.737955 | 91 | 0.422077 | false |
leighpauls/k2cro4 | third_party/python_26/Lib/site-packages/pythonwin/pywin/idle/IdleHistory.py | 20 | 3101 | import string
class History:
def __init__(self, text, output_sep = "\n"):
self.text = text
self.history = []
self.history_prefix = None
self.history_pointer = None
self.output_sep = output_sep
text.bind("<<history-previous>>", self.history_prev)
text.bind("<... | bsd-3-clause | 1,576,524,727,443,946,200 | 33.842697 | 77 | 0.530474 | false |
spnow/grr | lib/test_lib.py | 1 | 60900 | #!/usr/bin/env python
"""A library for tests."""
import codecs
import functools
import itertools
import os
import pdb
import re
import shutil
import signal
import socket
import StringIO
import subprocess
import sys
import tempfile
import threading
import time
import unittest
from M2Crypto import X509
from seleniu... | apache-2.0 | -9,088,753,942,586,523,000 | 30.934976 | 82 | 0.647488 | false |
renyi533/tensorflow | tensorflow/python/profiler/model_analyzer.py | 8 | 15063 | # 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 | 1,639,094,313,660,654,300 | 34.864286 | 101 | 0.666069 | false |
houqp/iris-api | test/e2etest.py | 1 | 90181 | #!/usr/bin/env python
# Copyright (c) LinkedIn Corporation. All rights reserved. Licensed under the BSD-2 Clause license.
# See LICENSE in the project root for license information.
# -*- coding:utf-8 -*-
import pytest
import json
import requests
import copy
import iris.bin.iris_ctl as iris_ctl
from click.testing imp... | bsd-2-clause | -1,747,274,331,694,743,600 | 37.60488 | 178 | 0.595624 | false |
derekjchow/models | research/brain_coder/common/rollout.py | 5 | 12091 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
"""Utilities related to computing training batches from episode rollouts.
Implementations here are based on code from Open AI:
https://github.com/openai/universe-starter-agent/blob/master/a3c.py.
"""
from col... | apache-2.0 | -660,331,608,922,952,800 | 38.513072 | 80 | 0.680341 | false |
senarvi/theanolm | theanolm/scoring/textscorer.py | 1 | 18475 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""A module that implements the TextScorer class.
"""
import logging
import numpy
import theano
import theano.tensor as tensor
from theanolm.backend import NumberError
from theanolm.backend import test_value
from theanolm.parsing import utterance_from_line
class TextSc... | apache-2.0 | -205,964,645,865,236,260 | 46.615979 | 85 | 0.593126 | false |
dhimmel/seaborn | seaborn/external/husl.py | 35 | 6661 | import operator
import math
__version__ = "2.1.0"
m = [
[3.2406, -1.5372, -0.4986],
[-0.9689, 1.8758, 0.0415],
[0.0557, -0.2040, 1.0570]
]
m_inv = [
[0.4124, 0.3576, 0.1805],
[0.2126, 0.7152, 0.0722],
[0.0193, 0.1192, 0.9505]
]
# Hard-coded D65 illuminant
refX = 0.95047
refY = 1.00000
refZ ... | bsd-3-clause | -4,404,592,821,798,283,000 | 20.28115 | 89 | 0.498724 | false |
garbled1/ansible | lib/ansible/modules/identity/ipa/ipa_dnszone.py | 16 | 4987 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Fran Fitzpatrick (francis.x.fitzpatrick@gmail.com)
# Borrowed heavily from other work by Abhijeet Kasurde (akasurde@redhat.com)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_i... | gpl-3.0 | 729,071,680,670,470,300 | 26.401099 | 103 | 0.602767 | false |
mrares/incubator-airflow | airflow/contrib/hooks/databricks_hook.py | 16 | 8287 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | apache-2.0 | 1,151,514,850,815,017,200 | 36.328829 | 89 | 0.603596 | false |
scotwk/cloud-custodian | tests/test_policy.py | 2 | 21345 | # Copyright 2015-2017 Capital One Services, LLC
#
# 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 ... | apache-2.0 | 2,344,467,737,883,790,300 | 34.39801 | 104 | 0.495573 | false |
akhmadMizkat/odoo | addons/website_event_sale/models/sale_order.py | 1 | 5121 | # -*- coding: utf-8 -*-
from openerp import SUPERUSER_ID, api
from openerp.osv import osv
from openerp.tools.translate import _
from openerp.exceptions import UserError
class sale_order(osv.Model):
_inherit = "sale.order"
@api.multi
def _cart_find_product_line(self, product_id=None, line_id=None, **kwarg... | gpl-3.0 | 4,871,151,628,124,415,000 | 48.718447 | 149 | 0.59422 | false |
jaimahajan1997/sympy | sympy/utilities/decorator.py | 17 | 6353 | """Useful utility decorators. """
from __future__ import print_function, division
import sys
import types
import inspect
from functools import update_wrapper
from sympy.core.decorators import wraps
from sympy.core.compatibility import class_types, get_function_globals, get_function_name, iterable
def threaded_fact... | bsd-3-clause | -3,076,124,693,571,021,300 | 29.690821 | 99 | 0.614513 | false |
SnappleCap/oh-mainline | vendor/packages/sphinx/sphinx/util/console.py | 16 | 2430 | # -*- coding: utf-8 -*-
"""
sphinx.util.console
~~~~~~~~~~~~~~~~~~~
Format colored console output.
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import os
import sys
import re
_ansi_re = re.compile('\x1b\\[(\\d\\d;){0,2}\\d\\dm')
cod... | agpl-3.0 | -2,138,386,143,499,903,700 | 23.059406 | 79 | 0.55679 | false |
JioCloud/nova_test_latest | nova/virt/libvirt/volume/fibrechannel.py | 5 | 3175 | # 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 | -911,435,707,571,293,300 | 40.776316 | 78 | 0.666772 | false |
vivek-bala/radical.entk-0.6 | src/radical/entk/pipeline/pipeline.py | 2 | 5917 | import radical.utils as ru
from radical.entk.exceptions import *
from radical.entk.stage.stage import Stage
import threading
from radical.entk import states
class Pipeline(object):
"""
A pipeline represents a collection of objects that have a linear temporal execution order.
In this case, a pipeline cons... | mit | -7,714,318,281,532,125,000 | 22.577689 | 102 | 0.524759 | false |
KerkhoffTechnologies/shinken | shinken/misc/datamanager.py | 17 | 12704 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
# This file is part of Shinken.
#
# Shinken is free software: you can redis... | agpl-3.0 | -1,641,608,022,287,670,500 | 35.505747 | 100 | 0.578322 | false |
stephane-martin/salt-debian-packaging | salt-2016.3.3/salt/utils/yamlencoding.py | 3 | 1477 | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
import io
# Import 3rd-party libs
import yaml
import salt.ext.six as six
def yaml_dquote(text):
'''
Make text into a double-quoted YAML string with correct escaping
for special characters. Includes the opening and closi... | apache-2.0 | -1,531,240,202,982,533,600 | 25.854545 | 75 | 0.654705 | false |
infobloxopen/infoblox-netmri | infoblox_netmri/api/broker/v3_6_0/apic_setting_broker.py | 5 | 2774 | from ..broker import Broker
class ApicSettingBroker(Broker):
controller = "apic_settings"
def index(self, **kwargs):
"""This method is no longer exists. Please use such method from SDN Settings
**Inputs**
**Outputs**
"""
return self.api_request(self._ge... | apache-2.0 | -4,035,939,897,109,853,700 | 23.121739 | 91 | 0.566691 | false |
fosJoddie/PokeAlarm | PokeAlarm/Filters/StopFilter.py | 1 | 2372 | # Standard Library Imports
import operator
# 3rd Party Imports
# Local Imports
from . import BaseFilter
class StopFilter(BaseFilter):
""" Filter class for limiting which stops trigger a notification. """
def __init__(self, name, data):
""" Initializes base parameters for a filter. """
super(S... | agpl-3.0 | 302,555,712,462,100,700 | 34.402985 | 76 | 0.591906 | false |
isnnn/Sick-Beard-TPB | lib/subliminal/language.py | 23 | 54744 | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of subliminal.
#
# subliminal 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... | gpl-3.0 | 5,969,076,717,839,732,000 | 51.110687 | 184 | 0.444847 | false |
dkodnik/arp | addons/web_linkedin/web_linkedin.py | 2 | 4484 | # -*- 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 | -8,493,009,703,946,995,000 | 47.73913 | 204 | 0.600803 | false |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.5/Lib/bsddb/test/test_pickle.py | 11 | 2172 |
import sys, os, string
import pickle
try:
import cPickle
except ImportError:
cPickle = None
import unittest
import glob
try:
# For Pythons w/distutils pybsddb
from bsddb3 import db
except ImportError, e:
# For Python 2.3
from bsddb import db
#-------------------------------------------------... | mit | 7,992,853,783,927,926,000 | 27.96 | 74 | 0.555709 | false |
mstzn36/django-river | river/handlers/backends/memory.py | 2 | 1275 | import logging
from river.handlers.backends.base import BaseHandlerBackend, powerset
__author__ = 'ahmetdal'
LOGGER = logging.getLogger(__name__)
class MemoryHandlerBackend(BaseHandlerBackend):
def __init__(self):
self.handlers = {}
def register(self, handler_cls, handler, workflow_object, field, o... | gpl-3.0 | -4,589,561,749,836,278,300 | 41.5 | 145 | 0.62902 | false |
kustodian/ansible | lib/ansible/modules/cloud/vmware/_vmware_host_feature_facts.py | 21 | 4460 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata_... | gpl-3.0 | 2,509,361,652,908,296,000 | 29.340136 | 138 | 0.630269 | false |
hlzz/dotfiles | graphics/VTK-7.0.0/ThirdParty/Twisted/twisted/scripts/tapconvert.py | 2 | 2202 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
import sys, getpass
from twisted.python import usage
from twisted.application import app
from twisted.persisted import sob
class ConvertOptions(usage.Options):
synopsis = "Usage: tapconvert [options]"
optParameters = [
... | bsd-3-clause | -3,698,512,672,166,080,000 | 36.631579 | 80 | 0.509991 | 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.