code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
# (c) Copyright 2016 Hewlett Packard Enterprise Development Company LP # # 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...
openstack/horizon
openstack_dashboard/contrib/developer/enabled/_9040_form_builder.py
Python
apache-2.0
783
# -*- coding: utf-8 -*- # Copyright (C) 2016 Bastian Kleineidam # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Th...
wummel/patool
patoolib/programs/p7rzip.py
Python
gpl-3.0
887
MICROSERVICES = { # Map locations to their microservices "LOCATION_MICROSERVICES": [ { "module": "intelligence.last_seen.location_lastseen_microservice", "class": "LocationLastSeenMicroservice" } ] }
peoplepower/botlab
com.ppc.Microservices/intelligence/last_seen/index.py
Python
apache-2.0
250
#! /usr/bin/env python """Generate C code from an ASDL description.""" # TO DO # handle fields that have a type but no name import os, sys import asdl TABSIZE = 8 MAX_COL = 80 def get_c_type(name): """Return a string for the C name of the type. This function special cases the default types provided by asd...
Immortalin/python-for-android
python3-alpha/python3-src/Parser/asdl_c.py
Python
apache-2.0
40,884
import _plotly_utils.basevalidators class ColumnValidator(_plotly_utils.basevalidators.IntegerValidator): def __init__(self, plotly_name="column", parent_name="table.domain", **kwargs): super(ColumnValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotly/plotly.py
packages/python/plotly/plotly/validators/table/domain/_column.py
Python
mit
437
print('-----------------') C = -20 dC = 5 while C <= 40: F = (9/5)*C + 32 print(C, F) C += dC print('-----------------')
dariosena/LearningPython
general/scientific/looplist/c2f_while.py
Python
gpl-3.0
143
"""Blocking and non-blocking HTTP client interfaces. This module defines a common interface shared by two implementations, ``simple_httpclient`` and ``curl_httpclient``. Applications may either instantiate their chosen implementation class directly or use the `AsyncHTTPClient` class from this module, which selects an...
mr-ping/tornado
tornado/httpclient.py
Python
apache-2.0
27,522
# http://julienbayle.net from __future__ import with_statement import Live import math """ _Framework files """ from _Framework.ButtonElement import ButtonElement # Class representing a button a the controller from _Framework.ButtonMatrixElement import ButtonMatrixElement # Class representing a 2-dimensional set of b...
LividInstruments/LiveRemoteScripts
Livid_Code_M4L/LividCodeM4L.py
Python
mit
4,792
""" WSGI config for opsmanager 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.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_S...
damondengxin/opsmanager
opsmanager/wsgi.py
Python
lgpl-3.0
398
import os import plotly import yaml DATA_DIR = os.path.join(os.path.expanduser('~'), ".groupmestats") if not os.path.exists(DATA_DIR): os.mkdir(DATA_DIR) GROUPME_TOKEN_FILE = os.path.join(os.path.expanduser('~'), ".groupme_key") def get_groupme_token(): with open(GROUPME_TOKEN_FILE, "r") as f: ret...
kjteske/groupmestats
groupmestats/_config.py
Python
mit
345
import numpy as np from gym.spaces import Box from metaworld.envs.asset_path_utils import full_v1_path_for from metaworld.envs.mujoco.sawyer_xyz.sawyer_xyz_env import SawyerXYZEnv, _assert_task_is_set class SawyerDialTurnEnv(SawyerXYZEnv): def __init__(self): hand_low = (-0.5, 0.40, 0.05) hand_...
rlworkgroup/metaworld
metaworld/envs/mujoco/sawyer_xyz/v1/sawyer_dial_turn.py
Python
mit
3,539
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import pytest from selenium.common.exceptions import TimeoutException from pages.home import HomePage from pages.about ...
jgmize/bedrock
tests/functional/newsletter/test_newsletter_embed.py
Python
mpl-2.0
4,018
config = { # Interval between speedtests 'INTERVAL': 5, # Interval Units can be: seconds, minutes, hours, days, ... 'INTERVAL_UNIT': 'minutes', # Output file 'SAVE_FILE': 'results.csv', }
franksh/scheduled-speedtest
config.py
Python
mit
212
"""Setup script for modoboa-admin.""" import re import os from setuptools import setup, find_packages from modoboa_postfix_autoreply import __version__ ROOT = os.path.dirname(__file__) PIP_REQUIRES = os.path.join(ROOT, "requirements.txt") def parse_requirements(*filenames): """ We generate our install_re...
bearstech/modoboa-postfix-autoreply
setup.py
Python
mit
2,735
#!/usr/bin/env python __author__ = "Zack Cerza <zcerza@redhat.com>" from distutils.core import setup from distutils.command.bdist_rpm import bdist_rpm def examples(): import os exList = os.listdir(os.curdir + '/examples/') result = [] for ex in exList: if ex.split('.')[-1] == 'py': ...
vrutkovs/dogtail
setup.py
Python
gpl-2.0
3,001
""" Demonstrates using the BMP180 temperature and humidity sensor connected on the LabJack I2C bus. This requires the associated example Lua script under Examples > I2C > Temperature & Pressure BMP180 (temp-and-pressure-BMP180.lua), which can be loaded from Kipling and can be configured to run at device start up. ***...
chrisJohn404/ljswitchboard-module_manager
lib/switchboard_modules/lua_script_debugger/premade_scripts_addresses/i2c/associated-files/bmp180_temp_and_humidity_using_lua.py
Python
mit
3,383
""" Filename: plot_zonal_ensemble.py Author: Damien Irving, irving.damien@gmail.com Description: Plot zonal ensemble """ # Import general Python modules import sys, os, pdb import argparse from itertools import groupby from more_itertools import unique_everseen import numpy import iris from iris.experi...
DamienIrving/ocean-analysis
visualisation/plot_zonal_ensemble.py
Python
mit
16,584
# Copyright 2014 Red Hat, Inc # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
vmturbo/nova
nova/virt/hardware.py
Python
apache-2.0
71,201
#!/usr/bin/env python # -*- coding: utf8 -*- import RPi.GPIO as GPIO import spi import signal import time class MFRC522: NRSTPD = 22 MAX_LEN = 16 PCD_IDLE = 0x00 PCD_AUTHENT = 0x0E PCD_RECEIVE = 0x08 PCD_TRANSMIT = 0x04 PCD_TRANSCEIVE = 0x0C PCD_RESETPHASE = 0x0F PCD_CALCCRC = 0...
kmachnicki/work-time-guardian
embedded/MFRC522.py
Python
mit
10,125
from ui import Summarizer # legacy reasons, sum bots running using old interface from core import (summarize_url, ArticleExtractionFail)
SalmaanP/samacharbot2
smrzr/__init__.py
Python
gpl-3.0
156
"""Randomized eigenvalue calculation""" from scipy.sparse.linalg import LinearOperator, aslinearoperator from scipy.sparse import identity from scipy.linalg import qr, eig, eigh import numpy as np from time import time __all__ = ['randomhep', 'nystrom', 'randsvd', 'randomghep'] def randomhep(A, k, p = 20, twopas...
arvindks/kle
eigen/randomized.py
Python
gpl-3.0
7,613
# Generated by Django 2.0.13 on 2021-07-26 18:56 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("sponsors", "0032_sponsorcontact_accounting"), ] operations = [ migrations.CreateModel( name="T...
manhhomienbienthuy/pythondotorg
sponsors/migrations/0033_tieredquantity_tieredquantityconfiguration.py
Python
apache-2.0
2,670
#!/usr/bin/env python import reader import numpy import sys from filters import removeDc as removeDc from utils import writeListAsRaw, toFloat import pdb import matplotlib.pyplot as plt if len( sys.argv ) != 2: print "Usage: %s dat-file" % sys.argv[0] sys.exit( 0 ) # --------------------------------- # main # ...
ap1/PixeeBel
code/pysrc/sb_test.py
Python
mit
1,401
# IfcOpenShell - IFC toolkit and geometry engine # Copyright (C) 2021 Dion Moult <dion@thinkmoult.com> # # This file is part of IfcOpenShell. # # IfcOpenShell is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundat...
IfcOpenShell/IfcOpenShell
src/ifcopenshell-python/ifcopenshell/api/owner/add_person_and_organisation.py
Python
lgpl-3.0
1,165
# 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...
zouyapeng/horizon-newtouch
openstack_dashboard/dashboards/project/data_processing/data_plugins/views.py
Python
apache-2.0
1,599
""" Copyright (c) 2014 Idiap Research Institute, http://www.idiap.ch/ Written by Kenneth Funes <kenneth.funes@idiap.ch> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the ...
idiap/rgbd
Rendering/RGBDViewer.py
Python
lgpl-3.0
3,867
import sys from lib.clarifai_basic import ClarifaiCustomModel clarifai = ClarifaiCustomModel() print clarifai.predict_all(sys.argv[1])
ovaskevich/HackMIT-2015
training/predict.py
Python
mit
136
#Echo server -chapter 3- echoserver.py import socket, traceback host = '' #bind to all interface port = 51423 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind((host, port)) s.listen(1) while True: try: clientsock, clientaddr = s.accept() except ...
jiangfire/python-network-py3code
chapter3/echosever.py
Python
gpl-2.0
799
import unittest from sos.utilities import ImporterHelper class ImporterHelperTests(unittest.TestCase): def test_runs(self): h = ImporterHelper(unittest) modules = h.get_modules() self.assertTrue('main' in modules) if __name__ == "__main__": unittest.main()
beagles/sosreport-neutron
tests/importer_tests.py
Python
gpl-2.0
293
import theano import theano.tensor as T class GlobalPoolLayer(object): def __init__(self, input): avg_out = input.mean(3) max_out = input.max(3) l2_out = T.sqrt((input ** 2).mean(3)) self.output = T.concatenate([avg_out, max_out, l2_out], axis=2)
IraKorshunova/kaggle-seizure-detection
seizure/cnn/global_pool_layer.py
Python
mit
286
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
KodiColdkeys/coldkeys-addons
repository/plugin.video.white.devil/resources/lib/sources/dailyrls_wp_jh.py
Python
gpl-2.0
6,200
""" __init__.py ist303-miye Copyright (C) 2017 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distribute...
morpheby/ist303-miye
client/__init__.py
Python
gpl-3.0
755
"""Hadroid setup.""" from codecs import open from os import path from setuptools import find_packages, setup here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() with open(path.join(here, 'hadroid', '__init__.py'), encoding='ut...
hadroid/hadroid
setup.py
Python
gpl-3.0
1,882
''' Implementing some of: https://www.ietf.org/rfc/rfc1350.txt Not implementing: writing (putting) files modes other then netascii returning appropriate errors to the client ''' import os import struct from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor BLOCK_SIZE...
franbull/tftp
tftp.py
Python
mit
7,997
# Powered by Python 2.7 # remove nodes with no stable partnerships # run from the stable from tulip import tlp # The updateVisualization(centerViews = True) function can be called # during script execution to update the opened views # The pauseScript() function can be called to pause the script execution. # To resu...
spaghetti-open-data/ODFest2017-horizon2020-network
H2020_Code_2017/remove_no_stable.py
Python
mit
4,992
from django.db import models from django.utils.translation import gettext_lazy as _ from .managers import SiteMessageManager class TargetSite(models.Model): """ Target site where to display site messages. """ TARGET_SITE_PUBLIC, TARGET_SITE_LIBRARY, TARGET_SITE_JOURNAL = 'P', 'L', 'J' TARGET_SITE...
erudit/zenon
eruditorg/apps/public/site_messages/models.py
Python
gpl-3.0
3,681
#!/usr/bin/python # (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ Element Software Account Manager """ from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
alexlo03/ansible
lib/ansible/modules/storage/netapp/na_elementsw_account.py
Python
gpl-3.0
9,838
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from django.http import Http404 from treemap.models import Tree from treemap.images import get_image_from_request from treemap.lib.map_feature import get_map_feature_or_404 def add_...
maurizi/otm-core
opentreemap/treemap/lib/tree.py
Python
agpl-3.0
1,754
#! /usr/bin/env python # # Copyright (C) 2008 Lorenzo Pallara, l.pallara@avalpa.com # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any...
philotas/opencaster
tutorials/psi-generation/firstsdt.py
Python
gpl-2.0
2,269
from fabric.api import settings, hide, puts, run from fabphile.common import check def _invoke_aptget(apt_command, args=[]): "Invoke the aptget command" ALLOWED_APT_COMMAND = ['install', 'remove', 'update'] command_arguments = "" check(apt_command in ALLOWED_APT_COMMAND, "%s command is not a...
daniellawrence/fabphile
src/fabphile/apt.py
Python
gpl-2.0
2,712
# Copyright (c) 2021 PaddlePaddle 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 app...
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/npu/test_pad3d_op_npu.py
Python
apache-2.0
17,706
from ..itemManager import getItem class Vote: def __init__(self, itemId, type): assert(type == u'more' or type == u'less') self.type = type self.item = getItem(itemId)
TobyRoseman/PS4M
engine/data/vote.py
Python
mit
197
from django.db import models import uuid description_length = 80 signature_length = 400 key_length = 400 # 2048 bit key in base 64? I don't know what I'm doing :) # TODO: Use correct key length and signature_length # Create your models here. class Group(models.Model): uuid = models.UUIDField(primary_key=True, ...
ric2b/confidential-debt-simplification
main_server/main_server_app/models.py
Python
gpl-3.0
2,798
# Copyright 2017 Balazs Nemeth, Mark Szalay, Janos Doka # # 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...
hsnlab/mapping
hybrid/WhatToOptimizeStrategy.py
Python
apache-2.0
5,683
# Copyright 2008 (C) Nicira, Inc. # # This file is part of NOX. # # NOX is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # NOX is dist...
zainabg/NOX
src/nox/coreapps/pyrt/pyoxidereactor.py
Python
gpl-3.0
12,596
""" fs.expose.importhook ==================== Expose an FS object to the python import machinery, via a PEP-302 loader. This module allows you to import python modules from an arbitrary FS object, by placing FS urls on sys.path and/or inserting objects into sys.meta_path. The main class in this module is FSImportHoo...
atty303/pyfilesystem
fs/expose/importhook.py
Python
bsd-3-clause
8,060
# Copyright 2013 - Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
devdattakulkarni/test-solum
solum/common/exception.py
Python
apache-2.0
11,437
#!/usr/bin/python # -*- coding: utf-8 -*- ### This script should be run after : ### export LD_LIBRARY_PATH="/usr/local/Lima/Lima/lib" import os,sys,time from Lima import Core from Lima import Andor3 print("* The general setup :") print("\n** The environement of the pocess is now : ") print(os.environ) print("\n** ...
JiangXL/ColorMapping
unit-test.py
Python
gpl-3.0
9,130
############################################################################# ## ## Copyright : (C) 2015 Dimitri Sabadie ## License : BSD3 ## ## Maintainer : Dimitri Sabadie <dimitri.sabadie@gmail.com> ## ############################################################################ bl_info = { "name" : "...
phaazon/quaazar
sdk/scripts/blender/export_qmsh.py
Python
bsd-3-clause
4,487
from PIL import Image #pip install Pillow import glob # Create the frames frames = [] imgs = glob.glob("C:/Users/thier/workspace/spectroDb/spectrum/display/plot/*.png") for i in imgs: new_frame = Image.open(i) frames.append(new_frame) # Save into a GIF file that loops forever frames[0].save('png_to_gif.gi...
tlemoult/spectroDb
spectrum/display/makeGif.py
Python
mit
447
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "L...
dhalperi/incubator-beam
sdks/python/apache_beam/examples/complete/estimate_pi.py
Python
apache-2.0
4,482
# research/__init__.py default_app_config = 'research.apps.ResearchConfig'
neuromat/nira
research/__init__.py
Python
mpl-2.0
75
""" Wrapper for [John Burkardt's 1D FEM steady state heat equation code](https://people.sc.fsu.edu/~jburkardt/f_src/fem1d_heat_steady/fem1d_heat_steady.html) Serves as a demo of using python ctypes with fortran. Note that conductivity k and forcing function f specified in python must treat arguments as pointers/arra...
mjasher/computation
fem1d_heat_steady/fem1d_heat_steady_wrapper.py
Python
mit
2,299
# 거창하게 GUN이라고 했지만 사실 해상도를 거의 두배씩 올렸다. # 2017. 07. 06 import tensorflow as tf from PIL import Image import numpy as np #이미지, 상수들 learning_rate=1e-4 W1=192 H1=144 W15=480 H15=360 W2=960 H2=720 path="../06/" pref1="144p/" pref2="720p/" suff1="_144.jpg" suff2="_720.jpg" train_num=500#1000 file_num=2#...
yhunroh/SSHS-Waifu
Temp/train9.py
Python
mit
3,652
import os from lizard_ui.settingshelper import setup_logging from lizard_ui.settingshelper import STATICFILES_FINDERS DEBUG = True TEMPLATE_DEBUG = True # SETTINGS_DIR allows media paths and so to be relative to this settings file # instead of hardcoded to c:\only\on\my\computer. SETTINGS_DIR = os.path.dirname(os.pa...
lizardsystem/lizard-workspace
lizard_workspace/testsettings.py
Python
gpl-3.0
3,021
import email from email.message import Message from odoo import models, api, _ import logging _logger = logging.getLogger(__name__) class MailThread(models.AbstractModel): _inherit = 'mail.thread' def get_prefix(self, model): try: prefix = self.env['ir.sequence'].search([('code', '=', mo...
thinkwelltwd/care_center
care_center/models/mail_thread.py
Python
lgpl-3.0
2,582
from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic import TemplateView from django.contrib.auth import views from accounts.views import SendConfirmationEmailView from allauth.account.views import ConfirmEmailView admin.autodiscover() ##########################...
JTarball/tetherbox
docker/app/app/backend/project/urls.py
Python
isc
4,207
"""Provides device automations for NEW_NAME.""" from typing import List import voluptuous as vol from homeassistant.const import ( CONF_DOMAIN, CONF_TYPE, CONF_PLATFORM, CONF_DEVICE_ID, CONF_ENTITY_ID, STATE_ON, STATE_OFF, ) from homeassistant.core import HomeAssistant, CALLBACK_TYPE from h...
joopert/home-assistant
script/scaffold/templates/device_trigger/integration/device_trigger.py
Python
apache-2.0
3,249
espaco = open ("espaco.txt", "w") for i in range (1): espaco.write('''ACME Inc. Uso do espaço em disco pelos usuários ------------------------------------------------------------------------ Nr. Usuário Espaço utilizado % do uso 1 alexandre 434,99 MB 16,85% 2 anderson 1187,99 MB 46,02% 3 antonio 117,73 MB 4,56% 4 c...
rafa-impacta/Exercicio
exec-5.py
Python
apache-2.0
569
# # Copyright 2008,2009 Free Software Foundation, Inc. # # This application is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # This application is ...
GREO/gnuradio-git
gr-howto-write-a-block/python/__init__.py
Python
gpl-3.0
1,691
# 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/bijectors/ascending_test.py
Python
apache-2.0
3,843
#!/usr/bin/env python # # Read in MTE extractions (.jsonl) and align with expert-vetting (.csv) # to filter; write out only those marked 'Y' by expert to new .jsonl. # # Author: Kiri Wagstaff # June 10, 2018 # Copyright notice at bottom of file. import sys, os from ioutils import read_jsonlines, dump_jsonlines import...
USCDataScience/parser-indexer-py
src/parserindexer/filter_extractions.py
Python
apache-2.0
5,825
# Copyright 2016 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...
npuichigo/ttsflow
third_party/tensorflow/tensorflow/contrib/tensor_forest/hybrid/python/kernel_tests/k_feature_routing_function_op_test.py
Python
apache-2.0
3,383
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2018 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
alexlo03/ansible
lib/ansible/modules/network/edgeswitch/edgeswitch_facts.py
Python
gpl-3.0
7,417
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012: # Guillaume Subiron, maethor@subiron.org # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Found...
shinken-monitoring/mod-webui
module/plugins/stats/__init__.py
Python
agpl-3.0
791
# -*- coding: utf-8 -*- # © 2015 Antiun Ingeniería S.L. - Antonio Espinosa # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': "Manage model export profiles", 'category': 'Personalization', 'version': '8.0.2.1.0', 'depends': [ 'web', ], 'data': [ 'view...
ddico/server-tools
base_export_manager/__openerp__.py
Python
agpl-3.0
689
import re import csv from openstates.scrape import Person, Scraper from utils import LXMLMixin import requests class NHPersonScraper(Scraper, LXMLMixin): members_url = "http://www.gencourt.state.nh.us/downloads/Members.csv" lookup_url = "http://www.gencourt.state.nh.us/house/members/memberlookup.aspx" hou...
sunlightlabs/openstates
scrapers/nh/people.py
Python
gpl-3.0
5,642
# Copyright 2018,2019,2020,2021 Sony 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 # # Unless required by applicable law or a...
sony/nnabla
python/test/utils/learning_rate_scheduler/learning_rate_scheduler_test_utils.py
Python
apache-2.0
1,039
from django.http import HttpResponse,HttpResponseRedirect from django.shortcuts import render,render_to_response,get_object_or_404 from django.template import RequestContext,loader,Context from django.views.generic import ListView from django.core.context_processors import csrf from django.contrib.auth import authentic...
omiltoro/softbrew
OMRS/views.py
Python
apache-2.0
9,545
# # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # """Test SOAP support.""" try: import SOAPpy except ImportError: SOAPpy = None class SOAPPublisher: pass else: from twisted.web import soap SOAPPublisher = soap.SOAPPublisher from twisted.trial import unittest ...
mclois/iteexe
twisted/web/test/test_soap.py
Python
gpl-2.0
2,810
import os import sys import site SAL_ENV_DIR = '/home/docker/sal' # Use site to load the site-packages directory of our virtualenv # site.addsitedir(os.path.join(SAL_ENV_DIR, 'lib/python2.7/site-packages')) # Make sure we have the virtualenv and the Django app itself added to our path sys.path.append(SAL_ENV_DIR) sy...
salopensource/sal
docker/wsgi.py
Python
apache-2.0
691
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
111pontes/ydk-py
cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_lib_mpp_cfg.py
Python
apache-2.0
672,258
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ """ FILE: sample_analyze_conversation_app.py DESCRIPTION: This sample demonstrates how to analyze user query for intents and entities using a conver...
Azure/azure-sdk-for-python
sdk/cognitivelanguage/azure-ai-language-conversations/samples/sample_analyze_conversation_app.py
Python
mit
2,453
## Script (Python) "guard_sampled_transition" ##bind container=container ##bind context=context ##bind namespace= ##bind script=script ##bind subpath=traverse_subpath ##parameters=type_name=None ##title= ## from dependencies.dependency import DateTime workflow = context.portal_workflow # False if object ...
sciCloud/OLiMS
lims/skins/bika/guard_sample_transition.py
Python
agpl-3.0
448
# 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/api/serializers/transaction_serializers.py
Python
apache-2.0
5,877
# -*- coding: utf-8 -*- ''' This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in...
pugo/filmarkivet-xbmc
lib/webget.py
Python
gpl-3.0
1,372
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
111pontes/ydk-py
cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_shellutil_cfg.py
Python
apache-2.0
1,133
import requests import json import datetime import time from flask import Flask, request #set some global variables #resource name from AAD resourcename = 'https://XXXXXXXXXXX.crm.dynamics.com' #client name from AAD clientid = 'XXXXXXXXXXX' #token endpoint from AAD tokenendpoint = 'https://login.microsoftonline.com...
lucasalexander/Crm-Sample-Code
OauthTokenMicroservice/app.py
Python
apache-2.0
6,216
# -*- encoding: utf-8 -*- from __future__ import unicode_literals, absolute_import from letsencrypt import ( errors, ) from letsencrypt.cli import ( choose_configurator_plugins, _auth_from_domains, _find_domains, _suggest_donate, ) from letsencrypt.display import ops as display_ops from .helpers im...
cbrand/letsencrypt_gencsr
src/letsencrypt_gencsr/cmd/run.py
Python
mit
1,505
# Copyright 2015 Mirantis, 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...
VTabolin/vmware-dvs
vmware_dvs/agent/dvs_neutron_agent.py
Python
apache-2.0
17,391
# Copyright 2013 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
vasiliykochergin/euca2ools
euca2ools/commands/monitoring/describealarmsformetric.py
Python
bsd-2-clause
3,693
#!/usr/bin/env python # encoding: utf-8 """ read_config.py The main point with this package is how to retreive the corect entry from a vcf file. In the best case one should be able to specify any kind of entry in the config file and how it is extracted. ConfigParser will read these files and check if they are on the ...
moonso/extract_vcf
extract_vcf/config_parser.py
Python
mit
10,637
"""Support for Konnected devices.""" import copy import hmac import json import logging from aiohttp.hdrs import AUTHORIZATION from aiohttp.web import Request, Response import voluptuous as vol from homeassistant import config_entries from homeassistant.components.binary_sensor import DEVICE_CLASSES_SCHEMA from homea...
Danielhiversen/home-assistant
homeassistant/components/konnected/__init__.py
Python
apache-2.0
14,300
#!/usr/bin/python #encoding=utf-8 # Variante 1 - manuell quadrat_zahlen = [1, 4, 9, 16, 26, 36, 49, 64, 81, 100] quadrat_zahlen[4] = 25 quadrat_zahlen.append(121) print quadrat_zahlen # Variante 2 - automatisch quadrat_zahlen = [1, 4, 9, 16, 26, 36, 49, 64, 81, 100] for i, qz in enumerate(quadrat_zahlen, 1): if...
gkabbe/Python-Kurs2015
Lösungen/Woche2/quadratzahlen_korrigieren.py
Python
gpl-2.0
679
""" A Printer for generating readable representation of most sympy classes. """ from __future__ import print_function, division from sympy.core import S, Rational, Pow, Basic, Mul from sympy.core.mul import _keep_coeff from sympy.core.compatibility import string_types from .printer import Printer from sympy.printing....
kaushik94/sympy
sympy/printing/str.py
Python
bsd-3-clause
28,378
from django.conf.urls.defaults import patterns from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.core.urlresolvers import reverse from django.shortcuts import redirect from django.views.generic import View from devilry.apps.core import pluginloader from devilry.defaults.urls import devilr...
vegarang/devilry-django
devilry/defaults/root_urlconf.py
Python
bsd-3-clause
738
#!/usr/bin/env python3 import argparse import glob import os import sys def parse_args(): parser = argparse.ArgumentParser(description="Get battery level") parser.add_argument('-d', '--device', type=str, help="Device string like \"0003:1532:0045.000C\"") args = parser.parse_args() return args def run...
z3ntu/razer-drivers
scripts/razer_mouse/driver/get_battery.py
Python
gpl-2.0
1,598
# 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
HybridF5/tempest_debug
tempest/clients.py
Python
apache-2.0
30,957
# Copyright (c) 2016-present, Facebook, 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...
Yangqing/caffe2
caffe2/python/visualize.py
Python
apache-2.0
6,987
# Copyright 2020 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 agreed to in writing, ...
GoogleCloudPlatform/transactional-microservice-examples
services/customer-async/main.py
Python
apache-2.0
5,982
#python import k3d import testing document = k3d.new_document() grid = k3d.plugin.create("PolyGrid", document) scale = k3d.plugin.create("ScalePoints", document) select = k3d.plugin.create("SelectDegenerateFaces", document) selection = k3d.geometry.selection.create(0) point_selection = k3d.geometry.point_selection....
barche/k3d
tests/mesh/mesh.selection.SelectDegenerateFaces.py
Python
gpl-2.0
910
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software with...
nucular/AutobahnPython
examples/twisted/wamp/app/klein/example1/server_web.py
Python
mit
2,014
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2014 Glencoe Software, Inc. All Rights Reserved. # Use is subject to license terms supplied in LICENSE.txt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # th...
snoopycrimecop/openmicroscopy
components/tools/OmeroPy/test/integration/fstest/test_rename.py
Python
gpl-2.0
5,235
import os import os.path as osp import unittest from hpcbench.cli import bennett from hpcbench.net import CampaignHolder from hpcbench.toolbox.contextlib_ext import mkdtemp, pushd def custom_ssh(self, *args): # get rid of node return list(args[1:]) def custom_scp(self, *args): src, dest = args if '...
tristan0x/hpcbench
tests/test_net.py
Python
mit
980
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import datetime class Migration(migrations.Migration): dependencies = [ ('paginaPrincipal', '0006_auto_20151029_1414'), ] operations = [ migrations.AlterField( model_name...
AliGhahraei/RateMe
paginaPrincipal/migrations/0007_auto_20151029_1414.py
Python
gpl-3.0
476
import os import subprocess import socket name = "gobuildslave" current_hash = "" for line in os.popen("md5sum " + name).readlines(): current_hash = line.split(' ')[0] # Move the old version over for line in os.popen('cp ' + name + ' old' + name).readlines(): print line.strip() # Rebuild for line in os....
brotherlogic/gobuildslave
BuildAndRun.py
Python
apache-2.0
1,837
import urllib import urllib2 year = range(2008,2014) year2014 = [2013] month = range(1,13) url = "http://www.iea.org/stats/surveys/Electricity/MES" y = range(2007,2014) m = range(1,13) link = [] time = [] for i in y: for j in m: if j<10: link.append(url+str(i)+'0'+str(j)+'.xls') ...
bigbigdata/IEA-electricity-statistics
IEA_download.py
Python
mit
781
from django import forms from django.core.exceptions import MultipleObjectsReturned from django.core.validators import MaxValueValidator, MinValueValidator from taggit.forms import TagField from dcim.models import Site, Rack, Device, Interface from extras.forms import AddRemoveTagsForm, CustomFieldForm, CustomFieldBul...
lampwins/netbox
netbox/ipam/forms.py
Python
apache-2.0
38,117
################################################################################ # Created By: Justin Paul # Source: https://blogs.oracle.com/OracleWebCenterSuite # # NOTE: Please note that these code snippets should be used for development and # testing purposes only, as such it is unsupported and should not...
justinpaulthekkan/oracle-blog-examples
RIDCJythonScripts/movefolderitems.py
Python
apache-2.0
2,022
from django.conf import settings from django.conf.urls import patterns, url from .views import RecoverPasswordView, LinkedInProfile from student_account import views urlpatterns = [] if settings.FEATURES.get('ENABLE_COMBINED_LOGIN_REGISTRATION'): urlpatterns += patterns( 'student_account.views', ...
proversity-org/edx-platform
lms/djangoapps/student_account/urls.py
Python
agpl-3.0
813