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
from bambu_mail.shortcuts import subscribe def newsletter_optin(sender, user, **kwargs): subscribe( user.email, list_id = 'signup', double_optin = False, send_welcome = False )
iamsteadman/bambu-mail
bambu_mail/receivers.py
Python
apache-2.0
217
from django.conf.urls import patterns, include, url from django.contrib import admin urlpatterns = patterns('', # Examples: # url(r'^$', 'in100gram.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), )
VladimirShe/in100gram
in100gram/in100gram/urls.py
Python
apache-2.0
278
# =============================================================================== # Copyright 2014 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...
UManPychron/pychron
pychron/processing/ratios/ratio_editor.py
Python
apache-2.0
4,353
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # 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...
394954369/horizon
openstack_dashboard/dashboards/project/volumes/volumes/tests.py
Python
apache-2.0
49,698
#!/usr/bin/python2.7 # encoding: utf-8 # 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 ...
AwesomeTurtle/personfinder
tests/server_test_cases/import_tests.py
Python
apache-2.0
11,780
######## # Copyright (c) 2013 GigaSpaces Technologies Ltd. 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...
cloudify-cosmo/cloudify-plugins-common
setup.py
Python
apache-2.0
2,007
#!/usr/bin/python import sys import re import threading import time import signal import urllib.request, urllib.error, urllib.parse import json import os.path from bs4 import BeautifulSoup from gi.repository import Gtk, GObject, GLib import au class AnimeDl(object): def __init__(self): self.ep = [] ...
saveman71/Anime-Ultime-Downloader
gui.py
Python
apache-2.0
6,830
import os import sys import logging import uuid import traceback import datetime import cgi import MySQLdb import stripe import re import requests import urllib import time import pmsconstants from flask import Flask, render_template, request, jsonify, redirect, url_for, Markup, session, Response from werkzeug import ...
scottsappen/PayMySitter
main.py
Python
apache-2.0
10,136
# 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 ...
tantexian/sps-2014-12-4
sps/openstack/common/db/sqlalchemy/session.py
Python
apache-2.0
35,114
# # 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 # ...
gnocchixyz/python-gnocchiclient
gnocchiclient/v1/resource_cli.py
Python
apache-2.0
10,591
from abc import ABCMeta, abstractmethod class Parser(object): __meta__ = ABCMeta def __init__(self, source): self.source = source @abstractmethod def schedule(self): pass
vtemian/uni-west
second_year/os/exams/round2/scheduler/parsers/base.py
Python
apache-2.0
207
# -*- 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...
googleads/google-ads-python
google/ads/googleads/v9/services/types/customer_service.py
Python
apache-2.0
7,422
"""Validate dependencies.""" import pathlib import re from typing import Dict import voluptuous as vol from voluptuous.humanize import humanize_error from homeassistant.const import CONF_SELECTOR from homeassistant.exceptions import HomeAssistantError from homeassistant.helpers import config_validation as cv, selecto...
turbokongen/home-assistant
script/hassfest/services.py
Python
apache-2.0
2,796
# ~*~ coding: utf-8 ~*~ from django.conf.urls import * import virtenviro.registration.views import django.contrib.auth.views urlpatterns = [ url(r'^signup/$', virtenviro.registration.views.signup), url(r'^login/$', django.contrib.auth.views.login, {"template_name": "virtenviro/accounts/login.html"}), url(r...
Haikson/virtenviro
virtenviro/registration/urls_new.py
Python
apache-2.0
396
# Copyright 2013 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 ...
dietrichc/streamline-ppc-reports
googleads/common.py
Python
apache-2.0
12,102
# Copyright (c) 2014 Rackspace, 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 wr...
obulpathi/poppy
poppy/transport/pecan/controllers/v1/services.py
Python
apache-2.0
9,877
import tempfile import os import pytest from cocrawler.urls import URL import cocrawler.datalayer as datalayer import cocrawler.config as config def test_seen(): c = {'Robots': {'RobotsCacheSize': 1, 'RobotsCacheTimeout': 1}} config.set_config(c) dl = datalayer.Datalayer() assert not dl.seen(URL('http...
cocrawler/cocrawler
tests/unit/test_datalayer.py
Python
apache-2.0
1,764
# Copyright 2011 OpenStack Foundation # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2011 Grid Dynamics # Copyright 2011 Eldar Nugaev, Kirill Shileev, Ilya Alekseyev # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with...
bigswitch/nova
nova/api/openstack/compute/floating_ips.py
Python
apache-2.0
13,790
# -*- 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...
googleads/google-ads-python
google/ads/googleads/v9/enums/types/click_type.py
Python
apache-2.0
2,994
# pylint: disable=no-self-use,invalid-name import numpy from numpy.testing import assert_almost_equal import torch from torch.autograd import Variable from allennlp.common import Params from allennlp.modules.seq2vec_encoders import BagOfEmbeddingsEncoder from allennlp.common.testing import AllenNlpTestCase class Test...
nafitzgerald/allennlp
tests/modules/seq2vec_encoders/boe_encoder_test.py
Python
apache-2.0
3,106
# Copyright 2014 Cisco Systems, 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 requi...
CiscoSystems/fabric_enabler
setup_enabler.py
Python
apache-2.0
36,241
# -*- coding: utf-8 -*- # # Copyright 2014-2021 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 ...
jaor/python
bigml/api_handlers/datasethandler.py
Python
apache-2.0
8,741
import logging; logger = logging.getLogger('myapp') # Send log messages to myapp.log fh = logging.FileHandler('myapp.log') logger.addHandler(fh) logger.setLevel(logging.DEBUG) logger.debug('In main module')
dspinellis/effective-debugging
logging/Python/eventlog.py
Python
apache-2.0
220
#!/usr/bin/python #coding: utf-8 #Author: asher #Date: 2017/10/20 #Purpose: get dell server info from api.dell.com import ConfigParser import time import datetime import requests import fileinput import sys import os import re import Queue from multiprocessing import Pool import threading import codecs reload(sys) #...
lichengshuang/createvhost
python/asher/getcmdbinfo/bin/getWarranty.py
Python
apache-2.0
7,752
""" Performs a request via the client with OpenID Connect enabled, with a local OP server. """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import requests import subprocess from urlparse import urlparse import lxml.html as html import client import se...
diekhans/ga4gh-server
tests/end_to_end/test_oidc.py
Python
apache-2.0
3,844
from google.appengine.api import datastore from google.appengine.api import datastore_types from google.appengine.api import users from google.appengine.ext import db import datetime class PageModel( db.Model ): name = db.StringProperty( required = True ) creator = db.UserProperty(required = True ) cr...
ranjiao/raysdemo
crazydepot/src/wiki/page.py
Python
apache-2.0
1,029
# -*- coding: utf-8 -*- """Shared functions and classes for testing.""" from __future__ import unicode_literals import io import os import shutil import re import tempfile import unittest from dfdatetime import time_elements from dfvfs.lib import definitions as dfvfs_definitions from dfvfs.path import factory as pat...
rgayon/plaso
tests/test_lib.py
Python
apache-2.0
6,202
import asyncio import os import pathlib import re import unittest from collections.abc import Sized, Container, Iterable, Mapping, MutableMapping from unittest import mock from urllib.parse import unquote from multidict import CIMultiDict import aiohttp.web from aiohttp import hdrs from aiohttp.web import (UrlDispatche...
elastic-coders/aiohttp
tests/test_urldispatch.py
Python
apache-2.0
36,992
#!/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...
jayceyxc/hue
apps/jobbrowser/src/jobbrowser/apis/workflow_api.py
Python
apache-2.0
6,200
# 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...
OpenDaisy/daisy-client
daisyclient/openstack/common/_i18n.py
Python
apache-2.0
1,733
# # Copyright 2018 PyWren Team # # 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...
pywren/pywren
pywren/wrenhandler.py
Python
apache-2.0
17,657
# Copyright 2020 DeepMind Technologies 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 ag...
deepmind/dm_robotics
py/vision/types.py
Python
apache-2.0
3,974
""" WSGI config for gis_photo project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from dj_static import Cling, Media...
notthatbreezy/phl-play
django/phlplay/wsgi.py
Python
apache-2.0
452
#!/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...
yongshengwang/builthue
desktop/libs/liboozie/src/liboozie/conf.py
Python
apache-2.0
2,552
from task19_PageObject.MainPage import MainPage def test_adding_and_deleting_from_cart(driver): main_page = MainPage(driver) main_page.open() # Add 3 ducks to the cart in a loop for i in range(1, 4): # Click at the i-d duck product_page = main_page.click_to_product_number(i) p...
byakatat/selenium-training
task19_PageObject/test_task19.py
Python
apache-2.0
498
import numpy as np import eos import h5py # This script converts the Basel Face Model 2017 (BFM2017, [1]) to the eos model format, # specifically the files model2017-1_face12_nomouth.h5 and model2017-1_bfm_nomouth.h5 from the BFM2017 download. # # The BFM2017 does not come with texture (uv-) coordinates. If you have t...
patrikhuber/eos
share/scripts/convert-bfm2017-to-eos.py
Python
apache-2.0
3,067
# Copyright 2022. ThingsBoard # # # 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 ...
thingsboard/thingsboard-gateway
thingsboard_gateway/gateway/grpc_service/tb_grpc_manager.py
Python
apache-2.0
11,720
""" A modification of pyjamas DeferredMethod @author: Tobias Weber @contact: tobi-weber@gmx.de """ from pyjamas.Timer import Timer global deferredHandlers deferredHandlers = [] global timerIsActive timerIsActive = False def add(handler, arguments=[]): deferredHandlers.append([handler, arguments]) maybeS...
minghuascode/pyj
addons/DeferredHandler.py
Python
apache-2.0
927
import json import pkg_resources import pylons pylons.c = pylons.tmpl_context pylons.g = pylons.app_globals from pylons import c from ming.orm import ThreadLocalORMSession from datadiff.tools import assert_equal from allura.lib import helpers as h from allura.tests import decorators as td from allura import model as ...
pombredanne/SourceForge-Allura
ForgeHg/forgehg/tests/functional/test_controllers.py
Python
apache-2.0
9,128
# Copyright 2008-2014 Nokia Solutions and Networks # # 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 l...
userzimmermann/robotframework-python3
src/robot/output/listeners.py
Python
apache-2.0
10,498
# Copyright 2009 Shikhar Bhushan # Copyright 2014 Leonidas Poulopoulos # # 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...
OpenClovis/ncclient
ncclient/transport/session.py
Python
apache-2.0
9,854
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 ...
google-research/language
language/conpono/create_pretrain_data/books_preproc_pipeline.py
Python
apache-2.0
8,949
# Copyright 2020 Cloudbase Solutions Srl # # 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 l...
stackforge/cloudbase-init
cloudbaseinit/metadata/services/nocloudservice.py
Python
apache-2.0
11,949
# -*- 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-translate
samples/generated_samples/translate_generated_translate_v3_translation_service_create_glossary_async.py
Python
apache-2.0
1,703
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
fingeronthebutton/RIDE
src/robotide/lib/robot/running/arguments/argumentmapper.py
Python
apache-2.0
2,517
#!/usr/bin/env python # Copyright 2014-2019 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/geomopt/geometric_solver.py
Python
apache-2.0
9,525
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
polyaxon/polyaxon
platform/polycommon/polycommon/conf/handlers/settings_handler.py
Python
apache-2.0
1,970
import src.game_utils.function_proxy as check from src.basic_functions import * """ This file is the one you'll be working on read the documentation of the functions to know what it must be able to do. """ def move_snake(): """ This function controls how the snake moves Uses an edited v...
RagaiAhmed/PSP
src/tasks.py
Python
apache-2.0
1,617
#!/usr/bin/env python # pylint: disable=too-many-lines # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _| # | |) | (_) ...
joelsmith/openshift-tools
ansible/roles/lib_openshift_3.2/library/oadm_ca.py
Python
apache-2.0
35,621
# 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 # # ...
tuskar/tuskar-ui
horizon/tables/base.py
Python
apache-2.0
54,322
# -*- coding: utf-8 -*- # 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,...
line/line-bot-sdk-python
tests/api/test_get_delivery.py
Python
apache-2.0
3,393
# Copyright (c) 2015 Presslabs SRL # # 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...
PressLabs/silver
silver/tests/unit/test_invoice.py
Python
apache-2.0
8,323
# -*- coding: utf-8 -*- appid = 'example' apikey = 'c5dd7e7dkjp27377l903c42c032b413b' sender = '01000000000' # FIXME - MUST BE CHANGED AS REAL PHONE NUMBER receivers = ['01000000000', ] # FIXME - MUST BE CHANGED AS REAL PHONE NUMBERS content = u'나는 유리를 먹을 수 있어요. 그래도 아프지 않아요'
BlueHouseLab/sms-openapi
python-requests/conf.py
Python
apache-2.0
324
####################################################################### # Name: calc_peg.py # Purpose: Simple expression evaluator example using PEG language # Author: Igor R. Dejanovic <igor DOT dejanovic AT gmail DOT com> # Copyright: (c) 2009-2014 Igor R. Dejanovic <igor DOT dejanovic AT gmail DOT com> # License: MI...
codeyash/plugins
PyPlugins/PhpParser/py/PhpParser.py
Python
apache-2.0
2,782
import rospy import threading from .controller import BaseController from .proc_runner import ProcRunner class ProcController(BaseController): """ The purpose of ProcController is to start and stop ProcRunners with guarantees of thread safety and no waifs. """ def __init__(self, cmd, shell=False, ...
EndPointCorp/appctl
appctl/src/appctl_support/proc_controller.py
Python
apache-2.0
3,149
# 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
st2auth/st2auth/backends/__init__.py
Python
apache-2.0
1,972
import re from measures.periodicValues.PeriodicValues import PeriodicValues from measures.generic.GenericMeasure import GenericMeasure as GenericMeasure import measures.generic.Units as Units class Overhead(GenericMeasure): def __init__(self, period, simulationTime): GenericMeasure.__init__(self...
unaguil/hyperion-ns2
experiments/measures/generic/Overhead.py
Python
apache-2.0
1,273
# ---------------------------------------------------------------------------- # Copyright 2019-2022 Diligent Graphics 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.a...
DiligentGraphics/DiligentTools
RenderStateNotation/scripts/cxx_builder.py
Python
apache-2.0
4,755
import os import sys import click from alertaclient.api import Client from alertaclient.auth.utils import get_token from alertaclient.config import Config CONTEXT_SETTINGS = dict( auto_envvar_prefix='ALERTA', default_map={'query': {'compact': True}}, help_option_names=['-h', '--help'], ) cmd_folder = os....
alerta/python-alerta-client
alertaclient/cli.py
Python
apache-2.0
2,859
#!/usr/bin/env python """Tests for export converters.""" import os import socket # pylint: disable=unused-import,g-bad-import-order from grr.lib import server_plugins # pylint: enable=unused-import,g-bad-import-order from grr.lib import aff4 from grr.lib import export from grr.lib import flags from grr.lib import ...
spnow/grr
lib/export_test.py
Python
apache-2.0
27,095
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('app', '0025_auto_20150923_0843'), ] operations = [ migrations.CreateMo...
XcomConvent/xcom40k-shades
xcom40k/app/migrations/0026_auto_20120106_2212.py
Python
apache-2.0
1,819
import argparse import os class FullPaths(argparse.Action): """Expand user- and relative-paths""" def __call__(self, parser, namespace, values, option_string=None): setattr(namespace, self.dest, os.path.abspath(os.path.expanduser(values))) @classmethod def is_dir(x, dirname): """Checks if a path is an...
ricardog/raster-project
projections/diropt.py
Python
apache-2.0
504
# Copyright 2018 The TensorFlow Probability 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...
tensorflow/probability
tensorflow_probability/python/sts/components/autoregressive_test.py
Python
apache-2.0
6,809
#!/usr/bin/env python from setuptools import setup setup( name='YourAppName', version='1.0', description='OpenShift App', author='Your Name', author_email='example@example.com', url='http://www.python.org/sigs/distutils-sig/', install_requires=['Django<=1.4'], )
laloxxx20/TiendaVirtual
setup.py
Python
apache-2.0
293
# 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 agr...
markmc/oslo.messaging
oslo/messaging/_drivers/base.py
Python
apache-2.0
2,076
def bin_column(self, column_name, bins=None, include_lowest=True, strict_binning=False, bin_column_name=None): """ Summarize rows of data based on the value in a single column by sorting them into bins, or groups, based on a list of bin cutoff points or a specified number of equal-width bins. Para...
shibanis1/spark-tk
python/sparktk/frame/ops/bin_column.py
Python
apache-2.0
7,479
#!/usr/bin/env python # PyRadmon - Python Radiance Monitoring Tool # Copyright 2014 Albert Huang. # # 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...
alberthdev/pyradmon
pyradmon/args.py
Python
apache-2.0
68,354
__author__ = 'Per'
Per-Starke/Visualizer
src/__init__.py
Python
apache-2.0
19
import argparse import random import ray from ray import tune from ray.rllib.agents.trainer_template import build_trainer from ray.rllib.examples.models.eager_model import EagerModel from ray.rllib.models import ModelCatalog from ray.rllib.policy.sample_batch import SampleBatch from ray.rllib.policy.tf_policy_template...
robertnishihara/ray
rllib/examples/eager_execution.py
Python
apache-2.0
2,627
#!/usr/bin/env python import sys import os import glob ####################################################### candidate_xsldirs = ( # Fedora '/usr/share/sgml/docbook/xsl-stylesheets', # Cygwin '/usr/share/docbook-xsl', # Debian '/usr/share/xml/docbook/stylesheet/nwalsh', # SUSE '/usr/...
jmckaskill/subversion
doc/tools/bin/find-xsl.py
Python
apache-2.0
1,187
"A script that calculates allele frequencies from plink data" import argparse import pydigree as pyd parser = argparse.ArgumentParser() parser.add_argument('--ped', required=True, help='Plink formatted PED file') parser.add_argument('--map', required=True, help='Plink formatted MAP file') parser.add_argument('--snps...
jameshicks/pydigree
scripts/frequencies.py
Python
apache-2.0
1,422
#! /usr/bin/python # -*- coding: UTF-8 -*- # Copyright 2012 TestLink-API-Python-client developers # # 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/license...
mytliulei/DCNRobot
src/tools/testlink/__init__.py
Python
apache-2.0
877
# Copyright 2013. Amazon Web Services, 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 a...
baida21/py-flask-signup
tests/application-tests.py
Python
apache-2.0
1,642
# 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...
HonzaKral/warehouse
warehouse/legacy/tables.py
Python
apache-2.0
12,359
'''This example demonstrates the use of Convolution1D for text classification. Gets to 0.89 test accuracy after 2 epochs. 90s/epoch on Intel i5 2.4Ghz CPU. 10s/epoch on Tesla K40 GPU. ''' from __future__ import print_function from tensorflow.contrib.keras.python.keras.preprocessing import sequence from tensorflow.c...
trhongbinwang/data_science_journey
deep_learning/keras/examples/imdb_cnn.py
Python
apache-2.0
2,519
# Copyright 2014 Netflix, 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...
bunjiboys/security_monkey
security_monkey/common/sts_connect.py
Python
apache-2.0
3,363
from PIL import Image from PIL import ImageDraw from PIL import ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True def make_regalur_image(img, size=(256, 256)): return img.resize(size).convert('RGB') # 几何转变,全部转化为256*256像素大小 def split_image(img, part_size=(64, 64)): w, h = img.size pw, ph = part_size ...
pythonlittleboy/python_gentleman_crawler
util/ImageSimilar.py
Python
apache-2.0
3,416
# Copyright 2011 OpenStack 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 b...
vponomaryov/manila
manila/tests/api/v1/test_limits.py
Python
apache-2.0
29,404
# Defining the goal state goal_items = [1, 2, 3, 8, 0, 4, 7, 6, 5] visited_vertices = [] # Defining imput states with increasing levels of difficulty easy_initial_state = [1, 3, 4, 8, 6, 2, 7, 0, 5] medium_initial_state = [2, 8, 1, 0, 4, 3, 7, 6, 5] hard_initial_state = [5, 6, 7, 4, 0, 8, 3, 2, 1] max = 0 import sys ...
sidv1993/Graph-Traversal-and-Game-Playing
Graph-Traversal/GraphTraversal.py
Python
apache-2.0
13,929
# -*- 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-aiplatform
samples/generated_samples/aiplatform_generated_aiplatform_v1beta1_featurestore_service_batch_read_feature_values_async.py
Python
apache-2.0
2,302
"""This component provides basic support for Foscam IP cameras.""" import logging import voluptuous as vol from homeassistant.components.camera import Camera, PLATFORM_SCHEMA, SUPPORT_STREAM from homeassistant.const import CONF_NAME, CONF_USERNAME, CONF_PASSWORD, CONF_PORT from homeassistant.helpers import config_val...
fbradyirl/home-assistant
homeassistant/components/foscam/camera.py
Python
apache-2.0
3,754
# 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...
hehongliang/tensorflow
tensorflow/python/keras/engine/training.py
Python
apache-2.0
109,170
# -*- coding: utf-8 -*- from __future__ import absolute_import import pytest import requests import xml.etree.ElementTree as ET from foist import (create_container, parse_text_encoding_errors, Thesis, transaction, upload_file, update_metadata) from foist.namespaces import BIBO, DCTYPE, PCDM def ...
mitlib-tdm/foist
tests/test_app.py
Python
apache-2.0
9,664
# This file is part of MLDB. Copyright 2015 mldb.ai inc. All rights reserved. pythonScript = { "type": "python", "params": { "address": "", "source": """ mldb.log("Constructing plugin!") def requestHandler(mldb, remaining, verb, resource, restParams, payload, contentType, contentLength, he...
mldbai/mldb
testing/plugin_delete_test.py
Python
apache-2.0
856
# Copyright 2021 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...
PAIR-code/saliency
saliency/core/grad_cam_test.py
Python
apache-2.0
7,486
# Copyright 2021 The Magenta 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 ...
magenta/symbolic-music-diffusion
utils/train_utils.py
Python
apache-2.0
3,999
import <error descr="No module named un1">un1</error> import os.<error descr="No module named un2">un2</error> from os import <error descr="Cannot find reference 'un3' in 'os.py'">un3</error> from <error descr="Unresolved reference 'un4'">un4</error>.un5 import <error descr="Unresolved reference 'un6'">un6</error> from...
leafclick/intellij-community
python/testData/inspections/PyUnresolvedReferencesInspection/ImportHighlightLevel/a.py
Python
apache-2.0
554
#!/usr/bin/env python #transforms jekyll dir structure to directory servable structure import os import sys import shutil for root, subdirs, files in os.walk('.'): if len(subdirs) == 0 and len(files) == 1 and files[0] == 'index.html': with open(root + '/' + files[0]) as f: data = f.read() ...
StephanDollberg/stephandollberg.github.io
transform.py
Python
apache-2.0
441
class Options(object): def __init__(self, m, d={}, **defaults): self.values = {} self.values.update(defaults) self.values.update(d) self.values.update(m) def __getattr__(self, name): return self.values[name] __getitem__ = __getattr__ def __iter__(s...
korovkin/WNNotifier
notifier/parcon/options.py
Python
apache-2.0
381
# -*- 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-securitycenter
samples/generated_samples/securitycenter_v1_generated_security_center_update_mute_config_async.py
Python
apache-2.0
1,620
import logging import sys import tkinter as tk from src.app import Labeler LOGGER = logging.getLogger(__name__) # parser = argparse.ArgumentParser(description='Some arguement for path connector') # parser.add_argument('-m', '--max', type=int, default=300, help='maximum frame for displaying path') # parser.add_argume...
kai06046/labeler
main.py
Python
apache-2.0
1,067
"""Adds support for generic thermostat units.""" import asyncio import logging import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateEntity from homeassistant.components.climate.const import ( ATTR_PRESET_MODE, CURRENT_HVAC_COOL, CURRENT_HVAC_HEAT, CURRENT_HVAC_...
titilambert/home-assistant
homeassistant/components/generic_thermostat/climate.py
Python
apache-2.0
16,726
from django.conf import settings from django.contrib.auth.mixins import AccessMixin from rest_framework import permissions def is_in_retina_graders_group(user): """ Checks if the user is in the retina graders group :param user: Django User model :return: true/false """ return user.groups.filte...
comic/comic-django
app/grandchallenge/retina_api/mixins.py
Python
apache-2.0
1,522
#!/usr/bin/env python #coding = utf-8 import threading lk = threading.Lock() g_counter = 0 def count(n): global g_counter for i in xrange(n): lk.acquire() g_counter += 1 lk.release() print g_counter return g_counter t1 = threading.Thread(target=count,args=(10000000,)) t2 = threa...
justin-l/alltest
thread.py
Python
apache-2.0
440
#!/usr/bin/env python3 # Copyright 2021 gRPC 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...
jtattermusch/grpc
tools/codegen/core/gen_upb_api_from_bazel_xml.py
Python
apache-2.0
6,638
#!/usr/bin/python # Copyright 2011 WebDriver committers # # 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 l...
compstak/selenium
py/test/selenium/webdriver/common/webdriverwait_tests.py
Python
apache-2.0
16,435
# 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 required by applica...
tensorflow/examples
lite/examples/pose_estimation/raspberry_pi/utils.py
Python
apache-2.0
5,614
""" Tests server start and stop functionality. """ import sys import os.path import getpass import logging import time import optparse import tempfile import shutil try: import engage except: sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))) import engage import engage_ut...
quaddra/engage
python_pkg/engage/tests/test_run_server.py
Python
apache-2.0
5,669
from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from mainmodels.models import Course, FeaturedCourse # Create your views here. def index(req): mostPopularCourses = Course.objects.raw('SELECT * FROM mainmodels_course as main_course JOIN (SELECT main_tran.courseID, COU...
PNNutkung/Coursing-Field
index/views.py
Python
apache-2.0
876
# Copyright (C) 2020 University of Konstanz - Data Analysis and Visualization Group # This file is part of SciBib <https://github.com/dbvis-ukon/SciBib>. # # SciBib 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 Fo...
UKN-DBVIS/SciBib
app/backend/db_controller/helper.py
Python
apache-2.0
2,777