repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
ox-vgg/via
refs/heads/master
via-2.x.y/scripts/import/pascal_voc/exp_annotations.py
1
''' Script to export PASCAL VOC 2012 annotation data in VIA format Author: Abhishek Dutta <adutta@robots.ox.ac.uk> 12 Apr. 2018 ''' import xmltodict import os import json base_dir = '/data/datasets/voc2012/VOCdevkit/VOC2012/' img_dir = os.path.join(base_dir, 'JPEGImages/') ann_dir = os.path.join(base_dir, 'Annotatio...
kwierman/osf.io
refs/heads/develop
api_tests/identifiers/views/test_identifier_list.py
11
# -*- coding: utf-8 -*- import urlparse from modularodm import Q from nose.tools import * # flake8: noqa from api.base.settings.defaults import API_BASE from website.identifiers.model import Identifier from tests.base import ApiTestCase from tests.factories import ( RegistrationFactory, AuthUserFactory, ...
tinchoss/Python_Android
refs/heads/master
python-build/python-libs/gdata/src/gdata/tlslite/utils/dateFuncs.py
407
import os #Functions for manipulating datetime objects #CCYY-MM-DDThh:mm:ssZ def parseDateClass(s): year, month, day = s.split("-") day, tail = day[:2], day[2:] hour, minute, second = tail[1:].split(":") second = second[:2] year, month, day = int(year), int(month), int(day) hour, minute, secon...
toanalien/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/read_checksum_from_png_unittest.py
124
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and th...
nikste/incubator-zeppelin
refs/heads/master
spark/src/main/resources/python/zeppelin_pyspark.py
3
# # 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...
azoft-dev-team/imagrium
refs/heads/win
env/Lib/opcode.py
264
""" opcode module - potentially shared between dis and other modules which operate on bytecodes (e.g. peephole optimizers). """ __all__ = ["cmp_op", "hasconst", "hasname", "hasjrel", "hasjabs", "haslocal", "hascompare", "hasfree", "opname", "opmap", "HAVE_ARGUMENT", "EXTENDED_ARG"] cmp_op = ('<...
richardcs/ansible-modules-core
refs/heads/devel
cloud/azure/azure_rm_publicipaddress_facts.py
46
#!/usr/bin/python # # Copyright (c) 2016 Matt Davis, <mdavis@ansible.com> # Chris Houseknecht, <house@redhat.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 Soft...
ttyangf/gyp
refs/heads/master
test/external-cross-compile/src/tochar.py
344
#!/usr/bin/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. import sys src = open(sys.argv[1]) dst = open(sys.argv[2], 'w') for ch in src.read(): dst.write('%d,\n' % ord(ch)) src.close() dst.close()
Dark-Passenger/DynamicDNS-client
refs/heads/master
ddclient/providers/duckdns.py
1
from requests import get from ddclient.Configurators.Logger import Log def DuckDNS(token,given_domain, ip): domain = entered_domain.split(".",1)[0] update_url = ("https://nouser:%s" "@www.duckdns.org/nic/update?hostname=%s" "&myip=%s&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG") % (token, domain, ip) respons...
steffex/pyPostcode
refs/heads/master
example.py
1
from pyPostcode import Api postcodeapi = Api('{YOUR_API_KEY}') result_street = postcodeapi.getaddress('1011AC') # use p6 search result_address = postcodeapi.getaddress('1011AC', 154) # use address search for result in [result_street, result_address]: print result.street print result.house_number print re...
jmchilton/lwr
refs/heads/master
lwr/scripts/drmaa_launch.py
1
from __future__ import print_function from json import load from lwr.managers.util.drmaa import DrmaaSessionFactory from lwr.daemon import ArgumentParser DESCRIPTION = "Submit a DRMAA job." def main(): arg_parser = ArgumentParser(description=DESCRIPTION) arg_parser.add_argument("--job_attributes", required=...
airbnb/airflow
refs/heads/master
tests/kubernetes/models/test_secret.py
7
# 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 u...
PaddlePaddle/Paddle
refs/heads/develop
python/paddle/fluid/tests/unittests/test_cudnn_lstmcell.py
2
# Copyright (c) 2020 PaddlePaddle 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 appli...
2014c2g6/c2g6
refs/heads/master
w2/static/Brython2.0.0-20140209-164925/Lib/linecache.py
785
"""Cache lines from files. This is intended to read lines from modules imported -- hence if a filename is not found, it will look down the module search path for a file by that name. """ import sys import os import tokenize __all__ = ["getline", "clearcache", "checkcache"] def getline(filename, lineno, module_globa...
miguelparaiso/PracticaOdoo
refs/heads/master
addons/crm_mass_mailing/__init__.py
333
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
angelapper/edx-platform
refs/heads/master
common/test/acceptance/fixtures/certificates.py
47
""" Tools for creating certificates config fixture data. """ import json from common.test.acceptance.fixtures import STUDIO_BASE_URL from common.test.acceptance.fixtures.base import StudioApiFixture class CertificateConfigFixtureError(Exception): """ Error occurred while installing certificate config fixtur...
pombredanne/pyelftools
refs/heads/master
elftools/construct/core.py
24
from struct import Struct as Packer from .lib.py3compat import BytesIO, advance_iterator, bchr from .lib import Container, ListContainer, LazyContainer #=============================================================================== # exceptions #======================================================================...
numerigraphe/sale-workflow
refs/heads/8.0
sale_owner_stock_sourcing/model/procurement.py
37
# -*- coding: utf-8 -*- # Author: Leonardo Pistone # Copyright 2014-2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # Licens...
cyx1231st/nova
refs/heads/eventually-consistent-host-state-mitaka
nova/api/openstack/compute/schemas/hosts.py
104
# Copyright 2014 NEC Corporation. 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 ...
mcanthony/csound
refs/heads/develop
examples/python/GeneralMidi.py
5
#!/usr/bin/python # Copyright (c) 2003 by Michael Gogins # Shows how to render an ordinary MIDI sequence # using a SoundFont import CsoundAC # Load the MIDI sequence into the score. model = CsoundAC.MusicModel() model.setCppSound(csound) score = model.getScore() score.load("c:/WINDOWS/Media/town.mid") print("Score l...
theo-l/django
refs/heads/master
django/test/runner.py
8
import ctypes import itertools import logging import multiprocessing import os import pickle import textwrap import unittest from importlib import import_module from io import StringIO from django.core.management import call_command from django.db import connections from django.test import SimpleTestCase, TestCase fro...
Omegaphora/external_chromium_org
refs/heads/lp5.1
media/tools/layout_tests/layouttests_unittest.py
175
#!/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. import unittest from layouttests import LayoutTests from test_expectations import TestExpectations class TestLayoutTests(unittes...
andela-ooladayo/django
refs/heads/master
django/conf/app_template/apps.py
411
from django.apps import AppConfig class {{ camel_case_app_name }}Config(AppConfig): name = '{{ app_name }}'
tiagocardosos/stoq
refs/heads/master
stoqlib/domain/devices.py
2
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2005-2007 Async Open Source <http://www.async.com.br> ## All rights reserved ## ## This program 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 Softw...
gnmiller/craig-bot
refs/heads/master
craig-bot/lib/python3.6/site-packages/pyasn1_modules/rfc3279.py
23
# # This file is part of pyasn1-modules. # # Copyright (c) 2017, Danielle Madeley <danielle@madeley.id.au> # License: http://snmplabs.com/pyasn1/license.html # # Derived from RFC 3279 # from pyasn1.type import namedtype from pyasn1.type import namedval from pyasn1.type import univ def _OID(*components): output = ...
tmimori/frappe
refs/heads/develop
frappe/patches/v8_0/rename_print_to_printing.py
16
import frappe def execute(): if frappe.db.exists('Module Def', 'Print'): frappe.reload_doc('printing', 'doctype', 'print_format') frappe.reload_doc('printing', 'doctype', 'print_settings') frappe.reload_doc('printing', 'doctype', 'print_heading') frappe.reload_doc('printing', 'doctype', 'letter_head') frapp...
highco-groupe/odoo
refs/heads/master
addons/hr_recruitment/hr_recruitment.py
5
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
dadiletta/Saber
refs/heads/master
venv/lib/python3.4/site-packages/setuptools/tests/test_dist_info.py
452
"""Test .dist-info style distributions. """ import os import shutil import tempfile import unittest import textwrap try: import ast except: pass import pkg_resources from setuptools.tests.py26compat import skipIf def DALS(s): "dedent and left-strip" return textwrap.dedent(s).lstrip() class TestDist...
mrquim/mrquimrepo
refs/heads/master
repo/script.module.exodus/lib/resources/lib/modules/client.py
5
# -*- coding: utf-8 -*- ''' Exodus Add-on 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 progra...
alqfahad/odoo
refs/heads/8.0
addons/procurement/procurement.py
151
# -*- 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...
dtaht/ubnt-next
refs/heads/master
tools/b43-tools/files/b43-fwsquash.py
188
#!/usr/bin/env python # # b43 firmware file squasher # Removes unnecessary firmware files # # Copyright (c) 2009 Michael Buesch <mb@bu3sch.de> # # Licensed under the GNU/GPL version 2 or (at your option) any later version. # import sys import os def usage(): print("Usage: %s PHYTYPES COREREVS /path/to/extracted/firm...
big-pegasus/spark
refs/heads/snappy/branch-2.1
examples/src/main/python/mllib/logistic_regression_with_lbfgs_example.py
22
# # 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...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/numpy/f2py/tests/test_regression.py
40
from __future__ import division, absolute_import, print_function import os import math import numpy as np from numpy.testing import run_module_suite, dec, assert_raises, assert_equal import util def _path(*a): return os.path.join(*((os.path.dirname(__file__),) + a)) class TestIntentInOut(util.F2PyTest): ...
ASlave2Audio/Restaurant-App
refs/heads/master
mingw/bin/lib/rlcompleter.py
175
"""Word completion for GNU readline 2.0. This requires the latest extension to the readline module. The completer completes keywords, built-ins and globals in a selectable namespace (which defaults to __main__); when completing NAME.NAME..., it evaluates (!) the expression up to the last dot and completes its attribut...
DragonMastur/FakeRealNewsDetection
refs/heads/master
Serverless Functions/requests/packages/urllib3/exceptions.py
223
from __future__ import absolute_import from .packages.six.moves.http_client import ( IncompleteRead as httplib_IncompleteRead ) # Base Exceptions class HTTPError(Exception): "Base exception used by this module." pass class HTTPWarning(Warning): "Base warning used by this module." pass class Po...
ramiro/pymssql
refs/heads/master
tests/test_utils.py
4
from .helpers import eq_ from _mssql import substitute_params def test_single_param(): res = substitute_params( 'SELECT * FROM employees WHERE id = %s', 13) eq_(res, b'SELECT * FROM employees WHERE id = 13') res = substitute_params( 'SELECT * FROM empl WHERE name = %s', b...
harlanhaskins/swift
refs/heads/master
utils/android/adb/commands.py
27
# adb/commands.py - Run executables on an Android device -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for l...
mszczodrak/openthread
refs/heads/master
tests/scripts/thread-cert/test_mle.py
11
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # ...
amotzkau/mudrpc
refs/heads/master
python/lib/PickleRPC/picklerpc/encoding.py
2
import pickle import base64 if hasattr(base64,"b64encode"): from base64 import b64encode, b64decode else: from base64 import encodestring as b64encode from base64 import decodestring as b64decode class PickleEncoding: def __init__(self): pass def encode(self, data): return b64encode(pickle.dump...
2ndQuadrant/ansible
refs/heads/master
lib/ansible/modules/cloud/amazon/ec2_vpc_dhcp_option_facts.py
13
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
agiliq/django
refs/heads/master
tests/template_tests/alternate_urls.py
47
from django.conf.urls import url from . import views urlpatterns = [ # View returning a template response url(r'^template_response_view/$', views.template_response_view), # A view that can be hard to find... url(r'^snark/', views.snark, name='snark'), ]
almeidapaulopt/erpnext
refs/heads/develop
erpnext/setup/doctype/customer_group/customer_group.py
7
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils.nestedset import NestedSet class CustomerGroup(NestedSet): nsm_parent_field = 'parent_customer_g...
cdht/GitPython
refs/heads/master
git/cmd.py
6
# cmd.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os import os.path import sys import select import logging import threading import errno import mm...
dmillington/ansible-modules-core
refs/heads/devel
network/nxos/nxos_evpn_global.py
21
#!/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...
csaez/riglab
refs/heads/develop
riglab/joint.py
1
# This file is part of riglab. # Copyright (C) 2014 Cesar Saez # 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 version 3. # This program is distributed in the hope that it will be useful, # bu...
davidcusatis/horizon
refs/heads/master
openstack_dashboard/enabled/_2090_admin_images_panel.py
35
# The slug of the panel to be added to HORIZON_CONFIG. Required. PANEL = 'images' # The slug of the dashboard the PANEL associated with. Required. PANEL_DASHBOARD = 'admin' # The slug of the panel group the PANEL is associated with. PANEL_GROUP = 'admin' # Python panel class of the PANEL to be added. ADD_PANEL = 'open...
theanalyst/cinder
refs/heads/master
cinder/openstack/common/scheduler/base_filter.py
23
# Copyright (c) 2011-2012 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
plucena24/OpenClos
refs/heads/master
jnpr/openclos/tests/unit/test_util.py
1
''' Created on Aug 21, 2014 @author: moloyc ''' import os import sys sys.path.insert(0,os.path.abspath(os.path.dirname(__file__) + '/' + '../..')) #trick to make it run from CLI import unittest import jnpr from jnpr.openclos.util import * class TestFunctions(unittest.TestCase): def setUp(self): pass ...
vinhlh/bite-project
refs/heads/master
deps/gdata-python-client/src/gdata/Crypto/Util/RFC1751.py
228
#!/usr/local/bin/python # rfc1751.py : Converts between 128-bit strings and a human-readable # sequence of words, as defined in RFC1751: "A Convention for # Human-Readable 128-bit Keys", by Daniel L. McDonald. __revision__ = "$Id: RFC1751.py,v 1.6 2003/04/04 15:15:10 akuchling Exp $" import string, binascii binary=...
pynetscript/FromZeroToHero
refs/heads/master
tools.py
1
############################################################################### # Written by: Aleks Lambreca # Creation date: 24/03/2018 # Last modified date: 23/04/2018 ############################################################################### from __future__ import absolute_import from __fut...
michaelgallacher/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/core/files/uploadedfile.py
402
""" Classes representing uploaded files. """ import os try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.files.base import File from django.core.files import temp as tempfile from django.utils.encoding import smart_str __al...
gautam1858/tensorflow
refs/heads/master
tensorflow/contrib/gan/python/eval/python/classifier_metrics.py
11
# Copyright 2017 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...
ryfx/gyp
refs/heads/master
test/mac/gyptest-libraries.py
82
#!/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. """ Verifies libraries (in link_settings) are properly found. """ import TestGyp import sys if sys.platform == 'darwin': test = TestGyp...
benoitsteiner/tensorflow-opencl
refs/heads/master
tensorflow/contrib/learn/python/learn/estimators/metric_key.py
89
# 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...
vallsv/pyqtgraph
refs/heads/develop
pyqtgraph/widgets/FileDialog.py
52
from ..Qt import QtGui, QtCore import sys __all__ = ['FileDialog'] class FileDialog(QtGui.QFileDialog): ## Compatibility fix for OSX: ## For some reason the native dialog doesn't show up when you set AcceptMode to AcceptSave on OS X, so we don't use the native dialog def __init__(self, *args): ...
liefdiy/bite-project
refs/heads/master
deps/gdata-python-client/tests/gdata_tests/apps/groups/live_client_test.py
22
#!/usr/bin/python2.4 # # Copyright 2011 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
qedsoftware/commcare-hq
refs/heads/master
corehq/apps/data_analytics/tests/test_esaccessors.py
1
from datetime import datetime from django.test import SimpleTestCase from corehq.apps.data_analytics.esaccessors import get_app_submission_breakdown_es from corehq.apps.data_analytics.tests.utils import save_to_es_analytics_db from corehq.elastic import get_es_new from corehq.pillows.mappings.xform_mapping import XFORM...
yeewang/pjsip-2.4
refs/heads/master
tests/pjsua/scripts-media-playrec/100_resample_lf_11_16.py
59
# $Id: 100_resample_lf_11_16.py 2052 2008-06-25 18:18:32Z nanang $ # from inc_cfg import * # simple test test_param = TestParam( "Resample (large filter) 11 KHZ to 16 KHZ", [ InstanceParam("endpt", "--null-audio --quality 10 --clock-rate 16000 --play-file wavs/input.11.wav --rec-file wavs/tmp.16.wav") ] )
gorjuce/odoo
refs/heads/8.0
openerp/addons/test_workflow/__init__.py
2074
# -*- coding: utf-8 -*- import models # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
GabMus/simpelblog
refs/heads/master
blog/admin.py
1
from django.contrib import admin from .models import Article, BlogPost, PagePost, Page, Comment admin.site.register(PagePost) admin.site.register(BlogPost) admin.site.register(Page) admin.site.register(Article) admin.site.register(Comment)
krsjoseph/youtube-dl
refs/heads/master
youtube_dl/extractor/npo.py
85
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( fix_xml_ampersands, parse_duration, qualities, strip_jsonp, unified_strdate, ) class NPOBaseIE(InfoExtractor): def _get_token(self, video_id): token_page = self._download_webpage...
probml/pyprobml
refs/heads/master
scripts/agglomDemo.py
1
# Agglomerative Clustering Demo # Author: Animesh Gupta import numpy as np from scipy.cluster.hierarchy import dendrogram, linkage import matplotlib.pyplot as plt X = np.array([[1,2], [2.5,4.5], [2,2], [4,1.5], [4,2.5],]) labels = range(1, 6) plt.figure(figsize=(10, 6)) plt.yticks(np.linspace(0,5,11)...
evanxia/hans
refs/heads/master
HelloWorld.py
1
#!/usr/bin/env python #-*- coding:UTF-8 -*-
baylee-d/osf.io
refs/heads/develop
tests/test_registrations/test_embargoes.py
5
"""Tests related to embargoes of registrations""" import datetime from rest_framework import status as http_status import json import pytz from django.core.exceptions import ValidationError from django.utils import timezone import mock import pytest from nose.tools import * # noqa from transitions import MachineErro...
OAODEV/python-gnupg
refs/heads/master
gnupg/_parsers.py
1
# -*- coding: utf-8 -*- # # This file is part of python-gnupg, a Python interface to GnuPG. # Copyright © 2013 Isis Lovecruft, <isis@leap.se> 0xA3ADB67A2CDB8B35 # © 2013 Andrej B. # © 2013 LEAP Encryption Access Project # © 2008-2012 Vinay Sajip # © 2005 Steve Traugott # ...
gangadhar-kadam/mic-erpnext
refs/heads/master
setup/doctype/uom/test_uom.py
6
test_records = [ [{ "doctype": "UOM", "uom_name": "_Test UOM" }] ]
doduytrung/odoo-8.0
refs/heads/master
addons/purchase/edi/purchase_order.py
439
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2012 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
dermoth/gramps
refs/heads/master
gramps/gen/filters/rules/test/event_rules_test.py
8
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2016 Tom Samstag # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any ...
coursemdetw/2015cd_midterm
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/importlib/__init__.py
610
"""A pure Python implementation of import.""" __all__ = ['__import__', 'import_module', 'invalidate_caches'] # Bootstrap help ##################################################### # Until bootstrapping is complete, DO NOT import any modules that attempt # to import importlib._bootstrap (directly or indirectly). Since...
vargheseg5/CultRegDesk
refs/heads/master
regdesk/add_event/views.py
1
from django.shortcuts import render, HttpResponseRedirect from main.models import Event from django.contrib.auth.decorators import login_required # Create your views here @login_required(login_url='/login/?loc=add_event') def index(request): return render(request, 'add_event/event.html') @login_required(login_url='...
NetDBNCKU/GAE-Conference-Web-App
refs/heads/master
django/contrib/gis/tests/test_spatialrefsys.py
88
from django.db import connection from django.contrib.gis.gdal import GDAL_VERSION from django.contrib.gis.tests.utils import no_mysql, oracle, postgis, spatialite from django.utils import unittest test_srs = ({'srid' : 4326, 'auth_name' : ('EPSG', True), 'auth_srid' : 4326, 'srt...
gsssrao/three.js
refs/heads/master
utils/build/build.py
53
#!/usr/bin/env python import sys if sys.version_info < (2, 7): print("This script requires at least Python 2.7.") print("Please, update to a newer version: http://www.python.org/download/releases/") # exit() import argparse import json import os import shutil import tempfile from io import open def main(argv=Non...
GbalsaC/bitnamiP
refs/heads/master
venv/lib/python2.7/site-packages/django/db/backends/oracle/creation.py
29
import sys import time from django.db.backends.creation import BaseDatabaseCreation TEST_DATABASE_PREFIX = 'test_' PASSWORD = 'Im_a_lumberjack' class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated Oracle column # types, as strings. Column-type strings can cont...
erjohnso/ansible
refs/heads/devel
test/units/modules/network/netscaler/test_netscaler_ssl_certkey.py
30
# Copyright (c) 2017 Citrix Systems # # 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. # # ...
CTJChen/ctc_astropylib
refs/heads/master
assef_nnls.py
1
from scipy.optimize import nnls import multiprocessing as mp from ctc_filters import * from ggplot import * from astropy.coordinates import Distance from astropy import units as u import seaborn as sns ''' Perform non negative least square SED fitting using the Assef et al. 2010 templates and extinction laws #self.bui...
CloudServer/nova
refs/heads/master
nova/tests/unit/virt/libvirt/test_lvm.py
17
# Copyright 2012 NTT Data. All Rights Reserved. # Copyright 2012 Yahoo! 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/li...
vvv1559/intellij-community
refs/heads/master
python/lib/Lib/encodings/utf_7.py
116
""" Python 'utf-7' Codec Written by Brian Quinlan (brian@sweetapp.com). """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is intended. encode = codecs.utf_7_encode decode = codecs.utf_7_dec...
rdemolgen/NGS-LIMS
refs/heads/master
ClinSci/management/commands/clear_models.py
1
from django.core.management.base import BaseCommand from tngs_results.models import Sample_list from ClinSci.models import Batch class Command(BaseCommand): def handle(self, *args, **options): Sample_list.objects.all().delete() Batch.objects.all().delete()
vladmm/intellij-community
refs/heads/master
python/testData/refactoring/unwrap/forUnwrap_after.py
102
print 1
spacy-io/thinc
refs/heads/master
thinc/neural/_classes/feature_extracter.py
1
# coding: utf8 from __future__ import unicode_literals from .model import Model class FeatureExtracter(Model): def __init__(self, attrs): Model.__init__(self) self.attrs = attrs def begin_update(self, docs, drop=0.0): # Handle spans features = [self._get_feats(doc) for doc in...
siosio/intellij-community
refs/heads/master
python/testData/highlighting/fStringHashSigns.py
5
f'{<error descr="Expression fragments inside f-strings cannot include line comments"><error descr="expression expected">#'</error></error><EOLError descr="type conversion, : or } expected"></EOLError><EOLError descr="' expected"></EOLError> f'{<error descr="Expression fragments inside f-strings cannot include line comm...
UniqueDroid/kernel_omap_tuna
refs/heads/master
tools/perf/python/twatch.py
3213
#! /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...
ahmetdaglarbas/e-commerce
refs/heads/tez
tests/functional/offer_tests.py
70
from oscar.test.testcases import WebTestCase class TestTheOfferListPage(WebTestCase): def test_exists(self): response = self.app.get('/offers/') self.assertEqual(200, response.status_code)
blooparksystems/odoo
refs/heads/9.0
addons/report/tests/__init__.py
456
import test_reports
TRESCLOUD/odoo
refs/heads/Integracion&ControlDeCalidad
openerp/tests/addons/test_translation_import/__init__.py
2355
# -*- coding: utf-8 -*- import models
Tejal011089/paypal_erpnext
refs/heads/develop
erpnext/patches/v5_0/update_temporary_account.py
114
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def execute(): frappe.db.sql("""Update `tabAccount` set account_type = 'Temporary' where account_name in ('Temporary Assets', 'Tempor...
araseyuta/Newsstand-analytics
refs/heads/master
gdata/Crypto/PublicKey/RSA.py
228
# # RSA.py : RSA encryption/decryption # # Part of the Python Cryptography Toolkit # # Distribute and use freely; there are no restrictions on further # dissemination and usage except those imposed by the laws of your # country of residence. This software is provided "as is" without # warranty of fitness for use or...
lz1988/company-site
refs/heads/master
tests/regressiontests/templates/urls.py
60
# coding: utf-8 from __future__ import absolute_import, unicode_literals from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', # Test urls for testing reverse lookups (r'^$', views.index), (r'^client/([\d,]+)/$', views.client), (r'^client/(?P<id>\d+)/(?P<action>[^...
flwh/KK_mt6589_iq451
refs/heads/master
prebuilts/python/linux-x86/2.7.5/lib/python2.7/distutils/tests/test_config.py
95
"""Tests for distutils.pypirc.pypirc.""" import sys import os import unittest import tempfile import shutil from distutils.core import PyPIRCCommand from distutils.core import Distribution from distutils.log import set_threshold from distutils.log import WARN from distutils.tests import support from test.test_support...
openatv/enigma2
refs/heads/6.3
lib/python/Components/GUIComponent.py
4
import skin from enigma import ePoint, eSize from Components.config import config class GUIComponent(object): """ GUI component """ def __init__(self): self.instance = None self.onVisibilityChange = [ ] self.__visible = 0 self.visible = 1 self.skinAttributes = None self.deprecationInfo = None def exe...
artwr/airflow
refs/heads/master
airflow/contrib/hooks/__init__.py
148
# -*- coding: utf-8 -*- # # 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 #...
HIPS/pgmult
refs/heads/master
test/test_psi_pi.py
1
import numpy as np import matplotlib.pyplot as plt from pgmult.distributions import PGMultinomial from pgmult.utils import compute_uniform_mean_psi, pi_to_psi, psi_to_pi def test_psi_pi_conversion(): K = 10 pi = np.ones(K) / float(K) psi = pi_to_psi(pi) pi2 = psi_to_pi(psi) print("pi: ", pi) ...
signed/intellij-community
refs/heads/master
python/helpers/py3only/docutils/writers/s5_html/__init__.py
44
# $Id: __init__.py 7720 2013-09-05 12:54:56Z milde $ # Authors: Chris Liechti <cliechti@gmx.net>; # David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ S5/HTML Slideshow Writer. """ __docformat__ = 'reStructuredText' import os import re import sys import do...
leanix/leanix-sdk-python
refs/heads/master
tests/BaseApiTest.py
1
#!/usr/bin/env python """Unit tests for Python leanIX SDK Requires you to set three environment varibales: API_KEY your API key Run all tests: python BaseApiTest.py """ import sys import os import unittest sys.path = ['../src'] + sys.path from leanix import * class BaseApiTest(unittest.TestCase): ...
nanolearning/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
3
""" Tests for the various pieces of the CombinedOpenEndedGrading system OpenEndedChild OpenEndedModule """ import json import logging import unittest from datetime import datetime from lxml import etree from lxml.html import fragment_fromstring from mock import Mock, MagicMock, patch from pytz import UTC from webob...
julian-seward1/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/gitignore/tests/test_gitignore.py
98
import pytest from ..gitignore import fnmatch_translate, PathFilter match_data = [ ("foo", False, ["a/foo", "foo"]), ("*.a", False, ["foo.a", "a/foo.a", "a/b/foo.a", "a.a/foo.a"]), ("*.py[co]", False, ["a.pyc", "a.pyo", "a/b/c.pyc"]), ("\\#*", False, ["#a", "a/#b"]), ("*#", False, ["a#", "a/b#", "...
bgris/ODL_bgris
refs/heads/master
lib/python3.5/site-packages/PyQt5/uic/icon_cache.py
2
############################################################################# ## ## Copyright (c) 2016 Riverbank Computing Limited <info@riverbankcomputing.com> ## ## This file is part of PyQt5. ## ## This file may be used under the terms of the GNU General Public License ## version 3.0 as published by the Free Softw...
thesuperzapper/tensorflow
refs/heads/master
tensorflow/contrib/tensor_forest/client/random_forest_test.py
47
# 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...
thinkwhale/MyTakeOnQuotes
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/lexers/_lassobuiltins.py
293
# -*- coding: utf-8 -*- """ pygments.lexers._lassobuiltins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Built-in Lasso types, traits, methods, and members. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ BUILTINS = { 'Types': [ 'null', ...
newswangerd/ansible
refs/heads/devel
test/units/plugins/connection/test_psrp.py
56
# -*- coding: utf-8 -*- # (c) 2018, Jordan Borean <jborean@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type import pytest import sys from io i...