code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
#!/usr/bin/python import urllib import libxml2 #download VO activation XML url = urllib.urlopen("http://myosg.grid.iu.edu/voactivation/xml?datasource=activation&start_type=7daysago&start_date=10%2F09%2F2009&end_type=now&end_date=10%2F09%2F2009&all_vos=on&active_value=1") vo_activation = url.read() url.close() #downlo...
opensciencegrid/myosg
bin/sample/xpah.py
Python
apache-2.0
1,855
''' Created on 2016/8/25 :author: hubo ''' from namedstruct import * from namedstruct.namedstruct import BadFormatError, BadLenError, Parser, _create_struct def _copy(buffer): try: if isinstance(buffer, memoryview): return buffer.tobytes() else: return buffer[:] excep...
hubo1016/vlcp
vlcp/utils/zookeeper.py
Python
apache-2.0
26,134
# -*- coding: utf-8 -*- import datetime import os import urllib.request import re def getUrlList(url): ret = [] baseUrl = re.findall('(http://.+?)/',url)[0] httpRequest = urllib.request.Request(url) httpResponse = urllib.request.urlopen(httpRequest) html = httpResponse.read()...
imoan1983/medlist
src/downloadFiles.py
Python
apache-2.0
1,924
# -*- coding: utf-8 -*- """ Created on Tue Feb 7 11:27:35 2017 @author: AmatVictoriaCuramIII """ #Get modules #import scipy as sp import numpy as np from pandas_datareader import data import pandas as pd #portfolio set up port = ['^GSPC', '^RUA'] numsec = len(port) equalweight = 1/numsec df2 = pd.DataFrame(columns=[]...
adamrvfisher/TechnicalAnalysisLibrary
Weight.py
Python
apache-2.0
916
def parser(lien,nb) : if lien == 1: lien = "http://www.lesbonsnumeros.com/euromillions/rss.xml" elif lien == 2: lien = "http://www.20min.ch/rss/rss.tmpl?type=rubrik&get=784&lang=ro" elif lien == 3: lien = "http://www.20min.ch/rss/rss.tmpl?type=rubrik&get=313&lang=ro" elif lien == 4: lien = "http:...
MyRobotLab/pyrobotlab
home/steveh110/parser.py
Python
apache-2.0
833
#!/usr/bin/env python2.5 # # Copyright 2008 the Melange authors. # # 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 applic...
MatthewWilkes/mw4068-packaging
src/melange/src/soc/logic/models/role.py
Python
apache-2.0
4,706
# coding=utf-8 # Copyright 2022 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 required by applicable law or agreed ...
tensorflow/model-remediation
tensorflow_model_remediation/min_diff/keras/utils/input_utils.py
Python
apache-2.0
18,202
"""Resource manager for postgres-database 9.x """ # Common stdlib imports import sys import os import os.path ## import commands # fix path if necessary (if running from source or running as test) try: import engage.utils except: sys.exc_clear() dir_to_add_to_python_path = os.path.abspath((os.path.join(...
quaddra/engage
python_pkg/engage/drivers/standard/postgres_database__9_x/driver.py
Python
apache-2.0
5,516
# Copyright (C) Jean-Paul Calderone # See LICENSE for details. import sys from OpenSSL.crypto import TYPE_DSA, Error, PKey, X509 class Checker_X509_get_pubkey(object): """ Leak checks for L{X509.get_pubkey}. """ def __init__(self, iterations): self.iterations = iterations def check_exce...
svpcom/pyopenssl-pypy
leakcheck/crypto.py
Python
apache-2.0
1,629
# Copyright 2015 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...
naturali/tensorflow
tensorflow/models/rnn/ptb/ptb_word_lm.py
Python
apache-2.0
10,545
''' Created on 20Jan.,2017 @author: Alex Ip ''' import re import json from _metadata import Metadata class TemplateMetadata(Metadata): """Subclass of Metadata to manage template metadata """ # Class variable holding metadata type string _metadata_type_id = 'Template' _filename_patt...
alex-ip/geophys2netcdf
geophys2netcdf/metadata/_template_metadata.py
Python
apache-2.0
1,884
"""This module contains the general information for CommKvm ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class CommKvmConsts: pass class CommKvm(ManagedObject): """This is CommKvm class.""" consts = CommKvmCon...
ragupta-git/ImcSdk
imcsdk/mometa/comm/CommKvm.py
Python
apache-2.0
5,785
# Dependencias Internas import numpy as np import matplotlib.pyplot as plt # Dependencias Externas from cupydle.dnn.NeuralNetwork import NeuralNetwork from cupydle.dnn.data import LabeledDataSet as dataSet # Seteo de los parametros capa_entrada = 2 capa_oculta_1 = 3 capa_salida = 2 capas = [capa_entrada, capa_oculta_...
lerker/cupydle
cupydle/test/otros/test_xor_clasification_demo_v2.py
Python
apache-2.0
2,541
import pygame import data from config import * import platforms class Player(pygame.sprite.Sprite): def __init__(self): # Call the parent's constructor pygame.sprite.Sprite.__init__(self) self.image = data.load_image("player.png") self.rect = self.image.get_rect() # Set...
Sveder/pyweek24
gamelib/player.py
Python
apache-2.0
2,447
import torch.nn as nn import math class VGG(nn.Module): def __init__(self, features, num_classes=1000): super(VGG, self).__init__() self.features = features self.classifier = nn.Sequential( nn.Linear(8192, 4096), nn.ReLU(True), nn.Dropout(), ...
Fuchai/Philosophy-Machine
modular/vgg.py
Python
apache-2.0
2,350
#!/usr/bin/env python """Storage implementation for gathered statistics. Statistics collected by StatsCollector (see lib/stats.py) is stored in AFF4 space. Statistics data for different parts of the system is separated by process ids. For example, for the frontend, process id may be "frontend", for worker - "worker", ...
ojengwa/grr
lib/aff4_objects/stats_store.py
Python
apache-2.0
26,581
# Copyright 2013 Daniel Narvaez # # 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...
dnarvaez/osbuild
osbuild/utils.py
Python
apache-2.0
983
#!/usr/bin/python2.5 # # Copyright 2010 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...
rhefner1/ghidonations
pipeline/models.py
Python
apache-2.0
6,902
#!/usr/bin/env python3 # This script numbers the section in a markdown document # It makes some simplifying assumptions about the structure # of the document: i.e., no references occur in quoted blocks # pylint: disable=invalid-name,missing-docstring import re import os import datetime class Headings: def __init_...
mbudiu-vmw/hiero
docs/number-sections.py
Python
apache-2.0
4,761
import json import pytest from mock.mock import Mock from insights.core import filters from insights.core.dr import SkipComponent from insights.core.spec_factory import DatasourceProvider from insights.specs import Specs from insights.specs.datasources.cloud_init import cloud_cfg, LocalSpecs CLOUD_CFG = """ users: ...
RedHatInsights/insights-core
insights/tests/datasources/test_cloud_init.py
Python
apache-2.0
3,823
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.contrib.gis.db.models.fields class Migration(migrations.Migration): dependencies = [ ('let_me_app', '0003_auto_20150713_2051'), ] operations = [ migrations.RemoveField(...
oleg-chubin/let_me_play
let_me_app/migrations/0004_auto_20150713_2126.py
Python
apache-2.0
848
# # 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/conary
conary/local/schema.py
Python
apache-2.0
36,311
# -*- coding: utf-8 -*- """ Created on 2017/3/24 @author: will4906 """ # from logbook import Logger # from service import log # # # from service.account import * # # # from service.proxy import * # # # # logger = Logger('main') # # # # if __name__ == '__main__': # # # stupid() # # # update_proxy() # # # n...
will4906/PatentCrawler
service/__init__.py
Python
apache-2.0
413
#!/usr/bin/env python # -*- coding: utf-8 -*- """ .. py:currentmodule:: leepstools.file.elastic .. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca> Read and generate LEEPS elastic file .ees. """ ############################################################################### # Copyright 2017 Hendrix Dem...
drix00/leepstools
leepstools/file/elastic.py
Python
apache-2.0
1,272
# # coding=utf-8 # import os # def tree(top): # #path,folder list,file list # for path, names, fnames in os.walk(top): # for fname in fnames: # yield os.path.join(path, fname) # # for name in tree(os.getcwd()): # print name # # import time # from functools import wraps # # def timethis(f...
hujiaweibujidao/XSolutions
python/APythonTest.py
Python
apache-2.0
2,492
#!/usr/bin/python ''' Use this in the same way as Python's http.server / SimpleHTTPServer: python -m RangeHTTPServer [port] The only difference from http.server / SimpleHTTPServer is that RangeHTTPServer supports 'Range:' headers to load portions of files. This is helpful for doing local web development with genomi...
berdario/RangeHTTPServer
RangeHTTPServer.py
Python
apache-2.0
4,567
"""Standard setup for tests.""" from unittest.mock import Mock, patch from pytest import fixture from homeassistant import setup from homeassistant.components.philips_js.const import DOMAIN from . import MOCK_CONFIG, MOCK_ENTITY_ID, MOCK_NAME, MOCK_SERIAL_NO, MOCK_SYSTEM from tests.common import MockConfigEntry, mo...
turbokongen/home-assistant
tests/components/philips_js/conftest.py
Python
apache-2.0
1,756
#!/usr/bin/env python from setuptools import setup, find_packages setup( name="luigi-td", version='0.6.10.dev0', description="Luigi integration for Treasure Data", author="Treasure Data, Inc.", author_email="support@treasure-data.com", url="https://github.com/treasure-data/luigi-td", insta...
treasure-data/luigi-td
setup.py
Python
apache-2.0
778
#!/usr/bin/env python # # VM Backup extension # # Copyright 2014 Microsoft Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
soumyanishan/azure-linux-extensions
VMBackup/main/fsfreezer.py
Python
apache-2.0
8,407
#!/usr/bin/env python """ 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");...
tzolov/elasticsearch-yarn-ambari-plugin
src/main/resources/services/ELASTICSEARCH_YARN/package/scripts/master.py
Python
apache-2.0
6,151
#!/usr/bin/env python # -*- coding: utf-8 -*- # # ING UNI CT Telegram Bot from telegram.ext import Updater, CommandHandler, MessageHandler, Filters import logging from utils import utility from unidecode import unidecode import json #need load configuration from file ROOMS_FILE='utils/rooms.json' COURSES_FILE='utils...
gabrik/ingunict-bot
ingbot.py
Python
apache-2.0
9,550
from __future__ import absolute_import from __future__ import unicode_literals import os import shutil import tempfile from distutils.spawn import find_executable from os import path import pytest from docker.errors import APIError from six import StringIO from six import text_type from .. import mock from .testcase...
swoopla/compose
tests/integration/service_test.py
Python
apache-2.0
48,237
# 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 the Li...
pypa/warehouse
warehouse/search/queries.py
Python
apache-2.0
3,381
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from phd/calc_serviceRequest.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class calc_serviceRequest(genpy.Message): _md5sum = "504533770c671b8893346f8f23298fee" _t...
mikewrock/phd_backup_full
devel/lib/python2.7/dist-packages/phd/srv/_calc_service.py
Python
apache-2.0
19,928
# Copyright (c) 2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{txweb2.http_headers}. """ from twisted.trial import unittest import random import time from txweb2 import http_headers from txweb2.http_headers import Cookie, HeaderHandler, quoteString, generateKeyValues from twisted.python...
red-hood/calendarserver
txweb2/test/test_http_headers.py
Python
apache-2.0
32,998
#coding:utf-8 import tensorflow as tf from TFCommon.Layers import EmbeddingLayer from TFCommon.RNNCell import LSTMCell class HypeNet(object): def __init__(self,word_num,word_embd_dim,pos_num,pos_embd_dim, parse_num,parse_embd_dim,LSTM_dim,x_vector_dim,y_vector_dim,classification_dim): se...
dongfangyixi/HypeNet-tensorflow
model.py
Python
apache-2.0
9,884
from pytest_bdd import scenario from .contact_steps import * @scenario("contacts.feature", "Add new contact") def test_add_new_contact(): pass @scenario("contacts.feature", "Delete a contact") def test_delete_contact(): pass @scenario("contacts.feature", "Modify a contact") def test_modify_contact(): ...
yupasik/python_training
bdd/contact_scenarios.py
Python
apache-2.0
325
from .evaluate_all import main if __name__ == "__main__": main()
undertherain/vsmlib
vsmlib/benchmarks/__main__.py
Python
apache-2.0
70
# 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...
airbnb/superset
tests/queries/saved_queries/api_tests.py
Python
apache-2.0
22,536
# Copyright (c) 2015 - 2017 StorPool # 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...
openstack/os-brick
os_brick/initiator/connectors/storpool.py
Python
apache-2.0
10,173
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for the update tool.""" from __future__ import unicode_literals import os import sys import unittest from tools import update from tests import test_lib @unittest.skipIf( os.environ.get('TRAVIS_OS_NAME') == 'osx', 'TLS 1.2 not supported by macOS on Tr...
rgayon/l2tdevtools
tests/update.py
Python
apache-2.0
2,954
# Methods for generating Region Adjacency Graphs import networkx as nx import numpy as np # Generates the Region Adjacency Graph def generate_rag(im, linear): G=nx.Graph() if linear == True: (max_diff, min_diff) = get_diff_range(im) scale_factor = 1/(max_diff - min_diff) x = 0 for col...
Upward-Spiral-Science/uhhh
code/Graph Analysis/ragGen.py
Python
apache-2.0
2,992
# -*- coding: utf-8 -*- # # Copyright 2015-2020 BigML # # 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 ...
mmerce/python
bigml/tests/test_37_configuration.py
Python
apache-2.0
2,251
import os import sys import traceback from flask import Flask, redirect, render_template, request, url_for from flask.ext.cqlengine import CQLEngine from datetime import datetime import settings # Initialize simple Flask application app = Flask(__name__) app.config.from_object(settings) # This engages cqlengine so...
chillinc/Flask-CQLEngine
testapp/app.py
Python
apache-2.0
682
#!/usr/bin/env python """ Command-line utility for administrative tasks. """ import os import sys if __name__ == "__main__": os.environ.setdefault( "DJANGO_SETTINGS_MODULE", "MeetingActions.settings" ) from django.core.management import execute_from_command_line execute_from_command_...
mudryuk/djangoMeetingActions
MeetingActions/MeetingActions/manage.py
Python
apache-2.0
335
# 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...
openstack/python-muranoclient
muranoclient/tests/unit/osc/v1/fakes.py
Python
apache-2.0
823
# -*- coding: utf-8 -*- from contextlib import contextmanager from contextlib import nested import copy import os import mock from pushmanager.core import db from pushmanager.core.settings import Settings from pushmanager.testing.mocksettings import MockedSettings import pushmanager.core.git import pushmanager.testin...
hashbrowncipher/pushmanager
pushmanager/tests/test_core_git.py
Python
apache-2.0
8,866
# File timesqrt.py import sys, timer2 reps = 10000 repslist = range(reps) # Pull out range list time for 2.6 from math import sqrt # Not math.sqrt: adds attr fetch time def mathMod(): for i in repslist: res = sqrt(i) return res def powCall(): for i in repslist: r...
dreadrel/UWF_2014_spring_COP3990C-2507
notebooks/scripts/book_code/code/timesqrt.py
Python
apache-2.0
621
import mxnet as mx import os import logging import argparse from math import ceil import sparse_sgd # symbol net def get_symbol(): data = mx.symbol.Variable('data') fc1 = mx.symbol.FullyConnected(data, name='fc1', num_hidden=128) act1 = mx.symbol.Activation(fc1, name='relu1', act_type="relu") fc2 = mx....
hesseltuinhof/mxnet
example/dsd/mlp.py
Python
apache-2.0
4,340
# -*- coding: utf-8 -*- # # Copyright 2016 edX PDR Lab, National Central University, Taiwan. # # http://edxpdrlab.ncu.cc/ # # 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://w...
yrchen/CommonRepo
config/urls.py
Python
apache-2.0
7,139
# -*- coding: utf-8 -*- from __future__ import absolute_import from . import * from . fixtures import * import os import email.iterators from talon import quotations import six from six.moves import range from six import StringIO @patch.object(quotations, 'MAX_LINES_COUNT', 1) def test_too_many_lines(): msg_bo...
mailgun/talon
tests/text_quotations_test.py
Python
apache-2.0
21,510
from sqlalchemy.orm import relationship, backref from sqlalchemy.schema import Column, ForeignKey # Since SQLAlchemy 1.0.0 # from sqlalchemy.types import MatchType from .types import ( LimitedString, LimitedText, LimitedUnicode, LimitedBigInteger, LimitedInteger, LimitedSmallInteger, Limited...
postatum/nefertari-sqla
nefertari_sqla/fields.py
Python
apache-2.0
18,442
import sht21 with sht21.SHT21(1) as sht21: print "temp: %s"%sht21.read_temperature() print "humi: %s"%sht21.read_humidity()
BollMose/daynote
test_sht.py
Python
apache-2.0
132
from django.conf.urls import patterns, include, url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'quickquest.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), )
acarmisc/quickquest
quickquest/urls.py
Python
apache-2.0
301
from .utils import _get_selector def expanded_ad_operation(adgroup_id: 'Long' = None, ad_id: 'Long' = None, status: 'String' = 'PAUSED', operator: 'String' = 'ADD', headline_part_1: 'String' = '', ...
getninjas/adwords-client
adwords_client/adwords_api/operations/ad.py
Python
apache-2.0
5,064
from flask.ext.wtf import Form from wtforms import StringField, SubmitField from wtforms.validators import Required class SearchForm(Form): search_string = StringField('Enter search string') submit = SubmitField('Submit')
snowch/movie-recommender-demo
web_app/app/main/forms.py
Python
apache-2.0
232
from setuptools import setup, Extension with open('README.md') as istream: long_description = istream.read() tests_require = ['pytest'] libReQL = Extension( 'libReQL', include_dirs=['src'], sources=[ 'src/Python/connection.c', 'src/Python/cursor.c', 'src/Python/query.c', ...
grandquista/ReQL-Core
setup.py
Python
apache-2.0
1,701
# # Copyright (c) 2016 Juniper Networks, Inc. All rights reserved. # """ This file contains implementation of data model for mesos manager """ import json from cfgm_common.vnc_db import DBBase from bitstring import BitArray from vnc_api.vnc_api import (KeyValuePair) from mesos_manager.vnc.vnc_mesos_config import VncM...
rombie/contrail-controller
src/container/mesos-manager/mesos_manager/vnc/config_db.py
Python
apache-2.0
32,110
# Copyright 2014 OneConvergence, 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...
beagles/neutron_hacking
neutron/plugins/oneconvergence/plugin.py
Python
apache-2.0
11,208
from __future__ import absolute_import import click from datasciencebox.cli.main import cli, default_options @cli.group(short_help='Install packages, applications and more') @click.pass_context def install(ctx): pass @install.command('miniconda', short_help='Install miniconda in the instances') @click.option(...
danielfrg/datasciencebox
datasciencebox/cli/install.py
Python
apache-2.0
6,874
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2020-06-22 19:15
hankcs/HanLP
hanlp/datasets/srl/__init__.py
Python
apache-2.0
67
# -*- coding: utf-8 -*- # # libnacl documentation build configuration file, created by # sphinx-quickstart on Thu May 29 10:29:25 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
saltstack/libnacl
doc/conf.py
Python
apache-2.0
10,276
# coding=utf-8 #[3,2,4] >> 3² + 2² + 4² = 9 + 4 + 16 = 29 pow = lambda x: x**2 def exer(lista): result = 0 for i in lista: result = pow(i)+result return result def f(a): def g(b, c, d, e): print(a, b, c, d, e) return g
Lindennerd/exercicios_luizpaulo_leandro
exercicios/ex_4.py
Python
apache-2.0
263
# -*- encoding: utf-8 -*- # # Copyright 2013 Hewlett-Packard Development Company, L.P. # # 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 # # ...
ionutbalutoiu/ironic
ironic/drivers/fake.py
Python
apache-2.0
11,459
# Lint as: python3 # Copyright 2021 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 ...
tensorflow/lingvo
lingvo/core/gshard_layers_test.py
Python
apache-2.0
8,710
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
snowch/biginsight-examples
examples/ElasticsearchIntegrationWithSpark/import_from_elasticsearch.py
Python
apache-2.0
2,082
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
GoogleCloudPlatform/django-cloud-deploy
django_cloud_deploy/tests/lib/utils.py
Python
apache-2.0
2,258
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apach...
eltonkevani/tempest_el_env
tempest/api/compute/floating_ips/test_floating_ips_actions.py
Python
apache-2.0
7,990
from rucio.client import Client as RucioClient from rucio.common.exception import DataIdentifierNotFound, DuplicateRule, DataIdentifierAlreadyExists, \ FileAlreadyExists from pandaharvester.harvestercore import core_utils from pandaharvester.harvesterstager import yoda_rucio_rse_direct_stager from pandaharvester.h...
PanDAWMS/panda-harvester
pandaharvester/harvesterstager/rucio_rse_direct_stager.py
Python
apache-2.0
11,181
# # 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...
wooga/airflow
tests/providers/amazon/aws/operators/test_gcs_to_s3.py
Python
apache-2.0
8,747
# 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...
tensorflow/addons
tensorflow_addons/seq2seq/tests/beam_search_decoder_test.py
Python
apache-2.0
22,072
# -*- coding: utf-8 -*- # Copyright 2022 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 required by applicable law or...
googleapis/python-gke-hub
samples/generated_samples/gkehub_v1_generated_gke_hub_create_membership_sync.py
Python
apache-2.0
1,568
"""enterprepo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class...
weichen2046/IntellijPluginDevDemo
enterprise-repo/enterprepo/enterprepo/urls.py
Python
apache-2.0
1,167
#!/usr/bin/python """ Every 30 minutes backs up database to S3. To recover the database, (i.e. reverse the process) simply download the file from S3, un-tar it, and use the command: (./)mongorestore --host {hostname} --port {port} path/to/dump/mongodump where {hostname} and {port} are as they are below """ import sys...
lalitkumarj/NEXT-psych
next/database/database_backup.py
Python
apache-2.0
2,053
# Copyright 2016 Osvaldo Santana Neto # # 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 ...
osantana/correios
tests/vcr.py
Python
apache-2.0
1,315
""" 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 ...
alexryndin/ambari
ambari-server/src/main/resources/stacks/BigInsights/4.0/hooks/before-START/scripts/params.py
Python
apache-2.0
9,467
#!/usr/bin/python # 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 # "...
nathanbjenx/cairis
cairis/bin/quick_setup_headless.py
Python
apache-2.0
3,003
# # 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 # ...
steveb/heat
heat/engine/resources/openstack/mistral/workflow.py
Python
apache-2.0
27,192
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
napalm-automation/napalm-yang
napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/bgp/global_/dynamic_neighbor_prefixes/__init__.py
Python
apache-2.0
15,976
# -*- coding: utf-8 -*- import unittest class TestExample(unittest.TestCase): @classmethod def setUpClass(cls): print("**************************************** setUpClass ****************************************") @classmethod def tearDownClass(cls): print("***************************...
Ernestyj/PyStudy
DataScience/python/tools/test/test_example.py
Python
apache-2.0
577
# -*- coding: utf-8 -*- # Copyright (C) 2019 - 2020 by Pedro Mendes, Rector and Visitors of the # University of Virginia, University of Heidelberg, and University # of Connecticut School of Medicine. # All rights reserved. # Copyright (C) 2017 - 2018 by Pedro Mendes, Virginia Tech Intellectual # Properties, Inc.,...
copasi/COPASI
copasi/bindings/python/unittests/Test_CReport.py
Python
artistic-2.0
3,011
import logging import sys from cliff.app import App from cliff.commandmanager import CommandManager # from .utils import ColorLogFormatter from nicelog.formatters import ColorLineFormatter class HarvesterApp(App): logger = logging.getLogger(__name__) def __init__(self): super(HarvesterApp, self).__...
opendatatrentino/opendata-harvester
harvester/cli.py
Python
bsd-2-clause
1,858
from __future__ import print_function import math import numpy as np import numba.unittest_support as unittest from numba.compiler import compile_isolated, compile_extra, Flags from numba import types, typing from .support import TestCase RISKFREE = 0.02 VOLATILITY = 0.30 A1 = 0.31938153 A2 = -0.356563782 A3 = 1...
jriehl/numba
numba/tests/test_blackscholes.py
Python
bsd-2-clause
6,553
# # FishPi - An autonomous drop in the ocean # # Main View classes for POCV UI. # import tkFont from Tkinter import * from PIL import Image, ImageTk class MainView(Frame, object): """ MainView class for POCV UI. """ def __init__(self, master, view_controller): super(MainView, self).__init__(mas...
FishPi/FishPi-POCV---Command---Control
fishpi/ui/main_view_tk.py
Python
bsd-2-clause
13,484
from __future__ import print_function import re from streamlink.plugin import Plugin from streamlink.plugin.api import validate from streamlink.stream import HLSStream class PowerApp(Plugin): url_re = re.compile(r"https?://(?:www.)?powerapp.com.tr/tvs?/(\w+)") api_url = "http://api.powergroup.com.tr/Channels...
wlerin/streamlink
src/streamlink/plugins/powerapp.py
Python
bsd-2-clause
979
# -*- coding: utf-8 -*- import json from io import StringIO from gsxws import escalations from django import template from django.contrib import messages from django.http import HttpResponse from django.utils.translation import ugettext as _ from django.forms.models import modelformset_factory from django.views.decor...
fpsw/Servo
servo/views/note.py
Python
bsd-2-clause
13,001
import collections class Refs: class Ref: def __init__(self,number,html): self.number=number self.html=html @property def id(self): return "ref-"+str(self.number) @property def ref(self): return "<sup><a href='#"+self.id+"'>["+str(self.number)+"]</a></sup>" @property def body(self): retur...
AntonKhorev/spb-budget-xls
src/htmlPageContent.py
Python
bsd-2-clause
10,106
# Copyright 2012 django-compresshtml authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. from compresshtml import compress_html from django.conf import settings class CompressHtmlMiddleware(object): def process_response(self, request...
kamagatos/django-compresshtml
compresshtml/middleware.py
Python
bsd-2-clause
515
"""Integration project URL Configuration""" from django.contrib import admin from django.urls import re_path from django.views.generic import TemplateView urlpatterns = [ re_path(r"^admin/", admin.site.urls), re_path( r"^$", TemplateView.as_view(template_name="home.html"), name="home" ), ]
jambonsw/django-improved-user
example_integration_project/config/urls.py
Python
bsd-2-clause
312
SECRET_KEY = 'youtrack-plugin'
bogdal/sentry-youtrack
test_settings.py
Python
bsd-2-clause
30
class dummy_app(object): name = 'dummy app' def __init__(self, vendor): vendor.time_taken = 2 self.send = vendor.send
houqp/iris-api
src/iris/applications/dummy_app.py
Python
bsd-2-clause
143
# ***************************************************************************** # Copyright (c) 2020, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of sou...
IntelLabs/hpat
examples/series/series_lt.py
Python
bsd-2-clause
1,748
try: from django.conf import settings STRACKS_CONNECTOR = settings.STRACKS_CONNECTOR except (ImportError, AttributeError): STRACKS_CONNECTOR = None STRACKS_API = None from stracks_api.api import API from stracks_api import client import django.http STRACKS_API = None if STRACKS_CONNECTOR: STRACK...
Stracksapp/stracks_api
stracks_api/middleware.py
Python
bsd-2-clause
2,170
from rctk.widgets.control import Control, Attribute from rctk.task import Task from rctk.event import Clickable class Dropdown(Control, Clickable): """ Display a dropdown containing values. The caller must supply items as tuples (key, label), label will be used for presentation, key can be...
rctk/rctk
rctk/widgets/dropdown.py
Python
bsd-2-clause
3,383
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #======================================================================= # # aes_key_gen.py # ------------- # Simple, pure Python test model of the AES key generation. # This one is operating on 32 bit words. The key generation # supports 128 and 256 bit keys. # # # Author...
secworks/aes
src/model/python/aes_key_gen.py
Python
bsd-2-clause
22,825
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import print_function """ This module implements the Resource classes that translate JSON from JIRA REST resources into usable objects. """ import collections import re import logging import json from six import iteritems, string_types, t...
milo-minderbinder/jira
jira/resources.py
Python
bsd-2-clause
30,001
""" This is a direct translation of nvvm.h """ import logging import re import sys from ctypes import (c_void_p, c_int, POINTER, c_char_p, c_size_t, byref, c_char) import threading from llvmlite import ir from .error import NvvmError, NvvmSupportError from .libs import get_libdevice, open_libdevi...
sklam/numba
numba/cuda/cudadrv/nvvm.py
Python
bsd-2-clause
24,855
# Copyright (c) by it's authors. # Some rights reserved. See LICENSE, AUTHORS. from peer import * class Ping(Peer): Ping = Pillow.InOut def __init__(self, *args): Peer.__init__(self, *args) self._catch(Ping.In.Ping, self.message) def message(self, pillow, feathers): self._throw(...
FreshXOpenSource/wallaby-base
wallaby/pf/peer/ping.py
Python
bsd-2-clause
353
# -*- coding: utf-8 -*- import os from unittest import TestCase from ldtools.backends import get_file_extension, RestBackend, MemoryBackend,\ FileBackend class StandardBackendReturnsRdflibGraphTestMixin(object): """Basis to assure we can use local resources in all other tests. Tests which functions the ba...
dmr/Ldtools
tests/test_backends.py
Python
bsd-2-clause
3,268
from collections import namedtuple RepositoryMeta = namedtuple('RepositoryMeta', '''repositoryName baseURL protocolVersion adminEmail earliestDatestamp deletedRecord granularity''') OAIRequest = namedtuple('OAIRequest', '''verb identifier metadataPrefix set resumptionToken from_ until''') ...
gustavofonseca/oai-pmh
oaipmh/entities.py
Python
bsd-2-clause
1,659