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
khertan/KhtNotes
khtnotes/docutils/transforms/parts.py
187
6980
# $Id: parts.py 6073 2009-08-06 12:21:10Z milde $ # Authors: David Goodger <goodger@python.org>; Ueli Schlaepfer; Dmitry Jemerov # Copyright: This module has been placed in the public domain. """ Transforms related to document parts. """ __docformat__ = 'reStructuredText' import re import sys from docutils import n...
gpl-3.0
chokribr/inveniotest
modules/miscutil/lib/upgrades/invenio_2013_03_28_bibindex_bibrank_type_index.py
17
1813
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2012 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) a...
gpl-2.0
ageis/securedrop
securedrop/store.py
1
6181
# -*- coding: utf-8 -*- import os import re import config import zipfile import crypto_util import uuid import tempfile import subprocess from cStringIO import StringIO import gzip from werkzeug import secure_filename from secure_tempfile import SecureTemporaryFile import logging log = logging.getLogger(__name__) VA...
agpl-3.0
duguxy/pyqtgraph
pyqtgraph/python2_3.py
35
1500
""" Helper functions that smooth out the differences between python 2 and 3. """ import sys def asUnicode(x): if sys.version_info[0] == 2: if isinstance(x, unicode): return x elif isinstance(x, str): return x.decode('UTF-8') else: return unicode(x) el...
mit
jprawiharjo/Nerddit
Storm/Streaming/Push_to_Cassandra_Bolt.py
1
3976
# -*- coding: utf-8 -*- """ Created on Sat Jan 23 13:37:20 2016 @author: jprawiharjo """ from cassandra.cluster import Cluster import cassandra from collections import namedtuple from pyleus.storm import SimpleBolt from Streaming.Doc_Processor import DataFrame import logging log = logging.getLogger('cassandra_bolt') ...
gpl-3.0
seasidesun/shadowsocks-bak
shadowsocks/local.py
1015
2248
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2012-2015 clowwindy # # 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
noironetworks/neutron
neutron/tests/unit/db/test_db_base_plugin_common.py
37
3192
# Copyright (c) 2015 Red Hat, 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 require...
apache-2.0
repotvsupertuga/tvsupertuga.repository
instal/script.module.liveresolver/lib/liveresolver/modules/f4mproxy/flvlib/constants.py
99
3998
""" The constants used in FLV files and their meanings. """ # Tag type (TAG_TYPE_AUDIO, TAG_TYPE_VIDEO, TAG_TYPE_SCRIPT) = (8, 9, 18) # Sound format (SOUND_FORMAT_PCM_PLATFORM_ENDIAN, SOUND_FORMAT_ADPCM, SOUND_FORMAT_MP3, SOUND_FORMAT_PCM_LITTLE_ENDIAN, SOUND_FORMAT_NELLYMOSER_16KHZ, SOUND_FORMAT_NELLYMOSER_8KH...
gpl-2.0
VRciF/springy
src/node_modules/node-ninja/gyp/pylib/gyp/generator/android.py
542
45270
# 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. # Notes: # # This generates makefiles suitable for inclusion into the Android build system # via an Android.mk file. It is based on make.py, the standard makefile ...
gpl-3.0
Mellthas/quodlibet
quodlibet/quodlibet/mmkeys/__init__.py
2
3760
# Copyright 2014 Christoph Reiter # 2018 Ludovic Druette # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. fr...
gpl-2.0
codrut3/tensorflow
tensorflow/python/framework/op_def_registry.py
196
1428
# 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
danakj/chromium
third_party/closure_compiler/processor_test.py
56
3825
#!/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. """Test resources processing, i.e. <if> and <include> tag handling.""" import unittest from processor import FileCache, Processor, Lin...
bsd-3-clause
googleapis/googleapis-gen
google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/enums/types/placeholder_type.py
1
1630
# -*- coding: utf-8 -*- # Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
amchoukir/YouCompleteMe
python/ycm/client/omni_completion_request.py
48
1204
#!/usr/bin/env python # # Copyright (C) 2013 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 you...
gpl-3.0
GehenHe/Recognize-Face-on-Android
tensorflow/contrib/training/python/training/failure_tolerator.py
72
4450
# 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
phammin1/QaManagement
QaManagement/env/Lib/site-packages/django/views/decorators/debug.py
712
2627
import functools from django.http import HttpRequest def sensitive_variables(*variables): """ Indicates which variables used in the decorated function are sensitive, so that those variables can later be treated in a special way, for example by hiding them when logging unhandled exceptions. Two f...
mit
DJMuggs/ansible-modules-extras
network/f5/bigip_facts.py
8
61784
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Matt Hite <mhite@hotmail.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...
gpl-3.0
smmribeiro/intellij-community
python/helpers/python-skeletons/numpy/core/__init__.py
23
149797
from . import multiarray __all__ = [] # Generated with generator3. class generic(object): """ Base class for numpy scalar types. Class from which most (all?) numpy scalar types are derived. For consistency, exposes the same API as `ndarray`, despite many consequent attributes being...
apache-2.0
cloud9UG/odoo
addons/report/models/report.py
168
26320
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
matthiasdiener/spack
var/spack/repos/builtin/packages/r-nloptr/package.py
5
2105
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
julierthanjulie/PedestrianTracking
generate_frames.py
1
3979
""" This code generates frames from CSV values that can be stiched together using FFMPEG to animate pedestrian data. This version produces an animation at 4x speed. """ print "Importing..." # Please ensure the following dependencies are installed before use: import pylab import numpy as np import itertools impo...
mit
donny/mako-mori
external/boto/ec2/address.py
13
4260
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
mit
cristiana214/cristianachavez214-cristianachavez
python-build/python-libs/BeautifulSoup/BeautifulSoup.py
138
78871
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup parses a (possibly invalid) XML or HTML document into a tree representation. It provides methods and Pythonic idioms that make it easy to navigate, search, and modify the tree. A well-formed X...
apache-2.0
sameerparekh/pants
tests/python/pants_test/tasks/test_builddict.py
15
1523
# 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.c...
apache-2.0
alexgorban/models
research/inception/inception/slim/ops.py
20
18781
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
by46/simplekit
simplekit/email/__init__.py
1
4151
import httplib import os.path import requests import six from simplekit import settings from simplekit.exceptions import MailException PRIORITY_NORMAL = 0 PRIORITY_LOW = 1 PRIORITY_HIGH = 2 CONTENT_TYPE_HTML = 0 CONTENT_TYPE_TEXT = 1 ENCODING_UTF8 = 0 ENCODING_ASCII = 1 ENCODING_UTF32 = 2 ENCODI...
mit
allmende/synnefo
snf-cyclades-app/synnefo/logic/networks.py
6
5966
# Copyright (C) 2010-2014 GRNET S.A. # # 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 i...
gpl-3.0
bixbydev/Bixby_v3
database/mysql/base.py
1
2501
#!/usr/bin/env python # Filename: base.py #=====================================================================# # Copyright (c) 2015 Bradley Hilton <bradleyhilton@bradleyhilton.com> # # Distributed under the terms of the GNU GENERAL PUBLIC LICENSE V3. # #===========================================================...
gpl-3.0
rajegannathan/grasp-lift-eeg-cat-dog-solution-updated
python-packages/keras-0.2.0/keras/datasets/imdb.py
41
1850
from __future__ import absolute_import from six.moves import cPickle import gzip from .data_utils import get_file import random from six.moves import zip import numpy as np def load_data(path="imdb.pkl", nb_words=None, skip_top=0, maxlen=None, test_split=0.2, seed=113, start_char=1, oov_char=2, index_fr...
bsd-3-clause
shsingh/ansible
test/units/modules/network/fortios/test_fortios_vpn_certificate_remote.py
21
8513
# 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
hongliang5623/sentry
src/sentry/db/models/base.py
27
2948
""" sentry.db.models ~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging from django.db import models from django.db.models import signals from .fields.bounded import Boun...
bsd-3-clause
alxgu/ansible
lib/ansible/modules/network/aci/mso_schema_template_externalepg.py
21
6089
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_ve...
gpl-3.0
ZihengJiang/mxnet
python/mxnet/ndarray/utils.py
5
9264
# 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
Tahsin-Mayeesha/Udacity-Machine-Learning-Nanodegree
projects/titanic_survival_exploration/titanic_visualizations.py
24
5425
import numpy as np import pandas as pd import matplotlib.pyplot as plt def filter_data(data, condition): """ Remove elements that do not match the condition provided. Takes a data list as input and returns a filtered list. Conditions should be a list of strings of the following format: '<field> <...
mit
mrquim/repository.mrquim
script.module.youtube.dl/lib/youtube_dl/extractor/motorsport.py
73
1804
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urlparse, ) class MotorsportIE(InfoExtractor): IE_DESC = 'motorsport.com' _VALID_URL = r'https?://(?:www\.)?motorsport\.com/[^/?#]+/video/(?:[^/?#]+/)(?P<id>[^/]+)/?(?:$|[?#])' _TES...
gpl-2.0
kernel-sanders/arsenic-mobile
Dependencies/Twisted-13.0.0/twisted/runner/test/test_procmon.py
49
16794
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.runner.procmon}. """ from twisted.trial import unittest from twisted.runner.procmon import LoggingProtocol, ProcessMonitor from twisted.internet.error import (ProcessDone, ProcessTerminated, ...
gpl-3.0
emuikernel/Coolpad5860E-kernel
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
yvaucher/bank-payment
__unported__/account_banking_fi_patu/__openerp__.py
3
1826
############################################################################## # # Copyright (C) 2010 Sami Haahtinen (<http://ressukka.net>). # Copyright (C) 2009 EduSense BV (<http://www.edusense.nl>). # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # progr...
agpl-3.0
mmcdermo/helpinghand
server/venv/lib/python2.7/site-packages/django/contrib/gis/forms/fields.py
7
4693
from __future__ import unicode_literals import warnings from django import forms from django.utils import six from django.utils.translation import ugettext_lazy as _ # While this couples the geographic forms to the GEOS library, # it decouples from database (by not importing SpatialBackend). from django.contrib.gis....
mit
pentestfail/TA-FireEye_TAP
bin/input_module_fireeye_tap_incidents.py
1
4568
# encoding = utf-8 import os import sys import time import datetime import json def validate_input(helper, definition): api_env = definition.parameters.get('api_env', None) instanceid = definition.parameters.get('instance_id', None) apikey = definition.parameters.get('apikey', None) api_limit = defin...
mit
Kiiv/Sick-Beard
lib/hachoir_parser/container/mkv.py
90
20373
# # Matroska parser # Author Julien Muchembled <jm AT jm10.no-ip.com> # Created: 8 june 2006 # from lib.hachoir_parser import Parser from lib.hachoir_core.field import (FieldSet, Link, MissingField, ParserError, Enum as _Enum, String as _String, Float32, Float64, NullBits, Bits, Bit, RawBytes, Bytes, ...
gpl-3.0
basicthinker/THNVM
tests/quick/fs/10.linux-boot/test.py
180
1636
# Copyright (c) 2006 The Regents of The University of Michigan # 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 ...
bsd-3-clause
vinayan3/clpricehistory
django/contrib/comments/moderation.py
246
13528
""" A generic comment-moderation system which allows configuration of moderation options on a per-model basis. To use, do two things: 1. Create or import a subclass of ``CommentModerator`` defining the options you want. 2. Import ``moderator`` from this module and register one or more models, passing the model...
bsd-3-clause
boretom/pyload-apkg
source/py-mods-prebuilt-i386/site-packages/PIL/OleFileIO.py
41
16252
# # THIS IS WORK IN PROGRESS # # The Python Imaging Library # $Id$ # # stuff to deal with OLE2 Structured Storage files. this module is # used by PIL to read Image Composer and FlashPix files, but can also # be used to read other files of this type. # # History: # 1997-01-20 fl Created # 1997-01-22 fl Fixed 64-bit...
gpl-3.0
vipul-sharma20/oh-mainline
vendor/packages/html5lib/html5lib/tests/test_whitespace_filter.py
73
5580
import unittest from html5lib.filters.whitespace import Filter from html5lib.constants import spaceCharacters spaceCharacters = u"".join(spaceCharacters) class TestCase(unittest.TestCase): def runTest(self, input, expected): output = list(Filter(input)) errorMsg = "\n".join(["\n\nInput:", str(inpu...
agpl-3.0
ODInfoBiz/csvengine-ui
csvengine/data_cache.py
1
7704
''' Created on Dec 7, 2015 @author: jumbrich ''' import hashlib import requests from StringIO import StringIO import os import urllib import urlnorm from werkzeug.exceptions import RequestEntityTooLarge from pyyacp.yacp import YACParser from csvengine.utils import assure_path_exists import structlog log =structlo...
gpl-3.0
qbit/psutil
examples/pidof.py
15
1172
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola', karthikrev. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ A clone of 'pidof' cmdline utility. $ pidof python 1140 1138 1136 1134 1133 1129 1127 1125 1121 1120 1119 """ from...
bsd-3-clause
turtlewit/GSHS_RPG
AdventureEngine/CoreEngine/input.py
2
3088
#------------------------------------------------------------------------------# # Copyright 2016-2017 Golden Sierra Game Development Class # # This file is part of Verloren (GSHS_RPG). # # ...
gpl-3.0
talishte/ctigre
env/lib/python2.7/site-packages/mezzanine/blog/migrations/0003_categories.py
8
7742
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models try: from django.contrib.auth import get_user_model except ImportError: # django < 1.5 from django.contrib.auth.models import User else: User = get_user_model() user_orm_label = '%s.%s...
bsd-2-clause
vitan/hue
desktop/core/ext-py/Django-1.6.10/tests/test_utils/doctest_output.py
74
2387
from django.utils import six __test__ = {"API_TEST": r""" # Some checks of the doctest output normalizer. # Standard doctests do fairly >>> import json >>> from django.utils.xmlutils import SimplerXMLGenerator >>> from django.utils.six import StringIO >>> def produce_json(): ... return json.dumps(['foo', {'bar': ...
apache-2.0
tomchristie/django
tests/forms_tests/widget_tests/test_checkboxinput.py
64
3460
from django.forms import CheckboxInput from .base import WidgetTest class CheckboxInputTest(WidgetTest): widget = CheckboxInput() def test_render_empty(self): self.check_html(self.widget, 'is_cool', '', html='<input type="checkbox" name="is_cool" />') def test_render_none(self): self.ch...
bsd-3-clause
axsauze/eventsfinder
dbindexer/resolver.py
55
1476
from django.conf import settings from django.utils.importlib import import_module from django.core.exceptions import ImproperlyConfigured class Resolver(object): def __init__(self): self.backends = [] self.load_backends(getattr(settings, 'DBINDEXER_BACKENDS', ('dbinde...
bsd-3-clause
lschumm/homebrew-fTerm
lib/directory.py
2
4509
""" [fTerm] directory.py This module defines all of the standard directory operations of fTerm. """ # NOTE: this is extraneous # pylint: disable=C0103,C0303 # NOTE: no effect statement required # pylint: disable=C0301 # NOTE: unused variable 'dn' required in directory traversal # pylint: disable=W0612 # for running ...
gpl-3.0
tima/beets
beetsplug/fromfilename.py
25
5733
# This file is part of beets. # Copyright 2015, Jan-Erik Dahlin # # 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
sahiljain/catapult
telemetry/telemetry/internal/browser/possible_browser.py
7
1414
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.internal.app import possible_app class PossibleBrowser(possible_app.PossibleApp): """A browser that can be controlled. Call Create() to...
bsd-3-clause
TheOriginalBDM/Lazy-Cleaner-9000
code/clean_sweep_vision.py
1
6258
#!/usr/bin/env python from picamera.array import PiRGBArray from picamera import PiCamera import cv2 import time from colormath.color_diff import delta_e_cie2000 from colormath.color_objects import LabColor, sRGBColor from colormath.color_conversions import convert_color def nothing(*arg): pass def is_allowed_co...
gpl-3.0
MiLk/ansible
lib/ansible/modules/network/aos/aos_logical_device_map.py
78
8922
#!/usr/bin/python # # (c) 2017 Apstra Inc, <community@apstra.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 opt...
gpl-3.0
52ai/django-ccsds
tests/admin_checks/tests.py
5
23212
from __future__ import unicode_literals from django import forms from django.contrib import admin from django.contrib.contenttypes.admin import GenericStackedInline from django.core import checks from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, ignore_warnings, override_setting...
bsd-3-clause
CliffYuan/zookeeper
src/contrib/huebrowser/zkui/src/zkui/settings.py
114
1103
# 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
airodactyl/qutebrowser
tests/end2end/features/test_private_bdd.py
5
1685
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2017-2018 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
bhargav2408/python-for-android
python3-alpha/python3-src/Lib/wsgiref/handlers.py
51
20582
"""Base classes for server/gateway implementations""" from .util import FileWrapper, guess_scheme, is_hop_by_hop from .headers import Headers import sys, os, time __all__ = [ 'BaseHandler', 'SimpleHandler', 'BaseCGIHandler', 'CGIHandler', 'IISCGIHandler', 'read_environ' ] # Weekday and month names for HTTP ...
apache-2.0
chemistryTools/ChemToolsWebService
chemistry/calcore/matrix/koc.py
2
42477
#coding:utf-8 from numpy import matrix #CAS No. nN ATSC8v SpMaxA_G/D Mor16u nROH O-058 P-117 MLOGP2 Molecular Polarizability kocX = matrix([ [0.000 ,2.487 ,1.032 ,0.672 ,0.000 ,0.000 ,0.000 ,38.020 ,309.680 ], [0.000 ,3.696 ,1.064 ,0.276 ,0.000 ,0.000 ,0.000 ,30.809 ,404.140 ], [2.000 ,3.601 ,1.027 ,0.414 ,0.000 ,1.000...
agpl-3.0
zerolab/wagtail
wagtail/core/migrations/0015_add_more_verbose_names.py
24
4248
# -*- coding: utf-8 -*- import django.db.models.deletion from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0014_add_verbose_name'), ] operations = [ migrations.AlterModelOptions( ...
bsd-3-clause
bradsk88/WinkHouse
lib/flask/logging.py
838
1398
# -*- coding: utf-8 -*- """ flask.logging ~~~~~~~~~~~~~ Implements the logging support for Flask. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from logging import getLogger, StreamHandler, Formatter, getLoggerClas...
apache-2.0
JJones131/steam-engage-monitor
lib/werkzeug/http.py
317
33404
# -*- coding: utf-8 -*- """ werkzeug.http ~~~~~~~~~~~~~ Werkzeug comes with a bunch of utilities that help Werkzeug to deal with HTTP data. Most of the classes and functions provided by this module are used by the wrappers, but they are useful on their own, too, especially if the response and ...
apache-2.0
NeuralEnsemble/neuroConstruct
lib/jython/Lib/re.py
153
12959
# # Secret Labs' Regular Expression Engine # # re-compatible interface for the sre matching engine # # Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. # # This version of the SRE library can be redistributed under CNRI's # Python 1.6 license. For any other use, please contact Secret Labs # AB (info@py...
gpl-2.0
mstriemer/addons-server
src/olympia/editors/views_themes.py
4
18329
import datetime import json from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db.models import Q from django.forms.formsets import formset_factory from django.shortcuts import get_object_or_404, redirect from django.utils.datastructures import MultiValueDictKeyError fro...
bsd-3-clause
Cinntax/home-assistant
tests/components/cloud/test_init.py
2
7144
"""Test the cloud component.""" from unittest.mock import patch import pytest from homeassistant.core import Context from homeassistant.exceptions import Unauthorized from homeassistant.auth.const import GROUP_ID_ADMIN from homeassistant.components import cloud from homeassistant.components.cloud.const import DOMAIN ...
apache-2.0
SiccarPoint/numpy
numpy/lib/tests/test__datasource.py
68
10445
from __future__ import division, absolute_import, print_function import os import sys from tempfile import mkdtemp, mkstemp, NamedTemporaryFile from shutil import rmtree from numpy.compat import asbytes from numpy.testing import ( run_module_suite, TestCase, assert_, SkipTest ) import numpy.lib._datasource as...
bsd-3-clause
raiden-network/raiden
raiden/utils/upgrades.py
1
8374
import os import sqlite3 import sys from contextlib import closing from glob import escape, glob from pathlib import Path import filelock import structlog from raiden.constants import RAIDEN_DB_VERSION from raiden.storage.sqlite import SQLiteStorage from raiden.storage.versions import VERSION_RE, filter_db_names, lat...
mit
valkjsaaa/sl4a
python/src/Lib/plat-linux2/CDROM.py
330
5035
# Generated by h2py from /usr/include/linux/cdrom.h CDROMPAUSE = 0x5301 CDROMRESUME = 0x5302 CDROMPLAYMSF = 0x5303 CDROMPLAYTRKIND = 0x5304 CDROMREADTOCHDR = 0x5305 CDROMREADTOCENTRY = 0x5306 CDROMSTOP = 0x5307 CDROMSTART = 0x5308 CDROMEJECT = 0x5309 CDROMVOLCTRL = 0x530a CDROMSUBCHNL = 0x530b CDROMREADMODE2 = 0x530c ...
apache-2.0
theolind/home-assistant
homeassistant/components/sensor/transmission.py
8
5511
""" homeassistant.components.sensor.transmission ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Monitors Transmission BitTorrent client API Configuration: To use the Transmission sensor you will need to add something like the following to your config/configuration.yaml sensor: platform: transmission name: Tra...
mit
albertocottica/microfoundations-community-management
code/edgesense copy/python/edgesense/metrics/__init__.py
2
2066
from edgesense.utils import sort_by from edgesense.content.metrics import extract_content_metrics from edgesense.network.metrics import extract_network_metrics from edgesense.utils.extract import calculate_timestamp_range from edgesense.network.utils import build_network import logging def compute_all_metrics(nodes_ma...
mit
tymmothy/dds3x25
dds3x25/dds.py
1
12274
#!/usr/bin/env python """ This is an interface library for Hantek DDS-3X25 arbitrary waveform generator. Licenced LGPL2+ Copyright (C) 2013 Domas Jokubauskis (domas@jokubauskis.lt) Copyright (C) 2014 Tymm Twillman (tymmothy@gmail.com) """ import struct import math import collections # dds3x25 imports... from usb_int...
lgpl-2.1
12yujim/pymtl
pclib/cl/queues_test.py
8
6369
#========================================================================= # queues_test.py #========================================================================= from pymtl import * from pclib.ifcs import InValRdyBundle, OutValRdyBundle from pclib.test import TestSrcSinkSim from queues import Queue, InVa...
bsd-3-clause
wezhang/vim-setup
bundle/python-mode/pymode/libs/pylama/lint/pylama_pylint/pylint/checkers/design_analysis.py
17
15085
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, o...
apache-2.0
drkitty/cyder
vendor-local/src/django-extensions/setup.py
8
3555
""" Based entirely on Django's own ``setup.py``. """ import os import sys from distutils.command.install_data import install_data from distutils.command.install import INSTALL_SCHEMES try: from setuptools import setup except ImportError: from distutils.core import setup class osx_install_data(install_data): ...
bsd-3-clause
atzengin/OCC
oc-utils/python/modtool/code_generator.py
1
2298
# # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version. # #...
gpl-3.0
2ndQuadrant/ansible
test/units/module_utils/facts/test_collector.py
78
26241
# This file is part of Ansible # -*- coding: utf-8 -*- # # # 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
ujenmr/ansible
lib/ansible/modules/cloud/azure/azure_rm_devtestlabvirtualnetwork_facts.py
16
6547
#!/usr/bin/python # # Copyright (c) 2019 Zim Kalinowski, (@zikalino) # # 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
ken-muturi/pombola
pombola/south_africa/management/commands/south_africa_import_parties.py
5
1550
''' Checks whether parties in a CSV file exist in the database and adds them if necessary. ''' import os import sys import unicodecsv from pombola.core.models import Organisation, OrganisationKind from django.core.management.base import LabelCommand class Command(LabelCommand): help = 'Import csv file of South Af...
agpl-3.0
SNAPPETITE/backend
flask/lib/python2.7/site-packages/pbr/testr_command.py
59
5446
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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...
mit
fghaas/edx-configuration
playbooks/roles/supervisor/files/pre_supervisor_checks.py
8
12225
import argparse import boto from boto.utils import get_instance_metadata from boto.exception import AWSConnectionError import hipchat import os import subprocess import traceback import socket import time # Services that should be checked for migrations. MIGRATION_COMMANDS = { 'lms': ". {env_file}; {python...
agpl-3.0
amisrs/angular-flask
angular_flask/lib/python2.7/site-packages/yaml/scanner.py
64
52446
# Scanner produces tokens of the following types: # STREAM-START # STREAM-END # DIRECTIVE(name, value) # DOCUMENT-START # DOCUMENT-END # BLOCK-SEQUENCE-START # BLOCK-MAPPING-START # BLOCK-END # FLOW-SEQUENCE-START # FLOW-MAPPING-START # FLOW-SEQUENCE-END # FLOW-MAPPING-END # BLOCK-ENTRY # FLOW-ENTRY # KEY # VALUE # AL...
mit
renner/spacewalk
backend/server/handlers/xmlrpc/queue.py
9
30018
# Queue functions on the server side. # # Copyright (c) 2008--2016 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR...
gpl-2.0
Chilledheart/chromium
tools/telemetry/PRESUBMIT.py
3
3473
# Copyright 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. def _CommonChecks(input_api, output_api): results = [] # TODO(nduca): This should call update_docs.IsUpdateDocsNeeded(). # Disabled due to crbug.com/...
bsd-3-clause
mostaphaRoudsari/Honeybee
src/Honeybee_AskMe.py
1
1992
# # Honeybee: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari # # This file is part of Honeybee. # # Copyright (c) 2013-2020, Mostapha Sadeghipour Roudsari <mostapha@ladybug.tools> # Honeybee is free software; you can redistribute it and/or modify # it under the terms of the GNU G...
gpl-3.0
xzturn/tensorflow
tensorflow/python/kernel_tests/softplus_op_test.py
22
5095
# 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
googleapis/python-aiplatform
schema/predict/prediction/google/cloud/aiplatform/v1/schema/predict/prediction_v1/types/__init__.py
3
1795
# -*- coding: utf-8 -*- # Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
murali-munna/scikit-learn
sklearn/externals/joblib/pool.py
237
23894
"""Custom implementation of multiprocessing.Pool with custom pickler This module provides efficient ways of working with data stored in shared memory with numpy.memmap arrays without inducing any memory copy between the parent and child processes. This module should not be imported if multiprocessing is not available...
bsd-3-clause
aaltinisik/OCBAltinkaya
addons/website_event/controllers/main.py
209
11805
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
ryfeus/lambda-packs
Tensorflow_OpenCV_Nightly/source/markdown/extensions/__init__.py
2
1623
""" Extensions ----------------------------------------------------------------------------- """ class Extension: """ Base class for extensions to subclass. """ def __init__(self, configs = {}): """Create an instance of an Extention. Keyword arguments: * configs: A dict of configurati...
mit
wdv4758h/ZipPy
edu.uci.python.benchmark/src/benchmarks/euler31-timed.py
1
1614
#runas solve() #unittest.skip recursive generator #pythran export solve() # 01/08/14 modified for benchmarking by Wei Zhang import sys, time COINS = [1, 2, 5, 10, 20, 50, 100, 200] # test def _sum(iterable): sum = None for i in iterable: if sum is None: sum = i else: su...
bsd-3-clause
angelapper/edx-platform
common/lib/xmodule/xmodule/split_test_module.py
8
29984
""" Module for running content split tests """ import logging import json from webob import Response from uuid import uuid4 from operator import itemgetter from xmodule.progress import Progress from xmodule.seq_module import SequenceDescriptor from xmodule.studio_editable import StudioEditableModule, StudioEditableDe...
agpl-3.0
sbellem/bitcoin
qa/rpc-tests/test_framework/script.py
91
23849
# # script.py # # This file is modified from python-bitcoinlib. # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # """Scripts Functionality to build scripts, as well as SignatureHash(). """ from __future__ import absolute_i...
mit
mschenck/aurora
src/main/python/apache/aurora/executor/common/resource_manager.py
13
4112
# # 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 ...
apache-2.0
rysson/filmkodi
plugin.video.mrknow/mylib/third_party/pep8/lib2to3/lib2to3/fixer_base.py
305
6846
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Base class for fixers (optional, but recommended).""" # Python imports import logging import itertools # Local imports from .patcomp import PatternCompiler from . import pygram from .fixer_util import does_tree_imp...
apache-2.0
xiaoyaozi5566/GEM5_DRAMSim2
ext/ply/test/yacc_unused.py
174
1669
# ----------------------------------------------------------------------------- # yacc_unused.py # # A grammar with an unused rule # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex import tok...
bsd-3-clause
longde123/MultiversePlatform
lib/IPCE/Lib/ctypes.py
1
5974
# Copyright (c) 2006 Seo Sanghyeon # 2006-06-08 sanxiyn Created # 2006-06-11 sanxiyn Implemented .value on primitive types # 2006-11-02 sanxiyn Support for multiple signatures __all__ = [ 'c_int', 'c_float', 'c_double', 'c_char_p', 'c_void_p', 'LibraryLoader', 'CDLL', 'cdll', 'byref', 'sizeof' ] # --...
mit
localprojects/Change-By-Us
lib/jinja2/testsuite/core_tags.py
90
10914
# -*- coding: utf-8 -*- """ jinja2.testsuite.core_tags ~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the core tags like for and if. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Environment...
agpl-3.0