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
# coding=utf-8 # --------------------------------------------------------------- # Desenvolvedor: Arannã Sousa Santos # Mês: 12 # Ano: 2015 # Projeto: pagseguro_xml # e-mail: asousas@live.com # --------------------------------------------------------------- from .test_de...
arannasousa/pagseguro_xml
pagseguro_xml/tests/test_classes_consultas/__init__.py
Python
gpl-2.0
490
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2014 CERN. ## ## Invenio 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) a...
lnielsen/invenio
invenio/modules/documentation/__init__.py
Python
gpl-2.0
834
'''ensembl_name_gtf.py Usage: ensembl_name_gtf.py <gtffile> <outfile> ''' # Import required modules import collections import re from general_python import docopt # Extract arguments args = docopt.docopt(__doc__, version='1.0') # Create regular expressions eRE = re.compile('gene_id\s+"(.*?)";') bRE = re.comp...
adam-rabinowitz/ngs_analysis
scripts/GTF/ensembl_gene2biotype_gtf.py
Python
gpl-2.0
1,352
# # Copyright (C) 2014 UNINETT # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License version 2 as published by # the Free Software Foundation. # # This program is distributed in the hope th...
alexanderfefelov/nav
python/nav/metrics/errors.py
Python
gpl-2.0
926
# This file is part of Codeface. Codeface 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even...
bockthom/codeface
codeface/fileCommit.py
Python
gpl-2.0
7,096
#!/usr/bin/python #Pyxis and Original Sipie: Sirius Command Line Player #Copyright (C) Corey Ling, Eli Criffield # #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, ...
ebruck/pyxis
pyxis/Player.py
Python
gpl-2.0
1,159
# Disk resizing dialog # # Copyright (C) 2012-2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed...
AdamWill/anaconda
pyanaconda/ui/gui/spokes/lib/resize.py
Python
gpl-2.0
21,784
# -*- coding: utf-8 -*- """ Internal function called by glmnet. See also glmnet, cvglmnet """ # import packages/methods import scipy import ctypes from loadGlmLib import loadGlmLib def elnet(x, is_sparse, irs, pcs, y, weights, offset, gtype, parm, lempty, nvars, jd, vp, cl, ne, nx, nlam, flmin, ulam, ...
hanfang/glmnet_python
glmnet_python/elnet.py
Python
gpl-2.0
8,525
#-*- coding: utf-8 -*- # # Copyright (C) 2005-2010 TUBITAK/UEKAE # # 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. # # P...
solus-project/package-management
pisi/actionsapi/shelltools.py
Python
gpl-2.0
9,041
class Solution: # @return an integer def lengthOfLongestSubstring(self, s): lookup = {} maxlen = 0 start = 0 for i in xrange(len(s)): if s[i] not in lookup: lookup[s[i]] = i else: maxlen = max(maxlen, i - start) ...
lileeyao/acm
dp/hard/longest_substring_without_repeating_characters.py
Python
gpl-2.0
520
"""Implementation of JSONDecoder """ import re import sys import struct from simplejson.scanner import make_scanner def _import_c_scanstring(): try: from simplejson._speedups import scanstring return scanstring except ImportError: return None c_scanstring = _import_c_scanstring() __a...
lmr/autotest
client/shared/backports/simplejson/decoder.py
Python
gpl-2.0
15,190
print(__doc__) # Author: Noel Dawe <noel.dawe@gmail.com> # # License: BSD 3 clause from sklearn.externals.six.moves import zip import matplotlib.pyplot as plt from sklearn.datasets import make_gaussian_quantiles from sklearn.ensemble import AdaBoostClassifier from sklearn.metrics import accuracy_score from sklearn....
zhuango/python
sklearnLearning/statisticalAndSupervisedLearning/adaboost.py
Python
gpl-2.0
2,852
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: set expandtab tabstop=4 shiftwidth=4 : # Project Byzantium: http://wiki.hacdc.org/index.php/Byzantium # Copyright (C) 2013 Project Byzantium # This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as...
cmotc/Byzantium
captive_portal/captive_portal_test.py
Python
gpl-3.0
844
"""CALLHORIZONS - a Python interface to access JPL HORIZONS ephemerides and orbital elements. This module provides a convenient python interface to the JPL HORIZONS system by directly accessing and parsing the HORIZONS website. Ephemerides can be obtained through get_ephemerides, orbital elements through get_elements....
yerkesobservatory/seo
routines/ch.py
Python
gpl-3.0
48,676
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
batxes/4Cin
SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/SHH_WT_models11702.py
Python
gpl-3.0
17,574
#!/usr/bin/python # -*- coding: utf-8 -*- # # Common functions import os, sys lib_path = os.path.abspath( os.path.join( '..', '..', 'lib' ) ) sys.path.append(lib_path) from commons import * from overpasser import * from routing import * from feriados import * from make_json import * def lower_capitalized(input): o...
Skippern/PDF-scraper-Lorenzutti
creators/seletivo/common.py
Python
gpl-3.0
1,983
from .lconfiguration import LocalConfiguration from .printing import Printing from .word import Word from xml.etree import ElementTree class LinearisationRule: @classmethod def deserialise(cls, grammars, def_rule_etree): probability = float(def_rule_etree.get('p')) head_node_etree = def_rule_...
m5w/matxin-lineariser
matxin_lineariser/utlgrammars/lrule.py
Python
gpl-3.0
2,392
import urllib.request pagina = urllib.request.urlopen( 'http://beans.itcarlow.ie/prices-loyalty.html') texto = pagina.read().decode('utf8') onde = texto.find('>$') início = onde + 2 fim = início + 4 preço = texto[início:fim] if preço < 4.74: print ('Comprar pois está barato:', preço) else: prin...
wsricardo/mcestudos
treinamento-webScraping/Abraji/p08.py
Python
gpl-3.0
342
#! /usr/bin/python2 # -*- coding: utf-8; -*- # # (c) 2013 booya (http://booya.at) # # This file is part of the OpenGlider project. # # OpenGlider 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 ...
hiaselhans/OpenGlider
tests/visual_test_flatten_glider.py
Python
gpl-3.0
4,457
from django.core.management.base import NoArgsCommand from django.template.loader import get_template from askbot import models from askbot import const from askbot.conf import settings as askbot_settings from django.utils.translation import ungettext from askbot import mail from askbot.utils.classes import ReminderSch...
erichegt/askbot-devel
askbot/management/commands/send_unanswered_question_reminders.py
Python
gpl-3.0
3,873
"""SCons.Tool.sunlink Tool-specific initialization for the Sun Solaris (Forte) linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Th...
Eigenlabs/EigenD
tools/packages/SCons/Tool/sunlink.py
Python
gpl-3.0
2,437
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
nkhare/rockstor-core
src/rockstor/storageadmin/views/network.py
Python
gpl-3.0
10,047
#!/usr/bin/env python2.6 # -*- coding: utf-8 -*- from __future__ import print_function import os import platform import plistlib import sys if __name__ == '__main__': sys.path.insert(0, "../") # so the main() test suite can find otrapps module import otrapps.util from otrapps.otr_private_key import OtrPrivateKeys...
guardianproject/keysync
otrapps/adium.py
Python
gpl-3.0
4,023
import alias as al def extension_stable(af): pref = al.extension_preferred(af) stab = [] for p in pref: if p == af.argsU(p): stab.append(p) return stab
alias-org/alias
alias/semantics/extensions/extension_stable.py
Python
gpl-3.0
188
""" Copyright 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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...
SaikWolf/gnuradio
grc/gui/Port.py
Python
gpl-3.0
10,040
import logging def registerLoggingHander(dependencies): plexHandler = PlexLoggerHandler() for dependency in dependencies: Log.Debug("Registering LoggerHandler for dependency: %s" % dependency) log = logging.getLogger(dependency) log.setLevel('DEBUG') log.addHandler(plexH...
dantebarba/docker-media-server
plex/Subliminal.bundle/Contents/Code/logger.py
Python
gpl-3.0
1,288
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import os import pyte...
Finntack/pootle
tests/pootle_fs/fs_response.py
Python
gpl-3.0
6,794
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
nop33/indico
indico/modules/rb/models/room_bookable_hours.py
Python
gpl-3.0
1,910
#!/usr/bin/env python3 # Copyright (c) 2008-11 Qtrac Ltd. All rights reserved. # This program or module 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...
therealjumbo/python_summer
py31eg/average2_ans.py
Python
gpl-3.0
1,820
# -*- coding: utf-8 -*- from operator import itemgetter import time from openerp import api, fields, models, _ from openerp.tools import DEFAULT_SERVER_DATETIME_FORMAT from openerp.exceptions import ValidationError class AccountFiscalPosition(models.Model): _name = 'account.fiscal.position' _description = '...
orchidinfosys/odoo
addons/account/models/partner.py
Python
gpl-3.0
22,069
import re import lxml.html from openstates.scrape import Scraper, Person BASE_URL = "https://legislature.idaho.gov/%s/membership/" CHAMBERS = {"upper": "senate", "lower": "house"} PARTY = {"(R)": "Republican", "(D)": "Democratic"} phone_patterns = { "office": re.compile(r"Statehouse"), "business": re.compile(...
sunlightlabs/openstates
scrapers/id/people.py
Python
gpl-3.0
4,319
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division, unicode_literals ## ## This file is part of MoaT, the Master of all Things. ## ## MoaT is Copyright © 2007-2016 by Matthias Urlichs <matthias@urlichs.de>, ## it is licensed under the GPLv3. See the file `README.rst` for details...
smurfix/MoaT
modules/block.py
Python
gpl-3.0
3,156
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import tagging.fields class Migration(migrations.Migration): dependencies = [ ('profiles', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='community...
hzlf/openbroadcast.org
website/apps/profiles/migrations/0002_auto_20200220_1430.py
Python
gpl-3.0
872
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-06 07:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('trips', '0007_post'), ] operations = [ migrations.CreateModel( na...
konata39/chatbot-backend
trips/migrations/0008_article.py
Python
gpl-3.0
655
import importlib import time import cProfile import p5 filenames = [ 'arcs', 'custom_shapes', 'triangle_strip', 'custom_shapes2', 'curves', 'primitives'] max_frames = 100 e = SystemExit() for name in filenames: p5 = importlib.import_module('p5') module = importlib.import_module(name) ...
p5py/p5
profiling/main.py
Python
gpl-3.0
971
# Copyright (C) 2009-2015 Contributors as noted in the AUTHORS file # # This file is part of Autopilot. # # Autopilot 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...
rogerlindberg/autopilot
src/lib/wrappers/passwordentrydialog.py
Python
gpl-3.0
2,034
#!/usr/bin/python2 # # Copyright (C) 2014 FreeIPA Contributors see COPYING for license # import dns.name try: from xml.etree import cElementTree as etree except ImportError: from xml.etree import ElementTree as etree from ipapython import ipa_log_manager, ipautil # hack: zone object UUID is stored as path t...
realsobek/freeipa
ipaserver/dnssec/odsmgr.py
Python
gpl-3.0
7,447
# -*- coding: utf-8 -*- class Charset(object): common_name = 'NotoSansCuneiform-Regular' native_name = '' def glyphs(self): glyphs = [] glyphs.append(0x0173) #glyph00371 glyphs.append(0x030A) #glyph00778 glyphs.append(0x030B) #glyph00779 glyphs.append(0x02EB) #...
davelab6/pyfontaine
fontaine/charsets/noto_glyphs/notosanscuneiform_regular.py
Python
gpl-3.0
42,569
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'helloworld.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise Imp...
fangxinmiao/projects
Architeture/Backend/Framework/WebBenchmarker/frameworks/Python/django/helloworld/manage.py
Python
gpl-3.0
630
from django.conf.urls.defaults import patterns, url, include from . import views urlpatterns = patterns( '', url(r'^browserid/mozilla/$', views.mozilla_browserid_verify, name='mozilla_browserid_verify'), url(r'^browserid/$', include('django_browserid.urls')), url(r'^logout/$', 'django.contrib.a...
AdrianGaudebert/socorro-crashstats
crashstats/auth/urls.py
Python
mpl-2.0
385
''' Created on Feb 2, 2012 @package ally core request @copyright 2011 Sourcefabric o.p.s. @license http://www.gnu.org/licenses/gpl-3.0.txt @author: Gabriel Nistor Contains the GUI configuration setup for the node presenter plugin. ''' from ..gui_core.gui_core import publishGui, publish # ---------------------------...
superdesk/Live-Blog
plugins/superdesk-person/__plugin__/superdesk_person/gui.py
Python
agpl-3.0
429
import numpy as np import copy as copy try: import tensorflow.compat.v1 as tf except Exception: import tensorflow as tf from pybullet_envs.deep_mimic.learning.pg_agent import PGAgent from pybullet_envs.deep_mimic.learning.solvers.mpi_solver import MPISolver import pybullet_envs.deep_mimic.learning.tf_util as TFUti...
nrz/ylikuutio
external/bullet3/examples/pybullet/gym/pybullet_envs/deep_mimic/learning/ppo_agent.py
Python
agpl-3.0
15,769
# This file is part of VoltDB. # Copyright (C) 2008-2014 VoltDB Inc. # # This file contains original code and/or modifications of original code. # Any modifications made by VoltDB Inc. are licensed under the following # terms and conditions: # # Permission is hereby granted, free of charge, to any person obtaining # a...
zheguang/voltdb
lib/python/voltcli/voltadmin.d/update.py
Python
agpl-3.0
3,159
# This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals import decimal import pytest from shuup.core.templatetags....
hrayr-artunyan/shuup
shuup_tests/core/test_order_price_display.py
Python
agpl-3.0
3,010
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.apps import apps from ...
hrayr-artunyan/shuup
shuup/admin/views/select.py
Python
agpl-3.0
2,842
# -*- coding: utf-8 -*- """ Tests of responsetypes """ import io import json import os import textwrap import unittest import zipfile from datetime import datetime import pytest import calc import mock import pyparsing import random2 as random import requests import six from pytz import UTC from six import text_type...
eduNEXT/edunext-platform
common/lib/capa/capa/tests/test_responsetypes.py
Python
agpl-3.0
119,649
"""summerize pv systems""" import argparse import pv import os import datetime parser = argparse.ArgumentParser() parser.add_argument('--verbose', '-v', action='count') parser.add_argument('files', nargs='*') args = parser.parse_args() total_dc = 0 sdate = datetime.datetime(2014,6,16) for i in args.files: try: ...
gijs/solpy
solpy/summary.py
Python
lgpl-2.1
787
# 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 Openipmi(AutotoolsPackage): """The Open IPMI project aims to develop an open code base ...
iulian787/spack
var/spack/repos/builtin/packages/openipmi/package.py
Python
lgpl-2.1
1,087
import sys import os import shutil from distutils.core import setup from distutils.extension import Extension #check for numpy, which is absolutely required! try: import numpy except: print '#' * 80 print 'PyMT require numpy now. Please install it before running PyMT setup' print '#' * 80 sys.exit(...
nuigroup/pymt-widgets
setup.py
Python
lgpl-3.0
7,237
# Script for building the _ssl and _hashlib modules for Windows. # Uses Perl to setup the OpenSSL environment correctly # and build OpenSSL, then invokes a simple nmake session # for the actual _ssl.pyd and _hashlib.pyd DLLs. # THEORETICALLY, you can: # * Unpack the latest SSL release one level above your main Python ...
LaoZhongGu/kbengine
kbe/src/lib/python/PCbuild/build_ssl.py
Python
lgpl-3.0
9,198
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate...
agry/NGECore2
scripts/mobiles/endor/frenzied_donkuwah.py
Python
lgpl-3.0
1,767
# This file is part of PyEMMA. # # Copyright (c) 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER) # # PyEMMA 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 vers...
markovmodel/PyEMMA
pyemma/plots/tests/__init__.py
Python
lgpl-3.0
881
#!/bin/python # -*- coding: utf-8 -*- # Fenrir TTY screen reader # By Chrys, Storm Dragon, and contributers. from fenrirscreenreader.core import debug class command(): def __init__(self): pass def initialize(self, environment): self.env = environment def shutdown(self): pass ...
chrys87/fenrir
src/fenrirscreenreader/commands/vmenu-navigation/search_w.py
Python
lgpl-3.0
766
# This file is part of the Trezor project. # # Copyright (C) 2012-2018 SatoshiLabs and contributors # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # as published by the Free Software Foundation. # # This library is distrib...
jhoenicke/python-trezor
trezorlib/tests/device_tests/test_msg_verifymessage.py
Python
lgpl-3.0
8,390
from __future__ import division from math import * import numpy as np import scipy import matplotlib # USER INPUT def UserValues(VariablesToModify): # Blade Geometry Definition _DefinedValues_dict = dict() _DefinedValues_dict["Blade_gamma"]=45 # Blade stagger angle _DefinedValues_dict["Blade_B1"]=15 # angle of at...
bbiped-platform/BBIPED
src/BBIPED-GUI/src/Automatization/templates/BackwardBlade3D_template/BackwardBlade3D_template_Calculations.py
Python
lgpl-3.0
12,276
import contextlib import json from .common import (assert_command, assert_lines, exec_command, show_app, watch_all_deployments) GOOD_GROUP = 'tests/data/marathon/groups/good.json' def test_deploy_group(): _deploy_group(GOOD_GROUP) _remove_group('test-group') def test_group_list_table(...
Yhgenomics/dcos-cli
cli/tests/integrations/test_marathon_groups.py
Python
apache-2.0
7,624
# 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...
cshallue/models
research/object_detection/core/post_processing.py
Python
apache-2.0
24,403
import pushmanager.core.db as db import pushmanager.core.util from pushmanager.core.db import InsertIgnore from pushmanager.core.mail import MailQueue from pushmanager.core.requesthandler import RequestHandler from pushmanager.core.xmppclient import XMPPQueue class AddRequestServlet(RequestHandler): def post(sel...
Yelp/pushmanager
pushmanager/servlets/addrequest.py
Python
apache-2.0
2,713
# 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...
takeshineshiro/python-novaclient
novaclient/tests/functional/test_keypairs.py
Python
apache-2.0
4,555
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # # 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 applicab...
TribeMedia/synapse
synapse/server.py
Python
apache-2.0
11,005
# Copyright 2015 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 applicable law or agreed to in writing, sof...
kfox1111/apps-catalog-ui
app_catalog/panel.py
Python
apache-2.0
734
# # Copyright (c) SAS Institute 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 w...
sassoftware/rmake
rmake_test/functional_test/compattest.py
Python
apache-2.0
1,882
# Copyright 2018 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...
apark263/tensorflow
tensorflow/contrib/tensorrt/test/concatenation_test.py
Python
apache-2.0
3,388
#!/usr/bin/python -u # # Evaluate fbpath-based query performance (on gold standard and as predicted) # # Usage: evaluate_queries_results.py traindata.json valdata.json # # A model is trained on traindata and then its performance is measured # on valdata. (FIXME: Duplicate code with fbpath_train_logistic, instead # of ...
TitasNandi/Summer_Project
yodaqa/data/ml/fbpath/evaluate_queries_results.py
Python
apache-2.0
9,017
# Copyright 2015 StackHut Ltd. # # 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, s...
StackHut/stackhut
stackhut_toolkit/common/runtime/runtime_server.py
Python
apache-2.0
3,173
# -*- coding: utf-8 -*- ''' :codeauthor: :email:`Nicole Thomas <nicole@saltstack.com>` ''' # Import Python Libs from __future__ import absolute_import import os import random import string # Import Salt Testing Libs from salttesting.helpers import ensure_in_syspath, expensiveTest ensure_in_syspath('../../../') ...
stephane-martin/salt-debian-packaging
salt-2016.3.3/tests/integration/cloud/providers/joyent.py
Python
apache-2.0
3,591
# # 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 # ...
gonzolino/heat
heat/engine/cfn/functions.py
Python
apache-2.0
18,650
#!/usr/bin/env python2.6 # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 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...
stdweird/aquilon
tests/aqdb/aqdb_nose_plugin.py
Python
apache-2.0
2,638
# 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 t...
stackforge/solum
solum/tests/api/camp/v1_1/test_plans.py
Python
apache-2.0
1,582
from a10sdk.common.A10BaseClass import A10BaseClass class Stats(A10BaseClass): """This class does not support CRUD Operations please use parent. :param sync_tx_create_ext_bit_counter: {"description": "Conn Sync Create with Ext Sent counter", "format": "counter", "type": "number", "oid": "29", "optional"...
amwelch/a10sdk-python
a10sdk/core/vrrp/vrrp_a_state_stats.py
Python
apache-2.0
19,224
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('askapp', '0012_auto_20170203_1436'), ] operations = [ migrations.RenameField( model_name='post', old...
BanzaiTokyo/akihabara-tokyo
askapp/migrations/0013_auto_20170206_0748.py
Python
apache-2.0
542
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import time import uuid import os from c7n.output import ( api_stats_outputs, blob_outputs, log_outputs, metrics_outputs, sys_stats_outputs, tracer_outputs) from c7n.utils import reset_session_cache, dumps, local_s...
thisisshi/cloud-custodian
c7n/ctx.py
Python
apache-2.0
4,915
# # 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...
ArvinDevel/incubator-pulsar
pulsar-functions/instance/src/test/python/test_python_instance.py
Python
apache-2.0
2,008
# test_cmake.py - Unit tests for swift_build_support.cmake -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/LICENSE.txt for ...
russbishop/swift
utils/swift_build_support/tests/test_cmake.py
Python
apache-2.0
12,511
# Copyright 2013 Red Hat, 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 a...
isyippee/nova
nova/objects/fields.py
Python
apache-2.0
19,847
"""API Handler Class""" # standard library import gzip import os import shutil from logging.handlers import RotatingFileHandler from typing import Optional class RotatingFileHandlerCustom(RotatingFileHandler): """Logger handler for ThreatConnect Exchange File logging.""" def __init__( self, f...
kstilwell/tcex
tcex/logger/rotating_file_handler_custom.py
Python
apache-2.0
3,432
from functools import wraps from flask import Blueprint, render_template, abort, g from flask.ext.admin import babel from flask.ext.admin._compat import with_metaclass from flask.ext.admin import helpers as h # For compatibility reasons import MenuLink from flask.ext.admin.menu import MenuCategory, MenuView, MenuLink...
Jumpscale/web
pythonlib/flask_admin/base.py
Python
apache-2.0
16,504
#!/usr/bin/env python #8. Write a Python program using ciscoconfparse that parses cisco_crypto.txt. Note, this config file is not fully valid (i.e. parts of the configuration are missing). The script should find all of the crypto map entries in the file (lines that begin with 'crypto map CRYPTO') and for each crypto m...
joeyb182/pynet_ansible
pynet_ansible/exercise_1_8.py
Python
apache-2.0
615
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Red Hat, 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 # #...
paramite/blazar
climate/openstack/common/crypto/utils.py
Python
apache-2.0
6,193
# -*- coding: utf-8 -*- """ __init__.py Created on 2013/06/28 Copyright (C) 2011-2013 Nippon Telegraph and Telephone 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.apa...
TUBAME/migration-tool
src/tubame.portability/resources/tubame-search-modules/src/extend/__init__.py
Python
apache-2.0
984
""" Support for Satel Integra devices. For more details about this component, please refer to the documentation at https://home-assistant.io/components/satel_integra/ """ import asyncio import logging import voluptuous as vol from homeassistant.core import callback from homeassistant.const import ( STATE_ALARM...
PetePriority/home-assistant
homeassistant/components/satel_integra/__init__.py
Python
apache-2.0
5,379
"""Support for covers which integrate with other components.""" import logging import voluptuous as vol from homeassistant.components.cover import ( ATTR_POSITION, ATTR_TILT_POSITION, DEVICE_CLASSES_SCHEMA, ENTITY_ID_FORMAT, PLATFORM_SCHEMA, SUPPORT_CLOSE, SUPPORT_CLOSE_TILT, SUPPORT_O...
jawilson/home-assistant
homeassistant/components/template/cover.py
Python
apache-2.0
12,433
"""Support for HomematicIP Cloud climate devices.""" import logging from typing import Any, Dict, List, Optional, Union from homematicip.aio.device import AsyncHeatingThermostat, AsyncHeatingThermostatCompact from homematicip.aio.group import AsyncHeatingGroup from homematicip.base.enums import AbsenceType from homema...
tchellomello/home-assistant
homeassistant/components/homematicip_cloud/climate.py
Python
apache-2.0
11,473
# # Copyright (c) SAS Institute 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 w...
fedora-conary/rmake-2
rmake_test/functional_test/buildtest/buildtrovetest.py
Python
apache-2.0
1,443
import gdbremote_testcase from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestGdbRemoteAuxvSupport(gdbremote_testcase.GdbRemoteTestCaseBase): mydir = TestBase.compute_mydir(__file__) AUXV_SUPPORT_FEATURE_NAME = "qXfer:auxv:read" @s...
google/llvm-propeller
lldb/test/API/tools/lldb-server/TestGdbRemoteAuxvSupport.py
Python
apache-2.0
8,049
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re ...
djkonro/client-python
kubernetes/client/models/v1_resource_quota.py
Python
apache-2.0
7,239
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2020 Google 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 requi...
sasha-gitg/python-aiplatform
schema/predict/prediction/scripts/fixup_prediction_v1beta1_keywords.py
Python
apache-2.0
5,910
# -*- coding: utf-8 -*- # Generated by Django 1.11.11 on 2018-03-21 08:42 import datetime from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import seahub.base.fields class Migration(migrations.Migration): initial = True dependencies = [ ('group'...
miurahr/seahub
seahub/base/migrations/0001_initial.py
Python
apache-2.0
5,850
# -*- encoding: utf-8 -*- # # 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 ...
MLnick/spark
python/pyspark/sql/tests.py
Python
apache-2.0
110,593
#!/usr/bin/env python """ simple example script for running notebooks and reporting exceptions. Usage: `checkipnb.py foo.ipynb [bar.ipynb [...]]` Each cell is submitted to the kernel, and checked for errors. """ import os import glob from runipy.notebook_runner import NotebookRunner from pyfolio.utils import pyfolio_...
quantopian/pyfolio
pyfolio/tests/test_nbs.py
Python
apache-2.0
666
# Copyright 2014 - Rackspace # # 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,...
ed-/solum
functionaltests/api/v1/test_language_pack.py
Python
apache-2.0
8,151
# Copyright (c) 2010-2012 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
citrix-openstack-build/swift
test/unit/common/ring/test_builder.py
Python
apache-2.0
41,584
# # Copyright (c) 2015 Juniper Networks, Inc. All rights reserved. # import sys import json import uuid import string import re import ConfigParser from provision_defaults import * from cfgm_common.exceptions import * from pysandesh.gen_py.sandesh.ttypes import SandeshLevel from vnc_api.gen.vnc_api_client_gen import al...
rombie/contrail-controller
src/config/api-server/vnc_cfg_api_server/vnc_rbac.py
Python
apache-2.0
12,746
"""Test Google Smart Home.""" from unittest.mock import patch, Mock import pytest from homeassistant.core import State, EVENT_CALL_SERVICE from homeassistant.const import ATTR_UNIT_OF_MEASUREMENT, TEMP_CELSIUS, __version__ from homeassistant.setup import async_setup_component from homeassistant.components import camer...
joopert/home-assistant
tests/components/google_assistant/test_smart_home.py
Python
apache-2.0
28,484
from __future__ import print_function, absolute_import, division import sys sys.path.append("..") print(sys.path) from numpy import * from pyKratos import * #example = "cavity" #example = "gravity" #example = "shear_x" example = "inlet" # add variables to be allocated from the list in variables.py solution_step_va...
RiccardoRossi/pyKratos
stokes_ex/square_cavity.py
Python
bsd-2-clause
4,711
from modeltranslation.translator import translator, TranslationOptions from geotrek.common.models import TargetPortal, Theme, Label class ThemeTO(TranslationOptions): fields = ('label', ) class TargetPortalTO(TranslationOptions): fields = ('title', 'description') class LabelTO(TranslationOptions): fi...
GeotrekCE/Geotrek-admin
geotrek/common/translation.py
Python
bsd-2-clause
470
import re from django_filters.rest_framework import DjangoFilterBackend from rest_framework.exceptions import ValidationError from rest_framework.settings import api_settings from rest_framework_json_api.utils import undo_format_field_name class DjangoFilterBackend(DjangoFilterBackend): """ A Django-style O...
django-json-api/rest_framework_ember
rest_framework_json_api/django_filters/backends.py
Python
bsd-2-clause
5,902
import pytest import json from mk_verificator import utils @pytest.mark.parametrize( "group", utils.get_groups(utils.get_configuration(__file__)) ) def test_check_services(local_salt_client, group): config = utils.get_configuration(__file__) output = local_salt_client.cmd(group, 'service.get_all', ex...
msenin94/salt-mk-verificator
mk_verificator/tests/service_checker/test_services.py
Python
bsd-2-clause
1,141
import rospy from sensor_msgs.msg import Joy from geometry_msgs.msg import Twist class JoyTwist(object): def __init__(self): self._joy_sub = rospy.Subscriber('joy', Joy, self.joy_callback, queue_size=1) self._twist_pub = rospy.Publisher('cmd_vel', Twist, queue_size=1) def joy_callback(self, jo...
OTL/ros_book_programs
ros_start/scritps/joy_twist.py
Python
bsd-2-clause
644
""" Testing for the tree module (sklearn.tree). """ import copy import pickle from functools import partial from itertools import product import struct import pytest import numpy as np from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from scipy.sparse import coo_matrix from sklearn.random_proje...
chrsrds/scikit-learn
sklearn/tree/tests/test_tree.py
Python
bsd-3-clause
68,270