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
python-bugzilla/python-bugzilla
tests/test_api_externalbugs.py
1
1659
# # Copyright Red Hat, Inc. 2012 # # This work is licensed under the GNU GPLv2 or later. # See the COPYING file in the top-level directory. # """ Test miscellaneous API bits """ import tests import tests.mockbackend def test_externalbugs(): # Basic API testing of the ExternalBugs wrappers fakebz = tests.moc...
gpl-2.0
nycholas/ask-undrgz
src/ask-undrgz/ask_undrgz/question/__init__.py
3
1681
# -*- coding: utf-8 -*- # # ask-undrgz system of questions uses data from underguiz. # Copyright (c) 2010, Nycholas de Oliveira e Oliveira <nycholas@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditio...
bsd-3-clause
jinverar/Empire
lib/common/listeners.py
12
25600
""" Listener handling functionality for Empire. Handles listener startup from the database, listener shutdowns, and maintains the current listener configuration. """ import http import helpers from pydispatch import dispatcher import hashlib import sqlite3 class Listeners: def __init__(self, MainMenu, args=...
bsd-3-clause
xsynergy510x/android_external_chromium_org
native_client_sdk/src/build_tools/nacl-mono-buildbot.py
130
7586
#!/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 hashlib import json import os import sys import buildbot_common import build_version from build_paths import SCRIPT_DIR GS...
bsd-3-clause
Sapphirine/Stock-price-Movement-Prediction
pydoop/predict_new.py
1
4729
__author__ = 'arkilic' import csv import numpy as np from sklearn.linear_model import SGDRegressor import random import pprint raise NotImplementedError('This is the non-pydoop version, please see predict_new_map_red.py for the application') print "Prediction on IBM 30 year data:" f = open('HD-1984-2014-d.csv') tmp...
apache-2.0
worsht/antlr4
runtime/Python2/src/antlr4/BufferedTokenStream.py
9
11937
# # [The "BSD license"] # Copyright (c) 2012 Terence Parr # Copyright (c) 2012 Sam Harwell # Copyright (c) 2014 Eric Vergnaud # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redis...
bsd-3-clause
Ingenico-ePayments/connect-sdk-python2
ingenico/connect/sdk/domain/payment/definitions/customer_approve_payment.py
2
1375
# -*- coding: utf-8 -*- # # This class was auto-generated from the API references found at # https://epayments-api.developer-ingenico.com/s2sapi/v1/ # from ingenico.connect.sdk.data_object import DataObject class CustomerApprovePayment(DataObject): __account_type = None @property def account_type(self):...
mit
turbomanage/training-data-analyst
courses/machine_learning/deepdive2/structured/labs/serving/application/lib/pyasn1_modules/rfc7191.py
13
7062
# This file is being contributed to of pyasn1-modules software. # # Created by Russ Housley without assistance from the asn1ate tool. # Modified by Russ Housley to add support for opentypes. # # Copyright (c) 2019, Vigil Security, LLC # License: http://snmplabs.com/pyasn1/license.html # # CMS Key Package Receipt and Er...
apache-2.0
veger/ansible
lib/ansible/utils/module_docs_fragments/eos.py
58
6957
# # (c) 2015, Peter Sprygada <psprygada@ansible.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 late...
gpl-3.0
luis-rr/nest-simulator
pynest/nest/tests/test_quantal_stp_synapse.py
13
4049
# -*- coding: utf-8 -*- # # test_quantal_stp_synapse.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of th...
gpl-2.0
ashokrajbathu/boabrock
frappe/model/delete_doc.py
12
7003
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import frappe.model.meta import frappe.defaults from frappe.utils.file_manager import remove_all from frappe import _ from rename_doc import dynamic_link_queries fr...
mit
IntegralDefense/integralutils
integralutils/WildfireParser.py
1
15599
import os import sys import requests import logging import sys import base64 # Make sure the current directory is in the # path so that we can run this from anywhere. this_dir = os.path.dirname(__file__) if this_dir not in sys.path: sys.path.insert(0, this_dir) from BaseSandboxParser import * class WildfireParse...
apache-2.0
andymason/istheansweryes
lib/werkzeug/contrib/jsrouting.py
318
8534
# -*- coding: utf-8 -*- """ werkzeug.contrib.jsrouting ~~~~~~~~~~~~~~~~~~~~~~~~~~ Addon module that allows to create a JavaScript function from a map that generates rules. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ ...
apache-2.0
rooshilp/CMPUT410W15-project
testenv/lib/python2.7/site-packages/PIL/ImageDraw2.py
26
3199
# # The Python Imaging Library # $Id$ # # WCK-style drawing interface operations # # History: # 2003-12-07 fl created # 2005-05-15 fl updated; added to PIL as ImageDraw2 # 2005-05-15 fl added text support # 2005-05-20 fl added arc/chord/pieslice support # # Copyright (c) 2003-2005 by Secret Labs AB # Copyright ...
gpl-2.0
Evervolv/android_external_chromium_org
tools/idl_parser/idl_ppapi_lexer.py
23
1872
#!/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. """ Lexer for PPAPI IDL The lexer uses the PLY library to build a tokenizer which understands both WebIDL and Pepper tokens. WebI...
bsd-3-clause
keithlee/shakeAppPyDev
django/contrib/gis/gdal/prototypes/generation.py
321
3766
""" 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...
bsd-3-clause
wholebiome/MetaPathways_Python_Koonkie.3.0
libs/python_modules/utils/metapathways_utils.py
2
34426
#!/usr/bin/env python __author__ = "Kishori M Konwar" __copyright__ = "Copyright 2013, MetaPathways" __credits__ = ["r"] __version__ = "1.0" __maintainer__ = "Kishori M Konwar" __status__ = "Release" """Contains general utility code for the metapaths project""" from shutil import rmtree from StringIO import StringI...
mit
Tithen-Firion/youtube-dl
youtube_dl/extractor/ccc.py
50
2839
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, parse_iso8601, ) class CCCIE(InfoExtractor): IE_NAME = 'media.ccc.de' _VALID_URL = r'https?://(?:www\.)?media\.ccc\.de/v/(?P<id>[^/?#&]+)' _TESTS = [{ 'url': 'https://media.ccc.de...
unlicense
prhod/navitia
source/jormungandr/jormungandr/timezone.py
11
2283
# encoding: utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobilit...
agpl-3.0
archf/ansible
lib/ansible/modules/storage/infinidat/infini_host.py
29
3823
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Gregory Shulov (gregory.shulov@gmail.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': '...
gpl-3.0
esvitech/linux-2
scripts/gdb/linux/proc.py
189
8604
# # gdb helper commands and functions for Linux kernel debugging # # Kernel proc information reader # # Copyright (c) 2016 Linaro Ltd # # Authors: # Kieran Bingham <kieran.bingham@linaro.org> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb from linux import constants from linux impor...
gpl-2.0
google-research/remixmatch
pi_model.py
1
4872
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
altenia/taskmator
taskmator/context.py
1
5235
import datetime import re import logging from taskmator.factory import TaskFactory class TaskContainer: """ In this context a Task is an instance of a task loaded in memory. The task template is called task specification. """ logger = logging.getLogger(__name__) def __init__(self, task_ast):...
mit
google/rekall
rekall-core/rekall/plugins/windows/malware/cmdhistory.py
1
40811
# Rekall Memory Forensics # # Copyright 2013 Google Inc. All Rights Reserved. # # Authors: # Michael Hale Ligh <michael.ligh@mnin.org> # # Contributors/References: # Richard Stevens and Eoghan Casey # Extracting Windows Cmd Line Details from Physical Memory. # http://ww.dfrws.org/2010/proceedings/stevens.pdf # ...
gpl-2.0
UITools/saleor
saleor/payment/gateways/dummy/forms.py
1
1358
from django import forms from django.utils.translation import pgettext_lazy, ugettext_lazy as _ from ... import ChargeStatus class DummyPaymentForm(forms.Form): charge_status = forms.ChoiceField( label=pgettext_lazy('Payment status form field', 'Payment status'), choices=ChargeStatus.CHOICES, ini...
bsd-3-clause
geoff-reid/RackHD
test/tests/api/v2_0/__init__.py
10
1176
# import tests from config_tests import ConfigTests from nodes_tests import NodesTests from catalogs_tests import CatalogsTests from pollers_tests import PollersTests from obm_tests import OBMTests from workflows_tests import WorkflowsTests from workflowTasks_tests import WorkflowTasksTests from tags_tests import TagsT...
apache-2.0
cellcounter/cellcounter
cellcounter/accounts/test_views.py
1
17775
from urllib.parse import urlparse from django.contrib.auth.forms import PasswordChangeForm, SetPasswordForm from django.contrib.auth.models import User, AnonymousUser from django.contrib.auth.tokens import default_token_generator from django.core import mail from django.core.cache import cache from django.urls import ...
mit
phoebusliang/parallel-lettuce
tests/integration/lib/Django-1.2.5/django/contrib/gis/measure.py
398
12282
# Copyright (c) 2007, Robert Coup <robert.coup@onetrackmind.co.nz> # All rights reserved. # # 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 notice, #...
gpl-3.0
mwgoldsmith/kate
tools/KateDJ/kdj/demuxer.py
3
1808
import sys import os import tempfile from tools import Tools class Demuxer: def __init__(self,tools,filename,type): if not self.CreateDirectory(): raise Exception, 'Failed to create directory' self.Demux(tools,filename,type) def GetDirectory(self): return self.directory def CreateDirector...
bsd-3-clause
okuta/chainer
chainermn/communicators/__init__.py
1
5547
from chainermn.communicators.communicator_base import CommunicatorBase # NOQA def create_communicator( communicator_name='pure_nccl', mpi_comm=None, allreduce_grad_dtype=None, batched_copy=False): """Create a ChainerMN communicator. Different communicators provide different approaches of com...
mit
apanda/phantomjs-intercept
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/png.py
170
3914
# Copyright (C) 2012 Balazs Ankes (bank@inf.u-szeged.hu) University of Szeged # # 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 # notice, this lis...
bsd-3-clause
bertrand-l/numpy
numpy/distutils/command/autodist.py
148
2048
"""This module implements additional tests ala autoconf which can be useful. """ from __future__ import division, absolute_import, print_function # We put them here since they could be easily reused outside numpy.distutils def check_inline(cmd): """Return the inline identifier (may be empty).""" cmd._check_...
bsd-3-clause
ramitalat/odoo
addons/account/wizard/account_report_general_ledger.py
267
3191
# -*- 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
jumping/Diamond
src/diamond/handler/stats_d.py
20
4833
# coding=utf-8 """ Implements the abstract Handler class, sending data to statsd. This is a UDP service, sending datagrams. They may be lost. It's OK. #### Dependencies * [statsd](https://pypi.python.org/pypi/statsd/) v2.0.0 or newer. * A compatible implementation of [statsd](https://github.com/etsy/statsd) ####...
mit
MQQiang/kbengine
kbe/src/lib/python/Lib/test/test_largefile.py
96
6554
"""Test largefile support on system where this makes sense. """ import os import stat import sys import unittest from test.support import TESTFN, requires, unlink import io # C implementation of io import _pyio as pyio # Python implementation of io # size of file to create (>2GB; 2GB == 2147483648 bytes) size = 2500...
lgpl-3.0
barnsnake351/nova
nova/api/auth.py
9
5830
# Copyright (c) 2011 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 ...
apache-2.0
mSenyor/kivy
kivy/uix/image.py
1
11853
''' Image ===== The :class:`Image` widget is used to display an image:: wimg = Image(source='mylogo.png') Asynchronous Loading -------------------- To load an image asynchronously (for example from an external webserver), use the :class:`AsyncImage` subclass:: aimg = AsyncImage(source='http://mywebsite.com...
mit
kerlw/POSTMan-Chrome-Extension
proxy/proxy_server.py
102
3014
#!/usr/bin/python from twisted.internet import reactor from twisted.web import http from twisted.web.proxy import Proxy, ProxyRequest, ProxyClientFactory, ProxyClient from ImageFile import Parser from StringIO import StringIO class InterceptingProxyClient(ProxyClient): def __init__(self, *args, **kwargs): ...
apache-2.0
heeraj123/oh-mainline
vendor/packages/twisted/doc/mail/examples/smtpclient_tls.py
22
4733
""" Demonstrate sending mail via SMTP while employing TLS and performing authentication. """ import sys from OpenSSL.SSL import SSLv3_METHOD from twisted.mail.smtp import ESMTPSenderFactory from twisted.python.usage import Options, UsageError from twisted.internet.ssl import ClientContextFactory from twisted.intern...
agpl-3.0
thoughtpalette/thoughts.thoughtpalette.com
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/lexers/text.py
94
68777
# -*- coding: utf-8 -*- """ pygments.lexers.text ~~~~~~~~~~~~~~~~~~~~ Lexers for non-source code file types. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from bisect import bisect from pygments.lexer import Lexer, LexerC...
mit
moto-timo/ironpython3
Src/StdLib/Lib/encodings/mac_arabic.py
272
36467
""" Python Character Mapping Codec generated from 'VENDORS/APPLE/ARABIC.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
apache-2.0
nghiattran/self-steering
submission.py
1
3899
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Nghia Tran """ Generate csv for predicting steering angles. Usage: usage: submission.py [-h] [--limit LIMIT] [--save SAVE] logdir test_folder Create submission for Udacity. positional arguments: logdir Path to logdir. test_folder ...
mit
thnee/ansible
test/units/cli/arguments/test_optparse_helpers.py
31
1127
# -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # 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 sys import pytest from ansible import constants as C from ansible...
gpl-3.0
ixdy/kubernetes-test-infra
gubernator/third_party/defusedxml/pulldom.py
64
1162
# defusedxml # # Copyright (c) 2013 by Christian Heimes <christian@python.org> # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/psf/license for licensing details. """Defused xml.dom.pulldom """ from __future__ import print_function, absolute_import from xml.dom.pulldom import parse as _pars...
apache-2.0
SOMACMU/trippins
webapps/trippins/tests.py
1
3548
from django.test import TestCase from django.contrib.auth import SESSION_KEY from django.core.urlresolvers import reverse from trippins.models import * class AccountManagementTest(TestCase): def create_tmp_user(self): user = User(username="test-use") user.set_password('123') user.save() ...
gpl-3.0
JingJunYin/tensorflow
tensorflow/python/framework/tensor_shape.py
36
28237
# 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
liyitest/rr
openstack_dashboard/dashboards/project/firewalls/workflows.py
13
13303
# Copyright 2013, Big Switch Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
apache-2.0
digitalemagine/django-localflavor-it
django_localflavor_it/util.py
101
1791
from django.utils.encoding import smart_text def ssn_check_digit(value): "Calculate Italian social security number check digit." ssn_even_chars = { '0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, ...
bsd-3-clause
ldoktor/avocado-vt
virt.py
4
9628
import os import sys import logging import imp try: import queue as Queue except ImportError: import Queue from autotest.client import test import six from avocado.core import exceptions from virttest import asset from virttest import bootstrap from virttest import data_dir from virttest import env_process ...
gpl-2.0
Hummer12007/pomu
pomu/util/remote.py
1
1214
""" Utilities for remotes """ from portage.versions import best from pomu.util.pkg import ver_str, cpv_split from pomu.util.portage import misc_dirs from pomu.util.result import Result def filelist_to_cpvs(tree): """Converts a list of files to list of cpvs""" res = [] for opath in tree: comps = ...
gpl-2.0
jiangzhixiao/odoo
addons/document/__openerp__.py
260
2096
# -*- 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
jayceyxc/hue
apps/metastore/src/metastore/forms.py
2
2753
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
coderbone/SickRage-alt
lib/tornado/test/queues_test.py
29
13046
# 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 th...
gpl-3.0
ehealthafrica-ci/onadata
onadata/apps/logger/management/commands/publish_xls.py
5
2725
import os from optparse import make_option from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError from django.utils.translation import ugettext_lazy, ugettext as _ from pyxform.builder import create_survey_from_xls from onadata.apps.logger.models.xform import XFo...
bsd-2-clause
boompieman/iim_project
project_python2/lib/python2.7/site-packages/IPython/utils/wildcard.py
29
4654
# -*- coding: utf-8 -*- """Support for wildcard pattern matching in object inspection. Authors ------- - Jörgen Stenarson <jorgen.stenarson@bostream.nu> - Thomas Kluyver """ #***************************************************************************** # Copyright (C) 2005 Jörgen Stenarson <jorgen.stenarson@bos...
gpl-3.0
jh23453/privacyidea
privacyidea/lib/tokens/ocra.py
3
13809
# -*- coding: utf-8 -*- # # http://www.privacyidea.org # 2015-09-03 Initial writeup. # Cornelius Kölbel <cornelius@privacyidea.org> # # # This code is free software; you can redistribute it and/or # modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE # License as published by the Free Softw...
agpl-3.0
thomasyu888/synapsePythonClient
synapseclient/core/cache.py
1
14358
# Note: Even though this has Sphinx format, this is not meant to be part of the public docs """ ************ File Caching ************ Implements a cache on local disk for Synapse file entities and other objects with a `FileHandle <https://docs.synapse.org/rest/org/sagebionetworks/repo/model/file/FileHandle.html>`_. ...
apache-2.0
beckastar/django
tests/admin_custom_urls/models.py
20
2503
from functools import update_wrapper from django.contrib import admin from django.core.urlresolvers import reverse from django.db import models from django.http import HttpResponseRedirect from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Action(models.Model): name ...
bsd-3-clause
StackVista/sts-agent-integrations-core
splunk_event/check.py
1
2417
""" Events as generic events from splunk. StackState. """ # 3rd party from utils.splunk.splunk import SplunkTelemetryInstanceConfig, SavedSearches from utils.splunk.splunk_telemetry import SplunkTelemetryInstance, SplunkTelemetrySavedSearch from utils.splunk.splunk_telemetry_base import SplunkTelemetryBase clas...
bsd-3-clause
cjb/curveship
gui-curveship.py
1
13368
#!/usr/bin/env python 'An interactive fiction system offering control over the narrative discourse.' __author__ = 'Nick Montfort' __copyright__ = 'Copyright 2011 Nick Montfort' __license__ = 'ISC' __version__ = '0.5.0.0' __status__ = 'Development' import sys import os import time import optparse import clarifier imp...
isc
phassoa/openelisglobal-core
liquibase/OE2.7/CILNSPMassive/scripts/testResult.py
6
3241
#!/usr/bin/env python # -*- coding: utf-8 -*- def convert_type_to_symbole( type): if type == 'Numeric' or type == 'numeric' : return 'N' if type == 'Free Text': return 'R' if type == 'Select list': return 'D' if type == 'multi': return 'M' return type...
mpl-2.0
zjx-immersion/BDD-Test-Node
node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py
604
3207
#!/usr/bin/env python # Copyright 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for the input.py file.""" import gyp.input import unittest import sys class TestFindCycles(unittest.TestCase): def setUp(self...
apache-2.0
baylee-d/osf.io
addons/mendeley/migrations/0001_initial.py
56
1509
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-03-23 20:34 from __future__ import unicode_literals from django.db import migrations, models import osf.models.base import osf.utils.datetime_aware_jsonfield class Migration(migrations.Migration): initial = True dependencies = [ ] operation...
apache-2.0
ulope/django
django/contrib/auth/tests/test_models.py
34
7989
from django.contrib.auth import get_user_model from django.contrib.auth.models import AbstractUser, Group, Permission, User, UserManager from django.contrib.auth.tests.utils import skipIfCustomUser from django.contrib.contenttypes.models import ContentType from django.core import mail from django.db.models.signals impo...
bsd-3-clause
chromium/chromium
third_party/blink/renderer/bindings/scripts/interface_dependency_resolver.py
5
18762
# Copyright (C) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
gpaes/apm_planner
libs/mavlink/share/pyshared/pymavlink/generator/gen_all.py
31
1511
#!/usr/bin/env python ''' Use mavgen.py on all available MAVLink XML definitions to generate C and Python MAVLink routines for sending and parsing the protocol Copyright Pete Hollands 2011 Released under GNU GPL version 3 or later ''' import os, sys, glob, re from mavgen import mavgen # allow import from the parent...
agpl-3.0
bqlabs/horus
src/horus/gui/workbench/calibration/pages/capture_page.py
2
4180
# -*- coding: utf-8 -*- # This file is part of the Horus Project __author__ = 'Jesús Arroyo Torrens <jesus.arroyo@bq.com>' __copyright__ = 'Copyright (C) 2014-2016 Mundo Reader S.L.' __license__ = 'GNU General Public License v2 http://www.gnu.org/licenses/gpl2.html' import wx._core from horus.util import resources ...
gpl-2.0
ultimateprogramer/formhub
restservice/services/bamboo.py
5
1454
from pybamboo.dataset import Dataset from pybamboo.connection import Connection from restservice.RestServiceInterface import RestServiceInterface from utils.bamboo import get_new_bamboo_dataset, get_bamboo_url class ServiceDefinition(RestServiceInterface): id = u'bamboo' verbose_name = u'bamboo POST' d...
bsd-2-clause
ruibarreira/linuxtrail
usr/lib/python2.7/dist-packages/defusedxml/sax.py
53
1462
# defusedxml # # Copyright (c) 2013 by Christian Heimes <christian@python.org> # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/psf/license for licensing details. """Defused xml.sax """ from __future__ import print_function, absolute_import from xml.sax import InputSource as _InputSource fr...
gpl-3.0
silly-wacky-3-town-toon/SOURCE-COD
toontown/coghq/DistributedBattleFactoryAI.py
1
2839
from toontown.coghq import DistributedLevelBattleAI from direct.directnotify import DirectNotifyGlobal from direct.fsm import State from direct.fsm import ClassicFSM, State from toontown.battle.BattleBase import * import CogDisguiseGlobals from toontown.toonbase.ToonPythonUtil import addListsByValue class DistributedB...
apache-2.0
paasmaker/paasmaker
paasmaker/common/api/noderegister.py
2
6840
# # Paasmaker - Platform as a Service # # 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/. # import logging import time import paasmaker from apirequest import APIRequest...
mpl-2.0
tvalacarta/tvalacarta
python/main-classic/servers/eitb.py
2
1215
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para eitb # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ from core import logger from core import scrapertools from lib...
gpl-3.0
arista-eosplus/ansible-modules-extras
system/zfs.py
67
14130
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Johan Wiren <johan.wiren.se@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 th...
gpl-3.0
SimonTheCoder/server_monitor
wmonitor.py
1
2078
#!/usr/bin/python import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk from monitor import Monitor import threading def refresh_host(server_list_file = None): if server_list_file is None: server_list_file = "servers.list" list_store = builder.get_object("host_ListStore"...
gpl-2.0
vipints/genomeutils
gfftools/GFFParser.py
1
20125
#!/usr/bin/env python """ Extract genome annotation from a GFF (a tab delimited format for storing sequence features and annotations) file. Requirements: Numpy :- http://numpy.org/ Copyright (C) 2009-2012 Friedrich Miescher Laboratory of the Max Planck Society, Tubingen, Germany. 2012-2015 Memorial Sloan Ket...
bsd-3-clause
wileeam/airflow
tests/utils/test_operator_helpers.py
4
3285
# # 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
ronkyo/mi-instrument
mi/instrument/wetlabs/fluorometer/flord_d/test/sample_data.py
9
1311
from mi.instrument.wetlabs.fluorometer.flort_d.driver import NEWLINE SAMPLE_MNU_RESPONSE = "Ser BBFL2W-993" + NEWLINE + \ "Ver Triplet5.20" + NEWLINE + \ "Ave 1" + NEWLINE + \ "Pkt 0" + NEWLINE + \ "M1d 0" + NEWLINE + \ ...
bsd-2-clause
EDUlib/edx-platform
lms/djangoapps/mobile_api/users/views.py
2
14742
""" Views for user API """ from completion.exceptions import UnavailableCompletionData from completion.utilities import get_key_to_last_completed_block from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.contrib.auth.signals import user_logged_in from django.sho...
agpl-3.0
McStasMcXtrace/McCode
tools/comp-test/mctestcomp.py
1
2118
#!/usr/bin/env python import glob import pathlib import subprocess import tempfile class McTestcomp: def __init__(self,comppath): self.comppath=comppath self.compname=self.path_to_compname(comppath) self.set_flavour('mcstas') self.compiler='gcc' self.cflags='-lm' def path_to_compname(self,path...
gpl-2.0
ewheeler/rapidpro
temba/reports/tests.py
1
2443
from __future__ import unicode_literals import json from django.core.urlresolvers import reverse from models import Report from temba.tests import TembaTest class ReportTest(TembaTest): def test_create(self): self.login(self.admin) create_url = reverse('reports.report_create') respons...
agpl-3.0
tushart91/study-usc
Information Integration/Homework/HW1/HW1/requests/packages/urllib3/util/ssl_.py
170
8755
from binascii import hexlify, unhexlify from hashlib import md5, sha1 from ..exceptions import SSLError SSLContext = None HAS_SNI = False create_default_context = None import errno import ssl try: # Test for SSL features from ssl import wrap_socket, CERT_NONE, PROTOCOL_SSLv23 from ssl import HAS_SNI # Ha...
mit
rhndg/openedx
common/djangoapps/embargo/migrations/0003_add_countries.py
102
6889
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models from django_countries import countries class Migration(DataMigration): def forwards(self, orm): """Populate the available countries with all 2-character ISO country codes. """ ...
agpl-3.0
DelazJ/QGIS
tests/src/python/test_provider_ogr.py
8
80339
# -*- coding: utf-8 -*- """QGIS Unit tests for the non-shapefile, non-tabfile datasources handled by OGR provider. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the Li...
gpl-2.0
piyushroshan/xen-4.3
tools/python/xen/remus/device.py
19
12280
# Remus device interface # # Coordinates with devices at suspend, resume, and commit hooks import os, re, fcntl import netlink, qdisc, util class ReplicatedDiskException(Exception): pass class BufferedNICException(Exception): pass class CheckpointedDevice(object): 'Base class for buffered devices' def post...
gpl-2.0
repotvsupertuga/repo
plugin.video.TVsupertuga/resources/lib/sources/en/ymovies.py
7
10669
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any l...
gpl-2.0
sidzan/netforce
netforce_account/netforce_account/tests/product_sale.py
4
3204
from netforce.test import TestCase from netforce.model import get_model from datetime import * import time class Test(TestCase): _name="product.sale" _description="Product sale invoice and payment" def test_run(self): # create invoice vals={ "type": "out", "inv_type...
mit
hybrid-storage-dev/cinder-fs-111t-hybrid-cherry
backup/drivers/swift.py
2
24689
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # 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/LICEN...
apache-2.0
maniteja123/numpy
numpy/f2py/tests/test_return_character.py
130
3967
from __future__ import division, absolute_import, print_function from numpy import array from numpy.compat import asbytes from numpy.testing import run_module_suite, assert_, dec import util class TestReturnCharacter(util.F2PyTest): def check_function(self, t): tname = t.__doc__.split()[0] if tn...
bsd-3-clause
NoctuaNivalis/qutebrowser
tests/unit/utils/usertypes/test_timer.py
4
2427
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
gpoesia/servo
tests/wpt/css-tests/tools/html5lib/html5lib/treewalkers/__init__.py
1229
2323
"""A collection of modules for iterating through different kinds of tree, generating tokens identical to those produced by the tokenizer module. To create a tree walker for a new type of tree, you need to do implement a tree walker object (called TreeWalker by convention) that implements a 'serialize' method taking a ...
mpl-2.0
stoeps13/ibmcnxscripting
WebSphere/cnxMemberCheckExIDByEmail.py
1
2934
# To run this script with Windows or SLES, you have to modify setupCmdLine # # setupCmdLine.bat|sh # add on line 40: "SET WAS_USER_SCRIPT=d:\ibm\wasuserscript.cmd" # # Create d:\ibm\wasuserscript.cmd: # "SET WAS_EXT_DIRS=%WAS_EXT_DIRS%;c:\ibm\sqllib\java" # import os import sys from java.util import Properties # Load...
apache-2.0
mitre/hybrid-curation
src/unbundle-hits.py
1
7869
import sys import re import codecs import types import csv import json import optparse import fileinput import collections import datetime import time """ Essentially reverses the process of bundle-items. Processes the CSV download from MTurk and bursts out multiple items in each HIT. Each field name that ends in "_1...
apache-2.0
inovtec-solutions/OpenERP
openerp/addons/hr/__init__.py
54
1096
# -*- 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
ronin-gw/cqstat
cqstat/setup.py
1
7196
import argparse import os import sys import json import getpass from template import Coloring from cluster import Cluster from queue import Queue from lib import generate_pattern, Re_dummy from test import print_detail CONFIG_PATH = "~/.cqstat_config.json" class Invert(argparse.Action): def __init__(self, **kwa...
mit
sunlightlabs/tcamp
tcamp/sms/views.py
1
4763
from twilio.twiml import Response from django_twilio.decorators import twilio_view from django.template.defaultfilters import striptags from django.views.decorators.http import require_http_methods from django.views.decorators.cache import never_cache from django.utils import timezone from dateutil.parser import parse ...
bsd-3-clause
subutai/nupic
src/nupic/support/fs_helpers.py
10
1566
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
tianweizhang/nova
nova/tests/api/openstack/test_faults.py
12
11289
# Copyright 2013 IBM Corp. # Copyright 2010 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/LIC...
apache-2.0
PerkinsRay/pox
pox/datapaths/pcap_switch.py
42
7186
# Copyright 2013 James McCauley # # 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 writi...
apache-2.0
kwailamchan/programming-languages
javascript/backbone/backbone-templates/backbone-fileupload/venvs/lib/python2.7/site-packages/django/contrib/localflavor/it/util.py
436
1807
from django.utils.encoding import smart_str, smart_unicode def ssn_check_digit(value): "Calculate Italian social security number check digit." ssn_even_chars = { '0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': ...
mit
gdgellatly/OCB1
addons/purchase/company.py
51
1586
# -*- 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