repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
HKuz/Test_Code | CodeFights/groupDating.py | 1 | 1057 | #!/usr/local/bin/python
# Code Fights Group Dating Problem
def groupDating(male, female):
return ([list(t) for t in zip(*filter(lambda x: x[0] != x[1],
zip(male, female)))] if male != female else [[], []])
def main():
tests = [
[
[5, 28, 14, 99, 17],
[5, 14, 28, 9... | mit | -2,475,177,488,335,346,000 | 21.978261 | 65 | 0.350047 | false |
zhester/aptask | client.py | 1 | 4101 | #!/usr/bin/env python
"""
aptask Development Client
"""
import json
import socket
import configuration
#=============================================================================
class Client( object ):
"""
Development Client Class
"""
#========================================================... | bsd-2-clause | -4,058,895,149,538,508,000 | 22.568966 | 78 | 0.387954 | false |
diego-d5000/MisValesMd | env/lib/python2.7/site-packages/django/core/management/commands/runfcgi.py | 1 | 1105 | import argparse
import warnings
from django.core.management.base import BaseCommand
from django.utils.deprecation import RemovedInDjango19Warning
class Command(BaseCommand):
help = "Runs this project as a FastCGI application. Requires flup."
def add_arguments(self, parser):
parser.add_arg... | mit | -2,018,608,347,568,573,200 | 32.53125 | 85 | 0.666968 | false |
designcc/django-ccstraps | ccstraps/tests/test_models.py | 1 | 2141 | import os
from unittest import skipUnless
from decimal import Decimal
from django.conf import settings
from django.test import TestCase
from django.core.files import File
from ccstraps.models import Strap, StrapImage
red = os.path.exists('%s/ccstraps/red.png' % settings.STATIC_ROOT)
purple = os.path.exists('%s/ccstra... | bsd-3-clause | 7,234,080,527,103,580,000 | 30.955224 | 73 | 0.598319 | false |
arinbjornk/ssh-log-plot | matter.py | 1 | 2016 | import os
import binascii
import re
import urllib
import datetime
import time
import collections
import json
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
import sys
def tochunks(l, n):
for i in range(0, len(l), n):
yield l[i:i + n]
# Ge... | mit | 6,537,396,677,565,067,000 | 29.089552 | 94 | 0.654762 | false |
Distrotech/system-config-printer | cupshelpers/cupshelpers.py | 1 | 29627 | ## system-config-printer
## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Red Hat, Inc.
## Authors:
## Florian Festi <ffesti@redhat.com>
## Tim Waugh <twaugh@redhat.com>
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public... | gpl-2.0 | -3,591,450,159,415,630,300 | 32.820776 | 207 | 0.518716 | false |
cgimenop/Excel2Testlink | ExcelParser/lib/openpyxl/tests/test_vba.py | 1 | 4486 | from __future__ import absolute_import
# Copyright (c) 2010-2015 openpyxl
# Python stdlib imports
from io import BytesIO
import zipfile
# package imports
from openpyxl.tests.helper import compare_xml
from openpyxl.reader.excel import load_workbook
from openpyxl.writer.excel import save_virtual_workbook
from openpyxl... | mit | 1,626,070,615,956,116,200 | 39.781818 | 94 | 0.595408 | false |
toobaz/pandas | doc/make.py | 1 | 11832 | #!/usr/bin/env python
"""
Python script for building documentation.
To build the docs you must have all optional dependencies for pandas
installed. See the installation instructions for a list of these.
Usage
-----
$ python make.py clean
$ python make.py html
$ python make.py latex
"""
import importlib
im... | bsd-3-clause | 3,600,651,155,578,478,000 | 30.806452 | 88 | 0.537863 | false |
smarkets/marge-bot | marge/gitlab.py | 1 | 5888 | import json
import logging as log
from collections import namedtuple
import requests
class Api:
def __init__(self, gitlab_url, auth_token):
self._auth_token = auth_token
self._api_base_url = gitlab_url.rstrip('/') + '/api/v4'
def call(self, command, sudo=None):
method = command.metho... | bsd-3-clause | -735,677,503,771,333,900 | 23.635983 | 99 | 0.59392 | false |
dturner-tw/pants | src/python/pants/backend/android/tasks/dx_compile.py | 1 | 8292 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from twit... | apache-2.0 | -5,050,217,490,291,312,000 | 45.324022 | 99 | 0.695731 | false |
S4kur4/Sepia | lib/parse/cmdline.py | 1 | 3329 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import argparse
import sys
from lib.core.settings import VERSION
def cmdLineParser():
parser = argparse.ArgumentParser(description='Example: python sepia.py -s s2045-rce -baidu "inurl:login.action"', add_help=False)
#第一项optional_arguments,基础相关项
optional_argume... | gpl-2.0 | -8,655,583,691,603,335,000 | 69.065217 | 183 | 0.686317 | false |
philpep/testinfra | testinfra/modules/base.py | 1 | 1189 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | apache-2.0 | 3,068,868,275,467,659,300 | 29.487179 | 74 | 0.637511 | false |
hhm0/supysonic | supysonic/api/media.py | 1 | 7996 | # coding: utf-8
# This file is part of Supysonic.
#
# Supysonic is a Python implementation of the Subsonic server API.
# Copyright (C) 2013 Alban 'spl0k' Féron
#
# 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 F... | agpl-3.0 | -115,028,283,936,605,740 | 34.065789 | 178 | 0.703064 | false |
Aloomaio/googleads-python-lib | examples/adwords/v201806/advanced_operations/create_and_attach_shared_keyword_set.py | 1 | 3787 | #!/usr/bin/env python
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | 7,618,941,297,881,909,000 | 28.585938 | 79 | 0.64695 | false |
spaceninja/mltshp | handlers/incoming.py | 1 | 2481 | from lib.utilities import base36decode
import tornado.web
from base import BaseHandler
from models import User, Sharedfile
class IncomingHandler(BaseHandler):
@tornado.web.authenticated
def get(self, before_or_after=None, base36_id=None):
"""
path: /incoming
"""
older_link, new... | mpl-2.0 | -2,518,924,442,536,953,300 | 39.016129 | 96 | 0.585651 | false |
excid3/irc_bothost | daemon/manager.py | 1 | 2341 | #!/usr/bin/env python
# Database imports
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from models import Bot
# Dbus imports
import dbus
import dbus.service
import dbus.mainloop.glib as glib
import gobject
# Import bots
from bots import GoogleSearchBot
DATABASE = '../website/database... | gpl-3.0 | -6,609,378,455,593,678,000 | 24.445652 | 75 | 0.586074 | false |
roofit-dev/parallel-roofit-scripts | tensorflow_testing/tensorflow_roofit_demo_5_sqrt_grad_nan_simple.py | 1 | 1420 | # -*- coding: utf-8 -*-
# @Author: patrick
# @Date: 2016-09-01 17:04:53
# @Last Modified by: Patrick Bos
# @Last Modified time: 2016-10-12 14:25:52
# as per tensorflow styleguide
# https://www.tensorflow.org/versions/r0.11/how_tos/style_guide.html
from __future__ import absolute_import
from __future__ import divis... | apache-2.0 | 1,766,364,331,916,265,200 | 33.634146 | 101 | 0.675352 | false |
O-T-L/PyOTL | Tests/fda.py | 1 | 5296 | """
Copyright (C) 2014, 申瑞珉 (Ruimin Shen)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed i... | lgpl-3.0 | -7,081,628,020,857,776,000 | 43.453782 | 118 | 0.66276 | false |
onshape-public/onshape-clients | python/onshape_client/oas/models/btm_individual_sketch_region_query140_all_of.py | 1 | 4980 | # coding: utf-8
"""
Onshape REST API
The Onshape REST API consumed by all clients. # noqa: E501
The version of the OpenAPI document: 1.113
Contact: api-support@onshape.zendesk.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
im... | mit | -7,172,650,439,866,013,000 | 32.422819 | 123 | 0.576908 | false |
cysuncn/python | spark/crm/PROC_O_AFA_PXY_CRPINFO.py | 1 | 2812 | #coding=UTF-8
from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext
from pyspark.sql.types import *
from datetime import date, datetime, timedelta
import sys, re, os
st = datetime.now()
conf = SparkConf().setAppName('PROC_O_AFA_PXY_CRPINFO').setMaster(sys.argv[2])
sc = SparkContext(conf = conf)
sc.... | gpl-3.0 | -5,766,307,241,878,150,000 | 37.083333 | 172 | 0.552881 | false |
mtholder/rbg | setup.py | 1 | 2523 | #!/usr/bin/env python
import sys
import os
# setup.py largely based on
# http://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
# Also see Jeet Sukumaran's DendroPy
###############################################################################
# setuptools/distutils/etc. import and configuration
... | bsd-2-clause | 781,373,712,850,792,400 | 31.779221 | 103 | 0.60761 | false |
O-T-L/PyOptimization | parameters/termination.py | 1 | 3577 | """
Copyright (C) 2014, 申瑞珉 (Ruimin Shen)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed i... | lgpl-3.0 | -2,597,556,617,497,607,000 | 42.54878 | 106 | 0.649398 | false |
UMN-Hydro/GSFLOW_pre-processor | python_scripts/MODFLOW_scripts/print_MODFLOW_inputs_res_NWT_test.py | 1 | 3888 | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 17 22:06:52 2017
Based on: print_MODFLOW_inputs_res_NWT.m
@author: gcng
"""
# print_MODFLOW_inputs
import numpy as np
import MODFLOW_NWT_lib as mf # functions to write individual MODFLOW files
import os # os functions
# - directories
sw_2005_NWT = 2 # 1 for MODFLOW-... | gpl-3.0 | 1,733,408,204,424,383,500 | 39.926316 | 164 | 0.705247 | false |
suutari-ai/shoop | shuup/front/checkout/addresses.py | 2 | 5615 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django import forms
... | agpl-3.0 | 3,144,817,363,670,558,000 | 38.822695 | 109 | 0.628139 | false |
moyaproject/moya | moya/tests/test_expose.py | 1 | 1754 | from __future__ import unicode_literals
from __future__ import print_function
import unittest
import os
from moya import db
from moya import pilot
from moya.wsgi import WSGIApplication
from moya.console import Console
from moya.context import Context
from moya.context.tools import set_dynamic
class TestExpose(unit... | mit | 7,288,641,161,016,600,000 | 29.77193 | 88 | 0.630559 | false |
MarkLark/dstore | manage.py | 1 | 2013 | #!/usr/bin/python
import pyman
from os import getcwd, path
class VM( pyman.Page ):
def __init__( self, pkg ):
super( VM, self ).__init__( "VM" )
self.host = None
self.pkg = pkg
self.dir = path.split( getcwd() )[1]
def choices( self ):
if not self.actions:
... | mit | -5,047,512,776,818,711,000 | 43.733333 | 209 | 0.539493 | false |
smartbgp/libbgp | libbgp/examples/bgp/update.py | 1 | 2799 | # Copyright 2015-2017 Cisco Systems, 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 req... | apache-2.0 | -8,200,692,678,786,274,000 | 34.43038 | 118 | 0.527688 | false |
artefactual/archivematica-storage-service | storage_service/administration/tests/test_languages.py | 1 | 1350 | from django.contrib.auth.models import User
from django.test import TestCase, override_settings
class TestLanguageSwitching(TestCase):
@classmethod
def setUpClass(cls):
super(TestLanguageSwitching, cls).setUpClass()
User.objects.create_user(
username="admin", password="admin", emai... | agpl-3.0 | 8,192,030,659,953,039,000 | 35.486486 | 73 | 0.655556 | false |
cloudburst/libheap | libheap/ptmalloc/malloc_par.py | 1 | 6212 | import sys
import struct
from libheap.frontend.printutils import color_title
from libheap.frontend.printutils import color_value
from libheap.frontend.printutils import print_error
class malloc_par:
"python representation of a struct malloc_par"
def __init__(self, addr=None, mem=None, debugger=None, version... | mit | -8,286,559,115,292,539,000 | 33.898876 | 79 | 0.528976 | false |
shaheershabbir/language_samples | Python/Numbers/04_prime_factorization.py | 1 | 1274 | #Prime Factorization - Have the user enter a number and find all Prime Factors (if there are any) and display them.
import sys
from math import ceil, sqrt
primeList = set()
def prime_factors(n):
currentPrime = 2
primeList.add(currentPrime)
primeFactors = set()
while (n/currentPrime) != 0:
if... | mit | -5,048,515,791,447,680,000 | 25.020408 | 115 | 0.622449 | false |
AbhishekKumarSingh/sssd | src/config/SSSDConfigTest.py | 1 | 71109 | #!/usr/bin/python
'''
Created on Sep 18, 2009
@author: sgallagh
'''
import unittest
import os
from stat import *
import sys
srcdir = os.getenv('srcdir')
if srcdir:
sys.path.append("./src/config")
srcdir = srcdir + "/src/config"
else:
srcdir = "."
import SSSDConfig
class SSSDConfigTestValid(unittest.Tes... | gpl-3.0 | -1,315,648,168,519,729,200 | 37.148605 | 122 | 0.574372 | false |
futurice/vdsm | tests/ipwrapperTests.py | 1 | 14984 | # Copyright 2013 Red Hat, 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the ... | gpl-2.0 | 1,078,436,975,776,432,100 | 45.971787 | 79 | 0.557194 | false |
akulakov/mangotrac | proj_issues/issues/migrations/0007_auto__add_report.py | 1 | 10888 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as 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 'Report'
db.create_table(u'issues_report', (
(... | mit | 8,550,388,397,958,276,000 | 72.574324 | 195 | 0.541514 | false |
feltus/BDSS | metadata_repository/app/forms/test_files.py | 1 | 1049 | # Big Data Smart Socket
# Copyright (C) 2016 Clemson University
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Th... | gpl-2.0 | 7,898,314,891,626,804,000 | 32.83871 | 73 | 0.745472 | false |
qPCR4vir/orange3 | Orange/canvas/canvas/tests/test_layout.py | 3 | 2550 | import time
from PyQt4.QtGui import QGraphicsView, QPainter, QPainterPath
from ...gui.test import QAppTestCase
from ..layout import AnchorLayout
from ..scene import CanvasScene
from ..items import NodeItem, LinkItem
class TestAnchorLayout(QAppTestCase):
def setUp(self):
QAppTestCase.setUp(self)
... | bsd-2-clause | 2,286,828,554,407,799,300 | 27.333333 | 76 | 0.624706 | false |
daq-tools/kotori | test/settings/basic.py | 1 | 1363 | # -*- coding: utf-8 -*-
# (c) 2020 Andreas Motl <andreas@getkotori.org>
from test.util import InfluxWrapper, GrafanaWrapper
PROCESS_DELAY_MQTT = 0.2
class BasicSettings:
# InfluxDB settings.
influx_database = 'basic_node42'
influx_measurement_sensors = 'sensors'
influx_measurement_events = 'events'... | agpl-3.0 | 8,097,248,373,965,345,000 | 31.452381 | 114 | 0.725605 | false |
adaussy/eclipse-monkey-revival | plugins/python/org.eclipse.eclipsemonkey.lang.python/Lib/test/test_select.py | 1 | 8204 | """
AMAK: 20050515: This module is the test_select.py from cpython 2.4, ported to jython + unittest
"""
import errno
import os
import select
import socket
import sys
import test_socket
import unittest
from test import test_support
HOST = test_socket.HOST
PORT = test_socket.PORT + 100
class SelectWrappe... | epl-1.0 | 4,749,433,364,288,085,000 | 33.515152 | 119 | 0.55668 | false |
jdf76/plugin.video.youtube | resources/lib/youtube_plugin/kodion/items/audio_item.py | 1 | 2203 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2014-2016 bromix (plugin.video.youtube)
Copyright (C) 2016-2018 plugin.video.youtube
SPDX-License-Identifier: GPL-2.0-only
See LICENSES/GPL-2.0-only for more information.
"""
from six.moves import html_parser
from .base_item import BaseItem
class AudioItem... | gpl-2.0 | -2,743,679,854,100,303,400 | 24.321839 | 66 | 0.610077 | false |
shful/python-rrlog | rrlog/server/xmlrpc.py | 1 | 3971 | # Copyright (c) 2007 Ruben Reifenberg
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, d... | mit | -3,357,021,823,589,365,000 | 33.232759 | 177 | 0.742634 | false |
Boris-Barboris/rsoi | lab01/authserver/lab01_authserver/lab01_authserver_app/migrations/0004_auto_20170131_1542.py | 1 | 1545 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-31 12:42
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lab01_authserver_app', '0003_refreshtoken'),
]
operations = [
migrations.Re... | mit | -6,635,733,589,395,761,000 | 28.711538 | 86 | 0.552751 | false |
nik124seleznev/ZC500TG | tools/dct/obj/EintObj.py | 2 | 10768 | #! /usr/bin/python
# -*- coding: utf-8 -*-
import re
import os
import string
import ConfigParser
import xml.dom.minidom
from data.EintData import EintData
from data.GpioData import GpioData
from utility.util import log
from utility.util import LogLevel
from utility.util import compare
from obj.ModuleObj import Modu... | gpl-2.0 | 6,046,764,472,813,506,000 | 35.876712 | 132 | 0.507708 | false |
andrewrhyder/epicsqt | resources/release.py | 1 | 21749 | #!/usr/bin/python
__author__ = "Ricardo Fernandes"
__email__ = "ricardo.fernandes@synchrotron.org.au"
__copyright__ = "(C) 2013 Australian Synchrotron"
__version__ = "1.5"
__date__ = "2014/MAR/21"
__description__ = "Script to automate the release of a new version of the EPICS Qt Framework"
__status__ = "Production"
... | lgpl-3.0 | -2,284,528,836,557,499,400 | 37.562057 | 277 | 0.559934 | false |
BioModelTools/TemplateSB | TemplateSB/executor.py | 1 | 1452 | '''Evaluates expressions in a namespace.'''
from api import Api
class Executor(object):
"""
Executes statements and expressions.
Manages the name space and access to definitions.
"""
def __init__(self):
self._api = Api()
self._namespace = {'api': self._api}
def addNamespace(self, namespace):
... | mit | -9,153,446,962,193,678,000 | 23.610169 | 66 | 0.658402 | false |
jrd/urwidm | examples/testurwidmore.py | 1 | 3457 | #!/usr/bin/env python
# coding: utf-8
# vim:et:sta:sts=2:sw=2:ts=2:tw=0:
from __future__ import division, unicode_literals, print_function, absolute_import
import urwidm
import time
palette = [
('body', 'light gray', 'black'),
('header', 'white', 'dark blue'),
('footer', 'light green', 'black'),
('foot... | lgpl-2.1 | 7,806,341,142,959,790,000 | 28.05042 | 102 | 0.651432 | false |
psychopy/psychopy | psychopy/tests/data/correctScript/python/correctKeyboardComponent.py | 1 | 6908 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This experiment was created using PsychoPy3 Experiment Builder (v3.1.1),
on Thu May 9 17:56:54 2019
If you publish work using this script please cite the PsychoPy publications:
Peirce, JW (2007) PsychoPy - Psychophysics software in Python.
Journal of N... | gpl-3.0 | 4,762,683,122,813,199,000 | 39.623529 | 101 | 0.694179 | false |
looooo/pivy | pivy/__init__.py | 1 | 1165 | ###
# Copyright (c) 2002-2008 Kongsberg SIM
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS... | isc | -1,805,928,626,703,968,300 | 34.30303 | 74 | 0.758798 | false |
lavende/crawlers | hosts/netsh_hosts.py | 1 | 1700 | import requests
class NetshHostsCrawler(object):
def __init__(self, opts):
self.method_get = requests.get
self.url = 'http://serve.netsh.org/pub/hosts.php'
self.params = {
'passcode': '16675',
'validate': '34b8c',
'gs': 'on',
'wk': 'on',
... | gpl-2.0 | -3,571,758,606,071,751,000 | 28.310345 | 80 | 0.47 | false |
angr/angr | angr/storage/memory_mixins/bvv_conversion_mixin.py | 1 | 2872 | import logging
import claripy
from angr.storage.memory_mixins import MemoryMixin
l = logging.getLogger(__name__)
class DataNormalizationMixin(MemoryMixin):
"""
Normalizes the data field for a store and the fallback field for a load to be BVs.
"""
def store(self, addr, data, size=None, **kwargs):
... | bsd-2-clause | 4,994,363,071,060,576,000 | 38.888889 | 120 | 0.590181 | false |
subcomponent/subcomponent | docs/conf.py | 1 | 4874 | # -*- coding: utf-8 -*-
#
# subcomponent documentation build configuration file, created by
# sphinx-quickstart on Mon Apr 17 21:26:47 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
... | mit | 7,505,850,708,084,216,000 | 30.445161 | 79 | 0.677472 | false |
fchauvel/flap | flap/latex/macros/factory.py | 1 | 2669 | #!/usr/bin/env python
#
# This file is part of Flap.
#
# Flap 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.
#
# Flap is distributed ... | gpl-3.0 | -9,029,698,916,133,774,000 | 33.217949 | 72 | 0.653803 | false |
kailucky/AngelEyes | Client/LcvSearch/LcvSearch/settings.py | 1 | 3221 | """
Django settings for LcvSearch project.
Generated by 'django-admin startproject' using Django 1.11.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import os... | mit | 7,777,674,801,871,668,000 | 24.571429 | 91 | 0.682707 | false |
RedHatInsights/insights-core | insights/util/content_type.py | 1 | 1264 | import shlex
import subprocess
from subprocess import PIPE
import six
from threading import Lock
try:
from insights.contrib import magic
except Exception:
magic_loaded = False
else:
# RHEL 6 does not have MAGIC_MIME_TYPE defined, but passing in the value
# found in RHEL 7 (16, base 10), seems to work.
... | apache-2.0 | -7,738,235,413,183,998,000 | 27.727273 | 92 | 0.642405 | false |
danishm/mritopng | mritopng/__init__.py | 1 | 3339 | import os
import png
import pydicom
import numpy as np
from .models import GrayscaleImage
from .contrast import auto_contrast
def mri_to_png(mri_file, png_file, do_auto_contrast=False):
""" Function to convert from a DICOM image to png
@param mri_file: An opened file like object to read te dicom data
... | mit | 3,070,402,333,887,180,000 | 34.147368 | 87 | 0.627733 | false |
becm/meson | mesonbuild/cmake/client.py | 1 | 13235 | # Copyright 2019 The Meson development team
# 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 | -217,214,505,009,637,470 | 34.867209 | 143 | 0.603778 | false |
andremiller/beets | beets/autotag/__init__.py | 1 | 4813 | # This file is part of beets.
# Copyright 2015, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, ... | mit | -4,673,383,253,398,398,000 | 35.18797 | 79 | 0.608352 | false |
nvoron23/netmiko | netmiko/hp/hp_comware_ssh.py | 1 | 2975 | from netmiko.ssh_connection import SSHConnection
from netmiko.netmiko_globals import MAX_BUFFER
import time
class HPComwareSSH(SSHConnection):
def session_preparation(self):
'''
Prepare the session after the connection has been established
'''
self.disable_paging(command=... | mit | -9,093,561,198,129,326,000 | 30.989247 | 101 | 0.628908 | false |
supergis/QGIS | python/plugins/processing/algs/qgis/Union.py | 1 | 9640 | # -*- coding: utf-8 -*-
"""
***************************************************************************
Union.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*********************************... | gpl-2.0 | -2,703,767,474,371,595,300 | 45.796117 | 154 | 0.509129 | false |
rnehra01/tanner | tanner/emulators/base.py | 1 | 5384 | import asyncio
import mimetypes
import re
import urllib.parse
import yarl
from tanner.config import TannerConfig
from tanner.emulators import lfi, rfi, sqli, xss, cmd_exec
from tanner.utils import patterns
class BaseHandler:
def __init__(self, base_dir, db_name, loop=None):
self.emulators = {
... | gpl-3.0 | 609,411,455,688,115,100 | 43.131148 | 120 | 0.622214 | false |
zangzhe/douban-review-api-testing | douban_client/api/user.py | 1 | 1356 | # -*- coding: utf-8 -*-
from .base import DoubanAPIBase, DoubanAPIBase_v1, DEFAULT_START, DEFAULT_COUNT
class User(DoubanAPIBase):
def __repr__(self):
return '<DoubanAPI User>'
def get(self, id):
return self._get('/v2/user/%s' % id)
@property
def me(self):
return self.get('... | mit | 6,569,993,671,127,126,000 | 32.097561 | 143 | 0.625369 | false |
aconbere/igor | igor/config.py | 1 | 2584 | from __future__ import with_statement
from os import path
import yaml
class Config(object):
"""
The config class captures the config state of Igor, this is primarily used
for reading in the config yaml and creating the various paths used by igor
to extract posts, templates, etc.
"""
config_fi... | mit | 2,885,252,527,019,818,500 | 33.453333 | 79 | 0.522059 | false |
dhrproject/mydatasource | DataSource/app/views/user.py | 1 | 3813 | import hashlib
from app import app
from flask import request
from flask_restful import Resource, reqparse
from app import api
from app.auth import require_token
from app.handler.dbHelper import DBHelper
from app.handler.error_handler import CustomError, NotAllowed
__author__ = 'Xiaoxiao.Xiong'
class UserAPI(Resourc... | mit | -3,294,375,466,812,133,400 | 25.303448 | 107 | 0.579334 | false |
woobe/h2o | py/testdir_multi_jvm/test_rf_1ktrees_job_cancel_fvec.py | 1 | 2557 | import unittest, time, sys
sys.path.extend(['.','..','py'])
import h2o, h2o_cmd, h2o_hosts, h2o_import as h2i
class Basic(unittest.TestCase):
def tearDown(self):
h2o.check_sandbox_for_errors()
@classmethod
def setUpClass(cls):
localhost = h2o.decide_if_localhost()
if (localhost):
... | apache-2.0 | -8,900,377,676,768,941,000 | 35.014085 | 129 | 0.551819 | false |
saidsl/weigh_bridge_management | weigh_bridge_management/weigh_bridge_management/report/sales_order_and_purchase_order/sales_order_and_purchase_order.py | 1 | 2985 | # Copyright (c) 2013, MN Technique and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import msgprint, _
from frappe.utils import flt
def execute(filters=None):
if not filters: filters = {}
columns = get_columns(filters)
entries... | gpl-3.0 | -8,633,921,102,127,154,000 | 32.550562 | 168 | 0.646566 | false |
armvixl/vixl | tools/clang_format.py | 1 | 6973 | #!/usr/bin/env python2.7
# Copyright 2016, ARM Limited
# 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 li... | bsd-3-clause | -1,877,088,501,541,297,000 | 35.129534 | 81 | 0.666284 | false |
joetainment/mmmmtools | MmmmToolsMod/Dynamic/PlatformManager.py | 1 | 5585 | ## MmmmTools - Usability Improvements For Maya
## Copyright (C) <2008> Joseph Crawford
##
## This file is part of MmmmTools.
##
## MmmmTools 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 ... | gpl-3.0 | 2,413,451,922,855,330,000 | 33.386076 | 120 | 0.576544 | false |
lidavidm/mathics-heroku | venv/lib/python2.7/site-packages/sympy/matrices/expressions/inverse.py | 2 | 1483 | from sympy.core.sympify import _sympify
from sympy.core import S, Basic
from sympy.matrices.expressions.matexpr import ShapeError
from sympy.matrices.expressions.matpow import MatPow
class Inverse(MatPow):
"""
The multiplicative inverse of a matrix expression
This is a symbolic object that simply stores... | gpl-3.0 | -8,102,763,116,967,621,000 | 23.311475 | 74 | 0.595415 | false |
bbinet/PyGall | pygall/models/fspot.py | 1 | 2369 | # Define mapping for f-spot database
# This is used by the script to synchronize pygall with fspot
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker, relation, column_property
from sqlalchemy.sql import and_
from sqlalchemy import Table, Column, Sequence, D... | bsd-3-clause | -8,369,909,924,245,037,000 | 29.766234 | 86 | 0.669481 | false |
Stratoscale/dirbalak | py/dirbalak/rackrun/jobqueue.py | 1 | 6176 | from upseto import gitwrapper
from dirbalak.rackrun import solventofficiallabels
from dirbalak.rackrun import buildstate
from dirbalak.rackrun import traversefilterbuildbanned
from dirbalak import repomirrorcache
from dirbalak.server import tojs
import collections
import logging
class JobQueue:
NON_MASTER_DEPENDE... | apache-2.0 | -2,125,154,884,264,883,000 | 42.492958 | 101 | 0.600227 | false |
xashenx/anotherDungeonTB | dungeon_bot/persistence.py | 1 | 2158 | #!/usr/bin/env python3
import json
from .creatures import Player
players_file_path = "./data/players.json"
class PersistenceController(object):
players = {}
instance = None
def __init__(self):
PersistenceController.instance = self
self.players = self.load_players()
def is_registered(self, user):
if str(us... | gpl-3.0 | 9,082,832,071,063,998,000 | 25.975 | 74 | 0.686747 | false |
chimmu/hailuo | conn.py | 1 | 1994 | # import socket
# import select
# import dispatch
import socket
import errno
import json
'''
struct head{
int type;
int len;
}
'''
import struct
class Connection:
def __init__(self):
self.buf = bytes()
pass
def disconnect(self):
self.sock.close()
def read(self, size):
... | gpl-2.0 | -3,076,117,434,816,348,000 | 24.896104 | 72 | 0.495988 | false |
seewindcn/tortoisehg | src/mercurial/graphmod.py | 1 | 20628 | # Revision graph generator for Mercurial
#
# Copyright 2008 Dirkjan Ochtman <dirkjan@ochtman.nl>
# Copyright 2007 Joel Rosdahl <joel@rosdahl.net>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
"""supports walking the history as D... | gpl-2.0 | 8,596,684,982,809,293,000 | 35.44523 | 80 | 0.55827 | false |
CZ-NIC/foris | foris/config/pages/about.py | 1 | 1216 | #
# Foris
# Copyright (C) 2019 CZ.NIC, z.s.p.o. <http://www.nic.cz>
#
# 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.
#
... | gpl-3.0 | -8,288,962,230,043,935,000 | 32.777778 | 71 | 0.725329 | false |
drufat/dec | doc/plot/cheb/plot_basis_fn_chebyshev.py | 1 | 1379 | from dec.spectral import *
from dec.grid1 import *
import matplotlib.pyplot as plt
def fix_axis_labels():
plt.tick_params(labelsize=45)
plt.xticks((-1, 0, 1), ('$-1$', '$0$', '$+1$'))
plt.yticks((0, 1), ('$0$', '$1$'))
plt.axis([-1.5, 1.5, -0.5, 1.5])
def draw_stemlines(x, y):
markerline, stemline... | gpl-3.0 | 2,457,492,339,963,417,600 | 27.729167 | 74 | 0.553299 | false |
thegricean/sinking-marbles | models/complex_prior/smoothed_unbinned15/runStandardModelEpsilonSmooth.py | 1 | 3483 | import os
import math
import subprocess
########################################
#f = open("standard_model.church")
f = open("standard_model_uniform.church")
ch_model = [l.rstrip() for l in f.readlines()]
f.close()
#pfile = open("binned_priors.txt")
pfile = open("/Users/titlis/cogsci/projects/stanford/projects/theg... | mit | -2,257,986,860,409,763,600 | 60.105263 | 363 | 0.595177 | false |
alejandroesquiva/ZeroMQ-Python | Publish-Subscribe/Client1.py | 1 | 1387 | #
# Weather update client
# Connects SUB socket to tcp://localhost:5556
# Collects weather updates and finds avg temp in zipcode
#
import sys
import zmq
import time
# Socket to talk to server
context = zmq.Context()
socket = context.socket(zmq.SUB)
print("Collecting updates from weather server…")
socket.conne... | mit | -6,053,244,881,576,592,000 | 24.2 | 58 | 0.685921 | false |
mksimpler/VoiceLinkTraining | test/Custom_Selection/testPickPrompt.py | 1 | 3069 | from BaseVLTestCase import BaseVLTestCase #@UnusedImport
import main #@UnusedImport
from voicelink_test.unit_tests.testSelection import testPickPrompt
from Custom_Selection.PickPromptMultipleCustom import PVID_VERIFICATION
from selection.PickPrompt import SLOT_VERIFICATION, ENTER_QTY,\
QUANTITY_VERIFICATION, LOT_T... | gpl-3.0 | -7,307,659,225,155,944,000 | 42.225352 | 83 | 0.641251 | false |
guillaume-miara/allodoc | allodoc/users/models.py | 1 | 2224 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
import json
import requests
from django.contrib.auth.models import AbstractUser
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.tra... | mit | 5,649,086,522,377,660,000 | 28.263158 | 114 | 0.638489 | false |
leppa/home-assistant | homeassistant/helpers/entity_platform.py | 1 | 16964 | """Class to manage the entities for a single platform."""
import asyncio
from contextvars import ContextVar
from typing import Optional
from homeassistant.const import DEVICE_DEFAULT_NAME
from homeassistant.core import callback, split_entity_id, valid_entity_id
from homeassistant.exceptions import HomeAssistantError, ... | apache-2.0 | -2,178,695,690,634,535,400 | 34.940678 | 88 | 0.57286 | false |
fireeye/flare-floss | tests/test_memdiff.py | 1 | 1613 | # Copyright (C) 2017 FireEye, Inc. All Rights Reserved.
import pytest
import envi.memory
from floss.string_decoder import memdiff
basic_tests = [
# Empty strings
("", ""),
# Single byte matching
("a", "a"),
# Single byte diffing
("a", "b"),
# Multi-byte first character diff
("aaa", "b... | apache-2.0 | -8,013,141,217,759,897,000 | 26.338983 | 71 | 0.513949 | false |
mclumd/pelawak | pelawak/settings.py | 1 | 4994 | """
Django settings for pelawak project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build path... | mit | 8,990,372,021,132,386,000 | 28.904192 | 85 | 0.647177 | false |
Strangemother/python-state-machine | scratch/machine_4/address.py | 1 | 7541 | '''
An address helps couple a message to a location. By parsing and
creating strings to be manipulated by the bridge
'''
import copy
from collections import deque, namedtuple
AddressParts = namedtuple('AddressParts', 'prefix nodes machines')
def make_hash(o):
"""
Makes a hash from a dictionary, list, tuple ... | mit | -4,579,846,829,456,940,500 | 28.228682 | 95 | 0.546612 | false |
philanthropy-u/edx-platform | openedx/features/job_board/constants.py | 1 | 1050 | """
Constants for Job Board app
"""
JOB_PARAM_QUERY_KEY = 'query'
JOB_PARAM_COUNTRY_KEY = 'country'
JOB_PARAM_CITY_KEY = 'city'
JOB_PARAM_TRUE_VALUE = '1'
JOB_TYPE_REMOTE_KEY = 'remote'
JOB_TYPE_ONSITE_KEY = 'onsite'
JOB_TYPE_CHOICES = (
(JOB_TYPE_REMOTE_KEY, 'Remote'),
(JOB_TYPE_ONSITE_KEY, 'Onsite'),
)
JO... | agpl-3.0 | 2,042,669,443,996,058,600 | 23.418605 | 49 | 0.677143 | false |
daimon99/ssadmin | src/ssadmin/admin.py | 1 | 1088 | # coding: utf8
from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.models import User
import models
class SSUserAdmin(admin.StackedInline):
model = models.SSUser
fk_name = 'user'
class UserAdmin(BaseUser... | mit | -5,805,649,661,301,906,000 | 23.636364 | 70 | 0.652214 | false |
istellartech/OpenTsiolkovsky | tools/mc_all_in_dir.py | 1 | 1669 | #!/usr/bin/python3
# coding: utf-8
import os
import sys
import subprocess as sp
if __name__ == "__main__":
if(len(sys.argv) == 1):
print("usage: python", sys.argv[0], "TAGET_DIR", "[N_ARRAY]")
exit(1)
parent_dir = sys.argv[1]
print("TARGET_DIR:", parent_dir)
if(len(sys.argv) > 2):
... | mit | 3,024,870,016,652,491,300 | 32.38 | 167 | 0.538646 | false |
Dev-Cloud-Platform/Dev-Cloud | dev_cloud/cc1/src/clm/views/user/ctx.py | 1 | 1972 | # -*- coding: utf-8 -*-
# @COPYRIGHT_begin
#
# Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland
#
# 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.apac... | apache-2.0 | 8,264,995,869,716,974,000 | 27.171429 | 119 | 0.6714 | false |
srmanikandasriram/multi-agent-robot-test-platform | cc/src/rosserial_python/src/rosserial_python/SerialClient.py | 1 | 28712 | #!/usr/bin/env python
#####################################################################
# Software License Agreement (BSD License)
#
# Copyright (c) 2011, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that th... | mit | -4,756,909,680,455,247,000 | 39.212885 | 212 | 0.58641 | false |
somia/insertbuffer | insertbufferd.py | 1 | 7740 | #!/usr/bin/env python
#
# Copyright (c) 2011 Somia Dynamoid Oy
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
imp... | gpl-2.0 | 4,622,423,972,153,492,000 | 21.697947 | 130 | 0.679845 | false |
Azure/azure-sdk-for-python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/aio/operations/_operations.py | 1 | 4728 | # 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 | 8,563,465,711,278,039,000 | 44.461538 | 133 | 0.648266 | false |
FrBrGeorge/PyGame | balls.py | 1 | 5643 | #!/usr/bin/env python
# coding: utf
'''Dumb jumping balls'''
import pygame
import random
import sys
if sys.version_info[0]>2:
xrange = range
SIZE = 640, 480
def intn(*arg):
'''Return list of ints from arg tuple'''
return tuple(map(int,arg))
def Init(sz):
'''Turn PyGame on'''
global screen, scre... | gpl-3.0 | -9,164,708,732,791,351,000 | 25.871429 | 78 | 0.551125 | false |
marcsans/cnn-physics-perception | phy/lib/python2.7/site-packages/keras/engine/training.py | 1 | 76878 | from __future__ import print_function
from __future__ import absolute_import
import warnings
import copy
import time
import numpy as np
import multiprocessing
import threading
import six
try:
import queue
except ImportError:
import Queue as queue
from .topology import Container
from .. import backend as K
f... | mit | -4,176,942,799,263,404,000 | 44.597865 | 121 | 0.511278 | false |
jolynch/mit-tab | mittab/libs/data_import/import_rooms.py | 1 | 1054 | from mittab.apps.tab.forms import RoomForm
from mittab.libs.data_import import Workbook, WorkbookImporter, InvalidWorkbookException
def import_rooms(file_to_import):
try:
workbook = Workbook(file_to_import, 2)
except InvalidWorkbookException:
return ["Rooms file is not a valid .xslx file"]
... | mit | 1,272,267,326,252,061,000 | 31.9375 | 88 | 0.588235 | false |
MTG/dunya | docserver/urls.py | 1 | 3773 | # Copyright 2013,2014 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Dunya
#
# Dunya 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 (FSF), either version 3 of the License, or... | agpl-3.0 | 6,515,515,269,406,524,000 | 64.051724 | 148 | 0.698648 | false |
galileo-project/Galileo-gpm | gpm/cli/__init__.py | 1 | 1537 | from gpm.utils.opt import opt_parser
from gpm.utils.log import Log
from gpm.utils.conf import GPMConf
from gpm.const import DEFAULT_MOD, GPM_SRC
from gpm.const.status import Status
from gpm.utils.operation import LocalOperation
import pkgutil
class CLI(object):
def __init__(self):
self.config = GPMConf()
... | mit | -2,746,403,755,441,995,000 | 26.464286 | 71 | 0.607677 | false |
amarszalek/PyOrderedFuzzyTools | pyorderedfuzzy/ofrandoms/estimators.py | 1 | 2080 | # -*- coding: utf-8 -*-
import numpy as np
from pyorderedfuzzy.ofnumbers.ofnumber import OFNumber, fmax
__author__ = "amarszalek"
def sample_mu(ofseries, ord_method='expected'):
n = len(ofseries)
suma = ofseries[0] if ofseries[0].order(method=ord_method) >= 0 else OFNumber(ofseries[0].branch_g,
... | mit | -1,071,619,706,852,037,600 | 33.098361 | 103 | 0.5625 | false |
Daksh/help-activity | helpactivity.py | 1 | 7111 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | gpl-3.0 | -5,091,947,597,963,151,000 | 33.023923 | 77 | 0.613978 | false |
uduwage/Multilingual-Wikipedian-Research | codePy/CollectUsersWithTemplates.py | 1 | 24383 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys, logging
import pywikibot
import csv
import MySQLdb as mdb
from MySQLdb import cursors
import traceback
import re
import time
import argparse
import utils
import pdb
NOW = time.strftime("%Y_%m_%d_%H_%M")
OUT_DIR_LOGS = os.path.expanduser('~/logs')
OUT_DIR... | mit | -8,788,072,647,558,120,000 | 40.680342 | 175 | 0.653515 | false |
qtproject/pyside-pyside | tests/util/httpd.py | 1 | 5938 | #############################################################################
##
## Copyright (C) 2016 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the test suite of PySide2.
##
## $QT_BEGIN_LICENSE:GPL-EXCEPT$
## Commercial License Usage
## Licensees holding valid commercial ... | lgpl-2.1 | -5,448,491,067,145,030,000 | 32.548023 | 82 | 0.604581 | false |
ragavvenkatesan/Convolutional-Neural-Networks | yann/utils/graph.py | 1 | 1039 | from networkx.drawing.nx_pydot import to_pydot
def draw_network(graph, filename = 'network.pdf', show = False, verbose = 2 ):
"""
This is a simple wrapper to the networkx_draw.
Args:
graph: Supply a networkx graph object. NNs are all DiGraphs.
filename: what file to save down as. Will add ... | mit | -4,739,895,124,660,449,000 | 33.633333 | 95 | 0.633301 | false |
OnionIoT/Onion-Docs | Omega2/Kit-Guides/Starter/sevenSeg code/mohamed/sevenSegDisplay.py | 1 | 3437 | import registerClass
import onionGpio
import time
class sevenSegment:
#Initializes the GPIO objects based on the pin numbers
def __init__(self, digitOne, digitTwo, digitThree, digitFour):
self.shiftReg = registerClass.shiftRegister(1,2,3)
self.digitOne = onionGpio.OnionGpio(digitOne)
self.digitTwo = onio... | gpl-3.0 | 5,142,943,932,755,677,000 | 25.438462 | 64 | 0.693628 | false |
mgraffg/simplegp | SimpleGP/tests/test_egp.py | 1 | 2806 | # Copyright 2013 Mario Graff Guerrero
# 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 wri... | apache-2.0 | 914,545,649,048,206,300 | 40.880597 | 75 | 0.533856 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.