repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
ChanduERP/odoo
addons/l10n_sg/__openerp__.py
331
2380
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Tech Receptives (<http://techreceptives.com>). # # This program is free software: you can redistribute it and/or modify # it under the te...
agpl-3.0
lmorchard/django
django/contrib/gis/geos/collections.py
292
4986
""" This module houses the Geometry Collection objects: GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon """ import json from ctypes import byref, c_int, c_uint from django.contrib.gis.geos import prototypes as capi from django.contrib.gis.geos.geometry import ( GEOSGeometry, ProjectInterpolateM...
bsd-3-clause
Intel-tensorflow/tensorflow
tensorflow/python/compiler/tensorrt/test/int32_test.py
6
3326
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
enitihas/SAC-Website
venv/bin/venv/lib/python2.7/site-packages/setuptools/command/test.py
363
6471
from distutils.errors import DistutilsOptionError from unittest import TestLoader import unittest import sys from pkg_resources import (resource_listdir, resource_exists, normalize_path, working_set, _namespace_packages, add_activation_listener, require, EntryPoint...
apache-2.0
maralla/completor.vim
tests/conftest.py
1
2190
# -*- coding: utf-8 -*- import os import sys import pytest import mock from copy import deepcopy class VimError(Exception): pass class List(object): pass class Vars(dict): def __set__(self, inst, value): if not value: inst._vars = deepcopy(self) inst._vars.update(value) ...
mit
Arcanemagus/plexpy
lib/urllib3/util/request.py
205
3705
from __future__ import absolute_import from base64 import b64encode from ..packages.six import b, integer_types from ..exceptions import UnrewindableBodyError ACCEPT_ENCODING = 'gzip,deflate' _FAILEDTELL = object() def make_headers(keep_alive=None, accept_encoding=None, user_agent=None, basic_auth=...
gpl-3.0
quodlibet/mutagen
mutagen/oggopus.py
1
5334
# Copyright (C) 2012, 2013 Christoph Reiter # # 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. """Read and write Ogg Op...
gpl-2.0
kun--hust/SDSCloud
swift/container/replicator.py
8
11266
# Copyright (c) 2010-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 agree...
apache-2.0
xzturn/tensorflow
tensorflow/python/tpu/tensor_tracer_report.py
4
16807
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
pbs/django-filer
filer/utils/generate_filename.py
1
1841
import datetime import os import filer from filer.utils.files import get_valid_filename from django.core.files.uploadedfile import UploadedFile from django.utils.encoding import smart_str def by_date(instance, filename): datepart = str(datetime.datetime.now().strftime(smart_str("%Y/%m/%d"))) return os.path....
bsd-3-clause
amith01994/intellij-community
python/helpers/pydev/pydev_monkey.py
32
16142
import os import sys import pydev_log import traceback pydev_src_dir = os.path.dirname(__file__) from pydevd_constants import xrange def is_python(path): if path.endswith("'") or path.endswith('"'): path = path[1:len(path)-1] filename = os.path.basename(path).lower() for name in ['python', 'jytho...
apache-2.0
caedesvvv/zmqproto
zmqproto/zrenode.py
5
1512
from twisted.internet import reactor from twisted.internet.protocol import DatagramProtocol from twisted.internet.task import LoopingCall from zmqproto.zre import ZreProtocol from socket import SOL_SOCKET, SO_BROADCAST class ZreNode(DatagramProtocol): def __init__(self, ipaddr, peer_cb=None): self.proto =...
agpl-3.0
PennyDreadfulMTG/Penny-Dreadful-Tools
decksite/charts/chart.py
1
2940
import os.path import pathlib from typing import Dict import matplotlib as mpl # This has to happen before pyplot is imported to avoid needing an X server to draw the graphs. # pylint: disable=wrong-import-position mpl.use('Agg') import matplotlib.pyplot as plt import seaborn as sns from decksite.data import deck fro...
gpl-3.0
toabctl/osc
osc/util/rpmquery.py
8
11796
from __future__ import print_function import os import re import struct from . import packagequery class RpmError(packagequery.PackageError): pass class RpmHeaderError(RpmError): pass class RpmHeader: """corresponds more or less to the indexEntry_s struct""" def __init__(self, offset, length): ...
gpl-2.0
ganeshnalawade/ansible-modules-core
cloud/amazon/rds.py
9
44390
#!/usr/bin/python # 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 distributed...
gpl-3.0
Aleks31/pychess
lib/pychess/Players/ICPlayer.py
20
10779
from collections import defaultdict from pychess.compat import Queue from pychess.Players.Player import Player, PlayerIsDead, TurnInterrupt from pychess.Utils.Move import parseSAN, toAN from pychess.Utils.lutils.lmove import ParsingError from pychess.Utils.Offer import Offer from pychess.Utils.const import * from pych...
gpl-3.0
alexmogavero/home-assistant
homeassistant/components/device_tracker/cisco_ios.py
6
5037
""" Support for Cisco IOS Routers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.cisco_ios/ """ import logging from datetime import timedelta import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassista...
apache-2.0
emakis/erpnext
erpnext/selling/doctype/product_bundle/product_bundle.py
58
1444
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document class ProductBundle(Document): def autoname(self): self.name = self....
gpl-3.0
jesseditson/rethinkdb
test/interface/permanently_remove.py
27
9398
#!/usr/bin/env python # Copyright 2010-2014 RethinkDB, all rights reserved. from __future__ import print_function import os, socket, sys, time startTime = time.time() sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) import driver, scenario_common, utils, vcoptparse...
agpl-3.0
prisae/pelican-plugins
gist_directive/gist_directive.py
59
2020
try: from urllib.request import urlopen except ImportError: from urllib import urlopen import os import io from docutils.parsers.rst import directives from pelican.rstdirectives import Pygments def fetch(gid, filename, typ): if not os.path.exists('.gists'): os.mkdir('.gists') key = os.path.jo...
agpl-3.0
camradal/ansible
lib/ansible/modules/network/panos/panos_restart.py
32
3035
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.com> # # 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 publish...
gpl-3.0
mozilla/zamboni
mkt/tags/models.py
5
2426
from django.db import models from django.core.urlresolvers import NoReverseMatch, reverse import mkt from mkt.site.models import ManagerBase, ModelBase from mkt.site.utils import sorted_groupby class TagManager(ManagerBase): def not_blocked(self): """Get allowed tags only""" return self.filter(b...
bsd-3-clause
MiltosD/CEFELRC
lib/python2.7/site-packages/unidecode/x0b7.py
253
4833
data = ( 'ddwim', # 0x00 'ddwib', # 0x01 'ddwibs', # 0x02 'ddwis', # 0x03 'ddwiss', # 0x04 'ddwing', # 0x05 'ddwij', # 0x06 'ddwic', # 0x07 'ddwik', # 0x08 'ddwit', # 0x09 'ddwip', # 0x0a 'ddwih', # 0x0b 'ddyu', # 0x0c 'ddyug', # 0x0d 'ddyugg', # 0x0e 'ddyugs', # 0x0f 'dd...
bsd-3-clause
alexlo03/ansible
test/units/modules/network/f5/test_bigip_ssl_certificate.py
5
4786
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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 import os import json import sys from nose.plugins.skip import SkipTest i...
gpl-3.0
jeongchanKim/TizenRT
tools/ttrace_parser/ttrace_tinyara.py
10
8277
#!/usr/bin/python ########################################################################### # # Copyright (c) 2017 The Chromium Authors. All rights reserved. # Copyright 2017 Samsung Electronics All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except...
apache-2.0
HydrelioxGitHub/home-assistant
homeassistant/components/climate/zhong_hong.py
3
7171
""" Support for ZhongHong HVAC Controller. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/climate.zhong_hong/ """ import logging import voluptuous as vol from homeassistant.components.climate import ClimateDevice, PLATFORM_SCHEMA from homeassistant.com...
apache-2.0
yencarnacion/jaikuengine
vendor/gdata/spreadsheet/service.py
10
16755
#!/usr/bin/python # # Copyright (C) 2007 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 ...
apache-2.0
vitaly4uk/django
tests/template_tests/test_response.py
199
14388
from __future__ import unicode_literals import pickle import time from datetime import datetime from django.conf import settings from django.template import Context, engines from django.template.response import ( ContentNotRenderedError, SimpleTemplateResponse, TemplateResponse, ) from django.test import ( Re...
bsd-3-clause
pombredanne/django-linkcheck
linkcheck/management/commands/checkexternal.py
7
1427
from optparse import make_option from django.core.management.base import BaseCommand from linkcheck.utils import check_links from linkcheck.linkcheck_settings import EXTERNAL_RECHECK_INTERVAL from linkcheck.linkcheck_settings import MAX_CHECKS_PER_RUN class Command(BaseCommand): option_list = BaseCommand.option_l...
bsd-3-clause
andrewleech/SickRage
lib/twilio/rest/resources/ip_messaging/roles.py
23
1939
from twilio.rest.resources import NextGenInstanceResource, NextGenListResource class Role(NextGenInstanceResource): def update(self, permission, **kwargs): """ Updates this Role instance :param permission: Role permission :return: Updated instance """ kwargs['permi...
gpl-3.0
twiest/openshift-tools
openshift/installer/vendored/openshift-ansible-3.9.14-1/roles/lib_openshift/library/oc_serviceaccount.py
7
60950
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
apache-2.0
kustodian/ansible
test/units/modules/network/fortios/test_fortios_system_replacemsg_alertmail.py
21
8539
# Copyright 2019 Fortinet, Inc. # # 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 the...
gpl-3.0
postlund/home-assistant
homeassistant/components/mysensors/climate.py
3
6899
"""MySensors platform that offers a Climate (MySensors-HVAC) component.""" from homeassistant.components import mysensors from homeassistant.components.climate import ClimateDevice from homeassistant.components.climate.const import ( ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW, DOMAIN, HVAC_MODE_AUTO, ...
apache-2.0
FireBladeNooT/Medusa_1_6
lib/unidecode/x033.py
222
4556
data = ( 'apartment', # 0x00 'alpha', # 0x01 'ampere', # 0x02 'are', # 0x03 'inning', # 0x04 'inch', # 0x05 'won', # 0x06 'escudo', # 0x07 'acre', # 0x08 'ounce', # 0x09 'ohm', # 0x0a 'kai-ri', # 0x0b 'carat', # 0x0c 'calorie', # 0x0d 'gallon', # 0x0e 'gamma', # 0x0f 'gig...
gpl-3.0
Jonekee/chromium.src
third_party/typ/typ/tests/test_case_test.py
84
1908
# Copyright 2014 Dirk Pranke. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
bsd-3-clause
jayzeng/pyes
tests/test_aggs.py
5
5828
# -*- coding: utf-8 -*- from __future__ import absolute_import import unittest from pyes.tests import ESTestCase from pyes.aggs import MissingAgg, MinAgg, MaxAgg, NestedAgg, ReverseNestedAgg from pyes.query import MatchAllQuery import datetime class AggsSearchTestCase(ESTestCase): def setUp(self): super(Ag...
bsd-3-clause
caseyc37/pygame_cffi
test/test_utils/run_tests.py
2
12181
#################################### IMPORTS ################################## if __name__ == '__main__': import sys sys.exit("This module is for import only") test_pkg_name = '.'.join(__name__.split('.')[0:-2]) is_pygame_pkg = test_pkg_name == 'pygame.tests' if is_pygame_pkg: from pygame.tests import te...
lgpl-2.1
jeongarmy/TizenRT
external/protobuf/python/stubout.py
671
4940
#!/usr/bin/python2.4 # # Copyright 2008 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 o...
apache-2.0
zephirefaith/AI_Fall15_Assignments
A2/lib/networkx/algorithms/bipartite/centrality.py
76
8139
#-*- coding: utf-8 -*- # Copyright (C) 2011 by # Jordi Torrents <jtorrents@milnou.net> # Aric Hagberg <hagberg@lanl.gov> # All rights reserved. # BSD license. import networkx as nx __author__ = """\n""".join(['Jordi Torrents <jtorrents@milnou.net>', 'Aric Hagberg (hagberg@lan...
mit
CallaJun/hackprince
indico/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality_subset.py
75
7708
#!/usr/bin/env python from nose.tools import * from nose import SkipTest import networkx from nose.plugins.attrib import attr from networkx import edge_current_flow_betweenness_centrality \ as edge_current_flow from networkx import edge_current_flow_betweenness_centrality_subset \ as edge_current_flow_subset ...
lgpl-3.0
BoltzmannBrain/nupic.research
tests/sensorimotor/integration/spatial_pooler_monitor_mixin_test.py
4
4555
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a sepaself.rate license for this software code, the # following terms and condit...
agpl-3.0
hgiemza/DIRAC
WorkloadManagementSystem/Service/WMSAdministratorHandler.py
2
26612
""" This is a DIRAC WMS administrator interface. It exposes the following methods: Site mask related methods: setMask(<site mask>) getMask() Access to the pilot data: getWMSStats() """ from tempfile import mkdtemp import shutil from DIRAC.Core.DISET.RequestHandler import RequestHandler from DIRAC impor...
gpl-3.0
robertsj/poropy
poropy/coretools/laban.py
1
9241
''' Created on Dec 11, 2011 @author: robertsj ''' from evaluator import Evaluator import numpy as np import os class Laban(Evaluator): """ Uses the LABAN-PEL code to evaluate loading patterns. """ # Public Interface def __init__(self, rank=0) : """ Constructor Parameter...
mit
mogoweb/chromium-crosswalk
native_client_sdk/src/build_tools/tests/sdktools_config_test.py
160
1609
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import os import unittest SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) BUILD_TOOLS_DIR = os.path.dirname(SCRI...
bsd-3-clause
ztemt/Z5_H112_kernel
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
1935
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
gpl-2.0
james-d-mitchell/libsemigroups-python-bindings
tests/test_semifp.py
1
10732
# pylint: disable = C0103,E0611,C0111,W0104,R0201 import unittest import sys import os from semigroups import FpSemigroup, FpMonoid path = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) if path not in sys.path: sys.path.insert(1, path) del path class TestFpSemigroup(unittest.TestCase): def tes...
gpl-3.0
opennode/nodeconductor-saltstack
src/nodeconductor_saltstack/exchange/cost_tracking.py
1
1101
from nodeconductor.cost_tracking import CostTrackingStrategy, CostTrackingRegister, ConsumableItem from . import models class ExchangeTenantStrategy(CostTrackingStrategy): resource_class = models.ExchangeTenant class Types(object): SUPPORT = 'support' STORAGE = 'storage' class Keys(obje...
mit
tectronics/arsenalsuite
cpp/lib/PyQt4/examples/designer/plugins/python/datetimeeditplugin.py
20
4425
#============================================================================# # Designer plugins for PyDateEdit and PyDateTimeEdit # #----------------------------------------------------------------------------# # Copyright (c) 2008 by Denviso GmbH, <ulrich.berning@denviso.de> # # ...
gpl-2.0
kartoza/geonode
scripts/misc/create_full_geonode_db.py
2
4627
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
inercia/evy
tests/stdlib/test_threading.py
1
1651
from evy import patcher from evy.patched import threading from evy.patched import thread from evy.patched import time # *NOTE: doesn't test as much of the threading api as we'd like because many of # the tests are launched via subprocess and therefore don't get patched patcher.inject('test.test_threading', ...
mit
2014c2g1/c2g1
exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/_threading_local.py
923
7410
"""Thread-local objects. (Note that this module provides a Python version of the threading.local class. Depending on the version of Python you're using, there may be a faster one available. You should always import the `local` class from `threading`.) Thread-local objects support the management of thread-local d...
gpl-2.0
PennartLoettring/Poettrix
rootfs/usr/lib/python3.4/test/test_buffer.py
80
158753
# # The ndarray object from _testbuffer.c is a complete implementation of # a PEP-3118 buffer provider. It is independent from NumPy's ndarray # and the tests don't require NumPy. # # If NumPy is present, some tests check both ndarray implementations # against each other. # # Most ndarray tests also check that memoryvi...
gpl-2.0
cetic/ansible
lib/ansible/modules/storage/netapp/na_cdot_user.py
9
10243
#!/usr/bin/python # (c) 2017, NetApp, Inc # 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.0', 'status': ['preview'], ...
gpl-3.0
ajdawson/windspharm
examples/iris/rws_example.py
1
2190
"""Compute Rossby wave source from the long-term mean flow. This example uses the iris interface. Additional requirements for this example: * iris (http://scitools.org.uk/iris/) * matplotlib (http://matplotlib.org/) * cartopy (http://scitools.org.uk/cartopy/) """ import warnings import cartopy.crs as ccrs import i...
mit
Johnetordoff/waterbutler
tests/providers/github/test_provider.py
1
45643
import pytest import io import os import copy import json import base64 import hashlib from http import client import aiohttpretty from waterbutler.core import streams from waterbutler.core import exceptions from waterbutler.core.path import WaterButlerPath from waterbutler.core.provider import build_url from water...
apache-2.0
tellesnobrega/sahara
sahara/plugins/cdh/deploy.py
2
1826
# 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...
apache-2.0
jpush/jbox
Server/venv/lib/python3.5/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py
1730
3405
"""A collection of modules for building different kinds of tree from HTML documents. To create a treebuilder for a new type of tree, you need to do implement several things: 1) A set of classes for various types of elements: Document, Doctype, Comment, Element. These must implement the interface of _base.treebuilders...
mit
jruiperezv/ANALYSE
common/djangoapps/session_inactivity_timeout/middleware.py
228
1981
""" Middleware to auto-expire inactive sessions after N seconds, which is configurable in settings. To enable this feature, set in a settings.py: SESSION_INACTIVITY_TIMEOUT_IN_SECS = 300 This was taken from StackOverflow (http://stackoverflow.com/questions/14830669/how-to-expire-django-session-in-5minutes) """ fro...
agpl-3.0
jdemel/gnuradio
gnuradio-runtime/python/gnuradio/gr/qa_tag_utils.py
3
3161
#!/usr/bin/env python # # Copyright 2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from __future__ import print_function from gnuradio import gr, gr_unittest import pmt class test_tag_utils (gr_unittest.TestCase): def setUp (self):...
gpl-3.0
andersonresende/django
tests/createsuperuser/tests.py
234
1928
from django.contrib.auth import models from django.contrib.auth.management.commands import changepassword from django.core.management import call_command from django.test import TestCase from django.utils.six import StringIO class MultiDBChangepasswordManagementCommandTestCase(TestCase): multi_db = True def ...
bsd-3-clause
ljwolf/pysal_core
libpysal/weights/_contW_lists.py
1
3800
from ..cg.shapes import Polygon import itertools as it from sys import version_info import collections QUEEN = 1 ROOK = 2 if version_info[0] == 2: zip = it.izip range = xrange __author__ = "Jay Laura jlaura@asu.edu" def _get_verts(pgon): if isinstance(pgon, Polygon): return pgon.vertices else:...
bsd-3-clause
GroestlCoin/encompass
lib/paymentrequest_pb2.py
55
12540
# Generated by the protocol buffer compiler. DO NOT EDIT! from google.protobuf import descriptor from google.protobuf import message from google.protobuf import reflection from google.protobuf import descriptor_pb2 # @@protoc_insertion_point(imports) DESCRIPTOR = descriptor.FileDescriptor( name='paymentrequest.p...
gpl-3.0
liorvh/raspberry_pwn
src/pentest/sqlmap/plugins/generic/fingerprint.py
7
1726
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.common import Backend from lib.core.common import readInput from lib.core.data import logger from lib.core.enums import OS from lib.core.exception import SqlmapU...
gpl-3.0
vuntz/glance
glance/common/crypt.py
8
2645
#!/usr/bin/env python # Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE...
apache-2.0
madj4ck/ansible
plugins/inventory/vagrant.py
37
3660
#!/usr/bin/env python """ Vagrant external inventory script. Automatically finds the IP of the booted vagrant vm(s), and returns it under the host group 'vagrant' Example Vagrant configuration using this script: config.vm.provision :ansible do |ansible| ansible.playbook = "./provision/your_playbook.yml" ...
gpl-3.0
caperren/Archives
OSU Coursework/ROB 421 - Applied Robotics/software/windows_packages/denso_slave/Framework/arm_control_receiver.py
1
9085
##################################### # Imports ##################################### # Python native imports from PyQt5 import QtCore, QtWidgets import pythoncom import win32com.client from time import time import socket import json ##################################### # Global Variables ############################...
gpl-3.0
chainer/chainer
tests/chainer_tests/functions_tests/connection_tests/test_convolution_2d.py
3
14148
import unittest import numpy import chainer from chainer.backends import cuda import chainer.functions as F from chainer import testing from chainer.testing import attr from chainer.testing import backend @testing.parameterize(*(testing.product({ 'contiguous': ['C', None], 'cover_all': [True, False], 'x...
mit
restran/web-proxy
settings.py
2
2822
# -*- coding: utf-8 -*- # Created on 2014/11/13 from __future__ import unicode_literals __author__ = 'restran' import logging class BackendSite(): """ 后端站点的配置信息 """ # 是否启用内容替换 enable_filter = True def __init__(self, name, url, netloc, filter_rules): self.name = name # 完整的URL...
gpl-2.0
ivaano/zato
code/zato-server/test/zato/server/pickup/test__init__.py
6
1916
# -*- coding: utf-8 -*- """ Copyright (C) 2013 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib import os from tempfile import NamedTemporaryFile from unittest import T...
gpl-3.0
lisael/pg-django
tests/regressiontests/logging_tests/tests.py
25
8053
from __future__ import with_statement import copy from django.conf import compat_patch_logging_config from django.core import mail from django.test import TestCase, RequestFactory from django.test.utils import override_settings from django.utils.log import CallbackFilter, RequireDebugFalse, getLogger # logging con...
bsd-3-clause
hainn8x/gnuradio
gr-filter/examples/gr_filtdes_live_upd.py
47
3111
#!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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) # ...
gpl-3.0
DataDog/brod
brod/base.py
1
32420
import binascii import logging import struct import time import sys, traceback from cStringIO import StringIO from collections import namedtuple from datetime import datetime from functools import partial __all__ = [ 'KafkaError', 'ConnectionFailure', 'OffsetOutOfRange', 'InvalidMessageCode', 'Wron...
mit
Johannes-Sahlmann/linearfit
distribute_setup.py
34
17319
#!python """Bootstrap distribute installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from distribute_setup import use_setuptools use_setuptools() If you want to require a specific version of se...
lgpl-3.0
satori99/three.js
utils/exporters/blender/addons/io_three/exporter/object.py
19
6762
from .. import constants, logger from . import base_classes, api class Object(base_classes.BaseNode): """Class that wraps an object node""" def __init__(self, node, parent=None, type=None): logger.debug("Object().__init__(%s)", node) base_classes.BaseNode.__init__(self, node, parent=parent, ty...
mit
mdrumond/tensorflow
tensorflow/python/layers/core.py
6
16103
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
BonexGu/Blik2D-SDK
Blik2D/addon/tensorflow-1.2.1_for_blik/tensorflow/contrib/keras/python/keras/regularizers_test.py
55
2781
# 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...
mit
gkulkarni/JetMorphology
fitjet_3d.py
1
5370
""" File: fitjet_3d.py Fits a geometric model to mock jet data. Uses image subtraction; otherwise same as fitjet.py """ import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib import cm import scipy.optimize as op import emcee import triangle import sys # These mock data are pr...
mit
premanandchandrasekar/boto
boto/dynamodb/condition.py
185
3881
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 ...
mit
dsfsdgsbngfggb/odoo
openerp/report/render/rml2pdf/customfonts.py
261
3493
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 P. Christeas, Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2013 OpenERP SA. (http://www.openerp.com) # # This program is free so...
agpl-3.0
neocogent/electrum
electrum/json_db.py
2
28777
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2015 Thomas Voegtlin # # 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...
mit
txemagon/1984
modules/Telegram-bot-python/telegram/callbackgame.py
3
1054
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
gpl-3.0
RaspberryPiFi/CloudCode
handlers/api.py
1
5836
"""api.py: handles API requests""" __author__ = "Tom Hanson" __copyright__ = "Copyright 2014" __credits__ = ["Tom Hanson"] __license__ = "GPL" __maintainer__ = "Tom Hanson" __email__ = "tom@aporcupine.com" import json from google.appengine.api import memcache from google.appengine.ext import ndb import models from...
gpl-2.0
xiaoyaozi5566/GEM5_DRAMSim2
src/arch/x86/isa/insts/x87/control/__init__.py
91
2495
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
mupi/timtec
core/templatetags/usergroup.py
8
1920
# https://djangosnippets.org/snippets/2566/ from django import template from django.template import resolve_variable, NodeList from django.contrib.auth.models import Group register = template.Library() @register.tag() def ifusergroup(parser, token): """ Check to see if the currently logged in user belongs to a ...
agpl-3.0
hhatto/autopep8
test/suite/E12.py
13
6766
#: E121 print "E121", ( "dent") #: E122 print "E122", ( "dent") #: E123 my_list = [ 1, 2, 3, 4, 5, 6, ] #: E124 print "E124", ("visual", "indent_two" ) #: E124 print "E124", ("visual", "indent_five" ) #: E124 a = (123, ) #: E129 if (row < 0 or self.moduleCount <...
mit
LeartS/odoo
addons/sale/res_partner.py
94
1964
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
intel-ctrlsys/actsys
oobrestserver/oobrestserver/test/test_auth_server.py
1
2251
# -*- coding: utf-8 -*- # # Copyright (c) 2016-2017 Intel Corp. # import os import sys import base64 import uuid from cherrypy.test import helper from oobrestserver.Application import Application from oobrestserver.Authenticator import Authenticator class TestServer(helper.CPWebCase): app = None @staticm...
apache-2.0
Svjard/presto-admin
prestoadmin/workers.py
1
3726
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
tedder/ansible
lib/ansible/plugins/callback/full_skip.py
74
2498
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' ...
gpl-3.0
dkubiak789/OpenUpgrade
addons/l10n_be_coda/l10n_be_coda.py
63
3843
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
agpl-3.0
BPI-SINOVOIP/BPI-Mainline-kernel
toolchains/gcc-linaro-7.3.1-2018.05-x86_64_arm-linux-gnueabihf/share/gdb/system-gdbinit/elinos.py
10
3080
# Copyright (C) 2011-2018 Free Software Foundation, Inc. # 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 progr...
gpl-2.0
chand3040/cloud_that
openedx/core/djangoapps/credit/migrations/0007_auto__add_field_creditprovider_enable_integration__chg_field_creditpro.py
84
11967
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing unique constraint on 'CreditProvider', fields ['provider_url'] ...
agpl-3.0
Luthaf/Chemharp-python
chemfiles/trajectory.py
2
7109
# -*- coding=utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals from ctypes import c_uint64, c_char_p import sys from .utils import CxxPointer, _call_with_growing_buffer from .frame import Frame, Topology from .misc import ChemfilesError # Python 2 compatibility if sys.hexversion >= 0x...
mpl-2.0
mikewiebe-ansible/ansible
lib/ansible/modules/network/skydive/skydive_edge.py
38
4950
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2019, Ansible by Red Hat, inc # 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', ...
gpl-3.0
ThomasBollmeier/GObjectCreator2
src/gobjcreator2/output/sections.py
1
2533
# # Copyright 2011 Thomas Bollmeier # # This file is part of GObjectCreator2. # # GObjectCreator2 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 late...
gpl-3.0
stanbellcom/webapp_politik
sites/all/modules/annotator/lib/store-plugin/pyenv/lib/python2.7/site-packages/jinja2/lexer.py
178
26111
# -*- coding: utf-8 -*- """ jinja2.lexer ~~~~~~~~~~~~ This module implements a Jinja / Python combination lexer. The `Lexer` class provided by this module is used to do some preprocessing for Jinja. On the one hand it filters out invalid operators like the bitshift operators we don't allow...
gpl-2.0
Centre-Alt-Rendiment-Esportiu/att
old_project/Python/win_libs/serial/sermsdos.py
159
5848
# sermsdos.py # # History: # # 3rd September 2002 Dave Haynes # 1. First defined # # Although this code should run under the latest versions of # Python, on DOS-based platforms such as Windows 95 and 98, # it has been specifically written to be compatible with # PyDOS, available at: # http://ww...
gpl-3.0
daviddao/luminosity
sklearn-server/flask/lib/python2.7/site-packages/pip/_vendor/lockfile/mkdirlockfile.py
478
3098
from __future__ import absolute_import, division import time import os import sys import errno from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout, AlreadyLocked) class MkdirLockFile(LockBase): """Lock file by creating a directory.""" def __init__(self, path, threaded=True, ...
bsd-3-clause
donutmonger/youtube-dl
youtube_dl/extractor/teamcoco.py
114
6633
# -*- coding: utf-8 -*- from __future__ import unicode_literals import base64 import binascii import re import json from .common import InfoExtractor from ..utils import ( ExtractorError, qualities, determine_ext, ) from ..compat import compat_ord class TeamcocoIE(InfoExtractor): _VALID_URL = r'http...
unlicense
skoslowski/gnuradio
gnuradio-runtime/examples/network/audio_source.py
3
1864
#!/usr/bin/env python # # Copyright 2006,2007,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # from __future__ import unicode_literals from gnuradio import gr from gnuradio import blocks from argparse import ArgumentParser import sys try: fro...
gpl-3.0