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
mutability/dump978
plot_nexrad.py
22
4597
#!/usr/bin/env python2 # # This takes the output of extract_nexrad and generates images. # It isn't very smart at the moment and won't draw anything # until all input has been consumed, so it's not very useful # for realtime continuous generation of maps. # import sys, math import cairo, colorsys intensities = { ...
gpl-2.0
alsrgv/tensorflow
tensorflow/python/ops/parallel_for/__init__.py
52
1204
# Copyright 2018 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
sdgdsffdsfff/xunlei-lixian
lixian_query.py
10
11797
__all__ = ['query', 'bt_query', 'user_query', 'Query', 'ExactQuery', 'SearchQuery', 'build_query', 'find_tasks_to_download', 'search_tasks', 'expand_bt_sub_tasks'] import lixian_hash_bt import lixian_hash_ed2k import lixian_encoding def link_normalize(url): from lixian_url import url_unmask, normalize_u...
mit
denny820909/builder
lib/python2.7/site-packages/SQLAlchemy-0.7.0-py2.7-linux-x86_64.egg/sqlalchemy/dialects/mysql/mysqldb.py
8
2818
# mysql/mysqldb.py # Copyright (C) 2005-2011 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 """Support for the MySQL database via the MySQL-python adapter. MySQL-Python is avai...
mit
martinmaly/service-catalog
vendor/github.com/ugorji/go/codec/test.py
1516
4019
#!/usr/bin/env python # This will create golden files in a directory passed to it. # A Test calls this internally to create the golden files # So it can process them (so we don't have to checkin the files). # Ensure msgpack-python and cbor are installed first, using: # sudo apt-get install python-dev # sudo apt-g...
apache-2.0
SWE574-Groupago/heritago
heritago/heritages/serializers.py
1
9002
import django.dispatch from rest_framework import serializers from heritages.models import Heritage, BasicInformation, Origin, Tag, Multimedia, Selector, AnnotationTarget, \ AnnotationBody, Annotation, User class BasicInformationSerializer(serializers.ModelSerializer): class Meta: model = BasicInform...
mit
vied12/photoautomat-circus
sources/webassets/filter/cssutils.py
15
1507
from __future__ import absolute_import import logging import logging.handlers from webassets.filter import Filter __all__ = ('CSSUtils',) class CSSUtils(Filter): """Minifies CSS by removing whitespace, comments etc., using the Python `cssutils <http://cthedot.de/cssutils/>`_ library. Note that since t...
gpl-3.0
windedge/odoomrp-wip
stock_lock_lot/models/stock_production_lot.py
14
2870
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in root directory ############################################################################## from openerp import models, fields, api, exceptions, _ cl...
agpl-3.0
ZachRiegel/scriptbin
pypyjs/modules/distutils/tests/test_cmd.py
54
3840
"""Tests for distutils.cmd.""" import unittest import os from test.test_support import captured_stdout, run_unittest from distutils.cmd import Command from distutils.dist import Distribution from distutils.errors import DistutilsOptionError from distutils import debug class MyCmd(Command): def initialize_options(...
gpl-3.0
Vaidyanath/tempest
tempest/openstack/common/gettextutils.py
11
18039
# Copyright 2012 Red Hat, Inc. # Copyright 2013 IBM Corp. # 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....
apache-2.0
svanscho/weatherlight
weatherlight-server/openweathermap.py
1
5038
import urllib2 import json from datetime import datetime import pytz import logging class Openweathermap(object): def __init__(self, appid): self.appid = appid #the openweathermaps application id you got when signing up for the API #return codes according to this definition http://openweathermap.org/...
mit
fabaff/ansible
lib/ansible/cli/doc.py
17
11990
# (c) 2014, James Tanner <tanner.jc@gmail.com> # # 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 i...
gpl-3.0
jkliff/project_walker
project-walker-core/src/python/main/Checkers.py
1
9326
#!/usr/bin/python # -*- coding: utf-8 -*- import os.path import re import subprocess try: from lxml import etree except ImportError: try: import xml.etree.cElementTree as etree except: import elementtree.ElementTree as etree import ProjectWalker import GlobMatch from interpol import inter...
bsd-3-clause
apache/airflow
airflow/providers/google/cloud/hooks/text_to_speech.py
2
5609
# # 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...
apache-2.0
MST-MRR/DroneKit
Flight/AirTrafficControl.py
1
21189
############################################ # This file contains a wrapper class # for DroneKit related operations # for our drone. ############################################ # Multi-Rotor Robot Design Team # Missouri University of Science Technology # Spring 2017 # Lucas Coon, Mark Raymond Jr. # pylint: di...
mit
PlayUAV/MissionPlanner
Lib/encodings/cp1250.py
93
14249
""" Python Character Mapping Codec cp1250 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def d...
gpl-3.0
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/docutils/languages/he.py
148
2683
# Author: Meir Kriheli # Id: $Id: he.py 4837 2006-12-26 09:59:41Z sfcben $ # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated for each language:...
agpl-3.0
jcoady9/python-for-android
python3-alpha/python3-src/Lib/encodings/utf_32.py
180
5128
""" Python 'utf-32' Codec """ import codecs, sys ### Codec APIs encode = codecs.utf_32_encode def decode(input, errors='strict'): return codecs.utf_32_decode(input, errors, True) class IncrementalEncoder(codecs.IncrementalEncoder): def __init__(self, errors='strict'): codecs.IncrementalEncoder.__ini...
apache-2.0
Leila20/django
tests/multiple_database/models.py
282
2472
from django.contrib.auth.models import User from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible clas...
bsd-3-clause
oberstet/autobahn-python
inject-build-id.py
2
1677
#!python import os if __name__ == '__main__': _EVAR = "AUTOBAHN_BUILD_ID" _SEARCH = "__build__ = u'00000'" _REPLACE = "__build__ = u'{}'" if _EVAR in os.environ: files = [] try: from autobahn import _version except ImportError: pass else: ...
mit
Ichimonji10/robottelo
robottelo/ui/hardwaremodel.py
5
2511
"""Implements Hardware Models CRUD in UI""" from robottelo.ui.base import Base, UINoSuchElementError from robottelo.ui.locators import common_locators, locators from robottelo.ui.navigator import Navigator class HardwareModel(Base): """Provides the CRUD functionality for Hardware-Models.""" def create(self,...
gpl-3.0
miptliot/edx-platform
common/djangoapps/request_cache/middleware.py
20
4782
""" An implementation of a RequestCache. This cache is reset at the beginning and end of every request. """ import threading import crum from django.utils.encoding import force_text class _RequestCache(threading.local): """ A thread-local for storing the per-request cache. """ def __init__(self): ...
agpl-3.0
catapult-project/catapult-csm
third_party/google-endpoints/google/api/control/wsgi.py
7
22713
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
bsd-3-clause
draperlaboratory/stout
functional_tests/tests.py
2
3909
from selenium import webdriver from selenium.webdriver.common.keys import Keys from django.test import LiveServerTestCase from django.contrib.auth.models import User from django.conf import settings from django.conf.urls.static import static import sys from op_tasks.models import Dataset, Product, OpTask, UserProfile,...
apache-2.0
scottpurdy/NAB
tests/integration/corpus_test.py
10
4895
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
cpyou/odoo
addons/l10n_ma/l10n_ma.py
336
1952
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
alxgu/ansible-modules-core
network/nxos/nxos_ping.py
23
13222
#!/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 distribut...
gpl-3.0
LethusTI/supportcenter
vendor/mongoengine/mongoengine/django/shortcuts.py
16
1598
from mongoengine.queryset import QuerySet from mongoengine.base import BaseDocument from mongoengine.errors import ValidationError def _get_queryset(cls): """Inspired by django.shortcuts.*""" if isinstance(cls, QuerySet): return cls else: return cls.objects def get_document_or_404(cls, *ar...
gpl-3.0
YuepengGuo/pyspider
pyspider/scheduler/scheduler.py
53
33344
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-02-07 17:05:11 import os import json import time import logging import itertools from six.moves import queue as Queue from collections import deque ...
apache-2.0
Nikoli/youtube-dl
youtube_dl/extractor/podomatic.py
198
2327
from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..utils import int_or_none class PodomaticIE(InfoExtractor): IE_NAME = 'podomatic' _VALID_URL = r'^(?P<proto>https?)://(?P<channel>[^.]+)\.podomatic\.com/entry/(?P<id>[^?]+)' _TESTS = [ { ...
unlicense
qifeigit/scikit-learn
sklearn/externals/joblib/pool.py
237
23894
"""Custom implementation of multiprocessing.Pool with custom pickler This module provides efficient ways of working with data stored in shared memory with numpy.memmap arrays without inducing any memory copy between the parent and child processes. This module should not be imported if multiprocessing is not available...
bsd-3-clause
argonemyth/sentry
tests/sentry/api/endpoints/test_organization_member_details.py
25
4338
from __future__ import absolute_import from django.core.urlresolvers import reverse from mock import patch from sentry.models import ( AuthProvider, OrganizationMember, OrganizationMemberType ) from sentry.testutils import APITestCase class UpdateOrganizationMemberTest(APITestCase): @patch('sentry.models.Or...
bsd-3-clause
DES-SL/EasyLens
docs/conf.py
1
8340
# -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
mit
yackj/GameAnalysis
test/gameio_test.py
1
26631
import copy import json import warnings import numpy as np import pytest from gameanalysis import gameio from gameanalysis import rsgame from gameanalysis import utils SERIAL = gameio.gameserializer(['role'], [['strat1', 'strat2']]) SERIAL2 = gameio.gameserializer(['a', 'b'], [['bar', 'foo'], ['baz']]) GAME = rsga...
apache-2.0
fbradyirl/home-assistant
homeassistant/components/panasonic_viera/media_player.py
2
6691
"""Support for interface with a Panasonic Viera TV.""" import logging import voluptuous as vol from homeassistant.components.media_player import MediaPlayerDevice, PLATFORM_SCHEMA from homeassistant.components.media_player.const import ( MEDIA_TYPE_URL, SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PLAY,...
apache-2.0
tinfoil/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
osstech-jp/samba
source4/scripting/devel/speedtest.py
35
8192
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Unix SMB/CIFS implementation. # This speed test aims to show difference in execution time for bulk # creation of user objects. This will help us compare # Samba4 vs MS Active Directory performance. # Copyright (C) Zahari Zahariev <zahari.zahariev@postpath.com> 2010 # #...
gpl-3.0
Qusic/ycmd
ycmd/tests/python/subcommands_test.py
3
6804
# Copyright (C) 2015 ycmd contributors # # This file is part of ycmd. # # ycmd 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. # # ycmd...
gpl-3.0
spaceof7/QGIS
python/plugins/processing/algs/qgis/RandomPointsExtent.py
7
5990
# -*- coding: utf-8 -*- """ *************************************************************************** RandomPointsExtent.py --------------------- Date : April 2014 Copyright : (C) 2014 by Alexander Bruy Email : alexander dot bruy at gmail dot com ********...
gpl-2.0
ArcherCraftStore/ArcherVMPeridot
Python/Lib/encodings/cp855.py
272
33850
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP855.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
apache-2.0
Vyt45/webas
node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py
1789
10585
# Copyright (c) 2014 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Xcode-ninja wrapper project file generator. This updates the data structures passed to the Xcode gyp generator to build with ninja instead. The Xcode project i...
mit
hydroshare/hydroshare
hs_file_types/tests/test_raster_metadata.py
1
61525
import os from django.test import TransactionTestCase from django.db import IntegrityError from django.contrib.auth.models import Group from django.core.exceptions import ValidationError from rest_framework.exceptions import ValidationError as DRF_ValidationError from hs_core.testing import MockIRODSTestCaseMixin fr...
bsd-3-clause
arowla/scrapelib
scrapelib/__main__.py
6
1789
from . import Scraper, _user_agent import argparse def scrapeshell(): # pragma: no cover # clear argv for IPython import sys orig_argv = sys.argv[1:] sys.argv = sys.argv[:1] try: from IPython import embed except ImportError: print('scrapeshell requires ipython...
bsd-3-clause
fjorba/invenio
modules/websubmit/lib/functions/Print_Success_Approval_Request.py
39
1559
## This file is part of Invenio. ## Copyright (C) 2008, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) any later versio...
gpl-2.0
liu602348184/django
django/core/validators.py
99
11950
from __future__ import unicode_literals import re from django.core.exceptions import ValidationError from django.utils import six from django.utils.deconstruct import deconstructible from django.utils.encoding import force_text from django.utils.ipv6 import is_valid_ipv6_address from django.utils.six.moves.urllib.par...
bsd-3-clause
NSLS-II-SRX/ipython_ophyd
profile_xf05id1-noX11/startup/85-bs_callbacks.py
1
3670
# -*- coding: utf-8 -*- """ Created on Wed Feb 24 12:30:06 2016 @author: xf05id1 """ from bluesky.callbacks import CallbackBase,LivePlot #import os #import time as ttime #from databroker import DataBroker as db, get_events #from databroker.databroker import fill_event import filestore.api as fsapi #from metadatasto...
bsd-2-clause
sivaprakashniet/push_pull
p2p/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...
bsd-3-clause
ttglennhall/DjangoGirlsTutorial
myvenv/lib/python3.4/site-packages/pip/commands/install.py
342
12694
import os import sys import tempfile import shutil from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.log import logger from pip.locations import (src_prefix, virtualenv_no_global, distutils_scheme, build_prefix) from pip.basecommand import Command from pip.in...
mit
Slater-Victoroff/scrapy
scrapy/core/downloader/handlers/ftp.py
130
4134
""" An asynchronous FTP file download handler for scrapy which somehow emulates an http response. FTP connection parameters are passed using the request meta field: - ftp_user (required) - ftp_password (required) - ftp_passive (by default, enabled) sets FTP connection passive mode - ftp_local_filename - If not...
bsd-3-clause
VUIIS/seam
seam/freesurfer/v1/__init__.py
1
1331
#!/usr/bin/env python # -*- coding: utf-8 -*- """ V1 defines the following recipes: * :func:`seam.freesurfer.v1.build_recipe` for building a complete script for executing the recon-all pipeline. V1 defines the following functions: * ``recon-all -all`` exposed through :func:`seam.freesurfer.v1.recon_all` * ``recon...
mit
erikruiter2/ipbucket
database.py
1
2871
from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from sqlalchemy.ext.declarative import declarative_base from ipaddr_func import long2ip from sqlalchemy.exc import IntegrityError engine = create_engine('sqlite:////tmp/ipbucket.db', convert_unicode=True) db_session = scoped_s...
gpl-2.0
karlito40/servo
tests/wpt/web-platform-tests/webdriver/javascript/execute_script_test.py
65
5664
import os import sys import unittest sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../.."))) import base_test class ExecuteScriptTest(base_test.WebDriverBaseTest): def test_ecmascript_translates_null_return_to_none(self): self.driver.get(self.webserver.where_is("javascript/res/execute_script...
mpl-2.0
pxsdirac/vnpy
vn.trader/gateway.py
9
14192
# encoding: UTF-8 from eventEngine import * # 默认空值 EMPTY_STRING = '' EMPTY_UNICODE = u'' EMPTY_INT = 0 EMPTY_FLOAT = 0.0 # 方向常量 DIRECTION_NONE = u'无方向' DIRECTION_LONG = u'多' DIRECTION_SHORT = u'空' DIRECTION_UNKNOWN = u'未知' DIRECTION_NET = u'净' # 开平常量 OFFSET_NONE = u'无开平' OFFSET_OPEN = u'开仓' OFFSET_CLOSE = u'平仓' OFF...
mit
fran-penedo/dreal
benchmarks/network/thermostat/thermostat-double-ind.py
11
3535
from gen import * ########## # shared # ########## flow_var[0] = """ (declare-fun tau () Real) (declare-fun x1 () Real) (declare-fun x2 () Real) """ flow_dec[0] = """ (define-ode flow_1 ((= d/dt[x1] (* 0.015 (- 100 (+ (* (- 1 0.01) x1) (* 0.01 x2))))) (= d/dt[x2] (* 0.045 (- 200 (+ (* (- 1 0.01)...
gpl-3.0
denny820909/builder
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/web/test/test_httpauth.py
41
22445
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.web._auth}. """ from zope.interface import implements from zope.interface.verify import verifyObject from twisted.trial import unittest from twisted.python.failure import Failure from twisted.internet.error import Conne...
mit
pitch-sands/i-MPI
flask/Lib/site-packages/pip-1.5.6-py2.7.egg/pip/commands/__init__.py
476
2236
""" Package containing all pip commands """ from pip.commands.bundle import BundleCommand from pip.commands.completion import CompletionCommand from pip.commands.freeze import FreezeCommand from pip.commands.help import HelpCommand from pip.commands.list import ListCommand from pip.commands.search import SearchComman...
bsd-3-clause
tumbl3w33d/ansible
lib/ansible/modules/cloud/azure/azure_rm_containerregistry_info.py
14
9262
#!/usr/bin/python # # Copyright (c) 2018 Zim Kalinowski, <zikalino@microsoft.com> # # 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
DARKPOP/external_chromium_org_third_party_skia
gm/rebaseline_server/compare_configs_test.py
20
1691
#!/usr/bin/python """ Copyright 2014 Google Inc. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. Test compare_configs.py TODO(epoger): Create a command to update the expected results (in self._output_dir_expected) when appropriate. For now, you should: 1. examine t...
bsd-3-clause
CSD-Public/stonix
src/MacBuild/ramdisk/lib/libHelperFunctions.py
1
11052
""" Helper functions, OS agnostic @author: Roy Nielsen """ #--- Native python libraries import re import os import sys import time import ctypes import traceback from subprocess import Popen, STDOUT, PIPE try: import termios except: pass #--- non-native python libraries in this source tree from . loggers imp...
gpl-2.0
JosephRedfern/dominator
dominate.py
1
2057
import cv2 import numpy as np class Dominator(object): def __init__(self, domino_filename): self.domino_image = cv2.imread(domino_filename) def detect_blobs(self, image=None): if image is None: image = self.domino_image params = cv2.SimpleBlobDetector_Params() pa...
bsd-2-clause
glensc/node-gyp
gyp/pylib/gyp/MSVSToolFile.py
2736
1804
# 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. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml class Writer(object): """Visual Studio XML tool file writer.""" ...
mit
mrm-xiefan/lunania-ai
catvsdog/01_job/bottleneck.py
1
4370
import os import utils import config import traceback import logging.config from luna import LunaExcepion logging.config.fileConfig("logging.conf") logger = logging.getLogger() if __name__ == '__main__': try: logger.info("------ start ------") utils.lock() from keras.applications.vgg16...
mit
PaulWay/spacewalk
backend/common/rhn_pkg.py
2
3980
# # Copyright (c) 2008--2014 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
gpl-2.0
furious-luke/django-yabl
yabl/templatetags/yabl.py
1
1699
from django import template from ..renderer import Renderer from ..utils import update_get as u_update_get register = template.Library() renderer = Renderer() class RequestException(Exception): pass @register.simple_tag def render_label(field, **kwargs): return renderer.render_label(field, **kwargs) @regis...
mit
aimas/TuniErp-8.0
addons/hr_contract/__openerp__.py
1
1837
# -*- 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
MojieBuddhist/linux-1
scripts/gdb/linux/dmesg.py
367
2005
# # gdb helper commands and functions for Linux kernel debugging # # kernel log buffer dump # # Copyright (c) Siemens AG, 2011, 2012 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb import string from linux import utils class LxDme...
gpl-2.0
plq/spyne
spyne/protocol/_outbase.py
2
30422
# # spyne - Copyright (C) Spyne contributors. # # 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. # # This libra...
lgpl-2.1
xunmengfeng/engine
tools/android/checkstyle/checkstyle.py
63
2924
# 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. """Script that is used by PRESUBMIT.py to run style checks on Java files.""" import os import subprocess import xml.dom.minidom CHROMIUM_SRC = os.path.nor...
bsd-3-clause
bluechris/xbmc
addons/service.xbmc.versioncheck/lib/common.py
82
7008
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Team-XBMC # # 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 versio...
gpl-2.0
olamy/tapiriik
tapiriik/services/api.py
10
3512
class ServiceExceptionScope: Account = "account" Service = "service" # Unlike Account and Service-level blocking exceptions, these are implemented via ActivityRecord.FailureCounts # Eventually, all errors might be stored in ActivityRecords Activity = "activity" class ServiceException(Exception): ...
apache-2.0
laiqiqi886/kbengine
kbe/res/scripts/common/Lib/idlelib/configHandler.py
59
29481
"""Provides access to stored IDLE configuration information. Refer to the comments at the beginning of config-main.def for a description of the available configuration files and the design implemented to update user configuration information. In particular, user configuration choices which duplicate the defaults will...
lgpl-3.0
Vignesh2208/Awlsim
awlsim/core/instructions/insn_dtb.py
2
1783
# -*- coding: utf-8 -*- # # AWL simulator - instructions # # Copyright 2012-2014 Michael Buesch <m@bues.ch> # # 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 ...
gpl-2.0
watspidererik/testenv
flask/lib/python2.7/site-packages/babel/dates.py
85
43083
# -*- coding: utf-8 -*- """ babel.dates ~~~~~~~~~~~ Locale dependent formatting and parsing of dates and times. The default locale for the functions in this module is determined by the following environment variables, in that order: * ``LC_TIME``, * ``LC_ALL``, and * ``LANG`` ...
mit
dkodnik/arp
addons/hr_recruitment/wizard/__init__.py
381
1095
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-Today OpenERP (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
GodBlessPP/w16b_test
static/Brython3.1.3-20150514-095342/Lib/http/cookies.py
735
20810
#!/usr/bin/env python3 # #### # Copyright 2000 by Timothy O'Malley <timo@alum.mit.edu> # # All Rights Reserved # # Permission to use, copy, modify, and distribute this software # and its documentation for any purpose and without fee is hereby # granted, provided that the above copyright notice appear in...
agpl-3.0
virajs/selenium-1
py/selenium/selenium.py
33
80518
""" Copyright 2011 Software Freedom Conservancy. 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...
apache-2.0
esrefozturk/checkmate
CheckmateServerTests/test2.py
1
2922
# This file is part of Checkmate. # # 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 distribute...
gpl-3.0
grycap/scar
examples/mask-detector-workflow/blurry-faces/src/DetectorAPI.py
1
2691
import tensorflow as tf import numpy as np import time class DetectorAPI: def __init__(self, path_to_ckpt): self.path_to_ckpt = path_to_ckpt self.detection_graph = tf.Graph() with self.detection_graph.as_default(): od_graph_def = tf.compat.v1.GraphDef() with tf.io.g...
apache-2.0
brandond/ansible
test/units/modules/network/nxos/test_nxos_ip_interface.py
33
3374
# (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
gpl-3.0
bregman-arie/ansible
test/units/playbook/test_playbook.py
119
2239
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
infOpen/ansible_customer
tests/conftest.py
1
5437
import errno import logging import os from paramiko.client import SSHClient, AutoAddPolicy from paramiko.ssh_exception import AuthenticationException, SSHException, \ NoValidConnectionsError import pytest import requests import shutil def _create_or_update_symplink(target, link_name): """ Create or updat...
mit
mvcsantos/QGIS
python/plugins/processing/algs/gdal/rasterize_over.py
3
2801
# -*- coding: utf-8 -*- """ *************************************************************************** rasterize_over.py --------------------- Date : September 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com ********...
gpl-2.0
samirasnoun/django_cms_gallery_image
cms/tests/toolbar.py
4
60596
# -*- coding: utf-8 -*- from __future__ import with_statement import datetime import re from django.contrib import admin from django.contrib.auth.models import AnonymousUser, Permission from django.template.defaultfilters import truncatewords from django.test import TestCase from django.test.client import RequestFacto...
bsd-3-clause
biocommons/hgvs
hgvs/alignmentmapper.py
1
13454
# -*- coding: utf-8 -*- """Mapping positions between pairs of sequence alignments The AlignmentMapper class is at the heart of mapping between aligned sequences. """ # Implementation note re: "no-zero correction": HGVS doesn't have a # 0. Counting is -3, -2, -1, 1, 2, 3 :-/ Coordinate calculations must # take this d...
apache-2.0
elationfoundation/rss_keyword_collector
rss_keyword_collector/feed.py
1
6292
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # This file is part of rss_keyword_parser, a simple term extractor from rss feeds. # Copyright © 2015 seamus tuohy, <stuohy@internews.org> # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as p...
lgpl-3.0
enthought/pyside
tests/QtDeclarative/qdeclarativeview_test.py
6
1466
'''Test cases for QDeclarativeView''' import unittest from PySide.QtCore import QUrl, QObject, Property, Slot from PySide.QtDeclarative import QDeclarativeView from helper import adjust_filename, TimedQApplication class MyObject(QObject): def __init__(self, text, parent=None): QObject.__init__(self, par...
lgpl-2.1
pelya/commandergenius
project/jni/python/src/Lib/test/test_MimeWriter.py
56
7669
"""Test program for MimeWriter module. The test program was too big to comfortably fit in the MimeWriter class, so it's here in its own file. This should generate Barry's example, modulo some quotes and newlines. """ import unittest, StringIO from test.test_support import run_unittest import warnings warnings.filt...
lgpl-2.1
fbradyirl/home-assistant
homeassistant/components/sytadin/sensor.py
1
4655
"""Support for Sytadin Traffic, French Traffic Supervision.""" import logging import re from datetime import timedelta import requests import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( LENGTH_...
apache-2.0
Rudloff/youtube-dl
youtube_dl/extractor/hornbunny.py
169
1813
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, parse_duration, ) class HornBunnyIE(InfoExtractor): _VALID_URL = r'http?://(?:www\.)?hornbunny\.com/videos/(?P<title_dash>[a-z-]+)-(?P<id>\d+)\.html' _TEST = { ...
unlicense
krishnab-datakind/mining-data-acquisition
travis_pypi_setup.py
1
4092
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file.""" from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.h...
mit
cgstudiomap/cgstudiomap
main/eggs/Django-1.9-py2.7.egg/django/forms/boundfield.py
135
8680
from __future__ import unicode_literals import datetime from django.forms.utils import flatatt, pretty_name from django.forms.widgets import Textarea, TextInput from django.utils import six from django.utils.encoding import ( force_text, python_2_unicode_compatible, smart_text, ) from django.utils.html import con...
agpl-3.0
hryamzik/ansible
lib/ansible/modules/network/avi/avi_backup.py
41
4095
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # 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
longjon/numpy
numpy/f2py/common_rules.py
75
4752
#!/usr/bin/env python """ Build common block mechanism for f2py2e. Copyright 2000 Pearu Peterson all rights reserved, Pearu Peterson <pearu@ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy License NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: ...
bsd-3-clause
baamenabar/MIUp-sencha-app-
sdk/command/vendor/nodejs/node_modules/jasmine-node/node_modules/jasmine-reporters/ext/phantomjs/python/webpage.py
14
2275
''' This file is part of the PyPhantomJS project. Copyright (C) 2011 James Roe <roejames12@hotmail.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 ...
mit
DEVELByte/incubator-airflow
dags/test_dag.py
6
1298
# -*- coding: utf-8 -*- # # 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
peastman/deepchem
deepchem/data/tests/test_merge.py
3
1530
""" Testing singletask/multitask dataset merging """ import os import deepchem as dc import numpy as np def test_merge(): """Test that datasets can be merged.""" current_dir = os.path.dirname(os.path.realpath(__file__)) dataset_file = os.path.join(current_dir, "../../models/tests/example.csv") featurizer = ...
mit
jhuttner/flake8-import-order
flake8_import_order/stdlib_list.py
1
5068
STDLIB_NAMES = set(( "AL", "BaseHTTPServer", "Bastion", "Binary", "Boolean", "CGIHTTPServer", "ColorPicker", "ConfigParser", "Cookie", "DEVICE", "DocXMLRPCServer", "EasyDialogs", "FL", "FrameWork", "GL", "HTMLParser", "MacOS", "Mapping", "MimeW...
lgpl-3.0
leon-adams/datascience
algorithms/hobfield.py
1
5247
# # Leon Adams # # Python Module for running a hopfield network to relocate the memory from a perturbed image. # The raw data set is represented in png image format. This code takes the three color channels (rgb) # Converts to a single channel gray scaled image and then transforms the output to a [-1,1] vector # for u...
mpl-2.0
AkA84/edx-platform
openedx/core/djangoapps/credit/migrations/0013_add_provider_status_url.py
78
12497
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'CreditProvider.provider_status_url' db.add_column('credit...
agpl-3.0
rhertzog/django
tests/middleware_exceptions/middleware.py
4
1718
from __future__ import unicode_literals from django.http import Http404, HttpResponse from django.template import engines log = [] class BaseMiddleware(object): def __init__(self, get_response): self.get_response = get_response def __call__(self, request): return self.get_response(request) ...
bsd-3-clause