code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
"""SCons.Tool.rpm Tool-specific initialization for rpm. 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. The rpm tool calls the rpmbuild command. The first and only argument should a tar.gz consisting of the sourc...
rwatson/chromium-capsicum
third_party/scons/scons-local/SCons/Tool/rpm.py
Python
bsd-3-clause
4,432
"""Climate data and mass-balance computations""" # Built ins import logging import os import datetime import json import warnings # External libs import numpy as np import xarray as xr import netCDF4 import pandas as pd from scipy import stats from scipy import optimize # Optional libs try: import salem except Im...
TimoRoth/oggm
oggm/core/climate.py
Python
bsd-3-clause
67,323
"""SCons.Tool.gas Tool-specific initialization for as, the Gnu assembler. 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 The SCons Foun...
rwatson/chromium-capsicum
third_party/scons/scons-local/SCons/Tool/gas.py
Python
bsd-3-clause
1,780
import pytest from dask.hashing import hash_buffer, hash_buffer_hex, hashers np = pytest.importorskip("numpy") buffers = [ b"abc", bytearray(b"123"), memoryview(b"456"), np.array(42), np.ones((100, 100)), np.zeros((100, 100), dtype=[("a", "i4"), ("b", "i2")]), np.ones(10000, dtype=np.int8...
blaze/dask
dask/tests/test_hashing.py
Python
bsd-3-clause
1,059
import json from django.contrib.postgres import lookups from django.contrib.postgres.forms import SimpleArrayField from django.contrib.postgres.validators import ArrayMaxLengthValidator from django.core import checks, exceptions from django.db.models import Field, IntegerField, Transform from django.db.models.lookups ...
edmorley/django
django/contrib/postgres/fields/array.py
Python
bsd-3-clause
10,095
import six.moves.urllib.request from six.moves.urllib.error import URLError from mock import patch import warnings try: import embedly no_embedly = False except ImportError: no_embedly = True from django import template from django.test import TestCase from wagtail.tests.utils import WagtailTestUtils, u...
benemery/wagtail
wagtail/wagtailembeds/tests.py
Python
bsd-3-clause
12,330
""" sentry.conf.server ~~~~~~~~~~~~~~~~~~ These settings act as the default (base) settings for the Sentry-provided web-server :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django.conf.global_se...
TedaLIEz/sentry
src/sentry/conf/server.py
Python
bsd-3-clause
22,167
#!/usr/bin/env python # -*- coding: utf-8 -*- # Path hack. import sys, os sys.path.insert(0, os.path.abspath('..')) import sys import unittest from requests import async import envoy sys.path.append('.') from test_requests import httpbin, RequestsTestSuite, SERVICES class RequestsTestSuiteUsingAsyncApi(RequestsTe...
dvska/requesocks
tests/test_requests_async.py
Python
isc
1,253
# -*- coding: utf-8 -*- # $Id: fa.py 4564 2016-08-10 11:48:42Z # Author: Shahin <me@5hah.in> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated ...
lmregus/Portfolio
python/design_patterns/env/lib/python3.7/site-packages/docutils/parsers/rst/languages/fa.py
Python
mit
3,294
import numpy as np from pandasqt.compat import QtCore class SupportedDtypesTranslator(QtCore.QObject): """Represents all supported datatypes and the translations (i18n). """ def __init__(self, parent=None): """Constructs the object with the given parent. Args: parent (QtCore.Q...
nickos556/pandas-qt
pandasqt/models/SupportedDtypes.py
Python
mit
5,656
from CrateGlobals import * from otp.level import DistributedEntityAI from direct.directnotify import DirectNotifyGlobal class DistributedGridAI(DistributedEntityAI.DistributedEntityAI): notify = DirectNotifyGlobal.directNotify.newCategory('DistributedGridAI') def __init__(self, level, entId): self.ini...
Spiderlover/Toontown
toontown/coghq/DistributedGridAI.py
Python
mit
8,999
from pandac.PandaModules import ModelPool, TexturePool from direct.task.Task import Task from direct.directnotify import DirectNotifyGlobal from direct.fsm import ClassicFSM, State from toontown.hood import Place from toontown.toonbase.ToonBaseGlobal import * from toontown.town import TownBattle from toontown.suit impo...
ToonTownInfiniteRepo/ToontownInfinite
toontown/cogdominium/CogdoInterior.py
Python
mit
8,370
#!/usr/bin/env python3 # Copyright (c) 2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test getdescriptorinfo RPC. """ from test_framework.test_framework import BitcoinTestFramework from test_fr...
ElementsProject/elements
test/functional/rpc_getdescriptorinfo.py
Python
mit
5,655
# -*- coding: utf-8 -*- # # Copyright (C) 2016 Red Hat, Inc. # # Authors: # Thomas Woerner <twoerner@redhat.com> # # 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...
hos7ein/firewalld
src/firewall/core/helper.py
Python
gpl-2.0
804
import os import logging import string import hashlib from autotest.client.shared import utils, error from virttest import virsh from virttest.utils_test import libvirt as utlv from provider import libvirt_version def digest(path, offset, length): """ Read data from file with length bytes, begin at offset ...
rbian/tp-libvirt
libvirt/tests/src/virsh_cmd/volume/virsh_vol_download_upload.py
Python
gpl-2.0
8,821
import logging from virttest import ovirt def get_args_dict(params): args_dict = {} keys_list = ['ovirt_engine_url', 'ovirt_engine_user', 'ovirt_engine_password', 'vm_name', 'export_name', 'storage_name', 'cluster_name'] for key in keys_list: val = params.get(key...
PandaWei/tp-libvirt
v2v/tests/ovirt.py
Python
gpl-2.0
1,782
#!/usr/bin/env python # 2015 Copyright (C) White # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 2 of the License. # # This program is distributed in the hope that it will be useful, #...
thomashuang/white
white/controller/admin/user.py
Python
gpl-2.0
4,280
def meta_glue(ctx, text): action = ctx.new_action() action.glue = True action.text = text if ctx.last_action.glue: action.prev_attach = True return action
stanographer/plover
plover/meta/glue.py
Python
gpl-2.0
183
from resources.lib.handler.outputParameterHandler import cOutputParameterHandler from resources.lib.handler.inputParameterHandler import cInputParameterHandler from resources.lib.parser import cParser from resources.lib.handler.requestHandler import cRequestHandler from resources.lib.gui.guiElement import cGuiElement f...
mino60/venom-xbmc-addons-beta
plugin.video.vstream/resources/sites/trash/mtv_de.py
Python
gpl-2.0
9,259
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # 2008-2009 Stephane Charette <stephanecharette@gmail.com> # 2009 Gary Burton # 2011 Robert Cheramy <robert@cheramy.net> # Copyright (C) 2011 Tim G L Lyons # Co...
SNoiraud/gramps
gramps/gui/editors/editmediaref.py
Python
gpl-2.0
21,342
VERSION = (0, 7, 3)
public-ink/public-ink
server/appengine/lib/ua_parser/__init__.py
Python
gpl-3.0
20
""" Tests for kqueue wrapper. """ import socket import errno import time import select import sys import unittest from test import test_support if not hasattr(select, "kqueue"): raise unittest.SkipTest("test works only on BSD") class TestKQueue(unittest.TestCase): def test_create_queue(self): kq = sel...
HiSPARC/station-software
user/python/Lib/test/test_kqueue.py
Python
gpl-3.0
8,303
""" Custom-written pure powershell meterpreter/reverse_tcp stager. Module @harmj0y """ from modules.common import helpers class Payload: def __init__(self): # required options self.description = "pure windows/meterpreter/reverse_tcp stager, no shellcode" self.rating = "Excellent" ...
codercold/Veil-Evasion
modules/payloads/powershell/meterpreter/rev_tcp.py
Python
gpl-3.0
2,835
# see settingsDefinition.py import os import os.path from collections import namedtuple import rendermodes import util from optimizeimages import Optimizer from world import UPPER_LEFT, UPPER_RIGHT, LOWER_LEFT, LOWER_RIGHT import logging class ValidationException(Exception): pass class Setting(object): __slo...
Rutix/Minecraft-Overviewer
overviewer_core/settingsValidators.py
Python
gpl-3.0
15,826
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2013 Star2Billing S.L. # # The Initia...
garyjs/Newfiesautodialer
newfies/user_profile/forms.py
Python
mpl-2.0
2,197
# # Newfies-Dialer License # http://www.newfies-dialer.org # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2013 Star2Billing S.L. # # The Initia...
garyjs/Newfiesautodialer
lua/dial.py
Python
mpl-2.0
1,898
# 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): if raw_input("""Do you want to remove the table for survey.ExtraResponse? This was at some point added for the British sit...
sbfnk/epiwork-website
apps/survey/migrations/0010_auto__del_extraresponse.py
Python
agpl-3.0
12,336
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import random import re from odoo import api, fields, models, modules, _ class ImLivechatChannel(models.Model): """ Livechat Channel Define a communication channel, which can be accessed with ...
rven/odoo
addons/im_livechat/models/im_livechat_channel.py
Python
agpl-3.0
15,553
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """ Routines for printing columnar output. See ``colify()`` for more information. """ from __future__ import division, un...
LLNL/spack
lib/spack/llnl/util/tty/colify.py
Python
lgpl-2.1
8,336
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
tmerrick1/spack
lib/spack/spack/reporter.py
Python
lgpl-2.1
1,613
# Copyright 2013 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 appl...
phenoxim/cinder
cinder/tests/unit/backup/drivers/test_backup_tsm.py
Python
apache-2.0
12,859
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
JioCloud/python-ceilometerclient
ceilometerclient/v1/__init__.py
Python
apache-2.0
692
# Copyright 2015: 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 License at # # http://www.apache.org/licenses/LICENSE-...
aplanas/rally
rally/plugins/openstack/scenarios/nova/keypairs.py
Python
apache-2.0
3,041
from social.exceptions import AuthAlreadyAssociated, AuthException, \ AuthForbidden from django.http.response import HttpResponseRedirect from django.core.urlresolvers import reverse def social_details(strategy, response, *args, **kwargs): return {'details': strategy.backend.get_user...
gquirozbogner/contentbox-master
third_party/social/pipeline/social_auth.py
Python
apache-2.0
3,474
# Copyright (c) 2016 Luis Escobar <lescobar@vauxoo.com> # Copyright (c) 2016 Claudiu Popa <pcmanticore@gmail.com> # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html # For details: https://github.com/PyCQA/pylint/blob/master/COPYING import linecache from pylint import checkers from pylin...
arju88nair/projectCulminate
venv/lib/python3.5/site-packages/pylint/extensions/docstyle.py
Python
apache-2.0
2,687
import unittest from AppiumLibrary.utils import ApplicationCache class ApplicationCacheTests(unittest.TestCase): import six if six.PY2: assertRegex = unittest.TestCase.assertRegexpMatches assertRaisesRegex = unittest.TestCase.assertRaisesRegexp def test_no_current_message(self): ...
serhatbolsu/robotframework-appiumlibrary
tests/utils/test_applicationcache.py
Python
apache-2.0
462
from vt_manager.communication.sfa.rspecs.elements.element import Element class NetworkInterface(Element): fields = ['from_server_id', 'from_server_name' 'from_server_interface_id', 'from_server_interface_name', 'to_netwrk_interface_name', 'to_network_interface_id', ...
dana-i2cat/felix
vt_manager/src/python/vt_manager/communication/sfa/rspecs/elements/network_interface.py
Python
apache-2.0
489
from invoke.tasks import task from invoke.runner import run @task def simple(): run("false") @task(positional=['pos']) def missing_pos(pos): pass
alex/invoke
tests/_support/fail.py
Python
bsd-2-clause
156
# -*- coding: utf-8 -*- # # Tastypie documentation build configuration file, created by # sphinx-quickstart on Sat May 22 21:44:34 2010. # # 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. # # Al...
frifri/django-tastypie
docs/conf.py
Python
bsd-3-clause
6,702
# # Copyright (c) 2012-2016 The ANTLR Project. All rights reserved. # Use of this file is governed by the BSD 3-clause license that # can be found in the LICENSE.txt file in the project root. #/ # Map a predicate to a predicted alternative.#/ from io import StringIO from antlr4.atn.ATNConfigSet import ATNConfigSet fro...
Pursuit92/antlr4
runtime/Python3/src/antlr4/dfa/DFAState.py
Python
bsd-3-clause
5,385
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2011 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://babel.edgewall.org/wiki/License. # # This software consists...
sharoonthomas/babel
babel/tests/support.py
Python
bsd-3-clause
11,110
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import unittest from nltk.corpus import (sinica_treebank, conll2007, indian, cess_cat, cess_esp, floresta, ptb, udhr) from nltk.tree import Tree from .utils import skipIf class TestUdhr(unittest.TestCase): d...
bbengfort/TextBlob
textblob/nltk/test/unit/test_corpora.py
Python
mit
5,996
# example.py # # Remove duplicate entries from a sequence while keeping order def dedupe(items): seen = set() for item in items: if item not in seen: yield item seen.add(item) if __name__ == '__main__': a = [1, 5, 2, 1, 9, 1, 5, 10] print(a) print(list(dedupe(a)))
tuanavu/python-cookbook-3rd
src/1/removing_duplicates_from_a_sequence_while_maintaining_order/example.py
Python
mit
319
import modules.klasses k = modules.klasses.klass() k.sayhello() modules.klasses.klass.sayhello()
buchuki/pyjaco
tests/modules/import_class.py
Python
mit
102
# -*- coding: utf-8 -*- """ Kay appcfg management command. :Copyright: (c) 2009 Accense Technology, Inc. Takashi Matsuo <tmatsuo@candit.jp>, All rights reserved. :license: BSD, see LICENSE for more details. """ import os import sys import logging from os import listdir, pat...
yosukesuzuki/kay-template
project/kay/management/appcfg.py
Python
mit
1,819
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, publish, ...
timj/scons
test/Java/swig-dependencies.py
Python
mit
3,702
from SeleniumWrapper import SeleniumWrapper as wrapper locators = { "sign in link": "id=M_M_M_H_H_hlkLogIn" } class HomePage(object): def open_english_home_page(self): se = wrapper().connection se.open("/Common/HomePage.aspx?lang=EN") se.wait_for_page_to_load("20000") def navigate...
atinfo/at.info-knowledge-base
functional test automation/robotframework/Simple Hybrid (Python + Robotframework) Page Object Example/Modules/PageObjects/homepage.py
Python
mit
462
''' Created on Jun 1, 2016 @author: thiedze '''
Thiedze/CWBierzapfanlage
StateMachine/__init__.py
Python
gpl-2.0
49
from update import Update from hashlib import sha1 import zipfile, os from bz2 import BZ2File def test_exists(env): for manifest in env.get_manifestPaths(): assert os.path.exists(manifest) for z in env.get_zipPaths(): assert os.path.exists(z) def test_parse_manifest(env): for manifest in env.get_manife...
RasPlex/OpenPHT
plex/Update-Installer/manifest-tools/test_manifest.py
Python
gpl-2.0
1,133
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Andrew Dunham <andrew@du.nham.ca> # (c) 2013, Daniel Jaouen <dcj24@cornell.edu> # (c) 2015, Indrajit Raychaudhuri <irc+code@indrajit.com> # # Based on macports (Jimmy Tang <jcftang@gmail.com>) # # This module is free software: you can redistribute it and/or modify ...
Tatsh-ansible/ansible
lib/ansible/modules/packaging/os/homebrew.py
Python
gpl-3.0
28,285
HIT_RATE_TIME_INTERVAL = 7 * 24 * 3600 # one week, in seconds MIN_RATING_VALUE = 1 MAX_RATING_VALUE = 5 NEUTRAL_RATING_VALUE = 3 from ZODBStorage import ZODBStorage STORAGE_CLASS = ZODBStorage STORAGE_ARGS = {} PROJECTNAME = "ATRatings" SKINS_DIR = 'skins' GLOBALS = globals() CLEAR_REFS_ON_UNIN...
erikriver/eduIntelligent-cynin
products/ATRatings/config.py
Python
gpl-3.0
331
from __future__ import unicode_literals import frappe def execute(): frappe.reload_doc("manufacturing", "doctype", "workstation") frappe.db.sql(""" UPDATE `tabWorkstation` SET production_capacity = 1 """)
StrellaGroup/erpnext
erpnext/patches/v12_0/set_production_capacity_in_workstation.py
Python
gpl-3.0
222
from bears.julia.JuliaLintBear import JuliaLintBear from tests.LocalBearTestHelper import verify_local_bear good_file = """ a = 2 println(2) """ bad_file = """ println(hello) """ JuliaLintBearTest = verify_local_bear(JuliaLintBear, valid_files=(good_file,), ...
chriscoyfish/coala-bears
tests/julia/JuliaLintBearTest.py
Python
agpl-3.0
487
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from math import log10 from odoo.tests.common import TransactionCase from odoo.tools import float_compare, float_is_zero, float_repr, float_round, float_split, float_split_str class TestFloatPrecision(TransactionCase)...
rven/odoo
odoo/addons/base/tests/test_float.py
Python
agpl-3.0
11,756
# -*- 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 from frappe.utils import date_diff, add_days, getdate from...
gsnbng/erpnext
erpnext/hr/doctype/attendance_request/attendance_request.py
Python
agpl-3.0
2,651
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
krafczyk/spack
var/spack/repos/builtin/packages/mummer/package.py
Python
lgpl-2.1
2,999
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
EmreAtes/spack
var/spack/repos/builtin/packages/ufo-core/package.py
Python
lgpl-2.1
1,766
# This file is part of cclib (http://cclib.github.io), a library for parsing # and interpreting the results of computational chemistry packages. # # Copyright (C) 2014,2015, the cclib development team # # The library is free software, distributed under the terms of # the GNU Lesser General Public version 2.1 or later. ...
ghutchis/cclib
test/method/testnuclear.py
Python
lgpl-2.1
1,500
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 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 License at # # ...
jessicalucci/NovaOrc
nova/virt/baremetal/virtual_power_driver_settings.py
Python
apache-2.0
2,110
# Copyright 2013 Embrane, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
virtualopensystems/neutron
neutron/tests/unit/embrane/test_embrane_neutron_plugin.py
Python
apache-2.0
2,875
# # 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...
mbroadst/debian-qpid-python
qpid/connection.py
Python
apache-2.0
6,996
# coding:utf-8 """ Utility functions and classes used by flanker. """ import logging import re import cchardet import chardet from flanker.mime.message import errors from functools import wraps log = logging.getLogger(__name__) def _guess_and_convert(value): """ Try to guess the encoding of the passed val...
glyph/flanker
flanker/utils.py
Python
apache-2.0
3,543
"""Support for IntesisHome and airconwithme Smart AC Controllers.""" import logging from random import randrange from pyintesishome import IHAuthenticationError, IHConnectionError, IntesisHome import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateEntity from homeassistant.compo...
tchellomello/home-assistant
homeassistant/components/intesishome/climate.py
Python
apache-2.0
15,992
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2011 Cisco Systems, 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...
FreescaleSemiconductor/quantum
quantum/plugins/cisco/ucs/cisco_getvif.py
Python
apache-2.0
2,026
from streamlink.plugins.radionet import RadioNet from tests.plugins import PluginCanHandleUrl class TestPluginCanHandleUrlRadioNet(PluginCanHandleUrl): __plugin__ = RadioNet should_match = [ "http://radioparadise.radio.net/", "http://oe1.radio.at/", "http://deutschlandfunk.radio.de/",...
amurzeau/streamlink-debian
tests/plugins/test_radionet.py
Python
bsd-2-clause
709
""" Defines the Sumatra version control interface for Bazaar. Classes ------- BazaarWorkingCopy BazaarRepository :copyright: Copyright 2006-2015 by the Sumatra team, see doc/authors.txt :license: BSD 2-clause, see LICENSE for details. """ from __future__ import absolute_import from __future__ import unicode_literal...
dpad/sumatra
sumatra/versioncontrol/_bazaar.py
Python
bsd-2-clause
4,380
from __future__ import print_function import numpy import numba.unittest_support as unittest from numba.ctypes_support import * from numba import _helperlib class ArrayStruct3D(Structure): # Mimick the structure defined in numba.targets.arrayobj's make_array() _fields_ = [ ("meminfo", c_void_p), ...
pombredanne/numba
numba/tests/test_numpyadapt.py
Python
bsd-2-clause
1,383
from django import forms from django.http import HttpResponse from django.templatetags.static import static import wagtail.admin.rich_text.editors.draftail.features as draftail_features from wagtail.admin.action_menu import ActionMenuItem from wagtail.admin.menu import MenuItem from wagtail.admin.rich_text import Hall...
mikedingjan/wagtail
wagtail/tests/testapp/wagtail_hooks.py
Python
bsd-3-clause
5,100
import os from mongoengine import Document, StringField, ListField from mongoengine import BooleanField, IntField from crits.core.crits_mongoengine import CritsDocument class CRITsConfig(CritsDocument, Document): """ CRITs Configuration Class. """ from django.conf import settings meta = { ...
kaoscoach/crits
crits/config/config.py
Python
mit
3,260
from mpl_toolkits.basemap import Basemap import numpy as np import matplotlib.pyplot as plt # lon_0 is central longitude of projection. # resolution = 'c' means use crude resolution coastlines. m = Basemap(projection='eck4',lon_0=0,resolution='c') m.drawcoastlines() m.fillcontinents(color='coral',lake_color='aqua') # d...
matplotlib/basemap
packages/basemap/doc/users/figures/eck4.py
Python
mit
514
#!/usr/bin/env python import sys, os, time, platform def main(): if len(sys.argv) != 2: print "Please enter the number of AVDs you want to launch" print "Usage: " + sys.argv[0] + " <number of AVDs>" return head = "emulator" tail = "&" if platform.system() == "Windows": head = "start /B emulat...
asarraf/SimpleDHT
Test Scripts/run_avd.py
Python
mit
517
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Responses/LevelUpRewardsResponse.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message f...
CaptorOfSin/pogom
pogom/pgoapi/protos/POGOProtos/Networking/Responses/LevelUpRewardsResponse_pb2.py
Python
mit
5,030
#!/usr/bin/env python from __future__ import print_function import json import fileinput for line in fileinput.input(): tweet = json.loads(line) if 'media' in tweet['entities']: for media in tweet['entities']['media']: print(media['media_url'])
miku/twarc
utils/embeds.py
Python
cc0-1.0
275
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers def register_types(module): root_module = module.get_root() ## bridge-helper.h: ns3::BridgeHelper [class] module.add_class('BridgeHelper') ## bridge-channel.h: ns3::BridgeChannel [class] module.add_class('BridgeC...
joelagnel/ns-3
bindings/python/apidefs/gcc-LP64/ns3_module_bridge.py
Python
gpl-2.0
18,249
## # Copyright 2015 Bart Oldeman # # This file is triple-licensed under GPLv2 (see below), MIT, and # BSD three-clause licenses. # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish ...
hpcugent/easybuild-framework
easybuild/toolchains/pgi.py
Python
gpl-2.0
1,792
#!/usr/bin/env python # # Copyright 2012,2013,2015 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 ...
bastibl/gnuradio
gr-qtgui/examples/pyqt_time_raster_b.py
Python
gpl-3.0
2,845
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from bedrock.mozorg.util import page urlpatterns = ( page('', 'persona/persona.html'), page('about', 'persona/a...
l-hedgehog/bedrock
bedrock/persona/urls.py
Python
mpl-2.0
457
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe from frappe.utils import today from erpnext.hr.doctype.employee.employee import make_salary_structure from erpnext.hr.doct...
aruizramon/alec_erpnext
erpnext/hr/doctype/salary_slip/test_salary_slip.py
Python
agpl-3.0
5,413
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyAngel(PythonPackage): """ANGEL: Robust Open Reading Frame prediction""" homepage = ...
LLNL/spack
var/spack/repos/builtin/packages/py-angel/package.py
Python
lgpl-2.1
857
""" A module collecting functions for operating on versions. """ def is_version_ge(version_components, comparand_components): """Tests if a version number is greater than, or equal to another version number. Both version numbers are specified as lists of version components. None is trated as an unknown version...
google/earthenterprise
earth_enterprise/src/lib/python/opengee/version.py
Python
apache-2.0
791
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
lvdongr/spark
python/pyspark/streaming/tests.py
Python
apache-2.0
63,774
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
lukecwik/incubator-beam
sdks/python/apache_beam/runners/portability/fn_api_runner/visualization_tools.py
Python
apache-2.0
3,918
# 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/...
xchenum/quantum-bug
quantum/tests/unit/extensions/foxinsocks.py
Python
apache-2.0
3,690
"""Switcher integration helpers functions.""" from __future__ import annotations import asyncio from collections.abc import Callable import logging from typing import Any from aioswitcher.bridge import SwitcherBase, SwitcherBridge from homeassistant.core import HomeAssistant, callback from .const import DATA_BRIDGE...
jawilson/home-assistant
homeassistant/components/switcher_kis/utils.py
Python
apache-2.0
1,692
# Copyright 2012 Red Hat, 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 writing...
atheendra/access_keys
keystone/contrib/user_crud/core.py
Python
apache-2.0
3,570
import hashlib import logging from django.db.backends.utils import truncate_name from django.db.transaction import atomic from django.utils import six from django.utils.encoding import force_bytes logger = logging.getLogger('django.db.backends.schema') def _related_non_m2m_objects(opts): # filters out m2m objec...
weiawe/django
django/db/backends/base/schema.py
Python
bsd-3-clause
43,028
# 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 json import logging import os import re import shutil import tempfile from telemetry import page as page_module from telemetry.util import cloud_stor...
sgraham/nope
tools/telemetry/telemetry/wpr/archive_info.py
Python
bsd-3-clause
8,966
# encoding: utf-8 # # Copyright (c) 2014 Dean Jackson <deanishe@deanishe.net> # # MIT Licence. See http://opensource.org/licenses/MIT # # Created on 2014-02-15 # """The :class:`Workflow` object is the main interface to this library. :class:`Workflow` is targeted at Alfred 2. Use :class:`~workflow.Workflow3` if you wa...
Skoda091/alfred-deepl
workflow/workflow.py
Python
mit
98,625
from numerical_integration import integrate from math import sin, log, exp if __name__ == "__main__": print (integrate(sin, 0, 1, 0.001)) print (integrate(log, 1, 2 ,0.001)) print (integrate(exp, -1, 1, 0.001))
manikTharaka/al-go-rithms
math/numerical_integration/python/test.py
Python
mit
217
from __future__ import unicode_literals try: import pymysql pymysql.install_as_MySQLdb() except ImportError: pass
birkin/ts_reporting_project
config/__init__.py
Python
mit
127
# -*- coding: utf-8 -*- ''' Exodus Add-on Copyright (C) 2016 Exodus 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 l...
repotvsupertuga/repo
script.module.stream.tvsupertuga.addon/resources/lib/sources/en/phdmovies.py
Python
gpl-2.0
6,565
# Author: illuz <iilluzen[at]gmail.com> # File: AC_dict_nlogn.py # Create Date: 2015-02-01 23:03:27 # Descripton: Using dict class Solution: # @return a tuple, (index1, index2) def twoSum(self, num, target): dictMap = {} for index, value in enumerate(num): if target - v...
daniyuu/leetcode
solutions/001.Two_Sum/AC_dict_nlogn.py
Python
gpl-2.0
492
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2015, René Moser <mail@renemoser.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 Lice...
Feverup/ansible-modules-extras
network/ipify_facts.py
Python
gpl-3.0
2,591
# flake8: noqa from .networks import * from .ips import * from .servers import * from .utils_tests import * from .rapi_pool_tests import * from .reconciliation import * from .callbacks import *
apyrgio/synnefo
snf-cyclades-app/synnefo/logic/tests/__init__.py
Python
gpl-3.0
194
"""Tools for managing evaluation contexts. """ from sympy.utilities.iterables import dict_merge __known_options__ = set(['frac', 'gens', 'wrt', 'sort', 'order', 'domain', 'modulus', 'gaussian', 'extension', 'field', 'greedy', 'symmetric']) __global_options__ = [] __template__ = """\ def %(option)s(_%(option)s):...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/sympy/polys/polycontext.py
Python
agpl-3.0
1,828
"""Support for Russound multizone controllers using RIO Protocol.""" import logging import voluptuous as vol from homeassistant.components.media_player import ( MediaPlayerDevice, PLATFORM_SCHEMA) from homeassistant.components.media_player.const import ( MEDIA_TYPE_MUSIC, SUPPORT_SELECT_SOURCE, SUPPORT_TURN_O...
MartinHjelmare/home-assistant
homeassistant/components/russound_rio/media_player.py
Python
apache-2.0
6,171
# Copyright 2013-2015 DataStax, 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 writi...
bbirand/python-driver
tests/unit/io/eventlet_utils.py
Python
apache-2.0
1,071
from datetime import datetime, timedelta import datetime as pydt import numpy as np from dateutil.relativedelta import relativedelta import matplotlib.units as units import matplotlib.dates as dates from matplotlib.ticker import Formatter, AutoLocator, Locator from matplotlib.transforms import nonsingular from pan...
andyraib/data-storage
python_scripts/env/lib/python3.6/site-packages/pandas/tseries/converter.py
Python
apache-2.0
33,618
# coding=utf-8 ############################################################################### ## ## Copyright 2011 Tavendo GmbH ## ## 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 ...
frivoal/presto-testo
wpt/websockets/autobahn/oberstet-Autobahn-643d2ee/lib/python/autobahn/case/case6_4_2.py
Python
bsd-3-clause
2,587
from __future__ import print_function from operator import itemgetter from heapq import nlargest from itertools import repeat, ifilter class Counter(dict): '''Dict subclass for counting hashable objects. Sometimes called a bag or multiset. Elements are stored as dictionary keys and their counts are store...
jinstrive/mycli
mycli/packages/counter.py
Python
bsd-3-clause
6,315