repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
kmonsoor/py-amqplib
tests/client_0_8/settings.py
10
2842
""" Parse commandline args for running unittests. Used by the overall run_all.py script, or the various indivudial test modules that need settings for connecting to a broker. """ # Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org> # # This library is free software; you can redistribute it and/or # modify it unde...
lgpl-2.1
OpenUpgrade-dev/OpenUpgrade
addons/account/account_move_line.py
9
78170
# -*- 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
xifle/home-assistant
homeassistant/components/remote/demo.py
18
1545
""" Demo platform that has two fake remotes. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ from homeassistant.components.remote import RemoteDevice from homeassistant.const import DEVICE_DEFAULT_NAME # pylint: disable=unused-argument def setup_...
mit
ogrisel/keras
keras/datasets/imdb.py
37
1855
from __future__ import absolute_import import six.moves.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_from=3)...
mit
ronkyo/mi-instrument
mi/core/instrument/test/test_data_particle.py
10
11299
#!/usr/bin/env python """ @package mi.core.instrument.test.test_data_particle @file mi/core/instrument/test/test_data_particle.py @author Steve Foley @brief Test cases for the base data_particle module """ __author__ = 'Steve Foley' __license__ = 'Apache 2.0' import json import base64 import time import ntplib fro...
bsd-2-clause
RealSelf/serverless-email-to-slack
download_vendored/Crypto/Cipher/Blowfish.py
116
4460
# -*- coding: utf-8 -*- # # Cipher/Blowfish.py : Blowfish # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty...
bsd-3-clause
rodrigofaccioli/drugdesign
virtualscreening/vina/spark/log_to_json.py
1
1575
from pyspark import SparkContext, SparkConf, SparkFiles from pyspark.sql import SQLContext, Row import configparser import os from vina_utils import get_files_log from json_utils import create_jsondata_from_docking_output_file, create_json_file from os_utils import make_directory def log_to_json(log_file): ...
apache-2.0
e-koch/TurbuStat
turbustat/statistics/dendrograms/dendro_stats.py
2
34290
# Licensed under an MIT open source license - see LICENSE from __future__ import print_function, absolute_import, division ''' Dendrogram statistics as described in Burkhart et al. (2013) Two statistics are contained: * number of leaves + branches vs. $\delta$ parameter * statistical moments of the intensity ...
mit
KousikaGanesh/purchaseandInventory
openerp/addons/inward_master/__init__.py
1
1077
# -*- 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...
agpl-3.0
skg-net/ansible
lib/ansible/utils/color.py
146
3893
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
mrbell/connectfour
connectfour.py
1
3206
#!/usr/bin/env python """ connectfour.py The connect four gameplay application. """ """ Copyright 2012 Michael Bell This file is part of connectfour. connectfour is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation...
gpl-3.0
vipul-sharma20/oh-mainline
vendor/packages/distribute/tests/manual_test.py
64
3020
#!/usr/bin/env python import sys if sys.version_info[0] >= 3: raise NotImplementedError('Py3 not supported in this test yet') import os import shutil import tempfile from distutils.command.install import INSTALL_SCHEMES from string import Template from urllib2 import urlopen try: import subprocess def _s...
agpl-3.0
akhof/PySaved
PySaved/src/PyInstaller/lib/macholib/MachOGraph.py
11
3782
""" Utilities for reading and writing Mach-O headers """ import os import sys from altgraph.Graph import Graph from altgraph.ObjectGraph import ObjectGraph from macholib.mach_o import * from macholib.dyld import dyld_find from macholib.MachO import MachO from macholib.itergraphreport import itergraphreport __all__ ...
gpl-2.0
m11s/MissionPlanner
Lib/encodings/cp857.py
93
34858
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP857.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors=...
gpl-3.0
knuu/competitive-programming
atcoder/corp/caddi2018_e.py
1
1094
def main() -> None: N = int(input()) A = [int(x) for x in input().split()] rev_A = A[:] left = [-1] * N left_cnt = [0] * N A_left = [A[0]] for i in range(1, N): if rev_A[i-1] < rev_A[i]: cnt = 0 while rev_A[i-1] pass elif rev_A[i-1] < rev_A...
mit
FABtotum/fabui-colibri
fabui/ext/py/fabtotum/fabui/bootstrap.py
2
16386
#!/bin/env python # -*- coding: utf-8; -*- # # (c) 2016 FABtotum, http://www.fabtotum.com # # This file is part of FABUI. # # FABUI 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 Licen...
gpl-2.0
jollyroger/debian-buildbot
buildbot/clients/base.py
3
2775
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
ghchinoy/tensorflow
tensorflow/contrib/kafka/python/kernel_tests/kafka_test.py
7
4196
# 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 applic...
apache-2.0
rochacbruno/dynaconf
dynaconf/vendor/ruamel/yaml/nodes.py
1
1850
from __future__ import print_function _A=None import sys from .compat import string_types if False:from typing import Dict,Any,Text class Node: __slots__='tag','value','start_mark','end_mark','comment','anchor' def __init__(A,tag,value,start_mark,end_mark,comment=_A,anchor=_A):A.tag=tag;A.value=value;A.start_mark=sta...
mit
redhat-openstack/ceilometer
ceilometer/compute/virt/vmware/inspector.py
4
8238
# Copyright (c) 2014 VMware, 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...
apache-2.0
tarzan0820/hr
__unported__/hr_payroll_period/__openerp__.py
19
2318
# -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # 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 Free Software Foundation, eit...
agpl-3.0
awkspace/ansible
test/units/module_utils/basic/test_deprecate_warn.py
127
1596
# -*- coding: utf-8 -*- # # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) import json import pytest @pytest.mark.parametrize('stdin', [{}], indirect=['stdin']) def test_warn(am, capfd): am.warn('warning1') with pytest.raises...
gpl-3.0
worldfootballcoin/WorldFootballCoin
share/qt/extract_strings_qt.py
2945
1844
#!/usr/bin/python ''' Extract _("...") strings for translation and convert to Qt4 stringdefs so that they can be picked up by Qt linguist. ''' from subprocess import Popen, PIPE import glob import operator OUT_CPP="src/qt/bitcoinstrings.cpp" EMPTY=['""'] def parse_po(text): """ Parse 'po' format produced by x...
mit
connornishijima/Lixie-projects
Raspberry Pi/Python/System Monitor/system_monitor.py
1
1263
import lixie as lix import psutil import time import commands # VARIABLES ----------------- MODE_INTERVAL = 5 # How often (in seconds) to switch data types TEMP_UNITS = "F" # Can be "F" or "C" # --------------------------- modeIndex = 0 modes = ["TEMP","CPU","MEM","DISK"] lastSwitch = 0 lix.begin(4) # Number of d...
gpl-3.0
marcusmartins/compose
tests/unit/split_buffer_test.py
54
1475
from __future__ import unicode_literals from __future__ import absolute_import from compose.cli.utils import split_buffer from .. import unittest class SplitBufferTest(unittest.TestCase): def test_single_line_chunks(self): def reader(): yield b'abc\n' yield b'def\n' yie...
apache-2.0
klaricch/Transposons2
scripts/generate_CtCp.py
1
2032
#!/usr/bin/env python # this script generates the CtCp_all_nonredundant_file # USE: generate_CtCp.py <kin_matrix_full.txt> import sys import re # get orientations of reference transposons refs="/lscr2/andersenlab/kml436/git_repos2/Transposons2/files/WB_pos_element_names.gff" ref_tes={} with open(refs, 'r') as IN: f...
mit
chanceraine/nupic.research
projects/sequence_prediction/discrete_sequences/lstm_old/predict_LSTM_2.py
2
7108
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
agpl-3.0
girving/tensorflow
tensorflow/contrib/rpc/python/ops/rpc_op.py
41
1103
# Copyright 2018 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
rosmo/ansible
test/units/modules/network/f5/test_bigip_asm_policy_signature_set.py
16
5018
# -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks 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 import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
btallman/incubator-airflow
tests/jobs.py
1
39468
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
showell/zulip
zerver/webhooks/ifttt/view.py
3
1027
from typing import Any, Dict from django.http import HttpRequest, HttpResponse from django.utils.translation import ugettext as _ from zerver.decorator import webhook_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_error, json_success from zerver.lib.webhooks.common...
apache-2.0
bjlittle/iris
lib/iris/tests/test_merge.py
1
39629
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """ Test the cube merging mechanism. """ # import iris tests first so that some things can be initialised before importing an...
lgpl-3.0
affo/nova
nova/tests/functional/v3/test_preserve_ephemeral_rebuild.py
19
2093
# Copyright 2013 IBM Corp. # # 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 t...
apache-2.0
takis/django
tests/gis_tests/gis_migrations/migrations/0001_initial.py
269
2465
from django.db import connection, migrations, models from ...models import models as gis_models ops = [ migrations.CreateModel( name='Neighborhood', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)), ('name', models.C...
bsd-3-clause
ekline/zed5
Build/Fabricate/runtests.py
1
2164
#!/usr/bin/env python ## LICENSE_BEGIN # # MIT License # # SPDX:MIT # # https://spdx.org/licenses/MIT # # See LICENSE.txt file in the top level directory. # ## LICENSE_END import optparse import os import shutil import subprocess import sys import tempfile def GetTests(test_dir, argv): def _Yield...
mit
gangadhar-kadam/laganfrappe
frappe/__init__.py
7
18765
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt """ globals attached to frappe module + some utility functions that should probably be moved """ from __future__ import unicode_literals from werkzeug.local import Local, release_local import os, importlib, inspect, ...
mit
parksandwildlife/gokart
gokart/spatial.py
1
28488
import bottle import os import sys import requests import json import pyproj import traceback import threading import math import pyproj from datetime import datetime from multiprocessing import Process,Pipe from shapely.ops import transform from shapely.geometry import shape,MultiPoint,Point from shapely.geometry.pol...
apache-2.0
runningwolf666/you-get
src/you_get/extractors/nicovideo.py
19
1688
#!/usr/bin/env python __all__ = ['nicovideo_download'] from ..common import * def nicovideo_login(user, password): data = "current_form=login&mail=" + user +"&password=" + password + "&login_submit=Log+In" response = request.urlopen(request.Request("https://secure.nicovideo.jp/secure/login?site=niconico", he...
mit
ouzel/stem
stem/util/tor_tools.py
1
3627
# Copyright 2012-2013, Damian Johnson and The Tor Project # See LICENSE for licensing information """ Miscellaneous utility functions for working with tor. **These functions are not being vended to stem users. They may change in the future, use them at your own risk.** **Module Overview:** :: is_valid_fingerprin...
lgpl-3.0
MariosPanag/coala
tests/bearlib/languages/documentation/DocumentationExtractionTest.py
5
11642
import unittest from coalib.bearlib.languages.documentation.DocstyleDefinition import ( DocstyleDefinition) from coalib.bearlib.languages.documentation.DocumentationComment import ( DocumentationComment) from coalib.bearlib.languages.documentation.DocumentationExtraction import ( extract_documentation) fro...
agpl-3.0
10-01/alc-server
external/requests/packages/urllib3/__init__.py
309
1692
# urllib3/__init__.py # Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ urllib3 - Thread-safe connection pooling and re-using. """ __author__ = 'Andrey Petrov (a...
mit
hkawasaki/kawasaki-aio8-0
common/djangoapps/terrain/stubs/ora.py
47
17337
""" Stub implementation of ORA service. This is an extremely simple version of the service, with most business logic removed. In particular, the stub: 1) Provides an infinite number of peer and calibration essays, with dummy data. 2) Simulates a set number of pending submissions for each student; grades submi...
agpl-3.0
Lukasa/cryptography
tests/hazmat/primitives/test_block.py
1
5776
# 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...
apache-2.0
shail2810/nova
nova/tests/unit/api/openstack/compute/test_server_reset_state.py
35
5107
# Copyright 2015 NEC Corporation. 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 ap...
apache-2.0
AbhiAgarwal/django-report-builder
report_builder/tests.py
1
36353
from django.contrib.contenttypes.models import ContentType from django.core import mail from django.core.urlresolvers import reverse from django.test import TestCase from .models import Report, DisplayField, FilterField, Format, get_allowed_models from .views import email_report from report_builder_demo.demo_models.mod...
bsd-3-clause
michitomo/ansible-modules-core
files/find.py
109
11313
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Ruggero Marchei <ruggero.marchei@daemonzone.net> # (c) 2015, Brian Coca <bcoca@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by #...
gpl-3.0
feroda/odoo
addons/stock/__openerp__.py
261
4008
# -*- 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
unt-libraries/catalog-api
django/sierra/sierra/tests/testmodels/migrations/0001_initial.py
1
2924
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='EndNode', fields=[ ('id', models.AutoField(verb...
bsd-3-clause
premanandchandrasekar/boto
tests/unit/glacier/test_writer.py
18
8352
# 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 ...
mit
neerajvashistha/pa-dude
lib/python2.7/site-packages/docutils/parsers/rst/directives/images.py
100
6882
# $Id: images.py 7753 2014-06-24 14:52:59Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Directives for figures and simple images. """ __docformat__ = 'reStructuredText' import sys import urllib from docutils import nodes, utils from docutils...
mit
xiangel/hue
desktop/core/src/desktop/lib/rest/http_client.py
25
5112
# Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file ex...
apache-2.0
kerr-huang/SL4A
python/src/Lib/test/test_re.py
55
37255
import sys sys.path = ['.'] + sys.path from test.test_support import verbose, run_unittest import re from re import Scanner import sys, os, traceback from weakref import proxy # Misc tests from Tim Peters' re.doc # WARNING: Don't change details in these tests if you don't know # what you're doing. Some of these test...
apache-2.0
MartinHjelmare/home-assistant
tests/components/command_line/test_cover.py
8
2546
"""The tests the cover command line platform.""" import os import tempfile from unittest import mock import pytest from homeassistant.components.cover import DOMAIN import homeassistant.components.command_line.cover as cmd_rs from homeassistant.const import ( ATTR_ENTITY_ID, SERVICE_CLOSE_COVER, SERVICE_OPEN_COVE...
apache-2.0
southpawtech/TACTIC-DEV
src/tactic/ui/startup/main_wdg.py
5
20509
########################################################### # # Copyright (c) 2010, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
ehirt/odoo
addons/product_expiry/__openerp__.py
260
1788
############################################################################## # # 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 Affero General Public L...
agpl-3.0
dmoon4117/mutagen
mutagen/monkeysaudio.py
28
2825
# -*- coding: utf-8 -*- # Copyright (C) 2006 Lukas Lalinsky # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. """Monkey's Audio streams with APEv2 tags. Monkey's Audio is a very ef...
gpl-2.0
dpgeorge/micropython
tests/net_inet/tls_num_errors.py
11
1191
# test that modtls produces a numerical error message when out of heap try: import usocket as socket, ussl as ssl, sys except: import socket, ssl, sys try: from micropython import alloc_emergency_exception_buf, heap_lock, heap_unlock except: print("SKIP") raise SystemExit # test with heap locked ...
mit
nick3085/CMTPRG01-5-praktijkopdracht-materialenapp
materialenapp/materialenapp/settings.py
1
3924
""" Django settings for materialenapp project. Generated by 'django-admin startproject' using Django 1.10.6. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ imp...
mit
skg-net/ansible
lib/ansible/modules/network/routeros/routeros_command.py
6
6506
#!/usr/bin/python # # 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 distribut...
gpl-3.0
un33k/CouchPotatoServer
libs/git/commit.py
110
3498
# Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com> # 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 li...
gpl-3.0
bak1an/django
django/db/backends/oracle/compiler.py
7
2118
from django.db.models.sql import compiler class SQLCompiler(compiler.SQLCompiler): def as_sql(self, with_limits=True, with_col_aliases=False): """ Creates the SQL for this query. Returns the SQL string and list of parameters. This is overridden from the original Query class to han...
bsd-3-clause
mtlchun/edx
common/test/acceptance/pages/studio/container.py
9
18763
""" Container page in Studio """ from bok_choy.page_object import PageObject from bok_choy.promise import Promise, EmptyPromise from . import BASE_URL from .utils import click_css, confirm_prompt, type_in_codemirror class ContainerPage(PageObject): """ Container page in Studio """ NAME_SELECTOR = '....
agpl-3.0
kennedyshead/home-assistant
tests/components/config/test_auth.py
7
11372
"""Test config entries API.""" import pytest from homeassistant.auth import models as auth_models from homeassistant.components.config import auth as auth_config from tests.common import CLIENT_ID, MockGroup, MockUser @pytest.fixture(autouse=True) def setup_config(hass, aiohttp_client): """Fixture that sets up ...
apache-2.0
whip112/Whip112
vendor/packages/pygments/styles/autumn.py
135
2144
# -*- coding: utf-8 -*- """ pygments.styles.autumn ~~~~~~~~~~~~~~~~~~~~~~ A colorful style, inspired by the terminal highlighting style. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.to...
mpl-2.0
gauribhoite/personfinder
env/google_appengine/lib/django-1.4/django/utils/html_parser.py
52
4376
import HTMLParser as _HTMLParser import re import sys current_version = sys.version_info use_workaround = ( (current_version < (2, 7, 3)) or (current_version >= (3, 0) and current_version < (3, 2, 3)) ) if not use_workaround: HTMLParser = _HTMLParser.HTMLParser else: class HTMLParser(_HTMLParser.HTML...
apache-2.0
luofei98/qgis
python/plugins/processing/algs/qgis/ftools/MultipartToSingleparts.py
2
4845
# -*- coding: utf-8 -*- """ *************************************************************************** MultipartToSingleparts.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************...
gpl-2.0
MiLk/ansible
lib/ansible/module_utils/k8s_common.py
62
12599
# # Copyright 2017 Red Hat | Ansible # # 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. # # ...
gpl-3.0
Antiun/c2c-rd-addons
picking_invoice_rel/__init__.py
4
1447
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who...
agpl-3.0
mujiansu/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/distutils/bcppcompiler.py
53
15091
"""distutils.bcppcompiler Contains BorlandCCompiler, an implementation of the abstract CCompiler class for the Borland C++ compiler. """ # This implementation by Lyle Johnson, based on the original msvccompiler.py # module and using the directions originally published by Gordon Williams. # XXX looks like there's a L...
apache-2.0
pixelgremlins/ztruck
dj/lib/python2.7/site-packages/django/contrib/gis/sitemaps/views.py
82
2239
from __future__ import unicode_literals from django.apps import apps from django.contrib.gis.db.models.fields import GeometryField from django.contrib.gis.shortcuts import render_to_kml, render_to_kmz from django.core.exceptions import FieldDoesNotExist from django.db import DEFAULT_DB_ALIAS, connections from django.h...
apache-2.0
yongshengwang/hue
desktop/core/ext-py/guppy-0.1.10/guppy/gsl/SpecNodes.py
37
16306
#._cv_part guppy.gsl.SpecNodes ## # Specification entity object # # Collects information about a particular system entity or aspect. # # The entity is of a general kind # It is defined by the particular aspects defined for it # The aspects must be 'compatible', which can be relatively checked. # The specobject is use...
apache-2.0
franky88/emperioanimesta
env/Lib/encodings/cp862.py
272
33370
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP862.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
gpl-3.0
annarev/tensorflow
tensorflow/python/autograph/pyct/qual_names.py
3
8385
# 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
rsyvarth/Schemify
lib/simplejson/decoder.py
132
14721
"""Implementation of JSONDecoder """ from __future__ import absolute_import import re import sys import struct from .compat import fromhex, b, u, text_type, binary_type, PY3, unichr from .scanner import make_scanner, JSONDecodeError def _import_c_scanstring(): try: from ._speedups import scanstring ...
mit
crowdworks/redash
old_migrations/0005_add_updated_at.py
20
1149
from playhouse.migrate import PostgresqlMigrator, migrate from redash.models import db from redash import models if __name__ == '__main__': db.connect_db() migrator = PostgresqlMigrator(db.database) with db.database.transaction(): migrate( migrator.add_column('queries', 'updated_at', ...
bsd-2-clause
ntts-clo/mld-ryu
ryu/app/simple_vlan.py
5
7837
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at private email ne 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 # # h...
apache-2.0
dyyi/moneybook
venv/Lib/site-packages/pip/_vendor/requests/packages/urllib3/packages/ordered_dict.py
2040
8935
# Backport of OrderedDict() class that runs on Python 2.4, 2.5, 2.6, 2.7 and pypy. # Passes Python2.7's test suite and incorporates all the latest updates. # Copyright 2009 Raymond Hettinger, released under the MIT License. # http://code.activestate.com/recipes/576693/ try: from thread import get_ident as _get_iden...
apache-2.0
ryansb/boto
boto/vpc/routetable.py
89
3943
# Copyright (c) 2009-2010 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
SymbiFlow/fpga-tool-perf
toolchains/radiant.py
1
3405
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2020 The SymbiFlow Authors. # # Use of this source code is governed by a ISC-style # license that can be found in the LICENSE file or at # https://opensource.org/licenses/ISC # # SPDX-License-Identifier: ISC import os from toolchains.toolchain import T...
isc
zcbenz/cefode-chromium
chrome/test/functional/chromeos_login.py
12
13530
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import subprocess import sys import pyauto_functional # Must be imported before pyauto import pyauto import pyauto_erro...
bsd-3-clause
kerzhner/airflow
airflow/operators/hive_to_druid.py
39
5457
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
bigmlcom/bigmler
bigmler/export/out_model/pythonlr.py
1
3629
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Copyright 2017-2021 BigML # # 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 requi...
apache-2.0
offbyone/Flexget
flexget/plugins/cli/database.py
8
3612
from __future__ import unicode_literals, division, absolute_import from flexget import options from flexget.db_schema import reset_schema, plugin_schemas from flexget.event import event from flexget.logger import console from flexget.manager import Base, Session def do_cli(manager, options): with manager.acquire...
mit
paulrouget/servo
tests/wpt/web-platform-tests/tools/third_party/html5lib/html5lib/constants.py
102
83518
from __future__ import absolute_import, division, unicode_literals import string EOF = None E = { "null-character": "Null character in input stream, replaced with U+FFFD.", "invalid-codepoint": "Invalid codepoint in stream.", "incorrectly-placed-solidus": "Solidus (/) incorrectly ...
mpl-2.0
sapcc/monasca-agent
monasca_agent/collector/checks_d/process.py
1
8000
# (C) Copyright 2015-2016 Hewlett Packard Enterprise Development Company LP """Gather metrics on specific processes. """ from collections import defaultdict from collections import namedtuple import monasca_agent.collector.checks as checks from monasca_agent.common.psutil_wrapper import psutil ProcessStruct = namedt...
bsd-3-clause
Hardtack/Flask-Swag
flask_swag/fields.py
1
1255
""" fields ====== Definitions of custom fields for marshmallow schema. """ from marshmallow import fields class TypedDict(fields.Field): """Typed dict field.""" def __init__(self, key_field, nested_field, *args, **kwargs): super().__init__(*args, **kwargs) self.key_field = key_field ...
mit
wdmchaft/taskcoach
taskcoachlib/domain/attachment/attachment.py
1
6612
''' Task Coach - Your friendly task manager Copyright (C) 2004-2010 Task Coach developers <developers@taskcoach.org> Task Coach 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 ...
gpl-3.0
OspreyX/trading-with-python
historicDataDownloader/historicDataDownloader.py
77
4526
''' Created on 4 aug. 2012 Copyright: Jev Kuznetsov License: BSD a module for downloading historic data from IB ''' import ib import pandas from ib.ext.Contract import Contract from ib.opt import ibConnection, message from time import sleep import tradingWithPython.lib.logger as logger from pandas impor...
bsd-3-clause
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/python/lib/python3.3/io.py
4
3280
"""The io module provides the Python interfaces to stream handling. The builtin open function is defined in this module. At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams; impl...
gpl-3.0
bhargav2408/python-for-android
python3-alpha/python3-src/Mac/Tools/Doc/HelpIndexingTool/Help_Indexing_Tool_Suite.py
48
3570
"""Suite Help Indexing Tool Suite: Special events that just the Help Indexing Tool supports. Level 0, version 0 Generated from /Developer/Applications/Apple Help Indexing Tool.app AETE/AEUT resource version 1/1, language 0, script 0 """ import aetools import MacOS _code = 'HIT ' class Help_Indexing_Tool_Suite_Event...
apache-2.0
MohMehrnia/TextBaseEmotionDetectionWithEnsembleMethod
TextEmotionDetection.py
1
22843
import numpy as np import pandas as pd import csv import os.path import warnings from sklearn.preprocessing import LabelEncoder from nltk.corpus import stopwords from nltk.stem.porter import * from nltk.tokenize import RegexpTokenizer from collections import namedtuple from hpsklearn import HyperoptEstimator, svc, knn,...
apache-2.0
mdj2/django
django/contrib/auth/tests/test_tokens.py
215
2652
import sys from datetime import date, timedelta from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tokens import PasswordResetTokenGenerator from django.contrib.auth.tests.utils import skipIfCustomUser from django.test import TestCase from django.utils import unittest...
bsd-3-clause
hxxft/lynx-native
Core/third_party/JavaScriptCore/inspector/scripts/codegen/models.py
1
27829
#!/usr/bin/env python # # Copyright (c) 2014 Apple Inc. All rights reserved. # Copyright (c) 2014 University of Washington. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of ...
mit
RAMSProject/rams
uber/tests/conftest.py
1
7243
from uber.common import * import shutil import pytest from sideboard.tests import patch_session try: TEST_DB_FILE = c.TEST_DB_FILE except AttributeError: TEST_DB_FILE = '/tmp/uber.db' deadline_not_reached = localized_now() + timedelta(days=1) deadline_has_passed = localized_now() - timedelta(days=1) def ...
agpl-3.0
energicryptocurrency/energi
contrib/linearize/linearize-allrpc.py
1
4652
#!/usr/bin/env python3 # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Bitcoin Core developers # Copyright (c) 2017 The Energi Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/l...
mit
onitake/ansible
lib/ansible/template/__init__.py
2
29571
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
HBPNeurorobotics/nest-simulator
pynest/examples/brunel_alpha_nest.py
4
11875
# -*- coding: utf-8 -*- # # brunel_alpha_nest.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the Licen...
gpl-2.0
nkalodimas/invenio
modules/docextract/lib/refextract_find.py
7
21162
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 t...
gpl-2.0
beagles/neutron_hacking
neutron/plugins/ml2/driver_context.py
6
4501
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
salguarnieri/intellij-community
python/lib/Lib/site-packages/django/db/backends/__init__.py
71
24975
import decimal from threading import local from django.db import DEFAULT_DB_ALIAS from django.db.backends import util from django.utils import datetime_safe from django.utils.importlib import import_module class BaseDatabaseWrapper(local): """ Represents a database connection. """ ops = None vendo...
apache-2.0