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
jokerfr9/DragonsKernel_Kylessopen
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
hogarthj/ansible
test/units/modules/network/f5/test_bigip_hostname.py
28
3226
# -*- coding: utf-8 -*- # # Copyright (c) 2017 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 sys from nose.plugins.skip import SkipTest i...
gpl-3.0
flavour/eden
controllers/gis.py
1
154445
# -*- coding: utf-8 -*- """ GIS Controllers """ module = request.controller resourcename = request.function # Compact JSON encoding SEPARATORS = (",", ":") # ----------------------------------------------------------------------------- def index(): """ Module's Home Page: Show the Main map """ ...
mit
MechCoder/sympy
sympy/physics/mechanics/linearize.py
62
15341
from __future__ import print_function, division __all__ = ['Linearizer'] from sympy import Matrix, eye, zeros, Dummy from sympy.utilities.iterables import flatten from sympy.physics.vector import dynamicsymbols from sympy.physics.mechanics.functions import msubs import collections class Linearizer(object): """T...
bsd-3-clause
yorvic/.vim
bundle/python-mode/pylibs/pylama/checkers/pylint/logilab/astng/as_string.py
27
18381
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-astng. # # logilab-astng is free software: you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as publis...
gpl-3.0
MartinThoma/LaTeX-examples
tikz/gpx-gps-elevation-chart-generator/elevation_chart_gen.py
1
2708
#!/usr/bin/env python # -*- coding: utf-8 -*- """Generate an elevation chart from a GPX file.""" import gpxpy import logging import sys from math import sin, cos, sqrt, atan2, radians logging.basicConfig(format='%(asctime)s %(levelname)s %(message)s', level=logging.DEBUG, stre...
mit
aperigault/ansible
test/units/modules/network/f5/test_bigip_wait.py
38
3621
# -*- coding: utf-8 -*- # # Copyright (c) 2017 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
asnorkin/parapapapam
ensemble/_ensemble.py
1
10880
import numpy as np from sklearn.model_selection import cross_val_predict, cross_val_score, StratifiedKFold from sklearn.base import BaseEstimator, ClassifierMixin from sklearn.svm import SVC from ..metrics import METRICS class Blender: def make_greedy_blend(self, X, y, models, scoring=None, cv=3, ...
mit
creativcoder/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/inputstream.py
618
30855
from __future__ import absolute_import, division, unicode_literals from six import text_type from six.moves import http_client import codecs import re from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase from .constants import encodings, ReparseException from . import utils from io import String...
mpl-2.0
rtucker/sycamore
Sycamore/support/pytz/zoneinfo/Pacific/Auckland.py
9
6914
'''tzinfo timezone information for Pacific/Auckland.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Auckland(DstTzInfo): '''Pacific/Auckland timezone definition. See datetime.tzinfo for details''' zone = 'Pacific/Aucklan...
gpl-2.0
GuardianRG/sleepy-puppy
sleepypuppy/admin/user/models.py
13
1368
# Copyright 2015 Netflix, 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...
apache-2.0
moonboots/tensorflow
tensorflow/python/kernel_tests/summary_ops_test.py
15
3767
# Copyright 2015 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
chrber/dcache-docker
dcache/deps/.vim/bundle/jedi-vim/jedi/jedi/parser/pgen2/pgen.py
49
13966
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. # Modifications: # Copyright 2014 David Halter. Integration into Jedi. # Modifications are dual-licensed: MIT and PSF. # Pgen imports from . import grammar from jedi.parser import token from jedi.parse...
gpl-3.0
simonwydooghe/ansible
lib/ansible/modules/storage/netapp/na_elementsw_network_interfaces.py
44
10836
#!/usr/bin/python # (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or # https://www.gnu.org/licenses/gpl-3.0.txt) ''' Element Software Node Network Interfaces - Bond 1G and 10G configuration ''' from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METAD...
gpl-3.0
xNovax/SickRage
lib/github/GitTag.py
74
4322
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gpl-3.0
calfonso/ansible
lib/ansible/inventory/data.py
23
9607
# (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
lordB8r/polls
ENV/lib/python2.7/site-packages/django/template/loaders/app_directories.py
114
2362
""" Wrapper for loading templates from "templates" directories in INSTALLED_APPS packages. """ import os import sys from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.template.base import TemplateDoesNotExist from django.template.loader import BaseLoader from django.u...
mit
rhattersley/cartopy
lib/cartopy/tests/test_img_transform.py
4
3508
# (C) British Crown Copyright 2014 - 2017, Met Office # # This file is part of cartopy. # # cartopy 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
GodBlessPP/2015cdb
static/Brython3.1.1-20150328-091302/Lib/_collections.py
603
19111
# "High performance data structures # " # copied from pypy repo # # Copied and completed from the sandbox of CPython # (nondist/sandbox/collections/pydeque.py rev 1.1, Raymond Hettinger) # # edited for Brython line 558 : catch ImportError instead of AttributeError import operator #try: # from thread import get_i...
gpl-3.0
tangentlabs/django-fancypages
tests/unit/blocks/test_two_column_layout_block.py
1
1087
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import from django.test import TestCase from django.test import RequestFactory from django.template import RequestContext from fancypages.models import Container from fancypages.models.blocks import TwoColumnLayoutBlock from fancypages.test imp...
bsd-3-clause
fredericlepied/ansible
lib/ansible/parsing/dataloader.py
14
20158
# (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
sameerparekh/pants
tests/python/pants_test/base/test_generator.py
31
1087
# 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) import unittest fro...
apache-2.0
tonyteate/pydocxgae
pydocx/tests/__init__.py
1
5431
#from unittest import TestCase import re from contextlib import contextmanager from pydocx.parsers.Docx2Html import Docx2Html from pydocx.utils import ( parse_xml_from_string, ) from pydocx.tests.document_builder import DocxBuilder as DXB from unittest import TestCase STYLE = ( '<style>' '.pydocx-insert {...
apache-2.0
levilucio/SyVOLT
tests/TestModules/kiltera_backward2trace_MDL.py
1
8531
""" __kiltera_backward2trace_MDL.py_____________________________________________________ Automatically generated AToM3 Model File (Do not modify directly) Author: levi Modified: Tue Jan 27 12:00:37 2015 ____________________________________________________________________________________ """ from stickylink import * fr...
mit
loseblue/vim-ycm-windows-64
python/ycm/client/command_request.py
10
3213
#!/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
YosuaMichael/elasticsearch
dev-tools/prepare_release_candidate.py
48
19842
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
apache-2.0
yinquan529/platform-external-chromium_org
build/config/win/get_msvc_config_real.py
53
22345
# 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. # This file copies the logic from GYP to find the MSVC configuration. It's not # currently used because it is too slow. We will probably build this # fun...
bsd-3-clause
mozilla/bedrock
tests/functional/firefox/test_all.py
4
3785
# -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import pytest from pages.firefox.all import FirefoxAllPage @pytest.mark.smoke @pytest.mark.n...
mpl-2.0
jallohm/django
django/core/handlers/base.py
234
13346
from __future__ import unicode_literals import logging import sys import types import warnings from django import http from django.conf import settings from django.core import signals, urlresolvers from django.core.exceptions import ( MiddlewareNotUsed, PermissionDenied, SuspiciousOperation, ) from django.db impo...
bsd-3-clause
40223210/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/logging/config.py
739
35619
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
gpl-3.0
jamielennox/tempest
tempest/common/ssh.py
11
5939
# Copyright 2012 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 requ...
apache-2.0
miguelparaiso/OdooAccessible
addons/l10n_th/__openerp__.py
260
1453
# -*- 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
stweil/openlayers
tools/BeautifulSoup.py
5
69569
"""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...
bsd-2-clause
jhawkesworth/ansible
test/units/modules/storage/netapp/test_netapp_e_iscsi_interface.py
45
11656
# (c) 2018, NetApp Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from mock import MagicMock from ansible.module_utils import basic, netapp from ansible.modules.storage.netapp import netapp_e_host from ansible.modules.storage.netapp.netapp_e_host import Host from ans...
gpl-3.0
ArcEye/machinekit-testing
lib/python/drivers/ADS7828.py
12
2774
#!/usr/bin/python import smbus class ADS7828: # Config Register __ADS7828_CONFIG_SD_DIFFERENTIAL = 0b00000000 __ADS7828_CONFIG_SD_SINGLE = 0b10000000 __ADS7828_CONFIG_CS_CH0 = 0b00000000 __ADS7828_CONFIG_CS_CH2 = 0b00010000 __ADS7828_CONFIG_CS_CH4 ...
lgpl-2.1
tedder/ansible
test/units/modules/network/edgeswitch/test_edgeswitch_vlan.py
29
5640
# (c) 2018 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
gpl-3.0
AltSchool/django-allauth
allauth/socialaccount/providers/odnoklassniki/views.py
10
2186
import requests from hashlib import md5 from allauth.socialaccount.providers.oauth2.views import ( OAuth2Adapter, OAuth2CallbackView, OAuth2LoginView, ) from .provider import OdnoklassnikiProvider USER_FIELDS = ['uid', 'locale', 'first_name', 'last_name', ...
mit
peeringdb/django-peeringdb
django_peeringdb/const.py
1
4145
from django.utils.translation import gettext_lazy as _ MEDIA = (("Ethernet", _("Ethernet")), ("ATM", _("ATM")), ("Multiple", _("Multiple"))) POC_ROLES = ( ("Abuse", _("Abuse")), ("Maintenance", _("Maintenance")), ("Policy", _("Policy")), ("Technical", _("Technical")), ("NOC", _("NOC")), ("Publ...
apache-2.0
FrodeSolheim/fs-uae-launcher
amitools/binfmt/hunk/HunkReader.py
1
30202
"""A class for reading Amiga executables and object files in Hunk format""" import os import struct import io from types import * from .Hunk import * class HunkReader: """Load Amiga executable Hunk structures""" def __init__(self): self.hunks = [] self.error_string = None self.type = None self.he...
gpl-2.0
unifieddigitalmedia/sinopia_inn-M.E.A.N_stack
node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py
1569
23354
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility functions to perform Xcode-style build steps. These functions are executed via gyp-mac-tool when using the Makefile generator. ""...
mit
bretlowery/snakr
lib/django/conf/locale/de_CH/formats.py
504
1445
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date from __future__ import unicode_literals DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATE...
bsd-3-clause
jikortus/pykickstart
tests/commands/group.py
1
2759
# # Chris Lumens <clumens@redhat.com> # # Copyright 2013 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will be usef...
gpl-2.0
gberl001/Arduino
arduino-core/src/processing/app/i18n/python/requests/utils.py
204
17497
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import os import platform import re import sys import zlib from netrc import netrc, NetrcParseError from . impor...
lgpl-2.1
dreamhost/teuthology
teuthology/report.py
6
17353
import os import yaml import json import re import requests import logging import socket from datetime import datetime import teuthology from .config import config from .job_status import get_status, set_status report_exceptions = (requests.exceptions.RequestException, socket.error) def init_logging(): """ ...
mit
aldryn/djangocms-cascade
cmsplugin_cascade/south_migrations/0006_auto__add_unique_pluginextrafields_plugin_type_site.py
6
5287
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding unique constraint on 'PluginExtraFields', fields ['plugin_type', 'site']...
mit
Hellowlol/plexpy
lib/unidecode/x057.py
252
4631
data = ( 'Guo ', # 0x00 'Yin ', # 0x01 'Hun ', # 0x02 'Pu ', # 0x03 'Yu ', # 0x04 'Han ', # 0x05 'Yuan ', # 0x06 'Lun ', # 0x07 'Quan ', # 0x08 'Yu ', # 0x09 'Qing ', # 0x0a 'Guo ', # 0x0b 'Chuan ', # 0x0c 'Wei ', # 0x0d 'Yuan ', # 0x0e 'Quan ', # 0x0f 'Ku ', # 0x10 'F...
gpl-3.0
cvegaj/ElectriCERT
venv3/lib/python3.6/site-packages/jsonschema/tests/test_validators.py
20
34795
from collections import deque from contextlib import contextmanager import json from jsonschema import FormatChecker, ValidationError from jsonschema.tests.compat import mock, unittest from jsonschema.validators import ( RefResolutionError, UnknownType, Draft3Validator, Draft4Validator, RefResolver, create, ex...
gpl-3.0
mwcz/phyton
old_files/src/photos/migrations/0004_auto__add_field_photo_image_hash.py
1
3502
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Photo.image_hash' db.add_column('photos_photo', 'image_hash', self.gf('django.db.models.fi...
agpl-3.0
Tehsmash/networking-cisco
networking_cisco/plugins/cisco/extensions/routerhostingdevice.py
3
2145
# Copyright 2014 Cisco Systems, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
Black-Cog/Forge
core/ColorScience.py
1
3207
import math class ColorScience(): """Methodes relative at Color Science""" @staticmethod def linearToSrgb(color): colorOut = [] for i in range(3): if color[i] <= 0.0031308: colorTmp = color[i] * 12.92 colorOut.append( round(colorTmp, 6) ) else: colorTmp = 1.055 * ( pow(color[i], 1 / 2.4) )...
bsd-3-clause
ptisserand/ansible
test/units/modules/network/ios/ios_module.py
73
2506
# (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
gpl-3.0
tanmaykm/edx-platform
openedx/core/djangoapps/bookmarks/services.py
44
4441
""" Bookmarks service. """ import logging from django.core.exceptions import ObjectDoesNotExist from xmodule.modulestore.django import modulestore from xmodule.modulestore.exceptions import ItemNotFoundError from request_cache.middleware import RequestCache from . import DEFAULT_FIELDS, api log = logging.getLogger...
agpl-3.0
yashodhank/frappe
frappe/frappeclient.py
6
6590
import requests import json import frappe class AuthError(Exception): pass class FrappeException(Exception): pass class FrappeClient(object): def __init__(self, url, username, password, verify=True): self.verify = verify self.session = requests.session() self.url = url self.login(username, password) def...
mit
BenProjex/ArchProject
Chip.py
1
16126
from abc import ABCMeta, abstractmethod, abstractproperty import Wire ############################################################### # Abstract Chip Class #AbstractMethod Action: What function the chip performs #AbstractProperty Name: Debugging tool retrieving the name of the chip ###################...
gpl-3.0
wearpants/osf.io
api_tests/logs/views/test_log_params.py
12
2793
# -*- coding: utf-8 -*- import httplib as http from framework.auth.core import Auth from nose.tools import * # noqa from test_log_detail import LogsTestCase from tests.factories import ( ProjectFactory, PrivateLinkFactory ) from api.base.settings.defaults import API_BASE # TODO add tests for other log para...
apache-2.0
mollstam/UnrealPy
UnrealPyEmbed/Source/Python/Lib/python27/lib-tk/tkCommonDialog.py
193
1418
# base class for tk common dialogues # # this module provides a base class for accessing the common # dialogues available in Tk 4.2 and newer. use tkFileDialog, # tkColorChooser, and tkMessageBox to access the individual # dialogs. # # written by Fredrik Lundh, May 1997 # from Tkinter import * class Dialog: com...
mit
jjx02230808/project0223
examples/linear_model/plot_lasso_and_elasticnet.py
73
2074
""" ======================================== Lasso and Elastic Net for Sparse Signals ======================================== Estimates Lasso and Elastic-Net regression models on a manually generated sparse signal corrupted with an additive noise. Estimated coefficients are compared with the ground-truth. """ print(...
bsd-3-clause
40223119/2015cda
static/Brython3.1.1-20150328-091302/Lib/stat.py
765
4304
"""Constants/functions for interpreting results of os.stat() and os.lstat(). Suggested usage: from stat import * """ # Indices for stat struct members in the tuple returned by os.stat() ST_MODE = 0 ST_INO = 1 ST_DEV = 2 ST_NLINK = 3 ST_UID = 4 ST_GID = 5 ST_SIZE = 6 ST_ATIME = 7 ST_MTIME = 8 ST_CTIME = 9 ...
gpl-3.0
BaxterStockman/ansible-modules-core
cloud/openstack/os_networks_facts.py
6
4383
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # # This module 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 late...
gpl-3.0
apporc/cinder
cinder/api/contrib/admin_actions.py
8
16079
# Copyright 2012 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 or a...
apache-2.0
lxsmnv/spark
python/pyspark/mllib/clustering.py
10
36955
# # 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 us...
apache-2.0
AnhellO/DAS_Sistemas
Ago-Dic-2017/Enrique Castillo/Ordinario/test/Lib/site-packages/pip/_vendor/requests/packages/chardet/gb2312prober.py
2994
1681
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
mit
abridgett/boto
boto/rds/dbsecuritygroup.py
185
6651
# Copyright (c) 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, modify, m...
mit
flacjacket/sympy
sympy/polys/domains/realdomain.py
2
3404
"""Implementation of :class:`RealDomain` class. """ from sympy.polys.domains.characteristiczero import CharacteristicZero from sympy.polys.domains.simpledomain import SimpleDomain from sympy.polys.domains.groundtypes import SymPyRealType from sympy.polys.polyerrors import DomainError, CoercionFailed import math cla...
bsd-3-clause
samhutchins/tools
video_production/transcode-for-edit.py
1
1479
#!/usr/bin/env python3.6 import os, argparse, subprocess def main(): parser = argparse.ArgumentParser() parser.add_argument("project") args = parser.parse_args() home = os.path.join(os.path.expanduser("~"), "Videos", "Mine", "WIP") dest_dir = os.path.join(home, args.project, "footage") if no...
mit
javachengwc/hue
apps/spark/src/spark/job_server_api.py
12
4052
#!/usr/bin/env python # 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 ma...
apache-2.0
endolith/scikit-image
skimage/io/tests/test_colormixer.py
40
4619
from numpy.testing import (assert_array_equal, assert_almost_equal, assert_equal, assert_array_almost_equal, ) import numpy as np import skimage.io._plugins._colormixer as cm class ColorMixerTest(object): ...
bsd-3-clause
davidrenne/django-allauth
allauth/socialaccount/providers/oauth2/provider.py
67
1156
try: from urllib.parse import parse_qsl except ImportError: from urlparse import parse_qsl from django.core.urlresolvers import reverse from django.utils.http import urlencode from allauth.socialaccount.providers.base import Provider class OAuth2Provider(Provider): def get_login_url(self, request, **kw...
mit
wkschwartz/django
tests/db_functions/math/test_power.py
69
1784
from decimal import Decimal from django.db.models.functions import Power from django.test import TestCase from ..models import DecimalModel, FloatModel, IntegerModel class PowerTests(TestCase): def test_null(self): IntegerModel.objects.create(big=100) obj = IntegerModel.objects.annotate( ...
bsd-3-clause
archf/ansible
lib/ansible/modules/cloud/amazon/lambda_event.py
26
14552
#!/usr/bin/python # (c) 2016, Pierre Jodouin <pjodouin@virtualcomputing.solutions> # 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
hgranlund/py-chess-engine
docs/source/conf.py
1
8705
# -*- coding: utf-8 -*- # This file is based upon the file generated by sphinx-quickstart. However, # where sphinx-quickstart hardcodes values in this file that you input, this # file has been changed to pull from your module's metadata module. # # This file is execfile()d with the current directory set to its contain...
mit
jeenalee/servo
tests/heartbeats/characterize_android.py
139
4036
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import sys import os from os import path import time import datetime import argparse import subpr...
mpl-2.0
rven/odoo
addons/im_livechat/models/im_livechat_channel.py
1
15553
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import random import re from odoo import api, fields, models, modules, _ class ImLivechatChannel(models.Model): """ Livechat Channel Define a communication channel, which can be accessed with ...
agpl-3.0
oshtaier/robottelo
tests/foreman/api/test_hostcollection.py
3
2378
"""Unit tests for host collections.""" from robottelo.common.decorators import skip_if_bug_open from robottelo import entities from robottelo.test import APITestCase # (too-many-public-methods) pylint:disable=R0904 class HostCollectionTestCase(APITestCase): """Tests for :class:`robottelo.entities.HostCollection`....
gpl-3.0
2014c2g5/2015cda_g3_0421
static/Brython3.1.1-20150328-091302/Lib/configparser.py
692
50025
"""Configuration file parser. A configuration file consists of sections, lead by a "[section]" header, and followed by "name: value" entries, with continuations and such in the style of RFC 822. Intrinsic defaults can be specified by passing them into the ConfigParser constructor as a dictionary. class: ConfigParse...
gpl-3.0
vnpy/vnpy
vnpy/app/algo_trading/algos/stop_algo.py
4
3202
from vnpy.trader.constant import Offset, Direction from vnpy.trader.object import TradeData, OrderData, TickData from vnpy.trader.engine import BaseEngine from vnpy.app.algo_trading import AlgoTemplate class StopAlgo(AlgoTemplate): """""" display_name = "Stop 条件委托" default_setting = { "vt_symbo...
mit
gsmartway/odoo
addons/stock_account/res_config.py
315
2277
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
noslenfa/tdjangorest
uw/lib/python2.7/site-packages/IPython/external/simplegeneric/_simplegeneric.py
17
3113
"""This is version 0.7 of Philip J. Eby's simplegeneric module (http://pypi.python.org/pypi/simplegeneric), patched to work with Python 3, which doesn't support old-style classes. """ #Name: simplegeneric #Version: 0.7 #Summary: Simple generic functions (similar to Python's own len(), pickle.dump(), etc.) #Home-page: ...
apache-2.0
alphaBenj/zipline
zipline/data/session_bars.py
5
1098
# Copyright 2016 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
RoyalTS/econ-python-environment
.mywaflib/waflib/Tools/dbus.py
10
2073
#!/usr/bin/env python # encoding: utf-8 # Ali Sabil, 2007 """ Compile dbus files with **dbus-binding-tool** Typical usage:: def options(opt): opt.load('compiler_c dbus') def configure(conf): conf.load('compiler_c dbus') def build(bld): tg = bld.program( includes = '.', source = bld.path.ant_glob('*.c'...
bsd-3-clause
rkashapov/buildbot
master/buildbot/test/unit/test_data_buildrequests.py
2
23863
# 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
beiko-lab/gengis
bin/Lib/lib2to3/fixes/fix_itertools.py
55
1592
""" Fixer for itertools.(imap|ifilter|izip) --> (map|filter|zip) and itertools.ifilterfalse --> itertools.filterfalse (bugs 2360-2363) imports from itertools are fixed in fix_itertools_import.py If itertools is imported as something else (ie: import itertools as it; it.izip(spam, eggs)) method c...
gpl-3.0
sinkuri256/python-for-android
python3-alpha/python3-src/Lib/test/regex_tests.py
59
8992
# Regex test suite and benchmark suite v1.5a2 # The 3 possible outcomes for each pattern [SUCCEED, FAIL, SYNTAX_ERROR] = range(3) # Benchmark suite (needs expansion) # # The benchmark suite does not test correctness, just speed. The # first element of each tuple is the regex pattern; the second is a # string to matc...
apache-2.0
ltilve/chromium
tools/mac/symbolicate_crash.py
178
19493
#!/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. """ This script can take an Apple-style CrashReporter log and symbolicate it. This is useful for when a user's reports aren't being...
bsd-3-clause
hurricanerix/swift
test/functional/test_object.py
5
61991
#!/usr/bin/python # Copyright (c) 2010-2012 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 appl...
apache-2.0
skearnes/color-features
paper/code/analysis.py
1
12160
"""Analyze results. Use the saved model output to calculate AUC and other metrics. """ import collections import cPickle as pickle import gflags as flags import gzip import logging import numpy as np import os import pandas as pd from sklearn import metrics from statsmodels.stats import proportion import sys flags.D...
bsd-3-clause
TheoRettisch/p2pool-octocoin
SOAPpy/Config.py
289
7622
""" ################################################################################ # Copyright (c) 2003, Pfizer # Copyright (c) 2001, Cayce Ullman. # Copyright (c) 2001, Brian Matthews. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provid...
gpl-3.0
Zozoz/shadowsocks
shadowsocks/eventloop.py
949
7288
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-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 requi...
apache-2.0
techtonik/numpy
numpy/f2py/tests/test_return_integer.py
69
4639
from __future__ import division, absolute_import, print_function from numpy.testing import * from numpy import array from numpy.compat import long import util class TestReturnInteger(util.F2PyTest): def check_function(self, t): assert_( t(123)==123, repr(t(123))) assert_( t(123.6)==123) as...
bsd-3-clause
nkmk/python-snippets
notebook/numpy_split.py
1
1773
import numpy as np a = np.arange(16).reshape(4, 4) print(a) # [[ 0 1 2 3] # [ 4 5 6 7] # [ 8 9 10 11] # [12 13 14 15]] a_split = np.split(a, 2) print(type(a_split)) # <class 'list'> print(len(a_split)) # 2 print(a_split[0]) # [[0 1 2 3] # [4 5 6 7]] print(a_split[1]) # [[ 8 9 10 11] # [12 13 14 15]] ...
mit
vaygr/ansible
lib/ansible/plugins/terminal/ce.py
122
1841
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
gpl-3.0
srh/rethinkdb
test/regression/issue_659.py
12
3384
#!/usr/bin/env python # Copyright 2012-2016 RethinkDB, all rights reserved. '''Lowering the number of replicas results in strange behavior''' from __future__ import print_function import os, sys, time sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) import rdb_unit...
apache-2.0
ewindisch/nova
nova/db/base.py
26
1379
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
apache-2.0
emedinaa/contentbox
third_party/social/backends/runkeeper.py
83
1807
""" RunKeeper OAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/runkeeper.html """ from social.backends.oauth import BaseOAuth2 class RunKeeperOAuth2(BaseOAuth2): """RunKeeper OAuth authentication backend""" name = 'runkeeper' AUTHORIZATION_URL = 'https://runkeeper.com/apps/authorize...
apache-2.0
ProvincalInovationManagement/provinceManagement
debug_toolbar/utils/__init__.py
2
5594
import inspect import os.path import django import SocketServer import sys from django.conf import settings from django.views.debug import linebreak_iter from django.utils.html import escape from django.utils.safestring import mark_safe # Figure out some paths django_path = os.path.realpath(os.path.dirname(django.__f...
agpl-3.0
heenbo/mosquitto-heenbo
test/lib/03-publish-c2b-qos1-timeout.py
7
2881
#!/usr/bin/env python # Test whether a client sends a correct PUBLISH to a topic with QoS 1 and responds to a delay. # The client should connect to port 1888 with keepalive=60, clean session set, # and client id publish-qos1-test # The test will send a CONNACK message to the client with rc=0. Upon receiving # the CON...
gpl-3.0
icereval/raven-python
raven/contrib/django/management/commands/raven.py
23
1140
""" raven.contrib.django.management.commands.raven ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2013 by the Sentry Team, see AUTHORS for more details :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function from django.core.management.base import B...
bsd-3-clause
PIPplware/xbmc
lib/libUPnP/Platinum/Build/Tools/Scripts/GenDocumentation.py
263
2205
#! /usr/bin/python ############################################################# # This tool is used to generate the Platinum documentation # ############################################################# import os import sys import subprocess import shutil import zipfile import tarfile #############################...
gpl-2.0
museumsvictoria/nodel-recipes
Computer Controller/General/script.py
2
6005
'''Computer Node''' ### Libraries required by this Node import java.lang.System import subprocess ### Parameters used by this Node system = java.lang.System.getProperty('os.name') arch = java.lang.System.getProperty('sun.arch.data.model').lower() windows = [ "Windows 7", "Windows 8", "Windows 10" ] ### Functions ...
mit
aimejeux/enigma2
lib/python/Screens/InfoBarGenerics.py
2
157619
# -*- coding: utf-8 -*- from Components.ActionMap import ActionMap, HelpableActionMap, NumberActionMap from Components.Harddisk import harddiskmanager, findMountPoint from Components.Input import Input from Components.Label import Label from Components.MovieList import AUDIO_EXTENSIONS, MOVIE_EXTENSIONS, DVD_EXTENSIONS...
gpl-2.0