repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
waytai/odoo
addons/account_budget/report/analytic_account_budget_report.py
360
7589
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
victorzhao/miniblink49
third_party/WebKit/Tools/Scripts/webkitpy/tool/commands/rebaseline_unittest.py
6
70107
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
gpl-3.0
redhat-openstack/ironic
ironic/tests/drivers/test_seamicro.py
3
30134
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
erjohnso/ansible
lib/ansible/modules/cloud/amazon/ec2_vpc_dhcp_option.py
31
14953
#!/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': ['stableinterf...
gpl-3.0
bwsblake/lettercounter
django-norel-env/lib/python2.7/site-packages/django/contrib/localflavor/gb/gb_regions.py
199
3504
""" Sources: English regions: http://www.statistics.gov.uk/geography/downloads/31_10_01_REGION_names_and_codes_12_00.xls Northern Ireland regions: http://en.wikipedia.org/wiki/List_of_Irish_counties_by_area Welsh regions: http://en.wikipedia.org/wiki/Preserved_counties_of_Wales Scottish regions: http://...
mit
ZaraSeries/repo
script.module.urlresolver/lib/urlresolver/plugins/filepup.py
8
2817
""" urlresolver XBMC Addon Copyright (C) 2015 tknorris 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. ...
gpl-2.0
jelugbo/hebs_master
common/djangoapps/service_status/views.py
188
1296
""" Django Views for service status app """ import json import time from django.http import HttpResponse from dogapi import dog_stats_api from service_status import tasks from djcelery import celery from celery.exceptions import TimeoutError def index(_): """ An empty view """ return HttpResponse(...
agpl-3.0
kmoocdev/edx-platform
cms/djangoapps/contentstore/management/commands/export_convert_format.py
67
2362
""" Script for converting a tar.gz file representing an exported course to the archive format used by a different version of export. Sample invocation: ./manage.py export_convert_format mycourse.tar.gz ~/newformat/ """ import os from path import path from django.core.management.base import BaseCommand, CommandError f...
agpl-3.0
myfreshcity/mystock
webapp/models/stock.py
1
1472
from webapp.services import db from datetime import datetime import urllib2,re class Stock(db.Model): __tablename__ = 'stock_basic' id = db.Column(db.Integer, primary_key=True) code = db.Column(db.String(255)) name = db.Column(db.String(255)) flag = db.Column(db.String(5)) industry = db.Colum...
mit
v-iam/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/flow_log_information.py
2
1856
# 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 ...
mit
andrejserafim/elasticsearch
dev-tools/prepare_release_candidate.py
12
20105
# Licensed to Elasticsearch under one or more contributor # license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright # ownership. Elasticsearch licenses this file to you under # the Apache License, Version 2.0 (the "License"); you may # not use this file except...
apache-2.0
tectronics/evennia
contrib/procpools/python_procpool_plugin.py
4
4944
""" Python ProcPool plugin Evennia contribution - Griatch 2012 This is a plugin for the Evennia services. It will make the service and run_async in python_procpool.py available to the system. To activate, add the following line to your settings file: SERVER_SERVICES_PLUGIN_MODULES.append("contrib.procpools.python_p...
bsd-3-clause
pombredanne/django-tenant-schemas
tenant_schemas/test/cases.py
7
1445
import django from django.core.management import call_command from django.db import connection from django.test import TestCase from tenant_schemas.utils import get_tenant_model from tenant_schemas.utils import get_public_schema_name class TenantTestCase(TestCase): @classmethod def setUpClass(cls): c...
mit
AndroidForWave/devil_kernel_samsung_wave
toolchain/share/gdb/python/gdb/command/prompt.py
107
2135
# Extended prompt. # Copyright (C) 2011-2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later vers...
gpl-2.0
bjzhang/xen_arm
tools/python/xen/util/ip.py
51
3175
import os import re import socket import struct import errno ##### Networking-related functions def get_defaultroute(): fd = os.popen('/sbin/ip route list 2>/dev/null') for line in fd.readlines(): m = re.search('^default via ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+) dev ([^ ]*)', line) ...
gpl-2.0
sacnayak/ssnayak-explore
lib/jinja2/parser.py
336
35442
# -*- coding: utf-8 -*- """ jinja2.parser ~~~~~~~~~~~~~ Implements the template parser. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ from jinja2 import nodes from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError from jinja2.lexer impo...
apache-2.0
galtys/odoo
addons/l10n_cr/__init__.py
438
2045
# -*- encoding: utf-8 -*- ############################################################################## # # __init__.py # l10n_cr_account # First author: Carlos Vásquez <carlos.vasquez@clearcorp.co.cr> (ClearCorp S.A.) # Copyright (c) 2010-TODAY ClearCorp S.A. (http://clearcorp.co.cr). All rights reserved....
agpl-3.0
gilt/incubator-airflow
airflow/ti_deps/deps/prev_dagrun_dep.py
38
3341
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
SlimRemix/android_external_chromium_org
tools/telemetry/telemetry/page/actions/swipe.py
45
2997
# 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. import os from telemetry.page.actions import page_action class SwipeAction(page_action.PageAction): def __init__(self, selector=None, text=None, element...
bsd-3-clause
danielballan/scikit-xray
skbeam/io/gsas_file_reader.py
12
8616
# ###################################################################### # Original code: # # @author: Robert B. Von Dreele and Brian Toby # # General Structure Analysis System - II (GSAS-II) # # https://subversion.xor.aps...
bsd-3-clause
opentracing/opentracing-python
opentracing/scope.py
3
3274
# Copyright (c) 2017-2019 The OpenTracing Authors. # # 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, copy, modify, merge...
apache-2.0
oberlin/django
django/contrib/gis/geos/prepared.py
328
2445
from .base import GEOSBase from .error import GEOSException from .libgeos import geos_version_info from .prototypes import prepared as capi class PreparedGeometry(GEOSBase): """ A geometry that is prepared for performing certain operations. At the moment this includes the contains covers, and intersects ...
bsd-3-clause
xq262144/hue
desktop/core/ext-py/pysaml2-2.4.0/src/saml2/cache.py
32
5624
#!/usr/bin/env python import shelve from saml2.ident import code, decode from saml2 import time_util, SAMLError import logging logger = logging.getLogger(__name__) # The assumption is that any subject may consist of data # gathered from several different sources, all with their own # timeout time. class ToOld(SAML...
apache-2.0
NavyaJayaram/MyRepository
YouTubeUsingAJS/lib/python2.7/site-packages/pip/commands/show.py
344
2767
import os from pip.basecommand import Command from pip.log import logger from pip._vendor import pkg_resources class ShowCommand(Command): """Show information about one or more installed packages.""" name = 'show' usage = """ %prog [options] <package> ...""" summary = 'Show information about in...
mit
fevxie/odoo
addons/account_payment/account_invoice.py
382
2377
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
hryamzik/ansible
lib/ansible/modules/cloud/vmware/vmware_guest_disk_facts.py
10
6407
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Ansible Project # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = t...
gpl-3.0
kalvdans/scipy
scipy/_lib/tests/test__version.py
107
2027
from numpy.testing import assert_, run_module_suite, assert_raises from scipy._lib._version import NumpyVersion def test_main_versions(): assert_(NumpyVersion('1.8.0') == '1.8.0') for ver in ['1.9.0', '2.0.0', '1.8.1']: assert_(NumpyVersion('1.8.0') < ver) for ver in ['1.7.0', '1.7.1', '0.9.9']: ...
bsd-3-clause
neumerance/cloudloon2
.venv/lib/python2.7/site-packages/novaclient/tests/test_shell.py
3
7541
import io import prettytable import re import sys from distutils.version import StrictVersion import fixtures import mock from testtools import matchers import novaclient.client from novaclient import exceptions import novaclient.shell from novaclient.tests import utils FAKE_ENV = {'OS_USERNAME': 'username', ...
apache-2.0
frishberg/django
django/contrib/sessions/backends/cache.py
117
2766
from django.conf import settings from django.contrib.sessions.backends.base import ( CreateError, SessionBase, UpdateError, ) from django.core.cache import caches from django.utils.six.moves import range KEY_PREFIX = "django.contrib.sessions.cache" class SessionStore(SessionBase): """ A cache-based sessi...
bsd-3-clause
loxdegio/GT_S7500_LoxKernel_trebon
GT-S7500_Kernel/tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
emilybache/KataMedicineClash
SampleVisualization/test_patient.py
1
2779
from datetime import date, timedelta from patient import Patient, Prescription # to run these tests, use py.test (http://pytest.org/) class TestPatient: def test_clash_with_no_prescriptions(self): patient = Patient(prescriptions=[]) assert patient.clash([]) == set() def test_clas...
mit
kesuki/pysmali
pysmali.py
1
7282
#!/usr/bin/python import os import os.path import xml.dom.minidom var1 = '/home/mak/tmp/apktool/smali' print var1+'/android' manifest = '/home/mak/tmp/apktool/AndroidManifest.xml' ShellHelper = '/home/mak/AndroidStudioProjects/StubShell/app/src/main/java/com/ceprei/stubshell/ShellHelper.java' tranfile = '/home/mak/w...
apache-2.0
camptocamp/ngo-addons-backport
addons/account/wizard/account_journal_select.py
56
2093
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
hcleon/zxingExtend
cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/c++.py
34
3380
"""SCons.Tool.c++ Tool-specific initialization for generic Posix C++ compilers. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The...
apache-2.0
moijes12/oh-mainline
vendor/packages/PyYaml/lib/yaml/tokens.py
985
2573
class Token(object): def __init__(self, start_mark, end_mark): self.start_mark = start_mark self.end_mark = end_mark def __repr__(self): attributes = [key for key in self.__dict__ if not key.endswith('_mark')] attributes.sort() arguments = ', '.join(['%s=...
agpl-3.0
naresh21/synergetics-edx-platform
common/lib/xmodule/xmodule/partitions/partitions.py
59
7569
"""Defines ``Group`` and ``UserPartition`` models for partitioning""" from collections import namedtuple from stevedore.extension import ExtensionManager # We use ``id`` in this file as the IDs of our Groups and UserPartitions, # which Pylint disapproves of. # pylint: disable=redefined-builtin class UserPartitionEr...
agpl-3.0
sabi0/intellij-community
python/lib/Lib/wsgiref/simple_server.py
104
4789
"""BaseHTTPServer that implements the Python WSGI protocol (PEP 333, rev 1.21) This is both an example of how WSGI can be implemented, and a basis for running simple web applications on a local machine, such as might be done when testing or debugging an application. It has not been reviewed for security issues, howev...
apache-2.0
milogert/ddnsc
org.py
1
20365
import tkinter as tk import tkinter.font as tkFont import tkinter.ttk as ttk import tkinter.messagebox as tkMessageBox import pymysql.cursors ## Model Class ############################################################### class Model: """ Right now the only options for variables in the url are: {domain} ...
mit
mmckinst/pykickstart
pykickstart/commands/network.py
7
24769
# # Chris Lumens <clumens@redhat.com> # # Copyright 2005, 2006, 2007, 2008 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that...
gpl-2.0
shashisp/junction
junction/proposals/migrations/0002_auto_20150105_2220.py
9
2179
# -*- coding: utf-8 -*- from __future__ import unicode_literals # Third Party Stuff from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('conferences', '0001_initial'), ('proposals', '0001_initial'), ] operations = [ migrations.AlterU...
mit
maartenq/ansible
test/units/modules/network/f5/test_bigip_selfip.py
10
6267
# -*- coding: utf-8 -*- # # Copyright (c) 2017 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 import os import json import pytest import sys from nose.plugins.skip imp...
gpl-3.0
orangeholic/protobuf
python/google/protobuf/internal/enum_type_wrapper.py
292
3541
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
Blue7Alien/sloopdoorbot
Door System V1/membersdoor.py
1
5976
import RPi.GPIO as GPIO import time from socket import * import thread from threading import Thread import os import datetime import pygame import paramiko MAINDOORIP = '192.168.1.17' #Enter the IP address of the main door DOORBELLPORT = 12346 #Port to send the doorbell command through PORT = 12345 #Send in out info o...
gpl-2.0
gioman/QGIS
python/plugins/processing/script/AddScriptFromFileAction.py
6
3506
# -*- coding: utf-8 -*- """ *************************************************************************** EditScriptAction.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com **********************...
gpl-2.0
ameily/paramiko
paramiko/kex_gex.py
7
10302
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko is free software; you can redistribute it and/or modify it under the # terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (a...
lgpl-2.1
chirilo/mozillians
vendor-local/lib/python/celery/task/chords.py
12
2174
# -*- coding: utf-8 -*- """ celery.task.chords ~~~~~~~~~~~~~~~~~~ Chords (task set callbacks). :copyright: (c) 2009 - 2012 by Ask Solem. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from .. import current_app from ..result import AsyncResult, TaskSetRes...
bsd-3-clause
paramite/glance
glance/contrib/plugins/image_artifact/v1/image.py
14
1620
# Copyright (c) 2014 Mirantis, 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 or agreed to in writin...
apache-2.0
kerneltask/micropython
tests/basics/string_format.py
15
1782
# basic functionality test for {} format string def test(fmt, *args): print('{:8s}'.format(fmt) + '>' + fmt.format(*args) + '<') test("}}{{") test("{}-{}", 1, [4, 5]) test("{0}-{1}", 1, [4, 5]) test("{1}-{0}", 1, [4, 5]) test("{:x}", 1) test("{!r}", 2) test("{:x}", 0x10) test("{!r}", "foo") test("{!s}", "foo") t...
mit
josl/ThinkStats2
code/chap07soln.py
68
3259
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function import sys import numpy as np import math import first import thinkplot import ...
gpl-3.0
vmahuli/tempest
tempest/api/volume/admin/test_volumes_backup.py
3
3279
# Copyright 2014 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...
apache-2.0
adazey/Muzez
libs/requests/packages/urllib3/packages/backports/makefile.py
10
1514
# -*- coding: utf-8 -*- """ backports.makefile ~~~~~~~~~~~~~~~~~~ Backports the Python 3 ``socket.makefile`` method for use with anything that wants to create a "fake" socket object. """ import io from socket import SocketIO def backport_makefile(self, mode="r", buffering=None, encoding=None, ...
gpl-3.0
InfiniaPress/Passenger-Pigeon
assets/bower_components/bower_components/forge/bower_components/forge/tests/policyserver.py
171
3551
#!/usr/bin/env python """ Flash Socket Policy Server. - Starts Flash socket policy file server. - Defaults to port 843. - NOTE: Most operating systems require administrative privileges to use ports under 1024. $ ./policyserver.py [options] """ """ Also consider Adobe's solutions: http://www.adobe.com/devnet/fla...
mit
bq/web2board
res/common/Scons/sconsFiles/SCons/Platform/posix.py
6
4209
"""SCons.Platform.posix Platform-specific initialization for POSIX (Linux, UNIX, etc.) systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001 - 2015 The SCons Foundation # # ...
lgpl-3.0
0111001101111010/open-health-inspection-api
venv/lib/python2.7/site-packages/flask/testsuite/ext.py
563
5156
# -*- coding: utf-8 -*- """ flask.testsuite.ext ~~~~~~~~~~~~~~~~~~~ Tests the extension import thing. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys import unittest try: from imp import reload as reload_module except ImportError: reload...
gpl-2.0
iiegor/reaper
lib/aiml/DefaultSubs.py
22
3587
"""This file contains the default (English) substitutions for the PyAIML kernel. These substitutions may be overridden by using the Kernel.loadSubs(filename) method. The filename specified should refer to a Windows-style INI file with the following format: # lines that start with '#' are comments # The 'gen...
mit
shakamunyi/nova
nova/tests/unit/virt/hyperv/test_migrationops.py
13
3177
# Copyright 2014 IBM Corp. # # 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 ...
apache-2.0
philenotfound/beagleboneblack-kernel
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
divegeek/keyczar
cpp/src/tools/swtoolkit/site_scons/site_tools/target_debug.py
36
2128
#!/usr/bin/python2.4 # Copyright 2009, 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...
apache-2.0
monnand/myblog
blog/views.py
1
14173
from django.http import HttpResponse, HttpResponseRedirect from django.http import HttpResponseForbidden from django.http import HttpRequest from django.http import Http404 from django.template.loader import render_to_string from django.template import RequestContext from django.shortcuts import render_to_response from...
apache-2.0
JeroenZegers/Nabu-MSSS
nabu/postprocessing/reconstructors/reconstructor.py
1
6611
"""@file reconstructor.py contains the Reconstructor class""" from abc import ABCMeta, abstractmethod import os import scipy.io.wavfile as wav import numpy as np class Reconstructor(object): """the general reconstructor class a reconstructor is used to reconstruct the signals from the models output""" __metacla...
mit
doismellburning/edx-platform
openedx/core/djangoapps/user_api/course_tag/api.py
174
1940
""" A service-like user_info interface. Could be made into an http API later, but for now just in-process. Exposes global and per-course key-value pairs for users. Implementation note: Stores global metadata using the UserPreference model, and per-course metadata using the UserCourseTag model. """ from ..models imp...
agpl-3.0
opensourcechipspark/platform_external_chromium_org
webkit/tools/layout_tests/PRESUBMIT.py
87
2098
# 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. """test_expectations.txt presubmit script. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for details on the presubmit API ...
bsd-3-clause
jolene-esposito/osf.io
scripts/migrate_github_oauth_settings.py
55
7419
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to migrate addongithubusersettings and create and attach addongithuboauthsettings. Log: Executed on production by SL on 2014-10-05 at 23:11 EST. 269 AddonGithubUserSettings records were successfully migrated. 3 records with invalidated credentials were s...
apache-2.0
tensorflow/models
research/object_detection/anchor_generators/grid_anchor_generator_test.py
2
4519
# 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...
apache-2.0
hainm/binder
binder/log.py
1
6573
import logging import Queue import time from threading import Thread, current_thread, Lock import zmq from binder.binderd.client import BinderClient from binder.settings import LogSettings class LoggerClient(Thread): _singleton = None @staticmethod def getInstance(): if not LoggerClient._singl...
apache-2.0
dudonwai/dudonsblog
Lib/encodings/cp500.py
593
13377
""" Python Character Mapping Codec cp500 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP500.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...
mit
ckuethe/gnuradio
gr-analog/python/analog/wfm_rcv_pll.py
58
9802
# # Copyright 2005,2006,2012-2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any lat...
gpl-3.0
alexschiller/osf.io
api_tests/nodes/views/test_node_relationship_institutions.py
7
18319
from nose.tools import * # flake8: noqa from tests.base import ApiTestCase from osf_tests.factories import InstitutionFactory, AuthUserFactory, NodeFactory from api.base.settings.defaults import API_BASE from website.util import permissions class TestNodeRelationshipInstitutions(ApiTestCase): def setUp(self)...
apache-2.0
akhilaananthram/nupic
nupic/regions/ImageSensorFilters/FillBackground.py
17
3191
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
shanglt/youtube-dl
youtube_dl/extractor/testurl.py
160
2162
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ExtractorError class TestURLIE(InfoExtractor): """ Allows adressing of the test cases as test:yout.*be_1 """ IE_DESC = False # Do not list _VALID_URL = r'test(?:url)?:(?P<id>(?P<extractor>.+?)(?:_(?...
unlicense
mibexsoftware/alfred-stash-workflow
workflow/src/lib/requests/packages/chardet/universaldetector.py
1776
6840
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mit
soapy/soapy
soapy/pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate_pyqt5.py
38
5579
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './pyqtgraph/graphicsItems/ViewBox/axisCtrlTemplate.ui' # # Created: Wed Mar 26 15:09:28 2014 # by: PyQt5 UI code generator 5.0.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class...
gpl-3.0
cseed/hail
hail/python/test/hailtop/hailctl/dataproc/test_cli.py
2
1186
from unittest.mock import Mock import pytest from hailtop.hailctl.dataproc import cli from hailtop.hailctl.dataproc import list_clusters def test_required_gcloud_version_met(monkeypatch): monkeypatch.setattr("hailtop.hailctl.dataproc.gcloud.get_version", Mock(return_value=cli.MINIMUM_REQUIRED_GCLOUD_VERSION)) ...
mit
bboozzoo/mender-backend-cli
mender/client/__init__.py
1
3091
# The MIT License (MIT) # # Copyright (c) 2016 Maciej Borzecki # # 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, copy, m...
mit
okroener/autokey
src/lib/common.py
47
2600
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 Chris Dekter # # 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 late...
gpl-3.0
gangadharkadam/saloon_frappe_install
frappe/desk/query_report.py
20
8628
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import os, json from frappe import _ from frappe.modules import scrub, get_module_path from frappe.utils import flt, cint, get_html_format from frappe.translate im...
mit
SANBI-SA/tools-sanbi-uwc
tools/build_ctb_explorer/build_ctb_explorer.py
1
4075
#!/usr/bin/env python from __future__ import print_function import argparse import datetime import glob import shutil import os # try: # from urllib.parse import urlparse # except ImportError: # from urlparse import urlparse import logging log = logging.getLogger(__name__) def copy_output_file_to_dataset(...
gpl-3.0
dagnarf/sgh-i717-dagkernel
Documentation/networking/cxacru-cf.py
14668
1626
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 later version. # # This program i...
gpl-2.0
jtg-gg/blink
Tools/Scripts/webkitpy/thirdparty/coverage/__init__.py
64
3417
"""Code coverage measurement for Python. Ned Batchelder http://nedbatchelder.com/code/coverage """ __version__ = "3.5.1" # see detailed history in CHANGES.txt __url__ = "http://nedbatchelder.com/code/coverage" if max(__version__).isalpha(): # For pre-releases, use a version-specific URL. __url__ += "/" ...
bsd-3-clause
Pallokala/ansible-modules-core
packaging/os/rhn_channel.py
197
5204
#!/usr/bin/python # (c) Vincent Van de Kussen # # 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 vers...
gpl-3.0
guozhangwang/kafka
tests/kafkatest/tests/client/compression_test.py
3
4480
# 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 ...
apache-2.0
ar7z1/ansible
test/units/modules/network/f5/test_bigip_remote_role.py
9
3358
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, 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 import os import json import pytest import sys from nose.plugins.skip i...
gpl-3.0
not-raspberry/mirakuru
tests/executors/test_http_executor.py
2
3131
"""HTTP Executor tests.""" import sys import socket from functools import partial import pytest from mirakuru import HTTPExecutor from mirakuru import TimeoutExpired, AlreadyRunning from mirakuru.compat import HTTPConnection, OK, http_server_cmd from tests import test_server_path HOST = "127.0.0.1" PORT = 7987 ht...
lgpl-3.0
mxia/engine
build/android/pylib/utils/parallelizer.py
51
7129
# Copyright 2014 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. """ Wrapper that allows method execution in parallel. This class wraps a list of objects of the same type, emulates their interface, and executes any functi...
bsd-3-clause
kenglishhi/gae-django-sandbox
django/contrib/gis/geos/prototypes/topology.py
311
2226
""" This module houses the GEOS ctypes prototype functions for the topological operations on geometries. """ __all__ = ['geos_boundary', 'geos_buffer', 'geos_centroid', 'geos_convexhull', 'geos_difference', 'geos_envelope', 'geos_intersection', 'geos_linemerge', 'geos_pointonsurface', 'geos_pre...
apache-2.0
roadmapper/ansible
lib/ansible/plugins/action/net_system.py
648
1057
# (c) 2017, Ansible Inc, # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is di...
gpl-3.0
SpaceKatt/CSPLN
apps/scaffolding/mac/web2py/web2py.app/Contents/Resources/gluon/tests/test_storage.py
10
4537
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Unit tests for storage.py """ import unittest from fix_path import fix_sys_path fix_sys_path(__file__) from storage import Storage, StorageList, List from http import HTTP import pickle class TestStorage(unittest.TestCase): """ Tests storage.Storage """ d...
gpl-3.0
kyoshino/bedrock
bedrock/firefox/templatetags/helpers.py
2
9753
from django.conf import settings import jinja2 from django.template.loader import render_to_string from django_jinja import library from bedrock.firefox.firefox_details import firefox_desktop, firefox_android, firefox_ios from bedrock.base.urlresolvers import reverse from lib.l10n_utils import get_locale def deskto...
mpl-2.0
Markus-Goetz/CDS-Invenio-Authorlist
modules/bibedit/lib/bibedit_templates.py
3
19977
## This file is part of Invenio. ## Copyright (C) 2005, 2006, 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 ## License, or (at your ...
gpl-2.0
jblackburne/scikit-learn
examples/decomposition/plot_pca_vs_fa_model_selection.py
70
4523
""" =============================================================== Model selection with Probabilistic PCA and Factor Analysis (FA) =============================================================== Probabilistic PCA and Factor Analysis are probabilistic models. The consequence is that the likelihood of new data can be u...
bsd-3-clause
yuchangfu/pythonfun
packages/werkzeug/testsuite/multipart/collect.py
248
1584
#!/usr/bin/env python """ Hacky helper application to collect form data. """ from werkzeug.serving import run_simple from werkzeug.wrappers import Request, Response def copy_stream(request): from os import mkdir from time import time folder = 'request-%d' % time() mkdir(folder) environ = request.e...
gpl-3.0
szecsi/Gears
GearsPy/Project/Components/Warp/Clamp.py
1
1310
import Gears as gears from .. import * from .Base import * class Clamp(Base) : def applyWithArgs( self, spass, functionName, *, minima : 'Horizontal and vertical minima [(um,um)].' = ('field', 'field'), maxima : 'Horiz...
gpl-2.0
garwynn/L900_LJC_Kernel
tools/perf/python/twatch.py
3213
1338
#! /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...
gpl-2.0
MattsFleaMarket/python-for-android
python-modules/twisted/twisted/runner/procmontap.py
49
2325
# -*- test-case-name: twisted.runner.test.test_procmontap -*- # Copyright (c) 2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Support for creating a service which runs a process monitor. """ from twisted.python import usage from twisted.runner.procmon import ProcessMonitor class Options(usage.Optio...
apache-2.0
huanpc/IoT-1
gui/controller/.venv/lib/python3.5/site-packages/django/db/models/fields/reverse_related.py
106
11166
""" "Rel objects" for related fields. "Rel objects" (for lack of a better name) carry information about the relation modeled by a related field and provide some utility functions. They're stored in the ``remote_field`` attribute of the field. They also act as reverse fields for the purposes of the Meta API because th...
mit
rew4332/tensorflow
tensorflow/models/image/mnist/convolutional.py
1
14738
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
googleapis/python-dataproc
google/cloud/dataproc_v1/services/job_controller/transports/base.py
1
12099
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
apache-2.0
DefyVentures/edx-platform
lms/djangoapps/certificates/migrations/0005_auto__add_field_generatedcertificate_name.py
188
7270
# 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 'GeneratedCertificate.name' db.add_column('certificates_generatedcertificate', 'name', self.gf('dj...
agpl-3.0
cctaylor/googleads-python-lib
examples/dfp/v201505/activity_service/create_activities.py
3
2299
#!/usr/bin/python # # 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 b...
apache-2.0
fhaoquan/kbengine
kbe/res/scripts/common/Lib/asyncio/queues.py
63
9019
"""Queues""" __all__ = ['Queue', 'PriorityQueue', 'LifoQueue', 'JoinableQueue', 'QueueFull', 'QueueEmpty'] import collections import heapq from . import events from . import futures from . import locks from .tasks import coroutine class QueueEmpty(Exception): 'Exception raised by Queue.get(block=0)/...
lgpl-3.0