repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
netscaler/neutron
neutron/tests/unit/test_policy.py
8
23444
# Copyright (c) 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...
apache-2.0
joelthelion/autojump
tests/unit/autojump_utils_test.py
6
3982
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import mock import pytest sys.path.append(os.path.join(os.getcwd(), 'bin')) # noqa import autojump_utils from autojump_utils import encode_local from autojump_utils import first from autojump_utils import get_tab_entry_info from autojump_utils import...
gpl-3.0
damonkohler/sl4a
python/src/Lib/lib2to3/tests/data/py2_test_grammar.py
51
30527
# Python 2's Lib/test/test_grammar.py (r66189) # Python test set -- part 1, grammar. # This just tests whether the parser accepts them all. # NOTE: When you run this test as a script from the command line, you # get warnings about certain hex/oct constants. Since those are # issued by the parser, you can't suppress ...
apache-2.0
bvisness/the-blue-alliance
cron_main.py
3
8426
#!/usr/bin/env python import webapp2 import tba_config from controllers.backup_controller import TbaCSVBackupEventsEnqueue, TbaCSVBackupEventDo, TbaCSVRestoreEventsEnqueue, TbaCSVRestoreEventDo from controllers.backup_controller import TbaCSVBackupTeamsEnqueue, TbaCSVBackupTeamsDo from controllers.datafeed_controlle...
mit
RonnyPfannschmidt/borg
src/borg/selftest.py
1
2950
""" Self testing module =================== The selftest() function runs a small test suite of relatively fast tests that are meant to discover issues with the way Borg was compiled or packaged and also bugs in Borg itself. These tests are a subset of the borg/testsuite and are run with Pythons built-in unittest, hen...
bsd-3-clause
dcroc16/skunk_works
google_appengine/lib/protorpc-1.0/protorpc/util.py
8
14626
#!/usr/bin/env python # # Copyright 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
mit
YesVideo/piggyphoto
piggyphoto/__init__.py
1
28733
# piggyphoto.py # Copyright (C) 2010 Alex Dumitrache # Based on: # - a small code example by Mario Boikov, http://pysnippet.blogspot.com/2009/12/when-ctypes-comes-to-rescue.html # - libgphoto2 Python bindings by David PHAM-VAN <david@ab2r.com> # - ctypes_gphoto2.py by Hans Ulrich Niedermann <gp@n-dimensional.de> impor...
mit
isnnn/Sick-Beard-TPB
lib/requests/packages/charade/gb2312prober.py
2994
1681
######################## 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. # # Con...
gpl-3.0
bratsche/Neutron-Drive
neutron-drive/django/conf/locale/nl/formats.py
329
3056
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' # '20 januari 2009' TIME_FORMAT = 'H:i' ...
bsd-3-clause
campbe13/openhatch
vendor/packages/sphinx/doc/conf.py
15
4196
# -*- coding: utf-8 -*- # # Sphinx documentation build configuration file import re import sphinx extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.todo', 'sphinx.ext.autosummary', 'sphinx.ext.extlinks'] master_doc = 'contents' templates_path = ['_templates'] exclude_patterns = ['_b...
agpl-3.0
computersalat/ansible
lib/ansible/module_utils/facts/system/fips.py
232
1338
# Determine if a system is in 'fips' mode # # 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. ...
gpl-3.0
openstack-hyper-v-python/numpy
numpy/polynomial/__init__.py
17
1136
""" A sub-package for efficiently dealing with polynomials. Within the documentation for this sub-package, a "finite power series," i.e., a polynomial (also referred to simply as a "series") is represented by a 1-D numpy array of the polynomial's coefficients, ordered from lowest order term to highest. For example, a...
bsd-3-clause
stitzelj/Ficlatte
django-bbcode-master/bbcode/util.py
3
3388
#!/usr/bin/env python # -*- coding: utf-8 -*- ## # django-bbcode: util.py ## import re import bbcode.settings def to_html(text, tags_alternative_definition={}, escape_html=True, method='disable', *tags): """ Convert a string with BBCode markup into its correspo...
agpl-3.0
martonw/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/test/main.py
120
10405
# Copyright (C) 2012 Google, Inc. # Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # n...
bsd-3-clause
josefschneider/switchboard
setup.py
1
2064
import sys import os from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand class PyTest(TestCommand): # `$ python setup.py test' installs minimal requirements and runs tests def finalize_options(self): TestCommand.finalize_options(self) self.test...
mit
MiniSEC/GRR_clone
lib/build.py
1
37732
#!/usr/bin/env python """Classes for handling build and repackaging of clients. This handles invocations for the build across the supported platforms including handling Visual Studio, pyinstaller and other packaging mechanisms. """ import cStringIO import logging import os import shutil import struct import subprocess...
apache-2.0
mchelem/cref2
cref/app/terminal.py
1
4737
#!/usr/bin/env python import os import argparse import logging import importlib import tempfile import subprocess import pandas from Bio import SeqIO from cref.app import BaseApp from cref.libs import rcsb logger = logging.getLogger('CReF') class TerminalApp(BaseApp): """ App to be run on the terminal ...
mit
ikegwukc/INFO597-DeepLearning-GameTheory
basicGames/strategies/deep_q_learning.py
1
18366
import random import math import tensorflow as tf import numpy as np from collections import deque class MLP(object): def __init__(self, input_sizes, hiddens, nonlinearities, scope=None, given_layers=None): self.input_sizes = input_sizes self.hiddens = hiddens self.input_nonlinearity, self...
mit
Juniper/tempest
tempest/lib/services/identity/v2/roles_client.py
2
4575
# 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...
apache-2.0
ScreamingUdder/mantid
Framework/PythonInterface/test/python/mantid/kernel/InstrumentInfoTest.py
3
1738
from __future__ import (absolute_import, division, print_function) import unittest from mantid.kernel import InstrumentInfo, ConfigService class InstrumentInfoTest(unittest.TestCase): def _get_test_instrument(self): facility = ConfigService.getFacility("ISIS") return facility.instrument("CRISP") ...
gpl-3.0
ilius/hazm
data.py
1
5329
# coding: utf8 from __future__ import print_function, unicode_literals import codecs, subprocess from collections import Counter from sklearn.cross_validation import train_test_split from hazm import * from hazm.Chunker import tree2brackets def create_words_file(dic_file='resources/persian.dic', output='hazm/data/wo...
mit
rodoviario/Tomb
extras/dismissed/qt/tombqt/ui_create.py
10
22605
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'create.ui' # # Created: Thu Nov 3 00:16:51 2011 # by: PyQt4 UI code generator 4.8.6 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attribut...
gpl-3.0
lihui7115/ChromiumGStreamerBackend
third_party/tlslite/tlslite/utils/rijndael.py
205
11056
# Authors: # Bram Cohen # Trevor Perrin - various changes # # See the LICENSE file for legal information regarding use of this file. # Also see Bram Cohen's statement below """ A pure python (slow) implementation of rijndael with a decent interface To include - from rijndael import rijndael To do a key setup - ...
bsd-3-clause
waseem18/oh-mainline
vendor/packages/html5lib/html5lib/tests/mockParser.py
74
1164
import sys import os if __name__ == '__main__': #Allow us to import from the src directory os.chdir(os.path.split(os.path.abspath(__file__))[0]) sys.path.insert(0, os.path.abspath(os.path.join(os.pardir, "src"))) from tokenizer import HTMLTokenizer class HTMLParser(object): """ Fake parser to test to...
agpl-3.0
pdellaert/ansible
test/units/modules/network/check_point/test_cp_mgmt_group.py
19
3888
# Ansible module to manage CheckPoint Firewall (c) 2019 # # 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 dist...
gpl-3.0
mavenlin/tensorflow
tensorflow/python/kernel_tests/bcast_ops_test.py
102
4542
# 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
anntzer/numpy
numpy/ma/__init__.py
17
1404
""" ============= Masked Arrays ============= Arrays sometimes contain invalid or missing data. When doing operations on such arrays, we wish to suppress invalid values, which is the purpose masked arrays fulfill (an example of typical use is given below). For example, examine the following array: >>> x = np.array(...
bsd-3-clause
leighpauls/k2cro4
tools/swarm_client/tests/isolateserver_archive_smoke_test.py
1
1956
#!/usr/bin/env python # Copyright (c) 2012 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 os import subprocess import sys import tempfile import time import unittest ROOT_DIR = os.path.dirname(os.path.dirname(os....
bsd-3-clause
tangyiyong/odoo
addons/hw_posbox_homepage/__openerp__.py
313
1691
# -*- 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
ewindisch/nova
nova/openstack/common/fixture/config.py
69
3062
# # Copyright 2013 Mirantis, Inc. # Copyright 2013 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/licen...
apache-2.0
an7oine/WinVHS
Cygwin/lib/python2.7/runpy.py
123
10698
"""runpy.py - locating and running Python code using the module namespace Provides support for locating and running Python scripts using the Python module namespace instead of the native filesystem. This allows Python code to play nicely with non-filesystem based PEP 302 importers when locating support scripts as wel...
gpl-3.0
zilantian/p2pool
p2pool/util/p2protocol.py
22
3674
''' Generic message-based protocol used by Bitcoin and P2Pool for P2P communication ''' import hashlib import struct from twisted.internet import protocol from twisted.python import log import p2pool from p2pool.util import datachunker, variable class TooLong(Exception): pass class Protocol(protocol.Protocol):...
gpl-3.0
Maspear/odoo
addons/lunch/tests/test_lunch.py
345
5045
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
yippeecw/sfa
sfa/client/common.py
2
3567
# a few utilities common to sfi and sfaadmin def optparse_listvalue_callback(option, opt, value, parser): former=getattr(parser.values,option.dest) if not former: former=[] # support for using e.g. sfi update -t slice -x the.slice.hrn -r none # instead of -r '' which is painful and does not pass well t...
mit
davidovich/pip
pip/commands/list.py
269
7251
from __future__ import absolute_import import logging from pip._vendor import pkg_resources from pip.basecommand import Command from pip.exceptions import DistributionNotFound from pip.index import FormatControl, fmt_ctl_formats, PackageFinder, Search from pip.req import InstallRequirement from pip.utils import get_...
mit
sookasa/heroku-buildpack-python-pipeline
vendor/distribute-0.6.34/setuptools/tests/test_sandbox.py
204
1724
"""develop tests """ import sys import os import shutil import unittest import tempfile from setuptools.sandbox import DirectorySandbox, SandboxViolation def has_win32com(): """ Run this to determine if the local machine has win32com, and if it does, include additional tests. """ if not sys.platfo...
mit
abhikumar22/MYBLOG
blg/Lib/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py
3133
82594
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
gpl-3.0
rspavel/spack
var/spack/repos/builtin/packages/minivite/package.py
5
1683
# 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 Minivite(MakefilePackage): """miniVite is a proxy application that implements a single pha...
lgpl-2.1
karthik-sethuraman/ONFOpenTransport
RI/flask_server/tapi_server/util.py
9
3385
import datetime import six import typing def _deserialize(data, klass): """Deserializes dict, list, str into an object. :param data: dict, list or str. :param klass: class literal, or string of class name. :return: object. """ if data is None: return None if klass in six.intege...
apache-2.0
w1z2g3/crossbar
crossbar/router/protocol.py
1
23832
##################################################################################### # # Copyright (C) Tavendo GmbH # # Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you # have purchased a commercial license), the license terms below apply. # # Should you enter into a separate licen...
agpl-3.0
RevanProdigalKnight/sublimetext-codeformatter
codeformatter/lib/htmlbeautifier/bs4/builder/_htmlparser.py
24
9102
"""Use the HTMLParser library to parse HTML files that aren't too bad.""" __all__ = [ 'HTMLParserTreeBuilder', ] from html.parser import HTMLParser try: from html.parser import HTMLParseError except ImportError as e: # HTMLParseError is removed in Python 3.5. Since it can never be # thrown in 3.5...
mit
CXQERP/ODOOERP
addons/account_voucher/invoice.py
382
2496
# -*- 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
vrv/tensorflow
tensorflow/python/framework/ops_test.py
3
64228
# 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
rg3/youtube-dl
youtube_dl/extractor/traileraddict.py
90
2692
from __future__ import unicode_literals import re from .common import InfoExtractor class TrailerAddictIE(InfoExtractor): _WORKING = False _VALID_URL = r'(?:https?://)?(?:www\.)?traileraddict\.com/(?:trailer|clip)/(?P<movie>.+?)/(?P<trailer_name>.+)' _TEST = { 'url': 'http://www.traileraddict.co...
unlicense
sonaht/ansible
lib/ansible/modules/files/template.py
10
5474
# this is a virtual module that is entirely implemented server side # 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 op...
gpl-3.0
california-civic-data-coalition/first-python-notebook
docs/conf.py
1
5717
# -*- coding: utf-8 -*- # # First Python Notebook documentation build configuration file, created by # sphinx-quickstart on Sat Feb 11 12:41:58 2017. # # 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 # autogenerat...
mit
2ndy/RaspIM
usr/lib/python2.7/ast.py
255
11805
# -*- coding: utf-8 -*- """ ast ~~~ The `ast` module helps Python applications to process trees of the Python abstract syntax grammar. The abstract syntax itself might change with each Python release; this module helps to find out programmatically what the current grammar looks like and allows...
gpl-2.0
uthaipon/SkillsWorkshop2017
Week03/PCA_aplied_to_ComputerHardware_data_set.py
2
4589
# -*- coding: utf-8 -*- """ Created on Tue Aug 1 13:28:49 2017 @author: Aster """ #========================================================================= # Preparing the Dataset #========================================================================= import pandas as pd df = pd.read_csv( filepath_or_buffer...
bsd-3-clause
hunch/hunch-gift-app
django/db/models/sql/query.py
9
79872
""" Create SQL statements for QuerySets. The code in here encapsulates all of the SQL construction so that QuerySets themselves do not have to (and could be backed by things other than SQL databases). The abstraction barrier only works one way: this module has to know all about the internals of models in order t...
mit
Timus1712/boto
boto/vpc/customergateway.py
3
1955
# Copyright (c) 2009-2010 Mitch Garnaat http://garnaat.org/ # # 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 use, copy, modi...
mit
wizztjh/three.js
utils/exporters/blender/addons/io_three/exporter/material.py
124
3600
from .. import constants, logger from . import base_classes, utilities, api class Material(base_classes.BaseNode): """Class that wraps material nodes""" def __init__(self, node, parent): logger.debug("Material().__init__(%s)", node) base_classes.BaseNode.__init__(self, node, parent, ...
mit
amith01994/intellij-community
python/lib/Lib/re.py
115
12726
# # Secret Labs' Regular Expression Engine # # re-compatible interface for the sre matching engine # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # This version of the SRE library can be redistributed under CNRI's # Python 1.6 license. For any other use, please contact Secret Labs # AB (info@py...
apache-2.0
xasos/3DSnap
3ds-shim/recv.py
1
1744
from flask import Flask, send_file import requests from PIL import Image app = Flask(__name__) api = 'http://159.203.98.104:3000/' @app.route('/recv/<username>') def recv(username): r = requests.post(api + 'get', data={'username': username, 'client': '3ds'}) j = r.json() print(j) left_img_name = down...
mit
s0lst1c3/eaphammer
local/hostapd-eaphammer/tests/hwsim/test_owe.py
1
24088
# Test cases for Opportunistic Wireless Encryption (OWE) # Copyright (c) 2017, Jouni Malinen <j@w1.fi> # # This software may be distributed under the terms of the BSD license. # See README for more details. import binascii import logging logger = logging.getLogger() import time import os import struct import hostapd ...
gpl-3.0
jeanparpaillon/pOCCI
pOCCI/render_uri.py
3
2743
import occi from render_base import Renderer, check_url class URIListRenderer(Renderer): """URI list OCCI Renderer Empty array is always returned as headers during rendering. """ def render_categories(self, categories): """Render OCCI Category collection This method can't be used in...
mit
thejordan95/Groovebot2
plugins/snopes.py
8
1065
import re from util import hook, http search_url = "http://search.atomz.com/search/?sp_a=00062d45-sp00000000" @hook.command def snopes(inp): """snopes <topic> -- Searches snopes for an urban legend about <topic>.""" search_page = http.get_html(search_url, sp_q=inp, sp_c="1") result_urls = search_page....
gpl-3.0
texastribune/the-dp
tx_highered/instachart/models.py
1
3596
from django.db import models NULL_DISPLAY = "&ndash;" class ChartCell(object): head_attrs = {} body_attrs = {} label = "" format = "%s" text = "" raw_text = "" def __init__(self, cls, fieldname, format=None): self.label = fieldname try: self.field = cls._meta...
apache-2.0
morpheby/levelup-by
common/djangoapps/student/management/commands/pearson_transfer.py
5
7607
from optparse import make_option import os from stat import S_ISDIR import boto from dogapi import dog_http_api, dog_stats_api import paramiko from django.conf import settings from django.core.management import call_command from django.core.management.base import BaseCommand, CommandError import django_startup dja...
agpl-3.0
onceuponatimeforever/oh-mainline
vendor/packages/jsmin/jsmin/test.py
17
7967
import unittest import jsmin import sys class JsTests(unittest.TestCase): def _minify(self, js): return jsmin.jsmin(js) def assertEqual(self, thing1, thing2): if thing1 != thing2: print(repr(thing1), repr(thing2)) raise AssertionError return True def as...
agpl-3.0
mcardillo55/django
django/middleware/locale.py
358
2983
"This is the locale selecting middleware that will look at accept headers" from django.conf import settings from django.core.urlresolvers import ( LocaleRegexURLResolver, get_resolver, get_script_prefix, is_valid_path, ) from django.http import HttpResponseRedirect from django.utils import translation from django....
bsd-3-clause
intgr/django-cms
cms/tests/nested_plugins.py
12
46802
# -*- coding: utf-8 -*- from __future__ import with_statement import json from djangocms_text_ckeditor.models import Text from cms.api import create_page, add_plugin from cms.constants import PLUGIN_MOVE_ACTION from cms.models import Page from cms.models.placeholdermodel import Placeholder from cms.models.pluginmodel...
bsd-3-clause
pratikmallya/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/sessions/backends/signed_cookies.py
288
2798
from django.conf import settings from django.core import signing from django.contrib.sessions.backends.base import SessionBase class SessionStore(SessionBase): def load(self): """ We load the data from the key itself instead of fetching from some external data store. Opposite of _get_ses...
apache-2.0
jamslevy/gsoc
app/django/contrib/gis/gdal/prototypes/generation.py
8
3695
""" This module contains functions that generate ctypes prototypes for the GDAL routines. """ from ctypes import c_char_p, c_double, c_int, c_void_p from django.contrib.gis.gdal.prototypes.errcheck import \ check_arg_errcode, check_errcode, check_geom, check_geom_offset, \ check_pointer, check_srs, check_str...
apache-2.0
kbroughton/ansible-modules-core
packaging/language/easy_install.py
198
6956
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Matt Wright <matt@nobien.net> # # 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...
gpl-3.0
SchrodingersGat/kicad-footprint-generator
scripts/Packages/TO_SOT_THT/TO_SOT_THT_generate.py
2
54660
#usr/bin/env python import sys import os import math import time # ensure that the kicad-footprint-generator directory is available #sys.path.append(os.environ.get('KIFOOTPRINTGENERATOR')) # enable package import from parent directory #sys.path.append("D:\hardware\KiCAD\kicad-footprint-generator") # enable package ...
gpl-3.0
jfoote/vulture
vlib/analyzers/reproducibility.py
1
2072
import json, logging, os, re, subprocess, shlex from tools import get_category_by_status log = logging.getLogger() meta_files = ['Disassembly', 'Stacktrace', 'Registers', 'SegvAnalysis', 'ProcMaps', "BootLog" , "CoreDump", "BootDmesg", "syslog", "UbiquityDebug.gz", "Casper.gz", "UbiquityPar...
mit
potassco/clingo
doc/py/_gen/gen.py
1
2705
#!/usr/bin/env python3 import os import re import importlib.machinery import pdoc import clingo SUB = [ ("clingo_main", "Application", clingo.clingo_main), ("Control.register_observer", "Observer", clingo.Control.register_observer), ("Control.register_propagator", "Propagator", clingo.Control.register_pr...
mit
kernel64/AutobahnPython
examples/wamp/dirwatch/server.py
9
1684
############################################################################### ## ## Copyright 2013 Tavendo GmbH ## ## 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-2.0
PourroyJean/performance_modelisation
script/data visualisation/venv/lib/python3.6/site-packages/pip/_vendor/packaging/markers.py
324
8230
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import operator import os import platform import sys from pip._vendor.pyp...
gpl-3.0
TuSimple/simpledet
config/FPG/faster_r50v1b_fpg6@256_syncbn_1x.py
1
8833
from symbol.builder import FasterRcnn as Detector from symbol.builder import ResNetV1bFPN as Backbone from symbol.builder import add_anchor_to_arg from models.FPG.builder import FPGNeckP2P6 as Neck from models.FPN.builder import FPNRpnHead as RpnHead from models.FPN.builder import FPNRoiAlign as RoiExtractor from model...
apache-2.0
h3biomed/ansible
lib/ansible/modules/cloud/alicloud/ali_instance_facts.py
10
14095
#!/usr/bin/python # Copyright (c) 2017 Alibaba Group Holding Limited. He Guimin <heguimin36@163.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of ...
gpl-3.0
eleonrk/SickRage
lib/sqlalchemy/testing/assertions.py
75
15418
# testing/assertions.py # Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from __future__ import absolute_import from . import util as testutil from sqla...
gpl-3.0
InsightSoftwareConsortium/ITKExamples
src/Core/Common/CreateAnImage/Code.py
1
1123
#!/usr/bin/env python # Copyright NumFOCUS # # 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.txt # # Unless required by applicable law or ...
apache-2.0
MediaSapiens/autonormix
django/contrib/localflavor/ro/ro_counties.py
428
1231
# -*- coding: utf-8 -*- """ A list of Romanian counties as `choices` in a formfield. This exists as a standalone file so that it's only imported into memory when explicitly needed. """ COUNTIES_CHOICES = ( ('AB', u'Alba'), ('AR', u'Arad'), ('AG', u'Argeş'), ('BC', u'Bacău'), ('BH', u'Bihor'), ...
bsd-3-clause
hanya/BookmarksMenu
pythonpath/bookmarks/migrate.py
1
9378
# Copyright 2012 Tsutomu Uchino # # 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 ...
apache-2.0
delta2323/chainer
chainer/functions/math/trigonometric.py
6
5416
import numpy from chainer import cuda from chainer import function from chainer import utils from chainer.utils import type_check class Sin(function.Function): @property def label(self): return 'sin' def check_type_forward(self, in_types): type_check.expect(in_types.size() == 1) ...
mit
def-/commandergenius
project/jni/python/src/Lib/collections.py
49
6086
__all__ = ['deque', 'defaultdict', 'namedtuple'] # For bootstrapping reasons, the collection ABCs are defined in _abcoll.py. # They should however be considered an integral part of collections.py. from _abcoll import * import _abcoll __all__ += _abcoll.__all__ from _collections import deque, defaultdict from operator ...
lgpl-2.1
DougBurke/astropy
astropy/nddata/nddata_withmixins.py
14
2222
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module implements a class based on NDData with all Mixins. """ from .nddata import NDData from .mixins.ndslicing import NDSlicingMixin from .mixins.ndarithmetic import NDArithmeticMixin from .mixins.ndio import NDIOMixin __all__ = ['NDDataRef...
bsd-3-clause
oVirt/ovirt-engine-sdk-tests
src/resource/hostresourcemanager.py
1
3156
# # Copyright (c) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
alexzatsepin/omim
3party/jansson/doc/ext/refcounting.py
95
1715
""" refcounting ~~~~~~~~~~~ Reference count annotations for C API functions. Has the same result as the sphinx.ext.refcounting extension but works for all functions regardless of the signature, and the reference counting information is written inline with the documentation instead of a sepa...
apache-2.0
zjuwangg/scrapy
extras/qpsclient.py
135
1531
""" A spider that generate light requests to meassure QPS troughput usage: scrapy runspider qpsclient.py --loglevel=INFO --set RANDOMIZE_DOWNLOAD_DELAY=0 --set CONCURRENT_REQUESTS=50 -a qps=10 -a latency=0.3 """ from scrapy.spiders import Spider from scrapy.http import Request class QPSSpider(Spider): na...
bsd-3-clause
ininex/geofire-python
resource/lib/python2.7/site-packages/click/utils.py
201
14916
import os import sys from .globals import resolve_color_default from ._compat import text_type, open_stream, get_filesystem_encoding, \ get_streerror, string_types, PY2, binary_streams, text_streams, \ filename_to_ui, auto_wrap_for_ansi, strip_ansi, should_strip_ansi, \ _default_text_stdout, _default_text...
mit
alrusdi/lettuce
tests/integration/lib/Django-1.3/django/db/backends/dummy/base.py
151
1998
""" Dummy database backend for Django. Django uses this if the database ENGINE setting is empty (None or empty string). Each of these API functions, except connection.close(), raises ImproperlyConfigured. """ from django.core.exceptions import ImproperlyConfigured from django.db.backends import * from django.db.back...
gpl-3.0
singh-pratyush96/tournament-udacity
tournament/tournament.py
1
10312
#!/usr/bin/env python # # tournament.py -- implementation of a Swiss-system tournament # import psycopg2 from random import shuffle def connect(): """ Connect to the PostgreSQL database. Returns a database connection and corresponding cursor. """ connection = psycopg2.connect("dbname=tournament"...
mit
Rosebotics/pymata-aio
examples/sparkfun_redbot/pixy/pixy_set_brightness.py
1
2302
#!/usr/bin/env python3 """ Just playing with changing the Pixy brightness setting. We strongly recommend you figure out an appropriate brightness value in PixyMon then use this command once to set the brightness to the value you found works well. """ from pymata_aio.pymata3 import PyMata3 from pymata_aio.pymata3 im...
gpl-3.0
dcroc16/skunk_works
google_appengine/lib/django-1.4/django/contrib/gis/geos/prototypes/__init__.py
314
1305
""" This module contains all of the GEOS ctypes function prototypes. Each prototype handles the interaction between the GEOS library and Python via ctypes. """ # Coordinate sequence routines. from django.contrib.gis.geos.prototypes.coordseq import (create_cs, get_cs, cs_clone, cs_getordinate, cs_setordinate, cs...
mit
devopshq/crosspm
crosspm/cpm.py
1
16409
#!/usr/bin/env python # -*- coding: utf-8 -*- """ {app_name} Usage: crosspm download [options] crosspm lock [DEPS] [DEPSLOCK] [options] crosspm usedby [DEPS] [options] crosspm pack <OUT> <SOURCE> [options] crosspm cache [size | age | clear [hard]] crosspm -h | --help crosspm --version Opti...
mit
printedheart/seastar
tests/memcached/test_memcached.py
25
22367
#!/usr/bin/env python3 # # This file is open source software, licensed to you under the terms # of the Apache License, Version 2.0 (the "License"). See the NOTICE file # distributed with this work for additional information regarding copyright # ownership. You may not use this file except in compliance with the Licen...
apache-2.0
amilaperera/google-diff-match-patch
python2/diff_match_patch_test.py
319
41744
#!/usr/bin/python2.4 """Test harness for diff_match_patch.py Copyright 2006 Google Inc. http://code.google.com/p/google-diff-match-patch/ 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://...
apache-2.0
nicobustillos/odoo
addons/payment_adyen/tests/test_adyen.py
378
4314
# -*- coding: utf-8 -*- from lxml import objectify import urlparse from openerp.addons.payment.models.payment_acquirer import ValidationError from openerp.addons.payment.tests.common import PaymentAcquirerCommon from openerp.addons.payment_adyen.controllers.main import AdyenController from openerp.osv.orm import exce...
agpl-3.0
beiko-lab/gengis
bin/Lib/site-packages/matplotlib/tri/trifinder.py
4
3221
from __future__ import print_function from matplotlib.tri import Triangulation import matplotlib._tri as _tri class TriFinder(object): """ Abstract base class for classes used to find the triangles of a Triangulation in which (x,y) points lie. Rather than instantiate an object of a class derived from...
gpl-3.0
MaTriXy/physical-web
web-service/tests.py
37
11736
#!/usr/bin/env python # # Copyright 2015 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
LyzardKing/ubuntu-make
tests/medium/test_baseinstaller.py
1
6208
# -*- coding: utf-8 -*- # Copyright (C) 2015 Canonical # # Authors: # Didier Roche # # 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; version 3. # # This program is distributed in the hope that ...
gpl-3.0
Lektorium-LLC/edx-platform
lms/djangoapps/teams/tests/factories.py
23
1230
"""Factories for testing the Teams API.""" from datetime import datetime from uuid import uuid4 import factory import pytz from factory.django import DjangoModelFactory from lms.djangoapps.teams.models import CourseTeam, CourseTeamMembership LAST_ACTIVITY_AT = datetime(2015, 8, 15, 0, 0, 0, tzinfo=pytz.utc) class...
agpl-3.0
caLew/sugartest
src/jarabe/frame/activitiestray.py
7
33146
# Copyright (C) 2006-2007 Red Hat, Inc. # Copyright (C) 2008 One Laptop Per Child # Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/> # # 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 Foundati...
gpl-2.0
zx8/youtube-dl
youtube_dl/extractor/washingtonpost.py
79
5626
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, strip_jsonp, ) class WashingtonPostIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?washingtonpost\.com/.*?/(?P<id>[^/]+)/(?:$|[?#])' _TESTS = [{ 'url': ...
unlicense
thaim/ansible
lib/ansible/module_utils/network/ios/config/lag_interfaces/lag_interfaces.py
19
11580
# # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The ios_lag_interfaces class It is in this file where the current configuration (as dict) is compared to the provided configuration (as dict) and the command set necessar...
mit
goddardl/gaffer
python/GafferTest/Transform2DPlugTest.py
2
4099
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Redistrib...
bsd-3-clause
rplauche/plugin.video.netflixbmc
resources/lib/pyasn1/codec/cer/encoder.py
226
3161
# CER encoder from pyasn1.type import univ from pyasn1.codec.ber import encoder from pyasn1.compat.octets import int2oct, null class BooleanEncoder(encoder.IntegerEncoder): def encodeValue(self, encodeFun, client, defMode, maxChunkSize): if client == 0: substrate = int2oct(0) else: ...
gpl-2.0
agry/NGECore2
scripts/mobiles/corellia/ragtag_blackjack.py
2
1818
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate...
lgpl-3.0