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 |
|---|---|---|---|---|---|---|---|---|---|---|
wyc/django | tests/validators/tests.py | 163 | 16552 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import io
import os
import re
import types
from datetime import datetime, timedelta
from unittest import TestCase
from django.core.exceptions import ValidationError
from django.core.validators import (
BaseValidator, EmailValidator, MaxLengthValidato... | bsd-3-clause | -5,125,942,356,367,970,000 | 39.967742 | 111 | 0.625803 | false |
ChameleonCloud/blazar | blazar/api/v1/devices/service.py | 1 | 3761 | # Copyright (c) 2018 StackHPC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -2,012,768,296,698,272,300 | 32.882883 | 74 | 0.646637 | false |
mosquito/Tornado-MySQL | tornado_mysql/__init__.py | 5 | 4381 | '''
Tornado-MySQL: A pure-Python MySQL client library for Tornado.
Copyright (c) 2010, 2013-2014 PyMySQL contributors
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, includin... | mit | 4,824,595,495,012,804,000 | 35.206612 | 80 | 0.691395 | false |
lupyuen/RaspberryPiImage | home/pi/GrovePi/Software/Python/others/temboo/Library/Xively/Products/ListAllProducts.py | 5 | 2970 | # -*- coding: utf-8 -*-
###############################################################################
#
# ListAllProducts
# Returns a JSON representation of all products associated with the specified APIKey.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Vers... | apache-2.0 | -3,842,077,072,901,661,700 | 35.219512 | 115 | 0.683165 | false |
AcademicsToday/academicstoday-django | academicstoday_project/teacher/views/policy.py | 3 | 2947 | from django.shortcuts import render
from django.core import serializers
from django.http import HttpResponse
from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.conf import settings
import json
impo... | apache-2.0 | 5,513,394,228,056,317,000 | 39.930556 | 94 | 0.635562 | false |
jluissandovalm/smd_lammps | python/lammps.py | 4 | 6759 | # ----------------------------------------------------------------------
# LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
# http://lammps.sandia.gov, Sandia National Laboratories
# Steve Plimpton, sjplimp@sandia.gov
#
# Copyright (2003) Sandia Corporation. Under the terms of Contract
# DE... | gpl-2.0 | -4,931,903,242,028,885,000 | 35.535135 | 78 | 0.65557 | false |
provaleks/o8 | addons/account_bank_statement_extensions/__init__.py | 442 | 1153 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it u... | agpl-3.0 | 5,965,669,430,086,254,000 | 40.178571 | 78 | 0.630529 | false |
verdel/flexget-lostfilm-plugin | setup.py | 1 | 1285 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Parse the version from the lostfilm module.
with open('extras/__init__.py') as f:
for line in f:
if line.find("__version__") ... | mit | 9,194,988,264,443,540,000 | 27.555556 | 76 | 0.634241 | false |
burzillibus/RobHome | venv/lib/python2.7/site-packages/werkzeug/debug/__init__.py | 90 | 17266 | # -*- coding: utf-8 -*-
"""
werkzeug.debug
~~~~~~~~~~~~~~
WSGI application traceback debugger.
:copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import os
import re
import sys
import uuid
import json
import time
import getpass... | mit | -8,915,795,349,291,818,000 | 36.051502 | 81 | 0.567068 | false |
wacrea/DBStatusREST-nodejs | node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py | 13 | 52358 | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This module contains classes that help to emulate xcodebuild behavior on top of
other build systems, such as make and ninja.
"""
import copy
import gyp.common... | mit | 5,471,144,569,095,122,000 | 38.907012 | 191 | 0.658849 | false |
FIWARE-TMForum/business-ecosystem-charging-backend | src/wstore/tests.py | 1 | 10861 | # -*- coding: utf-8 -*-
# Copyright (c) 2013 - 2017 CoNWeT Lab., Universidad Politécnica de Madrid
# This file belongs to the business-charging-backend
# of the Business API Ecosystem.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License... | agpl-3.0 | -6,385,641,237,166,292,000 | 41.924901 | 168 | 0.628729 | false |
twamarc/schemaorg | lib/html5lib/filters/formfiller.py | 135 | 5839 | #
# The goal is to finally have a form filler where you pass data for
# each form, using the algorithm for "Seeding a form with initial values"
# See http://www.whatwg.org/specs/web-forms/current-work/#seeding
#
import _base
from html5lib.constants import spaceCharacters
spaceCharacters = u"".join(spaceCharacters)
c... | apache-2.0 | -4,569,825,233,457,796,600 | 44.976378 | 110 | 0.432437 | false |
stack-of-tasks/rbdlpy | tutorial/lib/python2.7/site-packages/OpenGLContext/scenegraph/text/fontstyle3d.py | 2 | 2726 | """FontStyle extensions for OpenGLContext"""
from vrml.vrml97 import basenodes
from vrml import field, node
class FontStyle( basenodes.FontStyle ):
"""FontStyle with ability to specify geometry format"""
PROTO = 'FontStyle'
## #Fields
## style = field.newField( 'style', 'SFString', 0, 'PLAIN')
## topToBottom =... | lgpl-3.0 | 2,166,254,392,853,877,800 | 42.983871 | 81 | 0.655906 | false |
Immortalin/python-for-android | python-modules/twisted/twisted/mail/imap4.py | 49 | 200466 | # -*- test-case-name: twisted.mail.test.test_imap -*-
# Copyright (c) 2001-2010 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
An IMAP4 protocol implementation
@author: Jp Calderone
To do::
Suspend idle timeout while server is processing
Use an async message parser instead of buffering in memory
F... | apache-2.0 | -1,982,068,674,557,868,500 | 33.285274 | 124 | 0.574292 | false |
quinot/ansible | test/units/modules/network/junos/test_junos_scp.py | 48 | 3579 | # (c) 2018 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is dis... | gpl-3.0 | -1,437,760,504,965,081,000 | 37.483871 | 97 | 0.666946 | false |
data-exp-lab/girder | tests/cases/rest_decorator_test.py | 2 | 4358 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware 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 ... | apache-2.0 | -997,408,369,135,927,800 | 35.016529 | 97 | 0.641579 | false |
40223136/2015cdag1man | static/Brython3.1.3-20150514-095342/Lib/colorsys.py | 1066 | 3691 | """Conversion functions between RGB and other color systems.
This modules provides two functions for each color system ABC:
rgb_to_abc(r, g, b) --> a, b, c
abc_to_rgb(a, b, c) --> r, g, b
All inputs and outputs are triples of floats in the range [0.0...1.0]
(with the exception of I and Q, which covers a slightly... | gpl-3.0 | 4,504,556,893,981,540,400 | 22.660256 | 76 | 0.514224 | false |
AlexeyBerezhnoy/lucas | account/models.py | 2 | 4943 | from django.db import models
from django.contrib.auth.models import BaseUserManager, AbstractBaseUser, PermissionsMixin, Permission
from account.validator import validate_name, validate_profession, validate_experience
CATEGORIES = ['A', 'A1', 'B', 'B1', 'BE', 'C', 'C1', 'CE', 'C1E', 'D', 'D1', 'DE', 'D1E', 'M', 'Tm', ... | mit | -1,323,522,861,751,478,000 | 36.401575 | 116 | 0.548421 | false |
clusto/clusto | src/clusto/commands/tree.py | 5 | 4580 | #!/usr/bin/env python
"""Display clusto objects, recursively, with attributes, and/or in color."""
import sys
from itertools import chain
import clusto
from clusto import script_helper
class Colors(object):
"""ANSI color escape sequences class."""
mapping = {'BRIGHT': '\033[1m',
'GREEN': '\... | bsd-3-clause | -3,759,450,553,485,955,000 | 36.235772 | 77 | 0.5631 | false |
palladius/gcloud | packages/gsutil/boto/tests/integration/gs/test_versioning.py | 1 | 9784 | # -*- coding: utf-8 -*-
# Copyright (c) 2012, Google, Inc.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rig... | gpl-3.0 | 7,484,997,843,864,700,000 | 35.507463 | 80 | 0.608545 | false |
dj-on-github/sp800_22_tests | sp800_22_longest_run_ones_in_a_block_test.py | 1 | 3544 | #!/usr/bin/env python
# sp800_22_longest_run_ones_in_a_block_test.pylon
#
# Copyright (C) 2017 David Johnston
# This program is distributed under the terms of the GNU General Public License.
#
# This file is part of sp800_22_tests.
#
# sp800_22_tests is free software: you can redistribute it and/or modify
# it under... | gpl-2.0 | 1,637,660,835,470,682,400 | 28.533333 | 80 | 0.505926 | false |
joopert/home-assistant | homeassistant/components/august/camera.py | 5 | 2038 | """Support for August camera."""
from datetime import timedelta
import requests
from homeassistant.components.camera import Camera
from . import DATA_AUGUST, DEFAULT_TIMEOUT
SCAN_INTERVAL = timedelta(seconds=5)
def setup_platform(hass, config, add_entities, discovery_info=None):
"""Set up August cameras."""
... | apache-2.0 | -6,835,622,814,368,748,000 | 25.815789 | 73 | 0.620216 | false |
Coelhon/MasterRepo.repository | plugin.video.zen/resources/lib/sources/myvideolink.py | 1 | 6153 | # -*- coding: utf-8 -*-
'''
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is dis... | gpl-2.0 | -6,651,590,027,483,761,000 | 32.445652 | 161 | 0.615797 | false |
MaximNevrov/neutron | neutron/agent/l3/ha.py | 6 | 7240 | # Copyright (c) 2014 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 | 8,876,409,498,051,227,000 | 39.446927 | 78 | 0.619613 | false |
iulian787/spack | lib/spack/spack/test/cmd/print_shell_vars.py | 5 | 1315 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.main import print_setup_info
def test_print_shell_vars_sh(capsys):
print_setup_info('sh')
out, _ = ca... | lgpl-2.1 | 4,076,947,051,762,753,500 | 27.586957 | 73 | 0.651711 | false |
makaimc/video-service-django | twilio/util.py | 47 | 5420 | import base64
import hmac
import time
from hashlib import sha1
from . import jwt
from .compat import izip, urlencode
from six import iteritems, PY3
class RequestValidator(object):
def __init__(self, token):
self.token = token.encode("utf-8")
def compute_signature(self, uri, params, utf=PY3):
... | mit | 3,261,392,075,735,235,600 | 31.650602 | 79 | 0.598893 | false |
QuantCrimAtLeeds/PredictCode | open_cp/gui/tk/tooltips.py | 1 | 4717 | """
tooltips
~~~~~~~~
Simple way to add tooltips to a widget.
Idea from https://stackoverflow.com/questions/3221956/what-is-the-simplest-way-to-make-tooltips-in-tkinter
"""
import datetime
import tkinter as tk
import tkinter.ttk as ttk
class ToolTip():
"""Class to display a tooltip over a widget. Works by moni... | artistic-2.0 | 2,321,599,096,371,095,600 | 31.944056 | 106 | 0.601995 | false |
vrenaville/OCB | addons/l10n_fr/report/__init__.py | 424 | 1475 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
#... | agpl-3.0 | 7,190,044,201,974,207,000 | 42.382353 | 80 | 0.692881 | false |
infobloxopen/infoblox-netmri | infoblox_netmri/api/broker/v2_4_0/vlan_member_broker.py | 16 | 106771 | from ..broker import Broker
class VlanMemberBroker(Broker):
controller = "vlan_members"
def show(self, **kwargs):
"""Shows the details for the specified vlan member.
**Inputs**
| ``api version min:`` None
| ``api version max:`` None
| ``required:``... | apache-2.0 | -5,892,255,233,927,924,000 | 56.311326 | 877 | 0.62162 | false |
dhanunjaya/neutron | neutron/tests/api/test_networks.py | 28 | 29625 | # Copyright 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 requ... | apache-2.0 | -6,418,888,369,537,215,000 | 42.823964 | 79 | 0.600034 | false |
bajibabu/merlin | src/work_in_progress/oliver/run_tpdnn.py | 2 | 101142 |
import pickle
import gzip
import os, sys, errno
import time
import math
# numpy & theano imports need to be done in this order (only for some numpy installations, not sure why)
import numpy
# we need to explicitly import this in some cases, not sure why this doesn't get imported with numpy itself
import numpy.distut... | apache-2.0 | 6,635,321,083,287,819,000 | 47.347036 | 307 | 0.6305 | false |
Antiun/odoo | addons/l10n_in_hr_payroll/report/payment_advice_report.py | 340 | 3967 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 | -416,073,198,655,930,240 | 45.127907 | 107 | 0.531132 | false |
XiaosongWei/crosswalk-test-suite | webapi/tct-text-css3-tests/inst.wgt.py | 372 | 6809 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
import string
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PKG_NAME = os.path.basename(SCRIPT_DIR)
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=... | bsd-3-clause | 1,069,218,442,386,364,800 | 28.098291 | 101 | 0.540314 | false |
pdxwebdev/yadapy | yada/lib/python2.7/site-packages/pymongo/mongo_client.py | 5 | 53173 | # Copyright 2009-2015 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you
# may not use this file except in compliance with the License. You
# may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | gpl-3.0 | -4,448,779,946,195,902,500 | 41.985449 | 82 | 0.598161 | false |
Plain-Andy-legacy/android_external_chromium_org | tools/telemetry/telemetry/results/chart_json_output_formatter_unittest.py | 27 | 5330 | # Copyright 2014 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 json
import os
import StringIO
import unittest
from telemetry import benchmark
from telemetry.results import chart_json_output_formatter
from telemet... | bsd-3-clause | -8,541,751,368,531,031,000 | 34.065789 | 80 | 0.678987 | false |
sve-odoo/odoo | addons/l10n_it/__openerp__.py | 165 | 2072 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010
# OpenERP Italian Community (<http://www.openerp-italia.org>)
# Servabit srl
# Agile Business Group sagl
# Domsense srl
# Albato... | agpl-3.0 | 8,370,614,755,481,996,000 | 36 | 79 | 0.595077 | false |
webmasterraj/GaSiProMo | flask/lib/python2.7/site-packages/numpy/lib/tests/test_financial.py | 108 | 6607 | from __future__ import division, absolute_import, print_function
import numpy as np
from numpy.testing import (
run_module_suite, TestCase, assert_, assert_almost_equal,
assert_allclose
)
class TestFinancial(TestCase):
def test_rate(self):
assert_almost_equal(np.rate(10, 0, -3500, 10000),
... | gpl-2.0 | 5,789,683,766,171,504,000 | 39.533742 | 75 | 0.474194 | false |
valkyriesavage/invenio | modules/websubmit/lib/websubmitadmin_regression_tests.py | 13 | 2876 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2006, 2007, 2008, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## Licens... | gpl-2.0 | -5,892,931,274,068,527,000 | 40.681159 | 85 | 0.612309 | false |
brianlsharp/MissionPlanner | Lib/site-packages/scipy/linalg/decomp_svd.py | 53 | 5103 | """SVD decomposition functions."""
import numpy
from numpy import asarray_chkfinite, zeros, r_, diag
from scipy.linalg import calc_lwork
# Local imports.
from misc import LinAlgError, _datacopied
from lapack import get_lapack_funcs
from funcinfo import get_func_info
def svd(a, full_matrices=True, compute_uv=True, o... | gpl-3.0 | -4,514,303,366,934,960,600 | 28.16 | 83 | 0.582403 | false |
nkgilley/home-assistant | tests/components/openalpr_local/test_image_processing.py | 13 | 5024 | """The tests for the openalpr local platform."""
import homeassistant.components.image_processing as ip
from homeassistant.const import ATTR_ENTITY_PICTURE
from homeassistant.core import callback
from homeassistant.setup import setup_component
from tests.async_mock import MagicMock, PropertyMock, patch
from tests.comm... | apache-2.0 | -7,857,119,823,406,754,000 | 32.945946 | 96 | 0.586385 | false |
sprymix/python-dateutil | dateutil/easter.py | 202 | 2611 | # -*- coding: utf-8 -*-
"""
This module offers a generic easter computing method for any given year, using
Western, Orthodox or Julian algorithms.
"""
import datetime
__all__ = ["easter", "EASTER_JULIAN", "EASTER_ORTHODOX", "EASTER_WESTERN"]
EASTER_JULIAN = 1
EASTER_ORTHODOX = 2
EASTER_WESTERN = 3
def easter(year,... | bsd-3-clause | -3,882,127,111,173,648,000 | 28.337079 | 78 | 0.582918 | false |
gitsimon/spadup-lyra | semantics/semantics.py | 1 | 18033 | from abstract_domains.state import State
from core.expressions import BinaryArithmeticOperation, BinaryOperation, BinaryComparisonOperation, UnaryOperation, \
UnaryArithmeticOperation, UnaryBooleanOperation, BinaryBooleanOperation, Input, ListDisplay, Slice, Index, Literal
from core.statements import Statement, Var... | mpl-2.0 | -5,474,059,102,915,564,000 | 41.430588 | 118 | 0.64504 | false |
saurabh6790/tru_app_back | patches/may_2013/p06_make_notes.py | 29 | 1374 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import webnotes, markdown2
def execute():
webnotes.reload_doc("utilities", "doctype", "note")
webnotes.reload_doc("utilities", "doctype", "note_user")
for question in webnotes.conn.sq... | agpl-3.0 | -319,675,217,758,340,800 | 30.953488 | 82 | 0.655022 | false |
t4skforce/pyspider | tests/test_rabbitmq.py | 3 | 2354 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<i@binux.me>
# http://binux.me
# Created on 2014-10-07 10:33:38
import os
import time
import unittest2 as unittest
from pyspider.libs import utils
from pyspider.libs import rabbitmq
@unittest.skip... | apache-2.0 | 6,260,218,198,408,715,000 | 29.467532 | 83 | 0.582694 | false |
alexandrucoman/vbox-nova-driver | nova/tests/unit/scheduler/test_filters.py | 17 | 8491 | # Copyright 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 req... | apache-2.0 | 3,377,377,719,358,005,000 | 41.243781 | 78 | 0.61312 | false |
zerc/django | tests/fixtures/models.py | 230 | 3335 | """
Fixtures.
Fixtures are a way of loading data into the database in bulk. Fixure data
can be stored in any serializable format (including JSON and XML). Fixtures
are identified by name, and are stored in either a directory named 'fixtures'
in the application directory, or in one of the directories named in the
``FIX... | bsd-3-clause | -1,141,854,365,514,636,700 | 28 | 97 | 0.673463 | false |
suku248/nest-simulator | pynest/nest/tests/test_pp_psc_delta.py | 15 | 5883 | # -*- coding: utf-8 -*-
#
# test_pp_psc_delta.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the Licen... | gpl-2.0 | 7,919,704,931,736,660,000 | 28.562814 | 77 | 0.515893 | false |
nickw444/quadcopter | older stuff/Quad/Adafruit-Raspberry-Pi-Python-Code/Adafruit_LEDBackpack/Adafruit_LEDBackpack.py | 3 | 2524 | #!/usr/bin/python
import time
from copy import copy
from Adafruit_I2C import Adafruit_I2C
# ============================================================================
# LEDBackpack Class
# ============================================================================
class LEDBackpack:
i2c = None
# Registers
... | gpl-3.0 | -156,573,479,217,956,220 | 28.011494 | 90 | 0.588748 | false |
rdio/translate-toolkit | storage/versioncontrol/darcs.py | 3 | 3743 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2004-2007 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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... | gpl-2.0 | 7,603,840,691,718,975,000 | 37.989583 | 79 | 0.619289 | false |
utkbansal/kuma | kuma/core/sections.py | 22 | 1158 | from tower import ugettext_lazy as _
class SECTION_ADDONS:
short = 'addons'
pretty = _(u'Add-ons')
twitter = 'twitter-addons'
updates = 'updates-addons'
class SECTION_MOZILLA:
short = 'mozilla'
pretty = _(u'Mozilla')
twitter = 'twitter-mozilla'
updates = 'updates-mozilla'
class SEC... | mpl-2.0 | -5,016,103,342,876,826,000 | 20.054545 | 50 | 0.611399 | false |
zamattiac/SHARE | providers/org/seafdec/__init__.py | 1 | 5263 | default_app_config = 'providers.org.seafdec.apps.AppConfig'
"""
Example record:
<record xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><header><identifier>oai:repository.seafdec.org.ph:10862/143</identifier><datestamp>2016-10-05T13:04:40Z</datestamp><setSpec>com_1086... | apache-2.0 | -3,403,549,368,405,807,000 | 77.552239 | 805 | 0.786434 | false |
pinkavaj/gnuradio | gr-blocks/python/blocks/qa_interleave.py | 47 | 5392 | #!/usr/bin/env python
#
# Copyright 2004,2007,2010,2012-2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or... | gpl-3.0 | 5,343,304,707,381,322,000 | 35.680272 | 74 | 0.603487 | false |
windofthesky/ansible | contrib/inventory/freeipa.py | 95 | 2201 | #!/usr/bin/env python
import argparse
from ipalib import api
import json
def initialize():
'''
This function initializes the FreeIPA/IPA API. This function requires
no arguments. A kerberos key must be present in the users keyring in
order for this to work.
'''
api.bootstrap(context='cli')
... | gpl-3.0 | 8,599,258,657,794,504,000 | 25.518072 | 96 | 0.631077 | false |
rockyzhang/zhangyanhit-python-for-android-mips | python3-alpha/python3-src/Lib/encodings/mac_greek.py | 272 | 13721 | """ Python Character Mapping Codec mac_greek generated from 'MAPPINGS/VENDORS/APPLE/GREEK.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,input,err... | apache-2.0 | -4,477,578,552,149,792,300 | 43.693811 | 112 | 0.547409 | false |
n-west/gnuradio-volk | gr-digital/python/digital/qa_correlate_access_code_tag.py | 33 | 2649 | #!/usr/bin/env python
#
# Copyright 2006,2007,2010,2011,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or... | gpl-3.0 | -204,891,500,096,063,100 | 32.1125 | 85 | 0.620612 | false |
thefinn93/CouchPotatoServer | libs/sqlalchemy/engine/__init__.py | 12 | 15936 | # engine/__init__.py
# Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""SQL connections, SQL execution and high-level DB-API interface.
The engine pack... | gpl-3.0 | 5,023,890,458,977,191,000 | 42.660274 | 89 | 0.684739 | false |
wannabeCitizen/Congress_DCSC | congressionalrecord/lib/xml_annotator.py | 1 | 1321 | from .regex import Regex
class XMLAnnotator(object):
def __init__(self, string):
self.regx = Regex(string)
def register_tag(self, re_string, open_tag, group=None):
''' Registers an XML tag to be inserted around a matching regular
expression. The closing tag is derived from the opening ... | gpl-2.0 | 371,998,958,366,482,240 | 37.852941 | 79 | 0.633611 | false |
WhiskeyMedia/ella | test_ella/test_core/test_publishable.py | 2 | 9193 | # -*- coding: utf-8 -*-
from datetime import timedelta, datetime
import pytz
from test_ella.cases import RedisTestCase as TestCase
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.redirects.models import Redirect
from django.contrib.contenttypes.models import ContentTyp... | bsd-3-clause | 1,073,112,309,211,721,000 | 40.391892 | 133 | 0.682338 | false |
citrix-openstack-build/tempest | tempest/api/compute/test_auth_token.py | 3 | 1732 | # 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.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | -1,739,742,670,837,815,800 | 32.307692 | 78 | 0.691686 | false |
sslavov93/TreasureDungeon | map_validator.py | 1 | 4303 | import os
class MapValidator():
"""Base class. Validates user-created map file"""
def __init__(self, location):
self.map = self.read_file(location)
self.player_spawn = False
self.npc_spawn = False
self.key_present = False
self.chest_present = False
self.rectan... | gpl-2.0 | -5,550,619,049,896,619,000 | 33.98374 | 77 | 0.577039 | false |
kapy2010/treeherder | treeherder/log_parser/tasks.py | 1 | 3773 | import logging
import newrelic.agent
from django.conf import settings
from treeherder.autoclassify.tasks import autoclassify
from treeherder.log_parser.crossreference import crossreference_job
from treeherder.log_parser.utils import post_log_artifacts
from treeherder.model.models import (Job,
... | mpl-2.0 | 1,308,897,110,315,799,600 | 35.631068 | 101 | 0.670819 | false |
Frodox/buildbot | master/buildbot/test/unit/test_plugins.py | 10 | 14759 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-2.0 | 1,634,542,590,424,437,200 | 35.622829 | 79 | 0.647063 | false |
TomasDuro/paparazzi | sw/ground_segment/python/messages_app/messagesframe.py | 20 | 6371 | import wx
import sys
import time
import threading
from os import path, getenv
# if PAPARAZZI_SRC not set, then assume the tree containing this
# file is a reasonable substitute
PPRZ_SRC = getenv("PAPARAZZI_SRC", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../../')))
sys.path.append(PPRZ_SRC ... | gpl-2.0 | -5,535,736,158,048,268,000 | 34.005495 | 152 | 0.618584 | false |
ojengwa/python_koans | python3/runner/runner_tests/test_sensei.py | 102 | 10551 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import unittest
import re
from libs.mock import *
from runner.sensei import Sensei
from runner.writeln_decorator import WritelnDecorator
from runner.mockable_test_result import MockableTestResult
from runner import path_to_enlightenment
class AboutParrots:
... | mit | 7,606,932,603,355,713,000 | 37.228261 | 100 | 0.662023 | false |
joaduo/mepinta | plugins/c_and_cpp/k3dv1/importing_plugins/k3dv1.py | 1 | 2794 | # -*- coding: utf-8 -*-
'''
Mepinta
Copyright (c) 2011-2012, Joaquin G. Duo
This file is part of Mepinta.
Mepinta 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 opti... | gpl-3.0 | 8,637,697,518,568,898,000 | 41.333333 | 154 | 0.646027 | false |
tplavcic/percona-xtrabackup | storage/innobase/xtrabackup/test/python/junitxml/__init__.py | 42 | 7719 | #
# junitxml: extensions to Python unittest to get output junitxml
# Copyright (C) 2009 Robert Collins <robertc@robertcollins.net>
#
# Copying permitted under the LGPL-3 licence, included with this library.
"""unittest compatible JUnit XML output."""
import datetime
import re
import time
import unittest
# same f... | gpl-2.0 | -2,159,893,791,264,562,700 | 33.927602 | 97 | 0.584013 | false |
GehenHe/Recognize-Face-on-Android | tensorflow/contrib/learn/python/learn/estimators/head_test.py | 7 | 33440 | # 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 | 7,571,319,679,816,374,000 | 38.527187 | 80 | 0.613038 | false |
meteorcloudy/tensorflow | tensorflow/python/lib/io/file_io.py | 23 | 18951 | # 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,409,561,775,854,869,000 | 30.016367 | 80 | 0.675162 | false |
vileopratama/vitech | src/addons/gamification/models/badge.py | 23 | 13043 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp import SUPERUSER_ID
from openerp.osv import fields, osv
from openerp.tools import DEFAULT_SERVER_DATE_FORMAT as DF
from openerp.tools.translate import _
from datetime import date
import logging
from openerp... | mit | 5,885,492,570,778,158,000 | 46.257246 | 194 | 0.602699 | false |
simontorres/goodman | goodman_pipeline/images/tests/test_image_processor.py | 2 | 1143 | from __future__ import absolute_import
from astropy.io import fits
from unittest import TestCase, skip
from ccdproc import CCDData
from ...core import NightDataContainer
from ..image_processor import ImageProcessor
from ..goodman_ccd import get_args
import numpy as np
class ImageProcessorTest(TestCase):
def s... | bsd-3-clause | -2,553,623,159,314,614,000 | 31.657143 | 76 | 0.573053 | false |
tonyrein/podderewski | src/service.py | 1 | 5118 | """
The methods in PodService deal primarily with groups of Feed
"""
from dto import Feed, Episode
from dao import FeedDao, EpisodeDao, init_database
import pd_util
class PodService(object):
@classmethod
def setup(cls):
pd_util.init_dirs()
init_database()
@classmethod
d... | mit | -8,780,444,085,390,436,000 | 29.289941 | 93 | 0.555295 | false |
rahul67/hue | desktop/core/ext-py/boto-2.38.0/boto/swf/layer1.py | 115 | 63928 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without... | apache-2.0 | 3,472,772,706,336,763,000 | 41.280423 | 98 | 0.620026 | false |
lyarwood/sosreport | sos/plugins/squid.py | 11 | 2034 | # 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 distributed in the hope that it will be useful,
# but... | gpl-2.0 | -5,741,411,724,346,767,000 | 36.666667 | 77 | 0.653392 | false |
florentx/OpenUpgrade | addons/survey/test/__init__.py | 118 | 1043 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 | 3,314,374,768,090,035,000 | 37.62963 | 78 | 0.603068 | false |
JeremiasE/KFormula | kspread/plugins/scripting/scripts/functions.py | 3 | 3372 | #!/usr/bin/env kross
"""
Python script that provides additional formula-functions
to KSpread.
The script could be used in two ways;
1. Embedded in KSpread by execution via the "Tools=>Scripts"
menu or from the "Tools=>Script Manager". The functions.py
script may not be visible if not installed. So,... | gpl-2.0 | -8,692,831,238,159,120,000 | 36.054945 | 122 | 0.64739 | false |
sathnaga/virt-test | tools/koji_pkgspec.py | 5 | 3995 | #!/usr/bin/env python
'''
This is a tool for that makes it easy to understand what a given KojiPkgSpec
syntax will expand to.
The main use case is making sure the packages specified in a KojiInstaller
will match the packages you intended to install.
'''
import sys, optparse
import common
from virttest import utils_k... | gpl-2.0 | 1,923,328,582,938,943,000 | 30.456693 | 83 | 0.540426 | false |
openshift/openshift-tools | openshift/installer/vendored/openshift-ansible-3.10.0-0.29.0/roles/lib_openshift/src/lib/service.py | 50 | 5741 | # pylint: skip-file
# flake8: noqa
# pylint: disable=too-many-instance-attributes
class ServiceConfig(object):
''' Handle service options '''
# pylint: disable=too-many-arguments
def __init__(self,
sname,
namespace,
ports,
annotations=Non... | apache-2.0 | -1,418,265,595,793,175,300 | 29.057592 | 78 | 0.551994 | false |
3dfxmadscientist/CBSS | openerp/addons/base/ir/ir_config_parameter.py | 72 | 3862 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 | 1,360,980,679,251,110,400 | 37.62 | 106 | 0.607975 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/models/resource_group.py | 2 | 2131 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -265,301,943,692,364,540 | 34.516667 | 89 | 0.590802 | false |
updownlife/multipleK | dependencies/biopython-1.65/Bio/GA/Selection/RouletteWheel.py | 4 | 4824 | # This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
#
"""Implement Roulette Wheel selection on a population.
This implements Roulette Wheel selection in which individuals are
selected from a population ... | gpl-2.0 | -7,235,774,038,728,621,000 | 36.107692 | 76 | 0.639511 | false |
intel-hpdd/intel-manager-for-lustre | tests/__init__.py | 1 | 3232 | import logging
import os
import sys
import threading
import time
chroma_logger = logging.getLogger("test")
chroma_logger.setLevel(logging.DEBUG)
try:
import nose
nose_installed = True
except ImportError:
nose_installed = False
if nose_installed:
# Monkey patch TextTestResult to print errors as t... | mit | 1,965,511,838,665,663,000 | 31.646465 | 138 | 0.622525 | false |
jimcunderwood/MissionPlanner | Lib/site-packages/numpy/lib/_datasource.py | 81 | 20609 | """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, regard... | gpl-3.0 | -6,554,847,406,892,896,000 | 31.251956 | 82 | 0.584599 | false |
denisff/python-for-android | python-build/python-libs/gdata/src/gdata/gauth.py | 135 | 41554 | #!/usr/bin/env python
#
# Copyright (C) 2009 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 ... | apache-2.0 | 2,062,983,481,354,168,000 | 36.60543 | 79 | 0.692087 | false |
halberom/ansible-modules-core | files/fetch.py | 13 | 3495 | # this is a virtual module that is entirely implemented server side
# 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 op... | gpl-3.0 | 5,307,654,168,037,606,000 | 36.98913 | 91 | 0.702432 | false |
cloudControl/libcloud | docs/conf.py | 29 | 8465 | # -*- coding: utf-8 -*-
#
# Apache Libcloud documentation build configuration file, created by
# sphinx-quickstart on Wed Jul 31 12:16:27 2013.
#
# 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.... | apache-2.0 | -2,470,843,184,053,578,000 | 30.943396 | 91 | 0.703839 | false |
gacarrillor/QGIS | tests/src/python/test_qgszonalstatistics.py | 11 | 6679 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for QgsZonalStatistics.
.. 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 | 870,202,251,911,084,900 | 44.128378 | 125 | 0.591855 | false |
Dhivyap/ansible | test/units/module_utils/xenserver/test_netaddr_functions.py | 21 | 5154 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2019, Bojan Vitnik <bvitnik@mainstream.rs>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import pytest
from ansible.module_utils.common.netw... | gpl-3.0 | 2,931,790,522,968,562,700 | 27.318681 | 132 | 0.567132 | false |
nickdex/cosmos | code/artificial_intelligence/src/artificial_neural_network/ann.py | 3 | 1384 | import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
dataset = pd.read_csv("dataset.csv")
X = dataset.iloc[:, 3:13].values
y = dataset.iloc[:, 13].values
from sklearn.preprocessing import LabelEncoder, OneHotEncoder
labelencoder_X_1 = LabelEncoder()
X[:, 1] = labelencoder_X_1.fit_transform(X[:, 1])... | gpl-3.0 | -2,152,810,292,719,769,600 | 27.833333 | 88 | 0.740607 | false |
s-gv/rnicu-webapp | rnicu-webapp/rnicu.py | 2 | 20420 | '''
rnicu-webapp accepts sensor data securely, makes them available anonymously and helps to visualize the sensor data
Copyright (C) 2013 Sagar G V
E-mail : sagar.writeme@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Pu... | agpl-3.0 | 8,678,695,065,686,247,000 | 38.344894 | 270 | 0.552742 | false |
boomsbloom/dtm-fmri | DTM/for_gensim/lib/python2.7/site-packages/numpy/distutils/npy_pkg_config.py | 66 | 13243 | from __future__ import division, absolute_import, print_function
import sys
import re
import os
if sys.version_info[0] < 3:
from ConfigParser import RawConfigParser, NoOptionError
else:
from configparser import RawConfigParser, NoOptionError
__all__ = ['FormatError', 'PkgNotFound', 'LibraryInfo', 'VariableSe... | mit | 6,500,023,778,001,233,000 | 28.692825 | 82 | 0.579778 | false |
zzhhui/webrtc-jingle-client | tools/badit_android.py | 7 | 9528 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Badit (BuildAndDebugIT) is a program to to simplify the process of deployment
and updating an android project
copyright: 2012, (c) tuenti.com
author: Nick Flink <nickflink@github.com>
"""
import sys
import getopt
import os
import subprocess
# import getpass
import ... | bsd-3-clause | 8,593,678,660,208,936,000 | 33.773723 | 176 | 0.571788 | false |
imk1/IMKTFBindingCode | makeClustergram.py | 1 | 2060 | import sys
import argparse
import pylab
import numpy as np
import matplotlib.pyplot as plt
from heatmapcluster import heatmapcluster
def parseArgument():
# Parse the input
parser=argparse.ArgumentParser(description=\
"Make a clustergram of a matrix")
parser.add_argument("--matFileName", required=True,\
help='... | mit | -150,798,213,209,734,850 | 32.225806 | 74 | 0.741262 | false |
owlabs/incubator-airflow | airflow/hooks/dbapi_hook.py | 1 | 11082 | # -*- 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 | 7,463,216,336,634,853,000 | 34.980519 | 85 | 0.575167 | false |
hobson/totalgood | totalgood/pacs/predictor.py | 1 | 4199 | #!python manage.py shell_plus <
import pandas as pd
np = pd.np
np.norm = np.linalg.norm
import sklearn
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer, TfidfVectorizer
from sklearn.linear_model import SGDClassifier
from sklearn.grid_search import... | mit | -7,624,432,835,282,163,000 | 41.414141 | 109 | 0.646344 | false |
nigelsmall/py2neo | test/test_node.py | 1 | 6120 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright 2011-2016, Nigel Small
#
# 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
#
# Unle... | apache-2.0 | 8,076,112,358,199,071,000 | 33.772727 | 88 | 0.587418 | false |
bell345/pseudo-interpreter | pseudo/parse.py | 1 | 12232 | #!/usr/bin/env python3
from .token import *
from .expr import *
from .code import *
def skip_eol(ctx):
res = ctx.raw_context()
token = ctx.peek_token()
while token == Token('eol', ''):
ctx.token()
res = ctx.raw_context()
token = ctx.peek_token()
return res
def pseudo_code_ele... | mit | 1,799,087,302,725,731,800 | 28.477108 | 101 | 0.541776 | false |
hackerkid/zulip | corporate/migrations/0003_customerplan.py | 6 | 1658 | # Generated by Django 1.11.16 on 2018-12-22 21:05
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("corporate", "0002_customer_default_discount"),
]
operations = [
migrations.CreateModel(
name=... | apache-2.0 | -5,024,522,991,881,869,000 | 37.55814 | 95 | 0.518094 | false |
cdcapano/pycbc | pycbc/waveform/multiband.py | 2 | 3724 | """ Tools and functions to calculate interpolate waveforms using multi-banding
"""
import numpy
from pycbc.types import TimeSeries, zeros
def multiband_fd_waveform(bands=None, lengths=None, overlap=0, **p):
""" Generate a fourier domain waveform using multibanding
Speed up generation of a fouerier domain wa... | gpl-3.0 | 2,049,726,424,251,932,700 | 32.25 | 79 | 0.585392 | false |
AlanCristhian/sugar | sugar.py | 1 | 16534 | """Python 3 functional programing experiments."""
import collections
import itertools
import inspect
import opcode
import types
__all__ = ["Let", "Expression", "Raise", "Where"]
def _make_closure_cell(value):
"""The types.FunctionType class ned a cell variable in the
closure argument. This function create... | mit | -7,985,488,148,526,271,000 | 35.90625 | 79 | 0.530241 | false |
marwoodandrew/superdesk-aap | server/aap/macros/length_feet_and_inches_to_metric_test.py | 2 | 2700 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import unitt... | agpl-3.0 | -636,309,733,857,370,200 | 44 | 72 | 0.553704 | 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.