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
lastweek/gem5
src/arch/x86/isa/insts/general_purpose/data_conversion/endian_conversion.py
91
2658
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
redfast00/RCPU
RCPU/assemble.py
1
2449
import RCPU.assembler.assembler as assembler from RCPU.assembler.preprocessor import preprocess import argparse import struct import logging from pprint import pformat def pretty_log_debug(stage, msg, *args, **kwargs): logging.debug(stage + '\n' + pformat(msg), *args, **kwargs) def assemble(lines): data, t...
mit
mikepea/fullerite
src/diamond/collectors/conntrack/test/testconntrack.py
30
2251
#!/usr/bin/python # coding=utf-8 ################################################################################ from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import Mock from mock import patch from diamond.collector import Collector from conntrack impor...
apache-2.0
chromium2014/src
tools/perf/page_sets/page_cycler/morejsnp.py
9
1609
# 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. # pylint: disable=W0401,W0614 from telemetry.page.actions.all_page_actions import * from telemetry.page import page as page_module from telemetry.page import ...
bsd-3-clause
rlr/fjord
vendor/packages/translate-toolkit/translate/tools/pretranslate.py
4
9304
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008 Zuza Software Foundation # # This file is part of translate. # # 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 o...
bsd-3-clause
aherlihy/mongo-python-driver
test/test_replica_set_reconfig.py
18
5751
# Copyright 2013-2015 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
dayutianfei/impala-Q
tests/util/calculation_util.py
7
2312
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, 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
meteorcloudy/tensorflow
tensorflow/python/kernel_tests/unique_op_test.py
18
6591
# 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
amisrs/one-eighty
venv2/lib/python2.7/site-packages/flask/app.py
72
83169
# -*- coding: utf-8 -*- """ flask.app ~~~~~~~~~ This module implements the central WSGI application object. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys from threading import Lock from datetime import timedelta from itertools import ...
mit
hgl888/chromium-crosswalk-efl
tools/ipc_fuzzer/mutate/ipc_fuzzer_mut.py
56
2990
#!/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. """Mutational ClusterFuzz fuzzer. A pre-built corpus of ipcdump files has to be uploaded to ClusterFuzz along with this script. As chro...
bsd-3-clause
bbbenja/SickRage
lib/hachoir_parser/misc/word_2.py
74
7377
""" Documents: * "Microsoft Word for Windows 2.0 Binary Format" http://www.wotsit.org/download.asp?f=word2&sc=275927573 """ from hachoir_core.field import (FieldSet, Enum, Bit, Bits, UInt8, Int16, UInt16, UInt32, Int32, NullBytes, Bytes, RawBytes, PascalString16, DateTimeMSDOS32, TimeDateMSDOS32) f...
gpl-3.0
Maximilian-Reuter/SickRage
lib/hachoir_parser/archive/mar.py
95
2204
""" Microsoft Archive parser Author: Victor Stinner Creation date: 2007-03-04 """ MAX_NB_FILE = 100000 from hachoir_parser import Parser from hachoir_core.field import FieldSet, String, UInt32, SubFile from hachoir_core.endian import LITTLE_ENDIAN from hachoir_core.text_handler import textHandler, filesizeHandler, h...
gpl-3.0
mahinthjoe/bedrock
py3env/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py
3133
82594
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mpl-2.0
slevenhagen/odoo-npg
addons/account_followup/wizard/__init__.py
437
1076
# -*- 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
yamt/ryu
ryu/lib/packet/ospf.py
9
34341
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # # 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 appli...
apache-2.0
xiandiancloud/edx-platform-Y
lms/djangoapps/instructor_task/migrations/0002_add_subtask_field.py
60
5146
# -*- 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 field 'InstructorTask.subtasks' db.add_column('instructor_task_instructortask', 'subtasks', ...
agpl-3.0
rhndg/openedx
common/djangoapps/embargo/migrations/0004_migrate_embargo_config.py
102
8223
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): """Move the current course embargo configuration to the new models. """ for old_course in orm.EmbargoedCourse.obj...
agpl-3.0
leiferikb/bitpop
src/tools/gyp/pylib/gyp/generator/msvs.py
3
124630
# 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. import copy import ntpath import os import posixpath import re import subprocess import sys import gyp.common import gyp.easy_xml as easy_xml import gyp.MSVSNew a...
gpl-3.0
PaulWay/spacewalk
client/solaris/smartpm/smart/channels/deb_dir_info.py
5
1114
# # Copyright (c) 2004 Conectiva, Inc. # # Written by Gustavo Niemeyer <niemeyer@conectiva.com> # # This file is part of Smart Package Manager. # # Smart Package Manager 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 Fou...
gpl-2.0
Lekanich/intellij-community
python/lib/Lib/site-packages/django/utils/unittest/main.py
332
9388
"""Unittest main program""" import sys import os import types from django.utils.unittest import loader, runner try: from django.utils.unittest.signals import installHandler except ImportError: installHandler = None __unittest = True FAILFAST = " -f, --failfast Stop on first failure\n" CATCHBREAK = ...
apache-2.0
gibxxi/nzbToMedia
libs/requests/packages/chardet/hebrewprober.py
2929
13359
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Shy Shalom # Portions created by the Initial Developer are Copyright (C) 2005 # the Initial Developer. All Rights Reserved. #...
gpl-3.0
eLBati/odoo
addons/fetchmail/fetchmail.py
4
15243
# -*- 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
PetrDlouhy/django
tests/model_formsets/models.py
45
6558
from __future__ import unicode_literals import datetime import uuid from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=100) class Meta: or...
bsd-3-clause
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/statsmodels-0.5.0-py2.7-linux-x86_64.egg/statsmodels/sandbox/tests/__init__.py
219
6354
''' Econometrics for a Datarich Environment ======================================= Introduction ------------ In many cases we are performing statistical analysis when many observed variables are available, when we are in a data rich environment. Machine learning has a wide variety of tools for dimension reduction an...
apache-2.0
brian-l/django-1.4.10
django/utils/safestring.py
57
3954
""" Functions for working with "safe strings": strings that can be displayed safely without further escaping in HTML. Marking something as a "safe string" means that the producer of the string has already turned characters that should not be interpreted by the HTML engine (e.g. '<') into the appropriate entities. """ f...
bsd-3-clause
Yukarumya/Yukarum-Redfoxes
testing/web-platform/harness/wptrunner/executors/executormarionette.py
1
22611
# 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 hashlib import httplib import os import socket import threading import time import traceback import urlparse impo...
mpl-2.0
rholy/dnf
dnf/cli/option_parser.py
5
12915
# optparse.py # CLI options parser. # # Copyright (C) 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is dis...
gpl-2.0
Jibec/osm-diff-to-text
reader.py
1
7101
#!/usr/bin/env python3 # -*- encoding: 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...
gpl-3.0
mach0/QGIS
scripts/qgis_fixes/fix_qfiledialog.py
69
1597
# -*- coding: utf-8 -*- """ Migrate QFileDialog methods from PyQt4 to PyQt5 """ # Author: Médéric Ribreux <mederic.ribreux@medspx.fr> # Adapted from fix_pyqt # and http://python3porting.com/fixers.html # Local imports from lib2to3.fixer_base import BaseFix class FixQfiledialog(BaseFix): PATTERN = """ power<...
gpl-2.0
openstack/mistral
mistral/tests/unit/api/v2/test_root.py
1
4804
# Copyright 2013 - Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
Juraci/tempest
tempest/api/orchestration/base.py
2
6228
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
jzoldak/edx-platform
lms/djangoapps/courseware/module_render.py
5
46968
""" Module rendering """ import hashlib import json import logging from collections import OrderedDict from functools import partial import newrelic.agent from capa.xqueue_interface import XQueueInterface from django.conf import settings from django.contrib.auth.models import User from django.core.cache import cache ...
agpl-3.0
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/sphinx/config.py
1
21159
""" sphinx.config ~~~~~~~~~~~~~ Build configuration file handling. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import traceback import types import warnings from collections import OrderedDict from os import path, getenv f...
mit
OaklandPeters/itemize
itemize/chain.py
1
7570
from __future__ import absolute_import import collections import sys #from .basics import iterget, get, get_all from . import basics from .interfaces import Record, DiscreteRecord from .shared import NotPassed, RecordError, RecordDefaultError, _ensure_tuple from .extern.clsproperty import VProperty __all__ = [ 'S...
mit
ferabra/edx-platform
common/djangoapps/student/middleware.py
172
1450
""" Middleware that checks user standing for the purpose of keeping users with disabled accounts from accessing the site. """ from django.http import HttpResponseForbidden from django.utils.translation import ugettext as _ from django.conf import settings from student.models import UserStanding class UserStandingMidd...
agpl-3.0
jjs0sbw/CSPLN
apps/scaffolding/mac/web2py/web2py.app/Contents/Resources/lib/python2.7/email/test/test_email.py
3
127462
# Copyright (C) 2001-2010 Python Software Foundation # Contact: email-sig@python.org # email package unit tests import os import sys import time import base64 import difflib import unittest import warnings from cStringIO import StringIO import email from email.Charset import Charset from email.Header import Header, ...
gpl-3.0
rail/treeherder
bin/peep.py
28
33560
#!/usr/bin/env python """peep ("prudently examine every package") verifies that packages conform to a trusted, locally stored hash and only then installs them:: peep install -r requirements.txt This makes your deployments verifiably repeatable without having to maintain a local PyPI mirror or use a vendor lib. Ju...
mpl-2.0
davedoesdev/python-jwt
test/jwcrypto_notimpl_vows.py
1
2738
""" Test JWS not-implemented errors """ # pylint: disable=wrong-import-order from test.common import clock_load, orig_datetime, clock_reset from test import python_jwt as jwt from pyvows import Vows, expect from jwcrypto.jwt import JWK from jwcrypto.common import base64url_encode # Header: # { # "typ": "JWT", # "...
mit
angel511wong/nixysa
third_party/ply-3.1/test/yacc_uprec2.py
174
1430
# ----------------------------------------------------------------------------- # yacc_uprec2.py # # A grammar with a bad %prec specifier # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex imp...
apache-2.0
richardtran415/pymatgen
pymatgen/ext/jhu.py
3
2945
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module creates an interface to the JHU kpoints servlet, see http://muellergroup.jhu.edu/K-Points.html. """ import os import shutil import tempfile import requests from pymatgen.io.vasp.inputs import...
mit
iirob/python-opcua
setup.py
1
1922
from setuptools import setup, find_packages import sys install_requires = ["python-dateutil", "pytz", "lxml"] if sys.version_info[0] < 3: install_requires.extend(["enum34", "trollius", "futures"]) setup(name="opcua", version="0.98.3", description="Pure Python OPC-UA client and server library", ...
lgpl-3.0
jstasiak/python-zeroconf
tests/test_services.py
1
8835
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Unit tests for zeroconf._services. """ import logging import socket import time import os import unittest from threading import Event from unittest.mock import patch import pytest import zeroconf as r from zeroconf import Zeroconf from zeroconf._services.info impor...
lgpl-2.1
namvo88/Thesis-Quadrotor-Code
sw/misc/attitude_reference/control.py
49
12085
# # Copyright (C) 2014 Antoine Drouin # # This file is part of paparazzi. # # paparazzi 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, or (at your option) # any later version. # # paparazzi...
gpl-2.0
jtattermusch/grpc
tools/run_tests/performance/scenario_config_exporter.py
2
8944
#!/usr/bin/env python3 # Copyright 2020 The gRPC Authors # # 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
yrsegal/OneCommandSublimeSyntax
OneCommand/oneCommand.py
2
4411
from __future__ import print_function from parse import * from wireutils import * color_printing_config.name = "Generator" color_printing_config.color = ansi_colors.PEACH if __name__ == "__main__": import argparse parser = argparse.ArgumentParser() parser.add_argument("-m", "--mode", help="Choose activation mode ...
mit
kartikdhar/djangotest
virt1/lib/python2.7/site-packages/setuptools/tests/environment.py
151
1611
import os import sys import unicodedata from subprocess import Popen as _Popen, PIPE as _PIPE def _which_dirs(cmd): result = set() for path in os.environ.get('PATH', '').split(os.pathsep): filename = os.path.join(path, cmd) if os.access(filename, os.X_OK): result.add(path) ret...
mit
steedos/odoo
addons/sale_analytic_plans/__openerp__.py
262
1634
# -*- 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
fja05680/pinkfish
examples/170.follow-trend/strategy.py
1
3623
""" A basic long term trend strategy applied separately to several securities. 1. S&P 500 index closes above its 200 day moving average 2. The stock closes above its upper band, buy 3. S&P 500 index closes below its 200 day moving average 4. The stock closes below its lower band, sell your long position. """ import ...
mit
Samael500/pelican-plugins
tag_cloud/tag_cloud.py
39
2377
''' tag_cloud =================================== This plugin generates a tag cloud from available tags ''' from __future__ import unicode_literals from collections import defaultdict from operator import attrgetter, itemgetter import logging import math import random from pelican import signals, contents logger =...
agpl-3.0
tkingless/webtesting
venvs/dev/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py
152
6305
import base64 import io import json import zlib from pip._vendor.requests.structures import CaseInsensitiveDict from .compat import HTTPResponse, pickle, text_type def _b64_encode_bytes(b): return base64.b64encode(b).decode("ascii") def _b64_encode_str(s): return _b64_encode_bytes(s.encode("utf8")) def ...
mit
fmin2958/POCS
admin/web/static/metrics-graphics-2.2.1/examples/data/make_fake_data.py
25
1917
import sys from datetime import datetime, date, timedelta import json from random import random import argparse parser = argparse.ArgumentParser(description="Fake data maker.") parser.add_argument('-s', '--start', help="start date", nargs=1) parser.add_argument('-d', '--small', help="allow decimal values", action="sto...
mit
jaseg/python-prompt-toolkit
prompt_toolkit/key_binding/bindings/vi.py
1
45341
# pylint: disable=function-redefined from __future__ import unicode_literals from prompt_toolkit.buffer import ClipboardData, indent, unindent from prompt_toolkit.document import Document from prompt_toolkit.enums import IncrementalSearchDirection, SEARCH_BUFFER, SYSTEM_BUFFER from prompt_toolkit.filters import Filter,...
bsd-3-clause
ogenstad/ansible
test/units/modules/network/nxos/test_nxos_evpn_global.py
53
2780
# # (c) 2016 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 d...
gpl-3.0
KarimAllah/nova
nova/tests/api/openstack/compute/contrib/test_volumes.py
2
8808
# Copyright 2013 Josh Durgin # 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 a...
apache-2.0
PagerDuty/dd-agent
jmxfetch.py
2
19545
# set up logging before importing any other components if __name__ == '__main__': from config import initialize_logging # noqa initialize_logging('jmxfetch') # std import glob import logging import os import signal import sys import time # 3rd party import yaml # datadog from config import ( DEFAULT_CHE...
bsd-3-clause
Ant-Droid/android_kernel_moto_shamu
tools/perf/scripts/python/event_analyzing_sample.py
4719
7393
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
gpl-2.0
cstan11/Sick-Beard
lib/subliminal/converters/addic7ed.py
32
1771
# -*- coding: utf-8 -*- from __future__ import unicode_literals from babelfish import LanguageReverseConverter, language_converters class Addic7edConverter(LanguageReverseConverter): def __init__(self): self.name_converter = language_converters['name'] self.from_addic7ed = {'Català': ('cat',), 'Ch...
gpl-3.0
ThiagoGarciaAlves/intellij-community
python/lib/Lib/site-packages/django/contrib/formtools/tests.py
89
6613
import unittest from django import forms from django.contrib.formtools import preview, wizard, utils from django import http from django.test import TestCase success_string = "Done was called!" class TestFormPreview(preview.FormPreview): def done(self, request, cleaned_data): return http.HttpResponse(suc...
apache-2.0
pleaseproject/python-for-android
python3-alpha/extra_modules/gdata/tlslite/utils/keyfactory.py
48
8803
"""Factory functions for asymmetric cryptography. @sort: generateRSAKey, parseXMLKey, parsePEMKey, parseAsPublicKey, parseAsPrivateKey """ from .compat import * from .RSAKey import RSAKey from .Python_RSAKey import Python_RSAKey from . import cryptomath if cryptomath.m2cryptoLoaded: from .OpenSSL_RSAKey import O...
apache-2.0
wfxiang08/django197
django/core/serializers/python.py
153
7692
""" A Python "serializer". Doesn't do much serializing per se -- just converts to and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for other serializers. """ from __future__ import unicode_literals from collections import OrderedDict from django.apps import apps from django.conf impor...
bsd-3-clause
barnsnake351/neutron
neutron/db/migration/alembic_migrations/versions/38495dc99731_ml2_tunnel_endpoints_table.py
22
1550
# Copyright 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
MatthewWilkes/django
tests/flatpages_tests/test_csrf.py
290
4819
from django.contrib.auth.models import User from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site from django.test import Client, TestCase, modify_settings, override_settings from .settings import FLATPAGES_TEMPLATES @modify_settings(INSTALLED_APPS={'append': 'django.contr...
bsd-3-clause
guschmue/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/gumbel_impl.py
27
4586
# Copyright 2017 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
csc8630Spring2014/Clusterizer
ete2/parser/__init__.py
2
1493
__VERSION__="ete2-2.2rev1056" # -*- coding: utf-8 -*- # #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://ete.cgenomics.org # # ETE is free software: you can redistribute it and/or modify it # under the t...
mit
anastue/netforce
netforce_sale/netforce_sale/models/sale_event.py
4
1526
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
mit
tremby/deluge-yarss-plugin
yarss2/tests/test_rssfeed_scheduler.py
1
9979
# -*- coding: utf-8 -*- # # test_rssfeed_scheduler.py # # Copyright (C) 2012 Bro # # Deluge is free software. # # You may 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...
gpl-3.0
BBVA/chaos-monkey-engine
chaosmonkey/attacks/attack.py
1
1485
class Attack: """ Base class for attacks. Every attack must extend from this class """ ref = None #: **string** Unique identifier for the attack. Must be module_name.AttackClass schema = None #: **dict** Valid jsonSchema to validate the attack attributes in the API #: **dict** example fo...
apache-2.0
pagreene/classymixer
songLibs.py
1
8296
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str from gmusicapi import Mobileclient import re import getpass try: import taglib except: print "The package taglib not available. Cannot use LocalCollection." plistDescStr = 'autogenerated' try: input = ...
mit
wskplho/sl4a
python/src/Lib/quopri.py
424
6969
#! /usr/bin/env python """Conversions to/from quoted-printable transport encoding as per RFC 1521.""" # (Dec 1991 version). __all__ = ["encode", "decode", "encodestring", "decodestring"] ESCAPE = '=' MAXLINESIZE = 76 HEX = '0123456789ABCDEF' EMPTYSTRING = '' try: from binascii import a2b_qp, b2a_qp except Impo...
apache-2.0
dbertha/odoo
openerp/addons/base/res/res_config.py
26
30915
# -*- 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
robdennis/sideboard
tests/plugins/different_versions/rdflib3_0_0/env/lib/python2.7/site-packages/rdflib/compare.py
4
7842
# -*- coding: utf-8 -*- """ A collection of utilities for canonicalizing and inspecting graphs. Among other things, they solve of the problem of deterministic bnode comparisons. Warning: the time to canonicalize bnodes may increase exponentially on larger graphs. Use with care! Example of comparing two graphs:: ...
bsd-3-clause
sexroute/commandergenius
project/jni/python/src/Lib/json/tests/test_fail.py
51
2884
from unittest import TestCase import json # Fri Dec 30 18:57:26 2005 JSONDOCS = [ # http://json.org/JSON_checker/test/fail1.json '"A JSON payload should be an object or array, not a string."', # http://json.org/JSON_checker/test/fail2.json '["Unclosed array"', # http://json.org/JSON_checker/test/f...
lgpl-2.1
jmarsik/mopidy
mopidy/internal/process.py
13
2177
from __future__ import absolute_import, unicode_literals import logging import signal import threading from pykka import ActorDeadError from pykka.registry import ActorRegistry from mopidy.compat import thread logger = logging.getLogger(__name__) SIGNALS = dict( (k, v) for v, k in signal.__dict__.items() ...
apache-2.0
neumerance/deploy
openstack_dashboard/dashboards/project/access_and_security/floating_ips/urls.py
10
1188
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 # no...
apache-2.0
rajul/tvb-library
tvb/simulator/demos/display_surface_parcellation.py
2
3115
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Scientific Package. This package holds all simulators, and # analysers necessary to run brain-simulations. You can use it stand alone or # in conjunction with TheVirtualBrain-Framework Package. See content of the # documentation-folder for more details. See also http://ww...
gpl-2.0
bitmazk/django-multilingual-events
multilingual_events/tests/models_tests.py
1
3761
# -*- coding: utf-8 -*- """Tests for the models of the ``multilingual_events`` app.""" from __future__ import unicode_literals from mock import Mock from django.test import TestCase from django.utils import timezone from mixer.backend.django import mixer from ..models import Event class EventManagerTestCase(TestCa...
mit
val314159/smart_open
smart_open/smart_open_lib.py
1
26911
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Radim Rehurek <me@radimrehurek.com> # # This code is distributed under the terms and conditions # from the MIT License (MIT). """ Utilities for streaming from several file-like data storages: S3 / HDFS / standard filesystem / compressed files..., us...
mit
darnould/integrations-core
snmp/check.py
1
21616
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # std from collections import defaultdict from functools import wraps # 3rd party from pysnmp.entity.rfc3413.oneliner import cmdgen import pysnmp.proto.rfc1902 as snmp_type from pysnmp.smi import builder from pys...
bsd-3-clause
Sutto/cloud-custodian
tools/utils/s3stat.py
5
3688
# Copyright 2015-2017 Capital One Services, 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
apache-2.0
ita1024/samba
source4/selftest/tests.py
1
49134
#!/usr/bin/python # This script generates a list of testsuites that should be run as part of # the Samba 4 test suite. # The output of this script is parsed by selftest.pl, which then decides # which of the tests to actually run. It will, for example, skip all tests # listed in selftest/skip or only run a subset durin...
gpl-3.0
cnsoft/kbengine-cocos2dx
kbe/res/scripts/common/Lib/fractions.py
57
23033
# Originally contributed by Sjoerd Mullender. # Significantly modified by Jeffrey Yasskin <jyasskin at gmail.com>. """Fraction, infinite-precision, real numbers.""" from decimal import Decimal import math import numbers import operator import re import sys __all__ = ['Fraction', 'gcd'] def gcd(a, b): """Calcu...
lgpl-3.0
thehub/hubplus
apps/plus_permissions/default_agents.py
1
3445
from apps.plus_groups.models import TgGroup, Location from django.contrib.auth.models import User from django.db import models from django.conf import settings from apps.plus_permissions.site import Site def get_site(user) : from apps.plus_permissions.interfaces import secure_wrap ss = Site.objects.all() ...
gpl-3.0
tuturto/pyherc
src/pyherc/generators/level/partitioners/old_grid.py
1
3683
# -*- coding: utf-8 -*- # Copyright (c) 2010-2017 Tuukka Turto # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy,...
mit
cgstudiomap/cgstudiomap
main/parts/web/web_shortcuts/model/web_shortcut.py
1
2269
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools
third_party/protobuf26/internal/wire_format.py
26
8421
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
MoroGasper/client
client/app.py
1
2548
# -*- coding: utf-8 -*- """Copyright (C) 2013 COLDWELL AG 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 dist...
gpl-3.0
paterson/servo
tests/wpt/css-tests/tools/html5lib/html5lib/utils.py
982
2545
from __future__ import absolute_import, division, unicode_literals from types import ModuleType try: import xml.etree.cElementTree as default_etree except ImportError: import xml.etree.ElementTree as default_etree __all__ = ["default_etree", "MethodDispatcher", "isSurrogatePair", "surrogatePairTo...
mpl-2.0
hbutau/dzidzo
dzidzo/users/admin.py
5
1047
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django import forms from django.contrib import admin from django.contrib.auth.admin import UserAdmin as AuthUserAdmin from django.contrib.auth.forms import UserChangeForm, UserCreationForm from .models import User class MyUserChan...
bsd-3-clause
Work4Labs/lettuce
tests/integration/lib/Django-1.3/django/views/generic/create_update.py
245
8935
from django.forms.models import ModelFormMetaclass, ModelForm from django.template import RequestContext, loader from django.http import Http404, HttpResponse, HttpResponseRedirect from django.core.xheaders import populate_xheaders from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured from django....
gpl-3.0
bashrc/ZeroNet
src/lib/opensslVerify/opensslVerify-alter2.py
15
6098
#!/usr/bin/env python ## ## @file contrib/verifymessage/python/terracoin_verifymessage.py ## @brief terracoin signed message verification sample script. ## @author unknown author ; found on pastebin ## import ctypes import ctypes.util import hashlib import base64 addrtype = 0 try: ssl = ctypes.CDLL("src/lib/opensslV...
gpl-2.0
jmhodges/letsencrypt
letsencrypt/log.py
30
2246
"""Logging utilities.""" import logging import dialog from letsencrypt.display import util as display_util class DialogHandler(logging.Handler): # pylint: disable=too-few-public-methods """Logging handler using dialog info box. :ivar int height: Height of the info box (without padding). :ivar int widt...
apache-2.0
cjaniake/ionicweb
webapp/ionic/lib/python2.7/site-packages/setuptools/command/alias.py
467
2381
from distutils.errors import DistutilsOptionError from setuptools.command.setopt import edit_config, option_base, config_file def shquote(arg): """Quote an argument for later parsing by shlex.split()""" for c in '"', "'", "\\", "#": if c in arg: return repr(arg) if arg.split() != [arg...
gpl-2.0
MER-GROUP/intellij-community
python/lib/Lib/site-packages/django/contrib/localflavor/de/forms.py
309
3163
""" DE-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.translation import ugettext_lazy as _ import re id_re = re.compile(r"^(?P<residence>\d{10})(?P<origin>\w{1,3})[-\ ]?(?P<...
apache-2.0
kobejean/tensorflow
tensorflow/contrib/graph_editor/tests/transform_test.py
23
11263
# 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
lukw00/shogun
examples/undocumented/python_static/classifier_mpdsvm.py
22
1045
from tools.load import LoadMatrix from sg import sg lm=LoadMatrix() traindat=lm.load_numbers('../data/fm_train_real.dat') testdat=lm.load_numbers('../data/fm_test_real.dat') train_label=lm.load_labels('../data/label_train_twoclass.dat') parameter_list=[[traindat,testdat, train_label,10,2.1,1.2,1e-5,False], [trainda...
gpl-3.0
kbran420/android-quill
jni/libhpdf-2.3.0RC2/if/python/__init__.py
32
19761
from hpdf import * __version__='2.0.8' __all__=[ 'HPDF_ANNOT_CIRCLE', 'HPDF_ANNOT_DOWN_APPEARANCE', 'HPDF_ANNOT_FILE_ATTACHMENT', 'HPDF_ANNOT_FREE_TEXT', 'HPDF_ANNOT_HIDDEN', 'HPDF_ANNOT_HIGHTLIGHT', 'HPDF_ANNOT_HIGHTLIGHT_MODE_EOF', 'HPDF_ANNOT_ICON_COMMENT', 'HPDF_ANNOT_ICON_EOF', 'HPDF_ANNOT_ICON_HEL...
gpl-3.0
andim27/magiccamp
django/contrib/gis/gdal/envelope.py
321
7044
""" The GDAL/OGR library uses an Envelope structure to hold the bounding box information for a geometry. The envelope (bounding box) contains two pairs of coordinates, one for the lower left coordinate and one for the upper right coordinate: +----------o Upper right; (max_x, max_y) ...
bsd-3-clause
hugobowne/scikit-learn
doc/tutorial/machine_learning_map/pyparsing.py
100
137827
# module pyparsing.py # # Copyright (c) 2003-2008 Paul T. McGuire # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to u...
bsd-3-clause
HyperBaton/ansible
lib/ansible/modules/network/eos/eos_bgp.py
34
13078
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2019, Ansible by Red Hat, inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
joelddiaz/openshift-tools
openshift/installer/vendored/openshift-ansible-3.8.36-1/roles/lib_utils/library/yedit.py
14
30672
#!/usr/bin/env python # pylint: disable=missing-docstring # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ _|_ _| # | |) | (...
apache-2.0