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
tmuelle2/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/thread/messagepump.py
151
2482
# Copyright (c) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
stscieisenhamer/glue
glue/viewers/common/viz_client.py
2
9401
from __future__ import absolute_import, division, print_function import matplotlib.pyplot as plt from glue.core import Data from glue.core.message import SettingsChangeMessage from glue.core.client import Client from glue.core.layer_artist import LayerArtistContainer from glue.utils.matplotlib import freeze_margins ...
bsd-3-clause
RenderBroken/Victara-Stock-kernel
scripts/build-all.py
1474
10189
#! /usr/bin/env python # Copyright (c) 2009-2013, The Linux Foundation. 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 # ...
gpl-2.0
Grumbel/scatterbackup
tests/test_generation.py
1
1634
# ScatterBackup - A chaotic backup solution # Copyright (C) 2015 Ingo Ruhnke <grumbel@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 ...
gpl-3.0
ian-garrett/meetMe
env/lib/python3.4/site-packages/pip/_vendor/lockfile/symlinklockfile.py
487
2613
from __future__ import absolute_import import time import os from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout, AlreadyLocked) class SymlinkLockFile(LockBase): """Lock access to a file using symlink(2).""" def __init__(self, path, threaded=True, timeout=None): # s...
artistic-2.0
psyhofreak/iTerm2
tests/esctest/tests/tbc.py
31
1409
from esc import ESC, TAB import esccmd import escio from escutil import AssertEQ, GetCursorPosition from esctypes import Point class TBCTests(object): def test_TBC_Default(object): """No param clears the tab stop at the cursor.""" escio.Write(TAB) AssertEQ(GetCursorPosition().x(), 9) esccmd.TBC() ...
gpl-2.0
skywave/caf-zte-blade
scripts/gcc-wrapper.py
41
3803
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011, Code Aurora Forum. 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 ...
gpl-2.0
caldwell/servo
tests/wpt/css-tests/tools/html5lib/html5lib/trie/datrie.py
785
1166
from __future__ import absolute_import, division, unicode_literals from datrie import Trie as DATrie from six import text_type from ._base import Trie as ABCTrie class Trie(ABCTrie): def __init__(self, data): chars = set() for key in data.keys(): if not isinstance(key, text_type): ...
mpl-2.0
luiscarlosgph/nas
env/lib/python2.7/site-packages/django/contrib/webdesign/templatetags/webdesign.py
75
2194
from __future__ import unicode_literals from django.contrib.webdesign.lorem_ipsum import words, paragraphs from django import template register = template.Library() class LoremNode(template.Node): def __init__(self, count, method, common): self.count, self.method, self.common = count, method, common ...
mit
DylanMcCall/rhythmbox-songinfo-context-menu
plugins/lyrics/DarkLyricsParser.py
3
5935
# -*- Mode: python; coding: utf-8; tab-width: 8; indent-tabs-mode: t; -*- # # Copyright (C) 2008, 2009, 2010 Edgar Luna # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at...
gpl-2.0
swenson/sagewiki
unidecode/unidecode/x06e.py
252
4640
data = ( 'Ben ', # 0x00 'Yuan ', # 0x01 'Wen ', # 0x02 'Re ', # 0x03 'Fei ', # 0x04 'Qing ', # 0x05 'Yuan ', # 0x06 'Ke ', # 0x07 'Ji ', # 0x08 'She ', # 0x09 'Yuan ', # 0x0a 'Shibui ', # 0x0b 'Lu ', # 0x0c 'Zi ', # 0x0d 'Du ', # 0x0e '[?] ', # 0x0f 'Jian ', # 0x10 'Mi...
gpl-2.0
chris4795/u-boot-novena
test/py/u_boot_console_sandbox.py
12
2376
# Copyright (c) 2015 Stephen Warren # Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. # # SPDX-License-Identifier: GPL-2.0 # Logic to interact with the sandbox port of U-Boot, running as a sub-process. import time from u_boot_spawn import Spawn from u_boot_console_base import ConsoleBase class Cons...
gpl-2.0
Kingdread/qutebrowser
scripts/dev/run_pylint_on_tests.py
8
2085
#!/usr/bin/env python3 # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
gpl-3.0
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Python-2.7.10/Doc/includes/tzinfo-examples.py
11
5062
from datetime import tzinfo, timedelta, datetime ZERO = timedelta(0) HOUR = timedelta(hours=1) # A UTC class. class UTC(tzinfo): """UTC""" def utcoffset(self, dt): return ZERO def tzname(self, dt): return "UTC" def dst(self, dt): return ZERO utc = UTC() # A class building...
mit
HwaAnnaLee/androguard
demos/crackme_dexlabs_patch.py
38
1611
#!/usr/bin/env python import sys PATH_INSTALL = "./" sys.path.append(PATH_INSTALL) from androguard.core.bytecodes import dvm from androguard.core.bytecodes import apk from androguard.core.analysis import analysis from androguard.core import androconf class Nop(dvm.Instruction10x) : def __init__(self) : ...
apache-2.0
mhfowler/brocascoconut
mhf/models.py
3
1734
from django.db import models #----------------------------------------------------------------------------------------------------------------------- # Useful manager for all models. #----------------------------------------------------------------------------------------------------------------------- class XManager(...
mit
forge33/CouchPotatoServer
couchpotato/core/plugins/dashboard.py
21
3895
import random as rndm import time from CodernityDB.database import RecordDeleted from couchpotato import get_db from couchpotato.api import addApiView from couchpotato.core.event import fireEvent from couchpotato.core.helpers.variable import splitString, tryInt from couchpotato.core.logger import CPLog from couchpotat...
gpl-3.0
Salat-Cx65/python-for-android
python3-alpha/python3-src/Lib/xml/dom/minidom.py
45
66631
"""\ minidom.py -- a lightweight DOM implementation. parse("foo.xml") parseString("<foo><bar/></foo>") Todo: ===== * convenience methods for getting elements and text. * more testing * bring some of the writer and linearizer code into conformance with this interface * SAX 2 namespaces """ import codecs ...
apache-2.0
hsu/ardupilot
Tools/autotest/pysim/iris_ros.py
81
3622
#!/usr/bin/env python """ Python interface to euroc ROS multirotor simulator See https://pixhawk.org/dev/ros/sitl """ import time import mav_msgs.msg as mav_msgs import px4.msg as px4 import rosgraph_msgs.msg as rosgraph_msgs import rospy import sensor_msgs.msg as sensor_msgs from aircraft import Aircraft from rotma...
gpl-3.0
gdgellatly/OCB1
addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/rpc.py
381
5849
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
openstack/python-openstacksdk
openstack/tests/unit/test_placement_rest.py
1
2593
# Copyright (c) 2018 Red Hat, Inc. # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
apache-2.0
darkryder/django
tests/queryset_pickle/models.py
281
1904
import datetime from django.db import DJANGO_VERSION_PICKLE_KEY, models from django.utils import six from django.utils.translation import ugettext_lazy as _ def standalone_number(): return 1 class Numbers(object): @staticmethod def get_static_number(): return 2 class PreviousDjangoVersionQuer...
bsd-3-clause
swindonmakers/AccessibleThingController
libraries/ArduinoJson/third-party/cpplint/cpplint.py
48
134240
#!/usr/bin/env python # # Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
gpl-3.0
alexrudnick/terere
dependencies/AntiMorfo-1.2/antimorfo/morpho/morphology.py
2
35105
""" This file is part of L3Morpho. L3Morpho 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. L3Morpho is distributed in ...
gpl-3.0
def-/commandergenius
project/jni/python/src/Lib/plat-freebsd6/IN.py
172
12416
# Generated by h2py from /usr/include/netinet/in.h # Included from sys/cdefs.h __GNUCLIKE_ASM = 3 __GNUCLIKE_ASM = 2 __GNUCLIKE___TYPEOF = 1 __GNUCLIKE___OFFSETOF = 1 __GNUCLIKE___SECTION = 1 __GNUCLIKE_ATTRIBUTE_MODE_DI = 1 __GNUCLIKE_CTOR_SECTION_HANDLING = 1 __GNUCLIKE_BUILTIN_CONSTANT_P = 1 __GNUCLIKE_BUILTIN_VARA...
lgpl-2.1
cloudera/hue
desktop/core/ext-py/SQLAlchemy-1.3.17/lib/sqlalchemy/orm/session.py
2
131284
# orm/session.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Provides the Session class and related utilities.""" import itertools import sys ...
apache-2.0
earnsf/BankingTestAPI
earn-aggcat/aggcat/parser.py
1
4516
from __future__ import absolute_import import re from lxml import etree try: from collections import Counter except ImportError: from .counter import Counter from .utils import remove_namespaces def _get_item(self, index): return self._list[index] def _len(self): return len(self._list) def _ite...
gpl-3.0
vathpela/anaconda
pyanaconda/ui/gui/spokes/software_selection.py
1
25487
# Software selection spoke classes # # Copyright (C) 2011-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, or (at your option) any later version. # This program is...
gpl-2.0
rainbowbreeze/sanity-check-pavia
shell/mainfile.py
1
1227
import json __author__ = 'rainbowbreeze' import os from logic.contentdownloader import ContentDownloader from logic.scraper import Scraper from logic.itemsmanager import ItemsManager def dostuff(): with open('mainfile.py', 'r') as f: read_line = f.read() print(read_line) # http://www.artima.com/...
gpl-3.0
angelapper/edx-platform
lms/djangoapps/shoppingcart/tests/test_context_processor.py
10
3318
""" Unit tests for shoppingcart context_processor """ from django.conf import settings from django.contrib.auth.models import AnonymousUser from mock import Mock, patch from course_modes.tests.factories import CourseModeFactory from shoppingcart.context_processor import user_has_cart_context_processor from shoppingcar...
agpl-3.0
vakkov/android-n900-nitdroid_kernel
tools/perf/scripts/python/sctop.py
895
1936
# 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
DefyVentures/edx-platform
common/test/acceptance/pages/studio/settings.py
16
2936
""" Course Schedule and Details Settings page. """ from bok_choy.promise import EmptyPromise from .course_page import CoursePage from .utils import press_the_notification_button class SettingsPage(CoursePage): """ Course Schedule and Details Settings page. """ url_path = "settings/details" def ...
agpl-3.0
cwoac/TTANR
ttsanr.py
1
8684
#!/usr/bin/env python27 import ttsutil import os.path import urllib import json import untangle import argparse import shutil import PIL.Image cards={} debug=True # TTS util overrides def make_filename(image): return ttsutil.make_cache_filename(image,"ANR") def make_cache_dir(): ttsutil.make_cache_dir("AN...
mit
ddico/odoomrp-wip
account_treasury_forecast/models/account_treasury_forecast.py
31
9136
# -*- encoding: utf-8 -*- ############################################################################## # # Avanzosc - Avanced Open Source Consulting # Copyright (C) 2010 - 2011 Avanzosc <http://www.avanzosc.com> # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
tchellomello/home-assistant
tests/components/hue/test_config_flow.py
2
20257
"""Tests for Philips Hue config flow.""" import asyncio from aiohttp import client_exceptions import aiohue from aiohue.discovery import URL_NUPNP import pytest import voluptuous as vol from homeassistant import config_entries from homeassistant.components import ssdp from homeassistant.components.hue import config_f...
apache-2.0
eamigo86/graphene-django-extras
graphene_django_extras/fields.py
1
11299
# -*- coding: utf-8 -*- import operator from functools import partial from graphene import Field, List, ID, Argument from graphene.types.structures import Structure, NonNull from graphene_django.fields import DjangoListField as DLF from graphene_django.filter.utils import get_filtering_args_from_filterset from graphen...
mit
OpenDMM/bitbake
lib/bb/data.py
1
13319
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- """ BitBake 'Data' implementations Functions for interacting with the data structure used by the BitBake build tools. The expandData and update_data are the most expensive operations. At night the cookie monster came by and sugge...
gpl-2.0
knz/dashboard
report.py
1
8898
from datetime import datetime,timedelta import humanize import sqlite3 import sys import time conn = sqlite3.connect("issues.db") cu = conn.cursor() c = conn.cursor() def header(user): print("""<!DOCTYPE html> <html lang=en> <head> <title>CockroachDB Issue dashboard - %s</title> <meta charset="utf-8"> ...
apache-2.0
npuichigo/ttsflow
third_party/tensorflow/tensorflow/python/framework/subscribe_test.py
46
9259
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
mihailim/Sigil
src/Resource_Files/plugin_launchers/python/navprocessor.py
5
17631
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # Copyright (c) 2019-2020 Kevin B. Hendricks # 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....
gpl-3.0
SkySchermer/uweclang
uweclang/batch/batch.py
1
12226
"""UWEC Language Tools batch tools module Provides functions for processing data in batches. Module Globals: BATCH_PARSER: Provides a template ArgumentParser for accepting arguments concerning batch file processing. It provides the following setup: Positional Arguments: file: Any...
mit
clarkfitzg/dask
dask/array/tests/test_image.py
5
1472
from contextlib import contextmanager import os import shutil from tempfile import mkdtemp import pytest pytest.importorskip('skimage') from dask.array.image import imread as da_imread import numpy as np from skimage.io import imread, imsave @contextmanager def random_images(n, shape): dirname = mkdtemp() fo...
bsd-3-clause
MotorolaMobilityLLC/external-chromium_org
chrome/common/extensions/docs/server2/object_store_creator_test.py
52
1906
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from appengine_wrappers import GetAppVersion from test_object_store import TestObjectStore from object_store_creator i...
bsd-3-clause
exosite-labs/pyonep
pyonep/portals/__init__.py
1
20890
# pylint: disable=W0312,R0913 import requests, json from pyonep.portals.constants import HTTP_STATUS from pyonep.portals.endpoints import Endpoints from pyonep.portals.utils import dictify_device_meta,\ stringify_device_meta from getpass import getpass import sys if sys.version_info[0]...
bsd-3-clause
nkhuyu/graphite-web
webapp/graphite/metrics/views.py
23
9657
"""Copyright 2009 Chris Davis 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 dist...
apache-2.0
terbolous/SickRage
lib/pgi/clib/gir/girepository.py
19
7060
# Copyright 2012 Christoph Reiter # # This library 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 2.1 of the License, or (at your option) any later version. from ctypes import POINTER...
gpl-3.0
gratefulfrog/ArduGuitar
Ardu3/DraftDevt/Pyboard/AD75019GUITester/Version01/tst.py
1
3708
#!/usr/local/bin/python3.4 # server_01.py """ This reproduces the Arduino functionality from Arduino_v01.ino this requires updated boot.py ---- # boot.py -- run on boot-up # can run arbitrary Python, but best to keep it minimal import pyb pyb.main('main.py') # main script to run after this one pyb.usb_mode('CDC+MSC')...
gpl-2.0
chouseknecht/ansible
lib/ansible/modules/packaging/os/apt_rpm.py
79
4726
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, Evgenii Terechkov # Written by Evgenii Terechkov <evg@altlinux.org> # Based on urpmi module written by Philippe Makowski <philippem@mageia.org> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__...
gpl-3.0
BeyondTheClouds/nova
nova/tests/unit/objects/test_service.py
5
21411
# 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 agree...
apache-2.0
ageron/tensorflow
tensorflow/contrib/learn/python/learn/estimators/dnn_test.py
10
60830
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
yeming233/rally
tests/unit/plugins/openstack/services/image/test_glance_common.py
1
4258
# 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 agreed to in...
apache-2.0
lbartoletti/QGIS
python/plugins/processing/algs/grass7/ext/i_colors_enhance.py
45
1440
# -*- coding: utf-8 -*- """ *************************************************************************** i_colors_enhance.py ------------------- Date : March 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ***********************...
gpl-2.0
orbitfp7/nova
nova/virt/hyperv/volumeutils.py
2
4877
# Copyright 2012 Pedro Navarro Perez # Copyright 2013 Cloudbase Solutions Srl # 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...
apache-2.0
willemneal/Docky
lib/pygments/styles/murphy.py
135
2751
# -*- coding: utf-8 -*- """ pygments.styles.murphy ~~~~~~~~~~~~~~~~~~~~~~ Murphy's style from CodeRay. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Name, Comment,...
mit
michael-dev2rights/ansible
lib/ansible/modules/windows/_win_msi.py
36
2953
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Matt Martz <matt@sivel.net>, and others # # 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 t...
gpl-3.0
jbenden/ansible
lib/ansible/module_utils/urls.py
9
44724
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
janezhango/BigDataMachineLearning
py/testdir_single_jvm/test_GLM2_many_cols_real.py
2
3919
import unittest, random, sys, time sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_hosts, h2o_browse as h2b, h2o_import as h2i, h2o_glm def write_syn_dataset(csvPathname, rowCount, colCount, SEED): # 8 random generatators, 1 per column r1 = random.Random(SEED) dsf = open(csvPathname, "w+") f...
apache-2.0
denisff/python-for-android
python3-alpha/python3-src/Lib/test/test_ntpath.py
57
12697
import ntpath import os import sys from test.support import TestFailed from test import support, test_genericpath from tempfile import TemporaryFile import unittest def tester(fn, wantResult): fn = fn.replace("\\", "\\\\") gotResult = eval(fn) if wantResult != gotResult: raise TestFailed("%s shoul...
apache-2.0
vmthunder/nova
nova/tests/scheduler/test_client.py
17
4355
# Copyright (c) 2014 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
spcui/autotest
setup.py
1
4226
import os # High level way of installing each autotest component import client.setup import frontend.setup import cli.setup import server.setup import scheduler.setup import database_legacy.setup import tko.setup import utils.setup import mirror.setup import installation_support.setup from distutils.core import setup...
gpl-2.0
rherault-insa/numpy
numpy/distutils/fcompiler/gnu.py
28
14667
from __future__ import division, absolute_import, print_function import re import os import sys import warnings import platform import tempfile from subprocess import Popen, PIPE, STDOUT from numpy.distutils.fcompiler import FCompiler from numpy.distutils.exec_command import exec_command from numpy.distutils.misc_uti...
bsd-3-clause
tlksio/tlksio
env/lib/python3.4/site-packages/requests/packages/chardet/escprober.py
2936
3187
######################## 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
asajeffrey/servo
tests/wpt/web-platform-tests/tools/third_party/pytest/testing/test_collection.py
30
31894
from __future__ import absolute_import, division, print_function import pprint import sys import pytest import _pytest._code from _pytest.main import Session, EXIT_NOTESTSCOLLECTED, _in_venv class TestCollector(object): def test_collect_versus_item(self): from pytest import Collector, Item asse...
mpl-2.0
jonboiser/kolibri
.buildkite/upload_artifacts.py
4
7706
""" # Requirements: * Generate access token in your Github account, then create environment variable GITHUB_ACCESS_TOKEN. - e.g export GITHUB_ACCESS_TOKEN=1ns3rt-my-t0k3n-h3re. * Generate a service account key for your Google API credentials, then create environment variable GOOGLE_APPLICATION_CREDENTI...
mit
hon-po/Marlin
Marlin/scripts/createSpeedLookupTable.py
333
1382
#!/usr/bin/env python """ Generate the stepper delay lookup table for Marlin firmware. """ import argparse __author__ = "Ben Gamari <bgamari@gmail.com>" __copyright__ = "Copyright 2012, Ben Gamari" __license__ = "GPL" parser = argparse.ArgumentParser(description=__doc__) parser.add_argument('-f', '--cpu-freq', type...
gpl-3.0
jreback/pandas
pandas/core/computation/align.py
2
5999
""" Core eval alignment algorithms. """ from __future__ import annotations from functools import partial, wraps from typing import TYPE_CHECKING, Dict, Optional, Sequence, Tuple, Type, Union import warnings import numpy as np from pandas._typing import FrameOrSeries from pandas.errors import PerformanceWarning from...
bsd-3-clause
artemh/asuswrt-merlin
release/src/router/samba36/source3/stf/info3cache.py
98
1673
#!/usr/bin/python # # Upon a winbindd authentication, test that an info3 record is cached in # netsamlogon_cache.tdb and cache records are removed from winbindd_cache.tdb # import comfychair, stf from samba import tdb, winbind # # We want to implement the following test on a win2k native mode domain. # # 1. trash net...
gpl-2.0
cwisecarver/osf.io
addons/s3/routes.py
32
1947
from framework.routing import Rule, json_renderer from addons.s3 import views api_routes = { 'rules': [ Rule( [ '/settings/s3/accounts/', ], 'post', views.s3_add_user_account, json_renderer, ), Rule( [...
apache-2.0
ckohl/illumos-kvm-cmd
scripts/qemu-gdb.py
286
2813
#!/usr/bin/python # GDB debugging support # # Copyright 2012 Red Hat, Inc. and/or its affiliates # # Authors: # Avi Kivity <avi@redhat.com> # # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. # # Contributions after 2012-01-13 are licensed under the...
gpl-2.0
plucury/hyper
hyper/compat.py
41
1775
# -*- coding: utf-8 -*- # flake8: noqa """ hyper/compat ~~~~~~~~~~~~ Normalizes the Python 2/3 API for internal use. """ from contextlib import contextmanager import sys import zlib try: from . import ssl_compat except ImportError: # TODO log? ssl_compat = None _ver = sys.version_info is_py2 = _ver[0] ==...
mit
rebranch/payanyway-python
payanyway/django/forms.py
1
2502
# -*- coding:utf-8 -*- import hashlib import urllib from django import forms from payanyway.api import Api class MonetaForm(forms.Form, Api): def _set_param(self, key, value): if not key in self.fields.keys(): self.fields[key] = forms.CharField(widget=forms.HiddenInput) self.fields[ke...
mit
nuuuboo/odoo
addons/l10n_cr/__init__.py
438
2045
# -*- encoding: utf-8 -*- ############################################################################## # # __init__.py # l10n_cr_account # First author: Carlos Vásquez <carlos.vasquez@clearcorp.co.cr> (ClearCorp S.A.) # Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved....
agpl-3.0
realsaiko/odoo
addons/gamification_sale_crm/__openerp__.py
320
1426
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
biodrone/plex-desk
desk/flask/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connectionpool.py
155
29526
import errno import logging import sys import warnings from socket import error as SocketError, timeout as SocketTimeout import socket try: # Python 3 from queue import LifoQueue, Empty, Full except ImportError: from Queue import LifoQueue, Empty, Full import Queue as _ # Platform-specific: Windows fr...
mit
mihailignatenko/erp
addons/marketing_campaign/__init__.py
380
1087
# -*- 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
andnovar/networkx
networkx/algorithms/approximation/dominating_set.py
45
4404
# -*- coding: utf-8 -*- # Copyright (C) 2011-2012 by # Nicholas Mancuso <nick.mancuso@gmail.com> # All rights reserved. # BSD license. """Functions for finding node and edge dominating sets. A *`dominating set`_[1] for an undirected graph *G* with vertex set *V* and edge set *E* is a subset *D* of *V* such tha...
bsd-3-clause
Tithen-Firion/youtube-dl
youtube_dl/extractor/radiofrance.py
91
2089
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class RadioFranceIE(InfoExtractor): _VALID_URL = r'^https?://maison\.radiofrance\.fr/radiovisions/(?P<id>[^?#]+)' IE_NAME = 'radiofrance' _TEST = { 'url': 'http://maison.radiofrance.fr/radiovisio...
unlicense
IKholopov/HackUPC2017
hackupc/env/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.py
384
6309
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type from lxml import etree from ..treebuilders.etree import tag_regexp from . import base from .. import _ihatexml def ensure_str(s): if s is None: return None elif isinstance(s, text_type): ...
apache-2.0
lacrazyboy/scrapy
scrapy/utils/log.py
108
6012
# -*- coding: utf-8 -*- import sys import logging import warnings from logging.config import dictConfig from twisted.python.failure import Failure from twisted.python import log as twisted_log import scrapy from scrapy.settings import overridden_settings, Settings from scrapy.exceptions import ScrapyDeprecationWarni...
bsd-3-clause
cirrusone/phantom2
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py
119
23727
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
ewandor/home-assistant
homeassistant/components/sensor/toon.py
10
6813
""" Component for the rebranded Quby thermostat as provided by Eneco. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.toon/ """ import logging import datetime as datetime from homeassistant.helpers.entity import Entity import homeassistant.compone...
apache-2.0
wxwilcke/pakbon-ld
src/pakbon-ld.py
1
4821
#!/usr/bin/python3 import sys import os import argparse import re import data.writer as writer import translator supported_version = '3.1.0' version = '0.2' def main(parser): sikb_zip = re.sub('src/pakbon-ld.py', 'if/SIKB0102 versie 3.1.0 XSD en Lookup domeintabellen.zip', os.path.realpath(__file__)) args =...
gpl-2.0
beeftornado/sentry
tests/sentry/api/endpoints/team_projects.py
1
1746
from __future__ import absolute_import import six from django.core.urlresolvers import reverse from sentry.models import Project from sentry.testutils import APITestCase from sentry.utils.compat import map class TeamProjectIndexTest(APITestCase): def test_simple(self): self.login_as(user=self.user) ...
bsd-3-clause
MTASZTAKI/ApertusVR
plugins/physics/bulletPhysics/3rdParty/bullet3/examples/pybullet/gym/pybullet_envs/gym_pendulum_envs.py
4
3164
from .scene_abstract import SingleRobotEmptyScene from .env_bases import MJCFBaseBulletEnv from robot_pendula import InvertedPendulum, InvertedPendulumSwingup, InvertedDoublePendulum import gym, gym.spaces, gym.utils, gym.utils.seeding import numpy as np import pybullet import os, sys class InvertedPendulumBulletEnv(...
mit
alfa-addon/addon
plugin.video.alfa/lib/python_libtorrent/linux_mipsel_ucs4/1.0.9/__init__.py
362
1240
#-*- coding: utf-8 -*- ''' python-libtorrent for Kodi (script.module.libtorrent) Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman 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 t...
gpl-3.0
nphilipp/python-slip
slip/gtk/tools.py
1
2129
# -*- coding: utf-8 -*- # slip.gtk.tools -- utility functions for gtk # # Copyright © 2004, 2007 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License,...
gpl-2.0
BAMitUp/Fantasy-Football-Shuffler
ENV/lib/python2.7/site-packages/pip/commands/install.py
156
14971
from __future__ import absolute_import import logging import operator import os import tempfile import shutil import warnings try: import wheel except ImportError: wheel = None from pip.req import RequirementSet from pip.basecommand import RequirementCommand from pip.locations import virtualenv_no_global, dis...
gpl-3.0
abcdelf/apm_planner
libs/mavlink/share/pyshared/pymavlink/mavextra.py
28
4562
#!/usr/bin/env python ''' useful extra functions for use by mavlink clients Copyright Andrew Tridgell 2011 Released under GNU GPL version 3 or later ''' from math import * def kmh(mps): '''convert m/s to Km/h''' return mps*3.6 def altitude(press_abs, ground_press=955.0, ground_temp=30): '''calculate ba...
agpl-3.0
kjyv/FloBaRoID
tools/paramErrorPlot.py
2
5150
#!/usr/bin/env python #-*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import from builtins import range import sys from typing import AnyStr, List # math import numpy as np import numpy.linalg as la # plotting import matplotlib.pyplot as pl...
lgpl-3.0
synth3tk/the-blue-alliance
tests/test_apiv2_team_controller.py
1
15175
import unittest2 import webtest import json import webapp2 from datetime import datetime from google.appengine.ext import ndb from google.appengine.ext import testbed from consts.event_type import EventType from controllers.api.api_district_controller import ApiDistrictTeamsController from controllers.api.api_team_c...
mit
cameron581/android_kernel_lge_msm8974
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
3246
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
gpl-2.0
wangtuo/elasticsearch
dev-tools/prepare_release_update_documentation.py
269
5009
# 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
h3llrais3r/SickRage
lib/hachoir_parser/misc/ole2.py
74
14203
""" Microsoft Office documents parser. OLE2 files are also used by many other programs to store data. Informations: * wordole.c of AntiWord program (v0.35) Copyright (C) 1998-2003 A.J. van Os Released under GNU GPL http://www.winfield.demon.nl/ * File gsf-infile-msole.c of libgsf library (v1.14.0) Copyright (C...
gpl-3.0
huguesv/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/multiprocessing/reduction.py
6
9361
# # Module which deals with pickling of objects. # # multiprocessing/reduction.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # from abc import ABCMeta import copyreg import functools import io import os import pickle import socket import sys from . import context __all__ ...
apache-2.0
Nyker510/scikit-learn
sklearn/tests/test_random_projection.py
142
14033
from __future__ import division import numpy as np import scipy.sparse as sp from sklearn.metrics import euclidean_distances from sklearn.random_projection import johnson_lindenstrauss_min_dim from sklearn.random_projection import gaussian_random_matrix from sklearn.random_projection import sparse_random_matrix from...
bsd-3-clause
alberto-antonietti/nest-simulator
pynest/nest/tests/test_connect_fixed_indegree.py
10
5729
# -*- coding: utf-8 -*- # # test_connect_fixed_indegree.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...
gpl-2.0
supriyasawant/gstudio
gnowsys-ndf/gnowsys_ndf/ndf/views/Bib_App.py
8
17324
from django.http import HttpResponseRedirect from django.http import HttpResponse from django.shortcuts import render_to_response #render uncomment when to use from django.template import RequestContext from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from django_m...
agpl-3.0
damdam-s/bank-payment
account_banking_mandate/models/payment_line.py
10
3509
# -*- encoding: utf-8 -*- ############################################################################## # # Mandate module for openERP # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # @author: Cyril Sester <csester@compassion.ch>, # Alexis de Lattre <alexis.delattre@akretion.c...
agpl-3.0
woutdenolf/spectrocrunch
spectrocrunch/align/tests/helper_teststack.py
1
12436
# -*- coding: utf-8 -*- import numpy as np # import scipy.ndimage from scipy.stats import rv_continuous from ..types import transformationType def makeGaussian(x, y, x0, y0, sx, sy, rho, A): num = ( (x - x0) ** 2 / sx ** 2 - 2 * rho / (sx * sy) * (x - x0) * (y - y0) + (y - y0) ** 2 / sy...
mit
teto/ns-3-dev-git
src/wimax/bindings/modulegen__gcc_LP64.py
1
841703
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0