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
halfwit/qutebrowser
tests/unit/completion/test_completer.py
2
8668
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016 Ryan Roden-Corrent (rcorre) <ryan@rcorre.net> # # 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 Software Foun...
gpl-3.0
analyseuc3m/ANALYSE-v1
common/djangoapps/terrain/stubs/edxnotes.py
23
12039
""" Stub implementation of EdxNotes for acceptance tests """ import json import re from uuid import uuid4 from datetime import datetime from copy import deepcopy from math import ceil from urllib import urlencode from .http import StubHttpRequestHandler, StubHttpService class StubEdxNotesServiceHandler(StubHttpRequ...
agpl-3.0
thecocce/crypto-un-locker
CryptoUnLocker.py
2
10737
#!/usr/bin/env python import struct import os import argparse import shutil import sys from collections import namedtuple from datetime import datetime import csv import re from Crypto.Cipher import AES from Crypto.PublicKey import RSA from Crypto.Cipher import PKCS1_v1_5 from Crypto.Hash import SHA from Crypto.Util....
mit
home-assistant/home-assistant
homeassistant/components/firmata/binary_sensor.py
14
2018
"""Support for Firmata binary sensor input.""" import logging from homeassistant.components.binary_sensor import BinarySensorEntity from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_NAME, CONF_PIN from homeassistant.core import HomeAssistant from .const import CONF_NEGATE_STAT...
apache-2.0
CCLab/sezam
djcelery/tests/test_loaders.py
3
1434
from __future__ import absolute_import from celery import loaders from djcelery import loaders as djloaders from djcelery.tests.utils import unittest class TestDjangoLoader(unittest.TestCase): def setUp(self): self.loader = djloaders.DjangoLoader() def test_get_loader_cls(self): self.asse...
bsd-3-clause
google-research/dads
lib/py_uniform_replay_buffer.py
1
8796
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
jankeromnes/depot_tools
third_party/boto/compat.py
79
1335
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
bsd-3-clause
moazzemi/HAMEX
cpu/gem5/ext/mcpat/regression/regression.py
43
9230
#!/usr/bin/env python # Copyright (c) 2010-2013 Advanced Micro Devices, 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 # not...
mit
chauhanhardik/populo
common/djangoapps/terrain/stubs/tests/test_lti_stub.py
172
4269
""" Unit tests for stub LTI implementation. """ from mock import Mock, patch import unittest import urllib2 import requests from terrain.stubs.lti import StubLtiService class StubLtiServiceTest(unittest.TestCase): """ A stub of the LTI provider that listens on a local port and responds with pre-defined gr...
agpl-3.0
alyosha1879/ryu
ryu/cmd/ryu_base.py
14
2467
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2014 YAMAMOTO Takashi <yamamoto at valinux co jp> # # 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:...
apache-2.0
pilou-/ansible
test/units/modules/network/cnos/test_cnos_linkagg.py
32
4430
# # (c) 2018 Red Hat Inc. # Copyright (C) 2017 Lenovo. # # 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 la...
gpl-3.0
fwilk/paperless
src/documents/migrations/0010_log.py
3
1117
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-02-27 17:54 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('documents', '0009_auto_20160214_0040'), ] operations = [ migrations.CreateMode...
gpl-3.0
rajalokan/nova
nova/db/sqlalchemy/migrate_repo/versions/277_add_fixed_ip_updated_index.py
73
1488
# 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 the Li...
apache-2.0
KhronosGroup/COLLADA-CTS
StandardDataSets/collada/library_effects/effect/profile_COMMON/technique/constant/emission/_reference_effect_constant_emission_black/_reference_effect_constant_emission_black.py
28
3721
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publ...
mit
necsst-nms/PMAL_TRACE
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
BIGBALLON/cifar-10-cnn
1_Lecun_Network/LeNet_dp_da_keras.py
1
2768
import keras import numpy as np from keras import optimizers from keras.datasets import cifar10 from keras.models import Sequential from keras.layers import Conv2D, Dense, Flatten, MaxPooling2D from keras.callbacks import LearningRateScheduler, TensorBoard from keras.preprocessing.image import ImageDataGenerator batch...
mit
plotly/plotly.py
packages/python/plotly/_plotly_future_/__init__.py
2
1832
import warnings import functools # Initialize _future_flags with all future flags that are now always in # effect. _future_flags = { "renderer_defaults", "template_defaults", "extract_chart_studio", "remove_deprecations", "v4_subplots", "orca_defaults", "timezones", "trace_uids", } de...
mit
byterom/android_external_chromium_org
build/android/buildbot/bb_run_bot.py
25
11032
#!/usr/bin/env python # # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import collections import copy import json import os import pipes import re import subprocess import sys import bb_utils sys.pa...
bsd-3-clause
ryansb/boto
tests/unit/test_regioninfo.py
96
5164
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
mit
nanditav/15712-TensorFlow
tensorflow/python/kernel_tests/one_hot_op_test.py
25
13164
# 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
gurneyalex/stock-logistics-workflow
stock_picking_reorder_lines/stock.py
9
1938
# -*- coding: utf-8 -*- # # # Author: Alexandre Fayolle # Copyright 2013 Camptocamp SA # # Author: Damien Crier # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the...
agpl-3.0
dvitme/odoo-addons
account_journal_active/__openerp__.py
1
1665
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
agpl-3.0
MitchTalmadge/Emoji-Tools
src/main/resources/PythonScripts/fontTools/ttLib/tables/V_D_M_X_.py
3
8286
from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * from . import DefaultTable from fontTools.misc import sstruct from fontTools.misc.textTools import safeEval import struct VDMX_HeaderFmt = """ > # big endian version: H # Version number (0 or 1) ...
gpl-3.0
shoopio/shoop
shuup_tests/core/test_staff_only_behavior.py
2
1384
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import pytest from shuup.core.models import StaffOnlyBehaviorComp...
agpl-3.0
mskvortsov/coreclr
tests/scripts/format.py
32
8406
#!/usr/bin/env python # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. ## See the LICENSE file in the project root for more information. # ## # Title :format.py # #####################################################...
mit
androidarmv6/android_external_chromium_org
tools/telemetry/telemetry/core/backends/chrome/inspector_page_unittest.py
24
1962
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.core import util from telemetry.unittest import tab_test_case class InspectorPageTest(tab_test_case.TabTestCase): def __init__(self, *args...
bsd-3-clause
jurcicek/extended-hidden-vector-state-parser
semantics-4/src/extractSmntcs.py
1
5995
#!//usr/bin/python # -*- coding: UTF-8 -*- import sys import getopt import os from os.path import * import glob from xml.dom import minidom import re import struct import codecs from StringIO import StringIO import toolkit from lexMap import * from observation import * from semantics import * ######################...
gpl-2.0
bobvanderlinden/machinekit
src/machinetalk/nanopb/generator/nanopb_generator.py
8
53774
#!/usr/bin/python '''Generate header file for nanopb from a ProtoBuf FileDescriptorSet.''' nanopb_version = "nanopb-0.3.3-dev" import sys try: # Add some dummy imports to keep packaging tools happy. import google, distutils.util # bbfreeze seems to need these import pkg_resources # pyinstaller / protobuf...
lgpl-2.1
dkubiak789/odoo
addons/crm/validate_email.py
462
5978
# RFC 2822 - style email validation for Python # (c) 2012 Syrus Akbary <me@syrusakbary.com> # Extended from (c) 2011 Noel Bush <noel@aitools.org> # for support of mx and user check # This code is made available to you under the GNU LGPL v3. # # This module provides a single method, valid_email_address(), # which return...
agpl-3.0
edgarli/proj8
env/lib/python3.4/site-packages/simplejson/encoder.py
43
26764
"""Implementation of JSONEncoder """ from __future__ import absolute_import import re from operator import itemgetter # Do not import Decimal directly to avoid reload issues import decimal from .compat import u, unichr, binary_type, string_types, integer_types, PY3 def _import_speedups(): try: from . import...
artistic-2.0
xionzz/earthquake
venv/lib/python2.7/site-packages/setuptools/extension.py
165
1731
import sys import re import functools import distutils.core import distutils.extension from setuptools.dist import _get_unpatched _Extension = _get_unpatched(distutils.core.Extension) def have_pyrex(): """ Return True if Cython or Pyrex can be imported. """ pyrex_impls = 'Cython.Distutils.build_ext',...
mit
shsingh/ansible
lib/ansible/modules/cloud/google/gce_snapshot.py
29
6899
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
averainy/averainy
catsup/catsup/cli.py
1
6122
import sys import os major = sys.version_info[0] if major < 3: reload(sys) sys.setdefaultencoding('utf-8') from catsup.options import g from catsup.logger import logger, enable_pretty_logging enable_pretty_logging() import catsup doc = """Catsup v%s Usage: catsup init [<path>] catsup build [-s <fi...
gpl-2.0
xArm-Developer/xArm-Python-SDK
example/wrapper/common/6002-set_fense_mode.py
1
1032
#!/usr/bin/env python3 # Software License Agreement (BSD License) # # Copyright (c) 2019, UFACTORY, Inc. # All rights reserved. # # Author: Vinman <vinman.wen@ufactory.cc> <vinman.cub@gmail.com> """ Example: Set reduced mode """ import os import sys import time sys.path.append(os.path.join(os.path.dirname(__file__), ...
bsd-3-clause
destinmoulton/squabble
pythonclient/venv/lib/python2.7/site-packages/pip/commands/show.py
344
2767
import os from pip.basecommand import Command from pip.log import logger from pip._vendor import pkg_resources class ShowCommand(Command): """Show information about one or more installed packages.""" name = 'show' usage = """ %prog [options] <package> ...""" summary = 'Show information about in...
mit
Dob3r/python_training
test/test_add_contact.py
1
1462
# -*- coding: utf-8 -*- from model.contact import * import re import pytest # фикстуры теста def test_add_contact(app, db, json_contacts_personinfo, json_contacts_contactinfo, check_ui): personinfo = json_contacts_personinfo contactinfo = json_contacts_contactinfo with pytest.a...
apache-2.0
ahtn/keyplus
host-software/keyplus_flasher.py
1
55673
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2017 jem@seethis.link # Licensed under the MIT license (http://opensource.org/licenses/MIT) if 1: # PyQt <-> PySide signal compatability from PyQt5.QtCore import pyqtSlot, pyqtSignal Signal = pyqtSignal Slot = pyqtSlot # TODO: narrow down...
mit
Fruit-Snacks/aima-python
submissions/Capps/myCSPs.py
18
2926
import csp rgb = ['R', 'G', 'B'] domains = { 'AL': rgb, 'AZ': rgb, 'AR': rgb, 'CA': rgb, 'CO': rgb, 'CT': rgb, 'DE': rgb, 'FL': rgb, 'GA': rgb, 'ID': rgb, 'IL': rgb, 'IN': rgb, 'IA': rgb, 'KS': rgb, 'KY': rgb, 'LA': rgb, 'ME': rgb, 'MD': rgb, ...
mit
ballschin52/support-tools
googlecode-issues-exporter/generate_user_map.py
151
3446
# 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 required by applicable law or a...
apache-2.0
cgimenop/Excel2Testlink
ExcelParser/lib/jdcal-1.0/jdcal.py
19
14903
# -*- coding:utf-8 -*- """Functions for converting between Julian dates and calendar dates. A function for converting Gregorian calendar dates to Julian dates, and another function for converting Julian calendar dates to Julian dates are defined. Two functions for the reverse calculations are also defined. Different ...
mit
joopert/home-assistant
homeassistant/components/bbox/device_tracker.py
2
2593
"""Support for French FAI Bouygues Bbox routers.""" from collections import namedtuple from datetime import timedelta import logging from typing import List import pybbox import voluptuous as vol from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCHEMA, DeviceScanner, ) from homeassi...
apache-2.0
zhukaixy/kbengine
kbe/src/lib/python/Lib/test/multibytecodec_support.py
60
14522
# # multibytecodec_support.py # Common Unittest Routines for CJK codecs # import codecs import os import re import sys import unittest from http.client import HTTPException from test import support from io import BytesIO class TestBase: encoding = '' # codec name codec = None # codec tupl...
lgpl-3.0
psantann/zerorpc-python
zerorpc/exceptions.py
134
1861
# -*- coding: utf-8 -*- # Open Source Initiative OSI - The MIT License (MIT):Licensing # # The MIT License (MIT) # Copyright (c) 2012 DotCloud Inc (opensource@dotcloud.com) # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Softwa...
mit
opensourcechipspark/platform_external_chromium_org
tools/telemetry/telemetry/core/chrome/extension_dict_backend.py
23
2588
# 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 json import re import weakref from telemetry.core import extension_page from telemetry.core.chrome import inspector_backend class ExtensionNotFou...
bsd-3-clause
Huyuwei/tvm
tests/python/relay/test_pass_fold_scale_axis.py
2
23654
# 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
jcchin/MagnePlane
paper/code/example1.py
13
1663
from openmdao.main.api import Assembly from openmdao.lib.datatypes.api import Float, Int from openmdao.lib.drivers.api import BroydenSolver from openmdao.lib.casehandlers.api import CSVCaseRecorder from hyperloop.api import (TubeLimitFlow, CompressionSystem, TubeWallTemp, Pod, Mission) class HyperloopPod(Assemb...
apache-2.0
r-o-b-b-i-e/pootle
pytest_pootle/fixtures/core/utils/wordcount.py
11
2691
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from collections import OrderedDict import ...
gpl-3.0
anisku11/sublimeku
Packages/pygments/all/pygments/token.py
13
5813
# -*- coding: utf-8 -*- """ pygments.token ~~~~~~~~~~~~~~ Basic token types and the standard tokens. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ class _TokenType(tuple): parent = None def split(self): buf = [] ...
mit
bt3gl/Project-Euler
065-100th-e-numerator.py
2
1065
#!/usr/bin/python __author__ = "Mari Wahl" __email__ = "marina.w4hl@gmail.com" ''' e = [2; 1,2,1, 1,4,1, 1,6,1 , ... , 1,2k,1, ...]. The first ten terms in the sequence of convergents for e are: 2, 3, 8/3, 11/4, 19/7, 87/32, 106/39, 193/71, 1264/465, 1457/536, ... The sum of digits in the numerator of the 10th conv...
mit
devigned/autorest
Samples/azure-storage/Azure.Python/storagemanagementclient/operations/usage_operations.py
3
3650
# coding=utf-8 # -------------------------------------------------------------------------- # -------------------------------------------------------------------------- from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError import uuid from .. import models class UsageOper...
mit
oxnz/NZChat
NZChat/cast/test.py
2
5326
#!/usr/bin/env python #-*- coding: utf-8 -*- # server has a table of thread, which thread update the process bar from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4.QtNetwork import * import sys import time class NZFileSendThread(QThread): def __init__(self, parent=None): super(NZFileSenderThread, self...
mit
jwheare/digest
digestfetch.py
1
8721
#!/usr/bin/env python # encoding: utf-8 """ digestfetch.py Fetch bitesize content from the world of the web for use in a daily digest pocketmod """ import sitecustomize # Builtin modules from copy import copy from operator import itemgetter import re import time, datetime import urllib, urllib2, httplib # 3rd party ...
bsd-3-clause
looker/sentry
src/sentry/runner/settings.py
3
5134
""" sentry.runner.settings ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import os import click DEFAULT_SETTINGS_MODULE = 'sentry.conf.server' DEFAULT_SETTINGS_CONF ...
bsd-3-clause
nathandaddio/puzzle_app
puzzle_app/puzzle_app/tests/views/test_hitori_views.py
1
2961
import pytest from pyramid.exceptions import HTTPNotFound from puzzle_app.views.hitori import hitori_boards_get, hitori_board_get from factories import ( HitoriGameBoardFactory, HitoriGameBoardCellFactory ) class TestHitoriGameBoardsGet: @pytest.fixture def board(self, db_session): board ...
mit
kcarnold/autograd
examples/fluidsim/fluidsim.py
2
4623
from __future__ import absolute_import from __future__ import print_function import autograd.numpy as np from autograd import value_and_grad from scipy.optimize import minimize from scipy.misc import imread import matplotlib import matplotlib.pyplot as plt import os from builtins import range # Fluid simulation code...
mit
ffalcinelli/django-ejabberd-bridge
ejabberd_bridge/tests.py
2
7615
# -*- coding: utf-8 -*- # Copyright (C) 2013 Fabio Falcinelli # # 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. # # Thi...
lgpl-3.0
GunoH/intellij-community
python/helpers/pydev/pydevd_attach_to_process/winappdbg/interactive.py
102
85840
#!~/.wine/drive_c/Python25/python.exe # -*- coding: utf-8 -*- # Acknowledgements: # Nicolas Economou, for his command line debugger on which this is inspired. # http://tinyurl.com/nicolaseconomou # Copyright (c) 2009-2014, Mario Vilas # All rights reserved. # # Redistribution and use in source and binary forms, wit...
apache-2.0
mdibaiee/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/tests/performance/concatenation.py
451
1145
from __future__ import absolute_import, division, unicode_literals def f1(): x = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ" y = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ" z = "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ" x += y + z def f2(): x = "ABCDEFGHIJKLMNOP...
mpl-2.0
huiren/ece511
src/python/m5/util/multidict.py
85
5241
# Copyright (c) 2005 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
syaiful6/django
django/utils/tree.py
372
4883
""" A class for storing a tree graph. Primarily used for filter constructs in the ORM. """ import copy class Node(object): """ A single internal node in the tree graph. A Node should be viewed as a connection (the root) with the children being either leaf nodes or other Node instances. """ # ...
bsd-3-clause
ouziel-slama/compose
tests/unit/log_printer_test.py
6
1755
from __future__ import unicode_literals from __future__ import absolute_import import os from fig.cli.log_printer import LogPrinter from .. import unittest class LogPrinterTest(unittest.TestCase): def get_default_output(self, monochrome=False): def reader(*args, **kwargs): yield "hello\nworld...
apache-2.0
mahak/neutron
neutron/db/migration/alembic_migrations/dvr_init_opts.py
14
2619
# Copyright 2015 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
kvar/ansible
lib/ansible/modules/network/fortios/fortios_spamfilter_fortishield.py
13
9400
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # 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 Lic...
gpl-3.0
equialgo/scikit-learn
sklearn/decomposition/kernel_pca.py
19
10960
"""Kernel Principal Components Analysis""" # Author: Mathieu Blondel <mathieu@mblondel.org> # License: BSD 3 clause import numpy as np from scipy import linalg from ..utils import check_random_state from ..utils.arpack import eigsh from ..utils.validation import check_is_fitted, check_array from ..exceptions import ...
bsd-3-clause
flybird119/voltdb
lib/python/voltcli/voltdb.d/recover.py
5
2037
# This file is part of VoltDB. # Copyright (C) 2008-2015 VoltDB Inc. # # This file contains original code and/or modifications of original code. # Any modifications made by VoltDB Inc. are licensed under the following # terms and conditions: # # Permission is hereby granted, free of charge, to any person obtaining # a...
agpl-3.0
todaychi/hue
desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/chart/area_chart.py
10
2944
from __future__ import absolute_import #Autogenerated schema from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( Typed, Set, Bool, Integer, Sequence, Alias, ) from openpyxl.descriptors.excel import ExtensionList from openpyxl.descriptors.nested import (...
apache-2.0
40223151/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/xml/dom/minicompat.py
781
3228
"""Python version compatibility support for minidom.""" # This module should only be imported using "import *". # # The following names are defined: # # NodeList -- lightest possible NodeList implementation # # EmptyNodeList -- lightest possible NodeList that is guaranteed to # remain empty...
gpl-3.0
pkilambi/ceilometer
ceilometer/tests/telemetry/test_notifications.py
3
3962
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
weisongchen/flaskapp
venv/lib/python2.7/site-packages/flask/json.py
121
9183
# -*- coding: utf-8 -*- """ flask.jsonimpl ~~~~~~~~~~~~~~ Implementation helpers for the JSON support in Flask. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import io import uuid from datetime import date from .globals import current_app, request from ._...
mit
hamptus/mftpy
mftpy/mft.2.7/tools/extract.py
1
2716
""" This tool is used to extract MFT entries """ from mft.meta.boot import BootFile # FIXME pass an argument to function so it knows if you are extracting from disk or partition def extract_meta(partition=None): """ Extract the system meta files from a partition """ bootdata = open(partition, 'rb')....
gpl-3.0
iblis17/ultisnips
pythonx/UltiSnips/snippet_manager.py
1
31801
#!/usr/bin/env python # encoding: utf-8 """Contains the SnippetManager facade used by all Vim Functions.""" from collections import defaultdict from functools import wraps import os import platform import traceback import sys import vim import re from contextlib import contextmanager from UltiSnips import _vim from ...
gpl-3.0
atuljain/odoo
addons/account_bank_statement_extensions/wizard/__init__.py
442
1125
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
agpl-3.0
MichalKononenko/python-qinfer
src/qinfer/derived_models.py
2
35703
#!/usr/bin/python # -*- coding: utf-8 -*- ## # derived_models.py: Models that decorate and extend other models. ## # © 2012 Chris Ferrie (csferrie@gmail.com) and # Christopher E. Granade (cgranade@gmail.com) # # This file is a part of the Qinfer project. # Licensed under the AGPL version 3. ## # This progra...
agpl-3.0
GeekTrainer/Flask
Work/Trivia - Module 5/env/Lib/site-packages/werkzeug/testsuite/contrib/cache.py
145
7212
# -*- coding: utf-8 -*- """ werkzeug.testsuite.cache ~~~~~~~~~~~~~~~~~~~~~~~~ Tests the cache system :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import time import unittest import tempfile import shutil from werkzeug.testsuite import Werkzeug...
apache-2.0
squirrelo/qiita
qiita_db/support_files/patches/python_patches/36.py
1
4367
from random import SystemRandom from string import ascii_letters, digits from os.path import exists, join, basename from tarfile import open as taropen from qiita_db.sql_connection import TRN from qiita_db.artifact import Artifact from qiita_db.util import (insert_filepaths, convert_to_id, get_mountpoint, ...
bsd-3-clause
noba3/KoTos
addons/script.module.beautifulsoup4/lib/bs4/builder/_htmlparser.py
412
8839
"""Use the HTMLParser library to parse HTML files that aren't too bad.""" __all__ = [ 'HTMLParserTreeBuilder', ] from HTMLParser import ( HTMLParser, HTMLParseError, ) import sys import warnings # Starting in Python 3.2, the HTMLParser constructor takes a 'strict' # argument, which we'd like to s...
gpl-2.0
xxd3vin/spp-sdk
opt/Python27/Lib/encodings/cp1006.py
593
13824
""" Python Character Mapping Codec cp1006 generated from 'MAPPINGS/VENDORS/MISC/CP1006.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors...
mit
liamgh/liamgreenhughes-sl4a-tf101
python/src/Lib/test/test_sha.py
58
1694
# Testing sha module (NIST's Secure Hash Algorithm) # use the three examples from Federal Information Processing Standards # Publication 180-1, Secure Hash Standard, 1995 April 17 # http://www.itl.nist.gov/div897/pubs/fip180-1.htm import warnings warnings.filterwarnings("ignore", "the sha module is deprecated.*", ...
apache-2.0
jbrt/Array-XRay
arrays/vmax/vmax_filters.py
1
8430
#!/usr/bin/env python3 # coding: utf-8 """ These objects are going to filter the input data and only keep the interesting attributes. Convert of capacity units may be occur to stay more consistent between arrays. """ import abc from collections import OrderedDict class VMAXFilter(object, metaclass=abc.ABCMeta): ...
lgpl-3.0
techsd/namebench
nb_third_party/jinja2/meta.py
406
4144
# -*- coding: utf-8 -*- """ jinja2.meta ~~~~~~~~~~~ This module implements various functions that exposes information about templates that might be interesting for various kinds of applications. :copyright: (c) 2010 by the Jinja Team, see AUTHORS for more details. :license: BSD, see LICENSE fo...
apache-2.0
MER-GROUP/intellij-community
plugins/hg4idea/testData/bin/mercurial/hook.py
93
7881
# hook.py - hook support for mercurial # # Copyright 2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from i18n import _ import os, sys, time, types import extensions, util, demandimport def _py...
apache-2.0
fdvarela/odoo8
addons/board/__init__.py
439
1144
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
simontakite/sysadmin
pythonscripts/programmingpython/Ai/TicTacToe/tictactoe_lists.py
2
19386
# this file has been updated for Python 3.X # at least enough to run--I'd probably change more given time and need import random, sys, time from tkinter import * from tkinter.messagebox import showinfo, askyesno from PP4E.Gui.Tools.guimaker import GuiMakerWindowMenu User, Machine = 'user', 'machine' #...
gpl-2.0
motion2015/a3
common/djangoapps/terrain/stubs/video_source.py
181
1368
""" Serve HTML5 video sources for acceptance tests """ from SimpleHTTPServer import SimpleHTTPRequestHandler from .http import StubHttpService from contextlib import contextmanager import os from logging import getLogger LOGGER = getLogger(__name__) class VideoSourceRequestHandler(SimpleHTTPRequestHandler): """ ...
agpl-3.0
crmccreary/openerp_server
openerp/addons/account/wizard/account_unreconcile.py
9
2131
# -*- 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
rodo/django-perf
foo/loader/management/commands/delete_all.py
1
1510
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2013,2014 Rodolphe Quiédeville <rodolphe@quiedeville.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either ver...
gpl-3.0
Snesi/spindl
spindl_lib/charter.py
1
14820
#!/usr/bin/python # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # Copyright (C) 2013 <Zane Swafford> <zane@zaneswafford.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 obtai...
apache-2.0
jenshnielsen/basemap
examples/maskoceans.py
4
1922
from mpl_toolkits.basemap import Basemap, shiftgrid, maskoceans, interp import numpy as np import matplotlib.pyplot as plt # example showing how to mask out 'wet' areas on a contour or pcolor plot. topodatin = np.loadtxt('etopo20data.gz') lonsin = np.loadtxt('etopo20lons.gz') latsin = np.loadtxt('etopo20lats.gz') #...
gpl-2.0
Dexus/ubuntu-trusty-postfix
debian/tests/test-postfix.py
1
21854
#!/usr/bin/python # # test-postfix.py quality assurance test script for postfix # Copyright (C) 2008-2012 Canonical Ltd. # Author: Kees Cook <kees@ubuntu.com> # Author: Marc Deslauriers <marc.deslauriers@canonical.com> # Author: Jamie Strandboge <jamie@canonical.com> # # This program is free software:...
epl-1.0
abstract-open-solutions/OCB
addons/website_report/report.py
257
2124
# -*- 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
jdinuncio/ansible-modules-extras
cloud/centurylink/clc_publicip.py
23
12571
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # # 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 la...
gpl-3.0
grevutiu-gabriel/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/failuremap.py
134
4062
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
alphageek-xyz/site
landing/models.py
1
1448
import re from django.db import models from django.utils.functional import cached_property from landing.utils import markup_markdown class ServiceManager(models.Manager): def last_modified(self): return self.latest('modified').modified class Service(models.Model): objects = ServiceManager() class...
bsd-3-clause
adamchainz/ansible
lib/ansible/modules/packaging/language/pear.py
70
7380
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2012, Afterburn <http://github.com/afterburn> # (c) 2013, Aaron Bull Schaefer <aaron@elasticdog.com> # (c) 2015, Jonathan Lestrelin <jonathan.lestrelin@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # i...
gpl-3.0
captainpete/rethinkdb
external/gtest_1.6.0/test/gtest_output_test.py
1733
12005
#!/usr/bin/env python # # Copyright 2008, 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...
agpl-3.0
kailIII/emaresa
trunk.pe/reportes_tributarios/report/libro_compra.py
2
14001
# -*- coding: utf-8 -*- ############################################################################## # # Author: OpenDrive Ltda # Copyright (c) 2013 Opendrive Ltda # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of assessing all potential # cons...
agpl-3.0
Brazelton-Lab/bio_utils
bio_utils/blast_tools/retrieve_query_sequences.py
1
6139
#! /usr/bin/env python3 """Returns query sequence from BLAST hits below a specified E-Value Usage: retrieve_query_sequences.py --fastqq <FASTA or FASTQ file> --b6 <B6 or M8 file> --e_value <max E-Value> --output <output file> [--fastq] Copyright: ...
gpl-3.0
ktriponis/ansible-modules-core
system/sysctl.py
29
11846
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, David "DaviXX" CHANIAL <david.chanial@gmail.com> # (c) 2014, James Tanner <tanner.jc@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 ...
gpl-3.0
sebrandon1/nova
nova/tests/unit/cert/test_rpcapi.py
18
2926
# Copyright 2012, 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 # # Unless required by applicable law or agr...
apache-2.0
solent-eng/solent
solent/ext/windows_form_grid_console/ext.py
2
1387
# // license # Copyright 2016, Free Software Foundation. # # This file is part of Solent. # # Solent 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 Foundation, either version 3 of the License, or (at your option) ...
lgpl-3.0