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 |
|---|---|---|---|---|---|---|---|---|---|---|
mbareta/edx-platform-ft | cms/envs/bok_choy.py | 7 | 4469 | """
Settings for Bok Choy tests that are used when running Studio.
Bok Choy uses two different settings files:
1. test_static_optimized is used when invoking collectstatic
2. bok_choy is used when running the tests
Note: it isn't possible to have a single settings file, because Django doesn't
support both generating ... | agpl-3.0 | 3,332,547,817,657,110,000 | 33.114504 | 91 | 0.680913 | false |
Taeung/tip | tools/perf/scripts/python/export-to-sqlite.py | 26 | 13772 | # export-to-sqlite.py: export perf data to a sqlite3 database
# Copyright (c) 2017, Intel Corporation.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
#
# This progr... | gpl-2.0 | 1,748,366,496,802,732,500 | 28.490364 | 183 | 0.664682 | false |
Hitechverma/zamboni | mkt/installs/views.py | 14 | 1782 | from django.core.exceptions import PermissionDenied
import commonware.log
from rest_framework.decorators import (authentication_classes,
parser_classes, permission_classes)
from rest_framework.parsers import FormParser, JSONParser
from rest_framework.permissions import AllowAny
f... | bsd-3-clause | 936,997,901,960,442,500 | 35.367347 | 74 | 0.678451 | false |
matthiasdiener/spack | var/spack/repos/builtin/packages/parmgridgen/package.py | 5 | 3095 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | -4,583,370,242,600,774,000 | 38.177215 | 81 | 0.617124 | false |
cyanfish/heltour | heltour/tournament/migrations/0188_auto_20191223_1457.py | 1 | 4448 | # Generated by Django 2.2.9 on 2019-12-23 14:57
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('tournament', '0187_auto_20191222_2213'),
]
operations = [
migrations.Alter... | mit | -2,463,475,109,606,754,000 | 41.361905 | 168 | 0.614883 | false |
cohortfsllc/cohort-cocl2-sandbox | pnacl/driver/pnacl-driver.py | 2 | 30220 | #!/usr/bin/python
# Copyright (c) 2012 The Native Client 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 re
import subprocess
from driver_tools import AddHostBinarySearchPath, DefaultOutputName, \
DefaultPCHOutputName, Driv... | bsd-3-clause | 3,817,548,695,698,377,700 | 36.262639 | 84 | 0.568795 | false |
saurabh6790/ON-RISAPP | startup/report_data_map.py | 30 | 8864 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
# mappings for table dumps
# "remember to add indexes!"
data_map = {
"Company": {
"columns": ["name"],
"conditions": ["docstatus < 2"]
},
"F... | agpl-3.0 | -4,115,669,963,263,880,000 | 28.945946 | 102 | 0.569043 | false |
liberorbis/libernext | env/lib/python2.7/site-packages/IPython/extensions/storemagic.py | 10 | 8268 | # -*- coding: utf-8 -*-
"""
%store magic for lightweight persistence.
Stores variables, aliases and macros in IPython's database.
To automatically restore stored variables at startup, add this to your
:file:`ipython_config.py` file::
c.StoreMagics.autorestore = True
"""
from __future__ import print_function
#-----... | gpl-2.0 | 4,883,972,254,727,433,000 | 33.024691 | 100 | 0.480044 | false |
swcloud/api-client-staging | generated/python/gapic-google-cloud-monitoring-v3/google/cloud/gapic/monitoring/v3/group_service_client.py | 7 | 22043 | # Copyright 2017, 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 ... | bsd-3-clause | -5,333,893,762,926,127,000 | 42.563241 | 156 | 0.625142 | false |
tudennis/LeetCode---kamyu104-11-24-2015 | Python/maximum-length-of-repeated-subarray.py | 2 | 3418 | # Time: O(m * n)
# Space: O(min(m, n))
# Given two integer arrays A and B,
# return the maximum length of an subarray that appears in both arrays.
#
# Example 1:
# Input:
# A: [1,2,3,2,1]
# B: [3,2,1,4,7]
# Output: 3
# Explanation:
# The repeated subarray with maximum length is [3, 2, 1].
# Note:
# 1 <= len(A), len(B... | mit | -4,399,942,662,282,739,000 | 28.465517 | 80 | 0.453482 | false |
brandonium21/snowflake | snowflakeEnv/lib/python2.7/site-packages/alembic/ddl/mysql.py | 1 | 9191 | from sqlalchemy.ext.compiler import compiles
from sqlalchemy import types as sqltypes
from sqlalchemy import schema
from ..compat import string_types
from .. import util
from .impl import DefaultImpl
from .base import ColumnNullable, ColumnName, ColumnDefault, \
ColumnType, AlterColumn, format_column_name, \
f... | bsd-2-clause | 2,387,690,802,206,856,700 | 35.472222 | 76 | 0.562942 | false |
jml/flocker | flocker/node/functional/test_deploy.py | 3 | 14806 | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Functional tests for ``flocker.node._deploy``.
"""
from uuid import uuid4
from pyrsistent import pmap, pvector, pset
from twisted.trial.unittest import TestCase
from twisted.python.filepath import FilePath
from .. import P2PManifestationDeployer, App... | apache-2.0 | -352,803,399,284,541,630 | 35.46798 | 79 | 0.582129 | false |
1st1/uvloop | .github/release_log.py | 2 | 1239 | #!/usr/bin/env python3
import argparse
import json
import requests
import re
BASE_URL = 'https://api.github.com/repos/magicstack/uvloop/compare'
def main():
parser = argparse.ArgumentParser(
description='Generate release log.')
parser.add_argument('--to', dest='to_hash', default='master', type=str... | mit | 6,018,028,480,691,333,000 | 24.8125 | 75 | 0.540759 | false |
NewpTone/StackLab-swift | test/unit/obj/test_expirer.py | 4 | 16349 | # Copyright (c) 2011 OpenStack, 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 to in wr... | apache-2.0 | 4,630,563,591,811,918,000 | 34.387446 | 79 | 0.548474 | false |
closedLoop/deepdive | examples/spouse_example/postgres/piggy_extractor/udfs/people.py | 15 | 1049 | import json
import os
import sys
DATA_DIR = os.path.join(os.path.dirname(__file__), 'data')
NAMES_FILE = os.path.join(DATA_DIR, 'names.tsv')
dicts = {}
import string
def clean(s):
return filter(lambda x: x in string.printable, s)
def output(record):
sys.stdout.write(clean(json.dumps(record)) + '\n')
def l... | apache-2.0 | 8,641,545,284,549,187,000 | 22.840909 | 77 | 0.597712 | false |
gnowledge/OTM2 | opentreemap/treemap/tests/test_management.py | 8 | 2724 | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from StringIO import StringIO
from django.core.management import call_command
from treemap.models import Instance, Plot, Tree, Species
from treemap.tests import (make_instance, make_u... | gpl-3.0 | -7,617,547,296,626,783,000 | 33.923077 | 73 | 0.644273 | false |
leiferikb/bitpop | src/chrome/test/chromedriver/archive.py | 1 | 2325 | # Copyright (c) 2013 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.
"""Downloads items from the Chromium continuous archive."""
import os
import platform
import urllib
import util
CHROME_33_REVISION = '241075'
CHROME_3... | gpl-3.0 | -6,313,306,043,129,741,000 | 28.0625 | 75 | 0.67914 | false |
Gabotero/GNURadioNext | gr-analog/python/qa_dpll.py | 1 | 2081 | #!/usr/bin/env python
#
# Copyright 2012,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 (at your optio... | gpl-3.0 | -6,657,579,732,830,073,000 | 26.025974 | 76 | 0.631908 | false |
mbuij/ldns-cga-tsig | cga-gen/scapy6send/scapy6.py | 1 | 255340 | #! /usr/bin/env python
#############################################################################
## ##
## scapy6.py --- IPv6 support for Scapy ##
## see http://namabiiru.hongo.wide.ad.jp/scapy6/ ... | bsd-3-clause | -542,132,129,403,450,500 | 36.434394 | 156 | 0.535744 | false |
flh/odoo | addons/web_analytics/__openerp__.py | 62 | 1409 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-2012 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 | 1,300,700,765,640,142,600 | 33.365854 | 78 | 0.577005 | false |
hazrpg/calibre | src/calibre/utils/titlecase.py | 14 | 3056 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Original Perl version by: John Gruber http://daringfireball.net/ 10 May 2008
Python version by Stuart Colville http://muffinresearch.co.uk
Modifications to make it work with non-ascii chars by Kovid Goyal
License: http://www.opensource.org/licenses/mit-license.php
"""... | gpl-3.0 | -5,898,118,319,392,397,000 | 28.823529 | 82 | 0.56739 | false |
akretion/odoo | addons/purchase/models/product.py | 10 | 4587 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import timedelta
from odoo import api, fields, models, _
from odoo.addons.base.models.res_partner import WARNING_MESSAGE, WARNING_HELP
from odoo.tools.float_utils import float_round
class ProductTemplate... | agpl-3.0 | 540,987,636,617,608,800 | 44.415842 | 171 | 0.655548 | false |
google/mirandum | alerts/settings/base.py | 1 | 3428 | # Copyright 2016 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 applica... | apache-2.0 | 7,427,302,759,353,580,000 | 24.969697 | 75 | 0.708576 | false |
joaormatos/anaconda | Anaconda/pyglet/libs/win32/constants.py | 40 | 119970 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribu... | gpl-3.0 | 7,873,112,887,712,167,000 | 23.046903 | 86 | 0.727849 | false |
pythonindia/junction | junction/feedback/admin.py | 1 | 3402 | # -*- coding: utf-8 -*-
from django.contrib import admin
from junction.base.admin import TimeAuditAdmin
from junction.conferences import service
from .models import (
ChoiceFeedbackQuestion,
ChoiceFeedbackQuestionValue,
ScheduleItemChoiceFeedback,
ScheduleItemTextFeedback,
TextFeedbackQuestion,
)... | mit | -176,945,303,479,811,870 | 33.714286 | 87 | 0.702528 | false |
ychfan/tensorflow | tensorflow/contrib/gan/__init__.py | 13 | 1704 | # Copyright 2017 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 agree... | apache-2.0 | -9,112,878,455,456,252,000 | 37.727273 | 82 | 0.737089 | false |
Germanika/plover | plover/gui_qt/main_window.py | 1 | 10332 |
from functools import partial
import json
from PyQt5.QtCore import QCoreApplication, Qt
from PyQt5.QtGui import QCursor, QIcon, QKeySequence
from PyQt5.QtWidgets import (
QMainWindow,
QMenu,
)
from plover import log
from plover.oslayer import wmctrl
from plover.registry import registry
from plover.resource i... | gpl-2.0 | 1,028,220,904,353,781,000 | 37.988679 | 101 | 0.601529 | false |
mmahut/openshift-ansible | roles/lib_openshift/library/oc_service.py | 7 | 62343 | #!/usr/bin/env python
# pylint: disable=missing-docstring
# flake8: noqa: T001
# ___ ___ _ _ ___ ___ _ _____ ___ ___
# / __| __| \| | __| _ \ /_\_ _| __| \
# | (_ | _|| .` | _|| / / _ \| | | _|| |) |
# \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____
# | \ / _ \ | \| |/ _ \_ _| | __| \_ ... | apache-2.0 | 7,977,068,977,781,117,000 | 32.427882 | 118 | 0.533404 | false |
kafluette/pyrc-bot | netadmin/protocol.py | 1 | 2795 | from time import time
from netadmin.exceptions import UserNotFoundException, ChannelNotFoundException
current_ts = lambda: int(time())
class ReceivedMessage(object):
line = None
tokens = []
prefix = None
command = None
target = None
trailing = None
def __str__(self):
return str... | mit | -42,816,456,439,468,660 | 21.36 | 91 | 0.550984 | false |
Zubieta/CPP | CodeSignal/Arcade/Intro/Level_11/03_Chess_Knight.py | 3 | 1125 | # https://app.codesignal.com/arcade/intro/level-11/pwRLrkrNpnsbgMndb
def chessKnight(cell):
# Find the number of available cells where a Knight can move to.
coord_x = int(ord(cell[0]) - ord('a') + 1)
coord_y = int(cell[1])
res = 0
# Possibilities: +1+2, +1-2, -1+2, -1-2, +2+1, +2-1, -2+1, -2-1
m... | mit | 8,886,131,063,282,852,000 | 35.290323 | 72 | 0.510222 | false |
lkhomenk/integration_tests | cfme/tests/containers/test_configurable_menus.py | 5 | 1288 | # -*- coding: utf-8 -*-
import pytest
from cfme.containers.provider import ContainersProvider
from cfme.base.login import BaseLoggedInPage
from cfme.utils.appliance.implementations.ui import navigate_to
from cfme.utils.version import current_version
pytestmark = [pytest.mark.provider([ContainersProvider], scope='fun... | gpl-2.0 | 2,529,210,613,691,963,000 | 30.414634 | 75 | 0.763975 | false |
wolfiex/DSMACC-testing | dsmacc/parsekpp/functional_group_diff.py | 1 | 3619 | '''
Crude indicator of fn group reaction styles
Does not take coeff into account
'''
from .reactiontypes import reformat_kpp
from .. import datatables
__tableloc__ = datatables.__file__
mechlist = ['formatted_China_GCGC']
if 1==1:
reactions = reformat_kpp(mechlist,findcat=True,join=False).values
print(reac... | gpl-3.0 | 8,497,230,499,557,166,000 | 23.619048 | 110 | 0.539376 | false |
kdart/pycopia3 | QA/pycopia/remote/remote_cli.py | 1 | 32925 | #!/usr/bin/python3.4
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# 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 app... | apache-2.0 | 3,885,755,097,520,766,000 | 31.090643 | 106 | 0.542293 | false |
chiefspace/udemy-rest-api | udemy_rest_api_section5/code/env/lib/python3.4/site-packages/pip/util.py | 8 | 24864 | import sys
import shutil
import os
import stat
import re
import posixpath
import zipfile
import tarfile
import subprocess
import textwrap
from pip.exceptions import InstallationError, BadCommand, PipError
from pip.backwardcompat import(WindowsError, string_types, raw_input,
console_to_s... | gpl-2.0 | -7,974,811,548,358,452,000 | 32.691057 | 113 | 0.581282 | false |
offlinehacker/flumotion | flumotion/test/test_common_messages.py | 4 | 12222 | # -*- Mode: Python; test-case-name: flumotion.test.test_common_messages -*-
# vi:si:et:sw=4:sts=4:ts=4
#
# Flumotion - a streaming media server
# Copyright (C) 2004,2005,2006,2007 Fluendo, S.L. (www.fluendo.com).
# All rights reserved.
# This file may be distributed and/or modified under the terms of
# the GNU General... | gpl-2.0 | 4,211,600,687,856,379,400 | 32.669421 | 78 | 0.615857 | false |
CERNDocumentServer/cds | tests/unit/test_fixtures.py | 2 | 5195 | # -*- coding: utf-8 -*-
#
# This file is part of CDS.
# Copyright (C) 2016, 2017 CERN.
#
# CDS 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 v... | gpl-2.0 | 9,147,488,120,860,973,000 | 36.107143 | 79 | 0.690279 | false |
AMOboxTV/AMOBox.LegoBuild | plugin.video.titan/resources/lib/libraries/client.py | 3 | 9872 | # -*- coding: utf-8 -*-
'''
Genesis Add-on
Copyright (C) 2015 lambda
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 ... | gpl-2.0 | 7,820,400,836,237,131,000 | 39.459016 | 191 | 0.506483 | false |
laurenrevere/osf.io | api/caching/tasks.py | 9 | 3481 | import urlparse
import requests
import logging
from website import settings
logger = logging.getLogger(__name__)
def get_varnish_servers():
# TODO: this should get the varnish servers from HAProxy or a setting
return settings.VARNISH_SERVERS
def get_bannable_urls(instance):
from osf.models import Co... | apache-2.0 | 7,845,653,783,445,461,000 | 39.952941 | 130 | 0.521402 | false |
rabernat/mitgcm-xray | _xgcm/regridding.py | 2 | 2312 | import warnings
import numpy as np
import xray
# this automatically converts dask arrays to numpy
# use with caution
def regrid_vertical(qdarr, trdarr, trlevs, dim):
"""Regrid a DataArray ``q``, co-located with tracer ``trarr``
to a new vertical grid with levels defined by ``trlevs`` along
the specified di... | mit | -1,914,515,429,045,776,000 | 30.671233 | 85 | 0.593858 | false |
dorianpula/paramiko | paramiko/ber.py | 3 | 4294 | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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 2.1 of the License, or (a... | lgpl-2.1 | -5,930,214,223,870,702,000 | 30.807407 | 79 | 0.555426 | false |
theheros/kbengine | kbe/res/scripts/common/Lib/email/test/test_email_torture.py | 3 | 3793 | # Copyright (C) 2002-2004 Python Software Foundation
#
# A torture test of the email package. This should not be run as part of the
# standard Python test suite since it requires several meg of email messages
# collected in the wild. These source messages are not checked into the
# Python distro, but are availab... | lgpl-3.0 | 6,519,063,635,733,950,000 | 25.121429 | 79 | 0.584498 | false |
skariel/webalchemy | webalchemy/stacker_wrappers/bootstrap_3/bootstrap3_wrapper.py | 1 | 6308 | from ...Stacker import StackerWrapper
class BootstrapShortcuts(StackerWrapper):
'''Stacker wrapper for Bootstrap entities shortcuts
eg.
s = Stacker(self.rdoc.body)
b = BootstrapShortcuts(s)
h = HtmlShortcuts(s)
with b.row(), b.col(md=7, md_offset=2), s.panel('info'):
b.panel_heading('H... | mit | -3,237,839,607,089,860,000 | 37.469512 | 127 | 0.547876 | false |
linktlh/Toontown-journey | toontown/toon/PlayerInfoPanel.py | 3 | 14993 | from pandac.PandaModules import *
from direct.gui.DirectGui import *
from pandac.PandaModules import *
from direct.showbase import DirectObject
from toontown.friends import FriendHandle
from otp.avatar import Avatar
from direct.distributed import DistributedObject
from direct.directnotify import DirectNotifyGlobal
from... | apache-2.0 | -437,521,822,134,119,550 | 36.389027 | 95 | 0.557794 | false |
szibis/Diamond | src/collectors/solr/solr.py | 17 | 7034 | # coding=utf-8
"""
Collect the solr stats for the local node
#### Dependencies
* posixpath
* urllib2
* json
"""
import posixpath
import urllib2
try:
import json
except ImportError:
import simplejson as json
import diamond.collector
class SolrCollector(diamond.collector.Collector):
def __init__(... | mit | 4,421,562,211,500,884,000 | 32.495238 | 78 | 0.461899 | false |
skalk/linux | tools/perf/scripts/python/mem-phys-addr.py | 532 | 2446 | # mem-phys-addr.py: Resolve physical address samples
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2018, Intel Corporation.
from __future__ import division
from __future__ import print_function
import os
import sys
import struct
import re
import bisect
import collections
sys.path.append(os.environ['PERF_EXEC_... | gpl-2.0 | -1,836,947,856,430,823,200 | 23.46 | 78 | 0.630417 | false |
mcmdhr/CSOJ | account/models.py | 1 | 3459 | # coding=utf-8
#=============================================================================
# Author : MaxMao
# Email : 623742750@qq.com
# Last modified: 2016-04-26 10:19
# Filename : models.py
# Description :
#=============================================================================
from django... | mit | -8,746,090,989,515,611,000 | 33.457447 | 82 | 0.663476 | false |
strubell/Parser | lib/rnn_cells/cif_lstm_cell.py | 1 | 2689 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 Timothy Dozat
#
# 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 | -7,337,843,005,000,561,000 | 39.134328 | 110 | 0.608033 | false |
ksons/xml3d-blender-exporter | addons/io_scene_xml3d/xml_writer.py | 2 | 1781 | from xml.sax.saxutils import quoteattr
class XMLWriter:
""" An very simpe XML writer """
def __init__(self, stream, ident=0):
self._stream = stream
self._isElementOpen = False
self._ident = ident
self._hasChildElements = [False]
def hasChildElements(self):
self._ha... | gpl-2.0 | -7,706,780,389,937,338,000 | 30.245614 | 70 | 0.550814 | false |
dhruvsrivastava/OJ | flask/lib/python2.7/site-packages/pbr/tests/test_integration.py | 17 | 4807 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | bsd-3-clause | -7,643,016,124,506,186,000 | 38.401639 | 78 | 0.608072 | false |
Jannes123/inasafe | safe/impact_functions/generic/continuous_hazard_population/impact_function.py | 2 | 10487 | # coding=utf-8
"""
InaSAFE Disaster risk assessment tool by AusAid - **Generic Impact Function
on Population for Continuous Hazard.**
Contact : ole.moller.nielsen@gmail.com
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... | gpl-3.0 | -1,490,353,501,954,863,400 | 37.134545 | 79 | 0.58234 | false |
iraklikhitarishvili/django-html5croppingtools | fields.py | 1 | 2582 | import json
from io import BytesIO
import uuid
from PIL import Image
from django.core.files.uploadedfile import InMemoryUploadedFile
from django.forms import ImageField
from html5croppingtools.widgets import CropImageWidget
class CropImageField(ImageField):
def __init__(self, max_size=2000, width_ratio=500, hei... | bsd-2-clause | -4,739,089,838,697,291,000 | 35.366197 | 106 | 0.603796 | false |
KenKundert/shlib | tests/test_cmd.py | 1 | 1959 | from inform import Error, Inform
from shlib import Run, set_prefs
def test_run_downturn():
cmd = "./test_prog 0"
p = Run(cmd, "sOEW")
assert p.stdout == "this is stdout.\n"
assert p.stderr == "this is stderr.\n"
assert p.status == 0
def test_run_entree():
cmd = "./test_prog 1"
p = Run(cm... | gpl-3.0 | 2,879,715,364,223,941,600 | 24.115385 | 55 | 0.570699 | false |
tmerrick1/spack | var/spack/repos/builtin/packages/scr/package.py | 3 | 5989 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | 1,282,068,866,241,057,000 | 38.143791 | 89 | 0.624478 | false |
charlesll/RamPy | rampy/tests/test_mlregressor.py | 1 | 1520 | import unittest
import numpy as np
np.random.seed(42)
import scipy
from scipy.stats import norm
import rampy as rp
class TestML(unittest.TestCase):
def test_mlregressor(self):
x = np.arange(0,600,1.0)
nb_samples = 100 # number of samples in our dataset
# true partial spectra
S... | gpl-2.0 | -2,592,384,470,741,183,500 | 28.803922 | 112 | 0.598026 | false |
hiway/micropython | tests/basics/string_count.py | 78 | 1206 | print("".count(""))
print("".count("a"))
print("a".count(""))
print("a".count("a"))
print("a".count("b"))
print("b".count("a"))
print("aaa".count(""))
print("aaa".count("a"))
print("aaa".count("aa"))
print("aaa".count("aaa"))
print("aaa".count("aaaa"))
print("aaaa".count(""))
print("aaaa".count("a"))
print("aaaa".cou... | mit | 8,366,515,824,376,484,000 | 21.754717 | 40 | 0.587065 | false |
piyushroshan/xen-4.3.2 | tools/python/xen/web/tcp.py | 41 | 7016 | #============================================================================
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation.
#
# This library is distributed in the hope th... | gpl-2.0 | -4,517,180,534,179,085,000 | 32.09434 | 80 | 0.547748 | false |
xe1gyq/nuupxe | core/voicerecognition.py | 1 | 2127 | #!/usr/bin/python
import commands
import logging
import time
from core.irlp import Irlp
from core.pushtotalk import PushToTalk
from core.speechrecognition import SpeechRecognition
from core.voice import Voice
class VoiceRecognition(object):
def __init__(self, voicesynthetizer):
self.output = ""
... | apache-2.0 | -1,843,878,418,119,571,000 | 27.743243 | 131 | 0.652092 | false |
wcang/pytekcap | ip.py | 1 | 3049 | from bf import bf
from validator import *
from tekcap import *
ihl_validator = int_validator_factory(5, 2**4 - 1)
#Taken from netinet/in.h
IPPROTO_IP = 0 # Dummy protocol for TCP
IPPROTO_HOPOPTS = 0 # IPv6 Hop-by-Hop options.
IPPROTO_ICMP = 1 # Internet Control Message Protocol.
IPPROTO_IGMP = 2 # Int... | mit | -8,159,502,642,587,866,000 | 32.141304 | 92 | 0.634962 | false |
mlperf/training_results_v0.7 | Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/python/tvm/relay/testing/darknet.py | 2 | 12613 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 7,948,737,373,860,600,000 | 22.61985 | 193 | 0.609609 | false |
quantopian/qgrid | qgrid/grid.py | 1 | 71122 | import ipywidgets as widgets
import pandas as pd
import numpy as np
import json
from types import FunctionType
from IPython.display import display
from numbers import Integral
from traitlets import (
Unicode,
Instance,
Bool,
Integer,
Dict,
List,
Tuple,
Any,
All,
parse_notifier_n... | apache-2.0 | -6,919,184,746,020,810,000 | 37.548509 | 79 | 0.552023 | false |
jgcaaprom/android_external_chromium_org | tools/telemetry/telemetry/page/actions/media_action.py | 47 | 1740 | # Copyright 2013 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.
"""Common media action functions."""
import logging
import os
from telemetry.core import util
from telemetry.page.actions import page_action
class MediaA... | bsd-3-clause | -6,993,876,803,537,459,000 | 33.117647 | 80 | 0.671264 | false |
Johnzero/OE7 | openerp/addons-fg/SMS/sms.py | 1 | 3400 | # -*- coding: utf-8 -*-
from openerp.osv import osv, fields,orm
from openerp import SUPERUSER_ID
import PyWapFetion
from PyWapFetion import Fetion
from openerp import service
class feitionsetting(osv.TransientModel):
_inherit = 'base.config.settings'
_description = "Fetion Setting"
def create(self, cr, ... | agpl-3.0 | -221,650,626,388,496,640 | 33.833333 | 92 | 0.602273 | false |
brandonsimpson/py_git_update | git_update.py | 1 | 1223 | #!/usr/bin/env python
import os
import grp
import pwd
import subprocess
# update these settings to match your server settings
vhost_directory = '/home/' # cpanel uses /home - most linux servers use a variation of /var/www/vhosts
git_pull_command = 'git pull origin dev --quiet' # set to your preferred git pull comma... | mit | 2,841,623,793,426,739,700 | 32.972222 | 116 | 0.642682 | false |
JingJunYin/tensorflow | tensorflow/python/ops/linalg/linear_operator_identity.py | 22 | 27436 | # 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 | -2,383,897,014,691,403,300 | 37.052705 | 80 | 0.64594 | false |
Intel-tensorflow/tensorflow | tensorflow/python/kernel_tests/linalg/linear_operator_composition_test.py | 14 | 8368 | # 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,192,018,350,119,702,000 | 35.541485 | 80 | 0.684034 | false |
onitake/ansible | lib/ansible/modules/network/slxos/slxos_config.py | 21 | 16799 | #!/usr/bin/python
# Copyright: (c) 2018, Extreme Networks Inc.
# 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)
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 | 6,049,702,505,357,806,000 | 37.529817 | 125 | 0.646527 | false |
Edilmo/brat-widget | brat_widget/document.py | 1 | 47283 | # coding=utf-8
import json
from brat_widget.configuration import ENTITY_CATEGORY, EVENT_CATEGORY, RELATION_CATEGORY, UNKNOWN_CATEGORY, CollectionConfiguration
from brat_widget.verify_annotations import verify_annotation
try:
from config import DEBUG
except ImportError:
DEBUG = False
from brat_widget.annotati... | mit | -1,281,054,216,807,129,300 | 40.659031 | 154 | 0.527695 | false |
ooms/materials | workshops/InternetOfThings/raspberrypi/fr/picamera/camera.py | 2 | 2578 | import picamera
import picamera.array
import devoxx4kids as d4k
import io
import time
path = "/home/pi/d4k/album"
pictureNumber = 0
videoNumber = 0
default_camera_resolution = (1024, 768)
motion_camera_resolution = (128, 80)
effectsList = ["none", "negative", "sketch"]
effectNumber = 0
with picamera.PiCamera() as c... | lgpl-2.1 | -5,873,707,569,941,607,000 | 36.911765 | 104 | 0.558185 | false |
iChaRil/inkscape_clone | share/extensions/Barcode/Upca.py | 3 | 1308 | #
# Copyright (C) 2007 Martin Owens
#
# 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... | gpl-2.0 | -4,958,777,461,748,645,000 | 34.351351 | 81 | 0.688838 | false |
ljx0305/ice | scripts/tests/Ice/objects.py | 1 | 1389 | # **********************************************************************
#
# Copyright (c) 2003-2017 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# ***********************************************************... | gpl-2.0 | 7,397,740,096,598,045,000 | 39.852941 | 115 | 0.654428 | false |
yosshy/nova | nova/cells/manager.py | 10 | 26487 | # Copyright (c) 2012 Rackspace Hosting
# 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 | -2,609,660,454,759,886,000 | 44.276923 | 79 | 0.594254 | false |
gitenberg-dev/pg-epubmaker | epubmaker/writers/PicsDirWriter.py | 1 | 2906 | #!/usr/bin/env python
# -*- mode: python; indent-tabs-mode: nil; -*- coding: iso-8859-1 -*-
"""
PicsDirWriter.py
Copyright 2012 by Marcello Perathoner
Distributable under the GNU General Public License Version 3 or newer.
Copies pics into local directory. Needed for HTML and Xetex.
"""
from __future__ import wi... | gpl-3.0 | -3,893,108,693,829,158,400 | 29.914894 | 82 | 0.538885 | false |
houshengbo/nova_vmware_compute_driver | nova/tests/network/test_api.py | 2 | 8637 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Red Hat, 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/l... | apache-2.0 | 7,425,073,286,617,631,000 | 39.740566 | 78 | 0.577747 | false |
NaturalGIS/QGIS | python/plugins/processing/core/ProcessingLog.py | 15 | 3691 | # -*- coding: utf-8 -*-
"""
***************************************************************************
ProcessingLog.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*************************... | gpl-2.0 | 8,649,137,421,587,240,000 | 33.495327 | 107 | 0.512056 | false |
BigBrother1984/android_external_chromium_org | third_party/tlslite/tlslite/TLSConnection.py | 34 | 72459 | """
MAIN CLASS FOR TLS LITE (START HERE!).
"""
from __future__ import generators
import socket
from utils.compat import formatExceptionTrace
from TLSRecordLayer import TLSRecordLayer
from Session import Session
from constants import *
from utils.cryptomath import getRandomBytes
from errors import *
from messages impor... | bsd-3-clause | 5,966,738,716,912,147,000 | 43.048024 | 83 | 0.572158 | false |
ddico/odoo | addons/gamification/models/res_users.py | 6 | 12734 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class Users(models.Model):
_inherit = 'res.users'
karma = fields.Integer('Karma', default=0)
karma_tracking_ids = fields.One2many('gamification.karma.tracking', 'user_i... | agpl-3.0 | 1,897,223,885,941,633,500 | 41.305648 | 145 | 0.567771 | false |
sdgdsffdsfff/xunlei-lixian | lixian_nodes.py | 11 | 4219 |
import lixian_logging
import urllib2
import re
VOD_RANGE = '0-50'
def resolve_node_url(url, gdriveid, timeout=60):
request = urllib2.Request(url, headers={'Cookie': 'gdriveid=' + gdriveid})
response = urllib2.urlopen(request, timeout=timeout)
response.close()
return response.geturl()
def switch_node_in_url(nod... | mit | 6,771,491,477,331,486,000 | 27.315436 | 98 | 0.675516 | false |
darcy0511/Data-Structure-Zoo | 5-Stack and its applications/test.py | 5 | 3164 | """ stack.py tester
thomas moll 2015
"""
import unittest
import stack
class TestStack(unittest.TestCase):
def setUp(self):
pass
def test_push(self):
test_stack = stack.Stack()
with self.assertRaises(ValueError):
test_stack.peek()
test_value =... | mit | 3,914,088,925,905,749,000 | 32.021505 | 101 | 0.457649 | false |
simontakite/sysadmin | pythonscripts/learningPython/skipper.py | 1 | 1209 | #!python3
# File skipper.py
class SkipObject:
def __init__(self, wrapped): # Save item to be used
self.wrapped = wrapped
def __iter__(self):
return SkipIterator(self.wrapped) # New iterator each time
class SkipIterator:
def __init__(self, wrapped):
... | gpl-2.0 | 8,889,331,635,153,466,000 | 38.3 | 79 | 0.517783 | false |
sam-m888/gprime | gprime/filters/rules/repository/_hasreferencecountof.py | 1 | 1730 | #
# gPrime - A web-based genealogy program
#
# Copyright (C) 2007 Stephane Charette
#
# 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 ... | gpl-2.0 | -2,988,615,628,191,587,300 | 38.318182 | 79 | 0.557225 | false |
seecr/meresco-components | test/contextsettest.py | 1 | 3135 | ## begin license ##
#
# "Meresco Components" are components to build searchengines, repositories
# and archives, based on "Meresco Core".
#
# Copyright (C) 2007-2009 SURF Foundation. http://www.surf.nl
# Copyright (C) 2007 SURFnet. http://www.surfnet.nl
# Copyright (C) 2007-2010 Seek You Too (CQ2) http://www.cq2.nl
# C... | gpl-2.0 | -5,610,995,235,555,742,000 | 43.15493 | 95 | 0.732695 | false |
thaim/ansible | test/units/modules/network/fortimanager/test_fmgr_device_group.py | 39 | 7388 | # Copyright 2018 Fortinet, Inc.
#
# 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 distributed in the... | mit | 3,202,694,831,933,005,300 | 35.574257 | 110 | 0.566459 | false |
jcpeterson/Dallinger | dallinger/command_line.py | 1 | 41012 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""The Dallinger command-line utility."""
from __future__ import print_function
from __future__ import unicode_literals
from collections import Counter
from functools import wraps
from six.moves import shlex_quote as quote
import inspect
import os
import pkg_resources
import... | mit | -1,018,743,007,768,215,400 | 32.430669 | 99 | 0.610599 | false |
ericd/redeem | redeem/ColdEnd.py | 2 | 1384 | #!/usr/bin/env python
"""
This class represent a Dallas 1-wire teperature probe
Author: Elias Bakken
email: elias(dot)bakken(at)gmail(dot)com
Website: http://www.thing-printer.com
License: GNU GPL v3: http://www.gnu.org/copyleft/gpl.html
Redeem is free software: you can redistribute it and/or modify
it under the te... | gpl-3.0 | 9,035,245,618,469,390,000 | 32.756098 | 76 | 0.67052 | false |
ict-felix/stack | expedient/src/python/expedient/common/rpc4django/tests/test_rpcdispatcher.py | 4 | 6116 | # -*- coding: utf-8 -*-
'''
RPC Dispatcher Tests
--------------------
'''
import base64
import unittest
from xmlrpclib import Fault, Binary
from xml.dom.minidom import parseString
from expedient.common.rpc4django.rpcdispatcher import *
from expedient.common.rpc4django.jsonrpcdispatcher import *
BINARY_STRING = '\x9... | apache-2.0 | 1,787,016,050,829,793,300 | 38.303226 | 349 | 0.604892 | false |
sharkykh/SickRage | sickrage/show/recommendations/imdb.py | 6 | 4451 | # coding=utf-8
from __future__ import print_function, unicode_literals
import os
import posixpath
import re
from datetime import date
from bs4 import BeautifulSoup
import sickbeard
from sickbeard import helpers
from sickrage.helper.encoding import ek
class imdbPopular(object):
def __init__(self):
"""G... | gpl-3.0 | 8,298,486,709,083,881,000 | 34.047244 | 143 | 0.493372 | false |
masschallenge/django-accelerator | accelerator/sitetree_navigation/sub_navigation/home_subnav_definition.py | 1 | 1446 | from accelerator.sitetree_navigation.utils import (
create_subnav,
delete_nav_tree,
FLUENT_REDIRECT_URL
)
from accelerator_abstract.models import BaseUserRole
FINALIST = BaseUserRole.FINALIST
ALUMNI = BaseUserRole.ALUM
MENTOR = BaseUserRole.MENTOR
JUDGE = BaseUserRole.JUDGE
HOME_SUBNAV_TREE = {
"title... | mit | -1,448,129,926,444,802,000 | 24.368421 | 54 | 0.594744 | false |
grangier/django-11599 | tests/regressiontests/one_to_one_regress/models.py | 14 | 4195 | from django.db import models
class Place(models.Model):
name = models.CharField(max_length=50)
address = models.CharField(max_length=80)
def __unicode__(self):
return u"%s the place" % self.name
class Restaurant(models.Model):
place = models.OneToOneField(Place)
serves_hot_dogs = models.B... | bsd-3-clause | 8,958,603,607,665,994,000 | 28.131944 | 110 | 0.700358 | false |
alexissmirnov/donomo | donomo_archive/lib/reportlab/lib/logger.py | 2 | 1759 | #!/bin/env python
#Copyright ReportLab Europe Ltd. 2000-2004
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/logger.py
__version__=''' $Id: logger.py 2385 2004-06-17 15:26:05Z rgbecker $ '''
from sys import stderr
class Logger:
'''
... | bsd-3-clause | -3,797,249,120,930,019,000 | 27.852459 | 102 | 0.579875 | false |
infobloxopen/infoblox-netmri | infoblox_netmri/api/broker/v3_3_0/spm_end_hosts_new_end_hosts_grid_broker.py | 14 | 6645 | from ..broker import Broker
class SpmEndHostsNewEndHostsGridBroker(Broker):
controller = "spm_end_hosts_new_end_hosts_grids"
def index(self, **kwargs):
"""Lists the available spm end hosts new end hosts grids. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. O... | apache-2.0 | 1,608,022,435,594,502,400 | 49.725191 | 709 | 0.615199 | false |
jeremiahyan/odoo | addons/sale_timesheet/wizard/sale_make_invoice_advance.py | 4 | 2717 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
class SaleAdvancePaymentInv(models.TransientModel):
_inherit = "sale.advance.payment.inv"
@api.model
def _default_invoicing_timesheet_enabled(self):
if 'active_... | gpl-3.0 | -1,454,953,447,092,756,700 | 54.44898 | 247 | 0.688627 | false |
eminorhan/inevitable-probability | ffwd/ffwd_visual_search_expt.py | 1 | 6409 | # -*- coding: utf-8 -*-
"""
Created on Thu Apr 28 16:52:18 2016 by emin
"""
import os
import sys
import theano
import theano.tensor as T
import numpy as np
from lasagne.layers import InputLayer, ReshapeLayer, DenseLayer
from generators import VisualSearchTaskFFWD
import lasagne.layers
import lasagne.nonlinearities
imp... | gpl-3.0 | 714,067,417,921,553,800 | 53.786325 | 221 | 0.587923 | false |
openstack/os-vif | os_vif/objects/subnet.py | 1 | 1458 | # 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 | -4,539,834,330,058,362,400 | 32.906977 | 78 | 0.702332 | false |
kivy-garden/garden.roulette | __init__.py | 1 | 18435 | '''
Roulette
========
:class:`Roulette` provides a rolling way of selecting values like in iOS
and android date pickers.
Dependencies
------------
*. the garden package ``kivy.garden.tickline``. Use ``garden install tickline``
to install it like any other garden package.
*. the garden package ``kivy.garden.roul... | mit | -3,605,893,889,259,479,600 | 36.167339 | 81 | 0.614755 | false |
sherpper/GitDns | server/server_newifi/fetch-ip.py | 1 | 1169 | #coding=utf-8
import urllib
import httplib2
import re
http = httplib2.Http()
url = 'http://192.168.99.1/cgi-bin/luci'
body = {'bd_web':'1','password': 'gzvtccisco1', 'username': 'root'}
headers = {'Content-type': 'application/x-www-form-urlencoded'}
response, content = http.request(url, 'POST', heade... | gpl-2.0 | 7,764,759,344,948,414,000 | 23.97619 | 93 | 0.648236 | false |
palladius/gcloud | packages/gsutil/boto/tests/unit/utils/test_utils.py | 1 | 3815 | # Copyright (c) 2010 Robert Mela
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish, dis-
# ... | gpl-3.0 | -2,880,563,659,014,396,400 | 34 | 81 | 0.672608 | false |
applidium/bike-share-prediction | prediction/rows.py | 1 | 1330 | class Row:
def __init__(self, result):
self.result = result
def to_json(self):
return { column: float(value) for column, value in zip(Row.columns(), self.result) }
@classmethod
def columns(self):
return ["open", "weather", "temperature", "wind_speed", "humidity", "hour", "minut... | bsd-3-clause | 6,625,729,682,248,487,000 | 37 | 163 | 0.633083 | false |
home-assistant/home-assistant | homeassistant/components/huisbaasje/const.py | 5 | 4177 | """Constants for the Huisbaasje integration."""
from huisbaasje.const import (
SOURCE_TYPE_ELECTRICITY,
SOURCE_TYPE_ELECTRICITY_IN,
SOURCE_TYPE_ELECTRICITY_IN_LOW,
SOURCE_TYPE_ELECTRICITY_OUT,
SOURCE_TYPE_ELECTRICITY_OUT_LOW,
SOURCE_TYPE_GAS,
)
from homeassistant.const import (
DEVICE_CLASS... | apache-2.0 | -1,428,964,231,850,748,000 | 28.20979 | 66 | 0.598516 | false |
zstyblik/infernal-twin | build/reportlab/tests/test_pdfbase_pdfmetrics.py | 14 | 4269 | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
#test_pdfbase_pdfmetrics_widths
"""
Various tests for PDF metrics.
The main test prints out a PDF documents enabling checking of widths of every
glyph in every standard font. Long!
"""
__version__='''$Id$'''
from reportlab.lib.testutils i... | gpl-3.0 | 7,221,468,264,060,175,000 | 32.614173 | 157 | 0.635043 | false |
leeseulstack/openstack | neutron/tests/unit/test_ipv6.py | 8 | 3267 | # Copyright 2013 IBM Corp.
# 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 app... | apache-2.0 | -3,716,370,443,977,929,700 | 35.3 | 78 | 0.620753 | 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.