repo_name
stringlengths
5
104
path
stringlengths
4
248
content
stringlengths
102
99.9k
crypt3lx2k/Imageboard-Web-Interface
iwi/web/Links.py
import re import urlparse __all__ = ['Links'] class Links (object): """ Utility class for URL creation. """ scheme = 'http' netloc = 'boards.4chan.org' apiloc = 'a.4cdn.org' imgloc = 'i.4cdn.org' board_pattern = re.compile(r'/(\w+)$') page_pattern = re.compile(r'/(\w+)/(\d+)$')...
publicscience/hive
app/routes/auth.py
from flask import request, Response from functools import wraps from app import app def check_auth(username, password): """ Check submitted auth values. """ return username == app.config['AUTH_USER'] and password == app.config['AUTH_PASS'] def authenticate(): """ Returns a 401 response if auth...
evangeline97/localwiki-backend-server
localwiki/redirects/migrations/0001_initial.py
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Redirect' db.create_table('redirects_redirect', ( ('id', self.gf('django.db.mode...
SteveJM/sulley
unit_tests/blocks.py
from sulley import * def run (): groups_and_num_test_cases() dependencies() repeaters() return_current_mutant() exhaustion() # clear out the requests. blocks.REQUESTS = {} blocks.CURRENT = None #########################################################################################...
codenginebd/django-paypal-driver
paypal/views.py
# -*- coding: utf-8 -*- from decimal import Decimal, ROUND_UP from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import get_object_or_404 from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse from django.conf import settings from django.shortcuts...
tosdr/tosback2
code/get_history_from_git.py
import sys from git import * if(len(sys.argv) != 4): print "Usage: python get_history_from_git.py REPO_LOCATION REPO_PATH BRANCH" sys.exit() def printCommit(commitHash, commitDate, printed): if not printed: print "\t{" else: print ",\n\t{" print '\t\tcommitHash: "' + commitHash + '",' print "\t\tcommitDate:...
S03D4-164/thug
src/ThugAPI/IThugAPI.py
#!/usr/bin/env python # # IThugAPI.py # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; ...
tardyp/buildbot
master/buildbot/steps/shell.py
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gecos-team/gecosws-agent
gecosfirstlogin_lib/Window.py
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # This file is part of Guadalinex # # This software 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, ...
TheChymera/matrix2latex
matrix2latex/__init__.py
"""This file is part of matrix2latex. matrix2latex 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. matrix2latex is distributed in the hope ...
erh3cq/hyperspy
hyperspy/tests/component/test_exponential.py
# -*- coding: utf-8 -*- # Copyright 2007-2021 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...
pqtoan/mathics
mathics/core/definitions.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import import six import six.moves.cPickle as pickle import os import base64 import re import bisect from collections import defaultdict from mathics.core.expression import Expression, Symbol, Stri...
nrego/westpa
src/oldtools/aframe/data_reader.py
# Copyright (C) 2013 Matthew C. Zwier and Lillian T. Chong # # This file is part of WESTPA. # # WESTPA 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...
ares/robottelo
robottelo/ui/packages.py
# -*- encoding: utf-8 -*- """Implements Packages UI""" from robottelo.ui.base import Base, UIError from robottelo.ui.locators import common_locators, locators, tab_locators from robottelo.ui.navigator import Navigator class Package(Base): """Manipulates Packages from UI""" is_katello = True def navigat...
burakbayramli/quant_at
book/Ratio.py
import statsmodels.tsa.stattools as st import matplotlib.pylab as plt import numpy as np import pandas as pd df = pd.read_csv('gld_uso.csv') cols = ['GLD','USO'] df['hedgeRatio'] = df['USO'] / df['GLD'] data_mean = pd.rolling_mean(df['hedgeRatio'], window=20) data_std = pd.rolling_std(df['hedgeRatio'], window=20) df...
bgris/ODL_bgris
lib/python3.5/site-packages/qtawesome/iconic_font.py
r""" Iconic Font =========== A lightweight module handling iconic fonts. It is designed to provide a simple way for creating QIcons from glyphs. From a user's viewpoint, the main entry point is the ``IconicFont`` class which contains methods for loading new iconic fonts with their character map and methods returnin...
thierrymarianne/valuenetwork
valuenetwork/valueaccounting/migrations/0018_auto__add_field_commitment_stage__add_field_commitment_state__add_fiel.py
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Commitment.stage' db.add_column('valueaccounting_commitment', 'stage', ...
tvtsoft/odoo8
addons/website_sale_digital/controllers/main.py
# -*- coding: utf-8 -*- import base64 from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website.controllers.main import Website from openerp.addons.website_portal.controllers.main import website_account from openerp.addons.website_sale.controllers.main import website_s...
PierreFaniel/openerp-7.0
mail_organizer/message.py
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2010-2014 Elico Corp. All Rights Reserved. # Augustin Cisterne-Kaas <augustin.cisterne-kaas@elico-corp.com> # # This program is free software: y...
vuolter/pyload
src/pyload/plugins/downloaders/WrzucTo.py
# -*- coding: utf-8 -*- import re import pycurl from ..base.simple_downloader import SimpleDownloader class WrzucTo(SimpleDownloader): __name__ = "WrzucTo" __type__ = "downloader" __version__ = "0.09" __status__ = "testing" __pattern__ = r"http://(?:www\.)?wrzuc\.to/(\w+(\.wt|\.html)|(\w+/?link...
mikitex70/pelican-plugins
multi_part/multi_part.py
# -*- coding: utf-8 -*- """ Copyright (c) FELD Boris <lothiraldan@gmail.com> Multiple part support ===================== Create a navigation menu for multi-part related_posts """ from collections import defaultdict from pelican import signals import logging log = logging.getLogger(__name__) warning_message = """...
zsloan/genenetwork2
wqflask/wqflask/db_info.py
import http.client import urllib.request import urllib.error import urllib.parse import re from flask import Flask, g from utility.logger import getLogger logger = getLogger(__name__) class InfoPage: def __init__(self, start_vars): self.info = None self.gn_accession_id = None if 'gn_acce...
ygol/odoo
addons/stock/tests/test_product.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Author: Leonardo Pistone # Copyright 2015 Camptocamp SA from odoo.addons.stock.tests.common2 import TestStockCommon from odoo.tests.common import Form class TestVirtualAvailable(TestStockCommon): def setUp(self)...
syci/OCB
addons/website_sale/models/product.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import openerp from openerp import tools from openerp.osv import osv, fields class product_style(osv.Model): _name = "product.style" _columns = { 'name' : fields.char('Style Name', required=True), ...
QubesOS/qubes-core-admin
qubes/tests/vm/appvm.py
# -*- encoding: utf-8 -*- # # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2017 Marek Marczykowski-Górecki # <marmarek@invisiblethingslab.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
rspavel/spack
var/spack/repos/builtin/packages/r-msnbase/package.py
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RMsnbase(RPackage): """Base Functions and Classes for Mass Spectrometry and Proteomics. ...
RT-Thread/rtthread_fsl
utils/mdp/eMPL-pythonclient/euclid.py
#!/usr/bin/env python # # euclid graphics maths module # # Copyright (c) 2006 Alex Holkner # Alex.Holkner@mail.google.com # # This library 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 ...
burgerdev/volumina
volumina/colorama/ansitowin32.py
############################################################################### # volumina: volume slicing and editing library # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # modify it und...
chengduoZH/Paddle
python/paddle/fluid/tests/unittests/mkldnn/test_concat_mkldnn_op.py
# Copyright (c) 2018 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...
leppa/home-assistant
homeassistant/components/vlc_telnet/media_player.py
"""Provide functionality to interact with the vlc telnet interface.""" import logging from python_telnet_vlc import ConnectionError as ConnErr, VLCTelnet import voluptuous as vol from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerDevice from homeassistant.components.media_player.const impor...
Akakiis/pythonintask
IVTa/2014/SHCHUKIN_F_O/task_2_30.py
# Задача 1. Вариант 30. ''' Напишите программу, которая будет выводить на экран наиболее понравившееся вам высказывание, автором которого является Али ибн Абу Талиб. Не забудьте о том, что автор должен быть упомянут на отдельной строке. ''' # SHCHUKIN F. O. # 24.02.2016 from sys import stdout as c from time import sle...
nzlosh/st2
contrib/runners/inquirer_runner/setup.py
# -*- coding: utf-8 -*- # Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
pybuilder/pybuilder
src/unittest/python/graph_utils_tests.py
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2020 PyBuilder 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/l...
achapkowski/ArcREST
src/arcrest/webmap/operationallayers.py
from .._abstract.abstract import BaseOperationalLayer from ..common.general import _date_handler, _unicode_convert import json import uuid ######################################################################## class MapGraphicLayer(BaseOperationalLayer): """ Represents a graphic in the map. There are no...
ader1990/cloudbase-init
cloudbaseinit/metadata/services/azureservice.py
# Copyright 2017 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...
sparkslabs/kamaelia
Sketches/MPS/HTTP/demo_http.py
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ver...
julianwang/cinder
cinder/db/sqlalchemy/migrate_repo/versions/004_volume_type_to_uuid.py
# 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...
crossbario/crossbarexamples
exclude_subscribers/carol.py
import random from os import environ, urandom from os.path import exists from functools import partial from twisted.internet.defer import inlineCallbacks from autobahn.twisted.util import sleep from autobahn.twisted.wamp import ApplicationSession, ApplicationRunner from autobahn.wamp import cryptosign from autobahn....
ilveroluca/pydoop
test/mapreduce/test_text_stream.py
# BEGIN_COPYRIGHT # # Copyright 2009-2015 CRS4. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy # of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
nextml/NEXT
apps/PoolBasedTripletMDS/algs/ValidationSampling/utilsMDS.py
""" utilsMDS.py author: Kevin Jamieson (kevin.g.jamieson@gmail.com) edited: 1/18/15 This module has methods that assist with non-metric multidimensional scaling. If you're trying to COMPUTE an embedding, you might simply call: X,emp_loss = computeEmbedding(n,d,S) You may also consider getLoss to check how well...
superstack/nova
nova/tests/api/openstack/__init__.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 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/...
OpenCMISS/neon
src/opencmiss/neon/core/serializers/base.py
''' Copyright 2015 University of Auckland Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agre...
jendap/tensorflow
tensorflow/python/data/experimental/kernel_tests/restructured_dataset_test.py
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Sazzadmasud/Keystone_hash_token
keystone/tests/test_content_types.py
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
sebrandon1/neutron
neutron/tests/unit/services/trunk/drivers/linuxbridge/agent/test_driver.py
# # 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 t...
xiaoxq/apollo
modules/tools/prediction/data_pipelines/cruise_models.py
#!/usr/bin/env python3 ############################################################################### # Copyright 2018 The Apollo 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...
albertz/music-player
mac/pyobjc-core/Lib/objc/_framework.py
""" Generic framework path manipulation """ __all__ = ['infoForFramework'] # This regexp should find: # \1 - framework location # \2 - framework name # \3 - framework version (optional) # FRAMEWORK_RE_STR = r"""(^.*)(?:^|/)(\w+).framework(?:/(?:Versions/([^/]+)/)?\2)?$""" FRAMEWORK_RE = None def infoForFramewo...
morelab/weblabdeusto
server/src/weblab/core/web/configuration.py
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individual...
unnikrishnankgs/va
venv/lib/python3.5/site-packages/tensorflow/python/ops/gen_functional_ops.py
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. """ import collections as _collections from google.protobuf import text_format as _text_format from tensorflow.core.framework import op_def_pb2 as _op_def_pb2 # Needed to trigger the call to _set_call_cpp_shape_fn. from tensorfl...
crchemist/scioncc
src/pyon/core/security/authentication.py
#!/usr/bin/env python """ @file ion/core/security/authentication.py @author Roger Unwin @author Dorian Raymer @brief routines for working with crypto (x509 certificates and private_keys) """ import binascii import urllib import os import datetime import hashlib try: from M2Crypto import EVP, X509 except ImportEr...
getredash/redash
migrations/versions/65fc9ede4746_add_is_draft_status_to_queries_and_.py
"""Add is_draft status to queries and dashboards Revision ID: 65fc9ede4746 Revises: Create Date: 2016-12-07 18:08:13.395586 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. from sqlalchemy.exc import ProgrammingError revision = "65fc9ede4746" down_revision = None branch_l...
wagnerand/zamboni
mkt/developers/urls.py
from django import http from django.conf.urls import include, patterns, url from rest_framework.routers import SimpleRouter from lib.misc.urlconf_decorator import decorate import amo from amo.decorators import write from amo.urlresolvers import reverse from mkt.api.base import SubRouter from mkt.developers.api impo...
mitsuhiko/babel
tests/test_smoke.py
# -- encoding: UTF-8 -- """ These tests do not verify any results and should not be run when looking at improving test coverage. They just verify that basic operations don't fail due to odd corner cases on any locale that we ship. """ from datetime import datetime import pytest from babel import Locale from babel imp...
rehassachdeva/pydsa
pydsa/queue.py
class queue(object): """ A queue is a container of objects (a linear collection) that are inserted and removed according to the first-in first-out (FIFO) principle. >>> from pydsa import queue >>> q = queue() >>> q.enqueue(5) >>> q.enqueue(8) >>> q.enqueue(19) >>> q.dequeue() ...
josenavas/american-gut-web
amgut/handlers/human_survey.py
from json import dumps, loads import logging from tornado.web import authenticated from tornado.escape import url_escape from amgut import media_locale, text_locale from amgut.connections import ag_data, redis from amgut.handlers.base_handlers import BaseHandler from amgut.lib.util import store_survey, make_survey_cl...
mayavanand/RMMAFinalProject
build/lib/azimuth/local_multiprocessing.py
import multiprocessing import numpy as np def configure(num_jobs=8, TEST=False, subtract=0, num_proc=None, num_thread_per_proc=None): ''' num_jobs is typically the # of genes we are parallelizing over ''' if num_proc is None: num_proc = multiprocessing.cpu_count() - subtract if num_jobs >...
SanketDG/networkx
networkx/generators/degree_seq.py
# -*- coding: utf-8 -*- """Generate graphs with a given degree sequence or expected degree sequence. """ # Copyright (C) 2004-2016 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pieter Swart <swart@lanl.gov> # All rights reserved. # BSD license. import heapq from itertools i...
ipa-mdl/catkin_pkg
test/test_templates.py
import os import unittest import tempfile import shutil from mock import MagicMock, Mock from catkin_pkg.package_templates import _safe_write_files, create_package_files, \ create_cmakelists, create_package_xml, PackageTemplate, _create_include_macro, \ _create_targetlib_args from catkin_pkg.package import pa...
overdrive3000/skytools
tests/quoting/regtest.py
#! /usr/bin/env python import sys, time import skytools.psycopgwrapper import skytools._cquoting, skytools._pyquoting from decimal import Decimal # create a DictCursor row class fake_cursor: index = {'id': 0, 'data': 1} description = ['x', 'x'] dbrow = skytools.psycopgwrapper._CompatRow(fake_cursor()) dbrow[0...
custode/reviewboard
reviewboard/webapi/resources/draft_file_attachment.py
from __future__ import unicode_literals from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q from djblets.util.decorators import augment_method_from from djblets.webapi.decorators import webapi_login_required from djblets.webapi.responses import WebAPIResponsePaginated from reviewboard...
nck0405/ChennaiEden
modules/templates/CERT/config.py
# -*- coding: utf-8 -*- try: # Python 2.7 from collections import OrderedDict except: # Python 2.6 from gluon.contrib.simplejson.ordered_dict import OrderedDict from gluon import current from gluon.storage import Storage def config(settings): """ Template settings for CERT (Community Emer...
butterscotchstallion/limnoria-plugins
IMDB/config.py
### # Copyright (c) 2015, butterscotchstallion # All rights reserved. # # ### import supybot.conf as conf import supybot.registry as registry try: from supybot.i18n import PluginInternationalization _ = PluginInternationalization('IMDB') except: # Placeholder that allows to run the plugin on a bot # wi...
okuchaiev/f-lm
language_model_test.py
import random import numpy as np import tensorflow as tf from language_model import LM from hparams import HParams def get_test_hparams(): return HParams( batch_size=21, num_steps=12, num_shards=2, num_layers=1, learning_rate=0.2, max_grad_norm=1.0, vocab_s...
martbhell/wasthereannhlgamelastnight
src/lib/google/auth/crypt/_python_rsa.py
# Copyright 2016 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
SUSE/azure-sdk-for-python
azure-mgmt-notificationhubs/azure/mgmt/notificationhubs/models/namespace_create_or_update_parameters.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 ...
tplavcic/percona-xtradb-cluster
mysql-test/suite/tokudb/t/change_column_char.py
#!/usr/bin/env python import sys def gen_test(n): print "CREATE TABLE t (a CHAR(%d));" % (n) for v in [ 'hi', 'there', 'people' ]: print "INSERT INTO t VALUES ('%s');" % (v) for i in range(2,256): if i < n: print "--replace_regex /MariaDB/XYZ/ /MySQL/XYZ/" print "--e...
mrnamingo/vix4-34-enigma2-bcm
lib/python/Components/ServiceScan.py
from enigma import eComponentScan, iDVBFrontend from Components.NimManager import nimmanager as nimmgr from Tools.Transponder import getChannelNumber class ServiceScan: Idle = 1 Running = 2 Done = 3 Error = 4 Errors = { 0: _("error starting scanning"), 1: _("error while scanning"), 2: _("no resource manag...
weidel-p/nest-simulator
pynest/nest/lib/hl_api_exceptions.py
# -*- coding: utf-8 -*- # # hl_api_exceptions.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 of the Licen...
D4wN/brickv
src/build_data/windows/OpenGL/GL/NV/texture_env_combine4.py
'''OpenGL extension NV.texture_env_combine4 This module customises the behaviour of the OpenGL.raw.GL.NV.texture_env_combine4 to provide a more Python-friendly API Overview (from the spec) New texture environment function COMBINE4_NV allows programmable texture combiner operations, including ADD ...
jeffchao/xen-3.3-tcg
tools/python/xen/util/vscsi_util.py
#!/usr/bin/env python # -*- mode: python; -*- #============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation...
newmediamedicine/indivo_server_1_0
doc/sphinx/localext/httpdomain.py
""" Indivo-specific extensions to httpdomain for loading autogenerated API docs. Adapted from: sphinxcontrib.httpdomain ~~~~~~~~~~~~~~~~~~~~~~~~ The HTTP domain for documenting RESTful HTTP APIs. :copyright: Copyright 2011 by Hong Minhee :license: BSD, see LICENSE for details. """ ...
petejan/imos-toolbox
snapshot/snapshot.py
#!/usr/bin/python import os import sys import time import shutil import ziputil # snapshot.py # Exports the IMOS Toolbox from SVN and # # - Creates an archive of the source # - Runs Util/imosPackage.m to package the source # # These files are submitted back to the project as file downloads. # # python, svn (Sli...
hclivess/Stallion
nuitka/Cryptodome/Hash/SHA3_224.py
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
sestrella/ansible
test/units/modules/network/ios/test_ios_ping.py
# # (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 # (at your option) any later version. # # Ansible is d...
adam111316/SickGear
lib/chardet/eucjpprober.py
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. ...
be-cloud-be/horizon-addons
server/addons/project/project.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, date from lxml import etree import time from openerp import api from openerp import SUPERUSER_ID from openerp import tools from openerp.osv import fields, osv from openerp.tools.translate ...
ahmedaljazzar/edx-platform
openedx/core/djangoapps/video_pipeline/config/waffle.py
""" This module contains configuration settings via waffle flags for the Video Pipeline app. """ from openedx.core.djangoapps.waffle_utils import WaffleFlagNamespace, CourseWaffleFlag # Videos Namespace WAFFLE_NAMESPACE = 'videos' # Waffle flag telling whether youtube is deprecated. DEPRECATE_YOUTUBE = 'deprecate_you...
edx-solutions/edx-platform
common/djangoapps/util/testing.py
""" Utility Mixins for unit tests """ import json import sys import six from django.conf import settings from django.test import TestCase from django.urls import clear_url_caches, resolve from mock import patch from util.db import OuterAtomic if six.PY3: from importlib import reload class UrlResetMixin(objec...
gg0/libming-debian
test/Text/test02.py
#!/usr/bin/python from ming import * import sys mediadir = sys.argv[1]+'/../Media' m = SWFMovie(); font = SWFFont(mediadir + "/font01.fdb") text = SWFText(2); text.setFont(font); text.setHeight(20); text.setColor(0x00, 0x00, 0x00, 0xff); text.addString("abc"); font2 = SWFFont(mediadir + "/test.ttf") text.setF...
LLNL/spack
var/spack/repos/builtin/packages/py-azure-mgmt-appconfiguration/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) class PyAzureMgmtAppconfiguration(PythonPackage): """Microsoft Azure App Configuration Management Client Library for ...
dchoruzy/python-stdnum
stdnum/iso7064/mod_11_10.py
# mod_11_10.py - functions for performing the ISO 7064 Mod 11, 10 algorithm # # Copyright (C) 2010, 2011, 2012, 2013 Arthur de Jong # # This library 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; eithe...
DeadBugEngineering/myHDL_shenanigans
ssd1306_8x64bit_driver/myhdl_10dev/lib/python2.7/site-packages/myhdl-1.0.dev0-py2.7.egg/myhdl/_getcellvars.py
from __future__ import absolute_import import ast from myhdl._util import _flatten class Data(): pass def _getCellVars(symdict, arg): gens = _flatten(arg) data = Data() data.symdict = symdict v = _GetCellVars(data) for gen in gens: v.visit(gen.ast) return list(data.objset) cla...
foreni-packages/urwid
examples/asyncio_socket_server.py
"""Demo of using urwid with Python 3.4's asyncio. This code works on older Python 3.x if you install `asyncio` from PyPI, and even Python 2 if you install `trollius`! """ from __future__ import print_function import asyncio from datetime import datetime import sys import weakref import urwid from urwid.raw_display i...
LLNL/spack
lib/spack/spack/test/llnl/util/tty/tty.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os import pytest import llnl.util.tty as tty def test_get_timestamp(monkeypatch): """Ensure the results of ...
baoboa/Crystal-Space
scripts/python/tutorial2.py
#!/usr/bin/env python """ CsPython Tutorial Example 2 By Mark Gossage (mark@gossage.cjb.net) A pure-Python script to show the use of Crystal Space. To use this, ensure that your PYTHONPATH, CRYSTAL, and LD_LIBRARY_PATH (or DYLD_LIBRARY_PATH for MacOS/X; or PATH for Windows) variables are set approrpriately, and then ...
srajag/nova
nova/virt/baremetal/pxe.py
# Copyright 2012,2014 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 NTT DOCOMO, 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 # # ...
cloudbase/cinder
cinder/tests/unit/volume/drivers/emc/vnx/test_client.py
# Copyright (c) 2016 EMC Corporation, 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 ap...
wileeam/airflow
tests/providers/apache/spark/operators/test_spark_submit.py
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
Juniper/neutron
neutron/plugins/vmware/plugins/service.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 VMware, 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/lic...
CropCircleSys/bsd-cloudinit
cloudbaseinit/metadata/services/ec2service.py
# Copyright 2014 Cloudbase Solutions Srl # Copyright 2012 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 # # ...
frankchin/mezzanine
mezzanine/generic/fields.py
from __future__ import division, unicode_literals from future.builtins import str from copy import copy from django.contrib.contenttypes.fields import GenericRelation from django.core.exceptions import ImproperlyConfigured, AppRegistryNotReady from django.db.models import IntegerField, CharField, FloatField from djan...
e-gob/plataforma-kioscos-autoatencion
scripts/ansible-play/.venv/lib/python2.7/site-packages/paramiko/dsskey.py
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 2.1 of the License, or (a...
securestate/king-phisher
king_phisher/client/tabs/campaign.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # king_phisher/client/tabs/campaign.py # # 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 # not...
mxOBS/deb-pkg_trusty_chromium-browser
v8/tools/push-to-trunk/bump_up_version.py
#!/usr/bin/env python # Copyright 2014 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Script for auto-increasing the version on bleeding_edge. The script can be run regularly by a cron job. It will increase the bui...
ProgVal/Limnoria-test
plugins/Alias/test.py
# -*- coding: utf8 -*- ### # Copyright (c) 2002-2004, Jeremiah Fincher # 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...
arocchi/Klampt
Python/control/roscontroller.py
"""This controller accepts ROS JointTrajectory messages from the ROS topic '/[robot_name]/joint_trajectory' and writes out JointState messages to the ROS topic '/[robot_name]/joint_state'. It also acts as a ROS clock server. """ import controller import rospy from klampt.trajectory import Trajectory,HermiteTrajectory...
filippog/pysnmp
pysnmp/entity/rfc3413/ntfrcv.py
# # This file is part of pysnmp software. # # Copyright (c) 2005-2016, Ilya Etingof <ilya@glas.net> # License: http://pysnmp.sf.net/license.html # import sys from pyasn1.compat.octets import null from pysnmp.proto import rfc3411, error from pysnmp.proto.api import v1, v2c # backend is always SMIv2 compliant from pysnm...
IsmoilovMuhriddin/allgo
opencv_samples/color_histogram.py
#!/usr/bin/env python ''' Video histogram sample to show live histogram of video Keys: ESC - exit ''' import numpy as np import cv2 # built-in modules import sys # local modules import video if __name__ == '__main__': hsv_map = np.zeros((180, 256, 3), np.uint8) h, s = np.indices(hsv_map.shape[:2]...
tarikfayad/trelby
src/locations.py
import mypickle import util # manages location-information for a single screenplay. a "location" is a # single place that can be referred to using multiple scene names, e.g. # INT. MOTEL ROOM - DAY # INT. MOTEL ROOM - DAY - 2 HOURS LATER # INT. MOTEL ROOM - NIGHT class Locations: cvars = None def __init__(...
ChinaMassClouds/copenstack-server
openstack/src/nova-2014.2/nova/virt/ovirt/firewall.py
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in complianc...