repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
anrl/gini3
frontend/src/gbuilder/UI/Edge.py
1
4871
"""The graphical representation of connections of nodes""" import math from PyQt4 import QtCore, QtGui from Core.Item import * from Core.globals import options, mainWidgets, defaultOptions class Edge(QtGui.QGraphicsLineItem, Item): def __init__(self, startItem, endItem, parent=None, scene=None): ...
mit
jensenbox/ansible
lib/ansible/inventory/script.py
5
4822
# (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
Einsteinish/PyTune3
vendor/pynliner/__init__.py
19
9059
#!/usr/bin/env python """Pynliner : Convert CSS to inline styles Python CSS-to-inline-styles conversion tool for HTML using BeautifulSoup and cssutils Copyright (c) 2011 Tanner Netterville Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files...
mit
seanjh/CanadianInsiderTransactions
__main__.py
1
1156
"""Canadian Insider Transactions. Usage: sedi_transactions <issuer_num>... Options: -h --help Show this screen. --version Show version. """ import os from docopt import docopt from sedi_transactions.transactions import SEDIView OUTPUT_PATH = os.path.abspath( os.path.join(os.path.abspath(__f...
mit
pepetreshere/odoo
odoo/addons/test_translation_import/tests/test_term_count.py
3
18927
# -*- coding: utf-8 -*- from contextlib import closing import base64 import io import odoo from odoo.tests import common, tagged from odoo.tools.misc import file_open, mute_logger from odoo.tools.translate import _, _lt, TranslationFileReader, TranslationModuleReader TRANSLATED_TERM = _lt("Klingon") class TestTerm...
agpl-3.0
jovinbm/harvardCoop
node_modules/socket.io/node_modules/socket.io-client/node_modules/engine.io-client/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py
2214
1347
#!/usr/bin/env python import re import json # http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae # http://stackoverflow.com/a/13436167/96656 def unisymbol(codePoint): if codePoint >= 0x0000 and codePoint <= 0xFFFF: return unichr(codePoint) elif codePoint >= 0x010000 and codePoint <= 0x10FFFF: ...
mit
eyp-developers/statistics
statistics/migrations/0044_topic_overview_link.py
1
2256
# Generated by Django 2.0.1 on 2018-07-25 07:28 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('statistics', '0043_merge_20180207_1821'), ] operations = [ migrations.AddField( model_name='session', name='topic_ov...
gpl-3.0
al1b/Calibre-KiPEO
libpyarabicshaping/arabicshapingtab.py
4
8789
# arabic-shaping.tab.i # generated by gen-arabic-shaping-tab (GNU FriBidi 0.19.2) # from the files UnicodeData.txt, (null) of Unicode version 6.0.0. */ # # use FRIBIDI_GET_ARABIC_SHAPE_PRES(key,shape) to access your table # # required memory: 2864 # ArShap= [ (0xfe80,0x0621,0x0621,0x0621), (0xfe81,0xfe82,0x0622,0...
gpl-3.0
jordanpina/Hax
node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py
1843
1786
#!/usr/bin/env python # Copyright (c) 2012 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 ninja.py file. """ import gyp.generator.ninja as ninja import unittest import StringIO import sys import TestCommon ...
mit
gank0326/dSYMTools
app/dSYM.app/Contents/Resources/RunScript.py
15
1330
#coding=utf-8 """ * User: answer.huang * Email: aihoo91@gmail.com * Date: 14-7-28 * Time: 23:36 * Blog: answerhuang.duapp.com """ import os import sys import time import shutil import sqlite3 print os.environ["EFFECTIVE_PLATFORM_NAME"] print os.environ["DWARF_DSYM_FOLDER_PATH"] if os.environ[...
mit
MotorolaMobilityLLC/external-chromium_org
tools/json_schema_compiler/util_cc_helper.py
50
2521
# 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. API_UTIL_NAMESPACE = 'json_schema_compiler::util' class UtilCCHelper(object): """A util class that generates code that uses tools/json_schema_compil...
bsd-3-clause
takmid/inasafe
safe_qgis/test_impact_calculator.py
1
8436
""" InaSAFE Disaster risk assessment tool developed by AusAid - **Impact calculator test suite.** Contact : ole.moller.nielsen@gmail.com .. 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 Found...
gpl-3.0
nke001/attention-lvcsr
libs/Theano/theano/misc/pycuda_init.py
4
2516
import os import warnings import theano import theano.sandbox.cuda from theano import config def set_gpu_from_theano(): """ This set the GPU used by PyCUDA to the same as the one used by Theano. """ # Transfer the theano gpu binding to pycuda, for consistency if config.device.startswith("gpu") an...
mit
buntyke/GPy
GPy/core/gp.py
8
37031
# Copyright (c) 2012-2014, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) import numpy as np import sys from .. import kern from .model import Model from .parameterization import ObsAr from .mapping import Mapping from .. import likelihoods from ..inference.latent_function_i...
mit
resamsel/dbmanagr
src/dbmanagr/dto/__init__.py
2
1139
# -*- coding: utf-8 -*- # # Copyright © 2014 René Samselnig # # This file is part of Database Navigator. # # Database Navigator 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
f-prettyland/angr
angr/state_plugins/fast_memory.py
1
8768
import logging import claripy from ..storage.memory import SimMemory from ..errors import SimFastMemoryError l = logging.getLogger("angr.state_plugins.fast_memory") l.setLevel(logging.DEBUG) class SimFastMemory(SimMemory): def __init__(self, memory_backer=None, memory_id=None, endness=None, contents=None, width...
bsd-2-clause
robobrobro/ballin-octo-shame
lib/Python-3.4.3/Lib/subprocess.py
11
64048
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://www.python.org/2.4/license for licensing details. r"""subprocess - Subpr...
mit
HackLinux/androguard
demos/dad_emul.py
61
5277
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (c) 2012 Geoffroy Gueguen <geoffroy.gueguen@gmail.com> # All Rights Reserved. # # Androguard is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Fo...
apache-2.0
cpennington/edx-platform
common/djangoapps/entitlements/migrations/0003_auto_20171205_1431.py
4
2064
# -*- coding: utf-8 -*- import datetime from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ('entitlements', '0002_auto_20171102_0719'), ] operations = [ migrations.CreateModel( name='CourseEnt...
agpl-3.0
bsneed/modulo_objc
TestScripts/expected_results.py
2
5039
# expected_results.py # # This file contains verified test results that the testing script uses to # decide if a test passes or fails. # Constants and filenames MODULO_SPEC_FILENAME = 'modulo.spec' MODULO_DEPENDENCIES_PATH = 'dependencies' # Default / Help MODULO_DEFAULT_OUTPUT = """usage: modulo [--version] [--help]...
mit
JohnLunzer/flexx
flexx/event/__init__.py
1
11458
""" The event module provides a simple system for properties and events, to let different components of an application react to each-other and to user input. In short: * The :class:`HasEvents <flexx.event.HasEvents>` class provides objects that have properties and can emit events. * There are three decorators to cr...
bsd-2-clause
asottile/pushmanager
pushmanager/core/db.py
2
5475
import logging import sqlalchemy as SA from sqlalchemy.dialects import mysql from sqlalchemy import Column, Integer, SmallInteger, String from sqlalchemy.ext.compiler import compiles from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.sql.expression import Insert from pushmanager.core.settings imp...
apache-2.0
kelseyoo14/Wander
venv_2_7/lib/python2.7/site-packages/Django-1.9-py2.7.egg/django/core/cache/backends/db.py
480
8628
"Database cache backend." import base64 from datetime import datetime from django.conf import settings from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache from django.db import DatabaseError, connections, models, router, transaction from django.utils import six, timezone from django.utils.encoding i...
artistic-2.0
DepthDeluxe/ansible
lib/ansible/module_utils/asa.py
28
4400
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
timothycrosley/thedom
thedom/document.py
1
6794
''' Document.py Provides elements that define the html document being served to the client-side Copyright (C) 2015 Timothy Edmund Crosley 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 Softwar...
gpl-2.0
mcgachey/edx-platform
cms/djangoapps/contentstore/features/component.py
42
6642
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name # Lettuce formats proposed definitions for unimplemented steps with the # argument name "step" instead of "_step" and pylint does not like that. # pylint: disable=unused-argument from lettuce import world, step from nose.tools import assert_tr...
agpl-3.0
gorodok11/ajenti
ajenti/utils/misc.py
17
3887
import subprocess import threading import sys class BackgroundWorker: """ A stoppable background operation. Instance vars: - ``alive`` - `bool`, if the operation is running """ def __init__(self, *args): self.thread = KThread(target=self.__run, args=args) self.thread.daemon =...
lgpl-3.0
cloudbau/nova
nova/openstack/common/notifier/rpc_notifier.py
14
1694
# Copyright 2011 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
apache-2.0
cohortfsllc/cohort-cocl2-sandbox
toolchain_build/once_test.py
8
12597
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Tests of a network memoizer.""" import os import subprocess import shutil import sys import unittest sys.path.append(os.path....
bsd-3-clause
noironetworks/nova
nova/tests/unit/virt/hyperv/test_ioutils.py
64
2176
# Copyright 2014 Cloudbase Solutions Srl # 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 r...
apache-2.0
daavery/audacity
lib-src/lv2/lilv/waflib/Tools/xlc.py
330
1175
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file from waflib.Tools import ccroot,ar from waflib.Configure import conf @conf def find_xlc(conf): cc=conf.find_program(['xlc_r','xlc'],var='CC') cc=conf.cmd_to_list(cc) conf.g...
gpl-2.0
jiyfeng/RSTParser
model.py
1
3945
## model.py ## Author: Yangfeng Ji ## Date: 09-09-2014 ## Time-stamp: <yangfeng 11/05/2014 20:44:25> ## Last changed: umashanthi 11/19/2014 """ As a parsing model, it includes the following functions 1, Mini-batch training on the data generated by the Data class 2, Shift-Reduce RST parsing for a given text sequence 3...
mit
mer-tools/chromium-trace
trace-viewer/third_party/pywebsocket/src/mod_pywebsocket/_stream_base.py
43
5176
# Copyright 2011, 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 f...
bsd-3-clause
rdio/sentry
src/sentry/management/commands/send_fake_data.py
4
2998
""" sentry.management.commands.send_fake_data ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import datetime import itertools import random import time from django.core.management.base import BaseComman...
bsd-3-clause
yapengsong/ovirt-engine
packaging/setup/plugins/ovirt-engine-common/base/system/hostile_services.py
8
3149
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2013-2015 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 # # Unl...
apache-2.0
bjzhang/xen_arm
tools/tests/utests/ut_xend/ut_XendConfig.py
42
4443
#=========================================================================== # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope tha...
gpl-2.0
cledio66/pyglet
pyglet/font/win32.py
25
16849
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
bsd-3-clause
Nikoli/youtube-dl
youtube_dl/extractor/xhamster.py
20
5059
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, unified_strdate, str_to_int, int_or_none, parse_duration, ) class XHamsterIE(InfoExtractor): """Information Extractor for xHamster""" _VALID_URL = r'(?P<proto>https?)...
unlicense
nlloyd/SubliminalCollaborator
libs/twisted/internet/test/_posixifaces.py
6
3233
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ POSIX implementation of local network interface enumeration. """ import sys, socket from socket import AF_INET, AF_INET6, inet_ntop from ctypes import ( CDLL, POINTER, Structure, c_char_p, c_ushort, c_int, c_uint32, c_uint8, c_void_p...
apache-2.0
sherpaman/MolToolPy
bin/hbond_stat.py
1
1064
#!/usr/bin/env python from sys import argv,stderr #Prende in input il nome di un file che contiene, i dati di coppie di residui per ogni frame. #Ogni riga ha il seguente formato: #frame atom1_id res1_name res1_id atom1_name atom2_id res2_name res2_id atom2_name ........... #0 8661 T 273 N3 ...
gpl-2.0
release-engineering/releng-sop
tests/test_koji_clone_tag.py
1
4609
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests of KojiCloneTagForReleaseMilestone script. """ import unittest import os import sys from mock import Mock, patch DIR = os.path.dirname(__file__) sys.path.insert(0, os.path.join(DIR, "..")) from releng_sop.common import Environment, Release # noqa from releng_sop...
mit
swinter2011/login-page-update
wtforms/ext/dateutil/fields.py
177
3429
""" A DateTimeField and DateField that use the `dateutil` package for parsing. """ from __future__ import unicode_literals from dateutil import parser from wtforms.fields import Field from wtforms.validators import ValidationError from wtforms.widgets import TextInput __all__ = ( 'DateTimeField', 'DateField', )...
apache-2.0
tdegrunt/or-tools
examples/python/data/nonogram_regular/nonogram_difficult.py
74
1106
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com # # 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
erasilva/namebench
nb_third_party/dns/rdtypes/ANY/NSEC.py
235
5296
# Copyright (C) 2004-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
apache-2.0
evgenyz/meson
install_meson.py
4
5156
#!/usr/bin/env python3 # Copyright 2013-2014 The Meson development team # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by...
apache-2.0
SaranyaKarthikeyan/boto
boto/pyami/launch_ami.py
153
7585
#!/usr/bin/env python # Copyright (c) 2006,2007 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 rig...
mit
sinhrks/scikit-learn
examples/manifold/plot_lle_digits.py
138
8594
""" ============================================================================= Manifold learning on handwritten digits: Locally Linear Embedding, Isomap... ============================================================================= An illustration of various embeddings on the digits dataset. The RandomTreesEmbed...
bsd-3-clause
theseyi/WhereHows
wherehows-etl/src/main/resources/jython/requests/packages/chardet/euctwprober.py
2994
1676
######################## 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...
apache-2.0
aisipos/django
tests/check_framework/tests.py
22
10720
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from django.apps import apps from django.core import checks from django.core.checks import Error, Warning from django.core.checks.registry import CheckRegistry from django.core.management import call_command from django.core.management.base im...
bsd-3-clause
sebp/scikit-survival
sksurv/preprocessing.py
1
3945
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
gpl-3.0
ruediger/gcc-python-plugin
tests/cpychecker/refcounts/subclass/detection/script.py
4
2697
# -*- coding: utf-8 -*- # Copyright 2011 David Malcolm <dmalcolm@redhat.com> # Copyright 2011 Red Hat, Inc. # # This 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, o...
gpl-3.0
louietsai/python-for-android
python3-alpha/python3-src/Lib/test/test_super.py
55
2021
"""Unit tests for new super() implementation.""" import sys import unittest from test import support class A: def f(self): return 'A' @classmethod def cm(cls): return (cls, 'A') class B(A): def f(self): return super().f() + 'B' @classmethod def cm(cls): return...
apache-2.0
leeseuljeong/leeseulstack_neutron
neutron/plugins/bigswitch/db/consistency_db.py
5
9739
# Copyright 2014, Big Switch Networks # 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 requ...
apache-2.0
yelongyu/chihu
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py
3127
1902
######################## 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
lthurlow/Boolean-Constrained-Routing
networkx-1.8.1/networkx/linalg/tests/test_laplacian.py
22
5161
from nose import SkipTest import networkx as nx from networkx.generators.degree_seq import havel_hakimi_graph class TestLaplacian(object): numpy=1 # nosetests attribute, use nosetests -a 'not numpy' to skip test @classmethod def setupClass(cls): global numpy global assert_equal glo...
mit
40223142/cda11
static/Brython3.1.1-20150328-091302/Lib/xml/sax/handler.py
925
13922
""" This module contains the core classes of version 2.0 of SAX for Python. This file provides only default classes with absolutely minimum functionality, from which drivers and applications can be subclassed. Many of these classes are empty and are included only as documentation of the interfaces. $Id$ """ version ...
gpl-3.0
Pablo126/SSBW
Tarea1y2/flask_1/flask1/lib/python3.5/site-packages/werkzeug/utils.py
345
22972
# -*- coding: utf-8 -*- """ werkzeug.utils ~~~~~~~~~~~~~~ This module implements various utilities for WSGI applications. Most of them are used by the request and response wrappers but especially for middleware development it makes sense to use them without the wrappers. :copyright: (c) 2014 ...
gpl-3.0
alheinecke/tensorflow-xsmm
tensorflow/contrib/distributions/python/kernel_tests/mvn_diag_plus_low_rank_test.py
25
16851
# 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
lyft/incubator-airflow
airflow/contrib/hooks/qubole_hook.py
5
1132
# # 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
silky/pyNES
pynes/tests/cmp_test.py
27
2625
# -*- coding: utf-8 -*- ''' CMP, Compare with Accumulator Test ''' import unittest from pynes.tests import MetaInstructionCase class CpmImmTest(unittest.TestCase): __metaclass__ = MetaInstructionCase asm = 'CMP #$10' lex = [('T_INSTRUCTION', 'CMP'), ('T_HEX_NUMBER', '#$10')] syn = ['S_IMMEDIATE'] ...
bsd-3-clause
jeffknupp/arrow
python/scripts/test_leak.py
6
1847
#!/usr/bin/env python # 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 # "L...
apache-2.0
cuboxi/android_external_chromium_org
tools/json_schema_compiler/preview.py
44
12765
#!/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. """Server for viewing the compiled C++ code from tools/json_schema_compiler. """ import cc_generator import code import cpp_type_g...
bsd-3-clause
mikesname/ehri-collections
ehriportal/portal/migrations/0012_auto__add_field_authority_languages__add_field_authority_scripts.py
1
17152
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Authority.languages' db.add_column('portal_authority', 'languages', self.gf('jsonfield.fie...
mit
jtbattle/wangemu
wvdutil/wvdHandler_base.py
1
4196
# Purpose: template class for file handler for the wvdutil.py program # Author: Jim Battle # # Version: 1.0, 2018/09/15, JTB # massive restructuring of the old wvdutil code base # Version: 1.1, 2021/06/19, JTB # get rid of bilingualism (aka python2 support); # convert to inline type hints instead of type h...
mit
thresholdsoftware/asylum
openerp/addons/product/__init__.py
443
1120
# -*- 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
jreback/pandas
pandas/tests/io/parser/usecols/test_strings.py
6
2564
""" Tests the usecols functionality during parsing for all of the parsers defined in parsers.py """ from io import StringIO import pytest from pandas import DataFrame import pandas._testing as tm _msg_validate_usecols_arg = ( "'usecols' must either be list-like " "of all strings, all unicode, all " "inte...
bsd-3-clause
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/oauth2client/crypt.py
60
8447
# -*- coding: utf-8 -*- # # Copyright 2014 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 requ...
gpl-3.0
kmacinnis/sympy
sympy/physics/mechanics/tests/test_kane.py
9
10523
from sympy import cos, expand, Matrix, sin, symbols, tan, sqrt, S from sympy.physics.mechanics import (dynamicsymbols, ReferenceFrame, Point, RigidBody, KanesMethod, inertia, Particle, dot) def test_one_dof(): # This is for a 1 dof spring-m...
bsd-3-clause
nicklhy/mxnet
python/mxnet/misc.py
61
2512
# 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 u...
apache-2.0
modulexcite/letsencrypt
letsencrypt/tests/crypto_util_test.py
27
6836
"""Tests for letsencrypt.crypto_util.""" import logging import shutil import tempfile import unittest import OpenSSL import mock from letsencrypt.tests import test_util RSA256_KEY = test_util.load_vector('rsa256_key.pem') RSA512_KEY = test_util.load_vector('rsa512_key.pem') CERT = test_util.load_vector('cert.pem') ...
apache-2.0
sameerparekh/pants
contrib/scrooge/src/python/pants/contrib/scrooge/tasks/thrift_linter.py
6
4362
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.j...
apache-2.0
nwjs/chromium.src
chrome/common/extensions/docs/server2/api_data_source.py
3
5640
# 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 logging from data_source import DataSource from docs_server_utils import StringIdentity from environment import IsPreviewServer from file_system ...
bsd-3-clause
Zanzibar82/plugin.video.pelisalacarta
lib/gdata/tlslite/X509.py
279
4287
"""Class representing an X.509 certificate.""" from utils.ASN1Parser import ASN1Parser from utils.cryptomath import * from utils.keyfactory import _createPublicRSAKey class X509: """This class represents an X.509 certificate. @type bytes: L{array.array} of unsigned bytes @ivar bytes: The DER-encoded ASN...
gpl-3.0
endlessm/chromium-browser
build/win/reorder-imports.py
4
4054
#!/usr/bin/env python # Copyright 2014 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 glob import optparse import os import shutil import subprocess import sys sys.path.insert(0, os.path.join(os.path.dirname(__fil...
bsd-3-clause
cogeorg/BlackRhino
examples/Georg2012/networkx/algorithms/centrality/tests/test_eigenvector_centrality.py
32
3934
#!/usr/bin/env python import math from nose import SkipTest from nose.tools import * import networkx class TestEigenvectorCentrality(object): numpy=1 # nosetests attribute, use nosetests -a 'not numpy' to skip test @classmethod def setupClass(cls): global np try: import numpy as...
gpl-3.0
Mhynlo/SickRage
lib/hachoir_parser/network/ouid.py
186
385658
# -*- coding: utf-8 -*- """ List of registered IEEE 24-bit Organizationally Unique IDentifiers. Original data file: http://standards.ieee.org/regauth/oui/oui.txt """ REGISTERED_OUID = { 0x000000: u'XEROX CORPORATION', 0x000001: u'XEROX CORPORATION', 0x000002: u'XEROX CORPORATION', 0x000003: u'XEROX CORPOR...
gpl-3.0
garbled1/ansible
lib/ansible/modules/cloud/azure/azure_rm_resourcegroup.py
33
8741
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 ANS...
gpl-3.0
taichatha/youtube-dl
youtube_dl/extractor/ign.py
107
5415
from __future__ import unicode_literals import re from .common import InfoExtractor class IGNIE(InfoExtractor): """ Extractor for some of the IGN sites, like www.ign.com, es.ign.com de.ign.com. Some videos of it.ign.com are also supported """ _VALID_URL = r'https?://.+?\.ign\.com/(?P<type>video...
unlicense
tplusx/ns3-gpsr
doc/models/source/conf.py
21
7002
# -*- coding: utf-8 -*- # # ns-3 documentation build configuration file, created by # sphinx-quickstart on Tue Dec 14 09:00:39 2010. # # 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. # # All co...
gpl-2.0
Metaswitch/horizon
openstack_dashboard/dashboards/project/containers/panel.py
48
1079
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
pk400/catering
myvenv/lib/python3.4/site-packages/django/contrib/gis/feeds.py
336
5978
from __future__ import unicode_literals from django.contrib.syndication.views import Feed as BaseFeed from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed class GeoFeedMixin(object): """ This mixin provides the necessary routines for SyndicationFeed subclasses to produce simple GeoRSS or W3C ...
mit
rempferg/espresso
maintainer/git2changelog.py
5
4734
#!/usr/bin/python # Copyright (C) 2012,2013,2014,2015,2016 The ESPResSo project # Copyright (C) 2011 Olaf Lenz # Copyright 2008 Marcus D. Hanwell <marcus@cryos.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 ...
gpl-3.0
qedsoftware/commcare-hq
corehq/apps/callcenter/fixturegenerators.py
1
4228
from xml.etree import ElementTree from datetime import datetime import pytz from corehq.apps.callcenter.app_parser import get_call_center_config_from_app from casexml.apps.phone.models import OTARestoreUser from corehq.util.soft_assert import soft_assert from corehq.util.timezones.conversions import ServerTime from di...
bsd-3-clause
mikemhenry/arcade
examples/sprite_tiled_map.py
1
6561
""" Load a map stored in csv format, as exported by the program 'Tiled.' Artwork from http://kenney.nl """ import arcade SPRITE_SCALING = 0.5 SCREEN_WIDTH = 800 SCREEN_HEIGHT = 600 # How many pixels to keep as a minimum margin between the character # and the edge of the screen. VIEWPORT_MARGIN = 40 RIGHT_MARGIN = 1...
mit
dhuang/incubator-airflow
tests/contrib/hooks/test_aws_dynamodb_hook.py
16
2380
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
vasyarv/edx-platform
lms/djangoapps/courseware/tests/test_microsites.py
42
10298
""" Tests related to the Microsites feature """ from django.conf import settings from django.core.urlresolvers import reverse from django.test.utils import override_settings from nose.plugins.attrib import attr from courseware.tests.helpers import LoginEnrollmentTestCase from course_modes.models import CourseMode from...
agpl-3.0
broferek/ansible
test/units/modules/network/fortios/test_fortios_antivirus_settings.py
21
5944
# Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0
scottrice/Ice
tests/steam_grid_updater_tests.py
1
2915
import os import tempfile import unittest from mockito import * from pysteam import grid from pysteam import shortcuts from ice import model from ice import roms from ice import steam_grid_updater from testinfra import fixtures class SteamGridUpdaterTests(unittest.TestCase): def setUp(self): self.steam_fix...
mit
jbcoe/C_API_generation
scripts/codechecks.py
2
2933
#!/usr/bin/env python import argparse import collections import logging import platform import subprocess import sys import os logging.basicConfig(level=logging.ERROR, format='%(message)s') log = logging.getLogger('codechecks') ProcessResult = collections.namedtuple('ProcessResult', ...
mit
sorenk/ansible
test/units/modules/network/junos/test_junos_scp.py
48
3579
# (c) 2018 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
gpl-3.0
boa19861105/android_443_KitKat_kernel_htc_dlxpul
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed 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 failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
wangyum/tensorflow
tensorflow/contrib/compiler/jit.py
129
4433
# 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
blakfeld/ansible
lib/ansible/galaxy/__init__.py
120
2264
######################################################################## # # (C) 2015, Brian Coca <bcoca@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...
gpl-3.0
40223201/40223201
static/Brython3.1.1-20150328-091302/Lib/VFS_import.py
738
3059
import os from browser import doc #_scripts=doc.createElement('script') #_scripts.src="/src/py_VFS.js" #_scripts.type="text/javascript" #doc.get(tag='head')[0].appendChild(_scripts) VFS=dict(JSObject(__BRYTHON__.py_VFS)) class VFSModuleFinder: def __init__(self, path_entry): print("in VFSModuleFinder") ...
gpl-3.0
maestrano/openerp
openerp/addons/edi/edi_service.py
56
2569
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
agpl-3.0
anderspitman/scikit-bio
skbio/sequence/distance.py
1
5233
""" Sequence distance metrics (:mod:`skbio.sequence.distance`) ========================================================== .. currentmodule:: skbio.sequence.distance This module contains functions for computing distances between scikit-bio ``Sequence`` objects. These functions can be used directly or supplied to other...
bsd-3-clause
nyuwireless/ns3-mmwave
src/netanim/bindings/modulegen__gcc_ILP32.py
354
264513
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
nharraud/b2share
invenio/modules/jsonalchemy/jsonext/parsers/only_if_parser.py
17
2250
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014 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) any later...
gpl-2.0
kennedyshead/home-assistant
homeassistant/components/media_player/__init__.py
1
39109
"""Component to interface with various media players.""" from __future__ import annotations import asyncio import base64 import collections from contextlib import suppress import datetime as dt import functools as ft import hashlib import logging import secrets from typing import final from urllib.parse import urlpars...
apache-2.0
project-magpie/enigma2-openpli
lib/python/Screens/RdsDisplay.py
18
8347
from enigma import iPlayableService, iRdsDecoder from Screens.Screen import Screen from Components.ActionMap import NumberActionMap from Components.ServiceEventTracker import ServiceEventTracker from Components.Pixmap import Pixmap from Components.Label import Label from Components.Sources.StaticText import StaticText ...
gpl-2.0