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
"""Common IO api utilities""" import sys import os import zipfile from contextlib import contextmanager, closing from pandas.compat import StringIO, string_types, BytesIO from pandas import compat if compat.PY3: from urllib.request import urlopen, pathname2url _urlopen = urlopen from urllib.parse import...
bdh1011/wau
venv/lib/python2.7/site-packages/pandas/io/common.py
Python
mit
4,935
from views import * from lookups import * import requests import re from utils import * import itertools from config import config if config.IMPORT_PYSAM_PRIMER3: import pysam import csv #hpo lookup import random from flask import Response, request import os from werkzeug.datastructures import Headers import re @a...
logust79/phenopolis
views/igv.py
Python
mit
3,126
""" Meager code path measurement tool. Ned Batchelder http://nedbatchelder.com/blog/200803/python_code_complexity_microtool.html MIT License. """ try: from compiler import parse # NOQA iter_child_nodes = None # NOQA except ImportError: from ast import parse, iter_child_nodes # N...
gaqzi/flake8
flake8/mccabe.py
Python
mit
8,485
# # Copyright (c) 2013 Big Switch Networks, Inc. # # Licensed under the Eclipse Public License, Version 1.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.eclipse.org/legal/epl-v10.html # # Unless required by applicable l...
opennetworkinglab/spring-open-cli
sdncon/rest/models.py
Python
epl-1.0
944
""" Contains the manager class and exceptions for operations surrounding the creation, update, and deletion on a Pulp user. """ from gettext import gettext as _ import re from celery import task from pulp.server import config from pulp.server.async.tasks import Task from pulp.server.db.model.auth import User from pu...
rbramwell/pulp
server/pulp/server/managers/auth/user/cud.py
Python
gpl-2.0
7,971
import unittest class PEP3131Test(unittest.TestCase): def test_valid(self): class T: ä = 1 µ = 2 # this is a compatibility character 蟒 = 3 x󠄀 = 4 self.assertEqual(getattr(T, "\xe4"), 1) self.assertEqual(getattr(T, "\u03bc"), 2) self....
FFMG/myoddweb.piger
monitor/api/python/Python-3.7.2/Lib/test/test_unicode_identifiers.py
Python
gpl-2.0
891
#!/usr/bin/python3 # requirements: partition /dev/sdc1 with size at least 1 GiB from sys import exit from storage import * from storageitu import * set_logger(get_logfile_logger()) environment = Environment(False) storage = Storage(environment) storage.probe() staging = storage.get_staging() print(staging) pa...
aschnell/libstorage-ng
integration-tests/partitions/shrink.py
Python
gpl-2.0
645
from autotest.client.shared import error from virttest import virsh from virttest import libvirt_xml from virttest import utils_libvirtd def run(test, params, env): """ Test command: virsh domblkstat. The command get device block stats for a running domain. 1.Prepare test environment. 2.When the...
waynesun09/tp-libvirt
libvirt/tests/src/virsh_cmd/monitor/virsh_domblkstat.py
Python
gpl-2.0
2,304
""" "Safe weakrefs", originally from pyDispatcher. Provides a way to safely weakref any function, including bound methods (which aren't handled by the core weakref module). """ import traceback import weakref 弱引用 def safeRef(target, onDelete = None): """Return a *safe* weak reference to a callable target ta...
Anlim/decode-Django
Django-1.5.1/django/dispatch/saferef.py
Python
gpl-2.0
10,971
from Screen import Screen from Screens.MessageBox import MessageBox from Components.MenuList import MenuList from Components.ActionMap import ActionMap from Components.Sources.StreamService import StreamServiceList from Components.Sources.StaticText import StaticText from Components.Label import Label from enigma impor...
fairbird/OpenPLI-TSimage
lib/python/Screens/StreamingClientsInfo.py
Python
gpl-2.0
4,194
# $HeadURL$ __RCSID__ = "$Id$" # # VM_WEB_OPERATION = "VmWebOperation" # VM_RPC_OPERATION = "VmRpcOperation" #............................................................................... #EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF#EOF
xianghuzhao/VMDIRAC
VMDIRAC/Security/VmProperties.py
Python
gpl-3.0
268
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.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 option) any lat...
qvicksilver/ansible
lib/ansible/utils/plugins.py
Python
gpl-3.0
8,792
#!/usr/bin/python # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin <mst@redhat.com> # # This file may be distributed under the terms of the GNU GPLv3 license. # Process mixed ASL/AML listing (.lst file) produced by iasl -l # Locate and execute ACPI_EXTRACT directives, output offset info # # Documentation of ACP...
jibaron/q35-seabios
tools/acpi_extract.py
Python
gpl-3.0
11,577
# -*- coding: utf-8 -*- # Description: litespeed netdata python.d module # Author: Ilya Mashchenko (ilyam8) # SPDX-License-Identifier: GPL-3.0-or-later import glob import os import re from collections import namedtuple from bases.FrameworkServices.SimpleService import SimpleService update_every = 10 # charts order ...
3cky/netdata
collectors/python.d.plugin/litespeed/litespeed.chart.py
Python
gpl-3.0
5,647
""" Algorithms for asteroidal triples and asteroidal numbers in graphs. An asteroidal triple in a graph G is a set of three non-adjacent vertices u, v and w such that there exist a path between any two of them that avoids closed neighborhood of the third. More formally, v_j, v_k belongs to the same connected component...
SpaceGroupUCL/qgisSpaceSyntaxToolkit
esstoolkit/external/networkx/algorithms/asteroidal.py
Python
gpl-3.0
5,811
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
orgito/ansible
lib/ansible/modules/cloud/google/gcp_compute_health_check.py
Python
gpl-3.0
30,735
# -*- coding: utf-8 -*- # # 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-2014 Star2Bil...
gale320/newfies-dialer
newfies/apirest/view_contenttype.py
Python
mpl-2.0
1,134
# 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 selenium.webdriver.common.by import By from pages.base import BasePage class InternetHealthPage(BasePage): ...
CSCI-462-01-2017/bedrock
tests/pages/internet_health.py
Python
mpl-2.0
732
import os from collections import deque from six import string_types, text_type from six.moves.urllib.parse import urljoin from .wptmanifest.backends import static from .wptmanifest.backends.base import ManifestItem from . import expected """Manifest structure used to store expected results of a test. Each manifes...
asajeffrey/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestexpected.py
Python
mpl-2.0
15,420
# -*- coding: utf-8 -*- # (c) 2016 Alfredo de la Fuente - AvanzOSC # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, fields, api, _ import openerp.addons.decimal_precision as dp class StockInformation(models.Model): _inherit = 'stock.information' @api.multi def ...
agaldona/odoo-addons
stock_information_mrp_procurement_plan/models/stock_information.py
Python
agpl-3.0
8,497
# -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob 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 License, or # (at your op...
franek/weboob
modules/attilasub/__init__.py
Python
agpl-3.0
802
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import os ...
nistormihai/superdesk-core
tests/io/feed_parsers/dpa_test.py
Python
agpl-3.0
2,118
from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class JournalApphook(CMSApp): name = _("Journal") urls = ["apps.journal.urls"] apphook_pool.register(JournalApphook)
sbfnk/epiwork-website
apps/journal/cms_app.py
Python
agpl-3.0
259
# -*- coding: utf-8 -*- # Copyright(C) 2013 franek # # This file is part of weboob. # # weboob 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 License, or # (at your option...
blckshrk/Weboob
modules/arretsurimages/__init__.py
Python
agpl-3.0
810
############################################################################## # 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...
matthiasdiener/spack
var/spack/repos/builtin/packages/parallel-netcdf/package.py
Python
lgpl-2.1
3,279
import numpy as np def softmax(x): xt = np.exp(x - np.max(x)) return xt / np.sum(xt) def save_model_parameters_theano(outfile, model): U, V, W = model.U.get_value(), model.V.get_value(), model.W.get_value() np.savez(outfile, U=U, V=V, W=W) print "Saved model parameters to %s." % outfile def lo...
nilver/MiniProyecto
utils.py
Python
apache-2.0
693
# Copyright (c) 2015 The Johns Hopkins University/Applied Physics Laboratory # 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/LICEN...
viktorTarasov/PyKMIP
kmip/tests/unit/core/misc/test_server_information.py
Python
apache-2.0
7,934
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('modeling', '0003_auto_20150526_1700') ] operations = [ migrations.RenameField( model_name='district', ...
lliss/model-my-watershed
src/mmw/apps/modeling/migrations/0004_auto_20150529_1700.py
Python
apache-2.0
388
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
ivannotes/luigi
test/import_test.py
Python
apache-2.0
2,285
#!/usr/bin/env python """Loads up all flow tests.""" # pylint: disable=unused-import # These import populate the Flow test registry from grr.lib.flows.console import debugging_test # Cron tests. from grr.lib.flows.cron import compactors_test from grr.lib.flows.cron import filestore_stats_test from grr.lib.flows.cron ...
ksmaheshkumar/grr
lib/flows/tests.py
Python
apache-2.0
1,413
from argparse import ArgumentParser from typing import Any from zerver.lib.initial_password import initial_password from zerver.lib.management import ZulipBaseCommand from zerver.lib.users import get_api_key class Command(ZulipBaseCommand): help = "Print the initial password and API key for accounts as created b...
brainwane/zulip
zilencer/management/commands/print_initial_password.py
Python
apache-2.0
1,088
# # Copyright (c) 2004 Conectiva, Inc. # # Written by Gustavo Niemeyer <niemeyer@conectiva.com> # # This file is part of Smart Package Manager. # # Smart Package Manager 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 Fou...
blackPantherOS/packagemanagement
smartpm/smart/backends/deb/__init__.py
Python
apache-2.0
1,061
# # 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...
Acehaidrey/incubator-airflow
airflow/providers/jdbc/hooks/jdbc.py
Python
apache-2.0
3,656
# 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 by applicable law or a...
lukas-krecan/tensorflow
tensorflow/python/__init__.py
Python
apache-2.0
3,483
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
wojciechtanski/robotframework
src/robot/conf/settings.py
Python
apache-2.0
20,981
"""Daemonize the current process.""" # ============================================================================= # CONTENTS # ----------------------------------------------------------------------------- # phlsys_daemonize # # Public Functions: # do # # ------------------------------------------------------------...
kjedruczyk/phabricator-tools
py/phl/phlsys_daemonize.py
Python
apache-2.0
4,136
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests that all containers are imported correctly.""" import unittest from tests import test_lib class ContainersImportTest(test_lib.ImportCheckTestCase): """Tests that container classes are imported correctly.""" _IGNORABLE_FILES = frozenset(['manager.py', 'int...
kiddinn/plaso
tests/containers/init_imports.py
Python
apache-2.0
558
# Copyright (c) 2016-present, Facebook, 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...
davinwang/caffe2
caffe2/python/rnn/lstm_comparison.py
Python
apache-2.0
2,920
"""Mayavi/traits GUI for converting data from KIT systems.""" # Authors: Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD (3-clause) from collections import Counter import os import sys from warnings import warn import numpy as np from scipy.linalg import inv from threading import Thread from ..exter...
teonlamont/mne-python
mne/gui/_kit2fiff_gui.py
Python
bsd-3-clause
28,774
from __future__ import absolute_import, division, print_function import pytest pytest.importorskip('numpy') import dask.array as da from dask.utils import ignoring from dask.array.reductions import arg_aggregate import numpy as np def eq(a, b): if isinstance(a, da.Array): a = a.compute() if isinstan...
simudream/dask
dask/array/tests/test_reductions.py
Python
bsd-3-clause
8,980
## @file # This file is used to create a database used by ECC tool # # Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR> # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. Th...
intel/ipmctl
BaseTools/Source/Python/Ecc/Database.py
Python
bsd-3-clause
14,225
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2011-2015, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted prov...
lucienfostier/gaffer
python/GafferTest/__init__.py
Python
bsd-3-clause
6,984
# -*- test-case-name: twisted.test.test_reflect -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Standardized versions of various cool and/or strange things that you can do with Python's reflection capabilities. """ import sys import types import pickle import weakref import re import w...
yasoob/PythonRSSReader
venv/lib/python2.7/dist-packages/twisted/python/reflect.py
Python
mit
9,518
# -*- coding: utf-8 -*- # Copyright (C) 2006-2008 Søren Roug, European Environment Agency # # 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 you...
171121130/SWI
venv/Lib/site-packages/odf/odf2moinmoin.py
Python
mit
18,198
# -*- encoding:utf-8 -*- from __future__ import unicode_literals MESSAGES = { "%d min remaining to read": "%d dakikalık okuma", "(active)": "", "Also available in:": "Şu dilde de mevcut:", "Archive": "Arşiv", "Authors": "", "Categories": "Kategoriler", "Comments": "Yorumlar", "LANGUAGE"...
s2hc-johan/nikola
nikola/data/themes/base/messages/messages_tr.py
Python
mit
1,558
# -*- coding: utf-8 -*- # Module: NetflixSession # Author: asciidisco # Created on: 11.10.2017 # License: MIT https://goo.gl/5bMj3H """Tests for the `NetflixSession` module""" import unittest import mock from resources.lib.NetflixSession import NetflixSession class NetflixSessionTestCase(unittest.TestCase): pass...
asciidisco/plugin.video.netflix
resources/test/test_NetflixSession.py
Python
mit
321
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # 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 = {'status': ['preview'], ...
tszym/ansible
lib/ansible/modules/network/netscaler/netscaler_gslb_site.py
Python
gpl-3.0
14,153
# This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
kenorb-contrib/BitTorrent
python_bt_codebase_library/BTL/cpu_meter.py
Python
gpl-3.0
4,972
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 Softwa...
Kingdread/qutebrowser
qutebrowser/browser/tabhistory.py
Python
gpl-3.0
5,900
from config import configs from onelove import create_app config = configs['development'] app = create_app(config)
one-love/api
devel.py
Python
gpl-3.0
116
def isCEF(aDict): # determine if this is a CEF event # could be an event posted to the /cef http endpoint if 'endpoint' in aDict and aDict['endpoint'] == 'cef': return True # maybe it snuck in some other way # check some key CEF indicators (the header fields) if 'fields' in aDict and isi...
gdestuynder/MozDef
mozdef_util/mozdef_util/utilities/is_cef.py
Python
mpl-2.0
824
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Event CRM Sale', 'version': '1.0', 'category': 'Marketing/Events', 'website': 'https://www.odoo.com/page/events', 'description': "Add information of sale order linked to the registration fo...
ddico/odoo
addons/event_crm_sale/__manifest__.py
Python
agpl-3.0
511
# -*- coding: utf-8 -*- from openerp import models, fields, api, _ from openerp.osv import osv from openerp.exceptions import Warning import openerp.addons.decimal_precision as dp class sale_advance_payment_inv(models.TransientModel): _inherit = "sale.advance.payment.inv" @api.model def _get_invoice_curr...
sysadminmatmoz/ingadhoc
account_sale_different_currency/wizard/sale_make_invoice_advance.py
Python
agpl-3.0
9,343
"""This file contains (or should), all access control logic for the courseware. Ideally, it will be the only place that needs to know about any special settings like DISABLE_START_DATES""" import logging from datetime import datetime, timedelta from django.conf import settings from django.contrib.auth.models import An...
Unow/edx-platform
lms/djangoapps/courseware/access.py
Python
agpl-3.0
17,785
# 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 RProdlim(RPackage): """Product-Limit Estimation for Censored Event History Analysis P...
LLNL/spack
var/spack/repos/builtin/packages/r-prodlim/package.py
Python
lgpl-2.1
1,415
# 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 RPbdzmq(RPackage): """Programming with Big Data -- Interface to 'ZeroMQ' 'ZeroMQ' is...
LLNL/spack
var/spack/repos/builtin/packages/r-pbdzmq/package.py
Python
lgpl-2.1
1,667
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 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...
sileht/deb-openstack-nova
nova/db/sqlalchemy/migrate_repo/versions/035_secondary_dns.py
Python
apache-2.0
1,198
# Copyright 2014 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 ag...
bigswitch/nova
nova/objects/instance_numa_topology.py
Python
apache-2.0
8,588
# 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 ...
airbnb/kafka
tests/kafkatest/tests/produce_consume_validate.py
Python
apache-2.0
8,828
# # 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...
Acehaidrey/incubator-airflow
airflow/providers/amazon/aws/hooks/redshift.py
Python
apache-2.0
1,282
# -*- coding: utf-8 -*- ############################################################################### # # GetLoginProfile # Retrieves the user name and password create date for the specified user. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (th...
jordanemedlock/psychtruths
temboo/core/Library/Amazon/IAM/GetLoginProfile.py
Python
apache-2.0
3,876
"""Remote control support for Apple TV.""" import asyncio from haphilipsjs.typing import SystemType from homeassistant.components.remote import ( ATTR_DELAY_SECS, ATTR_NUM_REPEATS, DEFAULT_DELAY_SECS, RemoteEntity, ) from . import LOGGER, PhilipsTVDataUpdateCoordinator from .const import CONF_SYSTEM...
lukas-hetzenecker/home-assistant
homeassistant/components/philips_js/remote.py
Python
apache-2.0
3,097
#!/usr/bin/env python # # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
googlearchive/simian
src/tests/simian/mac/common/ipcalc_test.py
Python
apache-2.0
3,975
""" Support for getting the state of a Thermoworks Smoke Thermometer. Requires Smoke Gateway Wifi with an internet connection. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.thermoworks_smoke/ """ import logging from requests import RequestExcep...
leppa/home-assistant
homeassistant/components/thermoworks_smoke/sensor.py
Python
apache-2.0
5,842
# Copyright (c) 2010-2011 OpenStack, 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 agreed to ...
Intel-bigdata/swift
test/unit/common/middleware/test_acl.py
Python
apache-2.0
6,539
# -*- Mode: Python -*- VERSION_STRING = "$Id: thread_channel.py,v 1.3 2002/03/19 22:49:40 amk Exp $" # This will probably only work on Unix. # The disadvantage to this technique is that it wastes file # descriptors (especially when compared to select_trigger.py) # May be possible to do it on Win32, using TCP localh...
zxl200406/minos
supervisor/supervisor/medusa/thread/thread_channel.py
Python
apache-2.0
3,713
################################################################################ # 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...
hequn8128/flink
flink-python/pyflink/ml/tests/test_pipeline_it_case.py
Python
apache-2.0
7,618
import time seen = set() import_order = [] elapsed_times = {} level = 0 parent = None children = {} def new_import(name, globals={}, locals={}, fromlist=[]): global level, parent if name in seen: return old_import(name, globals, locals, fromlist) seen.add(name) import_order.append((name, ...
hazelnusse/sympy-old
bin/sympy_time.py
Python
bsd-3-clause
1,207
from django.contrib.gis.geos.base import GEOSBase from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.prototypes import prepared as capi class PreparedGeometry(GEOSBase): """ A geometry that is prepared for performing certain operations. At the moment this includes the c...
rogerhu/django
django/contrib/gis/geos/prepared.py
Python
bsd-3-clause
1,034
from datetime import datetime, timedelta, timezone as datetime_timezone import pytz try: import zoneinfo except ImportError: try: from backports import zoneinfo except ImportError: zoneinfo = None from django.conf import settings from django.db.models import ( DateField, DateTimeField...
elena/django
tests/db_functions/datetime/test_extract_trunc.py
Python
bsd-3-clause
69,302
""" Django LDAP user authentication backend for Python 3. """ __version__ = (0, 9, 6)
NotSqrt/django-python3-ldap
django_python3_ldap/__init__.py
Python
bsd-3-clause
88
from django.shortcuts import render from bootcamp.activities.models import Notification from django.http import HttpResponse from django.contrib.auth.decorators import login_required from bootcamp.decorators import ajax_required @login_required def notifications(request): user = request.user notifications = N...
echopen/PRJ-medtec_sigproc
echopen-leaderboard/bootcamp/activities/views.py
Python
mit
1,362
from __future__ import unicode_literals from django.core.exceptions import ObjectDoesNotExist from djblets.util.decorators import augment_method_from from djblets.webapi.decorators import (webapi_login_required, webapi_response_errors, webap...
beol/reviewboard
reviewboard/webapi/resources/review_screenshot_comment.py
Python
mit
6,387
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt
plotly/python-api
packages/python/plotly/plotly/matplotlylib/mplexporter/tests/__init__.py
Python
mit
72
# 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 ...
jkonecki/autorest
AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ModelFlattening/autorestresourceflatteningtestservice/models/resource.py
Python
mit
1,309
#!/usr/bin/python ############################################################################## # # Copyright 2014 Realm 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.ap...
r-mckay/montreal-iqa
montrealIqaCore/Carthage/Checkouts/realm-cocoa/plugin/rlm_lldb.py
Python
mit
10,776
#!/usr/bin/env python2.7 """ Compare all sample graphs to baseline graphs (platvcf and g1kvcf). depends on callVariants.py output directory structure. Can do: 1)kmer set (jaccard and recall) 2)corg overlap """ import argparse, sys, os, os.path, random, subprocess, shutil, itertools, glob import doctest, re, json, col...
adamnovak/hgvm-graph-bakeoff-evalutations
scripts/computeVariantsDistances.py
Python
mit
67,700
''' XML parser. One function for each top-level element in the schema. Most functions just declare a new object and add it to the module. For typedefs, eventcopies, xidtypes, and other aliases though, we do not create a new type object, we just record the existing one under a new name. ''' from os.path import join f...
OpenInkpot-archive/iplinux-xcb-proto
xcbgen/matcher.py
Python
mit
3,534
from __future__ import unicode_literals import base64 import os import posixpath import re from itertools import takewhile from django.utils.encoding import smart_bytes, force_text from pipeline.conf import settings from pipeline.storage import default_storage from pipeline.utils import to_class, relpath from pipel...
ei-grad/django-pipeline
pipeline/compressors/__init__.py
Python
mit
9,056
# # Copyright (C) 2020 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, or (at your option) any later version. # This program is distributed in the hope that it will be...
jkonecny12/anaconda
pyanaconda/payload/dnf/__init__.py
Python
gpl-2.0
1,037
## This file imports items from the wx package into the wxPython package for ## backwards compatibility. Some names will also have a 'wx' added on if ## that is how they used to be named in the old wxPython package. import wx.lib.rightalign __doc__ = wx.lib.rightalign.__doc__ wxRightTextCtrl = wx.lib.rightalign.Ri...
163gal/Time-Line
libs64/wxPython/lib/rightalign.py
Python
gpl-3.0
332
# Distorm3 hook # # This currently contains the hardcoded location for the standard distorm3.dll install # It could be improved by carrying out a search, or using sys.path # # This also requires the distorm3 module to be modified with the following patch: # import sys # if hasattr(sys, '_MEIPASS'): # _distorm_path...
mirrax/detekt
hooks/hook-distorm3.py
Python
gpl-3.0
464
""" A Python implementation of the _bh_ Olden benchmark. The Olden benchmark implements the Barnes-Hut benchmark that is decribed in: J. Barnes and P. Hut, "A hierarchical o(N log N) force-calculation algorithm", Nature, 324:446-449, Dec. 1986 The original code in the Olden benchmark suite is derived from the...
shedskin/shedskin
examples/bh.py
Python
gpl-3.0
20,915
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui_takestep_explorer.ui' # # Created: Wed Apr 24 11:11:57 2013 # by: PyQt4 UI code generator 4.9.1 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 e...
smcantab/pele
pele/gui/ui/ui_takestep_explorer.py
Python
gpl-3.0
5,127
#!/usr/bin/env python parameter_list=[[]] def features_dense_io(): from shogun import RealFeatures, CSVFile feats=RealFeatures() f=CSVFile("../data/fm_train_real.dat","r") f.set_delimiter(" ") feats.load(f) return feats if __name__=='__main__': print('Dense Real Features IO') features_dense_io(*parameter_list...
cfjhallgren/shogun
examples/undocumented/python/features_dense_io.py
Python
gpl-3.0
325
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Product Matrix", 'summary': """ Technical module: Matrix Implementation """, 'description': """ Please refer to Sale Matrix or Purchase Matrix for the use of this module. """, 'ca...
jeremiahyan/odoo
addons/product_matrix/__manifest__.py
Python
gpl-3.0
888
# -*- coding: utf-8 -*- # # Werkzeug documentation build configuration file, created by # sphinx-quickstart on Fri Jan 16 23:10:43 2009. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickle...
davidyezsetz/kuma
vendor/packages/Werkzeug/docs/conf.py
Python
mpl-2.0
6,395
# Copyright (c) 2013 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 writ...
henaras/sahara
sahara/service/validations/cluster_templates.py
Python
apache-2.0
2,985
# -*- coding:utf-8 -*- # Copyright 2015 NEC Corporation. # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may not use this file except in compliance with the License...
machaharu/odenos
src/test/python/org/o3project/odenos/core/component/network/packet/test_packet_status.py
Python
apache-2.0
6,151
from TwitterSearch import TwitterSearch from TwitterSearch import TwitterSearchOrder from st2reactor.sensor.base import PollingSensor __all__ = [ 'TwitterSearchSensor' ] BASE_URL = 'https://twitter.com' class TwitterSearchSensor(PollingSensor): def __init__(self, sensor_service, config=None, poll_interval=...
lakshmi-kannan/st2contrib
packs/twitter/sensors/twitter_search_sensor.py
Python
apache-2.0
3,371
"""The tests for Climate device conditions.""" import pytest import voluptuous_serialize import homeassistant.components.automation as automation from homeassistant.components.climate import DOMAIN, const, device_condition from homeassistant.helpers import config_validation as cv, device_registry from homeassistant.se...
jawilson/home-assistant
tests/components/climate/test_device_condition.py
Python
apache-2.0
10,053
# 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 'Category.content' db.add_column('core_category', 'content', self.gf('django.db.models.fields.TextF...
petrlosa/ella
ella/core/south_migrations/0005_auto__add_field_category_content__add_field_category_template.py
Python
bsd-3-clause
11,864
import decimal import json import unittest import uuid from django import forms from django.core import checks, exceptions, serializers, validators from django.core.exceptions import FieldError from django.core.management import call_command from django.db import IntegrityError, connection, models from django.test imp...
piquadrat/django
tests/postgres_tests/test_array.py
Python
bsd-3-clause
34,363
import argparse import xml.etree.cElementTree as ET import jobset argp = argparse.ArgumentParser(description='Run interop tests.') argp.add_argument('-l', '--language', default='c++') args = argp.parse_args() # build job build_job = jobset.JobSpec(cmdline=['tools/run_tests/run_interops_build.sh', '%...
crast/grpc
tools/run_tests/run_interops.py
Python
bsd-3-clause
1,163
#!/usr/bin/python # # Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.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__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
hryamzik/ansible
lib/ansible/modules/cloud/azure/azure_rm_sqlserver.py
Python
gpl-3.0
10,749
# # Copyright 2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # # # The presence of this file turns this directory into a Python package ''' Polymorphic Types. The type can really be used to store anything, but also has simple conversion methods fo...
dl1ksv/gnuradio
gnuradio-runtime/python/pmt/__init__.py
Python
gpl-3.0
1,351
# from ..ocl import ApiResource # class Star(ApiResource): # def __init__(self): # super(Star, self).__init__() # self.resource = {} # self.username = "" # self.dateStarred = ""
burakince/ocl_web
ocl_web/libs/ocl/star.py
Python
mpl-2.0
216
# 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) 2014 Mozilla Corporation # # Contributors: # Jeff Bryner jbryner@mozilla.com import os import sys from c...
serbyy/MozDef
rest/plugins/facebookThreatExchange.py
Python
mpl-2.0
6,352
# -*- coding: utf-8 -*- # Copyright(C) 2012 Romain Bignon # # This file is part of weboob. # # weboob 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 License, or # (at your opti...
laurent-george/weboob
modules/cmso/__init__.py
Python
agpl-3.0
788
## \file ## \ingroup tutorial_roofit ## \notebook -nodraw ## Multidimensional models: performing fits in multiple (disjoint) ranges in one or more dimensions ## ## \macro_code ## ## \date February 2018 ## \authors Clemens Lange, Wouter Verkerke (C++ version) import ROOT # Create 2D pdf and data # -------------------...
root-mirror/root
tutorials/roofit/rf312_multirangefit.py
Python
lgpl-2.1
2,940