repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
jklughammer/RefFreeDMA
refs/heads/master
scripts/mergeRevComp.py
1
#! /usr/bin/env python __author__ = 'jklughammer' import sys import collections import re import os from Bio.Seq import Seq from Bio.Alphabet import generic_dna infile_name = str(sys.argv[1]) # needs ordered input (by sequence length) working_dir=str(sys.argv[2]) infile = open(infile_name, 'r') outfile = open(infi...
thirdwing/SFrame
refs/heads/master
oss_src/unity/python/sframe/deps/nltk_mock.py
10
""" Dummy mocking module for nltk. When nltk is not available we will import this module as graphlab.deps.nltk, and set HAS_NLTK to false. All methods that access nltk should check the HAS_NLTK flag, therefore, attributes/class/methods in this module should never be actually used. """ ''' Copyright (C) 2015 Dato, Inc....
Tehsmash/nova
refs/heads/master
nova/tests/unit/api/test_wsgi.py
111
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2010 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
egabancho/invenio
refs/heads/pu
invenio/modules/formatter/format_elements/bfe_record_url.py
11
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2007, 2008, 2009, 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 ## Licens...
MarshMue/NCAAMarchMadness
refs/heads/master
DataFetch.py
1
# DataFetch gets statistics about teams from ESPN and structures it within a database for use in a meaningful way # Author: Marshall Mueller # Date created: 3/1/2016 from bs4 import BeautifulSoup import requests from BTrees.OOBTree import OOBTree from ZODB import FileStorage, DB import transaction from persistent impo...
edgarcosta92/ns3
refs/heads/master
src/core/bindings/callbacks_list.py
153
callback_classes = [ ['void', 'unsigned char*', 'long', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['bool', 'std::st...
ricardogsilva/QGIS
refs/heads/master
python/core/auto_additions/qgsfieldproxymodel.py
56
# The following has been generated automatically from src/core/qgsfieldproxymodel.h QgsFieldProxyModel.Filters.baseClass = QgsFieldProxyModel Filters = QgsFieldProxyModel # dirty hack since SIP seems to introduce the flags in module
akosyakov/intellij-community
refs/heads/master
python/testData/inspections/PyNumpyType/Sort.py
79
def sort(self, axis=-1, kind='quicksort', order=None): # real signature unknown; restored from __doc__ """ a.sort(axis=-1, kind='quicksort', order=None) Sort an array, in-place. Parameters ---------- axis : int, optional Axis along which to sort. Default is -1, whic...
juangj/selenium
refs/heads/master
py/test/unit/selenium/__init__.py
2454
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
arikpoz/mxnet
refs/heads/master
example/reinforcement-learning/dqn/dqn_demo.py
15
import mxnet as mx import mxnet.ndarray as nd import numpy from base import Base from operators import * from atari_game import AtariGame from utils import * import logging import argparse root = logging.getLogger() root.setLevel(logging.DEBUG) ch = logging.StreamHandler(sys.stdout) ch.setLevel(logging.DEBUG) formatt...
zerothi/sids
refs/heads/master
sisl/linalg/tests/test_solve.py
1
import pytest import numpy as np import scipy.linalg as sl from sisl.linalg import solve, solve_destroy pytestmark = [pytest.mark.linalg, pytest.mark.eig] def test_solve1(): a = np.random.rand(10, 10) b = np.random.rand(10, 10) xs = sl.solve(a, b) x = solve(a, b) assert np.allclose(xs, x) def ...
menscool/nested-sets-yii2
refs/heads/master
vendor/justinrainbow/json-schema/docs/conf.py
74
# -*- coding: utf-8 -*- # # JsonSchema documentation build configuration file, created by # sphinx-quickstart on Sat Dec 10 15:34:44 2011. # # 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. # # ...
zhangqifan/findSomething
refs/heads/master
FindSomething/Pods/AVOSCloudCrashReporting/Breakpad/src/tools/gyp/test/same-target-name-different-directory/src/touch.py
679
#!/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. import sys f = open(sys.argv[1], 'w+') f.write('Hello from touch.py\n') f.close()
pdellaert/ansible
refs/heads/devel
lib/ansible/modules/network/f5/bigip_software_install.py
15
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2018, F5 Networks Inc. # 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', ...
AdvancedClimateSystems/python-modbus
refs/heads/master
umodbus/client/serial/rtu.py
2
""" .. note:: This section is based on `MODBUS over Serial Line Specification and Implementation Guide V1.02`_. The ADU for Modbus RTU messages differs from Modbus TCP/IP messages. Messages send over RTU don't have a MBAP header, instead they have an Address field. This field contains the slave id. A CRC is appen...
mitya57/django
refs/heads/master
tests/generic_inline_admin/tests.py
47
from django.contrib import admin from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from django.contrib.contenttypes.admin import GenericTabularInline from django.contrib.contenttypes.forms import generic_inlineformset_factory from django.contrib.contenttypes.models import Cont...
trondhindenes/ansible-modules-core
refs/heads/devel
cloud/amazon/ec2_snapshot.py
53
#!/usr/bin/python # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed...
sienatime/python_koans
refs/heads/master
python3/koans/about_with_statements.py
33
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Based on AboutSandwichCode in the Ruby Koans # from runner.koan import * import re # For regular expression string comparisons class AboutWithStatements(Koan): def count_lines(self, file_name): try: file = open(file_name) try: ...
curtiszimmerman/orp
refs/heads/master
third-party/qemu-orp/tests/image-fuzzer/runner.py
66
#!/usr/bin/env python # Tool for running fuzz tests # # Copyright (C) 2014 Maria Kustova <[email protected]> # # 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...
developersociety/django-glitter
refs/heads/master
glitter/assets/migrations/0002_image_category_field_optional.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('glitter_assets', '0001_initial'), ] operations = [ migrations.AlterField( model_name='image', name='...
weidel-p/nest-simulator
refs/heads/master
pynest/examples/clopath_synapse_spike_pairing.py
13
# -*- coding: utf-8 -*- # # clopath_synapse_spike_pairing.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 ...
kuri65536/python-for-android
refs/heads/master
python-build/python-libs/gdata/build/lib/gdata/tlslite/utils/Python_AES.py
359
"""Pure-Python AES implementation.""" from cryptomath import * from AES import * from rijndael import rijndael def new(key, mode, IV): return Python_AES(key, mode, IV) class Python_AES(AES): def __init__(self, key, mode, IV): AES.__init__(self, key, mode, IV, "python") self.rijndael = rijnda...
neilLasrado/erpnext
refs/heads/develop
erpnext/hr/doctype/leave_policy/leave_policy.py
18
# -*- coding: utf-8 -*- # Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.model.document import Document class LeavePolicy(Document): def validate(self): if se...
rrooij/youtube-dl
refs/heads/master
youtube_dl/extractor/cspan.py
23
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, ExtractorError, extract_attributes, find_xpath_attr, get_element_by_class, int_or_none, smuggle_url, unescapeHTML, ) from .senateisvp import SenateISVPIE from .ustre...
eugene1g/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/thirdparty/mod_pywebsocket/mux.py
636
# Copyright 2012, 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 f...
GiovanniConserva/TestDeploy
refs/heads/master
venv/Lib/site-packages/pytz/tzfile.py
480
#!/usr/bin/env python ''' $Id: tzfile.py,v 1.8 2004/06/03 00:15:24 zenzen Exp $ ''' try: from cStringIO import StringIO except ImportError: from io import StringIO from datetime import datetime, timedelta from struct import unpack, calcsize from pytz.tzinfo import StaticTzInfo, DstTzInfo, memorized_ttinfo fro...
gef756/scipy
refs/heads/master
scipy/sparse/linalg/isolve/setup.py
108
#!/usr/bin/env python from __future__ import division, print_function, absolute_import from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.system_info import get_info, NotFoundError from numpy.distutils.misc_util import Configuration from scipy._build_utils i...
foss-transportationmodeling/rettina-server
refs/heads/master
flask/lib/python2.7/site-packages/sqlalchemy/testing/pickleable.py
81
# testing/pickleable.py # Copyright (C) 2005-2015 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 """Classes used in pickling tests, need to be at the module level for unpickli...
gxk/libnl
refs/heads/master
python/netlink/route/tc.py
3
# # Copyright (c) 2011 Thomas Graf <[email protected]> # __all__ = [ 'TcCache', 'Tc', 'QdiscCache', 'Qdisc', 'TcClassCache', 'TcClass'] import socket import sys import netlink.core as netlink import netlink.capi as core_capi import netlink.route.capi as capi import netlink.util as util import netlink.route.link as...
devs4v/devs4v-information-retrieval15
refs/heads/master
project/venv/lib/python2.7/site-packages/django/contrib/gis/db/backends/postgis/models.py
396
""" The GeometryColumns and SpatialRefSys models for the PostGIS backend. """ from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class PostGISGeometryColumns(models.Model): ...
HtmlUnit/selenium
refs/heads/master
py/test/selenium/webdriver/common/alerts_tests.py
5
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
XiaosongWei/chromium-crosswalk
refs/heads/master
tools/perf/profile_creators/extension_profile_extender_unittest.py
7
# Copyright 2016 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 shutil import tempfile from profile_creators import extension_profile_extender from telemetry import decorators from telemetry.testing impo...
idea4bsd/idea4bsd
refs/heads/idea4bsd-master
python/helpers/pydev/tests_pydevd/test_pydev_ipython_011.py
14
import sys import unittest import threading import os from nose.tools import eq_ from _pydev_bundle.pydev_imports import StringIO, SimpleXMLRPCServer from _pydev_bundle.pydev_localhost import get_localhost from _pydev_bundle.pydev_console_utils import StdIn import socket from _pydev_bundle.pydev_ipython_console_011 imp...
curlyjr25/FrogWebsite
refs/heads/master
frogs/apps/surgery/tests.py
24123
from django.test import TestCase # Create your tests here.
bdrung/audacity
refs/heads/master
lib-src/lv2/lv2/plugins/eg-metro.lv2/waflib/Tools/fc_scan.py
183
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import re from waflib import Utils,Task,TaskGen,Logs from waflib.TaskGen import feature,before_method,after_method,extension from waflib.Configure import conf INC_REGEX="""(?:...
gauribhoite/personfinder
refs/heads/master
env/google_appengine/lib/django-1.5/django/contrib/gis/management/commands/ogrinspect.py
126
import os from optparse import make_option from django.contrib.gis import gdal from django.core.management.base import LabelCommand, CommandError def layer_option(option, opt, value, parser): """ Callback for `make_option` for the `ogrinspect` `layer_key` keyword option which may be an integer or a string....
kelvin13/shifty-octocat
refs/heads/master
pygments/lexers/_scilab_builtins.py
48
# -*- coding: utf-8 -*- """ pygments.lexers._scilab_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Builtin list for the ScilabLexer. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # Autogenerated commands_kw = ( 'abort', 'apropos...
feeds/igraph
refs/heads/master
tools/seqdict/mdict.py
7
################################################################################ # Sequential Dictionary Class # # # # by Wolfgang Grafen ...
heinrich5991/django-denorm
refs/heads/master
docs/conf.py
28
# -*- coding: utf-8 -*- # # django-denorm documentation build configuration file, created by # sphinx-quickstart on Fri May 22 22:07:05 2009. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't p...
carlohamalainen/nipype
refs/heads/master
nipype/interfaces/slicer/legacy/tests/test_auto_BSplineDeformableRegistration.py
5
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from nipype.testing import assert_equal from nipype.interfaces.slicer.legacy.registration import BSplineDeformableRegistration def test_BSplineDeformableRegistration_inputs(): input_map = dict(FixedImageFileName=dict(argstr='%s', position=-2, ), Mov...
felipenaselva/repo.felipe
refs/heads/master
plugin.video.sembilhete.tv/resources/lib/requests/packages/urllib3/connectionpool.py
196
from __future__ import absolute_import import errno import logging import sys import warnings from socket import error as SocketError, timeout as SocketTimeout import socket try: # Python 3 from queue import LifoQueue, Empty, Full except ImportError: from Queue import LifoQueue, Empty, Full # Queue is im...
ol-loginov/intellij-community
refs/heads/master
python/testData/resolve/multiFile/resolveQualifiedSuperClassInPackage/foo/baz.py
83
class SuperDuper(object): def copy(self): print "duper"
peoplepower/botengine
refs/heads/master
com.ppc.Bot/narrative.py
1
''' Created on June 28, 2016 This file is subject to the terms and conditions defined in the file 'LICENSE.txt', which is part of this source code package. @author: David Moss ''' class Narrative: """ December 3, 2019 - Deprecated. SHOULD BE SAFE TO DELETE THIS FILE AFTER MARCH, 2020. TEST BY RUNNING YO...
GISPPU/GrenadaLandInformation
refs/heads/master
geonode/version.py
9
######################################################################### # # 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 version 3 of the License, or #...
DNSUsher/securethenews
refs/heads/master
securethenews/search/views.py
36
from __future__ import absolute_import, unicode_literals from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator from django.shortcuts import render from wagtail.wagtailcore.models import Page from wagtail.wagtailsearch.models import Query def search(request): search_query = request.GET.get('qu...
wuhengzhi/chromium-crosswalk
refs/heads/master
tools/idl_parser/idl_node.py
125
#!/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 sys # # IDL Node # # IDL Node defines the IDLAttribute and IDLNode objects which are constructed # by the parser as it proc...
ProfessionalIT/professionalit-webiste
refs/heads/master
sdk/google_appengine/google/appengine/tools/devappserver2/wsgi_request_info_test.py
8
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
pavelchristof/gomoku-ai
refs/heads/master
tensorflow/contrib/learn/python/learn/monitors_test.py
40
# 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...
kenshay/ImageScript
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/sphinx/jinja2glue.py
4
# -*- coding: utf-8 -*- """ sphinx.jinja2glue ~~~~~~~~~~~~~~~~~ Glue code for the jinja2 templating engine. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from os import path from pprint import pformat from six import string_types fro...
tengyifei/grpc
refs/heads/master
src/python/grpcio/grpc_core_dependencies.py
1
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
openhatch/oh-mainline
refs/heads/master
vendor/packages/Django/tests/modeltests/proxy_models/models.py
51
""" By specifying the 'proxy' Meta attribute, model subclasses can specify that they will take data directly from the table of their base class table rather than using a new table of their own. This allows them to act as simple proxies, providing a modified interface to the data from the base class. """ from django.db ...
jayceyxc/hue
refs/heads/master
desktop/core/src/desktop/windmilltests.py
38
# Generated by the windmill services transformer # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2....
cgstudiomap/cgstudiomap
refs/heads/develop
main/eggs/pbr-1.8.1-py2.7.egg/pbr/tests/util.py
64
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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...
MeetMe/selenium
refs/heads/master
py/test/selenium/webdriver/chrome/chrome_launcher_tests.py
52
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
lombritz/odoo
refs/heads/8.0
openerp/tools/pdf_utils.py
456
# -*- 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...
demonkit/it-com-location-map
refs/heads/master
config.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- import os BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DATA_DIR = os.path.join(BASE_DIR, 'data') # process celery configuration BROKER = "amqp://10.16.45.109:55672//" BACKEND = "amqp://10.16.45.109:55672//" # database config SQLALCHEMY_DATABASE_URI = "sqlite:...
mrquim/repository.mrquim
refs/heads/master
repo/service.subtitles.unacs/resources/lib/common.py
4
# -*- coding: utf-8 -*- import sys import os from bs4 import BeautifulSoup import urllib, urllib2, os import BaseHTTPServer import gzip from StringIO import StringIO import re import imp from httplib import * try: import xbmc import xbmcgui from ga import ga run_from_xbmc = True except ImportError: run_fro...
Titulacion-Sistemas/PythonTitulacion-EV
refs/heads/master
Lib/site-packages/django/template/defaulttags.py
104
"""Default tags used by the template system, available to all templates.""" from __future__ import unicode_literals import os import sys import re from datetime import datetime from itertools import groupby, cycle as itertools_cycle import warnings from django.conf import settings from django.template.base import (No...
zhangpf/vbox
refs/heads/master
src/VBox/ValidationKit/testmanager/webui/wuiadminbuildsource.py
4
# -*- coding: utf-8 -*- # $Id$ """ Test Manager WUI - Build Sources. """ __copyright__ = \ """ Copyright (C) 2012-2014 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistribute it and/or modify it under ...
neoareslinux/neutron
refs/heads/master
neutron/plugins/ml2/drivers/ibm/mechanism_sdnve.py
42
# Copyright 2015 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.0 # # Unless required by a...
barbarubra/Don-t-know-What-i-m-doing.
refs/heads/master
python/src/Lib/plat-irix6/cdplayer.py
33
# This file implements a class which forms an interface to the .cdplayerrc # file that is maintained by SGI's cdplayer program. # # Usage is as follows: # # import readcd # r = readcd.Readcd() # c = Cdplayer(r.gettrackinfo()) # # Now you can use c.artist, c.title and c.track[trackno] (where trackno # starts at 1). Whe...
dyoung418/tensorflow
refs/heads/master
tensorflow/contrib/eager/python/examples/resnet50/resnet50.py
15
# 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...
AnishShah/tensorflow
refs/heads/master
tensorflow/contrib/estimator/python/estimator/multi_head.py
19
# 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...
hmpf/nav
refs/heads/master
python/nav/web/syslogger/forms.py
2
""" forms and functions used for syslogger in NAV """ from django import forms from crispy_forms.helper import FormHelper from crispy_forms_foundation.layout import Layout, Fieldset, Row, Column, Field from nav.models.logger import Priority, LoggerCategory, Origin, LogMessageType DATEFORMAT = ("%Y-%m-%d %H:%M",) de...
eduNEXT/edx-platform
refs/heads/master
common/djangoapps/student/management/commands/manage_user.py
4
""" Management command `manage_user` is used to idempotently create or remove Django users, set/unset permission bits, and associate groups by name. """ from django.contrib.auth import get_user_model from django.contrib.auth.hashers import is_password_usable, identify_hasher from django.contrib.auth.models import Gro...
openstack/cinder
refs/heads/master
cinder/volume/drivers/open_e/jovian_common/rest_proxy.py
2
# Copyright (c) 2020 Open-E, 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 re...
victorbriz/rethinkdb
refs/heads/next
external/v8_3.30.33.16/build/gyp/test/mac/gyptest-bundle-resources.py
193
#!/usr/bin/env python # Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies things related to bundle resources. """ import TestGyp import os import stat import sys def check_attribs(path, expected_ex...
alon/servo
refs/heads/master
tests/wpt/web-platform-tests/fetch/api/resources/echo-content.py
80
def main(request, response): headers = [("X-Request-Method", request.method), ("X-Request-Content-Length", request.headers.get("Content-Length", "NO")), ("X-Request-Content-Type", request.headers.get("Content-Type", "NO"))] content = request.body return headers, content
kennjason/ursula
refs/heads/master
library/swift_ring.py
16
#!/usr/bin/python #coding: utf-8 -*- # # (c) 2014, Craig Tracey <[email protected]> # # 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) an...
gboudreau/CouchPotato
refs/heads/master
app/lib/provider/yarr/search.py
6
from app.config.cplog import CPLog from app.lib.provider.yarr.sources.newznab import newznab from app.lib.provider.yarr.sources.nzbmatrix import nzbMatrix from app.lib.provider.yarr.sources.newzbin import newzbin from app.lib.provider.yarr.sources.nzbs import nzbs from app.lib.provider.yarr.sources.tpb import tpb from ...
fitermay/intellij-community
refs/heads/master
python/testData/dotNet/expected.skeleton.Deep.py
79
# encoding: utf-8 # module SingleNameSpace.Some.Deep calls itself Deep # from SingleNameSpace, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null # by generatorXXX # no doc # no imports # no functions # classes class WeHaveClass(object): """ WeHaveClass() """ MyClass = None
40223246/2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/site.py
805
import sys
madisonhicks/blob
refs/heads/master
blob_server/database.py
1
from sqlalchemy import create_engine from sqlalchemy.engine import Engine from sqlalchemy.orm import scoped_session, sessionmaker from blob_server.config import ( SQL_USER, SQL_DB_NAME, SQL_DB_HOST, SQL_DB_PORT, SQL_PASSWORD ) def db_uri(): """ creates url using defined environment variab...
KenV99/service.kodi.callbacks
refs/heads/master
resources/lib/watchdog/utils/unicode_paths.py
17
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2013 Will Bond <[email protected]> # # 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 limita...
abaldwin88/roamer
refs/heads/master
roamer/edit_directory.py
1
""" Represents a directory after the user has submitted edits """ from collections import Counter from roamer.entry import Entry class EditDirectory(object): def __init__(self, path, content): self.path = path self.entries = {} self.process_lines(content) self.handle_duplicate_names...
daviskirk/climatecontrol
refs/heads/master
climatecontrol/cli_utils.py
1
"""CLI utils for easy command line extras.""" import click from climatecontrol import core def click_settings_file_option( settings_obj: core.Climate, click_obj=click, option_name="settings", **kw ): """Build a `click` option decorator. Args: settings_obj: settings object to load configuration ...
unioslo/cerebrum
refs/heads/master
Cerebrum/group/__init__.py
2
# -*- coding: utf-8 -*- # Copyright 2019 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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 yo...
indashnet/InDashNet.Open.UN2000
refs/heads/master
android/external/chromium_org/third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py
1
# 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
alrusdi/lettuce
refs/heads/master
tests/integration/lib/Django-1.2.5/tests/regressiontests/templates/views.py
59
# Fake views for testing url reverse lookup def index(request): pass def client(request, id): pass def client_action(request, id, action): pass def client2(request, tag): pass
tkingless/webtesting
refs/heads/master
venvs/dev/lib/python2.7/sre.py
4
/usr/lib/python2.7/sre.py
bbengfort/inigo
refs/heads/master
tests/fs_tests.py
1
# tests.fs_tests # Testing for the fs package in inigo # # Author: Benjamin Bengfort <[email protected]> # Created: Sun Jun 14 20:43:36 2015 -0400 # # Copyright (C) 2015 Windsor View Corporation # For license information, see LICENSE.txt # # ID: fs_tests.py [] [email protected] $ """ Testing for the...
JuliaSprenger/python-neo
refs/heads/master
neo/test/coretest/test_epoch.py
2
""" Tests of the neo.core.epoch.Epoch class """ import unittest import warnings from copy import deepcopy import numpy as np import quantities as pq import pickle import os from numpy.testing import assert_array_equal from neo.core.dataobject import ArrayDict try: from IPython.lib.pretty import pretty except Im...
rsutormin/narrative
refs/heads/master
src/biokbase/narrative/mongonbmanager.py
4
"""A notebook manager that uses mongodb for storage. Based on Travis Harrison's shocknbmanager and the azurenbmanager Authors: * Steve Chan <[email protected]> Copyright (C) 2013 The Regents of the University of California Department of Energy contract-operators of the Lawrence Berkeley National Laboratory 1 Cyclotro...
arnavd96/Cinemiezer
refs/heads/master
myvenv/lib/python3.4/site-packages/music21/scale/scala/__init__.py
1
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- # Name: scala/__init__.py # Purpose: Interface and representation of Scala scale files # # Authors: Christopher Ariza # # Copyright: Copyright © 2010 Michael Scott Cuthbert and the music21 Proje...
probstj/pyMPB
refs/heads/master
pympb/geometry.py
1
#Copyright 2009-2016 Seyed Hessam Moosavi Mehr, Juergen Probst #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 ve...
ryancoleman/autodock-vina
refs/heads/master
boost_1_54_0/tools/build/v2/test/core_option_l.py
51
#!/usr/bin/python # Copyright 2007 Rene Rivera. # Copyright 2011 Steven Watanabe # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) import BoostBuild t = BoostBuild.Tester(pass_toolset=0) t.write("sleep.bat", """\ ...
JBonsink/GSOC-2013
refs/heads/master
tools/ns-allinone-3.14.1/ns-3.14.1/doc/tutorial-pt-br/pickle-to-xml.py
392
#!/usr/bin/python # output xml format: # <pages> # <page url="xx"><prev url="yyy">zzz</prev><next url="hhh">lll</next><fragment>file.frag</fragment></page> # ... # </pages> import pickle import os import codecs def dump_pickles(out, dirname, filename, path): f = open(os.path.join(dirname, filename), 'r') da...
cristianquaglio/odoo
refs/heads/master
addons/document/__openerp__.py
260
# -*- 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...
mariansoban/ardupilot
refs/heads/Copter-4.0.x-sobi-phl-8m
libraries/AP_InertialSensor/examples/coning.py
6
#!/usr/bin/python from math import * from pymavlink.rotmat import Vector3, Matrix3 from numpy import linspace from visual import * class Quat: def __init__(self,w=1.0,x=0.0,y=0.0,z=0.0): self.w = w self.x = x self.y = y self.z = z def to_euler(self): roll = (atan2(2.0*...
rwillmer/django
refs/heads/master
tests/model_meta/test_legacy.py
199
import warnings from django import test from django.contrib.contenttypes.fields import GenericRelation from django.core.exceptions import FieldDoesNotExist from django.db.models.fields import CharField, related from django.utils.deprecation import RemovedInDjango110Warning from .models import BasePerson, Person from ...
deepinsight/Deformable-ConvNets
refs/heads/master
carvn/fcn-xs/image_segmentaion.py
15
# pylint: skip-file import numpy as np import mxnet as mx from PIL import Image def getpallete(num_cls): # this function is to get the colormap for visualizing the segmentation mask n = num_cls pallete = [0]*(n*3) for j in xrange(0,n): lab = j pallete[j*3+0] = 0 ...
eepalms/gem5-newcache
refs/heads/master
ext/ply/test/lex_optimize3.py
164
# ----------------------------------------------------------------------------- # lex_optimize3.py # # Writes table in a subdirectory structure. # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.lex as lex tokens = ( ...
Jonnymcc/ansible
refs/heads/devel
test/units/mock/generator.py
97
# Copyright 2016 Toshio Kuratomi <[email protected]> # # 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 ...
home-assistant/home-assistant
refs/heads/dev
tests/components/airly/test_system_health.py
6
"""Test Airly system health.""" import asyncio from unittest.mock import Mock from aiohttp import ClientError from homeassistant.components.airly.const import DOMAIN from homeassistant.setup import async_setup_component from tests.common import get_system_health_info async def test_airly_system_health(hass, aiocli...
alexryndin/ambari
refs/heads/branch-adh-1.5
ambari-server/src/main/resources/common-services/KERBEROS/1.10.3-10/package/scripts/kerberos_common.py
1
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
ostree/thefuck
refs/heads/master
tests/rules/test_python_command.py
16
from thefuck.rules.python_command import match, get_new_command from tests.utils import Command def test_match(): assert match(Command('temp.py', stderr='Permission denied')) assert not match(Command()) def test_get_new_command(): assert get_new_command(Command('./test_sudo.py'))\ == 'python ...
RyanDJLee/pyta
refs/heads/master
nodes/Dict.py
1
""" Dict astroid node This node represents the Python dictionary objects. Attributes: - items (List[Tuple[Node, Node]]) - Contains the tuple of key and value pair, where key and value are nodes. Example: - items -> [('b', 1)] Type-checking: Type is Dict[K, V], where K is the most sp...
tafaRU/account-financial-tools
refs/heads/8.0
__unported__/account_invoice_currency/__openerp__.py
8
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP - Account invoice currency # Copyright (C) 2004-2011 Zikzakmedia S.L. (http://zikzakmedia.com) # Jordi Esteve <[email protected]> # Copyright (c) 2013 Joaquin Gutierrez (ht...
75651/kbengine_cloud
refs/heads/master
kbe/src/lib/python/Lib/test/test_poplib.py
72
"""Test script for poplib module.""" # Modified by Giampaolo Rodola' to give poplib.POP3 and poplib.POP3_SSL # a real test suite import poplib import asyncore import asynchat import socket import os import time import errno from unittest import TestCase, skipUnless from test import support as test_support threading ...
imply/chuu
refs/heads/master
tools/metrics/histograms/validate_format.py
33
# 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. """Verifies that the histograms XML file is well-formatted.""" import extract_histograms def main(): # This will raise an exception if the file is not w...