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
mogui/AutobahnTestSuite
autobahntestsuite/autobahntestsuite/case/case7_13_2.py
4
1696
############################################################################### ## ## Copyright 2011 Tavendo GmbH ## ## 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-2.0
barykaed/Pelican-Test
activate/Lib/site-packages/pip/req/req_install.py
17
41829
from __future__ import absolute_import import logging import os import re import shutil import sys import tempfile import zipfile from distutils.util import change_root from distutils import sysconfig from email.parser import FeedParser from pip._vendor import pkg_resources, six from pip._vendor.distlib.markers impo...
mit
Russell-IO/ansible
lib/ansible/modules/identity/ipa/ipa_host.py
28
10380
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
quinot/ansible
lib/ansible/modules/cloud/amazon/ec2_vol_facts.py
20
3798
#!/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
southpawtech/TACTIC-DEV
src/pyasm/prod/web/camera_info_wdg.py
6
1210
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
zero-ui/miniblink49
v8_7_5/tools/testrunner/local/command.py
3
9119
# Copyright 2017 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # for py2/py3 compatibility from __future__ import print_function import os import re import signal import subprocess import sys import threading import t...
gpl-3.0
Dexhub/MTX
src/python/m5/util/attrdict.py
84
3421
# Copyright (c) 2006 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list ...
bsd-3-clause
Lightmatter/django-inlineformfield
.tox/py27/lib/python2.7/site-packages/pip/_vendor/distlib/compat.py
357
38875
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from __future__ import absolute_import import os import re import sys if sys.version_info[0] < 3: from StringIO import StringIO stri...
mit
SDHM/vitess
py/vtproto/vtworkerservice_pb2.py
5
3308
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: vtworkerservice.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection a...
bsd-3-clause
dracos/django
django/db/backends/mysql/creation.py
23
3265
import subprocess import sys from django.db.backends.base.creation import BaseDatabaseCreation from .client import DatabaseClient class DatabaseCreation(BaseDatabaseCreation): def sql_table_creation_suffix(self): suffix = [] test_settings = self.connection.settings_dict['TEST'] if test_...
bsd-3-clause
Gabotero/GNURadioNext
gr-blocks/python/qa_tagged_stream_mux.py
1
3562
#!/usr/bin/env python # # Copyright 2013 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
rosenvladimirov/odoo
purchase/report/__init__.py
380
1070
# -*- 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
nornagon/ninja
misc/measure.py
77
1754
#!/usr/bin/env python # Copyright 2011 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...
apache-2.0
geleouet/Racing-Car-Katas
Python/TextConverter/html_pages.py
8
1427
"""This is a second, slightly harder problem on the same theme as the first.""" # This is for Python 3 import html as html_converter # for Python 2 uncomment this line #import cgi as html_converter class HtmlPagesConverter: def __init__(self, filename): """Read the file and note the positions of the pag...
mit
phev8/dataset_tools
experiment_handler/time_synchronisation.py
1
1444
import os import pandas as pd def read_synchronisation_file(experiment_root): filepath = os.path.join(experiment_root, "labels", "synchronisation.csv") return pd.read_csv(filepath) def convert_timestamps(experiment_root, timestamps, from_reference, to_reference): """ Convert numeric timestamps (seco...
mit
westinedu/sovleit
django/contrib/gis/feeds.py
327
5925
from django.contrib.syndication.feeds import Feed as BaseFeed, FeedDoesNotExist from django.utils.feedgenerator import Atom1Feed, Rss201rev2Feed class GeoFeedMixin(object): """ This mixin provides the necessary routines for SyndicationFeed subclasses to produce simple GeoRSS or W3C Geo elements. """ ...
bsd-3-clause
domeger/SplunkTAforPuppetEnterprise
bin/splunktaforpuppetenterprise/solnlib/packages/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') >>> ...
apache-2.0
xfaxca/pygaero
example/tmax_peakfind_example.py
1
4986
# tmax_peakfind_example.py """ Demonstration of some of the primary functions in pygaero, including Tmax finding and elemental analysis. """ # Module import from pygaero import pio from pygaero import therm from pygaero import gen_chem import os import matplotlib.pyplot as plt def example1(): # -----------------...
gpl-3.0
sbt9uc/osf.io
scripts/migrate_guid.py
64
8584
""" Create a GUID for all non-GUID database records. If record already has a GUID, skip; if record has an ID but not a GUID, create a GUID matching the ID. Newly created records will have optimistically generated GUIDs. """ import time import collections from framework.mongo import StoredObject from website import m...
apache-2.0
Benrflanders/Pytris
pyglet/pyglet/libs/x11/xlib.py
45
183189
'''Wrapper for X11 Generated with: tools/genwrappers.py xlib Do not modify this file. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import ctypes from ctypes import * import pyglet.lib _lib = pyglet.lib.load_library('X11') _int_types = (c_int16, c_int32) if hasattr(ctypes, 'c_int64'): # Some b...
mit
jburger424/MediaQueueHCI
m-q-env/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py
305
4235
from binascii import hexlify, unhexlify from hashlib import md5, sha1 from ..exceptions import SSLError try: # Test for SSL features SSLContext = None HAS_SNI = False import ssl from ssl import wrap_socket, CERT_NONE, PROTOCOL_SSLv23 from ssl import SSLContext # Modern SSL? from ssl import...
mit
chunywang/crosswalk-test-suite
apptools/apptools-manifest-tests/tests_ios.py
12
5846
#!/usr/bin/env python # coding=utf-8 # # Copyright (c) 2016 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of c...
bsd-3-clause
campbe13/openhatch
vendor/packages/webob/webob/dec.py
49
10184
""" Decorators to wrap functions to make them WSGI applications. The main decorator :class:`wsgify` turns a function into a WSGI application (while also allowing normal calling of the method with an instantiated request). """ from webob.compat import ( bytes_, text_type, ) from webob.request import Reque...
agpl-3.0
vincentt117/Home.Me
node_modules/node-gyp/gyp/tools/pretty_sln.py
1831
5099
#!/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. """Prints the information in a sln file in a diffable way. It first outputs each projects in alphabetical order with their dependenci...
mit
seann1/portfolio5
.meteor/dev_bundle/python/Lib/test/test_imageop.py
34
6854
"""Test script for the imageop module. This has the side effect of partially testing the imgfile module as well. Roger E. Masse """ from test.test_support import verbose, unlink, import_module, run_unittest imageop = import_module('imageop', deprecated=True) import uu, os, unittest SIZES = (1, 2, 3, 4) _VALU...
gpl-2.0
cuongthai/cuongthai-s-blog
django/core/serializers/__init__.py
200
3665
""" Interfaces for serializing Django objects. Usage:: from django.core import serializers json = serializers.serialize("json", some_query_set) objects = list(serializers.deserialize("json", json)) To add your own serializers, use the SERIALIZATION_MODULES setting:: SERIALIZATION_MODULES = { ...
bsd-3-clause
orbitfp7/horizon
openstack_dashboard/api/vpn.py
44
14830
# Copyright 2013, Mirantis 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 agre...
apache-2.0
turbokongen/home-assistant
homeassistant/components/wirelesstag/switch.py
12
2520
"""Switch implementation for Wireless Sensor Tags (wirelesstag.net).""" import voluptuous as vol from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchEntity from homeassistant.const import CONF_MONITORED_CONDITIONS import homeassistant.helpers.config_validation as cv from . import DOMAIN as WIRELESSTAG_...
apache-2.0
durai145/youtube-dl
youtube_dl/extractor/footyroom.py
104
1590
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class FootyRoomIE(InfoExtractor): _VALID_URL = r'http://footyroom\.com/(?P<id>[^/]+)' _TESTS = [{ 'url': 'http://footyroom.com/schalke-04-0-2-real-madrid-2015-02/', 'info_dict': { 'id': 'scha...
unlicense
AIFDR/inasafe-django
django_project/realtime/helpers/base_indicator.py
2
2769
# coding=utf-8 from builtins import range from builtins import object from datetime import datetime, timedelta from math import isnan from django.utils.translation import ugettext as _ import numpy import pytz from realtime.models.earthquake import Earthquake __author__ = 'Rizky Maulana Nugraha "lucernae" <lana.pcfre@...
bsd-2-clause
morinted/plover
plover/gui_qt/dictionary_editor.py
1
13523
from operator import attrgetter, itemgetter from collections import namedtuple from itertools import chain from PyQt5.QtCore import ( QAbstractTableModel, QModelIndex, Qt, ) from PyQt5.QtWidgets import ( QComboBox, QDialog, QStyledItemDelegate, ) from plover.translation import escape_translat...
gpl-2.0
provaleks/o8
openerp/tools/mail.py
55
30218
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2012-TODAY OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/pip/_vendor/html5lib/_trie/datrie.py
1301
1178
from __future__ import absolute_import, division, unicode_literals from datrie import Trie as DATrie from pip._vendor.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, te...
gpl-3.0
mwrightevent38/MissionPlanner
Lib/CGIHTTPServer.py
53
13360
"""CGI-savvy HTTP Server. This module builds on SimpleHTTPServer by implementing GET and POST requests to cgi-bin scripts. If the os.fork() function is not present (e.g. on Windows), os.popen2() is used as a fallback, with slightly altered semantics; if that function is not present either (e.g. on Macintosh), ...
gpl-3.0
battlecat/flasky
app/auth/views.py
48
6056
from flask import render_template, redirect, request, url_for, flash from flask.ext.login import login_user, logout_user, login_required, \ current_user from . import auth from .. import db from ..models import User from ..email import send_email from .forms import LoginForm, RegistrationForm, ChangePasswordForm,\ ...
mit
thammegowda/algos
ai/game/hw1cs561s16.py
2
20860
# -*- coding: utf-8 -*- # Author : ThammeGowda Narayanaswamy # USC ID : 2074-6694-39 # Session: Spring 2016 # Course : USC CSCI 561 Foundations of Artificial Intelligence # Topic : Home work 1 : Squirrel Fight Game Strategy # # NOTE: Refer to CS561Spring2016HW1.pdf for the game rules from __future__ import print_func...
apache-2.0
mungerd/plastex
plasTeX/Base/LaTeX/Arrays.py
6
20709
#!/usr/bin/env python """ C.10.2 The array and tabular Environments """ import new, sys from plasTeX import Macro, Environment, Command, DimenCommand from plasTeX import sourceChildren, sourceArguments class ColumnType(Macro): columnAttributes = {} columnTypes = {} def __init__(self, *args, **kwargs):...
mit
RyanJenkins/ISS
ISS/templatetags/pagination.py
1
3715
import urlparse import urllib from django import template register = template.Library() def unfuck_percent_encoded_utf8(fucked_unicode_str): # OK So... *dramatic pause* # (((Some))) browsers insist on transforming unicode characters outside of # the ASCII range to their UTF-8 encoding, and then url encod...
gpl-3.0
mbertrand/cga-worldmap
geonode/contrib/dataverse_connect/dv_utils.py
2
1622
import json from lxml import etree from django.http import QueryDict from collections import OrderedDict class MessageHelperJSON: @staticmethod def get_dict_msg(success=False, msg='', data_dict=None): if isinstance(data_dict, dict) or isinstance(data_dict, list) or isinstance(data_dict, tuple): ...
gpl-3.0
Azure/azure-sdk-for-python
sdk/servermanager/azure-mgmt-servermanager/azure/mgmt/servermanager/models/session_parameters.py
1
2295
# 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
pskrz/ansible
lib/ansible/utils/module_docs_fragments/cloudstack.py
125
2515
# -*- coding: utf-8 -*- # Copyright (c) 2015 René Moser <mail@renemoser.net> # # 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 # (...
gpl-3.0
evaschalde/odoo
addons/mail/mail_group_menu.py
334
2631
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
moijes12/oh-mainline
mysite/project/tests.py
15
18369
# This file is part of OpenHatch. # Copyright (C) 2010 Parker Phinney # Copyright (C) 2009, 2010 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the ...
agpl-3.0
souravsingh/sympy
sympy/matrices/sparse.py
2
45269
from __future__ import print_function, division import copy from collections import defaultdict from sympy.core.containers import Dict from sympy.core.compatibility import is_sequence, as_int, range from sympy.core.logic import fuzzy_and from sympy.core.singleton import S from sympy.functions.elementary.miscellaneous...
bsd-3-clause
cglatot/PokeManager
pogo/POGOProtos/Networking/Requests/Messages/RecycleInventoryItemMessage_pb2.py
15
3258
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Requests/Messages/RecycleInventoryItemMessage.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message ...
mit
ermo/privateer_wcu
modules/missions/cargo_mission.py
1
8981
from go_somewhere_significant import * from go_to_adjacent_systems import * import Briefing import Director import VS import debug import faction_ships import launch import quest import unit import universe import vsrandom class cargo_mission (Director.Mission): def initbriefing(self): VS.IOmessage (0,"ca...
gpl-2.0
rhndg/openedx
pavelib/paver_tests/test_paver_get_quality_reports.py
56
1550
import os import tempfile import unittest from mock import patch, Mock from ddt import ddt, file_data import pavelib.quality import paver.easy from paver.easy import BuildFailure class TestGetReportFiles(unittest.TestCase): """ Ensure only the report files we want are returned as part of run_quality. """...
agpl-3.0
isvaldo/Ola_Bemobenses
tests/Selenium/environment/lib/python3.4/site-packages/pip/_vendor/cachecontrol/serialize.py
317
6189
import base64 import io import json import zlib from pip._vendor.requests.structures import CaseInsensitiveDict from .compat import HTTPResponse, pickle def _b64_encode_bytes(b): return base64.b64encode(b).decode("ascii") def _b64_encode_str(s): return _b64_encode_bytes(s.encode("utf8")) def _b64_decode...
cc0-1.0
dinhoabreu/yowsup
yowsup/layers/protocol_chatstate/protocolentities/chatstate_outgoing.py
70
1210
from .chatstate import ChatstateProtocolEntity class OutgoingChatstateProtocolEntity(ChatstateProtocolEntity): ''' INCOMING <chatstate from="xxxxxxxxxxx@s.whatsapp.net"> <{{composing|paused}}></{{composing|paused}}> </chatstate> OUTGOING <chatstate to="xxxxxxxxxxx@s.whatsapp.net"> <{{...
gpl-3.0
initNirvana/Easyphotos
env/lib/python3.4/site-packages/requests/cookies.py
413
17191
# -*- coding: utf-8 -*- """ Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports. """ import copy import time import collections from .compat import cookielib, urlparse, urlunparse, Morsel try: import threading # grr, pyflakes...
mit
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/scripts/addons/io_mesh_uv_layout/export_uv_png.py
3
5060
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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, or (at your option) any later version. # # This program is distrib...
gpl-3.0
allan888/Linux_anti_malware_file_system
scripts/gdb/linux/cpus.py
997
3560
# # gdb helper commands and functions for Linux kernel debugging # # per-cpu tools # # Copyright (c) Siemens AG, 2011-2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb from linux import tasks, utils MAX_CPUS = 4096 def get_cu...
gpl-2.0
js0701/chromium-crosswalk
build/android/gyp/configure_multidex.py
18
2639
#!/usr/bin/env python # Copyright 2015 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 argparse import json import os import sys from util import build_utils _GCC_PREPROCESS_PATH = os.path.join( os.path.dirn...
bsd-3-clause
js850/pele
playground/gmin_tip4p/tip4p_system.py
7
1209
import numpy as np from pele.potentials import GMINPotential import gmin_ as GMIN from copy import deepcopy import tip4p from pele.angleaxis import RBTopology, RBSystem class TIP4PSystem(RBSystem): def __init__(self): RBSystem.__init__(self) def setup_aatopology(self): GMIN.initialize() ...
gpl-3.0
code-sauce/tensorflow
tensorflow/contrib/distributions/python/ops/laplace.py
5
7815
# 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
sunxfancy/ArduCopter
Tools/autotest/param_metadata/param_parse.py
43
5377
#!/usr/bin/env python import os, glob, re, sys from param import * from wikiemit import WikiEmit from xmlemit import XmlEmit from htmlemit import HtmlEmit from optparse import OptionParser parser = OptionParser("param_parse.py [options]") parser.add_option("-v", "--verbose", dest='verbose', action='store_true', defa...
gpl-3.0
hoosteeno/fjord
vendor/packages/requests-2.7.0/requests/packages/chardet/langhungarianmodel.py
6
12536
######################## 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...
bsd-3-clause
AASHE/hub
hub/apps/metadata/migrations/0001_initial.py
1
2996
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('iss', '__first__'), ] operations = [ migrations.CreateModel( name='AcademicDiscipline', fields=[ ...
mit
proxysh/Safejumper-for-Desktop
buildlinux/env32/lib/python2.7/site-packages/Crypto/SelfTest/Hash/test_SHA.py
116
2311
# -*- coding: utf-8 -*- # # SelfTest/Hash/SHA.py: Self-test for the SHA-1 hash function # # 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 dedicatio...
gpl-2.0
luyifan/zulip
api/integrations/git/zulip_git_config.py
124
2744
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2014 Zulip, Inc. # # 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 #...
apache-2.0
benschmaus/catapult
third_party/gsutil/third_party/boto/boto/emr/connection.py
79
28623
# Copyright (c) 2010 Spotify AB # Copyright (c) 2010-2011 Yelp # # 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, m...
bsd-3-clause
googleapis/googleapis-gen
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/enums/types/manager_link_status.py
1
1226
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
dparlevliet/zelenka-report-storage
server-local/twisted/internet/test/test_sigchld.py
59
3935
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet._sigchld}, an alternate, superior SIGCHLD monitoring API. """ from __future__ import division, absolute_import import os, signal, errno from twisted.python.runtime import platformType from twisted.python.log imp...
lgpl-3.0
JVenberg/PokemonGo-Bot-Desktop
pywin/Lib/curses/wrapper.py
204
1681
"""curses.wrapper Contains one function, wrapper(), which runs another function which should be the rest of your curses-based application. If the application raises an exception, wrapper() will restore the terminal to a sane state so you can read the resulting traceback. """ import curses def wrapper(func, *args, ...
mit
TheWardoctor/Wardoctors-repo
script.module.urlresolver/lib/urlresolver/plugins/videobee.py
3
1959
''' videobee urlresolver plugin Copyright (C) 2016 Gujal This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distr...
apache-2.0
h3llrais3r/SickRage
lib/tornado/locks.py
20
15218
# Copyright 2015 The Tornado Authors # # 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 w...
gpl-3.0
Big-B702/python-for-android
python-build/python-libs/gdata/src/gdata/tlslite/utils/OpenSSL_AES.py
359
1822
"""OpenSSL/M2Crypto AES implementation.""" from cryptomath import * from AES import * if m2cryptoLoaded: def new(key, mode, IV): return OpenSSL_AES(key, mode, IV) class OpenSSL_AES(AES): def __init__(self, key, mode, IV): AES.__init__(self, key, mode, IV, "openssl") ...
apache-2.0
takeshineshiro/heat
heat/tests/convergence/framework/message_queue.py
11
1146
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
apache-2.0
turbomanage/training-data-analyst
courses/machine_learning/deepdive2/structured/solutions/serving/application/lib/jinja2/debug.py
8
12281
# -*- coding: utf-8 -*- """ jinja2.debug ~~~~~~~~~~~~ Implements the debug interface for Jinja. This module does some pretty ugly stuff with the Python traceback system in order to achieve tracebacks with correct line numbers, locals and contents. :copyright: (c) 2017 by the Jinja Team. :...
apache-2.0
jnerin/ansible
test/units/modules/network/junos/junos_module.py
73
2581
# (c) 2017 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
sahiljain/catapult
third_party/google-endpoints/future/backports/test/ssl_servers.py
80
7209
from __future__ import absolute_import, division, print_function, unicode_literals from future.builtins import filter, str from future import utils import os import sys import ssl import pprint import socket from future.backports.urllib import parse as urllib_parse from future.backports.http.server import (HTTPServer a...
bsd-3-clause
charris/numpy
numpy/distutils/fcompiler/sun.py
17
1577
from numpy.distutils.ccompiler import simple_version_match from numpy.distutils.fcompiler import FCompiler compilers = ['SunFCompiler'] class SunFCompiler(FCompiler): compiler_type = 'sun' description = 'Sun or Forte Fortran 95 Compiler' # ex: # f90: Sun WorkShop 6 update 2 Fortran 95 6.2 Patch 11169...
bsd-3-clause
xuvw/viewfinder
scripts/fetch_logs.py
13
13383
#!/usr/bin/env python # # Copyright 2012 Viewfinder Inc. All Rights Reserved. """Fetch user client device / server operation logs. """ __author__ = 'spencer@emailscrubbed.com (Spencer Kimball)' import datetime import gzip import heapq import iso8601 import logging import os import re import sys import time from col...
apache-2.0
dongguangming/python-github3
pygithub3/tests/utils/core.py
8
1459
#!/usr/bin/env python # -*- encoding: utf-8 -*- try: from unittest2 import TestCase # Python 2.6 except ImportError: from unittest import TestCase # Python >2.7 from .base import Mock, DummyRequest request = DummyRequest() # Working without json but name it json-related to not confuse json_content = [dict(...
isc
LividInstruments/LiveRemoteScripts
Launchpad_M4L/LaunchpadM4L.py
1
4621
# http://lividinstruments.com from __future__ import with_statement import Live import math """ _Framework files """ from _Framework.ButtonElement import ButtonElement # Class representing a button a the controller from _Framework.ButtonMatrixElement import ButtonMatrixElement # Class representing a 2-dimensional set...
mit
amazonsx/qemu
scripts/acpi_extract_preprocess.py
149
1895
#!/usr/bin/python # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin <mst@redhat.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 2 of the License, or # (at your option)...
gpl-2.0
qizenguf/MLC-STT
configs/common/Simulation.py
8
28526
# Copyright (c) 2012-2013 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functional...
bsd-3-clause
nanolearning/edx-platform
common/lib/xmodule/xmodule/error_module.py
3
6663
""" Modules that get shown to the users when an error has occurred while loading or rendering other modules """ import hashlib import logging import json import sys from lxml import etree from xmodule.x_module import XModule, XModuleDescriptor from xmodule.errortracker import exc_info_to_str from xblock.fields import...
agpl-3.0
forslund/mycroft-core
mycroft/enclosure/gui.py
2
14999
# Copyright 2019 Mycroft AI 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 writin...
apache-2.0
CelineBoudier/rapid-router
game/messages.py
1
72360
# -*- coding: utf-8 -*- # Code for Life # # Copyright (C) 2016, Ocado Innovation Limited # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your o...
agpl-3.0
StellarCN/py-stellar-base
stellar_sdk/signer_key.py
1
3956
from . import xdr as stellar_xdr from .__version__ import __issues__ from .exceptions import ValueError from .strkey import StrKey __all__ = ["SignerKey"] class SignerKey: """The :class:`SignerKey` object, which represents an account signer key on Stellar's network. :param signer_key: The XDR signer object ...
apache-2.0
follow99/django
tests/str/models.py
409
1300
# -*- coding: utf-8 -*- """ Adding __str__() or __unicode__() to models Although it's not a strict requirement, each model should have a ``_str__()`` or ``__unicode__()`` method to return a "human-readable" representation of the object. Do this not only for your own sanity when dealing with the interactive prompt, but...
bsd-3-clause
gilbertron/whidbeysci
boilerplate/external/httplib2/iri2uri.py
885
3850
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
lgpl-3.0
songeater/SONGSHTR
soundfunc.py
1
4391
import numpy as np from scipy.fftpack import dct, idct import sys ''' ---------- FUNCTIONS ---------- ''' def get_config(): config = {} config['sound_file'] = "harvestmoon-mono-hp500.wav" config['save_file'] = config['sound_file'] + "_modelsave_" config['blocksize']=13000 config['comp...
agpl-3.0
SUSE-Cloud/nova
nova/loadables.py
57
4357
# Copyright (c) 2011-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 # # Un...
apache-2.0
zasdfgbnm/tensorflow
tensorflow/contrib/factorization/python/ops/factorization_ops_test.py
52
33798
# 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
johankaito/fufuka
microblog/flask/venv/lib/python2.7/site-packages/celery/app/builtins.py
5
14185
# -*- coding: utf-8 -*- """ celery.app.builtins ~~~~~~~~~~~~~~~~~~~ Built-in tasks that are always available in all app instances. E.g. chord, group and xmap. """ from __future__ import absolute_import from collections import deque from celery._state import get_current_worker_task, connect_on_app_fi...
apache-2.0
PhilSk/zulip
zproject/dev_settings.py
8
1673
# For the Dev VM environment, we use the same settings as the # sample prod_settings.py file, with a few exceptions. from .prod_settings_template import * import os from typing import Set LOCAL_UPLOADS_DIR = 'var/uploads' # Default to subdomains disabled in development until we can update # the development documentat...
apache-2.0
mvcsantos/QGIS
python/plugins/processing/algs/qgis/RandomPointsAlongLines.py
1
5227
# -*- coding: utf-8 -*- """ *************************************************************************** RandomPointsAlongLines.py --------------------- Date : April 2014 Copyright : (C) 2014 by Alexander Bruy Email : alexander dot bruy at gmail dot com ****...
gpl-2.0
blaggacao/OpenUpgrade
addons/l10n_be/__openerp__.py
9
3667
# -*- 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
MicroMappers/Pybossa
test/test_jobs/test_export.py
5
3051
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2013 SF Isle of Man Limited # # PyBossa 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...
agpl-3.0
JohnOrlando/gnuradio-bitshark
gnuradio-core/src/python/gnuradio/gruimpl/msgq_runner.py
94
2529
# # Copyright 2009 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) # any later version. # #...
gpl-3.0
unaizalakain/django
django/contrib/flatpages/migrations/0001_initial.py
308
1775
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ] operations = [ migrations.CreateModel( name='FlatPage', fields=[ ...
bsd-3-clause
dgarros/ansible
lib/ansible/modules/cloud/amazon/cloudwatchevent_rule.py
71
14950
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
gpl-3.0
blueskycoco/rtt-2457
bsp/stm32f40x/rtconfig.py
6
3587
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' ...
gpl-2.0
Mirantis/swift-encrypt
swift/common/middleware/keystoneauth.py
2
12292
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack LLC # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
dulems/hue
desktop/core/ext-py/Django-1.6.10/django/utils/unittest/main.py
219
9392
"""Unittest main program""" import sys import os import types from django.utils.unittest import loader, runner try: from django.utils.unittest.signals import installHandler except ImportError: installHandler = None __unittest = True FAILFAST = " -f, --failfast Stop on first failure\n" CATCHBREAK = ...
apache-2.0
AaronNGray/Freescale-kernel
tools/perf/python/twatch.py
3213
1338
#! /usr/bin/python # -*- python -*- # -*- coding: utf-8 -*- # twatch - Experimental use of the perf python interface # Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com> # # This application is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License...
gpl-2.0
hamzehd/edx-platform
lms/djangoapps/course_blocks/usage_info.py
93
1246
""" Declares CourseUsageInfo class to be used by the transform method in Transformers. """ from lms.djangoapps.courseware.access import _has_access_to_course class CourseUsageInfo(object): ''' A class object that encapsulates the course and user context to be used as currency across block structure transf...
agpl-3.0
badloop/SickRage
sickbeard/clients/deluge_client.py
6
7928
# coding=utf-8 # Author: Mr_Orange <mr_orange@hotmail.it> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 versi...
gpl-3.0