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
thomasrogers03/phantomjs
src/qt/qtwebkit/Tools/QueueStatusServer/config/messages.py
119
1677
# Copyright (C) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
hynnet/openwrt-mt7620
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/root-ralink/usr/lib/python2.7/distutils/emxccompiler.py
250
11931
"""distutils.emxccompiler Provides the EMXCCompiler class, a subclass of UnixCCompiler that handles the EMX port of the GNU C compiler to OS/2. """ # issues: # # * OS/2 insists that DLLs can have names no longer than 8 characters # We put export_symbols in a def-file, as though the DLL can have # an arbitrary len...
gpl-2.0
arenadata/ambari
ambari-server/src/main/resources/common-services/AMBARI_INFRA/0.1.0/package/scripts/setup_infra_solr.py
2
5041
""" 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 ...
apache-2.0
alqfahad/odoo
addons/fetchmail/__init__.py
437
1120
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # mga@openerp.com # # This program is free software: you can redistribute it and/or mo...
agpl-3.0
MobinRanjbar/hue
desktop/core/ext-py/South-1.0.2/south/introspection_plugins/geodjango.py
153
1286
""" GeoDjango introspection rules """ import django from django.conf import settings from south.modelsinspector import add_introspection_rules has_gis = "django.contrib.gis" in settings.INSTALLED_APPS if has_gis: # Alright,import the field from django.contrib.gis.db.models.fields import GeometryField ...
apache-2.0
rcatwood/Savu
savu/plugins/loaders/image_loader.py
1
3329
# Copyright 2014 Diamond Light Source Ltd. # # 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 t...
gpl-3.0
courtarro/gnuradio
gr-channels/python/channels/__init__.py
54
1350
# # Copyright 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 later version...
gpl-3.0
suyashphadtare/test
erpnext/hr/doctype/appraisal/appraisal.py
1
2344
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, getdate from frappe import _ from frappe.model.mapper import get_mapped_doc from frappe.model.document ...
agpl-3.0
chubbymaggie/miasm
example/disasm/callback.py
2
1866
from miasm2.core.bin_stream import bin_stream_str from miasm2.core.asmblock import AsmLabel, AsmConstraint, expr_is_label from miasm2.arch.x86.disasm import dis_x86_32, cb_x86_funcs def cb_x86_callpop(cur_bloc, symbol_pool, *args, **kwargs): """ 1000: call 1005 1005: pop Will give: 1000: push 10...
gpl-2.0
apache/airflow
airflow/providers/google/cloud/example_dags/example_gcs_to_bigquery.py
10
2303
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
rabipanda/tensorflow
tensorflow/contrib/metrics/python/kernel_tests/histogram_ops_test.py
130
9577
# 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...
apache-2.0
dynaryu/inasafe
safe/gui/tools/help/needs_manager_help.py
2
10496
# coding=utf-8 """Context help for minimum needs manager dialog.""" from safe.utilities.i18n import tr from safe import messaging as m from safe.messaging import styles INFO_STYLE = styles.INFO_STYLE __author__ = 'ismailsunni' def needs_manager_helps(): """Help message for Batch Dialog. .. versionadded:: ...
gpl-3.0
yjxtogo/horizon
horizon/utils/validators.py
32
2470
# Copyright 2012 Nebula, 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 agree...
apache-2.0
mm1ke/portage
pym/_emerge/resolver/circular_dependency.py
8
9294
# Copyright 2010-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from __future__ import print_function, unicode_literals from itertools import chain, product import logging from portage.dep import use_reduce, extract_affecting_use, check_required_use, get_required_use_flags ...
gpl-2.0
kou/zulip
scripts/lib/check_rabbitmq_queue.py
3
6873
import json import os import re import subprocess import time from collections import defaultdict from typing import Any, DefaultDict, Dict, List ZULIP_PATH = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) normal_queues = [ 'deferred_work', 'digest_emails', 'email_mirror', ...
apache-2.0
iansf/engine
build/find_isolated_tests.py
142
2261
#!/usr/bin/env python # 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. """Scans build output directory for .isolated files, calculates their SHA1 hashes, stores final list in JSON document and then removes ...
bsd-3-clause
kryptxy/torrench
torrench/utilities/Config.py
1
4151
""" Config module.""" import logging import os from configparser import SafeConfigParser from torrench.utilities.Common import Common class Config(Common): r""" Config class. This class checks for config file's presence. Also, this class manages TPB/KAT proxies; That is, obtains TPB/KAT URL and ...
gpl-3.0
joshuaduffy/selenium
py/test/selenium/webdriver/common/children_finding_tests.py
3
10379
# 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...
apache-2.0
tayfun/django
django/views/debug.py
44
46856
from __future__ import unicode_literals import re import sys import types from django.conf import settings from django.core.urlresolvers import Resolver404, resolve from django.http import HttpResponse, HttpResponseNotFound from django.template import Context, Engine, TemplateDoesNotExist from django.template.default...
bsd-3-clause
SivilTaram/edx-platform
lms/envs/cms/microsite_test.py
110
1675
""" This is a localdev test for the Microsite processing pipeline """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=wildcard-import, unused-wildcard-import # Pylint gets confused by path.py instances, which report themselves ...
agpl-3.0
sjsucohort6/openstack
python/venv/lib/python2.7/site-packages/yaml/parser.py
409
25542
# The following YAML grammar is LL(1) and is parsed by a recursive descent # parser. # # stream ::= STREAM-START implicit_document? explicit_document* STREAM-END # implicit_document ::= block_node DOCUMENT-END* # explicit_document ::= DIRECTIVE* DOCUMENT-START block_node? DOCUMENT-END* # block_node_or_inden...
mit
Azulinho/flocker
flocker/cli/functional/test_sshconfig.py
15
9942
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Tests for ``flocker.cli._sshconfig``. """ from os.path import expanduser from socket import socket from subprocess import CalledProcessError from twisted.trial.unittest import TestCase from twisted.python.filepath import FilePath, Permissions from twis...
apache-2.0
vrenaville/OCB
addons/hr_evaluation/__openerp__.py
53
3305
# -*- encoding: 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 G...
agpl-3.0
anksp21/Community-Zenpacks
ZenPacks.ZenSystems.ApcUps/ZenPacks/ZenSystems/ApcUps/modeler/plugins/ApcUpsDeviceMap.py
2
2850
########################################################################## # Author: Jane Curry, jane.curry@skills-1st.co.uk # Date: March 28th, 2011 # Revised: # # ApcUpsDevice modler plugin # # This program can be used under the GNU General Public License version 2 # You can find full i...
gpl-2.0
shepdelacreme/ansible
test/units/parsing/utils/test_jsonify.py
113
1491
# -*- coding: utf-8 -*- # (c) 2016, James Cammarata <jimi@sngx.net> # # 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 o...
gpl-3.0
sharthee/ProgrammingAssignment2
labs/lab2/cs109style.py
38
1293
from __future__ import print_function from IPython.core.display import HTML from matplotlib import rcParams #colorbrewer2 Dark2 qualitative color table dark2_colors = [(0.10588235294117647, 0.6196078431372549, 0.4666666666666667), (0.8509803921568627, 0.37254901960784315, 0.00784313725490196), ...
mit
40223240/cadb_g3_0420
static/Brython3.1.1-20150328-091302/Lib/logging/__init__.py
733
66279
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
gpl-3.0
liosha2007/temporary-groupdocs-python-sdk
groupdocs/models/SignatureEnvelopeFieldLocationSettings.py
2
1794
#!/usr/bin/env python """ Copyright 2012 GroupDocs. 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...
apache-2.0
matthew-tucker/mne-python
mne/io/tests/test_reference.py
10
13045
# Authors: Marijn van Vliet <w.m.vanvliet@gmail.com> # Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Teon Brooks <teon.brooks@gmail.com> # # License: BSD (3-clause) import warnings import os.path as op import numpy as np from nose.tools import assert_true, assert_equal, assert_raise...
bsd-3-clause
valkjsaaa/sl4a
python/src/Lib/lib2to3/fixes/fix_intern.py
49
1368
# Copyright 2006 Georg Brandl. # Licensed to PSF under a Contributor Agreement. """Fixer for intern(). intern(s) -> sys.intern(s)""" # Local imports from .. import pytree from .. import fixer_base from ..fixer_util import Name, Attr, touch_import class FixIntern(fixer_base.BaseFix): PATTERN = """ power< '...
apache-2.0
urrego093/proyecto_mv
applications/welcome/languages/pt-br.py
88
7249
# -*- coding: utf-8 -*- { '!langcode!': 'pt-br', '!langname!': 'Português (do Brasil)', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novovalor\'". Você não pode atualizar ou apagar os resultados de u...
gpl-3.0
rabimba/p2pScrapper
BitTorrent-5.2.2/BitTorrent/Storage_threadpool.py
6
14110
# The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/license/. # # Software di...
mit
jcoady9/python-for-android
python3-alpha/python3-src/Lib/encodings/iso8859_10.py
272
13589
""" Python Character Mapping Codec iso8859_10 generated from 'MAPPINGS/ISO8859/8859-10.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,errors...
apache-2.0
xxhank/namebench
nb_third_party/jinja2/parser.py
215
34717
# -*- 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.utils impo...
apache-2.0
Tehsmash/ironic
ironic/tests/test_images.py
1
20411
# Vim: tabstop=4 shiftwidth=4 softtabstop=4 # coding=utf-8 # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 Lic...
apache-2.0
mgpyh/django-fluent-comments
setup.py
1
2800
#!/usr/bin/env python from __future__ import print_function from setuptools import setup, find_packages from os import path import codecs import os import re import sys # When creating the sdist, make sure the django.mo file also exists: if 'sdist' in sys.argv or 'develop' in sys.argv: try: os.chdir('flue...
apache-2.0
andyzsf/edx
common/lib/chem/chem/miller.py
182
9162
""" Calculation of Miller indices """ import numpy as np import math import fractions as fr import decimal import json def lcm(a, b): """ Returns least common multiple of a, b Args: a, b: floats Returns: float """ return a * b / fr.gcd(a, b) def segment_to_fraction(distanc...
agpl-3.0
RockySteveJobs/python-for-android
python-build/python-libs/gdata/build/lib/gdata/tlslite/utils/OpenSSL_TripleDES.py
359
1666
"""OpenSSL/M2Crypto 3DES implementation.""" from cryptomath import * from TripleDES import * if m2cryptoLoaded: def new(key, mode, IV): return OpenSSL_TripleDES(key, mode, IV) class OpenSSL_TripleDES(TripleDES): def __init__(self, key, mode, IV): TripleDES.__init__(self, key, mo...
apache-2.0
apache/flink
flink-python/pyflink/table/tests/test_correlate.py
5
4123
################################################################################ # 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...
apache-2.0
peterbarkley/SurfGeckos
djangosite/snippets/migrations/0012_auto_20170917_2131.py
1
2390
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-09-18 07:31 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('snippets', '0011_auto_20170917_2103'), ] operations = [ migrations.AlterFie...
mit
anthraxx/diffoscope
diffoscope/changes.py
2
11351
# -*- coding: utf-8 -*- # # changes.py — .changes file handling class # # This file was originally part of debexpo # https://alioth.debian.org/projects/debexpo/ # # Copyright © 2008 Jonny Lamb <jonny@debian.org> # Copyright © 2010 Jan Dittberner <jandd@debian.org> # Copyright © 2012 Arno Töll <arno@debian....
gpl-3.0
venicegeo/eventkit-cloud
eventkit_cloud/utils/tests/test_coordinate_converter.py
1
2036
import json import logging import requests_mock from django.conf import settings from django.test import TestCase, override_settings from eventkit_cloud.utils.geocoding.coordinate_converter import CoordinateConverter logger = logging.getLogger(__name__) mockURL = "http://test.test" @override_settings(GEOCODING_AUTH...
bsd-3-clause
wangjun/odoo
addons/l10n_de/__init__.py
693
1057
# -*- encoding: 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 t...
agpl-3.0
tinkerthaler/odoo
addons/resource/__init__.py
448
1086
# -*- 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...
agpl-3.0
Cenditel/cenditel.comunidades.cynin
products/ATRatings/RatingsTool.py
4
13993
import os, sys import urllib import Globals from AccessControl import ClassSecurityInfo from DateTime import DateTime from OFS.SimpleItem import SimpleItem from Acquisition import aq_base from Products.Archetypes.Referenceable import Referenceable from OFS.PropertyManager import PropertyManager from Products...
gpl-3.0
pchauncey/ansible
contrib/inventory/apstra_aos.py
14
20398
#!/usr/bin/env python # # (c) 2017 Apstra Inc, <community@apstra.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
gpl-3.0
alephu5/Soundbyte
environment/lib/python3.3/site-packages/numpy/lib/__init__.py
16
1122
from __future__ import division, absolute_import, print_function import math from .info import __doc__ from numpy.version import version as __version__ from .type_check import * from .index_tricks import * from .function_base import * from .nanfunctions import * from .shape_base import * from .stride_tricks import *...
gpl-3.0
kingvuplus/EGAMI-E
lib/python/Plugins/SystemPlugins/OSDPositionSetup/plugin.py
41
4968
from Screens.Screen import Screen from Components.ConfigList import ConfigListScreen from Components.config import config, ConfigSubsection, ConfigInteger, ConfigSlider, getConfigListEntry config.plugins.OSDPositionSetup = ConfigSubsection() config.plugins.OSDPositionSetup.dst_left = ConfigInteger(default = 0) config....
gpl-2.0
onceuponatimeforever/oh-mainline
vendor/packages/Django/django/contrib/gis/db/backends/spatialite/creation.py
100
5765
import os from django.conf import settings from django.core.cache import get_cache from django.core.cache.backends.db import BaseDatabaseCache from django.core.exceptions import ImproperlyConfigured from django.db.backends.sqlite3.creation import DatabaseCreation class SpatiaLiteCreation(DatabaseCreation): def cr...
agpl-3.0
bleib1dj/boto
boto/s3/key.py
22
82475
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2011, Nexenta Systems Inc. # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the...
mit
menardorama/ReadyNAS-Add-ons
headphones-1.0.0/files/etc/apps/headphones/lib/unidecode/x00e.py
252
4092
data = ( '[?]', # 0x00 'k', # 0x01 'kh', # 0x02 'kh', # 0x03 'kh', # 0x04 'kh', # 0x05 'kh', # 0x06 'ng', # 0x07 'cch', # 0x08 'ch', # 0x09 'ch', # 0x0a 'ch', # 0x0b 'ch', # 0x0c 'y', # 0x0d 'd', # 0x0e 't', # 0x0f 'th', # 0x10 'th', # 0x11 'th', # 0x12 'n', #...
gpl-2.0
pubnub/Zopkio
examples/zookeeper/test_suites/zookeeper_test_faulttolerance.py
4
1959
# Copyright 2015 LinkedIn Corp. # # 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....
apache-2.0
Champii/runtime
deps/v8/tools/release/common_includes.py
21
29230
#!/usr/bin/env python # Copyright 2013 the V8 project 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: # # * Redistributions of source code must retain the above copyright # notice...
apache-2.0
daasbank/swift
swift/common/splice.py
36
5500
# Copyright (c) 2014 OpenStack Foundation # # 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 ...
apache-2.0
omondiy/foursquared.eclair
mock_server/playfoursquare.py
127
1999
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self): logg...
apache-2.0
IV-GII/SocialCookies
ENV1/lib/python2.7/site-packages/django/contrib/sites/management.py
232
1587
""" Creates the default Site object. """ from django.db.models import signals from django.db import connections from django.db import router from django.contrib.sites.models import Site from django.contrib.sites import models as site_app from django.core.management.color import no_style def create_default_site(app, c...
gpl-2.0
jaggu303619/asylum
openerp/addons/hr_holidays/wizard/hr_holidays_summary_employees.py
52
2187
# -*- 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
rsharris/jun2015lgl
create_script_insert_length_sparse.py
1
17318
#!/usr/bin/env python """ Create a cluster job file to create an average insert length sparsity discriminator track. """ from sys import argv,stdin,stdout,stderr,exit def usage(s=None): message = """ usage: create_script_insert_length_sparse [options] > insert_length_sparse.sh <sub>_<samp>_<type> (require...
gpl-3.0
gaddman/ansible
lib/ansible/modules/network/aci/aci_contract_subject_to_filter.py
2
9063
#!/usr/bin/python # -*- coding: utf-8 -*- # 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'], ...
gpl-3.0
alistair-broomhead/robotframework-selenium2library
test/lib/mockito/spying.py
70
1062
#!/usr/bin/env python # coding: utf-8 '''Spying on real objects.''' from invocation import RememberedProxyInvocation, VerifiableInvocation from mocking import TestDouble __author__ = "Serhiy Oplakanets <serhiy@oplakanets.com>" __copyright__ = "Copyright 2009-2010, Mockito Contributors" __license__ = "MIT" __maintain...
apache-2.0
michaelliao/learn-python3
samples/commonlib/use_urllib.py
20
2195
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from urllib import request, parse # get: with request.urlopen('https://api.douban.com/v2/book/2129650') as f: data = f.read() print('Status:', f.status, f.reason) for k, v in f.getheaders(): print('%s: %s' % (k, v)) print('Data:', data.decode('ut...
gpl-2.0
dongritengfei/phantomjs
src/qt/qtwebkit/Tools/QueueStatusServer/model/activeworkitems.py
140
3975
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
ritzk/ansible-modules-core
utilities/logic/fail.py
198
1458
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <dag@wieers.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
gpl-3.0
vivisect/synapse
synapse/tools/pushfile.py
1
1334
import os import sys import argparse import synapse.telepath as s_telepath import synapse.lib.output as s_output def getArgParser(): p = argparse.ArgumentParser() p.add_argument('cortex', help='telepath URL for a target cortex') p.add_argument('filenames', nargs='+', help='files to upload') p.add_arg...
apache-2.0
StefanRijnhart/odoomrp-wip
account_treasury_forecast/wizard/wiz_create_invoice.py
31
2577
# -*- encoding: utf-8 -*- ############################################################################## # # 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...
agpl-3.0
FedoraScientific/salome-paravis
src/PV_SWIG/paravis.py
1
3020
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library ...
lgpl-2.1
viktorradnai/screenwarp
utils/create_chessboard.py
1
2170
#!/usr/bin/python import cv2 import wand.image import wand.color import wand.drawing import sys import logging import argparse logger = logging.getLogger(__name__) def parse_cmdline(): parser = argparse.ArgumentParser(description=''' TODO: insert description.''' ) parser.add_argument('-v', '--ver...
gpl-3.0
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/IPython/utils/dir2.py
3
2232
# encoding: utf-8 """A fancy version of Python's builtin :func:`dir` function. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import inspect import types def safe_hasattr(obj, attr): """In recent versions of Python, hasattr() only catches AttributeError....
mit
Symphonia/Searcher
ImageView.py
1
4861
from PySide import QtGui, QtCore import sys, os class ImageView(QtGui.QWidget): def __init__(self,imagelist,parent = None): super(ImageView,self).__init__(parent) self.imagesize = None self.mode = '' self.imageList = imagelist[0] self.index = imagelist[1] self.title_label = QtGui.QLabel(self) self.image...
mit
hdinsight/hue
desktop/core/ext-py/lxml-3.4.4/src/lxml/html/tests/test_frames.py
20
1557
import unittest, sys from lxml.tests.common_imports import make_doctest, doctest import lxml.html from lxml.html import html_parser, XHTML_NAMESPACE class FrameTest(unittest.TestCase): def test_parse_fragments_fromstring(self): parser = lxml.html.HTMLParser(encoding='utf-8', remove_comments=True) ...
apache-2.0
Silmathoron/nest-simulator
pynest/examples/if_curve.py
5
5195
# -*- coding: utf-8 -*- # # if_curve.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 of the License, or # ...
gpl-2.0
Eficent/odoomrp-wip
stock_quant_valuation/tests/test_stock_quant_valuation.py
10
2798
# -*- coding: utf-8 -*- # (c) 2016 Ainara Galdona - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html import openerp.tests.common as common from openerp import fields class TestStockQuantValuation(common.TransactionCase): def setUp(self): super(TestStockQuantValuation, self).setU...
agpl-3.0
L3nzian/AutoPermit
ap_connections.py
1
7082
#import pyodbc import odbc import _winreg import ConfigParser config_file = 'AutoPermit.ini' def get_config_dict(config_file, section): """ Reads a config file :param config_file: a config file usable by ConfigParser :param section: a section in the config file :return: a dictionary section's en...
gpl-2.0
luoyetx/mxnet
example/ssd/tools/caffe_converter/compare_layers.py
54
14536
# 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...
apache-2.0
icgc-dcc/dcc-storage
docs/conf.py
1
5104
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # score documentation build configuration file, created by # sphinx-quickstart on Thu Sep 27 15:44:32 2018. # # 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 # auto...
gpl-3.0
mezz64/home-assistant
tests/components/august/test_config_flow.py
5
9572
"""Test the August config flow.""" from august.authenticator import ValidationResult from homeassistant import config_entries, setup from homeassistant.components.august.const import ( CONF_ACCESS_TOKEN_CACHE_FILE, CONF_INSTALL_ID, CONF_LOGIN_METHOD, DOMAIN, VERIFICATION_CODE_KEY, ) from homeassist...
apache-2.0
MingdaZhou/gnuradio
gr-wxgui/python/wxgui/const_window.py
58
6131
# # Copyright 2008 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 later version. # #...
gpl-3.0
manasapte/pants
src/python/pants/bin/remote_pants_runner.py
7
3179
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import signal import...
apache-2.0
darkleons/odoo
addons/account/account_move_line.py
9
78170
# -*- 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
fajoy/nova
nova/virt/baremetal/vif_driver.py
2
3058
# Copyright (c) 2012 NTT DOCOMO, 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 requ...
apache-2.0
Batterfii/django
tests/utils_tests/test_jslex.py
153
9837
# -*- coding: utf-8 -*- """Tests for jslex.""" # originally from https://bitbucket.org/ned/jslex from __future__ import unicode_literals from django.test import SimpleTestCase from django.utils.jslex import JsLexer, prepare_js_for_gettext class JsTokensTest(SimpleTestCase): LEX_CASES = [ # ids ("...
bsd-3-clause
ashang/calibre
src/calibre/gui2/tweak_book/editor/syntax/javascript.py
14
3917
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' import re from pygments.lexer import RegexLexer, default, include from pygm...
gpl-3.0
gartung/dxr
dxr/plugins/python/tests/test_imports/test_imports.py
9
2924
from dxr.testing import DxrInstanceTestCase class ImportTests(DxrInstanceTestCase): def test_bases_from_import(self): """Make sure the bases: filter matches base classes imported from another file using `from x import y`. """ self.found_line_eq('bases:child.FromImportChildClass', ...
mit
rogerhu/django
django/db/migrations/operations/models.py
5
9571
from .base import Operation from django.utils import six from django.db import models, router from django.db.models.options import normalize_unique_together from django.db.migrations.state import ModelState class CreateModel(Operation): """ Create a model's table. """ def __init__(self, name, fields,...
bsd-3-clause
cemoody/chainer
chainer/links/connection/lstm.py
2
2516
from chainer.functions.activation import lstm from chainer import link from chainer.links.connection import linear from chainer import variable class LSTM(link.Chain): """Fully-connected LSTM layer. This is a fully-connected LSTM layer as a chain. Unlike the :func:`~chainer.functions.lstm` function, whi...
mit
bwall/BAMF
IntegrationQueue/static/cifstrap.py
1
6896
import socket import time import struct import sys import threading import datetime def PrintLog(message): message = "[" + str(datetime.datetime.now()) + "] " + message print message f = open("hashlog.txt", "a") f.write(message + "\n") f.close() class Handler(threading.Thread): def __init__(...
mit
heistermann/wradvis
wradvis/gui.py
1
3615
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2016, wradlib Development Team. All Rights Reserved. # Distributed under the MIT License. See LICENSE.txt for more info. # -----------------------------------------------------------------------------...
mit
jeltz/rust-debian-package
src/llvm/tools/clang/utils/analyzer/SATestAdd.py
48
3075
#!/usr/bin/env python """ Static Analyzer qualification infrastructure: adding a new project to the Repository Directory. Add a new project for testing: build it and add to the Project Map file. Assumes it's being run from the Repository Directory. The project directory should be added inside the Repository D...
apache-2.0
grlee77/nipype
nipype/interfaces/utility.py
9
20150
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Various utilities Change directory to provide relative paths for doctests >>> import os >>> filepath = os.path.dirname( os.path.realpath( __file__ ) ) >>> datadir = os.path.realpath(os.path....
bsd-3-clause
psiwczak/openstack
nova/tests/api/openstack/compute/contrib/test_scheduler_hints.py
6
3228
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2011 OpenStack LLC. # 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...
apache-2.0
rabernat/xrft
setup.py
1
1391
import os import versioneer from setuptools import setup, find_packages PACKAGES = find_packages() DISTNAME = 'xrft' LICENSE = 'MIT' AUTHOR = 'xrft Developers' AUTHOR_EMAIL = 'takaya@ldeo.columbia.edu' URL = 'https://github.com/xgcm/xrft' CLASSIFIERS = [ 'Development Status :: 4 - Beta', 'License :: OSI Approv...
mit
SexualHealthInnovations/callisto-core
callisto_core/tests/notification/test_views.py
2
1698
from unittest import skip from unittest.mock import ANY, call, patch from callisto_core.reporting.views import ReportingConfirmationView from callisto_core.tests.test_base import ReportFlowHelper as ReportFlowTestCase from callisto_core.tests.utils.api import CustomNotificationApi @skip("disabled for 2019 summer mai...
agpl-3.0
lordB8r/polls
ENV/lib/python2.7/site-packages/django/contrib/sites/tests.py
94
2574
from __future__ import unicode_literals from django.conf import settings from django.contrib.sites.models import Site, RequestSite, get_current_site from django.core.exceptions import ObjectDoesNotExist from django.http import HttpRequest from django.test import TestCase from django.test.utils import override_settings...
mit
JshWright/home-assistant
homeassistant/components/http/auth.py
3
1964
"""Authentication for HTTP component.""" import asyncio import hmac import logging from homeassistant.const import HTTP_HEADER_HA_AUTH from .util import get_real_ip from .const import KEY_TRUSTED_NETWORKS, KEY_AUTHENTICATED DATA_API_PASSWORD = 'api_password' _LOGGER = logging.getLogger(__name__) @asyncio.coroutine...
apache-2.0
xlzdew/seleniumpr
py/selenium/webdriver/support/color.py
49
11161
#!/usr/bin/python # Copyright 2011 Software Freedom Conservancy. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
sertac/django
django/contrib/admin/options.py
126
81190
import copy import operator from collections import OrderedDict from functools import partial, reduce, update_wrapper from django import forms from django.conf import settings from django.contrib import messages from django.contrib.admin import helpers, widgets from django.contrib.admin.checks import ( BaseModelAd...
bsd-3-clause
ppriest/mame
3rdparty/bgfx/3rdparty/scintilla/scripts/ScintillaData.py
69
8599
# ScintillaData.py - implemented 2013 by Neil Hodgson neilh@scintilla.org # Released to the public domain. # Common code used by Scintilla and SciTE for source file regeneration. # The ScintillaData object exposes information about Scintilla as properties: # Version properties # version # versionDotted # v...
gpl-2.0
ijoewahjoedi/instant-press
modules/widgets.py
6
28658
# -*- coding: utf-8 -*- # # Instant Press. Instant sites. CMS developed in Web2py Framework # Site: http://www.instant2press.com # # Copyright (c) 2010 Mulone, Pablo Martín # # License Code: GPL, General Public License v. 2.0 # License Content: Creative Commons Attribution 3.0 # # Also visit: www.web2py.com # ...
gpl-2.0
umitproject/tease-o-matic
django/db/models/query_utils.py
240
5799
""" Various data structures used in query construction. Factored out from django.db.models.query to avoid making the main module very large and/or so that they can be used by other modules without getting into circular import difficulties. """ import weakref from django.utils.copycompat import deepcopy from django.d...
bsd-3-clause
chachan/nodeshot
nodeshot/community/participation/views.py
5
2627
from django.utils.translation import ugettext_lazy as _ from django.shortcuts import get_object_or_404 from django.contrib.auth import get_user_model User = get_user_model() from rest_framework import permissions, authentication, generics from rest_framework.response import Response from nodeshot.core.nodes.models im...
gpl-3.0