repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
dcorio/l10n-italy
refs/heads/8.0
l10n_it_fatturapa_out/models/__init__.py
7
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Davide Corio # Copyright 2015 Agile Business Group <http://www.agilebg.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU A...
dagothar/gripperz
refs/heads/master
cluster/easy_landscape_collect.py
1
#!/usr/bin/python # Example: # ../scripts/easy_landscape_start.py --dir /home/awolniakowski/test/ --dwc /home/awolniakowski/grippers_acat/scenes/rotorcap/Scene.dwc.xml --td /home/awolniakowski/grippers_acat/scenes/rotorcap/task.td.xml --gripper /home/awolniakowski/grippers_acat/grippers/standard_gripper.grp.xml --gras...
endolith/scipy
refs/heads/master
scipy/ndimage/setup.py
18
import os from numpy.distutils.core import setup from numpy.distutils.misc_util import Configuration from numpy import get_include from scipy._build_utils import numpy_nodepr_api def configuration(parent_package='', top_path=None): config = Configuration('ndimage', parent_package, top_path) include_dirs = ...
h3biomed/ansible
refs/heads/h3
test/units/module_utils/test_known_hosts.py
52
# -*- coding: utf-8 -*- # (c) 2015, Michael Scherer <mscherer@redhat.com> # 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 import json import os.path...
caotianwei/django
refs/heads/master
tests/admin_inlines/models.py
276
""" Testing of admin inline formsets. """ from __future__ import unicode_literals import random from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.encoding import python_2_unicode_compatible @pyt...
CitizenB/ansible
refs/heads/devel
lib/ansible/plugins/cache/redis.py
112
# (c) 2014, Brian Coca, Josh Drake, et al # # 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. ...
jdobes/spacewalk
refs/heads/master
client/debian/packages-already-in-debian/rhn-client-tools/test/testConfig.py
19
#!/usr/bin/python import settestpath # lots of useful util methods for building/tearing down # test enviroments... import testutils from up2date_client import config import unittest test_up2date = "etc-sysconfig-rhn/up2date" class TestConfig(unittest.TestCase): def setUp(self): # in this stuff, we get...
gensmusic/test
refs/heads/master
l/python/book/learning-python/c24/mydir.py
1
#!/usr/bin/python #coding:utf-8 """ mydir.py a module that lists the namespaces of other modules """ seplen = 60 sepchr = '-' def listing(module, verbose=True): sepline = sepchr * seplen if verbose: print sepline print 'name:',module.__name__,'file:',module.__file__ print sepline c...
ljhljh235/AutoRest
refs/heads/master
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/SubscriptionIdApiVersion/fixtures/acceptancetestssubscriptionidapiversion/credentials.py
336
# 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 ...
qdqmedia/django-templation
refs/heads/master
templation/context_processor.py
1
def templation_info(request): return { 'templation_view': getattr(request, '_templation_view', None), 'templation_template': getattr(request, '_templation_template', None), }
lyft/incubator-airflow
refs/heads/master
tests/providers/mongo/sensors/test_mongo.py
4
# # 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...
techlib/wifinator
refs/heads/master
wifinator/bin/__init__.py
4
#!/usr/bin/python3 -tt # -*- coding: utf-8 -*- pass # vim:set sw=4 ts=4 et:
AlexXQJ/learn-python3
refs/heads/master
samples/io/use_json.py
21
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import json d = dict(name='Bob', age=20, score=88) data = json.dumps(d) print('JSON Data is a str:', data) reborn = json.loads(data) print(reborn) class Student(object): def __init__(self, name, age, score): self.name = name self.age = age s...
jdf76/plugin.video.youtube
refs/heads/master
resources/lib/youtube_plugin/kodion/constants/const_paths.py
2
# -*- coding: utf-8 -*- """ Copyright (C) 2014-2016 bromix (plugin.video.youtube) Copyright (C) 2016-2018 plugin.video.youtube SPDX-License-Identifier: GPL-2.0-only See LICENSES/GPL-2.0-only for more information. """ SEARCH = 'kodion/search' FAVORITES = 'kodion/favorites' WATCH_LATER = 'kodion/watch_...
thinker3197/zeroclickinfo-fathead
refs/heads/jquery-fathead-issue319
lib/fathead/bower/parse.py
7
#!/usr/bin/env python3 import sys import re URL_BASE = 'https://bower.io/docs/api/#' CODE_PATTERN = re.compile( r'{% highlight sh %}(.*){% endhighlight %}', re.DOTALL ) items = [] def add_item(ops): # Write articles items.append( '\t'.join([ ops['name'], 'A', '', ...
lmazuel/azure-sdk-for-python
refs/heads/master
azure-mgmt-network/azure/mgmt/network/v2018_01_01/models/effective_network_security_group_py3.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 ...
michaelnt/doorstop
refs/heads/develop
doorstop/core/tests/test_importer.py
1
# -*- coding: utf-8 -*- # SPDX-License-Identifier: LGPL-3.0-only """Unit tests for the doorstop.core.importer module.""" # pylint: disable=no-self-use,protected-access import logging import os import unittest from unittest.mock import MagicMock, Mock, patch from warnings import catch_warnings from doorstop.common i...
romain-dartigues/ansible-modules-core
refs/heads/rdartigues
cloud/openstack/_quantum_subnet.py
41
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, Benno Joy <benno@ansible.com> # # This module 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 ...
chronossc/openpyxl
refs/heads/master
openpyxl/reader/worksheet.py
2
# file openpyxl/reader/worksheet.py # Copyright (c) 2010 openpyxl # # 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, cop...
jieyu/maple
refs/heads/master
script/maple/benchmark/mysql_169_extract.py
1
"""Copyright 2011 The University of Michigan 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 writi...
pjg101/SickRage
refs/heads/master
lib/github/Repository.py
7
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Christopher Gilbert <christopher.john.gilbert@gmail.com> # # Copyright 2012 Steve English <steve.english@naveta...
jrick/bitcoin
refs/heads/master
contrib/devtools/fix-copyright-headers.py
173
#!/usr/bin/env python ''' Run this script inside of src/ and it will look for all the files that were changed this year that still have the last year in the copyright headers, and it will fix the headers on that file using a perl regex one liner. For example: if it finds something like this and we're in 2014 // Copyr...
fearthecowboy/pygments
refs/heads/master
Pygments/pygments-lib/pygments/styles/pastie.py
50
# -*- coding: utf-8 -*- """ pygments.styles.pastie ~~~~~~~~~~~~~~~~~~~~~~ Style similar to the `pastie`_ default style. .. _pastie: http://pastie.caboo.se/ :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style impor...
EmmanuelU/wild_kernel_htc_msm8660
refs/heads/android-msm-doubleshot-3.0-ion
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
Beyond-Imagination/BlubBlub
refs/heads/master
ChatbotServer/ChatbotEnv/Lib/site-packages/pip-9.0.1-py3.6.egg/pip/pep425tags.py
340
"""Generate and work with PEP 425 Compatibility Tags.""" from __future__ import absolute_import import re import sys import warnings import platform import logging try: import sysconfig except ImportError: # pragma nocover # Python < 2.7 import distutils.sysconfig as sysconfig import distutils.util from...
arnulfojr/money-manager
refs/heads/master
src/api/accounts/controllers/accounts.py
1
from .. import blueprint from flask import request, make_response, jsonify from cerberus import Validator from lib.db import session from lib.request import is_json from core.accounts import Account @blueprint.route('/', methods=['GET']) def get_accounts(): """Returns all the accounts registered""" account...
lamenezes/simple-model
refs/heads/master
simple_model/builder.py
1
from typing import Any, Generator from .models import Model from .utils import camel_case, coerce_to_alpha, snake_case, remove_private_keys def model_class_builder(class_name: str, data: Any) -> type: keys = data.keys() or ('',) attrs = {key: None for key in keys} attrs['__annotations__'] = {key: Any for...
zjh3123629/linux-3.0.101
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
ahmadia/bokeh
refs/heads/master
bokeh/models/plots.py
19
""" Models for representing top-level plot objects. """ from __future__ import absolute_import from six import string_types from ..enums import Location from ..mixins import LineProps, TextProps from ..plot_object import PlotObject from ..properties import Bool, Int, String, Color, Enum, Auto, Instance, Either, List...
payeldillip/django
refs/heads/master
tests/template_tests/filter_tests/test_time.py
326
from datetime import time from django.template.defaultfilters import time as time_filter from django.test import SimpleTestCase from django.utils import timezone from ..utils import setup from .timezone_utils import TimezoneTestCase class TimeTests(TimezoneTestCase): """ #20693: Timezone support for the tim...
odoousers2014/odoo
refs/heads/master
addons/website_sale_digital/controllers/main.py
7
# -*- coding: utf-8 -*- import base64 from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website.controllers.main import Website from openerp.addons.website_sale.controllers.main import website_sale from cStringIO import StringIO from werkzeug.utils import redirect cl...
flumotion-mirror/flumotion
refs/heads/master
flumotion/component/misc/repeater/repeater.py
3
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # Flumotion - a streaming media server # Copyright (C) 2004,2005,2006,2007,2008,2009 Fluendo, S.L. # Copyright (C) 2010,2011 Flumotion Services, S.A. # All rights reserved. # # This file may be distributed and/or modified under the terms of # the GNU Lesser General Pub...
SanchayanMaity/gem5
refs/heads/CS570
ext/ply/test/lex_dup3.py
174
# lex_dup3.py # # Duplicated rule specifiers import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.lex as lex tokens = [ "PLUS", "MINUS", "NUMBER", ] t_PLUS = r'\+' t_MINUS = r'-' t_NUMBER = r'\d+' def t_NUMBER(t): r'\d+' pass def t_error(t): pass lex.lex()
simonemurzilli/geonode
refs/heads/master
geonode/layers/views.py
7
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 versio...
lthurlow/Boolean-Constrained-Routing
refs/heads/master
networkx-1.8.1/networkx/algorithms/tests/test_cycles.py
20
#!/usr/bin/env python from nose.tools import * import networkx import networkx as nx class TestCycles: def setUp(self): G=networkx.Graph() G.add_cycle([0,1,2,3]) G.add_cycle([0,3,4,5]) G.add_cycle([0,1,6,7,8]) G.add_edge(8,9) self.G=G def is_cyclic_permu...
muravjov/ansible
refs/heads/stable-1.9
lib/ansible/utils/unicode.py
128
# (c) 2012-2014, Toshio Kuraotmi <a.badger@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) any lat...
DatapuntAmsterdam/handelsregister
refs/heads/master
web/handelsregister/search/input_analyzer.py
1
""" Analyze the query input from user before starting the search """ import string import re _REPLACE_TABLE = "".maketrans( string.punctuation, len(string.punctuation) * " ") class InputQAnalyzer(object): """ The InoutQAnalyzer takes a plain query string and performs various analyses on it. It cont...
QianBIG/odoo
refs/heads/8.0
addons/portal_project_issue/tests/test_access_rights.py
338
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2013-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
kkdang/sage-data-analysis
refs/heads/master
cmc_code/compare_GTF_to_annotation.py
1
#! /usr/bin/env python # KKD for Sage Bionetworks # Feb. 11, 2014 import synapseclient, os, subprocess, pybedtools syn = synapseclient.login() mergedGTF_entity = syn.get(entity='syn2338565', downloadLocation = os.getcwd()) #ENSGv70_entity = syn.get(entity='syn2215531', downloadLocation = os.getcwd()) mergedGTF = p...
dd00/commandergenius
refs/heads/dd00
project/jni/python/src/Lib/test/test_zipfile64.py
159
# Tests of the full ZIP64 functionality of zipfile # The test_support.requires call is the only reason for keeping this separate # from test_zipfile from test import test_support # XXX(nnorwitz): disable this test by looking for extra largfile resource # which doesn't exist. This test takes over 30 minutes to run in ...
nuuuboo/odoo
refs/heads/8.0
addons/stock_account/wizard/stock_invoice_onshipping.py
217
# -*- 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...
grilo/ansible-1
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_zone.py
19
#!/usr/bin/python # Copyright (c) 2016 Hewlett-Packard Enterprise # # This module 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. # # T...
kvnn/btcimg
refs/heads/master
btcimg/settings/dev_sample.py
1
from .base import * DEBUG = True # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'btc51w-&=!oukvwe36vii9p-m11hs#vqgx$w(##8j7%xoj!sy)dv+img' TEMPLATE_DEBUG = DEBUG ALLOWED_HOSTS = ["*"] INSTALLED_APPS = globals().get('INSTALLED_APPS', []) INSTALLED_APPS += ( 'debug_toolbar', )
eunchong/build
refs/heads/master
third_party/buildbot_8_4p1/buildbot/util/monkeypatches.py
4
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
dcalacci/Interactive_estimation
refs/heads/video
docs/__init__.py
887
# Included so that Django's startproject comment runs against the docs directory
hexxter/home-assistant
refs/heads/dev
homeassistant/components/lock/zwave.py
14
""" Zwave platform that handles simple door locks. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/lock.zwave/ """ # Because we do not compile openzwave on CI # pylint: disable=import-error from homeassistant.components.lock import DOMAIN, LockDevice from...
lnielsen/mytest
refs/heads/master
tests/api/conftest.py
1
# -*- coding: utf-8 -*- # # Copyright (C) 2019 CERN. # # My site is free software; you can redistribute it and/or modify it under # the terms of the MIT License; see LICENSE file for more details. """Pytest fixtures and plugins for the API application.""" from __future__ import absolute_import, print_function import...
kustomzone/Fuzium
refs/heads/master
bin/core/src/lib/rsa/varblock.py
216
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Unl...
JT5D/Alfred-Popclip-Sublime
refs/heads/master
Sublime Text 2/SideBarGit/sidebar/SideBarSelection.py
6
# coding=utf8 import sublime import os import re from SideBarProject import SideBarProject from SideBarItem import SideBarItem class SideBarSelection: def __init__(self, paths = []): if len(paths) < 1: try: path = sublime.active_window().active_view().file_name() if self.isNone(path): paths = [] ...
Bang3DEngine/Bang
refs/heads/master
Compile/CompileDependencies/ThirdParty/assimp/contrib/gtest/test/gtest_output_test.py
363
#!/usr/bin/env python # # Copyright 2008, 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...
chiamingyen/pygroup_sqlite
refs/heads/master
wsgi/static/Brython2.1.4-20140810-083054/Lib/logging/handlers.py
736
# Copyright 2001-2013 by Vinay Sajip. 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 all copies and that # both that copyright notice and this permissio...
subho007/androguard
refs/heads/master
androguard/decompiler/dad/tests/rpo_test.py
2
"""Tests for rpo.""" import sys sys.path.append('.') import unittest from androguard.decompiler.dad import graph from androguard.decompiler.dad import node class NodeTest(node.Node): def __init__(self, name): super(NodeTest, self).__init__(name) def __str__(self): return '%s (%d)' % (self.n...
yestech/gae-django-template
refs/heads/master
django/contrib/admindocs/utils.py
314
"Misc. utility functions/classes for admin documentation generator." import re from email.Parser import HeaderParser from email.Errors import HeaderParseError from django.utils.safestring import mark_safe from django.core.urlresolvers import reverse from django.utils.encoding import smart_str try: import docutils....
a-parhom/edx-platform
refs/heads/master
lms/djangoapps/instructor_analytics/tests/test_basic.py
4
""" Tests for instructor.basic """ import datetime import json import pytz from django.urls import reverse from django.db.models import Q from edx_proctoring.api import create_exam from edx_proctoring.models import ProctoredExamStudentAttempt from mock import MagicMock, Mock, patch from opaque_keys.edx.locator import...
jayinton/FlaskDemo
refs/heads/master
simple/methodTest.py
1
#!/usr/bin/env python # coding=utf-8 __author__ = 'Jayin Ton' from flask import Flask, request host = '127.0.0.1' port = 8000 app = Flask(__name__) @app.before_request def before_request(): print("before_request") print request # 必须返回response @app.after_request def after_request(res): print "after_r...
diogommartins/ryu
refs/heads/master
ryu/app/simple_switch_lacp.py
58
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
mmardini/django
refs/heads/master
django/contrib/sitemaps/management/commands/ping_google.py
81
from django.core.management.base import BaseCommand from django.contrib.sitemaps import ping_google class Command(BaseCommand): help = "Ping Google with an updated sitemap, pass optional url of sitemap" def execute(self, *args, **options): if len(args) == 1: sitemap_url = args[0] ...
jayoshih/kolibri
refs/heads/master
kolibri/content/serializers.py
2
from django.db.models import Sum from kolibri.auth.models import FacilityUser from kolibri.content.models import ChannelMetadataCache, ContentNode, File from rest_framework import serializers from .content_db_router import default_database_is_attached, get_active_content_database class ChannelMetadataCacheSerializer...
psy0rz/zfs_autobackup
refs/heads/master
zfs_autobackup/LogStub.py
1
#Used for baseclasses that dont implement their own logging (Like ExecuteNode) #Usually logging is implemented in subclasses (Like ZfsNode thats a subclass of ExecuteNode), but for regression testing its nice to have these stubs. class LogStub: """Just a stub, usually overriden in subclasses.""" # simple logg...
gunnarku/mysql-8.0
refs/heads/8.0
extra/libevent/event_rpcgen.py
159
#!/usr/bin/env python # # Copyright (c) 2005 Niels Provos <provos@citi.umich.edu> # All rights reserved. # # Generates marshaling code based on libevent. import sys import re # _NAME = "event_rpcgen.py" _VERSION = "0.1" _STRUCT_RE = '[a-z][a-z_0-9]*' # Globals line_count = 0 white = re.compile(r'^\s+') cppcomment =...
fmeynadier/scidavis
refs/heads/master
scidavis/scidavisrc.py
1
############################################################################ # # # File : scidavisrc.py # # Project : SciDAVis # # Descriptio...
smmribeiro/intellij-community
refs/heads/master
python/testData/override/simple.py
83
class A: def doStuff(self, foo=True): pass class B(A): def otherMethod(self, foo, bar): print foo, bar
mr-niels-christensen/finna-be-octo-archer
refs/heads/master
briefme/src/main/isodate/isostrf.py
5
############################################################################## # Copyright 2009, Gerhard Weis # 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 ...
ismangil/pjproject
refs/heads/master
tests/pjsua/scripts-sipp/uac-srtp-dtls-reinv-sdes.py
3
# $Id$ # import inc_const as const PJSUA = ["--null-audio --max-calls=1 --auto-answer=200 --no-tcp --srtp-secure 0 --use-srtp 2 --srtp-keying=1"] PJSUA_EXPECTS = [[0, "SRTP uses keying method DTLS-SRTP", ""], [0, "SRTP uses keying method SDES", ""] ]
TheTimmy/spack
refs/heads/develop
var/spack/repos/builtin/packages/py-bottleneck/package.py
3
############################################################################## # Copyright (c) 2013-2017, 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...
nkmk/python-snippets
refs/heads/master
notebook/opencv_warp_func.py
1
import cv2 import numpy as np def warp(src, dst, src_pts, dst_pts, transform_func, warp_func, **kwargs): src_pts_arr = np.array(src_pts, dtype=np.float32) dst_pts_arr = np.array(dst_pts, dtype=np.float32) src_rect = cv2.boundingRect(src_pts_arr) dst_rect = cv2.boundingRect(dst_pts_arr) src_crop = s...
dstroppa/openstack-smartos-nova-grizzly
refs/heads/master
nova/tests/api/openstack/compute/contrib/test_consoles.py
14
# Copyright 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 # # Unless requ...
Jusedawg/SickRage
refs/heads/develop
lib/sqlalchemy/sql/dml.py
78
# sql/dml.py # Copyright (C) 2009-2014 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 """ Provide :class:`.Insert`, :class:`.Update` and :class:`.Delete`. """ from .base import...
zimmermegan/MARDA
refs/heads/master
nltk-3.0.3/nltk/parse/malt.py
5
# Natural Language Toolkit: Interface to MaltParser # # Author: Dan Garrette <dhgarrette@gmail.com> # # Copyright (C) 2001-2015 NLTK Project # URL: <http://nltk.org/> # For license information, see LICENSE.TXT from __future__ import print_function import os import tempfile import glob from operator import add from fun...
xflin/spark
refs/heads/master
examples/src/main/python/ml/chi_square_test_example.py
45
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
aragos/tichu-tournament
refs/heads/master
python/openpyxl/chart/data_source.py
3
""" Collection of utility primitives for charts. """ from openpyxl.compat import unicode from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( Bool, Typed, Alias, String, Integer, Sequence, ) from openpyxl.descriptors.excel import ExtensionList from openp...
cxxgtxy/tensorflow
refs/heads/master
tensorflow/contrib/tensor_forest/hybrid/python/__init__.py
183
# 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...
neilalbrock/xhtml2pdf
refs/heads/master
demo/tgpisa/setup.py
168
# -*- coding: utf-8 -*- from setuptools import setup, find_packages from turbogears.finddata import find_package_data import os execfile(os.path.join("tgpisa", "release.py")) packages=find_packages() package_data = find_package_data(where='tgpisa', package='tgpisa') if os.path.isdir('locales'): packages.appe...
craisins/nascarbot
refs/heads/master
plugins/validate.py
22
''' Runs a given url through the w3c validator by Vladi ''' from util import hook, http @hook.command def validate(inp): ".validate <url> -- runs url through w3c markup validator" if not inp.startswith('http://'): inp = 'http://' + inp url = 'http://validator.w3.org/check?uri=' + http.quote_pl...
GeoNode/geonode
refs/heads/master
geonode/base/api/urls.py
3
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2020 OSGeo # # 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 ...
proxysh/Safejumper-for-Desktop
refs/heads/master
buildlinux/env64/local/lib/python2.7/encodings/mac_roman.py
593
""" Python Character Mapping Codec mac_roman generated from 'MAPPINGS/VENDORS/APPLE/ROMAN.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 decode(self,input,err...
darionyaphet/flink
refs/heads/master
flink-python/pyflink/common/tests/test_serialization_schemas.py
17
################################################################################ # 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...
Simran-B/arangodb
refs/heads/docs_3.0
3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32comext/axdebug/stackframe.py
17
"""Support for stack-frames. Provides Implements a nearly complete wrapper for a stack frame. """ import sys from util import _wrap, RaiseNotImpl import expressions, gateways, axdebug, winerror import pythoncom from win32com.server.exception import COMException import repr, string from util import trace #def trace(*a...
msebire/intellij-community
refs/heads/master
python/testData/refactoring/introduceVariable/substringContainsEscapes.py
83
print(u"Hel<selection>lo \u00d6sterreich\\!\n</selection>\n")
peterbraden/tensorflow
refs/heads/master
tensorflow/tools/docker/simple_console.py
52
# Copyright 2015 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 a...
spitfire88/upm
refs/heads/master
examples/python/tcs37727.py
6
#!/usr/bin/python # Author: Norbert Wesp <nwesp@phytec.de> # Copyright (c) 2017 Phytec Messtechnik GmbH. # # based on: tcs3414cs.py # # 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 r...
alex/readthedocs.org
refs/heads/master
readthedocs/projects/migrations/0005_add_build_skipping.py
16
# encoding: utf-8 import 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 'Project.skip' db.add_column('projects_project', 'skip', self.gf('django.db.models.fields.B...
tayfun/django
refs/heads/master
django/contrib/gis/db/backends/postgis/introspection.py
70
from django.contrib.gis.gdal import OGRGeomType from django.db.backends.postgresql_psycopg2.introspection import \ DatabaseIntrospection class GeoIntrospectionError(Exception): pass class PostGISIntrospection(DatabaseIntrospection): # Reverse dictionary for PostGIS geometry types not populated until ...
guewen/odoo
refs/heads/master
addons/sale_mrp/tests/__init__.py
114
# -*- 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 of ...
agati/chimera
refs/heads/master
src/chimera/controllers/site/__init__.py
10
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # chimera - observatory automation system # Copyright (C) 2006-2007 P. Henrique Silva <henrique@astro.ufsc.br> # 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 S...
cntnboys/410Lab6
refs/heads/master
v1/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/tests/__init__.py
62
"""Tests for the 'setuptools' package""" from unittest import TestSuite, TestCase, makeSuite, defaultTestLoader import distutils.core, distutils.cmd from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.errors import DistutilsSetupError import setuptools, setuptools.dist from setuptoo...
rizumu/django
refs/heads/master
tests/m2m_multiple/tests.py
227
from __future__ import unicode_literals from datetime import datetime from django.test import TestCase from .models import Article, Category class M2MMultipleTests(TestCase): def test_multiple(self): c1, c2, c3, c4 = [ Category.objects.create(name=name) for name in ["Sports", "N...
Evervolv/android_external_chromium_org
refs/heads/kitkat
tools/telemetry/telemetry/page/page.py
23
# Copyright (c) 2012 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 re import time import urlparse from telemetry.core import util def _UrlPathJoin(*args): """Joins each path in |args| for insertion in...
iabdalkader/micropython
refs/heads/master
tests/pyb/i2c.py
16
import pyb from pyb import I2C # test we can correctly create by id for bus in (-1, 0, 1): try: I2C(bus) print("I2C", bus) except ValueError: print("ValueError", bus) i2c = I2C(1) i2c.init(I2C.MASTER, baudrate=400000) print(i2c.scan()) i2c.deinit()
rootstock/bitcoinj
refs/heads/master
examples/src/main/python/forwarding.py
21
# Copyright by the original author or 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 agre...
iut-ibk/DynaMind-UrbanSim
refs/heads/master
3rdparty/opus/src/washtenaw/indicators/obsolete/create_multiple_year_indicators.py
2
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE def get_multiple_year_indicators(config): indicators = [ {'dataset':'alldata', 'image_type':'table', 'attribute':'Residential_Units = alldata.aggre...
4eek/edx-platform
refs/heads/master
lms/djangoapps/verify_student/migrations/0008_auto__del_field_verificationcheckpoint_checkpoint_name__add_field_veri.py
84
# -*- 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): # Removing unique constraint on 'VerificationCheckpoint', fields ['course_id', 'c...
camptocamp/c2c-rd-addons
refs/heads/8.0
c2c_managment_board/__openerp__.py
4
# -*- coding: 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 #...
datenbetrieb/odoo
refs/heads/8.0
addons/l10n_ar/__init__.py
2120
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
hehongliang/tensorflow
refs/heads/master
tensorflow/contrib/tensor_forest/python/ops/data_ops.py
90
# 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...
awacha/credolib
refs/heads/master
credolib/plotting.py
1
__all__=['plotsascurve','guinierplot','kratkyplot'] from .io import getsascurve import matplotlib.pyplot as plt from sastool.libconfig import qunit, dunit def plotsascurve(samplename, *args, **kwargs): if 'dist' not in kwargs: kwargs['dist'] = None data1d, dist = getsascurve(samplename, kwargs['dist'])...
almichest/hue_app
refs/heads/master
src/twitter/__init__.py
5
__author__ = 'hira'
abstract-open-solutions/website
refs/heads/8.0
website_backend_views/__openerp__.py
7
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2015 Therp BV <http://therp.nl>. # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
mogoweb/chromium-crosswalk
refs/heads/master
chrome/test/functional/perf/endure_setup.py
68
#!/usr/bin/env python # Copyright (c) 2012 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. """Automate the setup process of Chrome Endure environment. Usage: python endure_setup.py [option] We use <ENDURE_DIR> to refer...
o5k/openerp-oemedical-v0.1
refs/heads/master
openerp/addons/hr_holidays/wizard/__init__.py
442
# -*- 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...