repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
dqnykamp/sympy
sympy/core/tests/test_exprtools.py
7
13472
"""Tests for tools for manipulating of large commutative expressions. """ from sympy import (S, Add, sin, Mul, Symbol, oo, Integral, sqrt, Tuple, I, Interval, O, symbols, simplify, collect, Sum, Basic, Dict, root, exp, cos, sin) from sympy.abc import a, b, t, x, y, z from sympy.co...
bsd-3-clause
panoptes/POCS
src/panoptes/pocs/mount/serial.py
1
7188
import re from abc import ABC from panoptes.utils import error from panoptes.utils import rs232 from panoptes.pocs.mount import AbstractMount class AbstractSerialMount(AbstractMount, ABC): def __init__(self, *args, **kwargs): """Initialize an AbstractSerialMount for the port defined in the config. ...
mit
crossroadchurch/paul
openlp/plugins/bibles/lib/csvbible.py
1
6989
# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 ############################################################################### # OpenLP - Open Source Lyrics Projection # # ------------------------------------------------------...
gpl-2.0
antin/Open-Knesset
suggestions/migrations/0001_initial.py
14
8743
# -*- 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 'Suggestion' db.create_table('suggestions_suggestion', ( ('id', self.gf('django.d...
bsd-3-clause
haveal/googleads-python-lib
examples/dfp/v201505/activity_group_service/create_activity_groups.py
4
2447
#!/usr/bin/python # # Copyright 2015 Google 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 b...
apache-2.0
jaraco/irc
irc/tests/test_client.py
1
1518
from unittest import mock import pytest import irc.client def test_version(): assert isinstance(irc._get_version(), str) @mock.patch('irc.connection.socket') def test_privmsg_sends_msg(socket_mod): server = irc.client.Reactor().server() server.connect('foo', 6667, 'bestnick') # make sure the mock ...
mit
wilsonssun/baseball-gamethread
build/lxml/build/lib.linux-i686-2.7/lxml/html/_diffcommand.py
93
2084
import optparse import sys import re import os from lxml.html.diff import htmldiff description = """\ """ parser = optparse.OptionParser( usage="%prog [OPTIONS] FILE1 FILE2\n" "%prog --annotate [OPTIONS] INFO1 FILE1 INFO2 FILE2 ...", description=description, ) parser.add_option( '-o', '--output',...
bsd-3-clause
kenshay/ImageScript
Script_Runner/PYTHON/Lib/ctypes/test/test_pointers.py
19
7239
import unittest, sys from ctypes import * import _ctypes_test ctype_types = [c_byte, c_ubyte, c_short, c_ushort, c_int, c_uint, c_long, c_ulong, c_longlong, c_ulonglong, c_double, c_float] python_types = [int, int, int, int, int, int, int, int, int, int, float, float] class PointersT...
gpl-3.0
arubdesu/EAs
priv_helpers.py
2
1327
#!/usr/bin/python """Given a whitelist of privHelpers from legit software, report on stuff to investigate.""" import os import glob def main(): """gimme some main""" allowed = ["com.barebones.authd", "com.bombich.ccc", "com.bombich.ccchelper", "com.box.sync.boots...
apache-2.0
justinpotts/mozillians
vendor-local/lib/python/unidecode/x09e.py
252
4615
data = ( 'Shu ', # 0x00 'Luo ', # 0x01 'Qi ', # 0x02 'Yi ', # 0x03 'Ji ', # 0x04 'Zhe ', # 0x05 'Yu ', # 0x06 'Zhan ', # 0x07 'Ye ', # 0x08 'Yang ', # 0x09 'Pi ', # 0x0a 'Ning ', # 0x0b 'Huo ', # 0x0c 'Mi ', # 0x0d 'Ying ', # 0x0e 'Meng ', # 0x0f 'Di ', # 0x10 'Yue ', ...
bsd-3-clause
yongshengwang/hue
build/env/lib/python2.7/site-packages/boto-2.38.0-py2.7.egg/boto/cloudsearch/layer2.py
153
3010
# 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...
apache-2.0
Pluto-tv/chromium-crosswalk
tools/telemetry/third_party/gsutilz/third_party/boto/boto/machinelearning/exceptions.py
127
1596
# Copyright (c) 2015 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 restriction, including # without limitation the rights ...
bsd-3-clause
ltiao/networkx
networkx/algorithms/flow/shortestaugmentingpath.py
56
10555
# -*- coding: utf-8 -*- """ Shortest augmenting path algorithm for maximum flow problems. """ __author__ = """ysitu <ysitu@users.noreply.github.com>""" # Copyright (C) 2014 ysitu <ysitu@users.noreply.github.com> # All rights reserved. # BSD license. from collections import deque import networkx as nx from .utils impo...
bsd-3-clause
mou4e/zirconium
chrome/test/chromedriver/test/webserver.py
68
6705
# Copyright 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 BaseHTTPServer import os import threading class Responder(object): """Sends a HTTP response. Used with TestWebServer.""" def __init__(self, han...
bsd-3-clause
pgmillon/ansible
test/sanity/pylint/plugins/deprecated.py
13
3853
# (c) 2018, Matt Martz <matt@sivel.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type from distutils.version import LooseVersion import astroid from pylint.in...
gpl-3.0
joelddiaz/openshift-tools
ansible/roles/lib_gcloud/build/src/gcloud_compute_label.py
10
5323
# pylint: skip-file # pylint: disable=too-many-instance-attributes class GcloudComputeLabel(GcloudCLI): ''' Class to wrap the gcloud compute images command''' # pylint allows 5 # pylint: disable=too-many-arguments def __init__(self, project, zone, lab...
apache-2.0
BT-ojossen/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/LoginTest.py
384
1320
######################################################################### # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gene...
agpl-3.0
creasyw/IMTAphy
documentation/doctools/branches/0.4.x/tests/etree13/ElementTree.py
4
51433
# # ElementTree # $Id: ElementTree.py 65372 2008-08-01 19:11:22Z georg.brandl $ # # light-weight XML support for Python 2.2 and later. # # history: # 2001-10-20 fl created (from various sources) # 2001-11-01 fl return root from parse method # 2002-02-16 fl sort attributes in lexical order # 2002-04-06 fl TreeBu...
gpl-2.0
cecep-edu/edx-platform
openedx/core/djangoapps/bookmarks/tests/test_views.py
7
20744
""" Tests for bookmark views. """ import ddt import json from nose.plugins.attrib import attr from unittest import skipUnless import urllib from django.conf import settings from django.core.urlresolvers import reverse from mock import patch from rest_framework.test import APIClient from xmodule.modulestore import Mo...
agpl-3.0
maellak/invenio
modules/miscutil/lib/upgrades/invenio_2012_12_05_oaiHARVEST_arguments_blob.py
19
2408
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2012 CERN. ## ## Invenio 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) a...
gpl-2.0
TvBMcMaster/pymeasure
pymeasure/instruments/thorlabs/thorlabspm100usb.py
2
4089
# # This file is part of the PyMeasure package. # # Copyright (c) 2013-2017 PyMeasure Developers # # 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 limit...
mit
antoniotre86/IERCT
ierct/baselines/metamap.py
1
1902
''' Created on 29 Dec 2014 @author: Antonio ''' from py4j.java_gateway import JavaGateway from py4j.protocol import Py4JNetworkError import re import os class Metamap: ''' classdocs ''' def __init__(self): ''' Constructor ''' self.genericObject = self._...
gpl-2.0
zxc2694/ov_test
program/pythonGUI/gui2.py
3
2440
################################################################################ # File name: gui.py # # Function: Display three data from stm32f4 using Python (matplotlib) # The three data is roll, pith, yall angle of quadcopter attitude. # # Reference:http://electronut.in/plotting-real-time-data-from-arduino-usin...
mit
ddico/server-tools
base_module_doc_rst/wizard/__init__.py
23
1046
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
appi147/Jarvis
jarviscli/plugins/voice_control.py
2
2629
import os from plugin import plugin, require voice_control_installed = True try: import speech_recognition as sr import pyaudio except ImportError: voice_control_installed = False if voice_control_installed: requirements = [] else: requirements = [ 'voice_control_requirements (install port...
mit
eugena/django-mere-feedback
setup.py
1
1589
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import feedback try: from setuptools import setup except ImportError: from distutils.core import setup version = feedback.__version__ if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') os.system('python setup.py...
bsd-3-clause
john5223/airflow
docs/conf.py
36
8474
# -*- coding: utf-8 -*- # # Airflow documentation build configuration file, created by # sphinx-quickstart on Thu Oct 9 20:50:01 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
apache-2.0
CHrycyna/LandscapeTracker
tests/test_user.py
1
1877
from test_helper import TestHelper from app import app, db from app.models.user import User class TestUser(TestHelper): def test_retrieve_user(self): u = User(username = 'andy', password = "123", email = 'umluo23@cc.umanitoba.ca') db.session.add(u) db.session.commit() user = User....
mit
ronakkhunt/kuma
kuma/attachments/tests/test_views.py
21
13816
import datetime from nose.tools import eq_, ok_ from django.conf import settings from django.core.files.base import ContentFile from django.core.files import temp as tempfile from django.utils.http import parse_http_date_safe from constance import config from jingo.helpers import urlparams from kuma.users.tests imp...
mpl-2.0
vtexier/duniter-python-api
tests/documents/test_peer.py
1
4506
import unittest from duniterpy.documents.peer import Peer, BMAEndpoint, UnknownEndpoint, WS2PEndpoint rawpeer = """Version: 2 Type: Peer Currency: beta_brousouf PublicKey: HsLShAtzXTVxeUtQd7yi5Z5Zh4zNvbu8sTEZ53nfKcqY Block: 8-1922C324ABC4AF7EF7656734A31F5197888DDD52 Endpoints: BASIC_MERKLED_API some.dns.name 88.77.66...
gpl-3.0
ecaldwe1/zika
website/apps/home/views/upload_job_view.py
2
1693
#!/bin/env python3.4 # -*- coding: utf-8 -*- # # This file is part of the VecNet Zika modeling interface. # For copyright and licensing information about this package, see the # NOTICE.txt and LICENSE.txt files in its top-level directory; they are # available at https://github.com/vecnet/zika # # This Source Code Form ...
mpl-2.0
kmike/scrapy
scrapy/utils/engine.py
180
1376
"""Some debugging functions for working with the Scrapy engine""" from __future__ import print_function from time import time # used in global tests code def get_engine_status(engine): """Return a report of the current engine status""" tests = [ "time()-engine.start_time", "engine.has_capacity...
bsd-3-clause
wildtetris/python-social-auth
examples/flask_example/settings.py
51
2264
from os.path import dirname, abspath SECRET_KEY = 'random-secret-key' SESSION_COOKIE_NAME = 'psa_session' DEBUG = True SQLALCHEMY_DATABASE_URI = 'sqlite:////%s/test.db' % dirname(abspath(__file__)) DEBUG_TB_INTERCEPT_REDIRECTS = False SESSION_PROTECTION = 'strong' SOCIAL_AUTH_LOGIN_URL = '/' SOCIAL_AUTH_LOGIN_REDIREC...
bsd-3-clause
ropik/chromium
chrome/common/extensions/docs/examples/apps/hello-python/main.py
148
5230
#!/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. from google.appengine.ext import webapp from google.appengine.ext.webapp import util from google.appengine.api import users from go...
bsd-3-clause
Ramalus/herovoices
.buildozer/venv/lib/python2.7/site-packages/pip/_vendor/requests/status_codes.py
926
3200
# -*- coding: utf-8 -*- from .structures import LookupDict _codes = { # Informational. 100: ('continue',), 101: ('switching_protocols',), 102: ('processing',), 103: ('checkpoint',), 122: ('uri_too_long', 'request_uri_too_long'), 200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'...
gpl-2.0
Milad-Rakhsha/chrono
src/demos/python/irrlicht/demo_IRR_callbackSMC.py
3
6973
# ============================================================================= # PROJECT CHRONO - http:#projectchrono.org # # Copyright (c) 2014 projectchrono.org # All rights reserved. # # Use of this source code is governed by a BSD-style license that can be found # in the LICENSE file at the top level of the distri...
bsd-3-clause
lyft/incubator-airflow
airflow/models/base.py
4
1248
# # 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...
apache-2.0
mixianghang/mptcp
scripts/analyze_suspend.py
445
49020
#!/usr/bin/python # # Tool for analyzing suspend/resume timing # Copyright (c) 2013, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This prog...
gpl-2.0
ashemedai/ansible
lib/ansible/modules/cloud/amazon/elasticache_parameter_group.py
28
13401
#!/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
gnieboer/tensorflow
tensorflow/contrib/learn/python/learn/datasets/text_datasets.py
124
2703
# 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...
apache-2.0
gallifrey17/eden
modules/s3db/project.py
3
374876
# -*- coding: utf-8 -*- """ Sahana Eden Project Model @copyright: 2011-2015 (c) Sahana Software Foundation @license: MIT 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 witho...
mit
hoatle/odoo
addons/stock_dropshipping/tests/test_invoicing.py
257
2284
# Author: Leonardo Pistone # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any la...
agpl-3.0
DESHONOR/android_kernel_huawei_g620s_Eloy
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
fener06/pyload
module/gui/PackageDock.py
41
3198
# -*- coding: utf-8 -*- """ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in ...
gpl-3.0
veger/ansible
lib/ansible/modules/remote_management/imc/imc_rest.py
27
14815
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Dag Wieers <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
liqi328/rjrepaircompany
django/core/exceptions.py
292
2767
""" Global Django exception and warning classes. """ class DjangoRuntimeWarning(RuntimeWarning): pass class ObjectDoesNotExist(Exception): "The requested object does not exist" silent_variable_failure = True class MultipleObjectsReturned(Exception): "The query returned multiple objects when only one w...
bsd-3-clause
popazerty/dvbapp2-gui
lib/python/Tools/ASCIItranslit.py
84
4273
# -*- coding:utf-8 -*- ASCIItranslit = { \ 0x0022: "''", \ 0x002A: "_", \ 0x002F: "_", \ 0x003A: "_", \ 0x003C: "_", \ 0x003D: "_", \ 0x003E: "_", \ 0x003F: "_", \ 0x005C: "_", \ 0x007C: "_", \ 0x007F: "", \ 0x00A0: "_", \ 0x00A1: "!", \ 0x00A2: "c", \ 0x00A3: "lb", \ 0x00A4: "", \ 0x00A5: "yen", \ 0x00A6: "I", \ 0x00...
gpl-2.0
commial/miasm
example/ida/symbol_exec.py
3
5178
from __future__ import print_function import operator from future.utils import viewitems import idaapi import idc from miasm.expression.expression_helper import Variables_Identifier from miasm.expression.expression import ExprAssign from utils import expr2colorstr, translatorForm class ActionHandler(idaapi.acti...
gpl-2.0
thica/ORCA-Remote
src/ORCA/widgets/Slider.py
1
11336
# -*- coding: utf-8 -*- """ ORCA Open Remote Control Application Copyright (C) 2013-2020 Carsten Thielepape Please contact me by : http://www.orca-remote.org/ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publi...
gpl-3.0
Elico-Corp/odoo_OCB
addons/sale_service/tests/test_sale_service.py
41
2127
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.addons.sale.tests.test_sale_common import TestSale class TestSaleService(TestSale): def test_sale_service(self): """ Test task creation when confirming a so with the corresponding product """ ...
agpl-3.0
tivek/conan
conans/server/service/service.py
2
8746
from conans.errors import RequestErrorException, NotFoundException, ForbiddenException from conans.server.store.file_manager import FileManager import os import jwt from conans.util.files import mkdir from conans.model.ref import PackageReference from conans.util.log import logger class FileUploadDownloadService(obje...
mit
chhao91/QGIS
python/plugins/db_manager/dlg_sql_window.py
5
12633
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
gpl-2.0
stephentyrone/swift
utils/gyb_syntax_support/GenericNodes.py
13
3268
from .Child import Child from .Node import Node # noqa: I201 GENERIC_NODES = [ # generic-where-clause -> 'where' requirement-list Node('GenericWhereClause', kind='Syntax', children=[ Child('WhereKeyword', kind='WhereToken'), Child('RequirementList', kind='GenericRequirementL...
apache-2.0
manevant/django-oscar
src/oscar/apps/dashboard/partners/views.py
4
10537
from django.contrib import messages from django.contrib.auth.models import Permission from django.core.urlresolvers import reverse_lazy, reverse from django.shortcuts import get_object_or_404, redirect from django.utils.translation import ugettext_lazy as _ from django.template.loader import render_to_string from djang...
bsd-3-clause
gomex/hntool
lib/hntool/util.py
1
1481
# # hntool - utility functions # Copyright (C) 2009 Hugo Doria <mail@hugodoria.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your opt...
gpl-2.0
ciex/motor
lib/werkzeug/contrib/wrappers.py
92
10254
# -*- coding: utf-8 -*- """ werkzeug.contrib.wrappers ~~~~~~~~~~~~~~~~~~~~~~~~~ Extra wrappers or mixins contributed by the community. These wrappers can be mixed in into request objects to add extra functionality. Example:: from werkzeug.wrappers import Request as RequestBase fr...
apache-2.0
RoadRunnr/net-next
tools/perf/scripts/python/syscall-counts-by-pid.py
1996
2105
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
dizballanze/breaking-point
breaking_point/breaking_point.py
1
1494
import timeit def find_breaking_point(f1, f2, input_generator, start=1, step=1, limit=1000000, trial_count=1000, repeat_count=3): """ Find size of input arguments (n0) for which f2(n0) is faster than f1(n0). - f1, f2 - functions to test. - input_generator - function that rece...
mit
Ban3/Limnoria
plugins/AutoMode/config.py
6
4477
### # Copyright (c) 2005, 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, # this list of conditi...
bsd-3-clause
nrc/servo
tests/wpt/css-tests/tools/html5lib/html5lib/treewalkers/dom.py
1229
1457
from __future__ import absolute_import, division, unicode_literals from xml.dom import Node import gettext _ = gettext.gettext from . import _base class TreeWalker(_base.NonRecursiveTreeWalker): def getNodeDetails(self, node): if node.nodeType == Node.DOCUMENT_TYPE_NODE: return _base.DOCTYP...
mpl-2.0
noroutine/ansible
lib/ansible/utils/module_docs_fragments/validate.py
366
1146
# Copyright (c) 2015 Ansible, 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. # # Ansi...
gpl-3.0
cornell-brg/pydgin
riscv/isa_RV32D.py
2
7317
#======================================================================= # isa_RV32D.py #======================================================================= 'RISC-V instructions for the double-precision floating point extension.' from utils import sext_xlen, sext_32, sext, signed, trim, fp_neg from pydgin.u...
bsd-3-clause
OneBitSoftware/jwtSample
src/Spa/env1/Lib/site-packages/flask/testsuite/__init__.py
564
7022
# -*- coding: utf-8 -*- """ flask.testsuite ~~~~~~~~~~~~~~~ Tests Flask itself. The majority of Flask is already tested as part of Werkzeug. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import print_function import os import sys im...
mit
pe-suke/ansible
lib/ansible/plugins/connections/accelerate.py
140
15736
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.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 published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
neilpelow/wmap-django
venv/lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/latin1prober.py
1778
5232
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
gpl-3.0
DreadPirateRobert/stock_visualiser
stock_visualiser_virtualenv/lib/python3.5/site-packages/pip/_vendor/distlib/_backport/tarfile.py
422
92628
#------------------------------------------------------------------- # tarfile.py #------------------------------------------------------------------- # Copyright (C) 2002 Lars Gustaebel <lars@gustaebel.de> # All rights reserved. # # Permission is hereby granted, free of charge, to any person # obtaining a copy ...
mit
christophelec/github3.py
tests/integration/test_repos_commit.py
10
1282
"""Integration tests for Repository Commit objects.""" import github3 from . import helper class TestRepoCommit(helper.IntegrationHelper): """Integration tests for the RepoCommit object.""" def test_statuses(self): """Test the ability to retrieve statuses on a commit.""" cassette_name = sel...
bsd-3-clause
Antiun/c2c-rd-addons
purchase_landed_costs/__openerp__.py
4
2193
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 ChriCar Beteiligungs- und Beratungs- GmbH (<http://www.camptocamp.at>) # # Thi...
agpl-3.0
JamieFBousfield/heekscnc
nc/anilam_crusader_m.py
34
3760
# Preliminary postprocessor support for Anilam Crusader M CNC controller # This code modified from iso.py and emc2.py distriuted with HeeksCAD as of Sep 2010 # Kurt Jensen 6 Sep 2010 # Use at your own risk. import nc import iso class Creator(iso.Creator): def init(self): iso.Creator.init(self) ...
bsd-3-clause
matthewtownson/soapy
soapy/pyqtgraph/graphicsItems/GradientEditorItem.py
9
37015
import weakref import numpy as np from ..Qt import QtGui, QtCore from ..python2_3 import sortList from .. import functions as fn from .GraphicsObject import GraphicsObject from .GraphicsWidget import GraphicsWidget from ..widgets.SpinBox import SpinBox from ..pgcollections import OrderedDict from ..colormap import Colo...
gpl-3.0
EvanzzzZ/mxnet
python/mxnet/ndarray.py
5
80441
# coding: utf-8 # pylint: disable= too-many-lines, redefined-builtin, protected-access # pylint: disable=import-error, no-name-in-module, undefined-variable """NDArray API of MXNet.""" from __future__ import absolute_import from __future__ import division try: from __builtin__ import slice as py_slice except Import...
apache-2.0
cloudera/hue
desktop/core/ext-py/oauth2client-4.1.3/oauth2client/contrib/django_util/__init__.py
39
18152
# Copyright 2015 Google 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 applicable law or agre...
apache-2.0
sbalde/edxplatform
cms/djangoapps/contentstore/management/commands/tests/test_reindex_courses.py
32
6714
""" Tests for course reindex command """ import ddt from django.core.management import call_command, CommandError import mock from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from common.test.utils ...
agpl-3.0
tumbl3w33d/ansible
test/units/modules/network/netvisor/test_pn_log_audit_exception.py
21
2610
# Copyright: (c) 2018, Pluribus Networks # 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 json from units.compat.mock import patch from ansible.modules.network.netvisor import pn...
gpl-3.0
kajgan/e2
lib/python/Tools/ASCIItranslit.py
84
4273
# -*- coding:utf-8 -*- ASCIItranslit = { \ 0x0022: "''", \ 0x002A: "_", \ 0x002F: "_", \ 0x003A: "_", \ 0x003C: "_", \ 0x003D: "_", \ 0x003E: "_", \ 0x003F: "_", \ 0x005C: "_", \ 0x007C: "_", \ 0x007F: "", \ 0x00A0: "_", \ 0x00A1: "!", \ 0x00A2: "c", \ 0x00A3: "lb", \ 0x00A4: "", \ 0x00A5: "yen", \ 0x00A6: "I", \ 0x00...
gpl-2.0
vitorio/bite-project
deps/gdata-python-client/src/gdata/contacts/__init__.py
119
28208
#!/usr/bin/env python # # Copyright 2009 Google 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 requir...
apache-2.0
mozilla/relman-auto-nag
auto_nag/scripts/mismatch_priority_tracking_esr.py
2
1862
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. from auto_nag import utils from auto_nag.bzcleaner import BzCleaner class MismatchPrioTrackESR(BzCleaner): def __i...
bsd-3-clause
RobertABT/heightmap
build/scipy/scipy/optimize/nnls.py
116
1423
from __future__ import division, print_function, absolute_import from . import _nnls from numpy import asarray_chkfinite, zeros, double __all__ = ['nnls'] def nnls(A, b): """ Solve ``argmin_x || Ax - b ||_2`` for ``x>=0``. This is a wrapper for a FORTAN non-negative least squares solver. Parameters...
mit
IlyaSkriblovsky/txmongo
txmongo/collection.py
2
57347
# Copyright 2009-2015 The TxMongo Developers. All rights reserved. # Use of this source code is governed by the Apache License that can be # found in the LICENSE file. from __future__ import absolute_import, division import io import struct import collections import warnings from bson import BSON, ObjectId from bson....
apache-2.0
razvanphp/arangodb
3rdParty/V8-3.31.74.1/third_party/python_26/Lib/sched.py
59
5093
"""A generally useful event scheduler class. Each instance of this class manages its own queue. No multi-threading is implied; you are supposed to hack that yourself, or use a single instance per application. Each instance is parametrized with two functions, one that is supposed to return the current time, one that i...
apache-2.0
mottosso/mindbender-setup
bin/windows/python36/Lib/unittest/test/test_discovery.py
6
33037
import os.path from os.path import abspath import re import sys import types import pickle import builtins from test import support import unittest import unittest.test class TestableTestProgram(unittest.TestProgram): module = None exit = True defaultTest = failfast = catchbreak = buffer = None verbo...
mit
freevo/kaa-candy
src/widgets/text.py
1
5250
# -*- coding: iso-8859-1 -*- # ----------------------------------------------------------------------------- # text.py - multiline text widget # ----------------------------------------------------------------------------- # kaa-candy - Fourth generation Canvas System using Clutter as backend # Copyright (C) 2011 Dirk ...
gpl-2.0
sangood/spksrc
spk/gentoo-chroot/src/app/application/direct.py
34
4465
from pyextdirect.configuration import create_configuration, expose, LOAD, STORE_READ, STORE_CUD from pyextdirect.router import Router import os import subprocess from config import * from db import * __all__ = ['Base', 'Services', 'Overview'] Base = create_configuration() class Services(Base): def __init__(se...
bsd-3-clause
halwai/cvxpy
cvxpy/atoms/elementwise/max_elemwise.py
11
3324
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
gpl-3.0
20uf/ansible
v1/ansible/runner/return_data.py
133
2102
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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 published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
carlessanagustin/ansible-playbooks
provision-ansible/library/proxmox.py
85
16619
#!/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...
mit
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/numpy/f2py/crackfortran.py
44
126845
#!/usr/bin/env python """ crackfortran --- read fortran (77,90) code and extract declaration information. Copyright 1999-2004 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRANTY IS EXPRESSE...
apache-2.0
tennc/webshell
php/create_code_with_xor.py
1
2908
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # name: yihuo.py # http://www.opensource.org/licenses/mit-license # MIT License # from: https://www.sqlsec.com/2020/07/shell.html#toc-heading-24 # Copyright (c) 2020 # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and a...
gpl-3.0
marcuskelly/recover
Lib/site-packages/pip/_vendor/requests/packages/chardet/langthaimodel.py
2930
11275
######################## 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...
bsd-2-clause
appsembler/edx-platform
lms/djangoapps/django_comment_client/base/views.py
9
27767
import functools import json import logging import random import time import urlparse from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core import exceptions from django.http import Http404, HttpResponse, HttpResponseServerError from django.utils.transla...
agpl-3.0
w1r0x/ansible
test/units/playbook/test_playbook.py
290
2230
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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 published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
ssudholt/phocnet
tools/predict_phocs.py
1
2673
#!/usr/bin/env python ''' Script for predicting PHOCs for a number of images residing in a folder on disk. ''' import argparse import logging import os import caffe import numpy as np import cv2 from phocnet.evaluation.cnn import net_output_for_word_image_list def main(img_dir, output_dir, pretrained_phocnet, deploy...
bsd-3-clause
jrabbit/ubotu-fr
plugins/Anonymous/__init__.py
18
2461
### # Copyright (c) 2005, Daniel DiPaolo # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of condition...
bsd-3-clause
t3dev/odoo
addons/l10n_be_invoice_bba/models/account_invoice.py
1
1971
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. import random import re from odoo import api, fields, models, _ from odoo.exceptions import UserError """ account.invoice object: add support for...
gpl-3.0
zielmicha/couchdb-python
couchdb/mapping.py
5
22390
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2009 Christopher Lenz # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """Mapping from raw JSON data structures to Python objects and vice versa. >>> from couchdb import ...
bsd-3-clause
simar7/build-mozharness
mozharness/mozilla/mock.py
11
10709
#!/usr/bin/env python # ***** BEGIN LICENSE BLOCK ***** # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # ***** END LICENSE BLOCK ***** """Code to integrate with mock ""...
mpl-2.0
DenisCarriere/geocoder
tests/test_uscensus.py
1
1697
#!/usr/bin/python # coding: utf8 import geocoder import requests_mock us_address = '595 Market St' us_city = 'San Francisco' us_state = 'CA' us_zipcode = '94105' us_locations = ['4650 Silver Hill Road, Suitland, MD 20746', '42 Chapel Street, New Haven'] def test_uscensus(): url = 'https://geocoding.geo.census.go...
mit
sysadmin75/ansible
lib/ansible/module_utils/common/network.py
41
4188
# Copyright (c) 2016 Red Hat Inc # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) # General networking tools that may be used by all modules import re from struct import pack from socket import inet_ntoa from ansible.module_utils.six.moves import zip VALID_...
gpl-3.0
ArcherSys/ArcherSys
Lib/site-packages/nbconvert/filters/tests/test_ansi.py
3
3329
""" Module with tests for ansi filters """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from nbconvert.utils.coloransi import TermColors from ...tests.base import TestsBase from ..ansi import strip_ansi, ansi2html, ansi2latex class TestAnsi(TestsBase): ""...
mit
VaneCloud/horizon
openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/forms.py
63
3022
# 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...
apache-2.0