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 |
|---|---|---|---|---|---|---|---|---|---|---|
marcore/edx-platform | openedx/core/djangoapps/course_groups/tests/test_partition_scheme.py | 11 | 16146 | """
Test the partitions and partitions service
"""
import json
from django.conf import settings
import django.test
from mock import patch
from nose.plugins.attrib import attr
from unittest import skipUnless
from courseware.masquerade import handle_ajax, setup_masquerade
from courseware.tests.test_masquerade import S... | agpl-3.0 | 2,745,528,029,768,890,400 | 38 | 113 | 0.636938 | false |
pridemusvaire/yowsup | yowsup/demos/contacts/layer.py | 61 | 1230 | from yowsup.layers.interface import YowInterfaceLayer, ProtocolEntityCallback
from yowsup.layers.protocol_contacts.protocolentities import GetSyncIqProtocolEntity, ResultSyncIqProtocolEntity
from yowsup.layers.protocol_iq.protocolentities import ErrorIqProtocolEntity
import threading
import l... | gpl-3.0 | -4,089,603,681,280,434,000 | 42.928571 | 113 | 0.75935 | false |
hehongliang/tensorflow | tensorflow/contrib/receptive_field/python/util/graph_compute_order_test.py | 46 | 5947 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 4,252,205,585,018,405,000 | 38.125 | 85 | 0.631747 | false |
LouisePaulDelvaux/openfisca-france-data | openfisca_france_data/collection_builders/erfs_collection_builder.py | 4 | 3767 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# OpenFisca -- A versatile microsimulation software
# By: OpenFisca Team <contact@openfisca.fr>
#
# Copyright (C) 2011, 2012, 2013, 2014, 2015 OpenFisca Team
# https://github.com/openfisca
#
# This file is part of OpenFisca.
#
# OpenFisca is free software; you can redist... | agpl-3.0 | 2,062,054,628,862,375,200 | 38.652632 | 106 | 0.694186 | false |
akaariai/django | tests/auth_tests/test_forms.py | 21 | 23635 | from __future__ import unicode_literals
import datetime
import re
from django import forms
from django.contrib.auth.forms import (
AuthenticationForm, PasswordChangeForm, PasswordResetForm,
ReadOnlyPasswordHashField, ReadOnlyPasswordHashWidget, SetPasswordForm,
UserChangeForm, UserCreationForm,
)
from dja... | bsd-3-clause | -918,712,061,910,073,100 | 40.684303 | 118 | 0.623651 | false |
vintasoftware/tapioca-instagram | tapioca_instagram/resource_mapping.py | 1 | 4415 | # coding: utf-8
RESOURCE_MAPPING = {
'user': {
'resource': 'users/{id}',
'docs': 'https://instagram.com/developer/endpoints/users/#get_users',
'methods': ['GET']
},
'self_feed': {
'resource': 'users/self/feed',
'docs': 'https://instagram.com/developer/endpoints/users... | mit | -4,746,672,797,662,131,000 | 36.10084 | 102 | 0.567837 | false |
Antiun/odoo | addons/mrp_operations/mrp_operations.py | 193 | 27173 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 5,108,587,929,554,945,000 | 48.495446 | 184 | 0.567549 | false |
aricchen/openHR | openerp/addons/sale/wizard/sale_make_invoice.py | 17 | 3187 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | agpl-3.0 | 7,715,066,521,380,230,000 | 43.263889 | 136 | 0.603075 | false |
endlessm/chromium-browser | third_party/catapult/third_party/gsutil/gslib/vendored/boto/tests/unit/emr/test_instance_group_args.py | 112 | 2056 | #!/usr/bin/env python
# Author: Charlie Schluting <charlie@schluting.com>
#
# Test to ensure initalization of InstanceGroup object emits appropriate errors
# if bidprice is not specified, but allows float, int, Decimal.
from decimal import Decimal
from tests.compat import unittest
from boto.emr.instance_group import ... | bsd-3-clause | -8,264,888,236,077,656,000 | 35.070175 | 80 | 0.590953 | false |
OffenesJena/codefor.de | download_avatars.py | 8 | 2259 | #!/usr/bin/env python
import glob
import os
import logging
import requests
import yaml
logging.basicConfig(level=logging.DEBUG)
BLACKLIST = ('blog', '_site',)
def get_github(username):
response = requests.get('https://api.github.com/users/' + username)
response_json = response.json()
if 'avatar_url' in... | mit | 5,592,974,189,496,195,000 | 29.527027 | 79 | 0.505091 | false |
hsoft/pdfmasher | ebooks/oeb/transforms/metadata.py | 1 | 3518 | # Copyright 2009, Kovid Goyal <kovid@kovidgoyal.net>
# Copyright 2013 Hardcoded Software (http://www.hardcoded.net)
#
# This software is licensed under the "GPL v3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.hardcoded.net/lic... | gpl-3.0 | -1,719,173,323,472,805,000 | 35.645833 | 91 | 0.585844 | false |
usc-isi-i2/WEDC | wedc/domain/core/data/loader.py | 1 | 4946 | import os
from wedc.domain.entities.post import Post
# from wedc.domain.core.data.loaders import es_loader
from wedc.domain.core.data import cleaner
mapping = None
def load_input(input):
# data from intermediate data
# data[0]: source id
# data[1]: content, original content of data, \t\n\r should be rem... | apache-2.0 | -6,941,543,725,105,340,000 | 30.303797 | 123 | 0.553579 | false |
mrquim/repository.mrquim | repo/plugin.video.netflix/resources/lib/MSLv2.py | 4 | 28905 | # pylint: skip-file
# -*- coding: utf-8 -*-
# Author: trummerjo
# Module: MSLHttpRequestHandler
# Created on: 26.01.2017
# License: MIT https://goo.gl/5bMj3H
import re
import sys
import zlib
import gzip
import json
import time
import base64
import random
import uuid
from StringIO import StringIO
from datetime import d... | gpl-2.0 | 1,827,192,101,511,799,300 | 37.083004 | 167 | 0.52932 | false |
PennartLoettring/Poettrix | rootfs/usr/lib/python3.4/test/test_json/test_encode_basestring_ascii.py | 101 | 2146 | from collections import OrderedDict
from test.test_json import PyTest, CTest
CASES = [
('/\\"\ucafe\ubabe\uab98\ufcde\ubcda\uef4a\x08\x0c\n\r\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?', '"/\\\\\\"\\ucafe\\ubabe\\uab98\\ufcde\\ubcda\\uef4a\\b\\f\\n\\r\\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?"'),
('\u0123\u4567\u89ab\ucdef\u... | gpl-2.0 | 6,556,221,830,508,785,000 | 47.772727 | 198 | 0.527027 | false |
misterhat/youtube-dl | youtube_dl/extractor/exfm.py | 15 | 2060 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
class ExfmIE(InfoExtractor):
IE_NAME = 'exfm'
IE_DESC = 'ex.fm'
_VALID_URL = r'https?://(?:www\.)?ex\.fm/song/(?P<id>[^/]+)'
_SOUNDCLOUD_URL = r'http://(?:www\.)?api\.soundcloud\.com/tracks/([^/]+)/stream'
_TESTS... | unlicense | -5,441,314,930,307,520,000 | 34.517241 | 107 | 0.48835 | false |
SickGear/SickGear | lib/apprise/plugins/NotifyGrowl/gntp/config.py | 2 | 2162 | # Copyright: 2013 Paul Traylor
# These sources are released under the terms of the MIT license: see LICENSE
"""
The gntp.config module is provided as an extended GrowlNotifier object that takes
advantage of the ConfigParser module to allow us to setup some default values
(such as hostname, password, and port) in a mor... | gpl-3.0 | 4,345,323,528,081,039,000 | 27.077922 | 81 | 0.713691 | false |
hlin117/statsmodels | statsmodels/tools/tests/test_tools.py | 26 | 18818 | """
Test functions for models.tools
"""
from statsmodels.compat.python import lrange, range
import numpy as np
from numpy.random import standard_normal
from numpy.testing import (assert_equal, assert_array_equal,
assert_almost_equal, assert_string_equal, TestCase)
from nose.tools import (asse... | bsd-3-clause | 7,519,520,345,345,790,000 | 36.787149 | 79 | 0.588054 | false |
paweljasinski/ironpython3 | Src/StdLib/Lib/stat.py | 106 | 4400 | """Constants/functions for interpreting results of os.stat() and os.lstat().
Suggested usage: from stat import *
"""
# Indices for stat struct members in the tuple returned by os.stat()
ST_MODE = 0
ST_INO = 1
ST_DEV = 2
ST_NLINK = 3
ST_UID = 4
ST_GID = 5
ST_SIZE = 6
ST_ATIME = 7
ST_MTIME = 8
ST_CTIME = 9
... | apache-2.0 | 822,559,798,850,826,400 | 27.387097 | 82 | 0.608409 | false |
sigmavirus24/requests-oauthlib | requests_oauthlib/oauth2_auth.py | 45 | 1505 | from __future__ import unicode_literals
from oauthlib.oauth2 import WebApplicationClient, InsecureTransportError
from oauthlib.oauth2 import is_secure_transport
class OAuth2(object):
"""Adds proof of authorization (OAuth2 token) to the request."""
def __init__(self, client_id=None, client=None, token=None):
... | isc | -7,779,328,432,287,463,000 | 42 | 77 | 0.636545 | false |
jfortier/guessit | guessit/transfo/guess_episodes_rexps.py | 10 | 4405 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2013 Nicolas Wack <wackou@gmail.com>
#
# GuessIt is free software; you can redistribute it and/or modify it under
# the terms of the Lesser GNU General Public License as published by
# the Free ... | lgpl-3.0 | -3,134,093,835,434,858,500 | 54.0625 | 312 | 0.646992 | false |
Mimino666/tc-marathoner | setup.py | 1 | 2438 | import os
def fullsplit(path, result=None):
'''Split a pathname into components (the opposite of os.path.join)
in a platform-neutral way.
'''
if result is None:
result = []
head, tail = os.path.split(path)
if head == '':
return [tail] + result
if head == path:
retur... | mit | -7,284,567,905,338,712,000 | 26.704545 | 87 | 0.623052 | false |
alfa-addon/addon | plugin.video.alfa/lib/cloudscraper/cf_assistant.py | 1 | 10179 | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
# cloudscaper+alfa_assistant
# ------------------------------------------------------------------------------
import sys
PY3 = False
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
... | gpl-3.0 | 1,019,010,152,337,068,400 | 35.35 | 134 | 0.50953 | false |
laurenrevere/osf.io | addons/dataverse/serializer.py | 32 | 3736 | from addons.base.serializer import OAuthAddonSerializer
from addons.dataverse import client
from addons.dataverse.settings import DEFAULT_HOSTS
from website.util import api_url_for, web_url_for
class DataverseSerializer(OAuthAddonSerializer):
addon_short_name = 'dataverse'
REQUIRED_URLS = []
# Include ... | apache-2.0 | 4,837,990,967,475,719,000 | 37.122449 | 95 | 0.607602 | false |
GoogleCloudPlatform/training-data-analyst | courses/machine_learning/deepdive2/end_to_end_ml/labs/serving/application/lib/werkzeug/security.py | 11 | 8106 | # -*- coding: utf-8 -*-
"""
werkzeug.security
~~~~~~~~~~~~~~~~~
Security related helpers such as secure password hashing tools.
:copyright: 2007 Pallets
:license: BSD-3-Clause
"""
import codecs
import hashlib
import hmac
import os
import posixpath
from random import SystemRandom
from struct import... | apache-2.0 | -6,546,251,928,721,270,000 | 31.554217 | 80 | 0.642117 | false |
noba3/KoTos | addons/script.module.youtube.dl/lib/youtube_dl/extractor/youku.py | 4 | 8214 | # coding: utf-8
from __future__ import unicode_literals
import base64
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_ord,
)
from ..utils import (
ExtractorError,
sanitized_Request,
)
class YoukuIE(InfoExtractor):
IE_NAME = 'youku'
IE_DESC = '优酷'
_VAL... | gpl-2.0 | 6,754,706,921,658,387,000 | 30.44186 | 94 | 0.443171 | false |
zengenti/ansible | lib/ansible/modules/cloud/ovirt/ovirt_snapshots_facts.py | 8 | 4358 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 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
#... | gpl-3.0 | -4,530,197,152,867,237,400 | 30.810219 | 138 | 0.631712 | false |
aronasorman/kolibri | kolibri/logger/migrations/0001_initial_redone.py | 7 | 5172 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-09 17:25
from __future__ import unicode_literals
import django.core.validators
import django.db.models.deletion
import kolibri.content.models
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependen... | mit | 7,341,460,942,066,274,000 | 56.466667 | 176 | 0.606342 | false |
LiberatorUSA/GUCEF | dependencies/Ogre/Tools/Blender2.6Export/ogre_mesh_exporter/mesh_properties.py | 16 | 7068 | # ##### BEGIN MIT LICENSE BLOCK #####
# Copyright (C) 2011 by Lih-Hern Pang
# 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 ... | apache-2.0 | 3,984,982,280,069,874,700 | 28.45 | 139 | 0.687748 | false |
jwessel/meta-overc | meta-cube/recipes-support/overc-system-agent/files/overc-system-agent-1.2/Overc/package.py | 3 | 1167 | import sys, os
from Overc.utils import Process
class Package(object):
def __init__(self):
pass
def _smartpm(self, args, chroot=None):
cmd = []
if chroot != None:
cmd.append("chroot")
cmd.append(chroot)
cmd.append("/usr/bin/smart")
cmd.append(ar... | mit | 412,755,472,705,511,600 | 34.363636 | 155 | 0.563839 | false |
vasily-v-ryabov/pywinauto | pywinauto/tests/allcontrols.py | 5 | 2735 | # GUI Application automation and testing library
# Copyright (C) 2006-2018 Mark Mc Mahon and Contributors
# https://github.com/pywinauto/pywinauto/graphs/contributors
# http://pywinauto.readthedocs.io/en/latest/credits.html
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or with... | bsd-3-clause | -1,386,814,431,765,535,700 | 35.465753 | 80 | 0.707495 | false |
OpenLinkedSocialData/fbEgo | JulianaSouza23022014_fb/scripts/rdfFBEgo.py | 3 | 2851 | import social as S, percolation as P, os
import importlib
importlib.reload(P.rdf)
importlib.reload(S.fb)
importlib.reload(S.fb.gdf2rdf)
importlib.reload(S.fb.gdf2rdf)
c=P.utils.check
fnames_=[
("RenatoFabbri19112014.gdf",None,"781909429","renato.fabbri"),
("PedroPauloRocha10032013.gdf",None,"836944624"... | cc0-1.0 | -3,012,146,817,386,061,000 | 47.322034 | 82 | 0.662224 | false |
2013Commons/HUE-SHARK | desktop/core/ext-py/simplejson/build/lib.linux-i686-2.7/simplejson/tests/test_scanstring.py | 125 | 3835 | import sys
import decimal
from unittest import TestCase
import simplejson as json
import simplejson.decoder
class TestScanString(TestCase):
def test_py_scanstring(self):
self._test_scanstring(simplejson.decoder.py_scanstring)
def test_c_scanstring(self):
if not simplejson.decoder.c_scanstring... | apache-2.0 | -3,491,223,937,395,966,500 | 33.54955 | 102 | 0.539505 | false |
alanjw/GreenOpenERP-Win-X86 | python/Lib/encodings/mac_roman.py | 93 | 14043 | """ Python Character Mapping Codec mac_roman generated from 'MAPPINGS/VENDORS/APPLE/ROMAN.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(s... | agpl-3.0 | 530,941,046,409,620,900 | 43.742671 | 112 | 0.532507 | false |
jashank/rust | src/etc/mirror-all-snapshots.py | 53 | 1372 | #!/usr/bin/env python
#
# Copyright 2011-2013 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT lice... | apache-2.0 | 909,388,123,585,095,800 | 29.488889 | 68 | 0.629738 | false |
canwe/NewsBlur | apps/rss_feeds/migrations/0042_feed_classifier_counts.py | 18 | 6475 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'FeedData.feed_classifier_counts'
db.add_column('rss_feeds_feeddata', 'feed_classifier_coun... | mit | -2,160,547,729,959,079,200 | 70.944444 | 159 | 0.556448 | false |
hoehnp/navit_test | lib/python2.7/site-packages/setuptools/glob.py | 242 | 5207 | """
Filename globbing utility. Mostly a copy of `glob` from Python 3.5.
Changes include:
* `yield from` and PEP3102 `*` removed.
* `bytes` changed to `six.binary_type`.
* Hidden files are not ignored.
"""
import os
import re
import fnmatch
from setuptools.extern.six import binary_type
__all__ = ["glob", "iglob", ... | gpl-2.0 | -3,988,756,724,639,302,700 | 28.585227 | 78 | 0.632994 | false |
y4n9squared/HEtest | hetest/python/common/array_view_test.py | 1 | 7993 | # *****************************************************************
# Copyright (c) 2013 Massachusetts Institute of Technology
#
# Developed exclusively at US Government expense under US Air Force contract
# FA8721-05-C-002. The rights of the United States Government to use, modify,
# reproduce, release, perform, displ... | bsd-2-clause | -1,242,896,593,175,665,200 | 33.304721 | 81 | 0.564369 | false |
pku9104038/edx-platform | lms/lib/comment_client/thread.py | 5 | 5458 | from .utils import merge_dict, strip_blank, strip_none, extract, perform_request
from .utils import CommentClientRequestError
import models
import settings
class Thread(models.Model):
accessible_fields = [
'id', 'title', 'body', 'anonymous', 'anonymous_to_peers', 'course_id',
'closed', 'tags', 'v... | agpl-3.0 | 7,533,273,469,503,033,000 | 38.839416 | 126 | 0.615244 | false |
Ensighten/Diamond | src/collectors/xen_collector/test/testxen.py | 31 | 2972 | #!/usr/bin/python
# coding=utf-8
###############################################################################
from test import CollectorTestCase
from test import get_collector_config
from test import unittest
from test import run_only
from mock import Mock
from mock import patch
from diamond.collector import Colle... | mit | 888,628,898,874,706,000 | 29.020202 | 79 | 0.52961 | false |
SSDS-Croatia/SSDS-2017 | Day-2/segmentation/data.py | 1 | 2603 | import math
import numpy as np
import pickle
from os.path import join
import PIL.Image as pimg
def _shuffle_data(data):
idx = np.arange(data[0].shape[0])
np.random.shuffle(idx)
shuffled_data = []
for d in data:
if type(d) == np.ndarray:
d = d[idx]
else:
d = [d[i] for i in idx]
shuffled... | mit | -2,506,131,220,010,712,600 | 30.373494 | 88 | 0.591241 | false |
vukae/eve-wspace | evewspace/core/searches.py | 17 | 1198 | # Eve W-Space
# Copyright (C) 2013 Andrew Austin and other contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option... | gpl-3.0 | -9,204,582,467,634,191,000 | 46.92 | 74 | 0.727045 | false |
PaulWay/spacewalk | client/rhel/rhn-client-tools/src/up2date_client/debUtils.py | 8 | 2514 | # Client code for Update Agent
# Copyright (c) 2011--2012 Red Hat, Inc. Distributed under GPLv2.
#
# Author: Simon Lukasik
# Lukas Durfina
#
import os
import apt
import gettext
t = gettext.translation('rhn-client-tools', fallback=True)
_ = t.ugettext
# FIXME: After Debian bug 187019 is resolved
def verifyPa... | gpl-2.0 | -3,821,955,802,603,991,000 | 27.568182 | 76 | 0.592681 | false |
mandx/django-extensions | conftest.py | 24 | 2501 | from django.conf import settings
def pytest_configure():
import sys
try:
import django # NOQA
except ImportError:
print("Error: missing test dependency:")
print(" django library is needed to run test suite")
print(" you can install it with 'pip install django'")
... | mit | -9,114,663,590,314,641,000 | 33.736111 | 77 | 0.60096 | false |
ohmini/thaifoodapi | lib/django/contrib/gis/db/backends/postgis/adapter.py | 373 | 1695 | """
This object provides quoting for GEOS geometries into PostgreSQL/PostGIS.
"""
from __future__ import unicode_literals
from psycopg2 import Binary
from psycopg2.extensions import ISQLQuote
class PostGISAdapter(object):
def __init__(self, geom, geography=False):
"Initializes on the geometry."
... | bsd-3-clause | -470,717,320,550,358,600 | 32.235294 | 91 | 0.623009 | false |
c0defreak/python-for-android | python3-alpha/python3-src/Lib/tkinter/test/runtktests.py | 67 | 2312 | """
Use this module to get and run all tk tests.
tkinter tests should live in a package inside the directory where this file
lives, like test_tkinter.
Extensions also should live in packages following the same rule as above.
"""
import os
import sys
import unittest
import importlib
import test.support
this_dir_path ... | apache-2.0 | -2,743,044,351,817,735,000 | 31.111111 | 78 | 0.59083 | false |
alxgu/ansible | lib/ansible/modules/cloud/ovirt/ovirt_group_facts.py | 55 | 3393 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 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
#... | gpl-3.0 | -8,297,860,206,584,393,000 | 30.12844 | 138 | 0.649278 | false |
qedi-r/home-assistant | homeassistant/components/aladdin_connect/cover.py | 5 | 3509 | """Platform for the Aladdin Connect cover component."""
import logging
from aladdin_connect import AladdinConnectClient
import voluptuous as vol
from homeassistant.components.cover import (
PLATFORM_SCHEMA,
SUPPORT_CLOSE,
SUPPORT_OPEN,
CoverDevice,
)
from homeassistant.const import (
CONF_PASSWORD... | apache-2.0 | -7,982,645,345,304,082,000 | 27.528455 | 84 | 0.630379 | false |
foufou55/Sick-Beard | sickbeard/name_parser/regexes.py | 23 | 14128 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lice... | gpl-3.0 | -3,000,792,136,307,503,600 | 51.520446 | 103 | 0.342228 | false |
Cornices/cornice.ext.swagger | tests/converters/test_schema.py | 1 | 9298 | import unittest
import colander
from cornice_swagger.converters import convert_schema as convert
from cornice_swagger.converters import TypeConversionDispatcher
from cornice_swagger.converters.exceptions import NoSuchConverter
from ..support import AnyType, AnyTypeConverter
class ConversionTest(unittest.TestCase):... | apache-2.0 | -8,650,403,382,306,959,000 | 28.801282 | 80 | 0.489783 | false |
radzhome/AWS-ElasticBeanstalk-CLI | eb/macosx/python2.7/scli/cli_parse.py | 4 | 8732 | #!/usr/bin/env python
# ==============================================================================
# Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Amazon Software License (the "License"). You may not use
# this file except in compliance with the License. A copy of th... | apache-2.0 | 2,001,969,872,881,285,600 | 40.779904 | 101 | 0.603985 | false |
liorvh/infernal-twin | build/reportlab/build/lib.linux-i686-2.7/reportlab/graphics/charts/axes.py | 25 | 90090 | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
__version__=''' $Id$ '''
__doc__="""Collection of axes for charts.
The current collection comprises axes for charts using cartesian
coordinate systems. All axes might have tick marks and labels.
There are two dichotomies for axes: one of X... | gpl-3.0 | -416,420,842,387,300,030 | 37.51646 | 222 | 0.557842 | false |
taedla01/MissionPlanner | Lib/distutils/config.py | 53 | 4336 | """distutils.pypirc
Provides the PyPIRCCommand class, the base class for the command classes
that uses .pypirc in the distutils.command package.
"""
import os
from ConfigParser import ConfigParser
from distutils.cmd import Command
DEFAULT_PYPIRC = """\
[distutils]
index-servers =
pypi
[pypi]
use... | gpl-3.0 | 3,420,882,641,728,098,300 | 33.834711 | 72 | 0.481089 | false |
michalliu/OpenWrt-Firefly-Libraries | staging_dir/host/lib/python2.7/idlelib/ToolTip.py | 36 | 3173 | # general purpose 'tooltip' routines - currently unused in idlefork
# (although the 'calltips' extension is partly based on this code)
# may be useful for some purposes in (or almost in ;) the current project scope
# Ideas gleaned from PySol
from Tkinter import *
class ToolTipBase:
def __init__(self, button):
... | gpl-2.0 | 787,373,312,131,041,000 | 31.71134 | 79 | 0.601639 | false |
ofer43211/unisubs | apps/teams/migrations/0036_auto__add_field_team_last_notification_time.py | 5 | 20459 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Team.last_notification_time'
db.add_column('teams_team', 'last_notification_time', sel... | agpl-3.0 | 8,935,499,554,529,356,000 | 90.334821 | 217 | 0.562393 | false |
amiguez/youtube-dl | youtube_dl/extractor/mixcloud.py | 91 | 4042 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_urllib_parse_unquote
from ..utils import (
ExtractorError,
HEADRequest,
str_to_int,
)
class MixcloudIE(InfoExtractor):
_VALID_URL = r'^(?:https?://)?(?:www\.)?mixcloud\.com/([^/]+)/([^/]+)... | unlicense | 1,307,641,842,548,481,300 | 37.495238 | 150 | 0.527214 | false |
youprofit/servo | python/mach/mach/test/test_logger.py | 128 | 1244 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import, unicode_literals
import logging
import time
import unittest
from mach.logging ... | mpl-2.0 | 6,300,685,622,351,400,000 | 25.468085 | 75 | 0.649518 | false |
SalesforceEng/Providence | db.py | 1 | 3022 | '''
Copyright (c) 2015, Salesforce.com, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the foll... | bsd-3-clause | -7,398,281,481,704,139,000 | 50.237288 | 755 | 0.733951 | false |
ToontownUprising/src | toontown/ai/DistributedWinterCarolingTarget.py | 1 | 1681 | from otp.speedchat import SpeedChatGlobals
from direct.directnotify import DirectNotifyGlobal
from direct.distributed import DistributedObject
from direct.interval.IntervalGlobal import *
class DistributedWinterCarolingTarget(DistributedObject.DistributedObject):
notify = DirectNotifyGlobal.directNotify.newCategor... | mit | 8,437,470,636,168,577,000 | 38.093023 | 103 | 0.710291 | false |
mancoast/CPythonPyc_test | cpython/279_test_applesingle.py | 136 | 1810 | # Copyright (C) 2003 Python Software Foundation
import unittest
import os
from test import test_support
import struct
MacOS = test_support.import_module('MacOS')
# The following should exist if MacOS does.
import applesingle
AS_MAGIC=0x00051600
AS_VERSION=0x00020000
dataforkdata = 'hello\r\0world\n'
resourceforkdata... | gpl-3.0 | -2,690,825,104,443,091,500 | 24.492958 | 76 | 0.61989 | false |
archhurd/archweb | main/migrations/0053_auto__add_field_package_pgp_signature.py | 4 | 11962 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
db.add_column('packages', 'pgp_signature', self.gf('django.db.models.fields.TextField')(null=True, blank=True), keep_defaul... | gpl-2.0 | 7,636,504,626,880,431,000 | 77.697368 | 182 | 0.542384 | false |
ahellander/pyurdme | examples/yeast_polarization/G_protein_cycle.py | 5 | 4520 | #!/usr/bin/env python
""" pyURDME model file for the polarization 1D example. """
import os
import sys
import pyurdme
import dolfin
import math
import matplotlib.pyplot as plt
import numpy
# Sub domain for Periodic boundary condition
class PeriodicBoundary1D(dolfin.SubDomain):
def __init__(self, a=0.0, b=1.0):
... | gpl-3.0 | -2,417,725,370,629,094,400 | 39.357143 | 126 | 0.606416 | false |
hryamzik/ansible | lib/ansible/modules/messaging/rabbitmq_policy.py | 23 | 4534 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, John Dewey <john@dewey.ws>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | -1,214,598,406,726,056,200 | 26.149701 | 92 | 0.59109 | false |
josh-willis/pycbc | pycbc/io/hdf.py | 2 | 47604 | # convenience classes for accessing hdf5 trigger files
# the 'get_column()' method is implemented parallel to
# the existing pylal.SnglInspiralUtils functions
import h5py
import numpy as np
import logging
import inspect
from itertools import chain
from six.moves import range
from six.moves import cPickle as pickle
f... | gpl-3.0 | -5,109,794,435,754,905,000 | 35.930954 | 100 | 0.554827 | false |
pipermerriam/flex | tests/validation/request/test_request_header_validation.py | 1 | 2831 | import pytest
from flex.validation.request import (
validate_request,
)
from flex.error_messages import MESSAGES
from flex.exceptions import ValidationError
from flex.constants import (
INTEGER,
HEADER,
ARRAY,
CSV,
SSV,
TSV,
PIPES,
)
from tests.factories import (
SchemaFactory,
... | mit | 4,481,980,611,239,610,000 | 23.833333 | 80 | 0.430943 | false |
wooga/airflow | tests/providers/apache/hive/hooks/test_hive.py | 1 | 34850 | #
# 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... | apache-2.0 | -7,962,563,278,150,800,000 | 42.077874 | 109 | 0.557245 | false |
AndrewPashkin/python-tempo | src/tempo/unit.py | 1 | 3115 | # coding=utf-8
"""Date/time related constants."""
import datetime as dt
from tempo.utils import Enum
# Minimum and maximum points of time within which
# the library is able to operate
MIN = dt.datetime(year=1, month=1, day=1)
MAX = dt.datetime(year=9999, month=12, day=31,
hour=23, minute=59, second=... | bsd-3-clause | -8,751,283,755,822,592,000 | 28.666667 | 78 | 0.553451 | false |
Inspq/ansible | lib/ansible/modules/storage/netapp/netapp_e_amg_sync.py | 6 | 10639 | #!/usr/bin/python
# (c) 2016, NetApp, 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.... | gpl-3.0 | 783,407,736,493,815,200 | 38.113971 | 214 | 0.60203 | false |
openstack/heat | heat/tests/openstack/nova/test_server.py | 1 | 246323 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | 2,634,266,759,482,630,000 | 45.041682 | 79 | 0.556538 | false |
cchurch/ansible | lib/ansible/modules/network/onyx/onyx_bgp.py | 30 | 19451 | #!/usr/bin/python
#
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 | -5,319,627,112,599,079,000 | 41.562363 | 122 | 0.582387 | false |
mscuthbert/abjad | abjad/tools/selectiontools/Selection.py | 2 | 16294 | # -*- encoding: utf-8 -*-
import collections
import types
from abjad.tools.topleveltools import iterate
class Selection(object):
r'''A selection of components.
'''
### CLASS VARIABLES ###
__slots__ = (
'_music',
)
### INITIALIZER ###
def __init__(self, music=None):
... | gpl-3.0 | 1,631,421,803,813,197,000 | 32.73706 | 79 | 0.563213 | false |
mitnk/letsencrypt | tests/letstest/multitester.py | 3 | 21239 | """
Letsencrypt Integration Test Tool
- Configures (canned) boulder server
- Launches EC2 instances with a given list of AMIs for different distros
- Copies letsencrypt repo and puts it on the instances
- Runs letsencrypt tests (bash scripts) on all of these
- Logs execution and success/fail for debugging
Notes:
- ... | apache-2.0 | 4,414,412,070,362,354,000 | 37.899267 | 113 | 0.6021 | false |
plockaby/dart | tool/lib/dart/tool/commands/assign.py | 1 | 3693 | from . import BaseCommand
from termcolor import colored
import urllib.parse
import traceback
import json
class AssignCommand(BaseCommand):
def run(self, fqdn, process_name, process_environment, **kwargs):
try:
data = {
"op": "add",
"path": "/assignments",
... | artistic-2.0 | 616,538,483,134,726,900 | 42.964286 | 206 | 0.538587 | false |
isandlaTech/cohorte-demos | led/dump/led-demo-raspberry/cohorte/dist/cohorte-1.0.0-1.0.0-20141201.234602-19-python-distribution/repo/sleekxmpp/util/__init__.py | 9 | 1067 | # -*- coding: utf-8 -*-
"""
sleekxmpp.util
~~~~~~~~~~~~~~
Part of SleekXMPP: The Sleek XMPP Library
:copyright: (c) 2012 Nathanael C. Fritz, Lance J.T. Stout
:license: MIT, see LICENSE for more details
"""
from sleekxmpp.util.misc_ops import bytes, unicode, hashes, hash, \
... | apache-2.0 | 7,363,623,898,730,126,000 | 23.813953 | 72 | 0.559513 | false |
pgmillon/ansible | lib/ansible/modules/network/fortios/fortios_application_rule_settings.py | 24 | 7379 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# 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 Lic... | gpl-3.0 | -7,112,581,237,923,554,000 | 27.164122 | 91 | 0.617428 | false |
albertomurillo/ansible | test/units/modules/remote_management/oneview/test_oneview_network_set.py | 68 | 6324 | # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from units.compat import unittest, mock
from hpe_test_utils import OneViewBaseTestCase
from oneview_module_loader import NetworkSetModule
FAKE_MSG_ERROR = 'F... | gpl-3.0 | -6,911,373,146,383,650,000 | 33.557377 | 107 | 0.622233 | false |
mc-coal/mc-coal | lib/unidecode/x010.py | 252 | 4110 | data = (
'k', # 0x00
'kh', # 0x01
'g', # 0x02
'gh', # 0x03
'ng', # 0x04
'c', # 0x05
'ch', # 0x06
'j', # 0x07
'jh', # 0x08
'ny', # 0x09
'nny', # 0x0a
'tt', # 0x0b
'tth', # 0x0c
'dd', # 0x0d
'ddh', # 0x0e
'nn', # 0x0f
'tt', # 0x10
'th', # 0x11
'd', # 0x12
'dh', ... | agpl-3.0 | 5,161,984,202,591,703,000 | 14.992218 | 17 | 0.296837 | false |
carquois/blobon | blobon/blogs/migrations/0037_auto__add_info_email.py | 1 | 17530 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Info_email'
db.create_table('blogs_info_email', (
('id', self.gf('django.db.mode... | mit | -7,984,299,733,615,290,000 | 84.517073 | 182 | 0.538791 | false |
lecaoquochung/ddnb.django | django/forms/forms.py | 4 | 27651 | """
Form classes
"""
from __future__ import unicode_literals
from collections import OrderedDict
import copy
import datetime
import warnings
from django.core.exceptions import ValidationError, NON_FIELD_ERRORS
from django.forms.fields import Field, FileField
from django.forms.utils import flatatt, ErrorDict, ErrorLi... | bsd-3-clause | -3,632,018,464,845,781,500 | 39.190407 | 126 | 0.581245 | false |
mscuthbert/abjad | abjad/tools/pitchtools/test/test_pitchtools_NamedInterval___repr__.py | 2 | 1436 | # -*- encoding: utf-8 -*-
from abjad import *
def test_pitchtools_NamedInterval___repr___01():
interval = pitchtools.NamedInterval('perfect', 1)
repr = interval.__repr__()
assert repr == "NamedInterval('P1')"
interval = pitchtools.NamedInterval('augmented', 1)
repr = interval.__repr__()
ass... | gpl-3.0 | -5,732,255,963,404,039,000 | 28.9375 | 56 | 0.623259 | false |
CVL-dev/cvl-fabric-launcher | pyinstaller-2.1/pyinstaller-gui.py | 7 | 3444 | #!/usr/bin/python
#-----------------------------------------------------------------------------
# Copyright (c) 2013, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License with exception
# for distributing bootloader.
#
# The full license is in the file COPYING.txt, distribute... | gpl-3.0 | -3,754,130,981,575,673,000 | 32.115385 | 84 | 0.571138 | false |
gregdek/ansible | lib/ansible/modules/remote_management/cpm/cpm_plugcontrol.py | 55 | 7369 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (C) 2018 Red Hat Inc.
# Copyright (C) 2018 Western Telematic Inc. <kenp@wti.com>
#
# GNU General Public License v3.0+
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FI... | gpl-3.0 | -8,687,063,013,481,784,000 | 31.606195 | 151 | 0.647442 | false |
ikmaak/Printrun | printrun/pronsole.py | 12 | 68420 | #!/usr/bin/env python
# This file is part of the Printrun suite.
#
# Printrun 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.
#
# Prin... | gpl-3.0 | 5,657,364,277,955,840,000 | 39.896593 | 373 | 0.522347 | false |
dodocat/git-repo | subcmds/manifest.py | 89 | 2770 | #
# Copyright (C) 2009 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | -7,687,652,358,478,052,000 | 31.588235 | 75 | 0.629603 | false |
tectronics/freeermind | src/test/draw2d_dnd_2.py | 1 | 2844 | from org.eclipse.draw2d import MouseMotionListener
from org.eclipse.draw2d import FigureCanvas
from org.eclipse.draw2d import Panel
from org.eclipse.draw2d import Figure
from org.eclipse.draw2d import XYLayout
from org.eclipse.swt.widgets import Display;
from org.eclipse.swt.widgets import Shell;
from org.eclipse.draw2... | gpl-3.0 | 435,905,232,119,136,640 | 30.611111 | 93 | 0.64346 | false |
andreyvit/pyjamas | examples/libtest/LoopTest.py | 12 | 2559 | from UnitTest import UnitTest
import time
from write import write, writebr
class A(object):
def __init__(self, x):
self.x = x
def getX(self):
return self.x
def fib(n):
if n<3.0:
return 1.0
return fib(n-2.0)+fib(n-1.0)
def int_fib(n):
if n<3:
return 1
return i... | apache-2.0 | -8,620,520,087,840,947,000 | 21.252174 | 53 | 0.404455 | false |
tylerjereddy/scipy | scipy/fft/_pocketfft/tests/test_real_transforms.py | 10 | 16426 | from os.path import join, dirname
from typing import Callable, Dict, Tuple, Union, Type
import numpy as np
from numpy.testing import (
assert_array_almost_equal, assert_equal, assert_allclose)
import pytest
from pytest import raises as assert_raises
from scipy.fft._pocketfft.realtransforms import (
dct, idct,... | bsd-3-clause | 782,302,559,394,684,500 | 32.318458 | 83 | 0.577316 | false |
mganeva/mantid | qt/applications/workbench/workbench/plotting/test/test_figureinteraction.py | 1 | 5158 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2019 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
# This file is part of the mantid workbench.... | gpl-3.0 | -4,390,809,304,738,587,600 | 40.596774 | 98 | 0.649089 | false |
yanchen036/tensorflow | tensorflow/python/kernel_tests/self_adjoint_eig_op_test.py | 22 | 9533 | # 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,019,013,743,174,933,800 | 36.679842 | 80 | 0.619217 | false |
welex91/ansible-modules-core | network/nxos/nxos_feature.py | 9 | 8152 | #!/usr/bin/python
#
# 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 distribut... | gpl-3.0 | -8,502,177,418,573,236,000 | 28.970588 | 79 | 0.628189 | false |
mcus/SickRage | lib/github/GitTreeElement.py | 74 | 3880 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | gpl-3.0 | 6,631,456,899,851,443,000 | 39 | 104 | 0.488402 | false |
shakamunyi/neutron-vrrp | neutron/tests/unit/test_db_plugin_level.py | 19 | 3370 | # Copyright (c) 2014 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/licenses/LICENSE-2.0
#
# Unless require... | apache-2.0 | 1,904,653,338,930,402,000 | 39.119048 | 78 | 0.591098 | false |
lyft/incubator-airflow | airflow/sensors/bash.py | 5 | 3435 | #
# 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... | apache-2.0 | -6,178,540,836,485,324,000 | 38.94186 | 84 | 0.634061 | false |
schleichdi2/OpenNfr_E2_Gui-6.0 | lib/python/Screens/DVD.py | 1 | 20193 | import os
from enigma import eTimer, iPlayableService, iServiceInformation, eServiceReference, iServiceKeys, getDesktop
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Screens.ChoiceBox import ChoiceBox
from Screens.HelpMenu import HelpableScreen
from Screens.InfoBarGenerics import Info... | gpl-2.0 | -6,087,106,145,837,986,000 | 31.052381 | 193 | 0.707423 | false |
alfredoavanzosc/odoomrp-wip-1 | partner_risk_insurance/models/res_partner.py | 29 | 2789 |
# -*- encoding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of th... | agpl-3.0 | 1,833,531,968,395,571,000 | 47.929825 | 79 | 0.531373 | false |
PhasesResearchLab/ESPEI | espei/optimizers/graph.py | 1 | 3616 | """
Defines a OptNode and OptGraph to be used by OptimizerBase subclasses.
Together they define the path of one or more optimizations and can be used to
store and replay optimization history.
"""
import copy
class OptNode:
"""
Node as the result of an optimization.
Attributes
----------
parameter... | mit | 4,464,459,577,778,459,600 | 26.603053 | 80 | 0.589602 | false |
amrdraz/brython | www/src/Lib/test/test_struct.py | 26 | 25262 | import array
import unittest
import struct
import sys
from test import support
ISBIGENDIAN = sys.byteorder == "big"
IS32BIT = sys.maxsize == 0x7fffffff
integer_codes = 'b', 'B', 'h', 'H', 'i', 'I', 'l', 'L', 'q', 'Q', 'n', 'N'
byteorders = '', '@', '=', '<', '>', '!'
def iter_integer_formats(byteorders=byteorders):... | bsd-3-clause | -8,219,505,701,301,692,000 | 41.103333 | 86 | 0.500277 | false |
denys-duchier/django | django/db/backends/oracle/creation.py | 18 | 17682 | import sys
from django.conf import settings
from django.db.backends.base.creation import BaseDatabaseCreation
from django.db.utils import DatabaseError
from django.utils.crypto import get_random_string
from django.utils.functional import cached_property
TEST_DATABASE_PREFIX = 'test_'
class DatabaseCreation(BaseData... | bsd-3-clause | -353,833,719,928,789,950 | 47.845304 | 116 | 0.583418 | false |
rghe/ansible | lib/ansible/modules/web_infrastructure/apache2_module.py | 27 | 8137 | #!/usr/bin/python
# coding: utf-8 -*-
# (c) 2013-2014, Christian Berendt <berendt@b1-systems.de>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': ... | gpl-3.0 | 8,481,753,148,685,344,000 | 29.475655 | 133 | 0.606612 | false |
jitseniesen/spyder-memory-profiler | setup.py | 2 | 2960 | # -*- coding: utf-8 -*-
#
# Copyright © 2013 Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see LICENSE.txt for details)
from setuptools import setup, find_packages
import os
import os.path as osp
def get_version():
"""Get version from source file"""
import codecs
with codec... | mit | 1,446,748,121,726,427,000 | 35.085366 | 82 | 0.647178 | false |
uber/pyro | tests/contrib/timeseries/test_lgssm.py | 1 | 3798 | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import torch
from tests.common import assert_equal
from pyro.contrib.timeseries import GenericLGSSM, GenericLGSSMWithGPNoiseModel
import pytest
@pytest.mark.parametrize('model_class', ['lgssm', 'lgssmgp'])
@pytest.mark.parametri... | apache-2.0 | -5,304,451,870,754,146,000 | 47.692308 | 105 | 0.679568 | 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.