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 |
|---|---|---|---|---|---|---|---|---|---|---|
aignas/project_euler | src/completed/solution104.py | 2 | 3071 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Project Euler 104
Question:
The Fibonacci sequence is defined by the recurrence relation:
Fn = Fn−1 + Fn−2, where F1 = 1 and F2 = 1.
It turns out that F541, which contains 113 digits, is the first
Fibonacci number for which the last nine digits ar... | gpl-3.0 | 311,591,602,052,016,200 | 22.234848 | 79 | 0.594066 | false |
zenweasel/hendrix | hendrix/resources.py | 1 | 5118 | import os
import sys
import importlib
from twisted.web import resource, static
from twisted.web.wsgi import WSGIResource
import logging
logger = logging.getLogger(__name__)
class HendrixResource(resource.Resource):
"""
HendrixResource initialises a WSGIResource and stores it as wsgi_resource.
It also o... | mit | -9,037,357,989,585,551,000 | 34.296552 | 117 | 0.665494 | false |
jiwang576/incubator-airflow | docs/conf.py | 23 | 8948 | # -*- coding: utf-8 -*-
#
# Airflow documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 9 20:50:01 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# A... | apache-2.0 | -4,600,793,877,415,594,500 | 30.286713 | 90 | 0.707085 | false |
Impactstory/total-impact-core | test/unit_tests/test_models.py | 2 | 2450 | from nose.tools import raises, assert_equals, nottest
import os, unittest, hashlib, json, pprint, datetime
from time import sleep
from werkzeug.security import generate_password_hash
from totalimpact import models, tiredis
from totalimpact.providers import bibtex, github
from totalimpact import REDIS_UNITTEST_DATABASE_... | mit | 7,698,163,245,883,986,000 | 33.507042 | 94 | 0.59551 | false |
hansjorg/rust-ci | tpt/ppatrigger/management/commands/fetchbuilds.py | 2 | 4184 | import traceback
from dateutil import parser
from django.db import connection
from django.core.management.base import BaseCommand
from django.db import IntegrityError
from ppatrigger.models import Project
from ppatrigger.models import Build
import travisclient
import json
class Command(BaseCommand):
args = ''
... | apache-2.0 | 5,352,895,900,383,375,000 | 43.042105 | 103 | 0.459369 | false |
MycChiu/tensorflow | tensorflow/compiler/aot/tests/make_test_graphs.py | 27 | 4478 | # 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 | 6,892,081,276,979,587,000 | 34.259843 | 80 | 0.693613 | false |
keith-pedersen/delphes | python/LeptonControlPlots.py | 15 | 1505 | from BaseControlPlots import BaseControlPlots
# Requirements:
# event.muons
# event.electrons
class LeptonControlPlots(BaseControlPlots):
"""A class to create control plots for leptons"""
def __init__(self, dir=None, dataset=None, mode="plots"):
# create output file if needed. If no file is given, it m... | gpl-3.0 | 4,277,532,438,591,927,300 | 33.204545 | 93 | 0.643189 | false |
xzturn/tensorflow | tensorflow/python/client/virtual_gpu_test.py | 17 | 9731 | # 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 | 7,085,940,314,819,711,000 | 38.556911 | 80 | 0.644127 | false |
Tisseo/navitia | source/jormungandr/jormungandr/autocomplete/__init__.py | 7 | 1297 | # encoding: utf-8
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobilit... | agpl-3.0 | 3,307,676,820,902,341,600 | 39.53125 | 82 | 0.753277 | false |
laplaceliu/readthedocs.org | readthedocs/rtd_tests/tests/test_project_symlinks.py | 23 | 4206 | import os
from functools import wraps
from mock import patch
from django.test import TestCase
from readthedocs.builds.models import Version
from readthedocs.projects.models import Project
from readthedocs.projects.symlinks import symlink_translations
def patched(fn):
'''Patches calls to run_on_app_servers on in... | mit | 6,129,964,824,988,754,000 | 34.344538 | 94 | 0.607466 | false |
shishaochen/TensorFlow-0.8-Win | tensorflow/python/training/moving_averages_test.py | 9 | 10390 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 4,180,381,887,809,863,700 | 39.585938 | 80 | 0.626372 | false |
cl4u2/chirp | chirp/directory.py | 1 | 4465 | # Copyright 2010 Dan Smith <dsmith@danplanet.com>
# Copyright 2012 Tom Hayward <tom@tomh.us>
#
# 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 opti... | gpl-3.0 | 4,150,729,444,155,058,700 | 32.571429 | 74 | 0.630683 | false |
WoLpH/CouchPotatoServer | couchpotato/core/downloaders/transmission/__init__.py | 10 | 3417 | from .main import Transmission
def start():
return Transmission()
config = [{
'name': 'transmission',
'groups': [
{
'tab': 'downloaders',
'list': 'download_providers',
'name': 'transmission',
'label': 'Transmission',
'description': 'Use <... | gpl-3.0 | 4,895,560,613,471,390,000 | 35.351064 | 129 | 0.366696 | false |
bclau/nova | nova/image/glance.py | 1 | 21879 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... | apache-2.0 | 4,636,261,614,438,614,000 | 35.771429 | 79 | 0.594817 | false |
disqus/zumanji | src/zumanji/github.py | 1 | 2438 | from django.conf import settings
import logging
import requests
github_logger = logging.getLogger('github.api')
class RequestError(Exception):
pass
class NotFound(Exception):
pass
class GitHub(object):
def __init__(self, access_token, host='https://api.github.com'):
self.access_token = acces... | apache-2.0 | -7,869,444,380,287,161,000 | 28.373494 | 91 | 0.57178 | false |
leag/swftools | wx/gui/boldstatictext.py | 10 | 1137 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# gpdf2swf.py
# graphical user interface for pdf2swf
#
# Part of the swftools package.
#
# Copyright (c) 2008,2009 Matthias Kramm <kramm@quiss.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public Li... | gpl-2.0 | 1,137,047,202,852,911,900 | 33.454545 | 78 | 0.71416 | false |
muupan/chainer | tests/chainer_tests/functions_tests/array_tests/test_select_item.py | 3 | 2059 | import unittest
import numpy
import chainer
from chainer import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
class TestSelectItem(unittest.TestCase):
in_shape = (10, 5)
out_shape = (10,)
def setUp(self):
self.... | mit | 2,196,119,370,395,829,200 | 28.414286 | 79 | 0.60272 | false |
rohan07/flask-peewee | flask_peewee/serializer.py | 7 | 1411 | import datetime
import sys
from peewee import Model
from flask_peewee.utils import get_dictionary_from_model
from flask_peewee.utils import get_model_from_dictionary
class Serializer(object):
date_format = '%Y-%m-%d'
time_format = '%H:%M:%S'
datetime_format = ' '.join([date_format, time_format])
def... | mit | 7,912,314,017,186,323,000 | 31.813953 | 63 | 0.627215 | false |
DifferentSC/incubator-reef | dev/change_version.py | 6 | 9030 | # 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 | -8,572,030,765,708,308,000 | 31.717391 | 142 | 0.618715 | false |
danielru/pySDC | projects/parallelSDC/minimization.py | 1 | 2450 | import numpy as np
import scipy.optimize as opt
import matplotlib.pylab as plt
import matplotlib
from pySDC.implementations.collocation_classes.gauss_radau_right import CollGaussRadau_Right
def main():
def rho(x):
return max(abs(np.linalg.eigvals(np.eye(M) - np.diag([x[i] for i in range(M)]).dot(coll.Qma... | bsd-2-clause | 1,681,728,549,459,951,000 | 32.108108 | 112 | 0.614694 | false |
matty-jones/MorphCT | morphct/code/obtain_chromophores.py | 1 | 42989 | import copy
import itertools
import os
import sys
import numpy as np
from collections import defaultdict
from scipy.spatial import Delaunay
from morphct.code import helper_functions as hf
class chromophore:
def __init__(
self,
chromo_ID,
chromophore_CG_sites,
CG_morphology_dict,
... | gpl-3.0 | -9,052,352,564,157,246,000 | 44.251579 | 88 | 0.56996 | false |
tbabej/astropy | astropy/io/ascii/connect.py | 4 | 2658 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# This file connects the readers/writers to the astropy.table.Table class
from __future__ import absolute_import, division, print_function
import re
import functools
from .. import registry as io_registry
from ...table import Table
from ...extern.six.mo... | bsd-3-clause | 1,356,188,286,023,232,300 | 27.580645 | 92 | 0.65237 | false |
gizatt/director | src/python/ddapp/depthimageprovider.py | 6 | 1182 | import ddapp.vtkAll as vtk
import ddapp.vtkNumpy as vnp
import drc as lcmdrc
import numpy as np
import time
class DepthImageProvider(object):
def __init__(self):
self.source = vtk.vtkMapServerSource()
self.source.Start()
def waitForSceneHeight(self):
viewId = lcmdrc.data_request_t.HE... | bsd-3-clause | -3,404,061,133,051,140,600 | 30.105263 | 102 | 0.652284 | false |
kangkot/fbthrift | thrift/test/py/SimpleJSONReadTest.py | 12 | 4981 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
# @lint-avoid-pyflakes2
# @lint-avoid-pyflakes3
import unittest
import math
from thrift.protocol import TSimpleJSONProtocol
from thrift.transport.TTransport import TMem... | apache-2.0 | 1,021,787,994,650,664,100 | 38.220472 | 76 | 0.579 | false |
JeromeParadis/django-mailing | mailing/mail.py | 1 | 5077 | from django.conf import settings
from django.core.mail import EmailMultiAlternatives, EmailMessage
from django.template.loader import render_to_string
from django.utils import translation
# Define exception classes
# --------------------------------
class MailerInvalidBodyError(Exception):
def __init__(sel... | mit | 587,348,768,199,324,700 | 47.291262 | 280 | 0.592279 | false |
debugger06/MiroX | lib/fileutil.py | 3 | 14425 | # Miro - an RSS based video player application
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
# Participatory Culture Foundation
#
# 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; eithe... | gpl-2.0 | -3,731,946,045,298,159,000 | 34.883085 | 80 | 0.632929 | false |
samuel/kokki | kokki/cookbooks/mdadm/libraries/providers.py | 2 | 1145 |
import subprocess
from kokki import Provider
class ArrayProvider(Provider):
def action_create(self):
if not self.exists():
subprocess.check_call(["/sbin/mdadm",
"--create", self.resource.name,
"-R",
"-c", str(self.resource.chunksize),... | bsd-3-clause | 4,079,987,464,155,967,500 | 33.69697 | 72 | 0.517031 | false |
witgo/spark | python/pyspark/statcounter.py | 8 | 5149 | #
# 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 us... | apache-2.0 | -6,891,856,690,993,652,000 | 31.18125 | 99 | 0.571956 | false |
mortonjt/scipy | scipy/io/tests/test_mmio.py | 40 | 11787 | #!/usr/bin/env python
from __future__ import division, print_function, absolute_import
from tempfile import mkdtemp, mktemp
import os
import shutil
from numpy import array,transpose
from numpy.testing import TestCase, run_module_suite, assert_array_almost_equal, \
assert_equal, rand
import scipy.sparse
fr... | bsd-3-clause | 3,614,891,984,012,234,000 | 29.068878 | 82 | 0.464664 | false |
home-assistant/home-assistant | homeassistant/components/gdacs/sensor.py | 5 | 5128 | """Feed Entity Manager Sensor support for GDACS Feed."""
from __future__ import annotations
import logging
from homeassistant.components.sensor import SensorEntity
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.util import dt
from .con... | apache-2.0 | -8,803,254,087,218,481,000 | 33.884354 | 88 | 0.631825 | false |
GreenWolf13/GordonLite | plugins/scp.py | 1 | 8760 | """
scp.py: Written by Gnosis for Grapewhistle 2009, inherited by Glacon in 2011, even later inherited by Gordon in 2015 and expanded by GreenWolf.
v1.1 of basic in-channel data acquisition plugins for IRC channels of the SCP Foundation.
"""
from util import hook, http
import threading
from time import sleep
import sql... | unlicense | -8,271,666,105,897,371,000 | 38.818182 | 143 | 0.567237 | false |
ehuss/Sublime-Wrap-Plus | tests/test_wrap.py | 1 | 4875 | import os
import re
import sublime
import unittest
plugin_path = os.path.dirname(os.path.dirname(__file__))
# Sentinel to indicate that a setting should not be set.
UNSET = '__UNSET__'
DEFAULT_SETTINGS = {
'word_wrap': False,
'wrap_width': 0,
'rulers': [],
'tab_size': 4,
'translate_tabs_to_spaces... | mit | 1,502,760,912,017,990,400 | 36.5 | 91 | 0.528821 | false |
timm/timmnix | pypy3-v5.5.0-linux64/lib_pypy/_sqlite3.py | 1 | 48936 | #-*- coding: utf-8 -*-
# pysqlite2/dbapi.py: pysqlite DB-API module
#
# Copyright (C) 2007-2008 Gerhard Häring <gh@ghaering.de>
#
# This file is part of pysqlite.
#
# This software is provided 'as-is', without any express or implied
# warranty. In no event will the authors be held liable for any damages
# arising from... | mit | -6,683,226,338,269,561,000 | 34.230382 | 96 | 0.530602 | false |
dhalperi/incubator-beam | sdks/python/apache_beam/runners/api/beam_fn_api_pb2_grpc.py | 3 | 6684 | #
# 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 us... | apache-2.0 | 8,502,844,380,194,271,000 | 31.604878 | 86 | 0.709306 | false |
sacharya/nova | nova/api/openstack/compute/contrib/volumes.py | 4 | 24854 | # Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | 1,694,395,710,938,700,800 | 33.14011 | 79 | 0.60111 | false |
frePPLe/frePPLe | src/setup.py | 1 | 1852 | #
# Copyright (C) 2015 by frePPLe bv
#
# This library 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 the License, or
# (at your option) any later version.
#
# This library is distri... | agpl-3.0 | -422,228,479,393,895,400 | 35.313725 | 92 | 0.725702 | false |
xuru/restler | tests/test_json_django_serialization.py | 1 | 9609 | from env_setup import setup_django; setup_django()
import json
from datetime import datetime, time
from unittest import TestCase
from restler import UnsupportedTypeError
from restler.serializers import ModelStrategy, to_json
from tests.django_models import connection, install_model, Model1, Poll, Choice
class Tes... | mit | -869,937,953,381,092,200 | 39.0375 | 109 | 0.63222 | false |
Saint-Joe/weewx | bin/weewx/imagegenerator.py | 4 | 12634 | #
# Copyright (c) 2009-2015 Tom Keffer <tkeffer@gmail.com>
#
# See the file LICENSE.txt for your full rights.
#
"""Generate images for up to an effective date.
Needs to be refactored into smaller functions."""
from __future__ import with_statement
import time
import datetime
import syslog
import os.path
import... | gpl-3.0 | -5,267,385,790,621,854,000 | 50.567347 | 145 | 0.507678 | false |
peterdemin/stupid | stupid/lunchbot.py | 1 | 3957 | import datetime
import logging
import time
from stupid.chatbot import ChatBot, every_minute, trigger
from stupid.utils import weekday
from stupid.weather import WeatherForecast
logger = logging.getLogger(__name__)
class LunchBot(ChatBot):
ASK_TIMEOUT = 15
EXCLUDE = {
"sobolevi": (datetime.datetime(... | bsd-3-clause | -2,628,365,634,184,614,400 | 38.178218 | 107 | 0.577963 | false |
huangtao-sh/orange | orange/tools/mongodb.py | 1 | 2892 | # 项目:标准库函数
# 模块:配置mongodb数据库
# 作者:黄涛
# License:GPL
# Email:huangtao.sh@icloud.com
# 创建:2016-11-19 10:18
# 修订:2018-10-25 重写安装程序
# 修订:2019-12-15 09:35 修改写配置文件功能
from orange.pykit.pyver import Ver, get_cur_ver
from orange import sh, Path
from pkgutil import get_data
MONGOFILES = ('mongo.exe', 'mongod.exe', 'mongodump.ex... | gpl-2.0 | -289,762,516,641,525,800 | 28.977528 | 80 | 0.611319 | false |
anaruse/chainer | tests/chainer_tests/functions_tests/activation_tests/test_lstm.py | 4 | 7906 | import unittest
import numpy
import chainer
from chainer.backends import cuda
from chainer import functions
from chainer.functions.activation import lstm
from chainer import gradient_check
from chainer import testing
from chainer.testing import backend
def _sigmoid(x):
half = x.dtype.type(0.5)
return numpy.... | mit | -2,363,930,353,243,313,700 | 33.524017 | 79 | 0.599798 | false |
roadmapper/ansible | test/units/modules/network/fortios/test_fortios_firewall_service_custom.py | 21 | 19284 | # Copyright 2019 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... | gpl-3.0 | -5,491,412,293,693,135,000 | 46.149144 | 142 | 0.450114 | false |
thorshand/electionBuster | electionBuster.py | 1 | 13338 | #!/usr/bin/python3.5
##################################################
## Author: Joshua Franklin, Kevin Franklin
## Example input to start:
## sudo ./electionBuster.py -f josh -l franklin -y 2014 -e senate -s pennsyltucky
## 6 arguments are passed:
## 1: The first name of the candidate (mandatory)
## 2: The mi... | mit | 7,579,118,042,481,559,000 | 34.663102 | 204 | 0.645299 | false |
lj8385174/PyComms | MPU6050/Examples/gpsdData.py | 1 | 1914 | #! /usr/bin/python
# Written by Dan Mandle http://dan.mandle.me September 2012
# License: GPL 2.0
import os
from gps import *
from time import *
import time
import threading
class GpsPoller(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.gpsd = gps(mode=WATCH_ENABLE) #starting the str... | mit | -6,798,758,300,697,332,000 | 31.440678 | 98 | 0.633751 | false |
manqala/erpnext | erpnext/schools/doctype/course_schedule/test_course_schedule.py | 7 | 2683 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
import datetime
from frappe.utils import today, to_timedelta
from erpnext.schools.utils import OverlapError
# test_records = frappe.get_test_recor... | gpl-3.0 | -1,052,708,622,552,771,500 | 37.884058 | 113 | 0.738725 | false |
lermit/mod-webui | module/plugins/depgraph/depgraph.py | 3 | 4719 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2012:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
# This file is part of Shinken.
#
# Shinken is free software: you can redis... | agpl-3.0 | -6,691,723,807,787,364,000 | 33.195652 | 248 | 0.613054 | false |
assassinen/python_training | _test/test_1.py | 1 | 1315 | __author__ = 'NovikovII'
from point import Point
import string
import random
# #random_contact()
# print(random_contact())
#
#
# testdata = [
# (str(n1)+str(n2)+str(n3)+str(n4))
# for n1 in range (10)
# for n2 in range (10)
# for n3 in range (10)
# for n4 in range (10)
# ]
#
# for i in testdat... | apache-2.0 | 22,715,702,390,826,624 | 14.962963 | 107 | 0.552204 | false |
sparkslabs/kamaelia_ | Code/Python/Kamaelia/Kamaelia/Visualisation/Axon/ExtraWindowFurniture.py | 3 | 3691 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License,... | apache-2.0 | 1,493,377,255,343,978,800 | 34.490385 | 92 | 0.653481 | false |
tequa/ammisoft | ammimain/WinPython-64bit-2.7.13.1Zero/python-2.7.13.amd64/Lib/site-packages/idlexlib/idlexMain.py | 2 | 12959 | #! /usr/bin/env python
## """
## Copyright(C) 2011 The Board of Trustees of the University of Illinois.
## All rights reserved.
##
## Developed by: Roger D. Serwy
## University of Illinois
##
## Permission is hereby granted, free of charge, to any person obtaining
## a copy of th... | bsd-3-clause | 6,166,643,924,308,765,000 | 34.119241 | 92 | 0.570337 | false |
cemoody/chainer | chainer/functions/evaluation/accuracy.py | 18 | 1320 | import numpy
from chainer import cuda
from chainer import function
from chainer.utils import type_check
class Accuracy(function.Function):
def check_type_forward(self, in_types):
type_check.expect(in_types.size() == 2)
x_type, t_type = in_types
type_check.expect(
x_type.dtyp... | mit | 7,409,308,581,682,934,000 | 27.695652 | 77 | 0.595455 | false |
gitfred/fuel-extension-volume-manager | volume_manager/alembic_migrations/migrations/versions/001_add_volumes_table.py | 4 | 3469 | # Copyright 2015 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | 1,113,558,085,920,697,900 | 31.420561 | 78 | 0.668492 | false |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/GL/EXT/texture_integer.py | 9 | 3866 | '''OpenGL extension EXT.texture_integer
This module customises the behaviour of the
OpenGL.raw.GL.EXT.texture_integer to provide a more
Python-friendly API
Overview (from the spec)
Fixed-point textures in unextended OpenGL have integer components,
but those values are taken to represent floating-point values in... | gpl-3.0 | 5,966,556,501,597,512,000 | 43.448276 | 79 | 0.801086 | false |
chrys87/fenrir | src/fenrirscreenreader/soundDriver/gstreamerDriver.py | 1 | 4151 | #!/bin/python
# -*- coding: utf-8 -*-
# Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributers.
from fenrirscreenreader.core import debug
import time, threading
from fenrirscreenreader.core.soundDriver import soundDriver
_gstreamerAvailable = False
try:
import gi
from gi.repository import GLib
... | lgpl-3.0 | 8,183,369,646,824,083,000 | 35.734513 | 138 | 0.623464 | false |
t794104/ansible | lib/ansible/modules/cloud/vmware/vmware_vm_facts.py | 8 | 8911 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Joseph Callen <jcallen () csc.com>
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2018, Fedor Vompe <f.vompe () comptek.ru>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import abso... | gpl-3.0 | 5,044,652,790,495,908,000 | 31.641026 | 105 | 0.586466 | false |
lthurlow/Network-Grapher | proj/external/networkx-1.7/build/lib.linux-i686-2.7/networkx/testing/tests/test_utils.py | 32 | 3058 | from nose.tools import *
import networkx as nx
from networkx.testing import *
# thanks to numpy for this GenericTest class (numpy/testing/test_utils.py)
class _GenericTest(object):
def _test_equal(self, a, b):
self._assert_func(a, b)
def _test_not_equal(self, a, b):
try:
self._asse... | mit | -1,808,296,592,899,554,000 | 27.314815 | 74 | 0.538914 | false |
vmturbo/nova | nova/tests/unit/fake_request_spec.py | 5 | 3302 | # 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 | 6,353,026,256,658,427,000 | 35.285714 | 78 | 0.641732 | false |
TobiBu/POV | Raspi/pov_control.py | 1 | 3927 | #!/usr/bin/env python
import time
from dotstar import Adafruit_DotStar
import get_freq
import threading
class povThread(threading.Thread):
def __init__(self, FreqAverage=5, Path="pov/", start=""):
threading.Thread.__init__(self)
self.datapin = 2 # GPIO-Numbering!
self.clockpin = 3 # GPIO-Numbering!
se... | mit | 1,625,728,731,807,414,800 | 24.835526 | 114 | 0.648077 | false |
vaygr/ansible | lib/ansible/plugins/action/fetch.py | 28 | 10628 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# 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) an... | gpl-3.0 | -3,589,237,397,303,847,400 | 47.752294 | 153 | 0.553444 | false |
gnina/scripts | calccenters.py | 1 | 1799 | #!/usr/bin/env python3
'''Glob through files in current directory looking for */*_ligand.sdf and */*.gninatypes (assuming PDBbind layout).
Calculate the distance between centers. If types files are passed, create versions with this information,
optionally filtering.
'''
import sys,glob,argparse,os
import numpy as n... | bsd-3-clause | -4,663,845,698,511,210,000 | 34.98 | 115 | 0.657588 | false |
KatonaLab/vividstorm | controllers/viewer/StormLUT.py | 1 | 36415 | from pyqtgraph.Qt import QtGui, QtCore
from pyqtgraph.python2_3 import sortList
import pyqtgraph.functions as fn
import pyqtgraph as pg
import weakref
from pyqtgraph.pgcollections import OrderedDict
from pyqtgraph.colormap import ColorMap
import numpy as np
__all__ = ['TickSliderItem', 'GradientEditorItem']
Gradien... | lgpl-3.0 | 1,666,403,142,351,277,600 | 37.988223 | 220 | 0.504051 | false |
Teknologforeningen/tf-info | manager/migrations/0001_initial.py | 2 | 2539 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
m... | bsd-3-clause | -4,253,794,352,449,102,300 | 53.021277 | 140 | 0.599449 | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/aio/operations/_network_interfaces_operations.py | 1 | 63787 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | -1,274,775,144,004,012,000 | 51.327317 | 354 | 0.653017 | false |
abtink/openthread | tests/toranj/test-702-multi-radio-discovery-by-rx.py | 4 | 8658 | #!/usr/bin/env python3
#
# Copyright (c) 2020, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | bsd-3-clause | -5,075,471,036,851,587,000 | 41.029126 | 121 | 0.636059 | false |
PaulMakepeace/refine-client-py | google/refine/history.py | 2 | 1201 | #!/usr/bin/env python
"""
OpenRefine history: parsing responses.
"""
# Copyright (c) 2011 Paul Makepeace, Real Programmers. All rights reserved.
# 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,... | gpl-3.0 | -1,874,277,796,525,987,000 | 39.033333 | 85 | 0.720233 | false |
mssever/sleep-inhibit | sleepinhibit/config.py | 1 | 3549 | #!/usr/bin/python3
# coding=utf-8
#
# Copyright © 2016 Scott Severance
# Code mixed in from Caffeine Plus and Jacob Vlijm
#
# 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 th... | gpl-3.0 | 1,605,912,444,025,256,700 | 40.255814 | 142 | 0.657835 | false |
Darthkpo/xtt | openpyxl/charts/tests/test_axis.py | 1 | 1529 | import pytest
@pytest.mark.parametrize("value, result",
[
(1, None),
(0.9, 10),
(0.09, 100),
(-0.09, 100)
]
)
def test_less_than_one(value,... | mit | 3,049,963,018,847,955,500 | 29.58 | 60 | 0.419228 | false |
Darkess00/Touch-The-Square | main.py | 1 | 5699 | #imports
import pygame, random, sys, menu
from pygame.locals import *
try:
import android
except ImportError:
android = None
#constantes
WIDTH = 640
HEIGHT = 480
REWARDS = {'1': 20, '2': 30, '3': 40, '4': 50, '5': 60}
salir=False
#clases
class Square(pygame.sprite.Sprite):
def __init__(self,info,screen):
pygame... | gpl-2.0 | -3,495,836,190,296,383,000 | 25.146789 | 112 | 0.660642 | false |
ewheeler/rapidpro | temba/ivr/views.py | 1 | 2953 | from __future__ import unicode_literals
import json
from django.core.exceptions import ValidationError
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from temba.utils import build_json_response
from temba.flows.models import Flow, FlowRu... | agpl-3.0 | 2,395,663,859,341,281,300 | 37.350649 | 109 | 0.593634 | false |
frankhale/nyana | nyana/plugins/SnippetViewPlugin.py | 1 | 18007 | # SnippetViewPlugin - Provides a templated/abbreviation expansion mechanism for
# the editor.
#
# Copyright (C) 2006-2010 Frank Hale <frankhale@gmail.com>
#
# ##sandbox - irc.freenode.net
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# a... | gpl-3.0 | -7,259,528,532,522,187,000 | 29.468697 | 250 | 0.673738 | false |
google/makani | lib/python/batch_sim/scoring_functions/hover.py | 1 | 14809 | # Copyright 2020 Makani Technologies 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... | apache-2.0 | -2,537,646,379,653,478,400 | 36.491139 | 80 | 0.658181 | false |
Zogg/digidone | release/scripts/startup/component.py | 1 | 1104 | # -*- coding: utf-8 -*-
import bpy
from bpy.props import *
from digidone.props import component_type_save, component_type_get, dgd_add_props, ComponentProps
class ComponentTypeOperator(bpy.types.Operator):
bl_idname = "object.component_type_op"
bl_label = "Save Component Type"
ct_name = StringProperty... | gpl-2.0 | 5,949,753,946,365,939,000 | 28.052632 | 97 | 0.652174 | false |
jshlbrd/laikaboss | cloudscan.py | 4 | 21343 | #!/usr/bin/env python
# Copyright 2015 Lockheed Martin Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | apache-2.0 | -6,036,542,411,581,162,000 | 40.044231 | 207 | 0.495572 | false |
cherokee/webserver | qa/251-php-localcheck.py | 7 | 1807 | from base import *
DIR = "php_checkfile"
HOST = "test251"
MAGIC = 'This test checks the PHP check local file'
FORBIDDEN = 'This is a comment'
CONF_PART = """
vserver!251!nick = %(HOST)s
vserver!251!document_root = %(vserver_droot)s
vserver!251!rule!%(php_plus1)s!match = directory
vserver!251!rule!%(p... | gpl-2.0 | 7,362,429,352,918,926,000 | 28.622951 | 83 | 0.589375 | false |
twilio/twilio-python | twilio/rest/sync/v1/service/sync_list/sync_list_permission.py | 1 | 15865 | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import ListResource
f... | mit | -5,737,604,081,525,161,000 | 35.809745 | 130 | 0.630507 | false |
simonwydooghe/ansible | lib/ansible/modules/cloud/hcloud/hcloud_location_info.py | 6 | 4889 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.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 = {
"met... | gpl-3.0 | 7,917,162,840,477,041,000 | 27.928994 | 139 | 0.588873 | false |
jaymin-panchal/zang-python | tests/unit/test_transcriptions.py | 2 | 2256 | import unittest
from zang.configuration.configuration import Configuration
from zang.connectors.connector_factory import ConnectorFactory
from zang.domain.enums.http_method import HttpMethod
from zang.domain.enums.transcribe_quality import TranscribeQuality
from zang.domain.enums.transcription_status import Transcrip... | mit | -6,542,018,725,149,351,000 | 37.896552 | 76 | 0.695035 | false |
chipx86/reviewboard | reviewboard/search/forms.py | 2 | 6284 | """Forms for searching Review Board."""
from __future__ import unicode_literals
from collections import OrderedDict
from django import forms
from django.contrib.auth.models import User
from django.utils import six
from django.utils.translation import ugettext_lazy as _
from haystack.forms import ModelSearchForm
from... | mit | -7,383,928,477,562,632,000 | 31.559585 | 78 | 0.560471 | false |
Wei1234c/Elastic_Network_of_Things_with_MQTT_and_MicroPython | codes/node/mqtt_client_umqtt.py | 1 | 4718 | # coding: utf-8
import time
import socket
import gc
gc.collect()
import simple as umqtt
import config_mqtt
class Message_client:
# Object control
def __init__(self, server_ip, server_port):
self.server_address = socket.getaddrinfo(server_ip, server_port)[-1][-1]
self.mqtt_client = umqtt.MQTT... | gpl-3.0 | 5,052,911,248,970,306,000 | 30.46 | 118 | 0.524799 | false |
jkbgbr/BeamFE2 | BeamFE2/Structure.py | 1 | 13753 | # -*- coding: utf-8 -*-
from drawing import draw_beam
import copy
from BeamFE2.helpers import *
from BeamFE2.Loads import *
from BeamFE2 import Loads as BL
from BeamFE2 import Results
from BeamFE2 import Solver
VERY_LARGE_NUMBER = 10e40
class Structure(object):
dof = 3
loadnames = 'FX', 'FY', 'MZ'
dofna... | gpl-3.0 | -5,464,730,670,279,479,000 | 33.906091 | 119 | 0.578056 | false |
leighpauls/k2cro4 | tools/telemetry/telemetry/discover.py | 2 | 1331 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import inspect
import logging
import os
import traceback
def Discover(start_dir, suffix, clazz):
"""Discover all classes in |start_dir| which subclass ... | bsd-3-clause | 4,992,938,095,331,741,000 | 32.275 | 75 | 0.635612 | false |
piluke/BasicEventEngineFrontend | ui/treectrl.py | 1 | 16802 | # Copyright (c) 2017-18 Luke Montalvo <lukemontalvo@gmail.com>
#
# This file is part of BEEF.
# BEEF is free software and comes with ABSOLUTELY NO WARANTY.
# See LICENSE for more details.
try:
import wx
except ImportError:
raise ImportError("The wxPython module is required to run this program")
import os
import shu... | mit | -717,678,448,196,155,100 | 31.24952 | 160 | 0.72539 | false |
liqd/adhocracy | src/adhocracy/controllers/page.py | 4 | 37135 | import json
import logging
from operator import itemgetter
import formencode
from formencode import htmlfill, Invalid, validators
from pylons import request, tmpl_context as c
from pylons.controllers.util import abort, redirect
from pylons.decorators import validate
from pylons.i18n import _
from adhocracy import c... | agpl-3.0 | -1,086,032,969,583,987,700 | 40.86584 | 79 | 0.559715 | false |
debugger06/MiroX | osx/build/bdist.macosx-10.5-fat/lib.macosx-10.5-fat-2.7/miro/displaytext.py | 2 | 7953 | # Miro - an RSS based video player application
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
# Participatory Culture Foundation
#
# 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; eithe... | gpl-2.0 | -1,340,470,692,234,610,200 | 33.881579 | 79 | 0.579404 | false |
khandavally/devstack | EPAQA/pci_manager_patch.py | 1 | 2622 | from nova.pci.pci_manager import PciDevTracker
class PciDevTrackerPatch(PciDevTracker):
""" Extension of nova.pci.pci_manager.PciDevTracker class to help pci_device allocation
based on vf allocation algorithm"""
def __init__(self, node_id=None):
super(PciDevTrackerPatch, self).__init__(node_id)... | apache-2.0 | -3,515,214,527,976,748,000 | 37.558824 | 122 | 0.628909 | false |
Yelp/love | views/tasks.py | 1 | 2557 | # -*- coding: utf-8 -*-
from flask import request
from flask import Response
from google.appengine.api import taskqueue
from google.appengine.ext import ndb
import logic.employee
import logic.notifier
import logic.love
import logic.love_count
import logic.love_link
from main import app
from models import Love
# All ... | mit | 6,597,596,622,504,343,000 | 31.782051 | 98 | 0.717638 | false |
quarkslab/irma | frontend/api/scans/services.py | 1 | 15404 | #
# Copyright (c) 2013-2018 Quarkslab.
# This file is part of IRMA 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 in the top-level directory
# of this distribution and at:
#
# http:... | apache-2.0 | 6,972,977,802,855,987,000 | 38.091371 | 79 | 0.5796 | false |
paulromano/openmc | tests/unit_tests/test_data_photon.py | 8 | 5177 | #!/usr/bin/env python
from collections.abc import Mapping, Callable
import os
from pathlib import Path
import numpy as np
import pandas as pd
import pytest
import openmc.data
@pytest.fixture(scope='module')
def elements_endf():
"""Dictionary of element ENDF data indexed by atomic symbol."""
endf_data = os.e... | mit | 5,076,806,017,285,863,000 | 32.843137 | 85 | 0.645548 | false |
songmonit/CTTMSONLINE_V8 | openerp/addons/base/__openerp__.py | 1 | 3670 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
# Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you ca... | agpl-3.0 | -180,165,108,019,026,620 | 35.336634 | 79 | 0.567847 | false |
HurtowniaPixeli/pixelcms-server | cms/router/views.py | 1 | 3060 | from django.shortcuts import Http404
from rest_framework.decorators import api_view
from rest_framework.response import Response
from cms.common.utils import served_langs
from cms.pages.models import Page, PageCategory
from cms.content.models import Category, Article
from cms.content.serializers import ArticleSeriali... | mit | 8,950,102,878,471,108,000 | 33.382022 | 75 | 0.544444 | false |
iMichka/mini-iw | pygccxml/parser/__init__.py | 12 | 2227 | # Copyright 2014 Insight Software Consortium.
# Copyright 2004-2008 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0.
# See http://www.boost.org/LICENSE_1_0.txt
"""Parser sub-package.
"""
from .config import gccxml_configuration_t
from .config import load_gccxml_configuration
from .config ... | apache-2.0 | 3,112,565,969,304,757,000 | 32.742424 | 68 | 0.732375 | false |
Dzess/ALFIRT | resources/x3dTools/povtoyz.py | 1 | 8601 | """
Kirby Urner
4D Solutions
First published: May 10 2007
May 13: added finer grain control of textures (now per shape),
turned gl_settings into a Template to provide more control, new tests.
Simple framework for studying POV-Ray's Scene Description Language,
use of Template class in the Standard Library st... | mit | 7,903,312,855,648,600,000 | 28.178947 | 87 | 0.543658 | false |
willpearse/gbif_clean | text_stripping.py | 1 | 1760 | #!/usr/bin/python
#Preliminary checking and filtering of GBIF data
import sys, yaml
#####################
#FUNCTIONS###########
#####################
#Define mask and header lookup
def define_mask(header, fields={"hasGeospatialIssues":"FALSE", "hasCoordinates":"TRUE", "basisOfRecord":"SPECIMEN"}):
header = header.... | mit | -2,752,310,805,868,721,000 | 32.846154 | 117 | 0.586932 | false |
JackNokia/howdoi | test_howdoi.py | 12 | 3744 | #!/usr/bin/env python
"""Tests for Howdoi."""
import os
import unittest
from howdoi import howdoi
class HowdoiTestCase(unittest.TestCase):
def call_howdoi(self, query):
parser = howdoi.get_parser()
args = vars(parser.parse_args(query.split(' ')))
return howdoi.howdoi(args)
def setU... | mit | 5,545,844,973,357,012,000 | 34.320755 | 90 | 0.575588 | false |
pengli09/Paddle | python/paddle/v2/framework/tests/test_reduce_op.py | 1 | 2525 | import unittest
import numpy as np
from op_test import OpTest
class TestSumOp(OpTest):
def setUp(self):
self.op_type = "reduce_sum"
self.inputs = {'X': np.random.random((5, 6, 10)).astype("float32")}
self.outputs = {'Out': self.inputs['X'].sum(axis=0)}
def test_check_output(self):
... | apache-2.0 | -4,209,349,135,747,711,000 | 27.370787 | 87 | 0.577822 | false |
mbr/unleash | unleash/depgraph.py | 1 | 1677 | import networkx as nx
from networkx.algorithms.dag import (is_directed_acyclic_graph, ancestors,
descendants, topological_sort)
class DependencyGraph(object):
def __init__(self):
self.g = nx.DiGraph()
def add_dependency(self, obj, depending_on):
ng = self.... | mit | -8,186,896,312,569,232,000 | 30.641509 | 76 | 0.605247 | false |
bbbenja/SickRage | sickbeard/providers/tntvillage.py | 2 | 20461 | # Author: Giovanni Borri
# Modified by gborri, https://github.com/gborri for TNTVillage
#
# This file is part of SickRage.
#
# SickRage 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 L... | gpl-3.0 | -4,623,389,586,505,805,000 | 38.88499 | 157 | 0.513318 | false |
andyfaff/scipy | scipy/signal/tests/test_result_type.py | 18 | 1642 | # Regressions tests on result types of some signal functions
import numpy as np
from numpy.testing import assert_
import pytest
from scipy.signal import (decimate,
lfilter_zi,
lfiltic,
sos2tf,
sosfilt_zi)
def te... | bsd-3-clause | -7,011,933,095,546,168,000 | 29.407407 | 68 | 0.591352 | false |
jjbrophy47/sn_spam | relational/scripts/tests/test_comments.py | 1 | 4016 | """
Tests the comments module.
"""
import os
import unittest
import mock
from .context import comments
from .context import config
from .context import util
from .context import test_utils as tu
class CommentsTestCase(unittest.TestCase):
def setUp(self):
config_obj = tu.sample_config()
util_obj = ... | mit | -206,610,186,306,508,380 | 33.62069 | 78 | 0.61504 | false |
quozl/sugar | extensions/cpsection/power/view.py | 2 | 4686 | # Copyright (C) 2008, OLPC
#
# 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 hope... | gpl-3.0 | 514,856,993,487,086,460 | 36.790323 | 78 | 0.621639 | false |
leafclick/intellij-community | python/helpers/pycharm_display/datalore/display/supported_data_type.py | 14 | 2135 | import json
from abc import abstractmethod
from datetime import datetime
try:
import numpy
except ImportError:
numpy = None
try:
import pandas
except ImportError:
pandas = None
# Parameter 'value' can also be pandas.DataFrame
def _standardize_dict(value):
result = {}
for k, v in value.items(... | apache-2.0 | 6,490,971,174,700,318,000 | 25.358025 | 93 | 0.650585 | 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.