repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
azumimuo/family-xbmc-addon
refs/heads/master
plugin.video.gdrive/resources/lib/proxy.py
5
''' Copyright (C) 2014-2016 ddurdle 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 di...
kageurufu/pgoapi
refs/heads/master
pgoapi/protos/POGOProtos/Enums_pb2.py
6
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos.Enums.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import mess...
attardi/deepnl
refs/heads/master
bin/dl-conv.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Train and use a convolutional neural network classifier. Author: Giuseppe Attardi """ from __future__ import print_function import logging import numpy as np import argparse from ConfigParser import ConfigParser # allow executing from anywhere without installing the...
ppwwyyxx/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/atrous_conv2d_test.py
17
# 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...
sander76/home-assistant
refs/heads/dev
tests/components/everlights/test_light.py
28
"""The tests for the everlights component.""" from homeassistant.components.everlights import light as everlights def test_color_rgb_to_int(): """Test RGB to integer conversion.""" assert everlights.color_rgb_to_int(0x00, 0x00, 0x00) == 0x000000 assert everlights.color_rgb_to_int(0xFF, 0xFF, 0xFF) == 0xFF...
whitehats/monitowl-agent
refs/heads/master
whmonit/client/sensors/test/base_test.py
1
# -*- coding: utf-8 -*- '''Sensors basic test.''' from datetime import datetime import pytest from mock import Mock, patch from jsonschema import ValidationError from ..base import ( AdvancedSensorBase, TaskSensorBase, InvalidDataError, InvalidSendResultsError, ) class TestClassSensors(object): '...
MarcJoan/django
refs/heads/master
django/conf/locale/lt/formats.py
504
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = r'Y \m. E j \d.' TIME_FORMAT = 'H:...
2ndQuadrant/ansible
refs/heads/master
lib/ansible/modules/cloud/alicloud/ali_instance_facts.py
1
#!/usr/bin/python # Copyright (c) 2017 Alibaba Group Holding Limited. He Guimin <heguimin36@163.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of ...
zrhans/pythonanywhere
refs/heads/master
.virtualenvs/django19/lib/python3.4/site-packages/pip/_vendor/six.py
878
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
stevekuznetsov/ansible
refs/heads/devel
lib/ansible/modules/cloud/cloudstack/cs_user.py
48
#!/usr/bin/python # -*- coding: utf-8 -*- # # (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 Lice...
soldag/home-assistant
refs/heads/dev
homeassistant/components/homeworks/light.py
16
"""Support for Lutron Homeworks lights.""" import logging from pyhomeworks.pyhomeworks import HW_LIGHT_CHANGED from homeassistant.components.light import ( ATTR_BRIGHTNESS, SUPPORT_BRIGHTNESS, LightEntity, ) from homeassistant.const import CONF_NAME from homeassistant.core import callback from homeassista...
radiasoft/radtrack
refs/heads/master
experimental/laserHeater/testEXB.py
1
__author__ = 'swebb' from matplotlib import pyplot as plt import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D mpl.rc('text', usetex=True) from radtrack.ptclmovers.RbBorisVay import RbBorisVay import scipy.constants as consts import numpy as np try: dt = 1.e-8 E0 = 1.e-5 B0 = 1.e-5 B = [...
jittat/ku-eng-direct-admission
refs/heads/master
application/views/update.py
1
# -*- coding: utf-8 -*- import datetime from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.core.urlresolvers import reverse from django.conf import settings from django import forms from commons.decorators import submitted_applicant_required from commons.decorator...
Azure/azure-sdk-for-python
refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline
sdk/network/azure-mgmt-network/tests/test_cli_mgmt_network_watcher.py
1
# 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. #----------------------------------------------------------------------...
marcel-dancak/QGIS
refs/heads/master
python/plugins/processing/algs/grass7/ext/v_what_rast.py
10
# -*- coding: utf-8 -*- """ *************************************************************************** v_what_rast.py --------------------- Date : December 2017 Copyright : (C) 2017 by Médéric Ribreux Email : medspx at medspx dot fr ***********************...
DeadBugEngineering/myHDL_shenanigans
refs/heads/master
ssd1306_8x64bit_driver/myhdl_10dev/lib/python2.7/site-packages/pip/_vendor/cachecontrol/cache.py
947
""" The cache object API for implementing caches. The default is a thread safe in-memory dictionary. """ from threading import Lock class BaseCache(object): def get(self, key): raise NotImplemented() def set(self, key, value): raise NotImplemented() def delete(self, key): raise ...
thomasvincent/utilities
refs/heads/master
NagiosPlugins/check_procs/check_procs.py
2
#!/opt/zenoss/bin/python #Script dependencies: # pynag, subprocess import os,sys, subprocess, re from pynag.Plugins import WARNING, CRITICAL, OK, UNKNOWN, simple as Plugin from pexpect import ANSI, fdpexpect, FSM, pexpect, pxssh, screen #Create the plugin option np = Plugin() #Configure additional command line argu...
DaniilLeksin/theblog
refs/heads/master
env/lib/python2.7/site-packages/gunicorn/__init__.py
8
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. version_info = (19, 1, 1) __version__ = ".".join([str(v) for v in version_info]) SERVER_SOFTWARE = "gunicorn/%s" % __version__
mantidproject/mantid
refs/heads/master
Testing/SystemTests/tests/framework/PowderDiffProfileCalibrateTest.py
3
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + #pyl...
factorlibre/openerp-server-6.1
refs/heads/master
openerp/pychart/afm/Utopia_Italic.py
15
# -*- coding: utf-8 -*- # AFM font Utopia-Italic (path: /usr/share/fonts/afms/adobe/putri8a.afm). # Derived from Ghostscript distribution. # Go to www.cs.wisc.edu/~ghost to get the Ghostcript source code. import dir dir.afm["Utopia-Italic"] = (500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 5...
chinmaygarde/mojo
refs/heads/ios
sky/tools/webkitpy/layout_tests/layout_package/__init__.py
6014
# Required for Python to search this directory for module files
evans-ye/bigtop
refs/heads/master
bigtop-packages/src/charm/zookeeper/layer-zookeeper/reactive/zookeeper.py
5
# 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 use ...
alexmorozov/django
refs/heads/master
tests/syndication_tests/feeds.py
144
from __future__ import unicode_literals from django.contrib.syndication import views from django.utils import feedgenerator from django.utils.timezone import get_fixed_timezone from .models import Article, Entry class TestRss2Feed(views.Feed): title = 'My blog' description = 'A more thorough description of ...
damiansoriano/odoo
refs/heads/master
openerp/netsvc.py
27
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2014 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of...
TechExhibeo/kernel_lenovo_a7000
refs/heads/master
tools/perf/python/twatch.py
7370
#! /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...
dahlstrom-g/intellij-community
refs/heads/master
python/testData/refactoring/inlineFunction/importedLocally/main.py
12
from src import foo res = foo(1, 2) def bar(): from src import foo res1 = fo<caret>o(1, 2)
huiren/ece511
refs/heads/master
src/arch/x86/isa/insts/simd128/integer/arithmetic/multiply_add.py
91
# Copyright (c) 2007 The Hewlett-Packard Development Company # 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 implemen...
sh4nks/flask-plugins
refs/heads/master
tests/plugs/wrong/__init__.py
1
from flask_plugins import Plugin __plugin__ = "WrongPluginClass" class TestWrongPlugin(Plugin): name = "Test Wrong" description = "Test Wrong description" author = "test1" license = "BSD" version = "1.0" def enable(self): # pragma: no cover pass def disable(self): # pragma: no...
RockySteveJobs/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/ctypes/test/test_macholib.py
130
import os import sys import unittest # Bob Ippolito: """ Ok.. the code to find the filename for __getattr__ should look something like: import os from macholib.dyld import dyld_find def find_lib(name): possible = ['lib'+name+'.dylib', name+'.dylib', name+'.framework/'+name] for dylib in possible: ...
RazielSun/juma-editor
refs/heads/master
editor/lib/3rdparty/common/colorama/win32.py
451
# Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file. # from winbase.h STDOUT = -11 STDERR = -12 try: from ctypes import windll from ctypes import wintypes except ImportError: windll = None SetConsoleTextAttribute = lambda *_: None else: from ctypes import ( byref, Str...
victorbriz/rethinkdb
refs/heads/next
external/v8_3.30.33.16/build/gyp/test/win/gyptest-link-large-address-aware.py
269
#!/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. """ Make sure largeaddressaware setting is extracted properly. """ import TestGyp import sys if sys.platform == 'win32': test = TestGyp...
tensorflow/tensorflow
refs/heads/master
tensorflow/python/saved_model/builder_impl.py
4
# 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...
vmora/QGIS
refs/heads/master
python/plugins/processing/tools/raster.py
20
# -*- coding: utf-8 -*- """ *************************************************************************** raster.py --------------------- Date : February 2013 Copyright : (C) 2013 by Victor Olaya and Alexander Bruy Email : volayaf at gmail dot com **********...
atchariya/django-angular
refs/heads/master
djangular/urls.py
11
import warnings from django.core.urlresolvers import reverse from django.conf.urls import patterns, url from django.http.response import HttpResponsePermanentRedirect warnings.warn("Reversing URL's using urlpatterns is deprecated. Please use the middleware instead", DeprecationWarning) def angular_reverse(reque...
kevhill/luigi
refs/heads/master
test/date_interval_test.py
4
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
Krugercoin/krugercoins
refs/heads/master
BuildDeps/deps/boost/libs/mpi/test/python/nonblocking_test.py
64
# (C) Copyright 2007 # Andreas Kloeckner <inform -at- tiker.net> # # Use, modification and distribution is subject to 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) # # Authors: Andreas Kloeckner import boost.mpi as mpi import r...
CajetanP/code-learning
refs/heads/master
Python/UofG/Year1/week11.py
1
# [Exam] CS1F - Information Management # [Exam] CS1F - HCI # [Assesment] CS1F - HCI Assesment Finishing Touches # [Assesment] CS1F - HCI Assesment Report # [Other] CS1F - HCI Exam Review # [Other] CS1F - IM Exam Review # [Other] CS1P - Exam Review #1 # [Other] CS1P - Exam Review #2 # [Other] CS1P - Semester En...
bruceyou/NewsBlur
refs/heads/master
vendor/yaml/constructor.py
392
__all__ = ['BaseConstructor', 'SafeConstructor', 'Constructor', 'ConstructorError'] from error import * from nodes import * import datetime import binascii, re, sys, types class ConstructorError(MarkedYAMLError): pass class BaseConstructor(object): yaml_constructors = {} yaml_multi_constructors =...
chromium/chromium
refs/heads/master
build/android/gyp/util/diff_utils.py
6
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys import difflib from util import build_utils def _SkipOmitted(line): """ Skip lines that are to be intentionally omitted from the ...
Kodiack/WhileyWeb
refs/heads/master
lib/cherrypy/_cpconfig.py
87
""" Configuration system for CherryPy. Configuration in CherryPy is implemented via dictionaries. Keys are strings which name the mapped value, which may be of any type. Architecture ------------ CherryPy Requests are part of an Application, which runs in a global context, and configuration data may apply to any of...
postlund/home-assistant
refs/heads/dev
tests/components/ambiclimate/__init__.py
31
"""Tests for the Ambiclimate component."""
Wingless-Archangel/spiderfoot
refs/heads/master
ext/stem/interpreter/__init__.py
12
# Copyright 2015, Damian Johnson and The Tor Project # See LICENSE for licensing information """ Interactive interpreter for interacting with Tor directly. This adds usability features such as tab completion, history, and IRC-style functions (like /help). """ __all__ = [ 'arguments', 'autocomplete', 'commands',...
robinro/ansible-modules-extras
refs/heads/devel
network/f5/bigip_pool.py
32
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Matt Hite <mhite@hotmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License...
eruffaldi/pyoni
refs/heads/master
src/onitool/oni2depth.py
1
# Extracts a singla RAW depth file of contiguous data # # Requires to build xndec import struct from onifile import * from xndec import * if __name__ == "__main__": import sys,os if len(sys.argv) == 0: print "Required: ONIfilename" sys.exit(-1) docolor = len(sys.argv) > 3 filesize = ...
crossbario/autobahn-python
refs/heads/master
autobahn/wamp/gen/wamp/proto/AuthTicketWelcome.py
3
# automatically generated by the FlatBuffers compiler, do not modify # namespace: proto import flatbuffers class AuthTicketWelcome(object): __slots__ = ['_tab'] @classmethod def GetRootAsAuthTicketWelcome(cls, buf, offset): n = flatbuffers.encode.Get(flatbuffers.packer.uoffset, buf, offset) ...
askeing/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/third_party/pytest/testing/freeze/create_executable.py
15
""" Generates an executable with pytest runner embedded using PyInstaller. """ if __name__ == '__main__': import pytest import subprocess hidden = [] for x in pytest.freeze_includes(): hidden.extend(['--hidden-import', x]) args = ['pyinstaller', '--noconfirm'] + hidden + ['runtests_script.p...
akaihola/django
refs/heads/master
django/core/management/sql.py
5
import os import re from django.conf import settings from django.core.management.base import CommandError from django.db import models from django.db.models import get_models def sql_create(app, style, connection): "Returns a list of the CREATE TABLE SQL statements for the given app." if connection.settings_...
saurabh6790/omnit-app
refs/heads/master
hr/doctype/leave_type/leave_type.py
138
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes class DocType: def __init__(self, d, dl): self.doc, self.doclist = d, dl
FCP-INDI/nipype
refs/heads/master
nipype/interfaces/freesurfer/preprocess.py
4
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Provides interfaces to various commands provided by FreeSurfer Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname( os.path.realpath( __file__ )...
VcamX/grpc
refs/heads/python_test
tools/profiling/latency_profile/profile_analyzer.py
9
#!/usr/bin/env python2.7 # Copyright 2015, 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 lis...
andreipradan/raspberrymediaplayer
refs/heads/master
src/radio/wsgi.py
1
""" WSGI config for radio project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETTIN...
Ayub-Khan/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/crowdsource_hinter.py
177
""" Adds crowdsourced hinting functionality to lon-capa numerical response problems. Currently experimental - not for instructor use, yet. """ import logging import json import random import copy from pkg_resources import resource_string from lxml import etree from xmodule.x_module import XModule, STUDENT_VIEW fro...
Qalthos/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_wafpolicy.py
31
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ANSIB...
jmesteve/saas3
refs/heads/master
openerp/addons_extra/l10n_es_payment_order/__openerp__.py
8
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2008 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. # Jordi Esteve <jesteve@zikzakmedia.com> # Copyright (c) ...
Clarity-89/clarityv2
refs/heads/master
src/clarityv2/invoices/admin.py
1
from django.contrib import admin from django.db.models import Count from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from privates.admin import PrivateMediaMixin from .forms import AdminInvoiceForm from .models import Invoice, InvoiceItem from .utils import render_invoice_pdf ...
demdxx/django-cors-cache
refs/heads/master
corscache/db.py
1
# -*- coding: utf-8 -*- import logging try: import cPickle as pickle except ImportError: import pickle from django.db import connections from django.db.models import Model from django.core.cache import get_cache from django.utils.hashcompat import md5_constructor from .conf import * from .blockmanager impor...
cnamejj/PyProc
refs/heads/master
regentest/net_ip_tables_matches.py
1
#!/usr/bin/env python """Handle records from /proc/net/ip_tables_matches data files""" import regentest as RG import ProcHandlers as PH # --- def re_net_ip_tables_matches(inprecs): """Iterate through parsed records and re-generate data file""" RG.list_of_terms(inprecs) #...+....1....+....2....+....3....+...
sodafree/backend
refs/heads/master
django/contrib/gis/maps/google/gmap.py
90
from django.conf import settings from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.contrib.gis.maps.google.overlays import GPolygon, GPolyline, GMarker class GoogleMapException(Exception): pass # The default Google Maps URL (for the API javascript) # T...
qistoph/thug
refs/heads/master
src/Java/java.py
1
#!/usr/bin/env python # # java.py # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; with...
mttr/django
refs/heads/master
tests/template_tests/filter_tests/test_iriencode.py
388
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.template.defaultfilters import iriencode, urlencode from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class IriencodeTests(SimpleTestCase): """ Ensure iriencode keeps safe...
bradh/samba
refs/heads/master
python/samba/tests/__init__.py
18
# Unix SMB/CIFS implementation. # Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2010 # # 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 opti...
chrxr/wagtail
refs/heads/master
wagtail/wagtailcore/tests/test_management_commands.py
5
from __future__ import absolute_import, unicode_literals from datetime import timedelta from django.core import management from django.db import models from django.test import TestCase from django.utils import timezone from django.utils.six import StringIO from wagtail.tests.testapp.models import EventPage, SimplePa...
AutorestCI/azure-sdk-for-python
refs/heads/master
azure-graphrbac/azure/graphrbac/models/application_update_parameters.py
1
# 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 ...
mahak/cinder
refs/heads/master
cinder/tests/unit/test_test_utils.py
2
# # Copyright 2010 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
Weihonghao/ECM
refs/heads/master
Vpy34/lib/python3.5/site-packages/scipy/signal/ltisys.py
13
""" ltisys -- a collection of classes and functions for modeling linear time invariant systems. """ from __future__ import division, print_function, absolute_import # # Author: Travis Oliphant 2001 # # Feb 2010: Warren Weckesser # Rewrote lsim2 and added impulse2. # Apr 2011: Jeffrey Armstrong <jeff@approximatrix.co...
hickford/youtube-dl
refs/heads/master
youtube_dl/extractor/playfm.py
207
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, int_or_none, parse_iso8601, ) class PlayFMIE(InfoExtractor): IE_NAME = 'play.fm' _VALID_URL = r'https?://(?:www\.)?play\.fm/(?...
iitis/PyLTEs
refs/heads/master
pyltes/printer.py
1
__author__ = 'Mariusz' from pyltes import devices import numpy as np import matplotlib.pyplot as plt import matplotlib import math class Printer: """Class that prints network deployment""" def __init__(self,parent): self.parent = parent def drawHistogramOfUEThroughput(self, filename)...
spulec/moto
refs/heads/master
moto/__init__.py
1
from __future__ import unicode_literals import importlib def lazy_load(module_name, element): def f(*args, **kwargs): module = importlib.import_module(module_name, "moto") return getattr(module, element)(*args, **kwargs) return f mock_acm = lazy_load(".acm", "mock_acm") mock_apigateway = l...
chokribr/invenioold
refs/heads/master
modules/bibformat/lib/elements/bfe_test_6.py
21
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2013 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) a...
aabbox/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_quopri.py
171
from test import support import unittest import sys, os, io, subprocess import quopri ENCSAMPLE = b"""\ Here's a bunch of special=20 =A1=A2=A3=A4=A5=A6=A7=A8=A9 =AA=AB=AC=AD=AE=AF=B0=B1=B2=B3 =B4=B5=B6=B7=B8=B9=BA=BB=BC=BD=BE =BF=C0=C1=C2=C3=C4=C5=C6 =C7=C8=C9=CA=CB=CC=CD=CE=CF =D0=D1=D2=D3=D4=D5=D6=D7 =D8=D9=DA=D...
blackcoder/kuri-ros
refs/heads/master
teleoperation/scripts/cyber_glove_teleop.py
1
#!/usr/bin/env python #********************************************************************************* # Copyright (C) 2013 - 2014 by * # Tarek Taha and Rui P. de Figueiredo, Khalifa University Robotics Institute KURI* # <rui.defigueiredo@kustar.ac.ae> <rui.defigueire...
vlinhd11/vlinhd11-android-scripting
refs/heads/master
python/src/Lib/plat-mac/Carbon/App.py
82
from _App import *
WebArchivCZ/Seeder
refs/heads/master
Seeder/source/tables.py
1
import django_tables2 as tables from django.utils.translation import ugettext_lazy as _ from core.utils import AbsoluteURLColumn, NaturalDatetimeColumn, Column from . import models class SourceTable(tables.Table): name = AbsoluteURLColumn(verbose_name=_('Name')) publisher = AbsoluteURLColumn( verbose...
eduNEXT/edunext-platform
refs/heads/master
lms/djangoapps/mobile_api/errors.py
211
""" List of errors that can be returned by the mobile api """ def format_error(error_code, message): """ Converts an error_code and message into a response body """ return {"errors": [{"code": error_code, "message": message}]} ERROR_INVALID_COURSE_ID = format_error("invalid-course-id", "Could not fin...
SNAPPETITE/backend
refs/heads/master
flask/lib/python2.7/site-packages/markupsafe/tests.py
674
# -*- coding: utf-8 -*- import gc import sys import unittest from markupsafe import Markup, escape, escape_silent from markupsafe._compat import text_type class MarkupTestCase(unittest.TestCase): def test_adding(self): # adding two strings should escape the unsafe one unsafe = '<script type="appl...
ashhher3/seaborn
refs/heads/master
examples/cubehelix_palette.py
29
""" Different cubehelix palettes ============================ _thumb: .4, .65 """ import numpy as np import seaborn as sns import matplotlib.pyplot as plt sns.set(style="dark") rs = np.random.RandomState(50) # Set up the matplotlib figure f, axes = plt.subplots(3, 3, figsize=(9, 9), sharex=True, sharey=True) # Rota...
andrzejgorski/whylog
refs/heads/master
whylog/assistant/regex_assistant/regex_match.py
4
import six from whylog.assistant.pattern_match import ParamGroup, PatternMatch from whylog.assistant.regex_assistant.guessing import guess_pattern_match from whylog.assistant.regex_assistant.regex import NotMatchingRegexError, regex_groups, verify_regex from whylog.assistant.validation_problems import NotMatchingPatte...
LLNL/spack
refs/heads/develop
lib/spack/spack/test/spec_syntax.py
1
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os import pytest import shlex import llnl.util.filesystem as fs import spack.hash_types as ht import spack.repo i...
freakboy3742/django
refs/heads/main
tests/i18n/patterns/urls/wrong_namespace.py
61
from django.conf.urls.i18n import i18n_patterns from django.urls import re_path from django.utils.translation import gettext_lazy as _ from django.views.generic import TemplateView view = TemplateView.as_view(template_name='dummy.html') app_name = 'account' urlpatterns = i18n_patterns( re_path(_(r'^register/$'), ...
nanvel/mdpages
refs/heads/master
c2p2/tests/test_models.py
2
from unittest import TestCase from ..models import Site from ..settings import settings from ..utils import rel __all__ = ('ModelsTestCase',) class ModelsTestCase(TestCase): def setUp(self): settings.SOURCE_FOLDER = rel('c2p2/tests/md') super(ModelsTestCase, self).setUp() def test_site(se...
pantsbuild/pants
refs/heads/2.6.x
src/python/pants/util/eval.py
4
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import annotations from textwrap import dedent from typing import Any, Type def parse_expression( val: str, acceptable_types: type | tuple[type, ...], name: ...
elssar/calibre
refs/heads/master
src/calibre/ptempfile.py
17
from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' """ Provides platform independent temporary files that persist even after being closed. """ import tempfile, os, atexit from future_builtins import map from calibre.constants import (__version__...
meatcomputer/opencog
refs/heads/master
opencog/python/examples/eye_agent_demo.py
45
from learning.bayesian_learning.agents import TheEyeAgent from opencog.atomspace import AtomSpace from opencog.cogserver import Server __author__ = 'Keyvan' if __name__ == '__main__': server = Server() server.add_mind_agent(TheEyeAgent()) server.run(AtomSpace())
RomanZWang/osf.io
refs/heads/develop
framework/sessions/model.py
43
# -*- coding: utf-8 -*- from bson import ObjectId from modularodm import fields from framework.mongo import StoredObject class Session(StoredObject): _id = fields.StringField(primary=True, default=lambda: str(ObjectId())) date_created = fields.DateTimeField(auto_now_add=True) date_modified = fields.Dat...
junhuac/MQUIC
refs/heads/master
src/tools/gyp/test/linux/gyptest-implicit-rpath.py
252
#!/usr/bin/env python # Copyright (c) 2013 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. """ Verifies that the implicit rpath is added only when needed. """ import TestGyp import re import subprocess import sys if sys.platform...
michath/ConMonkey
refs/heads/master
testing/mozbase/mozhttpd/mozhttpd/mozhttpd.py
7
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import BaseHTTPServer import SimpleHTTPServer import errno import logging import threading import...
OneBitSoftware/jwtSample
refs/heads/master
src/Spa/env1/Lib/site-packages/requests/packages/chardet/charsetgroupprober.py
2928
######################## 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 ...
khchine5/opal
refs/heads/v0.9.0
opal/scaffolding/scaffold/app/urls.py
1
from django.conf.urls import patterns, include, url from opal.urls import urlpatterns as opatterns from django.contrib import admin admin.autodiscover() urlpatterns = patterns( '', url(r'^admin/', include(admin.site.urls)), ) urlpatterns += opatterns
mhnatiuk/phd_sociology_of_religion
refs/heads/master
scrapper/build/pyasn1/pyasn1/type/char.py
220
# ASN.1 "character string" types from pyasn1.type import univ, tag class UTF8String(univ.OctetString): tagSet = univ.OctetString.tagSet.tagImplicitly( tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 12) ) encoding = "utf-8" class NumericString(univ.OctetString): tagSet = univ.OctetStri...
mfherbst/spack
refs/heads/develop
var/spack/repos/builtin/packages/r-argparse/package.py
2
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
rawWhipIT/p22-goldant-buildpack
refs/heads/master
vendor/setuptools-5.4.1/setuptools/tests/test_svn.py
300
# -*- coding: utf-8 -*- """svn tests""" import io import os import subprocess import sys import unittest from setuptools.tests import environment from setuptools.compat import unicode, unichr from setuptools import svn_utils from setuptools.tests.py26compat import skipIf def _do_svn_check(): try: subpro...
etuna-SBF-kog/Stadsparken
refs/heads/master
env/lib/python2.7/site-packages/django/db/models/sql/aggregates.py
195
""" Classes to represent the default SQL aggregate functions """ from django.db.models.fields import IntegerField, FloatField # Fake fields used to identify aggregate types in data-conversion operations. ordinal_aggregate_field = IntegerField() computed_aggregate_field = FloatField() class Aggregate(object): """...
ajs124/distcc
refs/heads/master
test/testdistcc.py
21
#! /usr/bin/env python2.2 # Copyright (C) 2002, 2003, 2004 by Martin Pool <mbp@samba.org> # Copyright 2007 Google 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 th...
camagenta/youtube-dl
refs/heads/master
youtube_dl/extractor/udn.py
88
# coding: utf-8 from __future__ import unicode_literals import json from .common import InfoExtractor from ..utils import ( js_to_json, ExtractorError, ) from ..compat import compat_urlparse class UDNEmbedIE(InfoExtractor): IE_DESC = '聯合影音' _VALID_URL = r'https?://video\.udn\.com/(?:embed|play)/news/...
mith1979/ansible_automation
refs/heads/master
applied_python/applied_python/lib/python2.7/site-packages/django/contrib/auth/checks.py
186
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import apps from django.conf import settings from django.core import checks def check_user_model(**kwargs): errors = [] cls = apps.get_model(settings.AUTH_USER_MODEL) # Check that REQUIRED_FIELDS is a list if not isins...
normanmaurer/autobahntestsuite-maven-plugin
refs/heads/master
src/main/resources/twisted/test/test_setup.py
42
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for C{setup.py}, Twisted's distutils integration file. """ from __future__ import division, absolute_import import os, sys import twisted from twisted.trial.unittest import SynchronousTestCase from twisted.python.filepath import FileP...
datamachine/twx.mtproto
refs/heads/master
twx/mtproto/crypt.py
1
# -*- coding: utf-8 -*- # Author: Sammy Pfeiffer # Author: Anton Grigoryev # This file implements the AES 256 IGE cipher # working in Python 2.7 and Python 3.4 (other versions untested) # as it's needed for the implementation of Telegram API # It's based on PyCryto from __future__ import print_function from C...
dhcrzf/zulip
refs/heads/master
zerver/tests/test_message_edit_notifications.py
2
# -*- coding: utf-8 -*- from typing import Any, Dict, Generator, Mapping, Union import mock from django.utils.timezone import now as timezone_now from zerver.lib.actions import ( get_client, ) from zerver.lib.test_classes import ( ZulipTestCase, ) from zerver.models import ( get_stream_recipient, ...
formiano/enigma2
refs/heads/master
lib/python/Tools/LoadPixmap.py
118
from enigma import loadPNG, loadJPG def LoadPixmap(path, desktop = None, cached = False): if path[-4:] == ".png": ptr = loadPNG(path) elif path[-4:] == ".jpg": ptr = loadJPG(path) elif path[-1:] == ".": alpha = loadPNG(path + "a.png") ptr = loadJPG(path + "rgb.jpg", alpha) else: raise Exception("neither ...
samupl/sql-benchmark
refs/heads/master
sqlbenchmark/query_loader.py
1
# -*- coding: utf-8 -*- import pprint import os import sqlparse class QueryLoader(object): query_cache = {} def __init__(self, benchmark=None, adapter_name=None): self.benchmark = benchmark self.adapter_name = adapter_name def get_base_path(self): return os.path.join('benchmarks...