repo_name
stringlengths
5
104
path
stringlengths
4
248
content
stringlengths
102
99.9k
rec/BiblioPixel
bibliopixel/layout/geometry/segment.py
from . import strip class Segment(strip.Strip): """Represents an offset, length segment within a strip.""" def __init__(self, strip, length, offset=0): if offset < 0 or length < 0: raise ValueError('Segment indices are non-negative.') if offset + length > len(strip): ...
LockScreen/Backend
venv/lib/python2.7/site-packages/awscli/customizations/codedeploy/systems.py
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
x64dbg/x64dbgpy
swig/x64dbgpy/pluginsdk/_scriptapi/debug.py
from .. import x64dbg class HardwareType: HardwareAccess = x64dbg.HardwareAccess HardwareWrite = x64dbg.HardwareWrite HardwareExecute = x64dbg.HardwareExecute def Wait(): x64dbg.Wait() def Run(): x64dbg.Run() def Stop(): x64dbg.Stop() def StepIn(): x64dbg.StepIn() def StepOver(): ...
aginzberg/crowdsource-platform
crowdsourcing/migrations/0000_get_requester_ratings_fn.py
# -*- coding: utf-8 -*- from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('crowdsourcing', '0007_auto_20151208_1957'), ] operations = [ migrations.RunSQL(''' CREATE OR REPLACE FUNCTION get_requester_ratings(IN worker_profile_id INTEGER) ...
opennode/nodeconductor-assembly-waldur
src/waldur_geo_ip/views.py
from rest_framework import status, views from rest_framework.response import Response from waldur_core.core.utils import get_lat_lon_from_address from . import serializers class GeocodeViewSet(views.APIView): def get(self, request): serializer = serializers.GeoCodeSerializer(data=request.query_params) ...
aoakeson/home-assistant
homeassistant/components/sensor/systemmonitor.py
""" Support for monitoring the local system.. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.systemmonitor/ """ import logging import homeassistant.util.dt as dt_util from homeassistant.const import STATE_OFF, STATE_ON from homeassistant.helpers....
kmike/psd-tools
tests/psd_tools/psd/test_effects_layer.py
from __future__ import absolute_import, unicode_literals import pytest import logging from psd_tools.psd.effects_layer import ( CommonStateInfo, ShadowInfo, InnerGlowInfo, OuterGlowInfo, BevelInfo, SolidFillInfo, ) from ..utils import check_write_read, check_read_write logger = logging.getLog...
nlgcoin/guldencoin-official
test/functional/feature_maxuploadtarget.py
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test behavior of -maxuploadtarget. * Verify that getdata requests for old blocks (>1week) are dropped ...
indera/olass-client
olass/run.py
#!/usr/bin/env python """ Goal: Implement the application entry point. @authors: Andrei Sura <sura.andrei@gmail.com> """ import argparse from olass.olass_client import OlassClient from olass.version import __version__ DEFAULT_SETTINGS_FILE = 'config/settings.py' def main(): """ Read args """ parser = arg...
romses/LXC-Web-Panel
tests/api.py
import subprocess import unittest import urllib2 import shutil import json import ast import os from flask import Flask from flask.ext.testing import LiveServerTestCase from lwp.app import app from lwp.utils import connect_db token = 'myrandomapites0987' class TestApi(LiveServerTestCase): db = None type_js...
d53dave/cgopt
csaopt/instancemanager/awstools.py
import boto3 import logging import time from string import Template from pyhocon import ConfigTree from botocore.exceptions import ClientError from typing import List, Any, Tuple, Dict from . import Instance from .instancemanager import InstanceManager from ..utils import random_str, random_int log = logging.getLogg...
lmazuel/azure-sdk-for-python
azure-mgmt-machinelearningcompute/azure/mgmt/machinelearningcompute/models/__init__.py
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
disqus/Diamond
src/collectors/snmpraw/snmpraw.py
# coding=utf-8 """ The SNMPRawCollector is designed for collecting data from SNMP-enables devices, using a set of specified OIDs #### Configuration Below is an example configuration for the SNMPRawCollector. The collector can collect data any number of devices by adding configuration sections under the *devices* hea...
timj/scons
test/D/HSTeoh/sconstest-singleStringCannotBeMultipleOptions_dmd.py
""" Test compiling and executing using the dmd tool. """ # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to...
datahuborg/datahub
src/core/db/backend/pg.py
import re import os import errno import shutil import hashlib from collections import namedtuple from uuid import uuid4 import psycopg2 import core.db.query_rewriter from psycopg2.extensions import AsIs from psycopg2.pool import ThreadedConnectionPool from psycopg2 import errorcodes from core.db.licensemanager import L...
codypiersall/mlab
tests/test_mlab_on_unix.py
import sys sys.path = ['../src/'] + sys.path import unittest from mlab.mlabwrap import MatlabReleaseNotFound class TestMlabUnix(unittest.TestCase): def setUp(self): pass def tearDown(self): pass def test_version_discovery(self): import mlab instances = mlab.releases.Matl...
arnavd96/Cinemiezer
myvenv/lib/python3.4/site-packages/botocore/retryhandler.py
# Copyright (c) 2012-2013 Mitch Garnaat http://garnaat.org/ # Copyright 2012-2014 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http...
kartta-labs/mapwarper
lib/tilestache/TileStache-1.51.5/TileStache/Providers.py
""" The provider bits of TileStache. A Provider is the part of TileStache that actually renders imagery. A few default providers are found here, but it's possible to define your own and pull them into TileStache dynamically by class name. Built-in providers: - mapnik (Mapnik.ImageProvider) - proxy (Proxy) - vector (T...
gina-alaska/emodis_ndvi_python-docker
emodis_ndvi_python/pycodes/oneyear_data_layer_subset_good.py
#This python script is modified from oneyear_data_layer_subset_good.pro #This routine open one year files defined in file lists, stack these file, subset, and fill bad data with -2000 #input arguments are flist_ndvi, flist_bq, ul_lon,ul_lat,lr_lon,lr_lat #;inputs: yyyy_flist_ndvi----file list for one year *ndvi.tif,...
emilgaripov/emilgaripov.github.io
code_examples/python_with/with_sqlite3_conn_contextmanager.py
import contextlib import sqlite3 @contextlib.contextmanager def sqlite3_connection(db_name): connection = sqlite3.connect(db_name) yield connection connection.close() with sqlite3_connection('dhcp_snooping.db') as conn: for row in conn.execute('select * from dhcp'): print(row) try: conn....
aa403/betfair.py
betfair/meta/datatype.py
# -*- coding: utf-8 -*- class DataType(object): def __init__(self, type, preprocessor=None): self.type = type self.preprocessor = preprocessor def preprocess(self, value): return self.preprocessor(value) if self.preprocessor else value def serialize(self, value): return ...
dmeulen/home-assistant
homeassistant/config.py
"""Module to help with parsing and generating configuration files.""" import asyncio import logging import os import shutil from types import MappingProxyType # pylint: disable=unused-import from typing import Any, Tuple # NOQA import voluptuous as vol from homeassistant.const import ( CONF_LATITUDE, CONF_LONGI...
numa-engineering/python-daemon
daemon/runner.py
# -*- coding: utf-8 -*- # daemon/runner.py # Part of python-daemon, an implementation of PEP 3143. # # Copyright © 2009–2010 Ben Finney <ben+python@benfinney.id.au> # Copyright © 2007–2008 Robert Niederreiter, Jens Klein # Copyright © 2003 Clark Evans # Copyright © 2002 Noah Spurrier # Copyright © 2001 Jürgen Hermann ...
kingvuplus/boom
lib/python/Screens/Rc.py
from Components.Pixmap import MovingPixmap, MultiPixmap from Tools.Directories import resolveFilename, SCOPE_SKIN from xml.etree.ElementTree import ElementTree from Components.config import config, ConfigInteger from Components.RcModel import rc_model from boxbranding import getBoxType config.misc.rcused = Config...
Distrotech/bzr
tools/rst2html.py
#! /usr/bin/env python # Originally by Dave Goodger, from the docutils, distribution. # # Modified for Bazaar to accommodate options containing dots # # This file is in the public domain. """ A minimal front end to the Docutils Publisher, producing HTML. """ try: import locale locale.setlocale(locale.LC_ALL,...
NoSmartNoMan/algorithm-1
lib/queue.py
#!/usr/bin/env python # -*- coding:UTF-8 __author__ = 'shenshijun' import copy class Queue(object): """ 使用Python的list快速实现一个队列 """ def __init__(self, *arg): super(Queue, self).__init__() self.__queue = list(copy.copy(arg)) self.__size = len(self.__queue) def enter(self, val...
llange/pynag
pynag/Parsers/main.py
# -*- coding: utf-8 -*- """Module for parsing main configuration file (nagios.cfg).""" from pynag.Utils import paths class MainConfig(object): """ Generic parser for files in the format of key=value. This is the format used by nagios.cfg and many other unix configuration files. """ def __init__(sel...
nimble0/plover
plover/oslayer/processlock.py
# Copyright (c) 2012 Hesky Fisher # See LICENSE.txt for details. # # processlock.py - Cross platform global lock to ensure plover only runs once. """Global lock to ensure plover only runs once.""" import sys class LockNotAcquiredException(Exception): pass if sys.platform.startswith('win32'): from ctypes ...
SoftwareIntrospectionLab/MininGit
pycvsanaly2/extensions/FileTypes.py
# Copyright (C) 2008 LibreSoft # # 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 distributed in the ...
hwoods723/script.gamescenter
resources/lib/eventdetails.py
# -*- coding: utf-8 -*- ''' script.matchcenter - Football information for Kodi A program addon that can be mapped to a key on your remote to display football information. Livescores, Event details, Line-ups, League tables, next and previous matches by team. Follow what others are saying about the match ...
michaelborck/earthmine-qgis
qgisplugin/earthmine/earthmine_qgis.py
# -*- coding: utf-8 -*- import copy import json import math from functools import partial from PyQt4.QtCore import QSettings, QTranslator, qVersion, QCoreApplication, pyqtSignal, QObject, pyqtSlot, Qt, QUrl, \ QRectF, SIGNAL, QPointF, QLineF from PyQt4.QtGui import QAction, QIcon, QPainter, QPen, QBrush, QColor, ...
phracek/devassistant
test/fixtures/files/crt/commands/a.py
from devassistant.command_runners import CommandRunner from devassistant.logger import logger class CR1(CommandRunner): @classmethod def matches(cls, c): return c.comm_type == 'barbarbar' @classmethod def run(cls, c): logger.info('CR1: Doing something ...') x = c.input_res + 'b...
openhdf/enigma2-wetek
lib/python/Screens/VideoWizard.py
from boxbranding import getBoxType, getMachineName, getMachineBuild, getBrandOEM, getMachineBrand from Screens.Wizard import WizardSummary from Screens.WizardLanguage import WizardLanguage from Screens.Rc import Rc from Components.AVSwitch import iAVSwitch from Screens.Screen import Screen from Components.Pixmap impor...
fstltna/PyImp
src/empPath.py
# Copyright (C) 1998 Ulf Larsson # 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 ...
heplesser/nest-simulator
pynest/examples/clopath_synapse_spike_pairing.py
# -*- coding: utf-8 -*- # # clopath_synapse_spike_pairing.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 ...
SickGear/SickGear
lib/enzyme/mpeg.py
# -*- coding: utf-8 -*- # enzyme - Video metadata parser # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # Copyright 2003-2006 Thomas Schueppel <stain@acm.org> # Copyright 2003-2006 Dirk Meyer <dischi@freevo.org> # # This file is part of enzyme. # # enzyme is free software; you can redistribute it and/or mod...
nop33/indico
indico/modules/rb/models/locations.py
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
Applied-GeoSolutions/gips
gips/__init__.py
#!/usr/bin/env python ################################################################################ # GIPS: Geospatial Image Processing System # # AUTHOR: Matthew Hanson # EMAIL: matt.a.hanson@gmail.com # # Copyright (C) 2014-2018 Applied Geosolutions # # This program is free software; you can redist...
caioau/caioau-personal
fluxos/lista 2/grafo-3.py
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sun Mar 27 01:20:46 2016 @author: caioau """ import matplotlib.pyplot as plt import networkx as nx from networkx.drawing.nx_agraph import graphviz_layout def main(): G = nx.DiGraph() # G eh um grafo direcionado # gera o grafo apartir de suas are...
tinutomson/wikicoding
wiki/plugins/macros/wiki_plugin.py
from __future__ import absolute_import from __future__ import unicode_literals # -*- coding: utf-8 -*- from django.utils.translation import ugettext as _ from wiki.core.plugins import registry from wiki.core.plugins.base import BasePlugin from wiki.plugins.macros import settings from wiki.plugins.macros.mdx.macro imp...
petertodd/timelock
lib/python-bitcoinlib/bitcoin/rpc.py
# Copyright 2011 Jeff Garzik # # RawProxy has the following improvements over python-jsonrpc's ServiceProxy # class: # # - HTTP connections persist for the life of the RawProxy object (if server # supports HTTP/1.1) # - sends protocol 'version', per JSON-RPC 1.1 # - sends proper, incrementing 'id' # - sends Basic HTT...
Eigenlabs/EigenD
plg_macosx/caprobe.py
# # Copyright 2009 Eigenlabs Ltd. http://www.eigenlabs.com # # This file is part of EigenD. # # EigenD 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) a...
burakbayramli/classnotes
sk/2019/07/test_rocket1.py
from rocketlander import RocketLander from constants import LEFT_GROUND_CONTACT, RIGHT_GROUND_CONTACT import numpy as np import pyglet if __name__ == "__main__": # Settings holds all the settings for the rocket lander environment. settings = {'Side Engines': True, 'Clouds': True, ...
wrouesnel/ansible
lib/ansible/modules/cloud/vmware/vmware_vmkernel_facts.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # 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...
boutproject/BOUT-2.0
examples/non-local_1d/analyse_check_q_boundary_condition.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Runs the conduction example, produces some output # nproc = 1 # Number of processors to use from boututils import shell, launch, plotdata from boutdata import collect import numpy as np from sys import argv from math import sqrt, log10, log, pi from matplotlib impo...
DarkFenX/Phobos
util/__init__.py
#=============================================================================== # Copyright (C) 2014-2019 Anton Vorobyov # # This file is part of Phobos. # # Phobos 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 ...
sergiopasra/megaradrp
megaradrp/processing/tests/test_fibermatch.py
import pytest from megaradrp.processing.fibermatch import generate_box_model from megaradrp.processing.fibermatch import count_peaks PEAKS = [ 3.806000000000000000e+03, 3.812000000000000000e+03, 3.818000000000000000e+03, 3.824000000000000000e+03, 3.830000000000000000e+03, 3.8360000000000000...
ezequielpereira/Time-Line
timelinelib/wxgui/dialogs/setcategory/controller.py
# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Rickard Lindberg, Roger Lindberg # # This file is part of Timeline. # # Timeline 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 th...
electrolinux/weblate
weblate/trans/aresource.py
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # 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, eithe...
NAMD/pypln.backend
tests/test_worker_bigrams.py
# coding: utf-8 # # Copyright 2012 NAMD-EMAP-FGV # # This file is part of PyPLN. You can get more information at: http://pypln.org/. # # PyPLN 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 o...
GrotheFAF/client
src/model/playerset.py
from PyQt5.QtCore import QObject, pyqtSignal from model.player import Player class Playerset(QObject): """ Wrapper for an id->Player map Used to lookup players either by id or by login. """ playerAdded = pyqtSignal(object) playerRemoved = pyqtSignal(object) def __init__(self): Q...
joelfiddes/toposubv2
topoMAPP/getERA/era_prep.py
#!/usr/bin/env python """ This module preprocesses ERA-Interim data, units, accumulated to instantaneous values and timestep interpolation for 6 h to 3 h values. Example: as import: from getERA import era_prep as prep prep.main(wd, config['main']['startDate'], config['main']['endDate']) ...
LTD-Beget/sprutio
app/modules/webdav/actions/files/copy.py
from core import FM from core.FMOperation import FMOperation class CopyFiles(FM.BaseAction): def __init__(self, request, paths, session, target, overwrite, **kwargs): super(CopyFiles, self).__init__(request=request, **kwargs) self.paths = paths self.session = session self.target =...
sillvan/hyperspy
hyperspy/io_plugins/__init__.py
# -*- coding: utf-8 -*- # Copyright 2007-2011 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
SickGear/SickGear
lib/soupsieve_py3/css_types.py
"""CSS selector structure items.""" import copyreg from collections.abc import Hashable, Mapping __all__ = ( 'Selector', 'SelectorNull', 'SelectorTag', 'SelectorAttribute', 'SelectorContains', 'SelectorNth', 'SelectorLang', 'SelectorList', 'Namespaces', 'CustomSele...
PEAT-AI/Automato
Surveillance/make_ndvi.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # ndvi_test.py # # Copyright 2015 rob <rob@Novu> # # 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 # ...
drayanaindra/inasafe
safe/messaging/styles.py
""" InaSAFE Disaster risk assessment tool developed by AusAid **Messaging styles.** Contact : ole.moller.nielsen@gmail.com .. note:: 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 ...
jelly/calibre
src/calibre/gui2/preferences/device_user_defined.py
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from PyQt5.Qt import QDialog, QVBoxLayout, QPlainTextEdit, QTimer, \ QDialogBut...
rghe/ansible
lib/ansible/modules/cloud/ovirt/ovirt_quota_facts.py
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Red Hat, Inc. # # This file is part of Ansible # # Ansible 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 #...
superberny70/pelisalacarta
python/main-classic/servers/filesmonster.py
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para filesmonster # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # ------------------------------------------------------------ import re from core import logger from core import s...
phillxnet/rockstor-core
src/rockstor/scripts/ovpn_util.py
""" Copyright (c) 2012-2020 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor 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 la...
KaiRo-at/socorro
alembic/versions/32b54dec3fc0_fixes_bug_970406_add_raw_adi_logs_table.py
"""Fixes bug 970406 - add raw_adi_logs table Revision ID: 32b54dec3fc0 Revises: 1ab8d5514ce2 Create Date: 2014-06-12 11:47:19.398882 """ # revision identifiers, used by Alembic. revision = '32b54dec3fc0' down_revision = '1ef041dfc3d5' from alembic import op from socorrolib.lib import citexttype, jsontype, buildtype...
xlqian/navitia
source/jormungandr/jormungandr/exceptions.py
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
petrjasek/superdesk-core
apps/archive_broadcast/__init__.py
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import loggi...
shashi792/courtlistener
alert/donate/admin.py
from django.contrib import admin from alert.donate.models import Donation from alert.userHandling.models import UserProfile class DonorInline(admin.TabularInline): model = UserProfile.donation.through max_num = 1 raw_id_fields = ( 'userprofile', ) class DonationAdmin(admin.ModelAdmin): r...
VirusTotal/misp-modules
misp_modules/modules/expansion/threatfox.py
# -*- coding: utf-8 -*- import requests import json misperrors = {'error': 'Error'} mispattributes = {'input': ['md5', 'sha1', 'sha256', 'domain', 'url', 'email-src', 'ip-dst|port', 'ip-src|port'], 'output': ['text']} moduleinfo = {'version': '0.1', 'author': 'Corsin Camichel', 'description': 'Module to search for an ...
policycompass/policycompass-services
apps/metricsmanager/signals.py
""" This creates Django signals that automatically update the elastic search Index When an item is created, a signal is thrown that runs the create / update index API of the Search Manager When an item is deleted, a signal is thrown that executes the delete index API of the Search Manager This way the Policy compass da...
brousch/opencraft
instance/tests/views/test_index.py
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015 OpenCraft <xavier@opencraft.com> # # This program 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 Soft...
g-weatherill/hmtk
hmtk/seismicity/gcmt_utils.py
#!/usr/bin/env/python ''' Set of moment tensor utility functions ''' import numpy as np from math import fabs, log10, sqrt, acos, atan2, pi def tensor_components_to_use(mrr, mtt, mpp, mrt, mrp, mtp): ''' Converts components to Up, South, East definition USE = [[mrr, mrt, mrp], [mtt, mtt, mtp],...
open-craft/xblock-poll
tests/integration/test_submit_button.py
# -*- coding: utf-8 -*- # # Copyright (C) 2015 McKinsey Academy # # Authors: # Jonathan Piacenti <jonathan@opencraft.com> # # This software's license gives you freedom; you can copy, convey, # propagate, redistribute and/or modify this program under the terms of # the GNU Affero General Public License (AGPL) a...
mikelarre/odoomrp-wip-1
product_last_purchase_sale_info/models/sale_order.py
# -*- encoding: utf-8 -*- ############################################################################## # # Avanzosc - Avanced Open Source Consulting # Copyright (C) 2011 - 2014 Avanzosc <http://www.avanzosc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms ...
12019/pyscard
smartcard/wx/APDUHexValidator.py
# -*- coding: iso-8859-15 -*- """ A wxValidator that matches APDU in hexadecimal such as: A4 A0 00 00 02 A4A0000002 __author__ = "http://www.gemalto.com" Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jean-daniel.aussel@gemalto.com This file is part of pyscard. pyscard is free software; you ...
barthess/mavlink
pymavlink/tools/magfit_motors.py
#!/usr/bin/env python ''' fit best estimate of magnetometer offsets, trying to take into account motor interference ''' import sys, time, os, math from argparse import ArgumentParser parser = ArgumentParser(description=__doc__) parser.add_argument("--no-timestamps",dest="notimestamps", action='store_true', help="Log...
ajdawson/cartopy
lib/cartopy/mpl/feature_artist.py
# (C) British Crown Copyright 2011 - 2015, Met Office # # This file is part of cartopy. # # cartopy 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 License, or # (at your option)...
siongui/userpages
content/code/python-jinja2-vs-go-html-template/jinja2-example-3.py
#!/usr/bin/env python # -*- coding:utf-8 -*- from jinja2 import Template import sys tmpl = """ {% for link in links %} {{ loop.index0 }}: <a href="{{link.href}}">{{link.name}}</a> {{ loop.index }}: <a href="{{link.href}}">{{link.name}}</a> {% endfor %} """ if __name__ == '__main__': links = [ {'name': 'Google'...
mrknow/filmkodi
plugin.video.wizjatv/resources/lib/lib/client.py
# -*- coding: utf-8 -*- ''' Specto Add-on Copyright (C) 2015 lambda 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...
dmlc/mxnet
ci/build_windows.py
#!/usr/bin/env python # -*- 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 Licen...
dmpetrov/dataversioncontrol
dvc/ui/pager.py
"""Draws DAG in ASCII.""" import logging import os import pydoc import sys from rich.pager import Pager from dvc.env import DVC_PAGER from dvc.utils import format_link logger = logging.getLogger(__name__) DEFAULT_PAGER = "less" LESS = "LESS" PAGER_ENV = "PAGER" def prepare_default_pager( clear_screen: bool ...
infochimps-forks/ezbake-platform-services
efe/frontend_app/modules/ezRPConfig.py
# Copyright (C) 2013-2015 Computer Sciences 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 a...
stdweird/aquilon
tests/broker/test_del_10gig_hardware.py
#!/usr/bin/env python2.6 # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2009,2010,2011,2012,2013 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
apache/phoenix
bin/pherf-standalone.py
#!/usr/bin/env python ############################################################################ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The A...
linkedin/naarad
src/naarad/__init__.py
# coding=utf-8 """ Copyright 2013 LinkedIn Corp. 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 l...
noplay/aiohttp
tests/test_parsers.py
"""Tests for parsers.py""" import asyncio import unittest import unittest.mock from aiohttp import errors from aiohttp import parsers class StreamParserTests(unittest.TestCase): DATA = b'line1\nline2\nline3\n' def setUp(self): self.lines_parser = parsers.LinesParser() self.loop = asyncio.n...
DirectXMan12/nova-hacking
nova/virt/powervm/common.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 # # ...
queria/my-tempest
tempest/api/object_storage/test_account_services.py
# 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...
USGSDenverPychron/pychron
pychron/hardware/newport/newport_group.py
# =============================================================================== # Copyright 2011 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/licens...
0--key/lib
portfolio/Python/scrapy/merckgroup/simplysupplements.py
import re import os from scrapy.spider import BaseSpider from scrapy.selector import HtmlXPathSelector from scrapy.http import Request, HtmlResponse from scrapy.utils.response import get_base_url from scrapy.utils.url import urljoin_rfc from urllib import urlencode import hashlib import csv from product_spiders.item...
cwolferh/heat-scratch
heat/engine/resources/openstack/neutron/lbaas/listener.py
# # Copyright 2015 IBM Corp. # # 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 require...
DLR-SC/tigl
thirdparty/nsiqcppstyle/nsiqunittest/nsiqcppstyle_unittestbase.py
# Copyright (c) 2009 NHN Inc. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the follow...
Triv90/SwiftUml
swift/common/middleware/bulk.py
# Copyright (c) 2013 OpenStack, 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 wr...
ikargis/horizon_fod
horizon/messages.py
# 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 # #...
djkonro/client-python
kubernetes/test/test_v1_git_repo_volume_source.py
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.7.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
meidli/yabgp
yabgp/handler/default_handler.py
#!/usr/bin/python # -*- coding: utf-8 -*- # import json # replace with simplejson import simplejson as json import os import time import logging import traceback import sys from oslo_config import cfg from yabgp.common import constants as bgp_cons from yabgp.handler import BaseHandler CONF = cfg.CONF LOG = loggin...
luci/luci-py
appengine/components/components/prpc/discovery/service_prpc_pb2.py
# Generated by the pRPC protocol buffer compiler plugin. DO NOT EDIT! # source: service.proto import base64 import zlib from google.protobuf import descriptor_pb2 # Includes description of the service.proto and all of its transitive # dependencies. Includes source code info. FILE_DESCRIPTOR_SET = descriptor_pb2.Fil...
rmoorman/appier
src/appier/export.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Appier Framework # Copyright (c) 2008-2015 Hive Solutions Lda. # # This file is part of Hive Appier Framework. # # Hive Appier Framework is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by the Apach...
Bloomie/murano-repository
muranorepository/api/v1.py
# Copyright (c) 2013 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
cloud-fan/spark
python/docs/source/conf.py
# -*- coding: utf-8 -*- # # pyspark documentation build configuration file, created by # sphinx-quickstart on Thu Aug 28 15:17:47 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
amwelch/a10sdk-python
a10sdk/core/cgnv6/cgnv6_ddos_protection_stats.py
from a10sdk.common.A10BaseClass import A10BaseClass class Stats(A10BaseClass): """This class does not support CRUD Operations please use parent. :param ip_other_block_alloc: {"optional": true, "size": "8", "type": "number", "oid": "17", "format": "counter"} :param entry_match_drop: {"optional": true...
mlperf/training_results_v0.7
Google/benchmarks/bert/implementations/bert-cloud-TF2.0-tpu-v3-32/modeling/networks/__init__.py
# Copyright 2019 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...
aronsky/home-assistant
homeassistant/components/forked_daapd/media_player.py
"""This library brings support for forked_daapd to Home Assistant.""" import asyncio from collections import defaultdict import logging from pyforked_daapd import ForkedDaapdAPI from pylibrespot_java import LibrespotJavaAPI from homeassistant.components.media_player import MediaPlayerEntity from homeassistant.compone...