repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
mikar/projects
games/textadventure.py
1
5279
#!/usr/bin/env python2 # -*- coding: UTF-8 -*- """Postapocalyptic Zombiegame 1. Implement Fight Concept 2. Add Equipment (Armor, Weapons) + Health + Stamina 3. Add GameState and get rid of globals 4. First attempt at classes, don't judge ;) 5. sketch of a fight system: http://inventwithpython.c...
mit
zarboz/M7_wls_43
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
dgary50/eovsa
adc_cal.py
1
9411
# # Routines to set up system for ADC calibration/DCM attenuation setting # # 2016-Feb-20 DG # First written. # import time import numpy as np import roach as r def acc_tune(band): if type(band) is int: fsqfile = 'BAND'+str(band)+'.FSQ' elif type(band) is str: if band.low...
gpl-2.0
niteoweb/libcloud
docs/examples/compute/openstack/hpcloud.py
61
1075
from libcloud.compute.types import Provider from libcloud.compute.providers import get_driver HPCLOUD_AUTH_URL_USWEST = \ 'https://region-a.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens' HPCLOUD_AUTH_URL_USEAST = \ 'https://region-b.geo-1.identity.hpcloudsvc.com:35357/v2.0/tokens' OpenStack = get_driver(Pro...
apache-2.0
acshi/osf.io
api_tests/base/test_throttling.py
12
4480
import pytest import mock from nose.tools import * # flake8: noqa from api.base.settings.defaults import API_BASE from tests.base import ApiTestCase from osf_tests.factories import AuthUserFactory, ProjectFactory pytestmark = pytest.mark.skip('Unskip when throttling no longer fails on travis') class TestDefaultT...
apache-2.0
arokem/nipy
nipy/labs/bindings/tests/test_numpy.py
4
6433
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: # Test numpy bindings import numpy as np from .. import (c_types, fff_type, npy_type, copy_vector, pass_matrix, pass_vector, pass_array, pass_vector_via_iterator, sum_via_i...
bsd-3-clause
jaysonsantos/servo
tests/wpt/web-platform-tests/old-tests/webdriver/navigation/get_from_http_test.py
142
2070
import os import sys import unittest sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../.."))) import base_test class GetFromHttpTest(base_test.WebDriverBaseTest): def testGetUrlWithNoRedirectionOverHttp(self): page = self.webserver.where_is('navigation/res/empty.html') self.driver.get...
mpl-2.0
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/nbconvert/utils/tests/test_io.py
10
1331
# encoding: utf-8 """Tests for utils.io""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import io as stdlib_io import sys import nose.tools as nt from ipython_genutils.testing.decorators import skipif from ..io import unicode_std_stream from ipython_genutils.p...
gpl-3.0
NooNameR/qsd8x50-bravo-
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
collects/VTK
IO/EnSight/Testing/Python/EnSightCompound.py
20
1268
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # create a rendering window and renderer ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) renWin.StereoCapableWindowOn() iren = vtk.vtkRenderWindowInte...
bsd-3-clause
t794104/ansible
lib/ansible/plugins/doc_fragments/ovirt_facts.py
18
3023
# -*- coding: utf-8 -*- # Copyright: (c) 2016, Red Hat, Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): # facts standard oVirt documentation fragment DOCUMENTATION = r''' options: fetch_nested: description: ...
gpl-3.0
dimara/synnefo
snf-cyclades-app/synnefo/db/migrations/0112_auto__add_field_volume_serial.py
10
23525
# -*- 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 field 'Volume.serial' db.add_column('db_volume', 'serial', ...
gpl-3.0
nowls/gnuradio
gr-vocoder/examples/alaw_audio_loopback.py
58
1471
#!/usr/bin/env python # # Copyright 2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # ...
gpl-3.0
redmi/android_kernel_HM2014811
tools/perf/scripts/python/net_dropmonitor.py
2669
1738
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
gpl-2.0
wangjun/wakatime
wakatime/packages/pygments_py2/pygments/util.py
29
11592
# -*- coding: utf-8 -*- """ pygments.util ~~~~~~~~~~~~~ Utility functions. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import sys split_path_re = re.compile(r'[/\\ ]') doctype_lookup_re = re.compile(r'''(?smx) (<\?...
bsd-3-clause
adieu/lasso
bindings/python/tests/idwsf1_tests.py
1
16900
#! /usr/bin/env python # -*- coding: UTF-8 -*- # # Python unit tests for Lasso library # # Copyright (C) 2004-2007 Entr'ouvert # http://lasso.entrouvert.org # # Authors: See AUTHORS file in top-level directory. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Gene...
gpl-2.0
xueliu/rt-thread
bsp/stm32f40x/rtconfig.py
19
3667
import os # toolchains options ARCH='arm' CPU='cortex-m4' CROSS_TOOL='keil' if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') # cross_tool provides the cross compiler # EXEC_PATH is the compiler execute path, for example, CodeSourcery, Keil MDK, IAR if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' EXEC_...
gpl-2.0
Axiologue/AxiologueAPI
profile/models.py
1
2437
from django.db import models from django.contrib.auth.models import AbstractUser from django.conf import settings from tags.models import EthicsType # Class for holding individual prefreences on ethical issues # There should be a one-to-one ratio Preferences and and EthicalTypes for any given user class Preference(m...
mit
swayf/ajenti
plugins/network/nc_bsd.py
18
2173
from ajenti.com import * from ajenti.utils import * from ajenti.ui import * from ajenti import apis from api import * from nctp_bsd import * class BSDNetworkConfig(BSDIfconfig): implements(INetworkConfig) platform = ['FreeBSD'] interfaces = None def __init__(self): self.rcconf = apis.rc...
lgpl-3.0
sergei-maertens/django
tests/view_tests/tests/test_csrf.py
24
5268
from django.template import TemplateDoesNotExist from django.test import ( Client, RequestFactory, SimpleTestCase, override_settings, ) from django.test.utils import ignore_warnings from django.utils.deprecation import RemovedInDjango20Warning from django.utils.translation import override from django.views.csrf imp...
bsd-3-clause
caosmo/pip
pip/_vendor/requests/packages/urllib3/util/retry.py
699
9924
import time import logging from ..exceptions import ( ConnectTimeoutError, MaxRetryError, ProtocolError, ReadTimeoutError, ResponseError, ) from ..packages import six log = logging.getLogger(__name__) class Retry(object): """ Retry configuration. Each retry attempt will create a new Re...
mit
ibjohansen/acando-react-boilerplate
node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py
1789
10585
# Copyright (c) 2014 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. """Xcode-ninja wrapper project file generator. This updates the data structures passed to the Xcode gyp generator to build with ninja instead. The Xcode project i...
mit
gbrammer/grizli
grizli/grismconf.py
1
21571
""" Demonstrate aXe trace polynomials. Initial code taken from `(Brammer, Pirzkal, & Ryan 2014) <https://github.com/WFC3Grism/CodeDescription>`_, which contains a detailed explanation how the grism configuration parameters and coefficients are defined and evaluated. """ import os import numpy as np from . import GRIZ...
mit
gechr/ansible-modules-extras
monitoring/sensu_subscription.py
47
5171
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Anders Ingemann <aim@secoya.dk> # # 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 Licen...
gpl-3.0
sgubianpm/RPackUtils
rpackutils/providers/cran.py
1
17159
####################################### # Copyright 2019 PMP SA. # # SPDX-License-Identifier: Apache-2.0 # ####################################### import os import errno import sys import traceback import requests import tempfile import subprocess import shutil import datetime import logging import glob i...
gpl-2.0
Vvucinic/Wander
venv_2_7/lib/python2.7/site-packages/numpy/ctypeslib.py
130
13747
""" ============================ ``ctypes`` Utility Functions ============================ See Also --------- load_library : Load a C library. ndpointer : Array restype/argtype with verification. as_ctypes : Create a ctypes array from an ndarray. as_array : Create an ndarray from a ctypes array. References ----------...
artistic-2.0
edx/lettuce
tests/integration/lib/Django-1.3/django/db/models/sql/compiler.py
52
43006
from django.core.exceptions import FieldError from django.db import connections from django.db.backends.util import truncate_name from django.db.models.sql.constants import * from django.db.models.sql.datastructures import EmptyResultSet from django.db.models.sql.expressions import SQLEvaluator from django.db.models.sq...
gpl-3.0
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/mptt/templatetags/mptt_tags.py
5
11153
""" Template tags for working with lists of model instances which represent trees. """ from django import template from django.db.models import get_model from django.db.models.fields import FieldDoesNotExist from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe from django.utils....
agpl-3.0
postmen/sdk-python
setup.py
1
2469
from setuptools import setup from codecs import open # To use a consistent encoding from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='post...
mit
tbereau/espresso
tools/trace_memory.py
4
2288
#!/usr/bin/python # # Copyright (C) 2010,2012,2013,2014,2015,2016 The ESPResSo project # Copyright (C) 2008 Axel Arnold # # This file is part of ESPResSo. # # ESPResSo 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 Found...
gpl-3.0
joram/sickbeard-orange
lib/unidecode/x027.py
87
3785
data = ( '[?]', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 ...
gpl-3.0
Codefans-fan/odoo
addons/stock/res_config.py
115
8115
# -*- 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
cntnboys/410Lab6
build/django/django/contrib/gis/tests/relatedapp/models.py
75
1786
from django.contrib.gis.db import models from django.utils.encoding import python_2_unicode_compatible class SimpleModel(models.Model): objects = models.GeoManager() class Meta: abstract = True app_label = 'relatedapp' @python_2_unicode_compatible class Location(SimpleModel): point = m...
apache-2.0
jayceyxc/hue
desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/PublicKey/RSA.py
116
29897
# -*- coding: utf-8 -*- # # PublicKey/RSA.py : RSA public key primitive # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public ...
apache-2.0
paulmadore/Eric-IDE
6-6.0.9/eric/Debugger/CallStackViewer.py
2
7206
# -*- coding: utf-8 -*- # Copyright (c) 2013 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the Call Stack viewer widget. """ from __future__ import unicode_literals from PyQt5.QtCore import pyqtSignal, Qt, QFileInfo from PyQt5.QtWidgets import QTreeWidget, QTreeWidgetItem, QMenu from...
gpl-3.0
roy-debabrata/twitter-word-search
lib/tests/test_oauth.py
10
64525
# -*- coding: utf-8 -*- """ The MIT License Copyright (c) 2009 Vic Fryzel 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, co...
gpl-3.0
mikalstill/nova
nova/tests/functional/api_sample_tests/test_fixed_ips.py
6
1366
# Copyright 2014 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
ahaym/eden
modules/s3db/member.py
7
26369
# -*- coding: utf-8 -*- """ Sahana Eden Members Model @copyright: 2012-15 (c) Sahana Software Foundation @license: MIT 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...
mit
JIC-CSB/dtoolcore
tests/test_self_description.py
1
2342
"""Test the DiskStorageBroker self description metadata.""" import os import json from dtoolcore import __version__ from . import uri_to_path from . import tmp_uri_fixture # NOQA def test_writing_of_dtool_structure_file(tmp_uri_fixture): # NOQA from dtoolcore import generate_admin_metadata, generate_proto_d...
mit
gjhiggins/fuguecoin
contrib/testgen/base58.py
1
3788
''' Bitcoin base58 encoding and decoding. Based on https://bitcointalk.org/index.php?topic=1026.0 (public domain) ''' import hashlib import binascii import fugue_hash # for compatibility with following code... class SHA256: new = hashlib.sha256 class FUGUE: new = fugue_hash.getPoWHash if str != bytes: #...
mit
TinghuiWang/ActivityLearning
actlearn/log/logger.py
1
2564
import logging import logging.config class Logger(object): def __init__(self, log_level=logging.DEBUG, stdout_level=logging.INFO, filename='pyAl.log'): """ Init actlearn.logger class :type log_level: int :param log_level: Log level for Log File :type stdout_level: int ...
bsd-3-clause
cdsousa/SymPyBotics
sympybotics/robotcodegen.py
1
1828
import sympy from . import symcode def _gen_q_dq_ddq_subs(rbtdef, offset=0): subs = {} for i in reversed(range(rbtdef.dof)): subs[rbtdef.ddq[i]] = 'ddq[' + str(i+offset) + ']' subs[rbtdef.dq[i]] = 'dq[' + str(i+offset) + ']' subs[rbtdef.q[i]] = 'q[' + str(i+offset) + ']' return s...
bsd-3-clause
VasuAgrawal/tartanHacks2015
site/flask/lib/python2.7/site-packages/setuptools/command/install.py
496
4685
from distutils.errors import DistutilsArgError import inspect import glob import warnings import platform import distutils.command.install as orig import setuptools # Prior to numpy 1.9, NumPy relies on the '_install' name, so provide it for # now. See https://bitbucket.org/pypa/setuptools/issue/199/ _install = orig....
mit
eliasdesousa/indico
indico/modules/users/__init__.py
2
4543
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
Foxfanmedium/python_training
OnlineCoursera/mail_ru/Python_1/env/Lib/site-packages/pip/_vendor/requests/models.py
360
30532
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import datetime from io import BytesIO, UnsupportedOperation from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import HTTPBasicAuth ...
apache-2.0
flacjacket/sympy
sympy/functions/__init__.py
2
2329
"""A functions module, includes all the standard functions. Combinatorial - factorial, fibonacci, harmonic, bernoulli... Elementary - hyperbolic, trigonometric, exponential, floor and ceiling, sqrt... Special - gamma, zeta,spherical harmonics... """ from sympy.functions.combinatorial.factorials import (factorial, fac...
bsd-3-clause
chrrrles/c3px
app/models/user.py
1
1532
# Copyright (c) 2013 - The C3PX authors. # # This file is part of C3PX. # # C3PX 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, either version 3 of # the License, or (at your option) any later versio...
agpl-3.0
stefanmortensen/AutomationServerManager
atomia_manager/atomia_entities.py
1
32877
class AtomiaAccount(object): def __init__(self, account_id = None, account_description = None, current_request_id = None, account_properties = None, is_active = None, provisioning_description = None): self.account_id = account_id self.account_description = account...
isc
turbomanage/training-data-analyst
courses/machine_learning/deepdive2/structured/labs/serving/application/lib/itsdangerous/_compat.py
11
1133
import decimal import hmac import numbers import sys PY2 = sys.version_info[0] == 2 if PY2: from itertools import izip text_type = unicode # noqa: 821 else: izip = zip text_type = str number_types = (numbers.Real, decimal.Decimal) def _constant_time_compare(val1, val2): """Return ``True`` if ...
apache-2.0
jcomeauictx/django-crispy-forms
crispy_forms/tests/test_layout.py
8
21946
# -*- coding: utf-8 -*- import re import django, logging, warnings from django import forms from django.conf import settings from django.core.urlresolvers import reverse from django.forms.models import formset_factory, modelformset_factory from django.middleware.csrf import _get_new_csrf_key from django.shortcuts impo...
mit
dayatz/taiga-back
tests/integration/test_importer_api.py
1
55762
# -*- coding: utf-8 -*- # Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can r...
agpl-3.0
donutmonger/youtube-dl
youtube_dl/extractor/pornhd.py
106
2422
from __future__ import unicode_literals import re import json from .common import InfoExtractor from ..utils import ( int_or_none, js_to_json, qualities, ) class PornHdIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?pornhd\.com/(?:[a-z]{2,4}/)?videos/(?P<id>\d+)(?:/(?P<display_id>.+))?' _TEST...
unlicense
QGuLL/samba
third_party/pep8/docs/conf.py
36
8016
# -*- coding: utf-8 -*- # # pep8 documentation build configuration file, created by # sphinx-quickstart on Tue Aug 21 09:47:49 2012. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
gpl-3.0
hocinebendou/bika.gsoc
bika/lims/browser/worksheet/views/add_blank.py
3
3164
# coding=utf-8 from AccessControl import getSecurityManager from plone.app.layout.globals.interfaces import IViewView from Products.Archetypes.config import REFERENCE_CATALOG from Products.CMFCore.utils import getToolByName from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from zope.interface impo...
mit
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/operation_display.py
4
1532
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
netortik/yandex-tank
yandextank/validator/tests/test_docs_gen.py
3
4646
# coding=utf-8 import pytest from yandextank.validator.docs_gen import RSTRenderer, format_option @pytest.mark.parametrize('option_schema, expected', [ ({'report_file': { 'description': 'path to file to store autostop report', 'type': 'string', 'default': 'autostop_report.txt'} }, ur"...
lgpl-2.1
Jorge-Rodriguez/ansible
lib/ansible/modules/cloud/google/gcp_resourcemanager_project.py
9
11452
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
soundofjw/appengine-mapreduce
python/test/mapreduce gcs/pipeline/common.py
65
11461
#!/usr/bin/env python # # Copyright 2010 Google 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 o...
apache-2.0
michaelhkw/incubator-impala
infra/python/deps/pip_download.py
1
4439
#!/usr/bin/python # # 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 # "Lice...
apache-2.0
0jpq0/kbengine
kbe/res/scripts/common/Lib/test/test_email/test_utils.py
87
5422
import datetime from email import utils import test.support import time import unittest import sys import os.path class DateTimeTests(unittest.TestCase): datestring = 'Sun, 23 Sep 2001 20:10:55' dateargs = (2001, 9, 23, 20, 10, 55) offsetstring = ' -0700' utcoffset = datetime.timedelta(hours=-7) t...
lgpl-3.0
hollabaq86/haikuna-matata
env/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/jpcntx.py
1777
19348
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mit
naparuba/shinken
libexec/discovery/nmap_discovery_runner.py
3
13621
#!/usr/bin/env python # Copyright (C) 2009-2010: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # # This file is part of Shinken. # # Shinken is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
agpl-3.0
amitsela/beam
sdks/python/apache_beam/examples/cookbook/bigquery_tornadoes.py
6
3612
# # 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
chouseknecht/ansible
lib/ansible/modules/network/ironware/ironware_command.py
87
5154
#!/usr/bin/python # # 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', 'status': ['preview'],...
gpl-3.0
kouaw/CouchPotatoServer
couchpotato/core/media/movie/providers/trailer/youtube_dl/downloader/rtmp.py
8
8784
from __future__ import unicode_literals import os import re import subprocess import sys import time from .common import FileDownloader from ..utils import ( encodeFilename, format_bytes, compat_str, ) class RtmpFD(FileDownloader): def real_download(self, filename, info_dict): def run_rtmpdu...
gpl-3.0
hsnlab/escape
escape/escape/adapt/adaptation.py
2
78554
# Copyright 2017 Janos Czentye # # 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, s...
apache-2.0
dmsuehir/spark-tk
regression-tests/sparktkregtests/testcases/frames/frame_join_test.py
2
8475
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #       http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
ryrzy/LG-D802-G2-_Android_KK_D802v20a
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
alexthered/kienhoc-platform
lms/djangoapps/courseware/features/gst.py
82
2327
from lettuce import world, steps from nose.tools import assert_equals from common import i_am_registered_for_the_course, visit_scenario_item DEFAULT_DATA = """\ <render> <p>Test of the graphical slider tool</p> <div class='gst-value'> <span id="value-display" style="width:50px; float:left; margin-le...
agpl-3.0
blakelyc/heekscnc
nc/tnc151.py
34
2662
################################################################################ # tnc151.py # # Post Processor for the Heidenhain TNC151 machine # import nc import iso_modal import math ################################################################################ class Creator(iso_modal.Creator): ...
bsd-3-clause
kevclarx/ansible
lib/ansible/modules/network/avi/avi_systemconfiguration.py
43
6203
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
gpl-3.0
pshen/ansible
lib/ansible/plugins/callback/profile_roles.py
37
3886
# (C) 2017, Tennis Smith, http://github.com/gamename # # This file 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. # # File is distribu...
gpl-3.0
ShaguptaS/moviepy
examples/headblur.py
1
1570
import pickle from moviepy.editor import * from moviepy.video.tools.tracking import manual_tracking, to_fxfy # LOAD THE CLIP (subclip 6'51 - 7'01 of a chaplin movie) clip = VideoFileClip("../../videos/chaplin.mp4").subclip((6,51.7),(7,01.3)) # MANUAL TRACKING OF THE HEAD # the three next lines are for the manual t...
mit
m039/Void
third-party/void-boost/tools/build/test/remove_requirement.py
44
1800
#!/usr/bin/python # Copyright (C) Vladimir Prus 2006. # Distributed under the Boost Software License, Version 1.0. (See # accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import BoostBuild t = BoostBuild.Tester(use_test_config=False) t.write("jamroot.jam", """ project : requirem...
mit
Seklfreak/Robyul-Red-DiscordBot
cogs/utils/youtube.py
2
2595
#!/usr/bin/env python3 # # Copyright (C) 2015 by NewbieSone <newbiesone@gmail.com> # # 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 la...
gpl-3.0
RoneyThomas/linux-kernel-surnia
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (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 import sys sys.path.append(os.envir...
gpl-2.0
krimkus/django-admin-tools
test_proj/dashboard.py
6
3439
from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from admin_tools.dashboard import Dashboard, AppIndexDashboard from admin_tools.dashboard import modules # to activate your index dashboard add the following to your settings.py: # # ADMIN_TOOLS_INDEX_DASHBOARD = 'tes...
mit
sebastienhupin/qxrad
qooxdoo/component/tutorials/tweets/step4.3/generate.py
19
2109
#!/usr/bin/env python ################################################################################ # # qooxdoo - the new era of web development # # http://qooxdoo.org # # Copyright: # 2008 - 2009 1&1 Internet AG, Germany, http://www.1und1.de # # License: # LGPL: http://www.gnu.org/licenses/lgpl.html # ...
lgpl-3.0
oscarolar/odoo
addons/project/res_config.py
86
4486
# -*- 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
mcollins12321/anita
venv/lib/python2.7/site-packages/pip/_vendor/requests/__init__.py
175
2007
# -*- coding: utf-8 -*- # __ # /__) _ _ _ _ _/ _ # / ( (- (/ (/ (- _) / _) # / """ Requests HTTP library ~~~~~~~~~~~~~~~~~~~~~ Requests is an HTTP library, written in Python, for human beings. Basic GET usage: >>> import requests >>> r = requests.get('https://www.python.org') >>> ...
mit
ivanmeler/android_kernel_samsung_zerolte
tools/perf/scripts/python/net_dropmonitor.py
2669
1738
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
gpl-2.0
JurassicWordExcel/core
pyuno/qa/pytests/testcollections_XEnumeration.py
4
2970
#!/usr/bin/env python # # This file is part of the LibreOffice project. # # 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 unittest import uno from testcollect...
mpl-2.0
synlay/thrift-python
src/protocol/TBase.py
208
2637
# # 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
rrrene/django
django/core/serializers/python.py
153
7692
""" A Python "serializer". Doesn't do much serializing per se -- just converts to and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for other serializers. """ from __future__ import unicode_literals from collections import OrderedDict from django.apps import apps from django.conf impor...
bsd-3-clause
vauxoo-dev/stock-logistics-warehouse
__unported__/stock_orderpoint_creator/wizard/orderpoint_creator.py
23
2960
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Vaucher (Camptocamp) # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Licens...
agpl-3.0
jenalgit/django
django/utils/_os.py
502
3581
from __future__ import unicode_literals import os import sys import tempfile from os.path import abspath, dirname, isabs, join, normcase, normpath, sep from django.core.exceptions import SuspiciousFileOperation from django.utils import six from django.utils.encoding import force_text if six.PY2: fs_encoding = sy...
bsd-3-clause
mapr/impala
tests/query_test/test_tpcds_queries.py
1
3964
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. # Functional tests running the TPC-DS workload # import logging import pytest from tests.common.impala_test_suite import ImpalaTestSuite from tests.common.test_dimensions import (create_single_exec_option_dimension, is_supported_insert_f...
apache-2.0
ctrengove/dj-stripe
tests/test_contrib/test_views.py
11
6004
""" .. module:: dj-stripe.tests.test_contrib.test_views :synopsis: dj-stripe Rest views for Subscription Tests. .. moduleauthor:: Philippe Luickx (@philippeluickx) """ from __future__ import unicode_literals from decimal import Decimal from django.utils import timezone from django.conf import settings from dja...
bsd-3-clause
deeuu/loudness
python/tests/test_PowerSpectrum.py
1
2584
import matplotlib.pyplot as plt import numpy as np import loudness as ln # Input setup fs = 32000 frameSizes = np.array([2048, 1024, 512]) nSources = 1 # hard-coded for one source nEars = 2 # hard-coded for two ears nBands = frameSizes.size x = np.random.randn(nSources, nEars, nBands, frameSizes[0]) for frame in rang...
gpl-3.0
serpilliere/miasm
example/expression/access_c.py
2
5216
""" This example demonstrates the recovering of possible C types for an arbitrary variable in an assembly code (the types are inferred from the function argument types). It also displays the C code used to access this variable. Input: * definitions of the C types that can be used by the code * layout of structures (p...
gpl-2.0
tiborsimko/invenio-communities
invenio_communities/serializers/__init__.py
4
1272
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
gpl-2.0
hkchenhongyi/django
django/template/defaultfilters.py
224
28536
"""Default variable filters.""" from __future__ import unicode_literals import random as random_module import re import warnings from decimal import ROUND_HALF_UP, Context, Decimal, InvalidOperation from functools import wraps from pprint import pformat from django.conf import settings from django.utils import format...
bsd-3-clause
JasonLG1979/pithos
pithos/plugins/screensaver_pause.py
2
1833
# -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; -*- # Copyright (C) 2010-2012 Kevin Mehall <km@kevinmehall.net> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This prog...
gpl-3.0
santisiri/popego
popego/popserver/popserver/agents/delicious_agent.py
3
3574
# -*- coding: utf-8 -*- __docformat__='restructuredtext' from BeautifulSoup import BeautifulSoup from urllib import urlopen import urllib2 from itertools import imap, takewhile import re, md5 from popserver.lib.functional import memo from popserver.lib.util import strToDatetime PAGE_SIZE = 100 POPULARITY_RG = re.comp...
bsd-3-clause
Metaswitch/calico-neutron
neutron/plugins/ml2/drivers/l2pop/rpc.py
8
4604
# 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
gonesurfing/Quisk_rpi_remote
quisk_conf_sdr8600.py
3
1261
# These are the configuration parameters for receiving the # 10.7 MHz IF output of the AOR AR8600 receiver with the # SDR-IQ by RfSpace. This results in a 100 kHz to 3 GHz # wide range receiver with pan adapter. # Please do not change this sample file. # Instead copy it to your own .quisk_conf.py and make changes the...
gpl-2.0
liikGit/MissionPlanner
Lib/site-packages/numpy/f2py/tests/test_return_character.py
59
3768
from numpy.testing import * from numpy import array from numpy.compat import asbytes import util class TestReturnCharacter(util.F2PyTest): def check_function(self, t): tname = t.__doc__.split()[0] if tname in ['t0','t1','s0','s1']: assert t(23)==asbytes('2') r = t('ab');asse...
gpl-3.0
vipsql/cobbler
cobbler/modules/manage_ndjbdns.py
14
2502
# coding=utf-8 """ This is some of the code behind 'cobbler sync'. Copyright 2014, Mittwald CM Service GmbH & Co. KG Martin Helmich <m.helmich@mittwald.de> Daniel Krämer <d.kraemer@mittwald.de> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as...
gpl-2.0
sbbic/core
writerfilter/source/ooxml/resourceids.py
7
1436
#!/usr/bin/env python # # This file is part of the LibreOffice project. # # 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/. # from __future__ import print_function import...
gpl-3.0
gsmartway/odoo
addons/account_payment/__openerp__.py
261
2925
# -*- 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