code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
# This file is part of the Diamond cothread library. # # Copyright (C) 2014 Michael Davidsaver, Brookhaven National Laboratory # # The Diamond cothread library 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; e...
Araneidae/cothread
cothread/coserver.py
Python
gpl-2.0
4,176
import numpy import theano import theano.tensor as T import time rng = numpy.random N = 400 ## training sample size feats = 784 #28 * 28, number of input variables D = (rng.randn(N, feats), rng.randint(size = N, low = 0, high = 2)) training_steps = 10000 #Declare Theano symbolic varibles x = T.matrix("x") y = ...
zhuango/python
theano/MoreExamples/logisticRegression.py
Python
gpl-2.0
1,521
from builtins import object import logging from pyparsing import ParseResults from brabbel.parser import Parser from brabbel.functions import functions logging.basicConfig() log = logging.getLogger(__name__) from threading import Lock class Expression(object): lock = Lock() cache = {} """Docstring for ...
ringo-framework/brabbel
brabbel/expression.py
Python
gpl-2.0
1,417
import os import errno from unittest import TestCase from mock import patch, Mock, ANY from pulp.common.plugins import importer_constants from pulp.server.exceptions import PulpCodedException from pulp_ostree.plugins.lib import LibError from pulp_ostree.plugins.importers.steps import Main, Create, Pull, Add from pu...
ipanova/pulp_ostree
plugins/test/unit/plugins/importers/test_steps.py
Python
gpl-2.0
11,980
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # 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 ...
srluge/SickRage
sickbeard/providers/rarbg.py
Python
gpl-3.0
11,081
#!/usr/bin/env python ''' Generate a simulated BED data file in the same format as output from decode and as used as input for bed2netcdf.py. Useful for testing rotation metrics produced by bed2netcdf.py, e.g. validating the ROT_DIST numbers based on an assumption of pure rolling motion. Mike McCann $Id: genBEDfile....
stoqs/stoqs
stoqs/loaders/CCE/bed2netcdf/genBEDfile.py
Python
gpl-3.0
6,816
# coding=utf-8 from mixer.backend.flask import mixer from app import current_app as app from app.api.helpers.data_layers import (MOVE_TYPE_ARCHIVED, MOVE_TYPE_COMMENT, MOVE_TYPE_DIPPED, MOVE_TYPE_DROPPED, MOVE_TYPE_GRABBED, MOVE_TYPE_SEE...
kumy/geokrety-api
tests/unittests/api/validation/test_move.py
Python
gpl-3.0
3,072
action = "simulation" target = "xilinx" sim_tool = "isim" top_module = "counter_tb" sim_post_cmd = "./isim_proj -gui -tclbatch ../isim_cmd" modules = { "local" : [ "../../../testbench/counter_tb/vhdl" ], }
keyru/hdl-make
tests/counter/sim/isim/vhdl/Manifest.py
Python
gpl-3.0
212
# # (c) 2017 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
2ndQuadrant/ansible
lib/ansible/plugins/netconf/default.py
Python
gpl-3.0
2,447
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2012 Uwe Hermann <uwe@hermann-uwe.de> ## Copyright (C) 2013 Matt Ranostay <mranostay@gmail.com> ## ## 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 ...
JenSte/libsigrokdecode
decoders/ds1307/pd.py
Python
gpl-3.0
5,968
# Authors: Petr Vobornik <pvoborni@redhat.com> # # Copyright (C) 2013 Red Hat # see file 'COPYING' for use and warranty information # # 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 vers...
hroncok/freeipa
install/wsgi/plugins.py
Python
gpl-3.0
1,768
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """ Environment variable utilities """ from spyderlib.qt.QtGui import QDialog, QMessageBox import os # Local imports from spyderlib.baseconfig import _ from spyder...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/spyderlib/utils/environ.py
Python
gpl-3.0
5,077
from django.contrib import admin from .models import Friend, ScoreCard, ActivityLog, LearningProfile, LearningHistory, LearningQueue admin.site.register(ScoreCard) admin.site.register(Friend) admin.site.register(ActivityLog) admin.site.register(LearningHistory) admin.site.register(LearningProfile) admin.site.register...
alzeih/ava
ava_core/my/admin.py
Python
gpl-3.0
336
""" WSGI config for redcap project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTI...
berylTechnologies/redcap
redcap/wsgi.py
Python
gpl-3.0
390
import random import subprocess import discord import cacobot.base as base # No comments. Fuck you. @base.cacofunc async def goatnick(message, client): ''' **{0}goatnick** *This command was created for the Undertale server.* Generates a politically incorrect name for Asgore from a list. *Exampl...
EvanCase54/PyBot
cacobot/undertale.py
Python
gpl-3.0
32,790
from golem.monitorconfig import MONITOR_CONFIG from golem.network.p2p.peersession import P2P_PROTOCOL_ID from golem.task.tasksession import TASK_PROTOCOL_ID from modelbase import BasicModel class LoginLogoutBaseModel(BasicModel): def __init__(self, metadata): super(LoginLogoutBaseModel, self).__init__(sel...
Radagast-red/golem
golem/monitor/model/loginlogoutmodel.py
Python
gpl-3.0
704
from scipy.stats import pearsonr, spearmanr, kendalltau import logging import numpy as np from nea.my_kappa_calculator import quadratic_weighted_kappa as qwk from nea.my_kappa_calculator import linear_weighted_kappa as lwk logger = logging.getLogger(__name__) class Evaluator(): def __init__(self, dataset, prompt_i...
nusnlp/nea
nea/asap_evaluator.py
Python
gpl-3.0
5,803
# Copyright (C) 2006-2012 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
akshaynathr/mailman
src/mailman/core/initialize.py
Python
gpl-3.0
6,380
# flake8: noqa: F401 from freqtrade.plugins.protections.iprotection import IProtection, ProtectionReturn
gcarq/freqtrade
freqtrade/plugins/protections/__init__.py
Python
gpl-3.0
105
import glob import os import re import random import json import sys import BumpGenerator import LineupDisplay from FileFinder import get_files_of_type_from_folders from subprocess import Popen, PIPE from time import sleep #TODO: read these in from central location like json order_keys = ["show", "bump", "commercial",...
atesija/ToonamiAdultSwimRandomizer
OldRandomizer/RasPiVideoRandomizer.py
Python
gpl-3.0
5,584
# -*- coding: utf-8 -*- """ Simple tensorflow demo using queue to place input data on graph. The problem with this way of placing data on the graph is that the enqueue_many operation loads all data onto GPU memory, which does not work for large datasets. """ # Part of py_pRF_mapping library # Copyright (C) 2016 Ingo...
ingo-m/py_pRF_mapping
pyprf/analysis/miscellaneous/tf_demo_01.py
Python
gpl-3.0
3,258
""" Module docstring """ def Doc_Test(): """Function docstring""" pass class XXX: """Class docstring""" def __init__(self): """__init__: Member function docstring""" self.a = 1 def XXX22(): """XXX22: Nested function docstring""" pass def XXX11():...
zrax/pycdc
tests/input/test_docstring.py
Python
gpl-3.0
545
# Authors: Jonas Thiem import re from gi.repository import Gtk, GObject, Pango from pychess.System.Log import log from pychess.System.prefix import addDataPrefix from pychess.Utils.const import ARTIFICIAL __title__ = _("Engines") __icon__ = addDataPrefix("glade/panel_engineoutput.svg") white = addDataPrefix("glade...
pychess/pychess
lib/pychess/perspectives/games/engineOutputPanel.py
Python
gpl-3.0
16,082
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Kevin Carter <kevin.carter@rackspace.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...
kbrebanov/ansible-modules-extras
cloud/lxc/lxc_container.py
Python
gpl-3.0
56,099
#! /usr/bin/env python #-*- coding: utf8 -*- from six import itervalues from math import ceil from settings import LANGUAGES, NODE from sandbox import Sandbox from result import Result import threading import logging class Judge(threading.Thread): """Compiles, executes and checks solutions for a specific task.""...
stosdev/zebra-node
judge.py
Python
gpl-3.0
4,390
# -*- coding: utf-8 -*- # # Test links: # http://d-h.st/users/shine/?fld_id=37263#files import re from urlparse import urljoin from module.plugins.internal.SimpleCrypter import SimpleCrypter, create_getInfo class DevhostStFolder(SimpleCrypter): __name__ = "DevhostStFolder" __type__ = "crypter" __...
immenz/pyload
module/plugins/crypter/DevhostStFolder.py
Python
gpl-3.0
1,744
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function from schlib import * import argparse, sys parser = argparse.ArgumentParser(description='Moves a component symbol between libraries') parser.add_argument('name', help='The name of the component to be moved') parser.add_argument('source...
KiCad/kicad-library-utils
schlib/move_part.py
Python
gpl-3.0
1,632
# -*- coding: utf-8 -*- class Charset(object): common_name = 'NotoSansGothic-Regular' native_name = '' def glyphs(self): glyphs = [] glyphs.append(0x0013) #glyph00019 glyphs.append(0x0012) #glyph00018 glyphs.append(0x000D) #glyph00013 glyphs.append(0x000C) #gly...
davelab6/pyfontaine
fontaine/charsets/noto_glyphs/notosansgothic_regular.py
Python
gpl-3.0
2,004
######################################################################## # $HeadURL$ # File : Occi09.py # Author : Victor Mendez ( vmendez.tic@gmail.com ) ######################################################################## # subset occi API based in the OpenNebula client command line implemention import os impo...
myco/VMDIRAC
WorkloadManagementSystem/Client/Occi09.py
Python
gpl-3.0
15,545
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditions apply: # # This pro...
tkaitchuck/nupic
py/regions/ImageSensorExplorers/InwardSweep.py
Python
gpl-3.0
5,717
# Copyright 2012 - John Calixto # # This file is part of bang. # # bang 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. # # bang is dis...
fr33jc/bang-unstable
bang/deployers/deployer.py
Python
gpl-3.0
2,624
from numpy import * from spectralDNS.shen.shentransform import ShenBiharmonicBasis, ShenDirichletBasis from spectralDNS.shen.la import Helmholtz, TDMA, Biharmonic from time import time, sleep import cProfile, pstats from six import iteritems nu = 1./1200. dt = 0.0001 #N = array([64, 128, 256, 512, 1024, 2048, 4096, 8...
mikaem/spectralDNS
sandbox/speed.py
Python
gpl-3.0
2,984
import sys sys.path.append('..') from pycompgeom import * import time def wait(): time.sleep(0.1) def jarvis(points): r0 = min(points) hull = [r0] r = r0 vhull = [] while True: u = random.choice(points) curr_ru = VSegment2.from_endpoints(r,u,color=BLUE); wait() for t in points: curr_ut = VSegment2.fro...
stpetsalakis/pycompgeom
unittests/test_visual_algorithms_jarvis_random.py
Python
gpl-3.0
1,033
""" Copyright (c) 2016 "Vade Secure" ... This file is part of test-automation-framework. test-automation-framework 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 y...
vadesecure/test-automation-framework
testlinktool/wrapper/TestLinkReport.py
Python
gpl-3.0
27,656
from ctypes import * from typing import Dict, TYPE_CHECKING, List, Callable, Mapping, Optional, Any from gi.repository import GObject from gi.repository import GLib import weakref import logging from blueman.gobject import SingletonGObjectMeta from blueman.bluemantyping import GSignals try: libpulse = CDLL("libp...
blueman-project/blueman
blueman/main/PulseAudioUtils.py
Python
gpl-3.0
12,786
#!/usr/bin/env python # -*- coding: utf-8 -*- import os, sys, pexpect import locale from PyQt4.QtCore import * from PyQt4.QtGui import * code = QTextCodec.codecForName(locale.getpreferredencoding()) QTextCodec.setCodecForLocale(code) # 设置程序能够正确读取到的本地文件的编码方式 QTextCodec.setCodecForTr(code) # 使用设定的code编...
ROSClub/ROSControlPanel
tools/tool.py
Python
gpl-3.0
13,124
# # Copyright 2015 Marco Filippi IZ3GME <iz3gme.marco@gmail.com> # # 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. # # T...
mach327/chirp_fork
chirp/drivers/bj9900.py
Python
gpl-3.0
13,207
# Copyright (c) 2007 by Kenneth Keiter <ken@kenkeiter.com> # # This file is part of django-graph. # # Django-graph 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...
xadahiya/django-graphs
src/layering.py
Python
gpl-3.0
8,038
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2012-2016 GEM Foundation # # OpenQuake 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 Licen...
rcgee/oq-hazardlib
openquake/hazardlib/scalerel/wc1994_qcss.py
Python
agpl-3.0
2,304
# -*- encoding: utf-8 -*- ############################################################################## # # Avanzosc - Avanced Open Source Consulting # Copyright (C) 2010 - 2011 Avanzosc <http://www.avanzosc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms ...
jaumemarti/l10n-spain-txerpa
__unported__/l10n_es_prev_tesoreria/__openerp__.py
Python
agpl-3.0
1,663
# Generated by Django 3.0.4 on 2020-09-28 19:37 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0052_pagelogentry'), ('global_settings', '0019_stickynote_show_popup'), ] operations = [ ...
openstax/openstax-cms
global_settings/migrations/0020_givetoday.py
Python
agpl-3.0
1,212
# -*- encoding: utf-8 -*- ############################################################################## # # Procurement Batch Generator module for Odoo # Copyright (C) 2014-2015 Akretion (http://www.akretion.com) # @author Alexis de Lattre <alexis.delattre@akretion.com> # # This program is free software: y...
SerpentCS/purchase-workflow
procurement_batch_generator/__openerp__.py
Python
agpl-3.0
1,496
#!/usr/bin/env python # Prototype database validation script. Same args as abe.py. # Copyright(C) 2011 by John Tobey <John.Tobey@gmail.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundati...
flywalk/arcoin-abe
Abe/verify.py
Python
agpl-3.0
2,997
# -*- coding: utf-8 -*- # Copyright 2018 El Nogal - Pedro Gómez <pegomez@elnogal.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import models, fields class ProductRanking(models.Model): _name = "product.ranking" _order = 'sequence' name = fields.Char('Name', size=64...
Comunitea/CMNT_00040_2016_ELN_addons
product_ranking/models/product_ranking.py
Python
agpl-3.0
582
#!/usr/lib/env python # -*- code:utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import collections import csv import numpy as np import pandas as pd from sklearn.preprocessing import LabelBinarizer from tensorflow.contrib import learn...
huazhisong/graduate_text
src/rnn/data_helper.py
Python
agpl-3.0
2,520
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('blueprint', '0002_needblueprint_slots'), ] operations = [ migrations.AlterModelOptions( name='blueprintcreator',...
pitpalme/volunteer_planner
blueprint/migrations/0003_auto_20151006_1341.py
Python
agpl-3.0
2,019
# ---------------------------------------------------------------------- # Copyright (C) 2014-2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This program is free software: you can redistribute it and/...
metaml/NAB
nab/scorer.py
Python
agpl-3.0
14,678
""" Acceptance tests for studio related to the outline page. """ from datetime import datetime, timedelta import itertools from pytz import UTC from bok_choy.promise import EmptyPromise from ...pages.studio.overview import CourseOutlinePage, ContainerPage, ExpandCollapseLinkState from ...pages.studio.utils import add_...
UQ-UQx/edx-platform_lti
common/test/acceptance/tests/studio/test_studio_outline.py
Python
agpl-3.0
70,894
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
addition-it-solutions/project-all
addons/hr_recruitment/hr_recruitment.py
Python
agpl-3.0
41,007
from django.conf.urls import url from django.contrib.auth.decorators import login_required from .views import StationAutoComplete, AppBikesCreateView, AppBikesUpdateView, AppBikesDeleteView urlpatterns = [ url(r'^station-autocomplete/$', login_required(StationAutoComplete.as_view()), name='statio...
bgaultier/laboitepro
laboite/apps/bikes/urls.py
Python
agpl-3.0
609
#!/usr/bin/env python3 """Python client library for VMRay REST API""" import base64 import datetime import os.path import requests import urllib.parse # disable nasty certification warning # pylint: disable=no-member try: requests.packages.urllib3.disable_warnings() except AttributeError: try: import ...
amuehlem/misp-modules
misp_modules/modules/expansion/_vmray/vmray_rest_api.py
Python
agpl-3.0
5,084
"""Views for items (modules).""" from __future__ import absolute_import import hashlib import logging from collections import OrderedDict from datetime import datetime from functools import partial from uuid import uuid4 import dogstats_wrapper as dog_stats_api from django.conf import settings from django.contrib.aut...
devs1991/test_edx_docmode
cms/djangoapps/contentstore/views/item.py
Python
agpl-3.0
53,436
import platform import sys import os from setuptools import find_packages, setup def findRequirements(): """ Read the requirements.txt file and parse into requirements for setup's install_requirements option. """ return [ line.strip() for line in open("requirements.txt").readlines() if not line...
singlerider/cloudbrain
setup.py
Python
agpl-3.0
2,566
""" LibraryContent: The XBlock used to include blocks from a library in a course. """ import json import logging import random from copy import copy from gettext import ngettext import bleach from lazy import lazy from lxml import etree from opaque_keys.edx.locator import LibraryLocator from pkg_resources import res...
eduNEXT/edunext-platform
common/lib/xmodule/xmodule/library_content_module.py
Python
agpl-3.0
29,440
from django.conf import settings import socket import struct import urllib import hashlib try: import json except: import simplejson as json class DataStore(object): def __init__ (self, short_name) : self.sbuffer = [ ] self.m_socket = socket.socket() self.m_socket.connect((setti...
lkundrak/scraperwiki
web/codewiki/managers/datastore.py
Python
agpl-3.0
3,406
"""Tests of email marketing signal handlers.""" import datetime import logging import ddt from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.contrib.sites.models import Site from django.test import TestCase from django.test.client import RequestFactory from freezegun impo...
philanthropy-u/edx-platform
lms/djangoapps/email_marketing/tests/test_signals.py
Python
agpl-3.0
31,356
import unittest import mock import SR import vhdutil import xs_errors import testlib MAX_VHD_SIZE = 2093050 * 1024 * 1024 class TestVhdUtil(unittest.TestCase): def test_validate_and_round_min_size(self): size = vhdutil.validate_and_round_vhd_size(2 * 1024 * 1024) self.assertTrue(size == 2 * 102...
kostaslamda/sm
tests/test_vhdutil.py
Python
lgpl-2.1
1,127
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Libkcapi(AutotoolsPackage): """libkcapi allows user-space to access the Linux kernel crypt...
iulian787/spack
var/spack/repos/builtin/packages/libkcapi/package.py
Python
lgpl-2.1
919
""" Compute a sparse grid: Gauss Patterson Open Fully Nested rule. Author: Ilias Bilionis Date: 3/19/2014 """ import design import numpy as np import matplotlib.pyplot as plt # The number of input dimensions num_dim = 2 # The maximum level of the grid max_level = 7 # Draw the design X, w = design.sparse_g...
PredictiveScienceLab/py-design
demos/demo8.py
Python
lgpl-2.1
627
# Modules from django.conf.urls import url from django_yaml_redirects import load_redirects from django_template_finder_view import TemplateFinder from ubuntudesign.gsa.views import SearchView # Local from webapp.views import custom_404, custom_500, MarkdownView # Match any redirects first urlpatterns = load_redirect...
ubuntudesign/developer.ubuntu.com
webapp/urls.py
Python
lgpl-3.0
1,337
''' NAL16 Proxy Re-Encryption | From: Nunez, D., Agudo, I., & Lopez, J. (2016). On the application of generic CCA-secure transformations to proxy re-encryption | Published in: Security and Communication Networks | Available from: http://onlinelibrary.wiley.com/doi/10.1002/sec.1434/full * type: proxy encryptio...
JHUISI/charm
charm/schemes/prenc/pre_nal16.py
Python
lgpl-3.0
6,127
import subprocess import json import redis from vFense.plugins.ra import _db as db PluginName = "ra" MaxConnections = 3 CurrentConnections = 0 StartPort = 10000 EndPort = 11000 PortRange = range(StartPort, EndPort) db.ra_initialization() def session_exist(agent_id): conn, session = db.connection_exist(agen...
vFense/vFense
tp/src/plugins/ra/__init__.py
Python
lgpl-3.0
2,330
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2012 - 2013 # Matías Herranz <matiasherranz@gmail.com> # Joaquín Tita <joaquintita@gmail.com> # # https://github.com/PyRadar/pyradar # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
ForTozs/py3radar
examples/__init__.py
Python
lgpl-3.0
1,030
import os from collections import Counter as counter from pprint import pprint # write a program which prints the full path to all files in the current directory, one per line for thing in os.listdir('.'): print(os.path.abspath(thing)) # write a program which copies a file from a source, to a destination (witho...
UWPCE-PythonCert/IntroPython2016
students/shulatif/session_04/file_lab.py
Python
unlicense
1,730
# Copyright 2015 IBM Corp. # # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
powervm/pypowervm
pypowervm/wrappers/monitor.py
Python
apache-2.0
6,068
# Copyright 2013 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
ArchiFleKs/magnum
magnum/api/controllers/link.py
Python
apache-2.0
2,029
import pytest from indy import payment, error from tests.payment.constants import * @pytest.mark.asyncio async def test_parse_get_txn_fees_response_works_for_unknown_payment_method(): with pytest.raises(error.PaymentUnknownMethodError): await payment.parse_get_txn_fees_response(payment_method, empty_obje...
Artemkaaas/indy-sdk
wrappers/python/tests/payment/test_parse_get_txn_fees_response.py
Python
apache-2.0
324
# 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...
stroucki/tashi
src/tashi/dfs/vfs.py
Python
apache-2.0
2,562
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
nanditav/15712-TensorFlow
tensorflow/contrib/distributions/python/ops/distribution_util.py
Python
apache-2.0
21,360
# coding=utf-8 # Copyright 2016 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) from pants_test.pant...
gmalmquist/pants
tests/python/pants_test/engine/legacy/test_list_integration.py
Python
apache-2.0
2,479
# pylint: skip-file # flake8: noqa # pylint: disable=too-many-instance-attributes class OCStorageClass(OpenShiftCLI): ''' Class to wrap the oc command line tools ''' kind = 'storageclass' # pylint allows 5 # pylint: disable=too-many-arguments def __init__(self, config, ...
anpingli/openshift-ansible
roles/lib_openshift/src/class/oc_storageclass.py
Python
apache-2.0
5,131
# -*- coding: utf-8 -*- # # Copyright 2013 IBM Corp # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
bcrochet/python-ironicclient
ironicclient/tests/unit/v1/test_node_shell.py
Python
apache-2.0
14,606
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2013 Contributor # # 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 Li...
stdweird/aquilon
lib/python2.6/aquilon/aqdb/model/bunker.py
Python
apache-2.0
1,343
# File Handling with open('Inputs/B-large-practice.in', 'r') as f_reader: with open('Outputs/B-large-practice.out' ,'w') as f_writer: # Number of test cases test_cases = int(f_reader.readline()) i = 1 while i <= test_cases: fline = f_reader.readline().strip() ...
MarcelloLins/ProgrammingChallenges
Python Solutions/ReverseWords/ReverseWords.py
Python
apache-2.0
416
# Copyright (c) 2018 Ericsson # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
mahak/neutron
neutron/conf/plugins/ml2/drivers/openvswitch/mech_ovs_conf.py
Python
apache-2.0
1,907
# TODO: remove this file in favor of .toml one. from Config import * # Not sure what this number does, but we need some threshold that we'd like to # avoid crossing. setOption("BadnessThreshold", 42) # Ignore documentation issues. addFilter('no-manual-page-for-binary') addFilter('no-documentation') addFilter('name-r...
google/copr-sundry
rpmlint.conf.py
Python
apache-2.0
7,908
# Copyright 2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
CloudVLab/professional-services
examples/bq_benchmarks/generic_benchmark_tools/benchmark_result_util.py
Python
apache-2.0
15,699
# Copyright 2017 FUJITSU LIMITED # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
openstack/monasca-notification
monasca_notification/conf/statsd.py
Python
apache-2.0
1,459
#!/usr/bin/env python """ EnduranceTrainingLog, Martin Dvorak, 2017 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 o...
dvorka/endurance-training-log
zzZ/yaml-python-html/src/etlbackend.py
Python
apache-2.0
26,201
#!/usr/bin/env python # # Author: Qiming Sun <osirpt.sun@gmail.com> # ''' When HOMO and LUMO orbitals are degenerated or quasi-degenerated, fill fractional number of electrons in the degenerated orbitals. ''' from pyscf import gto, scf # # pi_x*, pi_y* degeneracy in the restricted HF calculation. The occupancy on #...
gkc1000/pyscf
examples/scf/54-fractional_occupancy.py
Python
apache-2.0
1,181
from buck import format_watchman_query_params, glob_internal, LazyBuildEnvPartial from buck import subdir_glob, flatten_dicts, BuildFileContext from pathlib import Path, PurePosixPath, PureWindowsPath import os import shutil import tempfile import unittest class FakePathMixin(object): def glob(self, pattern): ...
bocon13/buck
src/com/facebook/buck/json/buck_test.py
Python
apache-2.0
12,477
# Copyright (c) 2013 OpenStack Foundation. # # 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...
waltBB/neutron_read
neutron/tests/unit/test_extension_extradhcpopts.py
Python
apache-2.0
13,221
# Copyright 2016 Intel Corp. # Copyright 2016 Hewlett Packard Enterprise Development Company LP # # 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.or...
mikalstill/nova
nova/tests/unit/objects/test_console_auth_token.py
Python
apache-2.0
6,712
#!/usr/bin/env vpython # Copyright 2016 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. from future.utils import iteritems import sys import copy import datetime import re from collections import OrderedDict ...
luci/recipes-py
unittests/checker_test.py
Python
apache-2.0
22,891
"""Test Home Assistant template helper methods.""" import asyncio from datetime import datetime import unittest import random from unittest.mock import patch from homeassistant.components import group from homeassistant.exceptions import TemplateError from homeassistant.helpers import template from homeassistant.util....
ct-23/home-assistant
tests/helpers/test_template.py
Python
apache-2.0
29,313
""" Copyright (c) 2006 Jan-Klaas Kollhof This file is part of jsonrpc. jsonrpc is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later ...
spaceone/pyjs
pyjs/jsonrpc/cgihandler/__init__.py
Python
apache-2.0
2,079
# # 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...
Juniper/ceilometer
ceilometer/storage/hbase/utils.py
Python
apache-2.0
18,214
from a10sdk.common.A10BaseClass import A10BaseClass class ServiceConfig(A10BaseClass): """Class Description:: Configure scaleout templates for SLB, CGN and VRRP. Class service-config supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this mod...
amwelch/a10sdk-python
a10sdk/core/scaleout/scaleout_service_config.py
Python
apache-2.0
1,953
# Copyright (c) 2015 Mirantis, 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...
NeCTAR-RC/murano
murano_tempest_tests/tests/api/service_broker/base.py
Python
apache-2.0
5,124
#!/usr/bin/env python import sys # Ugly code, but works. # Use: ./dat2h.py "" < z80_NP.dat >> bg80d.h; ./dat2h.py "CB" < z80_CB.dat >> bg80d.h; ./dat2h.py "DD" < z80_DD.dat >> bg80d.h; ./dat2h.py "ED" < z80_ED.dat >> bg80d.h; ./dat2h.py "FD" < z80_FD.dat >> bg80d.h; ./dat2h.py "DDCB" < z80_DDCB.dat >> bg80d.h; ...
lkesteloot/alice
alice3/emulator/bg80d/dat2h.py
Python
apache-2.0
1,590
# Copyright 2016 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
RyanWolfe/cloud-custodian
tests/test_ami.py
Python
apache-2.0
1,820
# Copyright 2017 Battelle Energy Alliance, 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 t...
idaholab/raven
framework/Metrics/metrics/DSS.py
Python
apache-2.0
5,168
# encoding=UTF8 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 m...
apporc/nova
nova/tests/unit/db/test_db_api.py
Python
apache-2.0
413,946
"""Support for Google Domains.""" import asyncio from datetime import timedelta import logging import aiohttp import async_timeout import voluptuous as vol from homeassistant.const import CONF_DOMAIN, CONF_PASSWORD, CONF_TIMEOUT, CONF_USERNAME import homeassistant.helpers.config_validation as cv _LOGGER = logging.ge...
jawilson/home-assistant
homeassistant/components/google_domains/__init__.py
Python
apache-2.0
2,367
"""Test the Almond config flow.""" import asyncio from homeassistant import config_entries, data_entry_flow, setup from homeassistant.components.almond import config_flow from homeassistant.components.almond.const import DOMAIN from homeassistant.const import CONF_CLIENT_ID, CONF_CLIENT_SECRET from homeassistant.helpe...
tboyce021/home-assistant
tests/components/almond/test_config_flow.py
Python
apache-2.0
5,379
# # how to test # # python eve/run.py in one terminal # # curl -i http://localhost:5000/jobs # # from flask.ext.bootstrap import Bootstrap from eve_docs import eve_docs from cloudmesh_job.cm_jobdb import JobDB db = JobDB() print db.port my_settings = { 'MONGO_HOST': 'localhost', 'MONGO_PORT': db.port,...
rajpushkar83/pbs
eve/run.py
Python
apache-2.0
545
# coding=utf-8 # Copyright 2015 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 tokenize fro...
megaserg/pants
src/python/pants/backend/python/tasks/checkstyle/indentation.py
Python
apache-2.0
1,267
# 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 re from pant...
baroquebobcat/pants
src/python/pants/option/parser_hierarchy.py
Python
apache-2.0
2,722
# Copyright 2013-2014 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0# # Unless required by applicable law or agreed to in writing...
orchardmile/mongo-connector
mongo_connector/connector.py
Python
apache-2.0
41,421
from flask import request from flask_caching import Cache, make_template_fragment_key cache = Cache() def make_cache_key(path=None, key_prefix="view/%s"): """ This function mostly emulates Flask-Caching's `make_cache_key` function so we can delete cached api responses. Over time this function may be repl...
isislab/CTFd
CTFd/cache/__init__.py
Python
apache-2.0
3,741