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
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com from thumbor.filters import BaseFilter, filter_method from thumbor.e...
okor/thumbor
thumbor/filters/round_corner.py
Python
mit
1,094
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_dressed_cobral_bandit_bith_female_01.iff" result.attribute_tem...
obi-two/Rebelion
data/scripts/templates/object/mobile/shared_dressed_cobral_bandit_bith_female_01.py
Python
mit
462
# 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 ...
lmazuel/azure-sdk-for-python
azure-mgmt-web/azure/mgmt/web/models/triggered_web_job.py
Python
mit
3,707
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2016-2017 Alex Forencich 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...
alexforencich/python-ivi
ivi/tektronix/tektronixDPO4054B.py
Python
mit
1,650
# 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...
ryfeus/lambda-packs
Tensorflow_Pandas_Numpy/source3.6/tensorboard/plugins/beholder/im_util.py
Python
mit
7,736
from pubnub import utils from pubnub.endpoints.endpoint import Endpoint from pubnub.enums import HttpMethod, PNOperationType from pubnub.errors import PNERR_CHANNEL_OR_GROUP_MISSING from pubnub.exceptions import PubNubException class Heartbeat(Endpoint): # /v2/presence/sub-key/<subscribe_key>/channel/<channel>/he...
Haynie-Research-and-Development/jarvis
deps/lib/python3.4/site-packages/pubnub/endpoints/presence/heartbeat.py
Python
gpl-2.0
2,207
# -*- coding: utf-8 -*- # # AWL simulator - Debugging support # # Copyright 2014 Michael Buesch <m@bues.ch> # # 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 ...
gion86/awlsim
awlsim/common/debug.py
Python
gpl-2.0
1,336
""" The ASTCache module helps to prevent unnecessary re-parsing, which can be very slow when using pycparser. Maintains a dictionary of {filenames -> ASTs} Call get(filename) to get an AST. The file will be parsed if this is the first request, otherwise the previously generated AST will be returned. If code is b...
juniper-project/fpgas-caicos
astcache.py
Python
gpl-2.0
5,014
## # This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild # # Copyright:: Copyright 2012-2018 Uni.Lu/LCSB, NTUA # Copyright:: Copyright 2016-2018 Forschungszentrum Juelich # Authors:: Fotis Georgatos <fotis@cern.ch> # Authors:: Damian Alvarez <d.alvarez@fz-juelich.de> # License:: MIT...
bartoldeman/easybuild-easyblocks
easybuild/easyblocks/t/totalview.py
Python
gpl-2.0
3,766
import xml.etree.ElementTree as ET import requests import os giantBombWAPI = 'http://www.giantbomb.com/api/' def grabImage(id): _gameImages = requests.get(giantBombWAPI+'game/%s/?api_key=%s&field_list=image&format=xml' % (id, giantBombKEY)) images = (ET.fromstring(_gameImages.text.encode('utf-8')).find('results'))....
kidaa/gamers-galore
Backend/grabImages.py
Python
gpl-2.0
992
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from numpy import ones def get_mask_for_gridcells(index, n, m): """index is an array of size n x m where should be no mask placed.""" mask = ones((n, m)) for i in index: ...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/urbansim/household_x_gridcell/variable_functions.py
Python
gpl-2.0
353
from django.conf import settings from django import template from webassets.loaders import GlobLoader, LoaderError try: set except NameError: from sets import Set as set from django_assets.templatetags.assets import AssetsNode as AssetsNodeOriginal try: from django.templatetags.assets import AssetsNode as...
mozilla/verbatim
vendor/lib/python/django_assets/loaders.py
Python
gpl-2.0
4,299
#! /usr/bin/env python # -*- coding: UTF-8 -*- #----------------------------------------------------------------------------------------------------------------------* import sys, time, os, json import makefile, default_build_options import generic_galgas_makefile import tool_chain_installation_path import cross_comp...
TrampolineRTOS/trampoline
goil/build/libpm/python-makefiles/mingw32_on_macosx_gcc_tools.py
Python
gpl-2.0
2,932
# Special Commands # # Author: Balkansoft.BlogSpot.com # GNU GPL licensed import os import re import nanolp.core as core class UseCmd(core.Cmd): """Processor of <<use...>> command""" descr = 'Import one LP file to another' gpath = "use" infile = '' # path to included file or file-obj (i.e., url-objec...
bapcyk/nanolp
nanolp/commands.py
Python
gpl-2.0
4,688
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptio...
mitchcapper/mythbox
resources/lib/mysql-connector-python/python3/mysql/connector/connection.py
Python
gpl-2.0
39,855
""" Gcodec is a collection of utilities to decode and encode gcode. To run gcodec, install python 2.x on your machine, which is avaliable from http://www.python.org/download/ Then in the folder which gcodec is in, type 'python' in a shell to run the python interpreter. Finally type 'from gcodec import *' to import t...
natetrue/ReplicatorG
skein_engines/skeinforge-40/fabmetheus_utilities/gcodec.py
Python
gpl-2.0
15,033
""" Settings for the current site. This file is heavily based on David Cramer's post on http://justcramer.com/2011/01/13/settings-in-django/ """ import os # Load deploy environment specific settings DJANGO_DEPLOY_ENV = os.environ.get('DJANGO_DEPLOY_ENV', 'dev') if DJANGO_DEPLOY_ENV != 'defaults': module = __impor...
brenoarosa/tweend
siteconfig/settings.py
Python
gpl-2.0
1,255
# Copyright (C) 2014 Equinor ASA, Norway. # # The file 'vector_template.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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...
Statoil/libecl
python/ecl/util/util/vector_template.py
Python
gpl-3.0
20,059
import types from os import path from PyQt5.QtWidgets import QFrame, QHeaderView from PyQt5.QtGui import QPixmap from gui.view.gen.ui_AppMainWindow import Ui_MainWindow from golem.core.common import get_golem_path from mainwindow import MainWindow class AppMainWindow(object): def __init__(self): self.wi...
Radagast-red/golem
gui/view/appmainwindow.py
Python
gpl-3.0
3,164
# -*- coding: utf-8 -*- """Copyright (c) 2012 Sergio Gabriel Teves All rights reserved. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any...
dahool/vertaal
exceptionlogger/models.py
Python
gpl-3.0
1,327
import os import shutil import re class PackagePath(object): def __init__(self, package_name): self.name = package_name def generate(self): return self.name.replace('.', '/') class FileOperation(object): def __init__(self, src, dest): self.src = src self.dest = dest d...
taky/lucene
etc/runner/bootstrap.py
Python
gpl-3.0
2,792
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
DolphinDream/sverchok
nodes/generators_extended/hilbert3d.py
Python
gpl-3.0
3,268
def test(msgtype, flags): if flags == 1: msgtype = 1 elif flags == 2: msgtype = 2 elif flags == 3: msgtype = 3 return msgtype
zrax/pycdc
tests/input/if_elif_else.py
Python
gpl-3.0
166
""" Copyright 2008-2011 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) any l...
courtarro/gnuradio-wg-grc
grc/base/Block.py
Python
gpl-3.0
16,569
# xyz # Copyright (C) 2014 xyz developers <admin@localhost.lh> (see AUTHORS) # # All rights reserved. """ Django settings for xyz project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/...
4geit-module/4i.language.python.django.restframework
tests/single_model/output/xyz/settings.py
Python
gpl-3.0
2,412
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Payment Gateway Setup :copyright: (c) 2013-2015 by Openlabs Technologies & Consulting (P) Ltd. :license: BSD, see LICENSE for more details ''' import time import sys import re import os import ConfigParser import unittest from setuptools import setup, Com...
aroraumang/nereid-checkout
setup.py
Python
gpl-3.0
4,582
# -*- coding: UTF-8 -*- # Copyright (C) 2011 Juan David Ibáñez Palomar <jdavid@itaapy.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 3 of the License, or # (at your option...
hforge/itools
itools/pkg/git.py
Python
gpl-3.0
5,696
# encoding: utf-8 from ckan.tests.legacy import * import ckan.model as model class TestRevisionPurge: @classmethod def setup_class(self): model.Session.remove() CreateTestData.create() @classmethod def teardown_class(self): model.repo.rebuild_db() def setup(self): ...
NicoVarg99/daf-recipes
ckan/ckan/ckan/ckan/tests/legacy/models/test_purge_revision.py
Python
gpl-3.0
2,715
#!/usr/bin/python import sys port=0 program="" def usage(): print "Usage: mkjobs.py port program arggroup1 [arggoup2 ...]" print "port: smallest port to use" print "arggroupX: program arguments to use" print "the script will generate all job.sh calls for each arggroup" print "" print "Ex...
autarchprinceps/Parallele-Systeme
u3/a1/src/mkjobs.py
Python
gpl-3.0
2,992
#re creating the functionality of the manipulator menu from 2.49 # ##### BEGIN GPL LICENSE BLOCK ##### # # 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, o...
Passtechsoft/TPEAlpGen
blender/release/scripts/addons_contrib/space_view3d_manipulator_Menu.py
Python
gpl-3.0
3,458
"""Acconnt endpoints""" from __future__ import absolute_import from flask import request from flask_restful import fields, marshal, Resource from flask_login import login_user from app import api, db from models.account import User from exceptions import ValidationError user_fields = { 'id': fields.Integer, ...
TimothyBest/gitplaylist
app/views/account.py
Python
gpl-3.0
1,152
#!/usr/bin/env python # coding: utf-8 # # Comparing jktebop and ellc to PHOEBE # # In this example script, we'll reproduce Figure 6 from the fitting release paper ([Conroy et al. 2020](http://phoebe-project.org/publications/2020Conroy+)). # # <img src="http://phoebe-project.org/images/figures/2020Conroy+_fig6.png" a...
phoebe-project/phoebe2-docs
development/examples/backends_compare_legacy_jktebop_ellc.py
Python
gpl-3.0
3,762
# -*- coding: utf-8 -*- ############################################################################ # GPL License # # # # This file is a SCons (http://www.scons.org/) builder ...
kadasaikumar/iotivity-1.2.1
tools/scons/UnpackAll.py
Python
gpl-3.0
20,133
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
shtrom/gtg
GTG/backends/backend_mantis.py
Python
gpl-3.0
10,900
# -*- coding: utf-8 -*- # Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ # # 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...
bioinformatics-ua/catalogue
emif/population_characteristics/services.py
Python
gpl-3.0
8,764
# -*- coding: utf-8 -*- from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL 3' __copyright__ = '2011, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' import random import re from contextlib import closing from lxml import html from PyQ...
yeyanchao/calibre
src/calibre/gui2/store/stores/amazon_plugin.py
Python
gpl-3.0
10,978
from ImageScripter import * from elan import * Viewer.Start() Viewer.settingswheel.Click() Viewer.settingspasswordpage.WaitContinue(threshold = .98) Viewer.one.Click() Viewer.two.Click() Viewer.three.Click() Viewer.four.Click() sleep(3) try: Viewer.settingsmenu2.WaitContinue(seconds=10) except: Viewer.setting...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/elan/Pools/Quick_Tests/2____Viewer_Settings_Unconfigured_Check_Pages___.py
Python
gpl-3.0
3,706
# -*- coding: utf-8 -*- # lstm 语言模型 # # Author: Igor import time import numpy as np import tensorflow as tf flags = tf.app.flags # 定义flags flags.DEFINE_float('init_scale', 0.1, 'the initial scale of the weights') flags.DEFINE_float('learning_rate', 1.0, 'the initial value of th...
IgorWang/MachineLearningPracticer
tensorgo/lstm/lstm.py
Python
gpl-3.0
9,957
# -*- coding: utf-8 -*- # Copyright (C) 2010 by RoboLab - University of Extremadura # # This file is part of RoboComp # # RoboComp 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...
robocomp/robocomp
tools/rcmonitor/examples/pyramidRoi.py
Python
gpl-3.0
2,085
#!/usr/bin/env python ################################################################# # Create configurations programmatically. # This allows us to test features in combination, # as well as in isolation. ################################################################# import yaml import sys from subprocess impo...
hashkat/hashkat
tests/run_tests.py
Python
gpl-3.0
8,374
"""PySoundFile is an audio library based on libsndfile, CFFI and NumPy. Sound files can be read or written directly using the functions :func:`read` and :func:`write`. To read a sound file in a block-wise fashion, use :func:`blocks`. Alternatively, sound files can be opened as :class:`SoundFile` objects. For further ...
frodo821/RePRo
python/modules/soundfile.py
Python
gpl-3.0
60,956
# -*- coding: utf-8 -*- from collections import defaultdict from functools import partial from itertools import combinations, chain import json import math import networkx as nx from rest_framework.decorators import api_view from typing import Any, DefaultDict, Dict, Iterator, List, Optional, Set, Tuple, Union from ...
tomka/CATMAID
django/applications/catmaid/control/circles.py
Python
gpl-3.0
11,322
# 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...
stormtrader/gw_trade
dysms_python/build/lib/aliyunsdkdysmsapi/request/v20170525/QueryInterSmsIsoInfoRequest.py
Python
gpl-3.0
1,725
#!/usr/bin/env python3 # # Copyright 2012-2013 BrewPi/Elco Jacobs. # Copyright 2015 Andrew Errington # # This file is part of BrewPi. # # BrewPi 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...
andrewerrington/fuscus
fuscus/ui.py
Python
gpl-3.0
2,521
""" Test dedup subcommand """ import filecmp import logging import sys from os import path from bioy_pkg import main from __init__ import TestBase, TestCaseSuppressOutput, datadir as datadir log = logging.getLogger(__name__) class TestDedup(TestBase, TestCaseSuppressOutput): def main(self, arguments): ...
nhoffman/bioy
tests/test_dedup.py
Python
gpl-3.0
6,245
# -*- coding: utf-8 -*- import re from module.plugins.Crypter import Crypter from module.common.json_layer import json_loads from time import time class MultiuploadCom(Crypter): __name__ = "MultiuploadCom" __type__ = "crypter" __pattern__ = r"http://(?:www\.)?multiupload.com/(\w+)" __version__ = "0.01...
fener06/pyload
module/plugins/crypter/MultiuploadCom.py
Python
gpl-3.0
2,521
import os import subprocess import platform from .sourcefile import SourceFile class Git(object): def __init__(self, repo_root, url_base): self.root = os.path.abspath(repo_root) self.git = Git.get_func(repo_root) self.url_base = url_base @staticmethod def get_func(repo_path): ...
sadmansk/servo
tests/wpt/web-platform-tests/tools/manifest/vcs.py
Python
mpl-2.0
3,482
from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.by import By from nose.tools import assert_equal, assert_true from selenic.util import Result, Condition step_matcher("re") @when(ur"(?P<step>the user opens the typeahead popup" ur"(?P<where> at the end of the title...
mangalam-research/wed
selenium_test/steps/typeahead_popup.py
Python
mpl-2.0
5,266
import os import re from pkg_resources import get_distribution import mardor def test_version_in_setuppy(): dist = get_distribution('mar') assert mardor.version_str == dist.version assert ".".join(str(_) for _ in mardor.version) == dist.version def test_version_in_changelog(): dist = get_distribut...
catlee/build-mar
tests/test_version.py
Python
mpl-2.0
596
from cStringIO import StringIO from datetime import date, datetime, timedelta import json import time from xml.sax.saxutils import escape import mock from nose.tools import eq_, ok_ from nose.plugins.attrib import attr from django.conf import settings from django.core.exceptions import ValidationError from django.tes...
davehunt/kuma
kuma/wiki/tests/test_models.py
Python
mpl-2.0
76,986
""" Start flow task, instantiate new flow process """ import functools from django.db import transaction from django.core.urlresolvers import reverse from django.conf.urls import url from ..activation import Activation, StartViewActivation, STATUS from ..exceptions import FlowRuntimeError from . import base def fl...
codingjoe/viewflow
viewflow/flow/start_view.py
Python
agpl-3.0
7,680
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields, api, exceptions, _ cl...
StefanRijnhart/odoomrp-wip
mrp_lock_lot/models/mrp_production_lot.py
Python
agpl-3.0
1,431
#!/usr/bin/python3 import requests import json import sys misp_key = "" # MISP API key misp_url = "" # MISP URL misp_cachefile = "/home/misp/misp-snmp/misp-snmp.cache" # Cache file to store statistics data # Cache file needs to be writable by the user of your SNMP daemon user # Add a crontab to update the cache with #...
MISP/MISP
tools/misp-snmp/misp-snmp-monitor.py
Python
agpl-3.0
3,668
# coding=utf-8 from dependencies.dependency import getToolByName from lims.jsonapi import get_include_fields from lims import bikaMessageFactory as _ from lims.utils import t, dicts_to_dict from lims.interfaces import IAnalysis, IResultOutOfRange, IJSONReadExtender from lims.interfaces import IFieldIcons from lims.util...
yasir1brahim/OLiMS
lims/browser/analysis.py
Python
agpl-3.0
6,765
# 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 .detail import LoginAsUserView, UserDetailView from .list import UserListView from .password im...
shawnadelic/shuup
shuup/admin/modules/users/views/__init__.py
Python
agpl-3.0
593
import time from datetime import timedelta from unittest.mock import patch, Mock from superdesk.utc import utcnow from superdesk.tests import TestCase from superdesk.storage import AmazonMediaStorage from superdesk.storage.amazon_media_storage import _guess_extension class AmazonMediaStorageTestCase(TestCase): ...
mdhaman/superdesk-core
tests/storage/amazon_media_storage_test.py
Python
agpl-3.0
5,227
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
uclouvain/OSIS-Louvain
webservices/tests/api/views/test_user.py
Python
agpl-3.0
2,479
# nif.py - functions for handling Portuguese VAT numbers # coding: utf-8 # # Copyright (C) 2012, 2013 Arthur de Jong # # This library 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...
holvi/python-stdnum
stdnum/pt/nif.py
Python
lgpl-2.1
2,504
# -*- coding: utf-8 -*- # # Licensed under the terms of the Qwt License # Copyright (c) 2002 Uwe Rathmann, for the original C++ code # Copyright (c) 2015 Pierre Raybaut, for the Python translation/optimization # (see LICENSE file for more details) from qwt.interval import QwtInterval from qwt.painter import Qw...
mindw/python-qwt
qwt/column_symbol.py
Python
lgpl-2.1
5,918
# -*- encoding: utf-8 -*- import sys import unittest from PyQt4 import QtGui import pilasengine class TestHabilidades(unittest.TestCase): app = QtGui.QApplication(sys.argv) def setUp(self): self.pilas = pilasengine.iniciar() def testPuedeCrearHabilidad(self): habilidad = self.pilas.habi...
fsalamero/pilas
pilasengine/tests/test_habilidades.py
Python
lgpl-3.0
4,320
import os, logging __author__ = "Moritz Wade" __contact__ = "wade@zib.de" __copyright__ = "Zuse Institute Berlin 2010" def removeFilesOfTypeFromDir(dir, type): """ Remove all files of the given type in the given directory. File type is determined by its suffix. """ for file in os.listdir(dir): if file...
gabrielmueller/aljebra-topo
src/basics/helpers/filehelpers.py
Python
lgpl-3.0
1,189
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Rakuten NLP Project # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Distributed representation models via category vector's "CV-DM and CV-DBoW models", using either hierarchical softmax or negative sampling [1]_ [2]_ [...
pvthuy/category2vec
cat2vec.py
Python
lgpl-3.0
31,440
# Copyright 2011-2013, Damian Johnson # See LICENSE for licensing information """ Functions to aid library logging. The default logging :data:`~stem.util.log.Runlevel` is usually NOTICE and above. **Stem users are more than welcome to listen for stem events, but these functions are not being vended to our users. They...
arlolra/stem
stem/util/log.py
Python
lgpl-3.0
6,833
# -*- coding: utf-8 -*- import pytest class TestSnippet: def test_a(self): assert(1 == 1) def test_b(self): assert(1 == 0)
a1ezzz/wasp-launcher
extra/snippets/test.py
Python
lgpl-3.0
134
from typing import Any, Dict EMOJI_NAME_MAPS: Dict[str, Dict[str, Any]] = { # seems like best emoji for happy "1f600": {"canonical_name": "grinning", "aliases": ["happy"]}, "1f603": {"canonical_name": "smiley", "aliases": []}, # the Google emoji for this is not great, so made People/9 'smile' and #...
punchagan/zulip
tools/setup/emoji/emoji_names.py
Python
apache-2.0
95,618
""" 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 use this ...
keedio/keedio-stacks
KEEDIO/1.3/hooks/before-START/scripts/params.py
Python
apache-2.0
7,254
#!/usr/bin/python # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
donspaulding/adspygoogle
examples/adspygoogle/dfp/v201206/get_current_user.py
Python
apache-2.0
1,409
#!/usr/bin/python """ Copyright 2014 The Trustees of Princeton University 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 ...
jcnelson/syndicate
python/syndicate/observer/sync.py
Python
apache-2.0
12,416
# 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...
jumpstarter-io/keystone
keystone/contrib/federation/idp.py
Python
apache-2.0
22,080
#!/router/bin/python import trex_client from jsonrpclib import ProtocolError, AppError class CTRexAdvClient(trex_client.CTRexClient): def __init__ (self, trex_host, max_history_size = 100, trex_daemon_port = 8090, trex_zmq_port = 4500, verbose = False): super(CTRexAdvClient, self).__init__(trex_host, max_...
dproc/trex_odp_porting_integration
scripts/automation/trex_control_plane/client/trex_adv_client.py
Python
apache-2.0
2,221
import random import re from email.headerregistry import Address from typing import List, Sequence from unittest.mock import patch import ldap import ujson from django.conf import settings from django.core import mail from django.test import override_settings from django_auth_ldap.config import LDAPSearch from zerver...
timabbott/zulip
zerver/tests/test_email_notifications.py
Python
apache-2.0
51,309
# 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...
ArchiFleKs/magnum
magnum/tests/unit/common/test_keystone.py
Python
apache-2.0
10,319
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2012-12-17 11:07:19 from __future__ import unicode_literals import os import sys import six import copy import time import json import logging import trac...
wangjun/pyspider
pyspider/fetcher/tornado_fetcher.py
Python
apache-2.0
32,232
# 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 # distrib...
openstack/python-openstackclient
openstackclient/tests/unit/identity/v3/test_consumer.py
Python
apache-2.0
6,837
#!/usr/bin/env python from os.path import join, dirname from cloudify import ctx ctx.download_resource( join('components', 'utils.py'), join(dirname(__file__), 'utils.py')) import utils # NOQA PS_SERVICE_NAME = 'postgresql-9.5' ctx_properties = utils.CtxPropertyFactory().get(PS_SERVICE_NAME) utils.systemd...
Cloudify-PS/cloudify-manager-blueprints
components/postgresql/scripts/stop.py
Python
apache-2.0
364
"""Auto-generated file, do not edit by hand. AR metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_AR = PhoneMetadata(id='AR', country_code=54, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='11\\d{8}|[2368]\\d{9}|9\\d{10}', possible...
shikigit/python-phonenumbers
python/phonenumbers/data/region_AR.py
Python
apache-2.0
6,716
import copy import mock import unittest from see import Hook from see import hooks CONFIG = {'configuration': {'key': 'value'}, 'hooks': [{'name': 'see.test.hooks_manager_test.TestHook', 'configuration': {'foo': 'bar'}}, {'name': 'see.test.hooks_manager_test.TestHookCleanup...
F-Secure/see
see/test/hooks_manager_test.py
Python
apache-2.0
3,020
# Copyright 2015-2016 F5 Networks 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 ...
pjbreaux/f5-openstack-test
f5_os_test/heat_client_utils.py
Python
apache-2.0
2,006
# # 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 agreed to in writi...
Juniper/ceilometer
ceilometer/tests/alarm/partition/test_coordination.py
Python
apache-2.0
16,186
# Copyright (c) 2014 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 ...
citrix-openstack-build/sahara
sahara/service/edp/oozie/engine.py
Python
apache-2.0
7,998
# Copyright 2017 Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
dhermes/gcloud-python
firestore/google/cloud/firestore_v1beta1/client.py
Python
apache-2.0
18,210
# coding: utf-8 """ OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git 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 ...
detiber/lib_openshift
test/test_v1beta1_ingress.py
Python
apache-2.0
1,276
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2012 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the ...
shakamunyi/nova
nova/netconf.py
Python
apache-2.0
1,665
import asyncio import aiohttp import aiohttp_jinja2 import jinja2 from aiohttp import web from aiohttp_debugtoolbar import (middleware, setup as tbsetup, APP_KEY) from .base import BaseTest class TestExceptionViews(BaseTest): @asyncio.coroutine def _setup_app(self, handler, **kw): app = web.Applicat...
massimiliano-della-rovere/aiohttp_debugtoolbar
tests/test_exception_views.py
Python
apache-2.0
5,294
""" mbed SDK Copyright (c) 2016 ARM 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 writing, so...
maximmbed/mbed
tools/config.py
Python
apache-2.0
35,774
# 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 __future__ import absolute_import import sys import os im...
djkonro/client-python
kubernetes/client/apis/networking_api.py
Python
apache-2.0
4,940
import datetime import bisect import json import logging import math import numpy as np import random from learning.rlpower_controller import RLPowerController from scipy.interpolate import splrep, splev from hal.inputs.fitness_querier import FitnessQuerier __author__ = 'matteo' class RLPowerAlgorithm: epsilon =...
portaloffreedom/robot-baby
RobotController/learning/rlpower_algorithm.py
Python
apache-2.0
8,399
import os from plenum.common.util import hexToFriendly from plenum.bls.bls_crypto_factory import create_default_bls_crypto_factory from plenum.common.constants import CLIENT_STACK_SUFFIX from plenum.common.stacks import nodeStackClass from stp_core.crypto.util import randomSeed def initLocalKeys(name, keys_dir, sig...
evernym/zeno
plenum/common/keygen_utils.py
Python
apache-2.0
3,012
""" This dependency resolver resolves tool shed dependencies (those defined tool_dependencies.xml) installed using Platform Homebrew and converted via shed2tap (e.g. https://github.com/jmchilton/homebrew-toolshed). """ import logging import os from xml.etree import ElementTree as ET from .resolver_mixins import ( ...
ssorgatem/pulsar
galaxy/tools/deps/resolvers/brewed_tool_shed_packages.py
Python
apache-2.0
5,246
# Copyright (c) 2016 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 la...
ArchiFleKs/magnum
magnum/tests/unit/common/test_service.py
Python
apache-2.0
2,144
# # 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 # ...
cwolferh/heat-scratch
heat/engine/resources/openstack/designate/domain.py
Python
apache-2.0
4,053
# =============================================================================== # Copyright 2016 Jake Ross # # 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...
USGSDenverPychron/pychron
pychron/pipeline/custom_query.py
Python
apache-2.0
2,881
# # Copyright 2015 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
pkilambi/ceilometer
ceilometer/dispatcher/resources/identity.py
Python
apache-2.0
1,654
"""Clean up some schema artifacts Revision ID: 4a72628695ff Revises: 420f0f384465 Create Date: 2014-04-29 23:51:44.045058 """ # revision identifiers, used by Alembic. revision = '4a72628695ff' down_revision = '420f0f384465' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql def ...
vladan-m/ggrc-core
src/ggrc_gdrive_integration/migrations/versions/20140429235144_4a72628695ff_clean_up_some_schema.py
Python
apache-2.0
806
# 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...
Acehaidrey/incubator-airflow
airflow/kubernetes/pod_generator.py
Python
apache-2.0
20,138
# -*- coding: utf-8 -*- # # Apache Open Climate Workbench documentation build configuration file, created by # sphinx-quickstart on Fri Oct 25 07:58:45 2013. # # 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 # autog...
huikyole/climate
docs/source/conf.py
Python
apache-2.0
9,272
# Copyright 2018 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
aljim/deploymentmanager-samples
examples/v2/igm-updater/python/instance-template.py
Python
apache-2.0
1,916
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
kawamon/hue
apps/filebrowser/src/filebrowser/settings.py
Python
apache-2.0
1,456
import sys from setuptools import setup, find_packages with open("README.rst") as fp: long_description = fp.read() install_requires = [ "requests>=2.12", "PyYAML", "six>=1.10.0", "tzlocal", ] if sys.version_info < (3,): install_requires.extend([ "ipaddress", ]) setup( name=...
eldarion-gondor/pykube
setup.py
Python
apache-2.0
1,253
import base from client.rest import ApiException class Chart(base.Base, object): def __init__(self): super(Chart,self).__init__(api_type = "chart") def upload_chart(self, repository, chart, prov = None, expect_status_code = 201, **kwargs): client = self._get_client(**kwargs) try: ...
wy65701436/harbor
tests/apitests/python/library/chart.py
Python
apache-2.0
2,143