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/env python """ Copyright 2012 GroupDocs. 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...
liosha2007/temporary-groupdocs-python3-sdk
groupdocs/models/StorageInfoResponse.py
Python
apache-2.0
1,149
# 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...
keras-team/keras
keras/layers/merging/maximum.py
Python
apache-2.0
2,842
# # 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/www/api/experimental/test_endpoints.py
Python
apache-2.0
21,328
#!/usr/bin/env python # # Setup # #
PanDAWMS/panda-bigmon-atlas
setup.py
Python
apache-2.0
36
#!/usr/bin/env python # Copyright 2014-2020 The PySCF Developers. 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 # # U...
sunqm/pyscf
pyscf/mcscf/test/test_n2_df.py
Python
apache-2.0
10,791
# Copyright (c) 2010-2015 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 agree...
openstack/storlets
tests/unit/swift_middleware/handlers/test_proxy.py
Python
apache-2.0
34,297
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-03-31 00:18 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('BloggingAPI', '0003_post_image'), ] operations = [ migrations.RenameField( ...
pmaidens/CMPUT404-project
BloggingAPI/BloggingAPI/migrations/0004_auto_20160331_0018.py
Python
apache-2.0
432
#!/usr/bin/env python3 """ Unit tests. """ from unit_test_common import execute_csv2_request, initialize_csv2_request, ut_id, generate_secret from sys import argv import user_requests_cleanup def main(gvar): if not gvar: gvar = {} if len(argv) > 1: initialize_csv2_request(gvar, select...
hep-gc/cloudscheduler
unit_tests/user_requests_setup.py
Python
apache-2.0
3,368
import paho.mqtt.client as mqtt import os,binascii import logging import time from enum import Enum from threading import Timer import json import random import math ID_STRING = binascii.hexlify(os.urandom(15)).decode('utf-8')[:4] CLIENT_ID = "robot-emulator-" + ID_STRING BROKER_HOST = "mosquitto" TOPIC_STATUS = "twin...
EricssonResearch/scott-eu
robot-emulator/main.py
Python
apache-2.0
3,749
# Copyright 2013 Mario Graff Guerrero # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in wri...
mgraffg/simplegp
SimpleGP/tests/test_gpmae.py
Python
apache-2.0
1,069
# ---------------------------------------------------------------- # Copyright 2016 Cisco Systems # # 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/LICENS...
psykokwak4/ydk-gen
sdk/python/core/tests/test_sanity_type_mismatch_errors.py
Python
apache-2.0
7,229
# 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...
dtroyer/python-openstacksdk
openstack/cloud/openstackcloud.py
Python
apache-2.0
31,888
# import ipdb; ipdb.set_trace() from .posts import PostAPIHandler, PostCategoriesAPIHandler from .tweets import TweetsAPIHandler
Laisky/laisky-blog
gargantua/apis/__init__.py
Python
apache-2.0
130
from flask import render_template, flash, redirect, session, url_for, request, g from flask_login import login_user, logout_user, current_user, login_required from app import app, db, lm, oid from .forms import LoginForm, EditForm from .models import User from datetime import datetime @app.before_request def before_r...
jtara1/SimpleFlaskWebsite
app/views.py
Python
apache-2.0
3,783
#coding=utf-8 import httplib import urllib, urllib2 import json import base64 import functools import logging import time class RequestApi(object): TimeOut = 3 DEBUG_LEVEL = 1 HOST = "api.douban.com" @classmethod def request(cls, method, path, params, headers={}, host=''): """test --- ...
lisawei/api_automate_test
base.py
Python
apache-2.0
1,990
from django.contrib.admin import ModelAdmin from django.utils.encoding import smart_text class OimModelAdmin(ModelAdmin): """ OimModelAdmin""" def has_module_permission(self, request): user = request.user if user.is_superuser: return True if user.is_staff: if ...
rockychen-dpaw/oim-cms
registers/utils.py
Python
apache-2.0
806
# -*- coding: utf-8 -*- """Controllers for the pypollmanage pluggable application.""" from .root import RootController
tongpa/pypollmanage
pypollmanage/controllers/__init__.py
Python
apache-2.0
119
#!/usr/bin/env python # # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
Aloomaio/googleads-python-lib
examples/ad_manager/v201805/user_service/get_user_by_email_address.py
Python
apache-2.0
1,937
############################################################################ ## Tool name: BetterBusBuffers - Count Trips at Stops ## Created by: Melinda Morang, Esri, mmorang@esri.com ## Last updated: 30 November 2017 ############################################################################ ''' BetterBusBuffers - C...
Esri/public-transit-tools
deprecated-tools/better-bus-buffers/BBB_CountTripsAtStops.py
Python
apache-2.0
5,373
def rock(): fullspeed() i01.moveHead(90,90) i01.moveArm("left",70,90,80,10) i01.moveArm("right",20,80,20,20) i01.moveHand("left",130,180,180,180,180,90) i01.moveHand("right",50,90,90,90,100,90) sleep(.5) i01.setHeadSpeed(.8,.8) i01.moveHead(60,107) i01.moveArm("left",49,90,75,10) i01.mo...
MyRobotLab/pyrobotlab
home/kwatters/harry/gestures/InMoovApps/Rock_Paper_Scissors/rock.py
Python
apache-2.0
1,243
import unittest import platform from pynpoint import exc import pynpoint.providers as providers import pynpoint.providers.darwin class ProvidersTestCase(unittest.TestCase): def setUp(self): self.old_platform_system = platform.system def tearDown(self): platform.platform = self.old_platform...
ChristopherMacGown/pynpoint
tests/providers_unittest.py
Python
apache-2.0
564
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright 2016 Twitter. 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...
lucperkins/heron
heron/tools/ui/src/python/handlers/common/utils.py
Python
apache-2.0
834
import pathlib import pkg_resources from mopidy import config, ext __version__ = pkg_resources.get_distribution("Mopidy-ALSAMixer").version class Extension(ext.Extension): dist_name = "Mopidy-ALSAMixer" ext_name = "alsamixer" version = __version__ def get_default_config(self): return conf...
mopidy/mopidy-alsamixer
mopidy_alsamixer/__init__.py
Python
apache-2.0
998
import base64 import pickle import re from os import path from py12306.cluster.cluster import Cluster from py12306.helpers.api import * from py12306.app import * from py12306.helpers.auth_code import AuthCode from py12306.helpers.event import Event from py12306.helpers.func import * from py12306.helpers.request import...
pjialin/py12306
py12306/user/job.py
Python
apache-2.0
19,823
class SessionHelper: def __init__(self, app): self.app = app def login(self, user, password): wd = self.app.wd self.app.open_home_page() self.app.type_text("user", user) self.app.type_text("pass", password) wd.find_element_by_css_selector("input[value='Login']")....
obutkalyuk/Python_15
fixture/session.py
Python
apache-2.0
1,157
TRAIN_BATCH_SIZE = 64 TEST_BATCH_SIZE = 64 EPOCH = 32 CALCULATE_LOSS = 100 DATA_PATH = '../dataset/'
yt4766269/pytorch_zoo
LeNet/CONSTANT.py
Python
apache-2.0
100
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('Forum', '0003_auto_20150803_0235'), ] operations = [ migrations.AlterField( model_name='musicianpost', ...
lancekrogers/music-network
cleff/Forum/migrations/0004_auto_20150803_0236.py
Python
apache-2.0
606
from __future__ import unicode_literals from boto.ec2.instancetype import InstanceType from moto.autoscaling import autoscaling_backends from moto.core.responses import BaseResponse from moto.core.utils import camelcase_to_underscores from moto.ec2.utils import filters_from_querystring, \ dict_from_querystring c...
whummer/moto
moto/ec2/responses/instances.py
Python
apache-2.0
30,036
#!/usr/bin/env python # octavo-admin # An administrative script for our bookclub # # Author: Benjamin Bengfort <benjamin@bengfort.com> # Created: Sun Mar 30 20:26:20 2014 -0400 # # Copyright (C) 2014 Bengfort.com # For license information, see LICENSE.txt # # ID: octavo-admin.py [] benjamin@bengfort.com $ """ An a...
DistrictDataLabs/science-bookclub
bin/octavo-admin.py
Python
apache-2.0
1,356
# Copyright 2012 Michael Still and Canonical 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 # # ...
yatinkumbhare/openstack-nova
nova/virt/configdrive.py
Python
apache-2.0
9,964
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
bigswitch/nova
nova/tests/unit/scheduler/test_scheduler.py
Python
apache-2.0
11,503
#First case #http://www.geeksforgeeks.org/root-to-leaf-path-sum-equal-to-a-given-number/ '''Print all the paths from root, with a specified sum in Binary tree - For that Second If condition''' '''Print all the paths from root, with a specified node in Binary tree - For that first If condition''' class Node: def ...
saurbkumar/programming_question_python
my_question/binary-tree-all-path-to-given-sum.py
Python
apache-2.0
1,163
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from django.core.urlresolvers import reverse from django.utils.unittest import skip from libs.ui_test_helpers import NycTreesSeleniumTestCase from apps.core.models import User, Group ...
RickMohr/nyc-trees
src/nyc_trees/apps/users/uitests.py
Python
apache-2.0
7,406
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013, Big Switch 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...
neudesk/neucloud
openstack_dashboard/dashboards/project/loadbalancers/workflows.py
Python
apache-2.0
26,955
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
grengojbo/st2
st2client/st2client/client.py
Python
apache-2.0
5,863
__author__ = 'kent' from time import sleep import urllib.request from urllib.error import HTTPError from json import loads import os import praw def get_links(subscribe): r = praw.Reddit(user_agent='User-Agent: rbot/1.0 by draculacwg') submissions = r.get_subreddit(subscribe).get_hot(limit=50) results =...
kentchiu/reddit-image-crawler
src/readdit_client.py
Python
apache-2.0
3,557
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 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...
shootstar/novatest
nova/api/openstack/wsgi.py
Python
apache-2.0
44,600
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Nebula, 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 # # ...
fogbow/fogbow-dashboard
horizon/templatetags/horizon.py
Python
apache-2.0
4,349
# -*- 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 required by applicable law or...
googleapis/python-dialogflow
samples/generated_samples/dialogflow_generated_dialogflow_v2_versions_create_version_async.py
Python
apache-2.0
1,488
# written in python 3.6.1 #-*- coding: utf-8 -*- from urllib.request import urlopen import json import string import re from bs4 import BeautifulSoup import logging import time FILE_PATH = "./boxofficemojo.com/movie_data.txt" LOG_PATH = "./boxofficemojo.com/scraping.log" logging.basicConfig(filename=LOG_PATH,level=...
softinus/Movie_DataMiner
boxofficemojo.com/BoxOfficeMojo_Scraping_Code.py
Python
apache-2.0
13,739
try: from unittest import mock except ImportError: import mock from docker_custodian.docker_autostop import ( build_container_matcher, get_opts, has_been_running_since, main, stop_container, stop_containers, ) def test_stop_containers(mock_client, container, now): matcher = mock.M...
Yelp/docker-custodian
tests/docker_autostop_test.py
Python
apache-2.0
2,726
#!/usr/bin/env python # -*- coding:utf-8 -*- #通过堡垒机跳转时间命令传输 import paramiko import os import sys import time blip = "121.42.191.190" #定义的堡垒机信息 bluser = "zhangyage" blpasswd = "MCya9B7ewPoTeNT8" hostname = "116.196.69.47" #定义的业务主机信息 username = "root" password = "Zhangyage" port = 22 passinfo =...
zhangyage/Python-oldboy
python-auto/p_ssh2/baolei_command.py
Python
apache-2.0
2,237
# Copyright 2021 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 to in writing, ...
GoogleCloudPlatform/python-docs-samples
workflows/cloud-client/main.py
Python
apache-2.0
2,637
from pyshifu.shifu import Shifu shifu = Shifu() shifu.new("hello", ".")
ShifuML/pyshifu
main.py
Python
apache-2.0
73
# coding=utf-8 # Licensed Materials - Property of IBM # Copyright IBM Corp. 2019 # Separated test code with Python 3.6 syntax. import typing import decimal from streamsx.spl.types import int64 class NTS(typing.NamedTuple): x: int msg: str class NamedTupleBytesSchema(typing.NamedTuple): idx: str msg...
IBMStreams/streamsx.topology
test/python/topology/py36_types.py
Python
apache-2.0
6,604
# Copyright 2022 The Scenic 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 applicable law or agreed to in w...
google-research/scenic
scenic/common_lib/video_utils.py
Python
apache-2.0
1,353
__author__ = 'Ilya Chernyakov' __alias__ = 'eliuha' # Shalom everybody ! def validate_israeli_id_number(iID): iID = str(iID) if len(iID) == 8: iID = '0' + str(iID) if len(iID) != 9: return False num_12_arr = [1, 2, 1, 2, 1, 2, 1, 2, 1] dig = list(int(d) for d in str(iID)) su...
eliuha/pyIsraeliId
pyIsraeliId/checker.py
Python
apache-2.0
605
# 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...
jianghuaw/nova
nova/api/openstack/placement/handler.py
Python
apache-2.0
9,268
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
citrix-openstack-build/heat
heat/tests/test_server.py
Python
apache-2.0
35,624
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
sunqm/pyscf
pyscf/symm/param.py
Python
apache-2.0
8,518
# 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 may not use this file ex...
justinhayes/cm_api
python/src/cm_api/resource.py
Python
apache-2.0
4,891
# Copyright (c) 2014. Mount Sinai School of Medicine # # 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...
hammerlab/immuno
immuno/mhc_common.py
Python
apache-2.0
4,443
import logging def handler(event, context): logger = logging.getLogger() logger.info('hello world') return 'hello world'
xiaozhu36/terraform-provider
examples/fc/hello.py
Python
apache-2.0
130
# 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...
petewarden/tensorflow
tensorflow/python/lib/core/bfloat16_test.py
Python
apache-2.0
17,940
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 xxxx Corporation # All Rights Reserved. # Author: Yu xingchao <yuxcer@gmail.com> # # 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 L...
NewpTone/hotzenplotz
hotzenplotz/db/sqlalchemy/session.py
Python
apache-2.0
4,028
# -*- encoding: utf-8 -*- # # Copyright 2013 IBM Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
saschpe/pycadf
pycadf/audit/api.py
Python
apache-2.0
9,375
# # 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...
chirino/proton
proton-c/bindings/python/proton.py
Python
apache-2.0
63,731
def generate_ming_models(models): pass
synappio/swagger-pyramid
swagger/models.py
Python
apache-2.0
42
# This file is exec'd from settings.py, so it has access to and can # modify all the variables in settings.py. # If this file is changed in development, the development server will # have to be manually restarted because changes will not be noticed # immediately. DEBUG = False ALLOWED_HOSTS = ["*"] # disable compress...
Princeton-CDH/derrida-django
ci/testsettings.py
Python
apache-2.0
1,100
# coding=utf-8 # Copyright 2022 The Google Research 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 applicab...
google-research/google-research
low_rank_local_connectivity/data_provider_test.py
Python
apache-2.0
2,084
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 IBM # # 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...
maoy/zknova
nova/virt/powervm/__init__.py
Python
apache-2.0
1,163
# -*- 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-analytics-admin
samples/generated_samples/analyticsadmin_v1alpha_generated_analytics_admin_service_approve_display_video360_advertiser_link_proposal_sync.py
Python
apache-2.0
1,697
#!/usr/bin/env python """Implementation of client-side file-finder subactions.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import abc from future.utils import with_metaclass from grr_response_client import client_utils from grr_response_client imp...
dunkhong/grr
grr/client/grr_response_client/client_actions/file_finder_utils/subactions.py
Python
apache-2.0
4,871
my_name='Zed A. Shaw' my_age=35 #notalie my_height=74 #inches my_weight=180 #lbs my_eyes='Blue' my_teeth='White' my_hair='Brown' print "Let's talk about %s." % my_name print "He's %d inches tall." % my_height print "He's %d pounds heavy." % my_weight print "Actually that's not too heavy." print "He's got %s eyes and %...
Jumpers/MysoftAutoTest
Step1-PythonBasic/Practices/yuxq/1-5/ex5.py
Python
apache-2.0
570
defaultFileNames = { "caCert": "ca.crt", "userCert": "user.crt", "privateKey": "private.key", "tlsAuth": "tls.key", "configOutput": "client.new.ovpn", } parserMatchers = { "caCert": "<ca>([\s\S]*?)<\/ca>", "userCert": "<cert>([\s\S]*?)<\/cert>", "privateKey": "<key>([\s\S]*?)<\/key>", ...
hzengin/openvpn-config-splitter
lib/constants.py
Python
apache-2.0
598
######################################################## ### Polygon ### ######################################################## __author__ = "Jack B. Du (Jiadong Du)" __copyright__ = "Copyright 2014, DS @NYUSH" __email__ = "JackBDu@nyu.edu" import pygame from pygame.locals i...
JackBDu/polygon
polygon2.py
Python
apache-2.0
5,346
# Copyright 2015-2017 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
scotwk/cloud-custodian
tests/test_ec2.py
Python
apache-2.0
39,894
# Copyright 2014, Rackspace, US, 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...
openstack/horizon
openstack_dashboard/test/unit/api/rest/test_keystone.py
Python
apache-2.0
37,897
from __future__ import absolute_import from . import spatial from . import general from . import geometry from . import filters from . import servicedef from . import find __version__ = "3.5.6"
pLeBlanc93/ArcREST
src/arcrest/common/__init__.py
Python
apache-2.0
193
#!/usr/bin/env python # coding=utf8 import hashlib import hmac import os import tempfile from .decorator import StoreDecorator class _HMACFileReader(object): def __init__(self, hm, source): self.hm = hm self.source = source # "preload" buffer self.buffer = source.read(self.hm.di...
Scarygami/gae-gcs-push2deploy-secrets
lib/simplekv/crypt.py
Python
apache-2.0
6,188
""" Sample script to test output processors """ from generic_runner import run, pprint, get_actor def test_output_processors(): """ Execute iplist actor to test output processors """ data = {} print("Before execution") print("=" * 70) pprint(data) print("=" * 70) print("Execution result:",...
leapp-to/snactor
examples/scripts/output_processors.py
Python
apache-2.0
493
#!/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...
2013Commons/hue
desktop/libs/libsaml/src/libsaml/conf.py
Python
apache-2.0
4,427
# noinspection PyInterpreter import json import logging import os import re import requests import redis import sys import time import urllib import uuid from pylimit import PyRateLimit import six.moves.configparser class VirusTotal(): def __init__(self, *args): self.logger = logging.getLogger(__name__) ...
lukehinds/anteater
anteater/src/virus_total.py
Python
apache-2.0
6,371
from decimal import Decimal from datetime import datetime from uuid import uuid1, uuid4 import unittest from cassandra.cluster import Cluster class TypeTests(unittest.TestCase): def test_basic_types(self): c = Cluster() s = c.connect() s.execute(""" CREATE KEYSPACE typetests ...
aholmberg/python-driver
tests/integration/test_types.py
Python
apache-2.0
4,167
# 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...
jhseu/tensorflow
tensorflow/python/keras/engine/training_utils.py
Python
apache-2.0
81,705
# coding=utf-8 # Copyright 2022 The Edward2 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 applicable law o...
google/edward2
experimental/attentive_uncertainty/contextual_bandits/pretrain.py
Python
apache-2.0
9,412
# Copyright 2015 The Shaderc 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 applicable...
drewet/shaderc
glslc/test/expect.py
Python
apache-2.0
15,233
# Copyright 2021 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 to in writing, ...
GoogleCloudPlatform/cloud-data-quality
clouddq/log.py
Python
apache-2.0
3,052
from typing import List from great_expectations.core.usage_statistics.usage_statistics import ( UsageStatsExceptionPrefix, ) def usage_stats_exceptions_exist(messages: List[str]) -> bool: """ Since the usage stats functionality does not raise exceptions but merely logs them, we need to check the logs for...
great-expectations/great_expectations
tests/core/usage_statistics/util.py
Python
apache-2.0
849
# -*- 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-aiplatform
google/cloud/aiplatform_v1/services/index_service/transports/grpc_asyncio.py
Python
apache-2.0
17,093
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
rogerthat-platform/rogerthat-backend
src/rogerthat/cron/log_retention.py
Python
apache-2.0
810
# Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
jianghuaw/nova
nova/objects/service.py
Python
apache-2.0
22,275
#- # Copyright (c) 2013 Michael Roe # All rights reserved. # # This software was developed by SRI International and the University of # Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 # ("CTSRD"), as part of the DARPA CRASH research programme. # # @BERI_LICENSE_HEADER_START@ # # Licensed to BER...
8l/beri
cheritest/trunk/tests/cp2/test_cp2_creturn_trap.py
Python
apache-2.0
2,300
#coding=utf-8 from base import BaseApi import settings class ShowApi(BaseApi): """ 节目API """ FD = ['showid', 'pk_odshow', 'showname', 'showsubtitle', 'deschead', 'showdesc', 'show_thumburl', 'show_vthumburl', 'show_bannerurl', 'showlength', 'copyright_status', 'paid', 'pay_type', 'onlinetim...
edisonlz/fruit
web_project/base/youkuapi/show.py
Python
apache-2.0
2,122
#!/usr/bin/env python """ """ import vtk def view_frog(fileName, tissues): colors = vtk.vtkNamedColors() tissueMap = CreateTissueMap() colorLut = CreateFrogLut() # Setup render window, renderer, and interactor. renderer = vtk.vtkRenderer() renderWindow = vtk.vtkRenderWindow() renderWind...
lorensen/VTKExamples
src/Python/Visualization/ViewFrog.py
Python
apache-2.0
5,808
# 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/smaug
karbor/tests/unit/fake_operation_log.py
Python
apache-2.0
1,798
# -*- coding: utf-8 -*- # # Copyright (c) 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 License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
redhataccess/redhat-support-tool
src/redhat_support_tool/plugins/list_cases.py
Python
apache-2.0
17,874
import os import pickle import shutil import time from datetime import datetime from os.path import exists, join, relpath from threading import Thread from typing import List, Union, Optional, Dict, Tuple import numpy as np import tensorflow as tf from tensorflow.python.training.adadelta import AdadeltaOptimizer from ...
allenai/document-qa
docqa/trainer.py
Python
apache-2.0
27,581
__source__ = 'https://leetcode.com/problems/3sum/' # https://github.com/kamyu104/LeetCode/blob/master/Python/3sum.py # Time: O(n^2) # Space: O(1) # # Description: Leetcode # 15. 3Sum # # Given an array S of n integers, # are there elements a, b, c in S such that a + b + c = 0? # Find all unique triplets in the array w...
JulyKikuAkita/PythonPrac
cs15211/3Sum.py
Python
apache-2.0
11,548
#!/usr/bin/env python import argparse import os from pathlib import Path import yaml import ray from ray.tune.config_parser import make_parser from ray.tune.progress_reporter import CLIReporter, JupyterNotebookReporter from ray.tune.result import DEFAULT_RESULTS_DIR from ray.tune.resources import resources_to_json fr...
ray-project/ray
rllib/train.py
Python
apache-2.0
9,901
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Module contains Indexed mixin class""" import itertools from collections import namedtuple from sqlalchemy import inspect, orm from ggrc import db from ggrc import fulltext ReindexRule = namedtuple("...
AleksNeStu/ggrc-core
src/ggrc/fulltext/mixin.py
Python
apache-2.0
2,559
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-30 00:07 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import wagtail.wagtailcore.fields class Migration(migrations.Migration): dependencies = [ ('wagtailimages', '0010_change...
Ecotrust/F2S-MOI
moi/recommendations/migrations/0002_auto_20151230_0007.py
Python
apache-2.0
1,297
# Generated by Django 2.2 on 2020-06-20 15:17 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name="A", fields=[ ( "id", ...
3YOURMIND/django-migration-linter
tests/test_project/app_make_not_null_with_django_default/migrations/0001_initial.py
Python
apache-2.0
661
from .local import * DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': 'temp.db', 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } OPBEAT['APP_ID'] = None
pkimber/kbsoftware_couk
settings/dev_test.py
Python
apache-2.0
247
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014 Spotify AB import os.path from distutils.core import setup # Read and store version from latest changelog entry version = open('debian/changelog').readline().split()[1][1:-1] setup(version=version, packages=['spotify', 'spotify.docker_stress']...
spotify/docker-stress
setup.py
Python
apache-2.0
396
# coding: utf-8 import os import lazarus import unittest class TestUtilFuncs(unittest.TestCase): @classmethod def setUpClass(cls): pass @classmethod def tearDownClass(cls): pass def test_ignored(self): with lazarus._util.ignored(OSError): self.assertTrue(True...
formwork-io/lazarus
tests/test__util.py
Python
apache-2.0
811
#!/usr/bin/env python import re import sys import shutil import os.path import subprocess import sysconfig import reindent import untabify SRCDIR = sysconfig.get_config_var('srcdir') def n_files_str(count): """Return 'N file(s)' with the proper plurality on 'file'.""" return "{} file{}".fo...
Jeff-Tian/mybnb
Python27/Tools/Scripts/patchcheck.py
Python
apache-2.0
5,862
import sys import ujson from tornado import gen import tornado.options import tornado.ioloop import tornado.httputil import tornado.httpclient from tornado.escape import json_decode, json_encode import ssl import aiohttp if sys.platform == 'win32': LinkAddressPackFilepath = "/home/root/Python_Workspace/HTTP_Client...
DmitriyFromBSUIR/Home_Automation_Server
Registration_Service/HTTP_Client.py
Python
apache-2.0
1,950
import csv import numpy import pandas import pymongo import requests from datetime import datetime from io import StringIO mongo_client = pymongo.MongoClient("localhost", 27017) financial_db = mongo_client.financial_data financial_collection = financial_db.data class Pull: def __call__(self, source, tickers, ...
tchitchikov/goulash
python/pullData/src/pull.py
Python
apache-2.0
2,524
# Copyright 2016 Google Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
google/smilesparser
test_smilesparser_rdkit.py
Python
apache-2.0
6,797