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
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2018 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
veger/ansible
lib/ansible/modules/network/fortios/fortios_firewall_vipgrp46.py
Python
gpl-3.0
8,717
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from pprint import pprint def execute(filters=None): data = [] columns = get_columns() get_data(filters, data) return columns, data def get_...
libracore/erpnext
erpnext/manufacturing/report/bom_explorer/bom_explorer.py
Python
gpl-3.0
1,711
""" Milestones management package initialization module """
GbalsaC/bitnamiP
venv/src/edx-milestones/milestones/management/__init__.py
Python
agpl-3.0
60
#!/usr/bin/python # -*- coding: utf-8 -*- """ Flexible python representation of a symbolic mathematical formula. Acceptes Presentation MathML, Content MathML (and could also do OpenMath). Provides sympy representation. """ # # File: formula.py # Date: 04-May-12 (creation) # Author: I. Chuang <ichuang@mit.edu> # i...
edx-solutions/edx-platform
common/lib/symmath/symmath/formula.py
Python
agpl-3.0
21,287
# -*- coding: utf-8 -*- # # # Author: Yannick Vaucher # Copyright 2015 Camptocamp SA # # 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 # License,...
grap/stock-logistics-workflow
stock_shipment_management/wizard/shipment_etd_setter.py
Python
agpl-3.0
1,408
from c2corg_ui.views import call_api from httmock import HTTMock from c2corg_ui import caching from c2corg_ui.tests import BaseTestCase, settings, read_file from pyramid import testing class BaseTestUi(BaseTestCase): def set_prefix(self, prefix): self._prefix = prefix def setUp(self): # noqa ...
Courgetteandratatouille/v6_ui
c2corg_ui/tests/views/__init__.py
Python
agpl-3.0
3,147
# Copyright 2013-2020 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 RAldex2(RPackage): """Analysis Of Differential Abundance Taking Sample Variation Into Acco...
rspavel/spack
var/spack/repos/builtin/packages/r-aldex2/package.py
Python
lgpl-2.1
1,981
# Copyright 2013-2020 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) class PyAzureCliCore(PythonPackage): """Microsoft Azure Command-Line Tools Core Module.""" homepage = "https://g...
iulian787/spack
var/spack/repos/builtin/packages/py-azure-cli-core/package.py
Python
lgpl-2.1
2,113
############################################################################## # Copyright (c) 2013-2017, 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...
wscullin/spack
var/spack/repos/builtin/packages/ndiff/package.py
Python
lgpl-2.1
2,021
""" This script will test HighGUI's cvGetCaptureProperty functionality for correct returnvalues of width and height information for different video formats """ # import the necessary things for OpenCV and comparson routine import os import python from python.highgui import * # path to images and videos we need PREF...
glo/ee384b
opencv/tests/python/highgui/size_test.py
Python
lgpl-2.1
1,226
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # 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...
mlperf/training_results_v0.5
v0.5.0/google/research_v3.32/gnmt-tpuv3-32/code/gnmt/model/t2t/tensor2tensor/data_generators/allen_brain.py
Python
apache-2.0
14,040
# # =============================================================================== # # Copyright 2018 ross # # # # 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.o...
USGSDenverPychron/pychron
pychron/hardware/gauges/pfeiffer/base_pfeifer_gauge.py
Python
apache-2.0
3,115
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Mellanox Technologies, 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 # #...
ntt-sic/neutron
neutron/plugins/mlnx/common/config.py
Python
apache-2.0
2,901
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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/licen...
DirectXMan12/nova-hacking
nova/tests/api/openstack/compute/contrib/test_extended_ips_mac.py
Python
apache-2.0
5,633
# Copyright 2012 New Dream Network, LLC (DreamHost) # 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 # # ...
dims/neutron
neutron/tests/unit/db/test_migration.py
Python
apache-2.0
32,154
""" Ansible module for determining if the size of OpenShift image data exceeds a specified limit in an etcd cluster. """ from openshift_checks import OpenShiftCheck, OpenShiftCheckException, get_var class EtcdImageDataSize(OpenShiftCheck): """Check that total size of OpenShift image data does not exceed the reco...
thoraxe/openshift-ansible
roles/openshift_health_checker/openshift_checks/etcd_imagedata_size.py
Python
apache-2.0
3,806
""" mbed SDK Copyright (c) 2011-2015 ARM Limited Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writin...
Timmmm/mbed
workspace_tools/targets.py
Python
apache-2.0
62,855
# Copyright 2014 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...
nathanaelle/novm
novm/block.py
Python
apache-2.0
1,307
#!/usr/bin/python # -*- coding: utf-8 -*- #****************************************************************# # Create Date: 2017-01-06 17:58 #***************************************************************# import socket import shutil from time import gmtime, strftime # get host_name host_name = socket.gethostname() ...
alibaba/canal
docker/image/alidata/init/fix-hosts.py
Python
apache-2.0
1,807
""" opentrons.protocols: functions and state for handling, executing, and simulating protocols. This genericizes over v1 and v2 protocols and allows for version inference and version-independent apis for simulating and executing protocols. """
Opentrons/labware
api/src/opentrons/protocols/__init__.py
Python
apache-2.0
245
# Copyright (c) 2017 Huawei Technologies Co., Ltd. # 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 # # ...
j-griffith/cinder
cinder/policies/volume_transfer.py
Python
apache-2.0
2,631
"""Support for THOMSON routers.""" import logging import re import telnetlib import voluptuous as vol from homeassistant.components.device_tracker import ( DOMAIN, PLATFORM_SCHEMA, DeviceScanner, ) from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME import homeassistant.helpers.config_...
leppa/home-assistant
homeassistant/components/thomson/device_tracker.py
Python
apache-2.0
3,894
# -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
rahmadirsp/linetester
linebot/models/responses.py
Python
apache-2.0
2,425
import os from typing import Dict, Optional, Union import ujson from django.conf import settings from django.core.management.base import CommandParser from django.test import Client from zerver.lib.management import CommandError, ZulipBaseCommand from zerver.lib.webhooks.common import standardize_headers from zerver....
timabbott/zulip
zerver/management/commands/send_webhook_fixture_message.py
Python
apache-2.0
3,908
import numpy as np from ray.rllib.agents.trainer import Trainer, with_common_config from ray.rllib.utils.annotations import override # yapf: disable # __sphinx_doc_begin__ class RandomAgent(Trainer): """Policy that takes random actions and never learns.""" _name = "RandomAgent" _default_config = with_co...
richardliaw/ray
rllib/contrib/random_agent/random_agent.py
Python
apache-2.0
1,414
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('spanish_content', '0001_initial'), ] operations = [ migrations.CreateModel( name='Menu', fields=[ ...
DjangoGirlsSeoul/lightandleadership
spanish_content/migrations/0002_menu.py
Python
apache-2.0
774
# -*- coding: utf-8 -*- # Copyright 2014, 2015 Metaswitch 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 ap...
ocadotechnology/calico
calico/test/test_common.py
Python
apache-2.0
31,161
# 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...
ijingo/incubator-singa
examples/imagenet/googlenet/serve.py
Python
apache-2.0
9,368
# # 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...
dskarbek/qpid-dispatch
python/qpid_dispatch_internal/tools/command.py
Python
apache-2.0
8,968
# 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...
dmlc/tvm
tests/python/unittest/test_auto_scheduler_feature.py
Python
apache-2.0
7,838
"""Support for AirVisual air quality sensors.""" from __future__ import annotations from homeassistant.components.sensor import SensorEntity, SensorEntityDescription from homeassistant.config_entries import ConfigEntry from homeassistant.const import ( ATTR_LATITUDE, ATTR_LONGITUDE, ATTR_STATE, CONCENT...
sander76/home-assistant
homeassistant/components/airvisual/sensor.py
Python
apache-2.0
13,167
#!/usr/bin/python # # Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
ya7lelkom/googleads-python-lib
examples/adwords/v201502/basic_operations/remove_campaign.py
Python
apache-2.0
1,869
# Copyright 2014-2015 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library options from argparse import Action, SUPPRESS import logging # logging setup, , setup the logging system, internal from yotta.lib import logging_setup def logLevelFromVerbosity(v): ...
ARMmbed/yotta
yotta/options/verbosity.py
Python
apache-2.0
1,130
from __future__ import unicode_literals from moto.core.responses import BaseResponse class VPCPeeringConnections(BaseResponse): def create_vpc_peering_connection(self): peer_region = self._get_param('PeerRegion') if peer_region == self.region or peer_region is None: peer_vpc = self.ec...
okomestudio/moto
moto/ec2/responses/vpc_peering_connections.py
Python
apache-2.0
5,615
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
googleapis/google-cloud-php-sql-admin
owlbot.py
Python
apache-2.0
3,013
import os import jinja2 as jin import json from IPython.core.display import display, HTML from . import __path__ def plot_circle(data, id=1): path = os.path.join(os.path.dirname(__file__), '.') template_env = jin.Environment(loader=jin.FileSystemLoader(path)) index = template_env.get_template('circle.tpl...
CristinaFoltea/pythonD3
pythonD3/visualize.py
Python
bsd-2-clause
942
from datetime import timedelta from django.contrib import admin from tracking.models import Visitor, Pageview from tracking.settings import TRACK_PAGEVIEWS class VisitorAdmin(admin.ModelAdmin): date_hierarchy = 'start_time' list_display = ('session_key', 'user', 'start_time', 'session_over', 'pretty_t...
bruth/django-tracking2
tracking/admin.py
Python
bsd-2-clause
956
# This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from ginga import trcalc from ginga.gw import Widgets from ginga.util import action from .base import Stage class FlipSwap(Stage): _stagename = 'flip-swap' def __init__(self): super(FlipSwa...
naojsoft/ginga
ginga/util/stages/flipswap.py
Python
bsd-3-clause
4,096
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging from telemetry.core import exceptions from telemetry.page import action_runner as action_runner_module class TestNotSupportedOnPlatformErro...
Chilledheart/chromium
tools/telemetry/telemetry/page/page_test.py
Python
bsd-3-clause
6,702
# # Module providing the `Process` class which emulates `threading.Thread` # # processing/process.py # # Copyright (c) 2006-2008, R Oudkerk --- see COPYING.txt # __all__ = [ 'Process', 'currentProcess', 'activeChildren' ] # # Imports # import os import sys import time import signal import...
seishei/multiprocess
py2.5/processing/process.py
Python
bsd-3-clause
8,982
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # Eric Larson <larson.eric.d@gmail.com> # Robert Luke <mail@robertluke.net> # # License: Simplified BSD from collections import named...
wmvanvliet/mne-python
mne/viz/tests/test_topo.py
Python
bsd-3-clause
12,618
from ipywidgets import VBox, jsdlink, IntSlider, Button s1, s2 = IntSlider(max=200, value=100), IntSlider(value=40) b = Button(icon='legal') jsdlink((s1, 'value'), (s2, 'max')) VBox([s1, s2, b])
ipython/ipywidgets
examples/web2/widget_code.py
Python
bsd-3-clause
196
# 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. from profile_creators import extensions_profile_creator class ManyExtensionsProfileCreator( extensions_profile_creator.ExtensionsProfileCreator): """...
sgraham/nope
tools/perf/profile_creators/many_extensions_profile_creator.py
Python
bsd-3-clause
1,267
import distutils.core from distutils.core import setup import py2exe import matplotlib import os import glob import sys sys.setrecursionlimit(3000) directory = os.getcwd() help_data = glob.glob(os.path.join(directory, 'dialogs', 'help_files') + os.path.sep + '*') data_model = glob.glob(os.path.join(directory, 'pmagpy...
lfairchild/PmagPy
setup_scripts/win_magic_gui_setup.py
Python
bsd-3-clause
2,036
# # vip.py -- data extraction operations on mixed, plotted images. # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import time import numpy as np # for debugging #np.set_printoptions(threshold=np.inf) from ginga import trcalc from ginga.canvas.types.image...
naojsoft/ginga
ginga/util/vip.py
Python
bsd-3-clause
18,272
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import json import os from urlparse import urlparse import chrome_cache import common_util from loading_trace import LoadingTrace from prefet...
axinging/chromium-crosswalk
tools/android/loading/sandwich_misc.py
Python
bsd-3-clause
15,989
# Adapted from test_file.py by Daniel Stutzbach import sys import os import io import errno import unittest from array import array from weakref import proxy from functools import wraps from test.support import (TESTFN, TESTFN_UNICODE, check_warnings, run_unittest, make_bad_fd, cpython_only,...
kikocorreoso/brython
www/src/Lib/test/test_fileio.py
Python
bsd-3-clause
20,444
# # Copyright (C) 2004-2008 greg Landrum and Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # from __future__ import print...
rvianello/rdkit
rdkit/Chem/Pharm3D/UnitTestEmbed.py
Python
bsd-3-clause
9,826
# -*- coding: utf-8 -*- from __future__ import absolute_import import re import json from functools import wraps import quixote from quixote.errors import TraversalError from quixote.http_request import HTTPRequest from vilya.libs.template import st from vilya.libs.signals import rds_pub_signal from vilya.libs.pubsu...
xtao/code
vilya/views/util.py
Python
bsd-3-clause
4,342
#!/usr/bin/env python3 from argparse import ArgumentParser from io import StringIO from enum import Enum, auto import os.path import sys import re class Cell: def __init__(self, name, keep=False, port_attrs={}): self.name = name self.keep = keep self.port_attrs = port_attrs CELLS = [ ...
cliffordwolf/yosys
techlibs/xilinx/cells_xtra.py
Python
isc
33,039
import csv import os from utils.msg_util import * class UserMapHelper: def __init__(self, user_map_fname): self.user_map_fname = user_map_fname self.map_lookup = {} # Redmine username : Github Account self.load_map_lookup() def get_key_count(self): return len(self.m...
VihreatDeGrona/redmine2github
src/github_issues/user_map_helper.py
Python
mit
1,565
import abc import copy from functools import reduce import hearthbreaker.constants from hearthbreaker.tags.base import Aura, AuraUntil, Effect, Buff, BuffUntil, Deathrattle from hearthbreaker.tags.event import TurnEnded from hearthbreaker.tags.selector import CurrentPlayer from hearthbreaker.tags.status import Stealth...
Ragowit/hearthbreaker
hearthbreaker/game_objects.py
Python
mit
46,150
"""Init for ``cltk.embeddings``.""" from .embeddings import * from .processes import *
kylepjohnson/cltk
src/cltk/embeddings/__init__.py
Python
mit
88
# This file is part of Buildbot. Buildbot 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. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
denny820909/builder
lib/python2.7/site-packages/buildbot_slave-0.8.8-py2.7.egg/buildslave/commands/bzr.py
Python
mit
7,775
# -*- coding: utf-8 -*- # # Gunicorn documentation build configuration file # import sys, os DOCS_DIR = os.path.abspath(os.path.dirname(__file__)) on_rtd = os.environ.get('READTHEDOCS', None) == 'True' # for gunicorn_ext.py sys.path.append(os.path.join(DOCS_DIR, os.pardir)) sys.path.insert(0, os.path.join(DOCS_DIR, ...
irachex/gunicorn
docs/source/conf.py
Python
mit
1,720
"""YAML utility functions.""" import glob import logging import os import sys from collections import OrderedDict from typing import Union, List, Dict import yaml try: import keyring except ImportError: keyring = None from homeassistant.exceptions import HomeAssistantError _LOGGER = logging.getLogger(__name_...
Smart-Torvy/torvy-home-assistant
homeassistant/util/yaml.py
Python
mit
8,150
from datetime import datetime, timedelta from loguru import logger from sqlalchemy import and_ from flexget import plugin from flexget.event import event from flexget.manager import Session from flexget.utils.tools import parse_timedelta from . import db logger = logger.bind(name='remember_rej') class FilterRemem...
crawln45/Flexget
flexget/components/rejected/remember_rejected.py
Python
mit
5,272
import pytest from qtpy import PYQT5, PYSIDE2 @pytest.mark.skipif(not (PYQT5 or PYSIDE2), reason="Only available in Qt5 bindings") def test_qt3danimation(): """Test the qtpy.Qt3DAnimation namespace""" Qt3DAnimation = pytest.importorskip("qtpy.Qt3DAnimation") assert Qt3DAnimation.QAnimationController is no...
stonebig/winpython
winpython/_vendor/qtpy/tests/test_qt3danimation.py
Python
mit
1,107
#!/usr/bin/env python2 from pwn import * context(arch = 'i386', os = 'linux') # Demo should work even without a remote host if 'HOST' in args: r = remote(args['HOST'], int(args['PORT'])) else: l = listen(0) l.spawn_process(['./bbgp_7cdbfdae936b3c6ed10588119a8279a0']) r = remote('localhost', l.lport) ...
sigma-random/pwntools-write-ups
2014/defcon-quals/bbgp/doit.py
Python
mit
2,255
from buildbot.process import buildstep from buildbot.status.results import SUCCESS, FAILURE class NoOp(buildstep.BuildStep): """ A build step that does nothing except finish with a caller- supplied status (default SUCCESS). """ parms = buildstep.BuildStep.parms + ['result'] result = SUCCESS ...
denny820909/builder
lib/python2.7/site-packages/autobuilder/buildsteps/NoOp.py
Python
mit
448
import os import unittest from conans.paths import (BUILD_FOLDER, PACKAGES_FOLDER, EXPORT_FOLDER, SimplePaths, CONANINFO) from conans.model.ref import ConanFileReference from conans.test.utils.test_files import temp_folder from conans.search.search import DiskSearchManager, DiskSearchAdapter from conans.util.files impo...
tivek/conan
conans/test/functional/disk_search_test.py
Python
mit
3,498
# -*- coding: utf-8 -*- # # Copyright (c) 2010 by xt <xt@bash.no> # # 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. # # ...
chrcoe/dotfiles
weechat.symlink/python/colorize_nicks.py
Python
mit
13,943
# ScummVM - Graphic Adventure Engine # Copyright (C) 2020 - 2021 Stryzhniou Fiodar # ScummVM is the legal property of its developers, whose names # are too numerous to list here. Please refer to the COPYRIGHT # file distributed with this source distribution. # This program is free software; you can redistribute it an...
vanfanel/scummvm
backends/platform/symbian/symbian_builder/piper.py
Python
gpl-2.0
3,958
""" Python Character Mapping Codec generated from '8859-6.TXT'. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(i...
atmark-techno/atmark-dist
user/python/Lib/encodings/iso8859_6.py
Python
gpl-2.0
2,743
import os, collections from abc import abstractmethod import ohcount class _OhcountBase(object): def __init__(self, base): self._base = base def __getattr__(self, name): if name == '_base': return object.__getattr__(self, name) raise AttributeError def __setattr__(sel...
scriptum/ohcount
python/__init__.py
Python
gpl-2.0
6,433
# vim: set fileencoding=utf-8 : # ***********************IMPORTANT NMAP LICENSE TERMS************************ # * * # * The Nmap Security Scanner is (C) 1996-2013 Insecure.Com LLC. Nmap is * # * also a registered trademark of Insecure.Com LLC. ...
markofu/scripts
nmap/nmap/zenmap/radialnet/bestwidgets/frames.py
Python
gpl-2.0
9,990
# -*- coding: utf-8 -*- from django.db import models class Server(models.Model): # Server title = models.CharField(max_length=1000, help_text="Server Title", blank=True) abstract = models.CharField(max_length=2000, help_text="Server Abstract", blank=True) keywords = models.CharField(max_length=2000, h...
brianmckenna/sci-wms
wms/models/server.py
Python
gpl-3.0
1,631
# vi: ts=4 expandtab # # Copyright (C) 2009-2010 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Juerg Haefliger <juerg.haefliger@hp.com> # # This program is free software: you can redistribute it and/or modify # ...
tamsky/cloud-init
cloudinit/config/cc_mounts.py
Python
gpl-3.0
13,219
import datetime from optparse import make_option from django.conf import settings from django.core.management.base import BaseCommand from treeherder.model.derived import JobsModel from treeherder.model.models import Datasource class Command(BaseCommand): help = """Cycle data that exceeds the time constraint li...
wlach/treeherder
treeherder/model/management/commands/cycle_data.py
Python
mpl-2.0
2,101
# -*- coding: 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): # Deleting model 'Component' db.delete_table('component') # Adding model 'ConstraintsToSegmentMap' ...
htem/CATMAID
django/applications/catmaid/migrations/0002_auto__del_component__add_constraintstosegmentmap__add_slicecontourshig.py
Python
agpl-3.0
53,710
#!/usr/bin/python """A script that parses vSphere API documentation and generates a YAML dump of the Managed Object's and their properties. It expects to run from the SDK/doc/ReferenceGuide/ directory and is quite kludgy so I expect that it is highly version dependent. """ # Copyright 2010 Jonathan Kinred from Beauti...
graphite-server/psphere
resources/generate_managedobjects.py
Python
apache-2.0
6,562
# coding: utf-8 from __future__ import absolute_import from datetime import date, datetime # noqa: F401 from typing import List, Dict # noqa: F401 from tapi_server.models.base_model_ import Model from tapi_server.models.tapi_common_getserviceinterfacepointlist_output import TapiCommonGetserviceinterfacepointlistOu...
karthik-sethuraman/ONFOpenTransport
RI/flask_server/tapi_server/models/tapi_common_get_service_interface_point_list.py
Python
apache-2.0
2,120
# Copyright (c) 2019 PaddlePaddle 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 app...
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/test_fused_fc_elementwise_layernorm_op.py
Python
apache-2.0
2,726
# Copyright (c) 2016 PaddlePaddle 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 applic...
helinwang/Paddle
demo/image_classification/prediction.py
Python
apache-2.0
5,902
"""Component for interacting with a Lutron RadioRA 2 system.""" import logging from pylutron import Button, Lutron import voluptuous as vol from homeassistant.const import ATTR_ID, CONF_HOST, CONF_PASSWORD, CONF_USERNAME from homeassistant.helpers import discovery import homeassistant.helpers.config_validation as cv ...
w1ll1am23/home-assistant
homeassistant/components/lutron/__init__.py
Python
apache-2.0
5,905
### # Copyright (c) 2002-2005, Jeremiah Fincher # 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 co...
kblin/supybot-gsoc
src/ircutils.py
Python
bsd-3-clause
20,822
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
fichter/grpc
src/python/grpcio/grpc/_adapter/_low.py
Python
bsd-3-clause
4,570
# # Copyright (c) 2003-2006 Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """ utility functionality for clustering molec...
greglandrum/rdkit
rdkit/Chem/Fingerprints/ClusterMols.py
Python
bsd-3-clause
5,671
""" =========================================== Tractography Clustering - Available Metrics =========================================== This page lists available metrics that can be used by the tractography clustering framework. For every metric a brief description is provided explaining: what it does, when it's usefu...
nilgoyyou/dipy
doc/examples/segment_clustering_metrics.py
Python
bsd-3-clause
5,508
"""Definitions for the `Constant` class.""" from mosfit.modules.parameters.parameter import Parameter # Important: Only define one ``Module`` class per file. class Constant(Parameter): """Constant parameter. `Parameter` that will throw an error if the user attempts to make the variable free. """ ...
villrv/MOSFiT
mosfit/modules/parameters/constant.py
Python
mit
633
# Small benchmark to get the even point where the threading code # performs better than the serial code. See issue #36 for details. from __future__ import print_function import numpy as np import numexpr as ne from numpy.testing import assert_array_equal from time import time def bench(N): print("*** array lengt...
pombredanne/numexpr
bench/issue-36.py
Python
mit
895
from __future__ import absolute_import, unicode_literals import django __all__ = ['VERSION'] try: import pkg_resources VERSION = pkg_resources.get_distribution('django-debug-toolbar').version except Exception: VERSION = 'unknown' # Code that discovers files or modules in INSTALLED_APPS imports this mo...
klenks/jobsportal
venv/lib/python2.7/site-packages/debug_toolbar/__init__.py
Python
mit
517
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
samedder/azure-cli
src/command_modules/azure-cli-find/azure/cli/command_modules/find/_params.py
Python
mit
589
from __future__ import unicode_literals from django.contrib.staticfiles.storage import staticfiles_storage from django.core.exceptions import ImproperlyConfigured from django.http import Http404 from django.test import RequestFactory, TestCase from django.test.utils import override_settings from pipeline.collector im...
chipx86/django-pipeline
tests/tests/test_views.py
Python
mit
3,152
#!/usr/bin/env python # # Copyright 2009 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 # noti...
enclose-io/compiler
lts/tools/run-valgrind.py
Python
mit
2,561
#!/usr/bin/python import aff4 from aff4_attributes import * import tdb_resolver aff4.oracle = tdb_resolver.TDBResolver() import optparse, pdb import sys, os parser = optparse.OptionParser() parser.add_option("-i", "--image", default=None, action='store_true', help = "Imaging mode"...
backupManager/pyflag
src/plugins_old/aff4/aff4imager.py
Python
gpl-2.0
6,739
import os from log_picker.sending.senderbaseclass import SenderBaseClass from log_picker.sending.senderbaseclass import SenderError from report.plugins.bugzilla import filer from report.plugins.bugzilla.filer import CommunicationError from report.plugins.bugzilla.filer import LoginError class BugzillaBaseClass(Sender...
mattias-ohlsson/anaconda
utils/log_picker/sending/bugzillasender.py
Python
gpl-2.0
2,046
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.Label import Label from Components.ActionMap import ActionMap from Components.HelpMenuList import HelpMenuList from Screens.Rc import Rc from enigma import eActionMap from sys import maxint class HelpMenu(Screen, Rc): helpTex...
popazerty/beyonwiz-sh4
lib/python/Screens/HelpMenu.py
Python
gpl-2.0
3,794
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.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...
shirou/ansible
lib/ansible/runner/connection_plugins/ssh.py
Python
gpl-3.0
18,858
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
Akrog/cinder
cinder/tests/targets/test_iser_driver.py
Python
apache-2.0
3,980
from mtools.util.logevent import LogEvent from mtools.util.input_source import InputSource from dateutil.tz import tzutc from pprint import pprint try: try: from pymongo import MongoClient as Connection except ImportError: from pymongo import Connection from pymongo.errors import Connection...
parkhyeonghwa/mtools
mtools/util/profile_collection.py
Python
apache-2.0
4,324
# 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...
dmoliveira/yapf
yapf/yapflib/line_joiner.py
Python
apache-2.0
3,896
"""Helper to test significant Light state changes.""" from __future__ import annotations from typing import Any from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.significant_change import ( check_numeric_changed, either_one_none, ) from . import ( ATTR_BRIGHTNESS, ATTR...
sander76/home-assistant
homeassistant/components/light/significant_change.py
Python
apache-2.0
1,691
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
alfasin/st2
st2common/st2common/constants/error_messages.py
Python
apache-2.0
1,031
# 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...
asolntsev/selenium
py/selenium/webdriver/support/select.py
Python
apache-2.0
9,258
# Copyright 2014 Cloudera 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, so...
Supermem/ibis
ibis/sql/sqlite/compiler.py
Python
apache-2.0
4,764
import atexit import sys if sys.version_info < (3, 0): def _encode_string(s): if isinstance(s, bytes): return s else: return s.encode('latin1') def _decode_string(b): return b else: def _encode_string(s): encoded = s.encode('latin1') return...
m-labs/llvmlite
llvmlite/binding/common.py
Python
bsd-2-clause
985
# Copyright 2015 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. """Top-level presubmit script for src/components/cronet. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about ...
danakj/chromium
components/cronet/PRESUBMIT.py
Python
bsd-3-clause
1,712
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """The fsl module provides classes for interfacing with the `FSL <http://www.fmrib.ox.ac.uk/fsl/index.html>`_ command line tools. This was written to work with FSL version 4.1.4. Examples -------- See the...
JohnGriffiths/nipype
nipype/interfaces/fsl/utils.py
Python
bsd-3-clause
79,878
########################################################################## # # Copyright (c) 2019, Image Engine Design 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: # # * Redistrib...
hradec/gaffer
python/GafferUI/SpreadsheetUI/_PlugTableDelegate.py
Python
bsd-3-clause
3,717