code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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; eith...
pferreir/indico-backup
indico/MaKaC/plugins/EPayment/yellowPay/__init__.py
Python
gpl-3.0
882
# -*- coding: utf-8 -*- # Copyright (C) 2014 Canonical # # Authors: # Didier Roche # # 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 3. # # This program is distributed in the hope that ...
ubuntu/ubuntu-make
tests/data/duplicatedframeworks/samecategory.py
Python
gpl-3.0
1,683
# -*- coding: utf-8 -*- # # This file is part of Linux Show Player # # Copyright 2012-2016 Francesco Ceruti <ceppofrancy@gmail.com> # # Linux Show Player 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 ...
offtools/linux-show-player
lisp/modules/gst_backend/settings/speed.py
Python
gpl-3.0
2,882
#----------------------------------------------------------------------------- # Copyright (c) 2005-2019, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
etherkit/OpenBeacon2
client/win/venv/Lib/site-packages/PyInstaller/hooks/hook-gi.repository.xlib.py
Python
gpl-3.0
593
__author__ = 'Sergey Tomin' from ocelot.rad import * from ocelot import * from ocelot.gui import * import numpy as np import time font = {'size' : 14} matplotlib.rc('font', **font) #from scipy.optimize import curve_fit from ocelot.demos.sr.k_analysis import * #from ocelot.lib.genera.src.python.radiation import gener...
sserkez/ocelot
demos/sr/k_diode.py
Python
gpl-3.0
2,071
#!/usr/bin/env python # coding:utf-8 # environ: python3.6 32bit # code by shuichon ''' V3.2,优化了执行流程和操作的简易性,修补了几个bug ''' from urllib import request, parse from bs4 import BeautifulSoup import re, json, sys def get_warn(soup): ''' 频繁访问时,搜狗会需要二次验证,判断是否需要二次验证 ''' warn = soup.find_all('p', class_='ip...
i1ikey0u/watchwxfiles
watchdog_of_wxgzh.py
Python
gpl-3.0
6,141
#coding= utf-8 class PhoneticAlgorithms(): ''' This script implements the Double Metaphone algorithm (c) 1998, 1999 by Lawrence Philips it was translated to Python from the C source written by Kevin Atkinson (http://aspell.net/metaphone/) By Andrew Collins - January 12, 2007 who claims no rights to...
amsqr/k-Met
phonetic_algorithms.py
Python
gpl-3.0
21,699
#!/usr/bin/python # -*- coding: utf-8 -*- import easyiceconfig as EasyIce import jderobotComm as comm import sys, signal sys.path.append('/usr/local/share/jderobot/python/visualHFSM_py') import traceback, threading, time from automatagui import AutomataGui, QtGui, GuiSubautomata from jderobot import MotorsPrx from jd...
okanasik/JdeRobot
src/tools/visualStates/samples/goforward/goforward.py
Python
gpl-3.0
4,201
#!/usr/bin/env python # -*- coding: utf-8 import sys import argparse from ete3 import Tree import anvio.db as db import anvio.utils as utils import anvio.terminal as terminal from anvio.errors import ConfigError run = terminal.Run() progress = terminal.Progress() current_version, next_version = [x[1:] for x in __n...
merenlab/anvio
anvio/migrations/profile/v26_to_v27.py
Python
gpl-3.0
2,866
"""Spoilers cog Filters out messages that start with a certain prefix, and store them for later retrieval. """ from datetime import datetime, timedelta import logging import json import os import re import discord from discord.ext import commands from cogs.utils.dataIO import dataIO from cogs.utils impo...
Injabie3/lui-cogs
spoilers/spoilers.py
Python
gpl-3.0
8,453
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Ivan Vanderbyl <ivan@app.io> # # This module 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 la...
kbrebanov/ansible-modules-extras
monitoring/logentries.py
Python
gpl-3.0
4,638
#----------------------------------------------------------------------------- # Copyright (c) 2013-2019, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
etherkit/OpenBeacon2
client/win/venv/Lib/site-packages/PyInstaller/hooks/hook-matplotlib.py
Python
gpl-3.0
599
import serial, sys class SerialComm(): def __init__(self, serial_device): try: self.ser = serial.Serial(serial_device, 9600, timeout=5) except serial.serialutil.SerialException, e: print "Unable to open serial port "+serial_device sys.exit() def close(self): self.ser.close() def...
Hainish/cerealbox
server/serial_comm.py
Python
gpl-3.0
372
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
elianerpereira/gtg
GTG/tests/test_interruptible.py
Python
gpl-3.0
2,149
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2017 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 S...
NoctuaNivalis/qutebrowser
tests/unit/browser/test_tab.py
Python
gpl-3.0
3,502
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2017 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 S...
NoctuaNivalis/qutebrowser
tests/unit/utils/test_qtutils.py
Python
gpl-3.0
32,541
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
QijunPan/ansible
lib/ansible/module_utils/network_common.py
Python
gpl-3.0
5,307
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import UserError class StockWarehouse(models.Model): _inherit = 'stock.warehouse' manufacture_to_resupply = fields.Boolean( 'Manufacture to ...
ddico/odoo
addons/mrp/models/stock_warehouse.py
Python
agpl-3.0
14,925
# -*- coding: utf-8 -*- import base64 import decimal from psycopg2 import Binary import datetime as DT import pytz import logging _logger = logging.getLogger(__name__) def _set_symbol(symb): if symb is None or symb == False: return None return str(symb) class _column(object): __slots__ = ('__dict_...
neo5g/server-gsrp5
server-gsrp5/orm/fields.py
Python
agpl-3.0
18,659
from dependencies.dependency import ClassSecurityInfo from dependencies.dependency import RecordsField from dependencies.dependency import registerField from dependencies.dependency import * from lims import bikaMessageFactory as _ from lims.utils import t class InterimFieldsField(RecordsField): """a list of Int...
sciCloud/OLiMS
lims/browser/fields/interimfieldsfield.py
Python
agpl-3.0
1,737
############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py # #####################...
CompassionCH/compassion-switzerland
child_sync_wp/models/project_compassion.py
Python
agpl-3.0
986
# Generated by Django 2.0.13 on 2020-10-09 14:56 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('currency_convert', '0001_initial'), ] operations = [ migrations.AddField( model_name='monthlyaverage', name='imf_ur...
openaid-IATI/OIPA
OIPA/currency_convert/migrations/0002_monthlyaverage_imf_url.py
Python
agpl-3.0
404
""" Custom migration script to add slug field to all ProviderConfig models. """ from django.db import migrations, models from django.utils.text import slugify def fill_slug_field(apps, schema_editor): """ Fill in the slug field for each ProviderConfig class for backwards compatability. """ OAuth2Pro...
eduNEXT/edunext-platform
common/djangoapps/third_party_auth/migrations/0019_consolidate_slug.py
Python
agpl-3.0
2,165
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2014-2017 Vincent Noel (vincent.noel@butantan.gov.br) # # This file is part of libSigNetSim. # # libSigNetSim 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...
msreis/SigNetSim
signetsim/tests/test_project.py
Python
agpl-3.0
4,292
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-03-05 14:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('partner', '0016_auto_20191115_2151'), ] operations = [ migrations.AlterField( model_name='historicalp...
eduNEXT/edunext-ecommerce
ecommerce/extensions/partner/migrations/0017_auto_20200305_1448.py
Python
agpl-3.0
887
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('studentguide', '0005_add_studentguide_clubs'), ] operations = [ migrations.AddField( model_name='tag', ...
enjaz/enjaz
studentguide/migrations/0006_tag_image.py
Python
agpl-3.0
446
# Copyright (C) 2007, Red Hat, Inc. # # 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 of the License, or (at your option) any later version. # # This library is distrib...
godiard/sugar-toolkit-gtk3
src/sugar3/graphics/animator.py
Python
lgpl-2.1
7,131
# Copyright (C) 2014 Robby Zeitfuchs (@robbyFux) # # 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 d...
lixiangning888/whole_project
modules/signatures_orignal/banker_cridex.py
Python
lgpl-3.0
2,206
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from resources.datatables import FactionStatus from java.util import Vector def addTemplate(co...
ProjectSWGCore/NGECore2
scripts/mobiles/generic/faction/imperial/veteran_imp_colonel.py
Python
lgpl-3.0
1,423
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from resources.datatables import FactionStatus from java.util import Vector def addTemplate(cor...
ProjectSWGCore/NGECore2
scripts/mobiles/generic/faction/rebel/rebel_commandant.py
Python
lgpl-3.0
1,902
""" Test script for the Unicode implementation. Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """#" import codecs import struct import sys import unittest import warnings from test import support, string_tests import _string # Error handling (b...
theheros/kbengine
kbe/res/scripts/common/Lib/test/test_unicode.py
Python
lgpl-3.0
71,973
class OneApiError(Exception): pass
infobip/oneapi-python
oneapi/exceptions.py
Python
apache-2.0
39
# Copyright (c) 2020 Dell Inc. or its subsidiaries. # 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...
mahak/cinder
cinder/tests/unit/volume/drivers/dell_emc/powermax/test_powermax_performance.py
Python
apache-2.0
18,376
# -*- coding: utf-8 -*- import pytest import sys from test_base_class import TestBaseClass aerospike = pytest.importorskip("aerospike") try: from aerospike.exception import * except: print "Please install aerospike python client." sys.exit(1) class TestScan(TestBaseClass): def setup_method(self, met...
arthurprs/aerospike-client-python
test/test_scan.py
Python
apache-2.0
8,729
# pylint: disable=C0302 # 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 require...
vj-ug/gcloud-python
gcloud/bigquery/test_job.py
Python
apache-2.0
51,631
# 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...
Huyuwei/tvm
nnvm/tests/python/compiler/test_to_relay.py
Python
apache-2.0
2,176
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you m...
aristanetworks/arista-ovs-nova
nova/virt/xenapi/firewall.py
Python
apache-2.0
4,708
import requests class DeployCommandC: def deploy(self, args, daemon): files = {'myfile': open(args.path, 'rb')} # !! TODO how do files work with swagger? r = requests.post(daemon+"/commands/deploy/"+args.machine, files=files) return r.text
CyberReboot/vcontrol
vcontrol/cli/commands/deploy.py
Python
apache-2.0
277
""" if the scripts are run from non-write directories, PYRO complains that PYRO_STORAGE env. variable points to "no write access" directory according to http://www.xs4all.nl/~irmen/pyro3/manual/3-install.html PYRO uses this directory for data like log files. This variable can be set in the PYRO configuration file (whic...
cmscaltech/fdtcp
src/python/__init__.py
Python
apache-2.0
1,237
# Copyright 2017 Battelle Energy Alliance, 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 t...
idaholab/raven
tests/framework/hybridModel/logicalCode/control.py
Python
apache-2.0
959
from girder.api import access from girder.api.describe import autoDescribeRoute, Description from girder.api.rest import boundHandler, filtermodel from girder.constants import AccessType from girder.exceptions import RestException from girder.models.folder import Folder from girder.models.item import Item from girder.m...
data-exp-lab/girder
plugins/item_tasks/server/json_tasks.py
Python
apache-2.0
9,715
""" Global BZT names Copyright 2019 BlazeMeter 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...
Blazemeter/taurus
bzt/engine/names.py
Python
apache-2.0
692
import re from typing import Any import numpy as np import pandas as pd import ibis.common.exceptions as com import ibis.expr.datatypes as dt import ibis.expr.types as ir fully_qualified_re = re.compile(r"(.*)\.(?:`(.*)`|(.*))") base_typename_re = re.compile(r"(\w+)") _clickhouse_dtypes = { 'Null': dt.Null, ...
cpcloud/ibis
ibis/backends/clickhouse/client.py
Python
apache-2.0
5,153
import matplotlib # Force matplotlib to not use any Xwindows backend. matplotlib.use('Agg') # from basemap/examples/daynight.py import numpy as np from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt from datetime import datetime # example showing how to compute the day/night terminator and shade ...
TheClimateCorporation/conda-recipes
basemap/run_test.py
Python
apache-2.0
1,026
"""Support for Modbus covers.""" from __future__ import annotations from datetime import timedelta from typing import Any from pymodbus.exceptions import ConnectionException, ModbusException from pymodbus.pdu import ExceptionResponse from homeassistant.components.cover import SUPPORT_CLOSE, SUPPORT_OPEN, CoverEntity...
w1ll1am23/home-assistant
homeassistant/components/modbus/cover.py
Python
apache-2.0
7,501
from helpers import read_config import importlib screen = None def init(): """ This function is called by main.py to read the output configuration, pick the corresponding drivers and initialize a Screen object. It also sets ``screen`` global of ``output`` module with created ``Screen`` object.""" global ...
CRImier/pyLCI
output/output.py
Python
apache-2.0
717
#!/usr/bin/env python """ Copyright 2016 The Trustees of Princeton University 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 Unle...
iychoi/syndicate-core
tests/gateways/syndicate-create-write-read.py
Python
apache-2.0
6,509
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
jbedorf/tensorflow
tensorflow/python/keras/callbacks.py
Python
apache-2.0
59,212
#!/usr/bin/env python2.7 # encoding: utf-8 # 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, Vers...
dongnizh/tika-python
tika/tests/tests_params.py
Python
apache-2.0
2,555
# @license # Copyright 2017 Google 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...
janelia-flyem/neuroglancer
python/neuroglancer/google_credentials.py
Python
apache-2.0
3,476
import os from typing import Any from unittest import mock import requests import responses from requests.packages.urllib3.util.retry import Retry from zerver.lib.outgoing_http import OutgoingSession from zerver.lib.test_classes import ZulipTestCase class RequestMockWithProxySupport(responses.RequestsMock): def...
rht/zulip
zerver/tests/test_outgoing_http.py
Python
apache-2.0
4,946
# Copyright 2017 Google 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, s...
cschnei3/forseti-security
google/cloud/security/common/gcp_type/instance_group_manager.py
Python
apache-2.0
1,802
from __future__ import division, absolute_import from __future__ import print_function, unicode_literals import itertools import numpy as np import sklearn.datasets import sklearn.cross_validation import sklearn.metrics import theano import theano.tensor as T import treeano import treeano.nodes as tn from treeano.sand...
diogo149/treeano
examples/activation_transformation/mnist_concatenate_negation.py
Python
apache-2.0
3,342
# Copyright 2017 Battelle Energy Alliance, 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 t...
joshua-cogliati-inl/raven
tests/framework/ensembleModelTests/EM_A_dummy.py
Python
apache-2.0
681
from django import shortcuts from django import http from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy from horizon import tables from horizon import messages from cloudvalidation.api import cloudv class CreateJob(tables.BatchAction): name = "create" ...
denismakogon/cloudvalidation-dashboard
cloudvalidation/ostf_tests/tables.py
Python
apache-2.0
2,739
''' Created on Feb 02, 2014 @author: Mark V Systems Limited (c) Copyright 2014 Mark V Systems Limited, All rights reserved. ''' try: import regex as re except ImportError: import re from collections import defaultdict import os, io, json from datetime import datetime, timedelta from arelle import XbrlConst fro...
Arelle/Arelle
arelle/TableStructure.py
Python
apache-2.0
28,566
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-11 13:14 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('authentication', '0004_use...
Neitsch/ASE4156
authentication/migrations/0005_auto_20171011_1314.py
Python
apache-2.0
616
# automatically generated by the FlatBuffers compiler, do not modify # namespace: graph class UIHistogramType(object): DISCRETE = 0 EQUAL_SPACING = 1 CUSTOM = 2
RobAltena/deeplearning4j
libnd4j/include/graph/generated/nd4j/graph/UIHistogramType.py
Python
apache-2.0
176
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
TribeMedia/synapse
synapse/storage/end_to_end_keys.py
Python
apache-2.0
7,540
import re from typing import Any, Dict import orjson from django.core.exceptions import ValidationError from django.http import HttpResponse from zerver.lib.test_classes import ZulipTestCase from zerver.lib.validator import check_widget_content from zerver.lib.widget import get_widget_data, get_widget_type from zerve...
zulip/zulip
zerver/tests/test_widgets.py
Python
apache-2.0
14,342
# -*- coding: UTF-8 -*- __author__ = 'Jeffrey'
duanhun/apk_for_linux
settings.py
Python
apache-2.0
47
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack Foundation # Copyright 2013 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. ...
raildo/python-keystoneclient
python-keystoneclient-0.4.1.7.gdca1d42/keystoneclient/base.py
Python
apache-2.0
15,511
import pyjd from pyjamas.ui.RootPanel import RootPanel from pyjamas.ui.TabPanel import TabPanel from pyjamas.ui.SimplePanel import SimplePanel from pyjamas.ui.HorizontalPanel import HorizontalPanel from pyjamas.ui.Label import Label from pyjamas.ui.HTML import HTML from pyjamas.ui import HasAlignment from pyjamas im...
anandology/pyjamas
examples/raphael/graffle.py
Python
apache-2.0
2,486
from a10sdk.common.A10BaseClass import A10BaseClass class SamplingEnable(A10BaseClass): """This class does not support CRUD Operations please use parent. :param counters1: {"enum": ["all", "hits"], "type": "string", "description": "'all': all; 'hits': Number of times the record has been used; ", "format...
amwelch/a10sdk-python
a10sdk/core/gslb/gslb_zone_service_dns_ns_record.py
Python
apache-2.0
2,513
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (c) 2002-2016 "Neo Technology," # Network Engine for Objects in Lund AB [http://neotechnology.com] # # This file is part of Neo4j. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Li...
mjbradburn/masters_project
node_modules/neo4j-driver/neokit/neorun.py
Python
apache-2.0
6,800
############################################################################## # Copyright 2010 North Carolina State University # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # ...
ehelms/Opus
opus/lib/prov/deltacloud_old/transition.py
Python
apache-2.0
1,356
# ------------------------------------------------------------- # # 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 unde...
apache/incubator-systemml
src/main/python/systemds/operator/algorithm/builtin/xgboostPredictClassification.py
Python
apache-2.0
1,910
# 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...
nuagenetworks/nuage-openstack-neutron
nuage_neutron/db/migration/alembic_migrations/versions/liberty_release.py
Python
apache-2.0
838
import socket import pytest from urllib3.poolmanager import PoolKey, key_fn_by_scheme, PoolManager from urllib3 import connection_from_url from urllib3.exceptions import ClosedPoolError, LocationValueError from urllib3.util import retry, timeout class TestPoolManager(object): def test_same_url(self): # ...
cloudera/hue
desktop/core/ext-py/urllib3-1.25.8/test/test_poolmanager.py
Python
apache-2.0
13,640
from django.conf.urls import patterns, include, url from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import TemplateView # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', ur...
cmgrote/tapiriik
tapiriik/urls.py
Python
apache-2.0
7,197
# This file is part of Androguard. # # Copyright (C) 2012/2013/2014, Anthony Desnos <desnos at t0t0.fr> # 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://...
blaquee/androguard
androguard/core/bytecodes/dvm.py
Python
apache-2.0
256,233
# 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 # distributed under t...
stackforge/python-tackerclient
tackerclient/tacker/v1_0/nfvo/vnffgd.py
Python
apache-2.0
3,389
# # 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...
robertwb/incubator-beam
sdks/python/apache_beam/testing/load_tests/load_test_metrics_utils.py
Python
apache-2.0
19,588
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2012,2014,2016 Contributor # # 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...
quattor/aquilon
lib/aquilon/worker/commands/show_realm_all.py
Python
apache-2.0
1,108
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
xzturn/tensorflow
tensorflow/python/framework/op_callbacks_test.py
Python
apache-2.0
33,617
# -*- coding: utf-8 -*- # Copyright 2022 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...
googleapis/python-datacatalog
google/cloud/datacatalog_v1beta1/services/data_catalog/transports/__init__.py
Python
apache-2.0
1,167
# 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 # distributed under t...
NeCTAR-RC/horizon
openstack_dashboard/dashboards/identity/users/tables.py
Python
apache-2.0
7,853
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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/lice...
grahamhayes/designate
designate/tests/test_api/test_v2/test_limits.py
Python
apache-2.0
2,306
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
TribeMedia/synapse
tests/util/test_lrucache.py
Python
apache-2.0
7,584
# :coding: utf-8 # :copyright: Copyright (c) 2013 Martin Pengelly-Phillips # :license: See LICENSE.txt. import pytest from lucidity import Template, Resolver from lucidity.error import ParseError, FormatError, ResolveError class ResolverFixture(Resolver): '''Example resolver.''' def __init__(self, template...
BigRoy/lucidity
test/unit/test_template.py
Python
apache-2.0
12,561
from app import app, con, api base_url = '/api' parser = reqparse.RequestParser() cursor = con.cursor() class UserAPI(Resource): def get(self, id): return {'hello': 'world'} def put(self, id): pass def post(self, id): pass class LoginAPI(Resource): def post(self): ar...
audip/doctorsfor.me
app/backup/_routes.py
Python
apache-2.0
618
#!/usr/bin/env python from __future__ import print_function import csv import pymongo from itertools import chain, combinations import shutil import os import sys if os.path.exists("/home/ggdhines/github/pyIBCC/python"): sys.path.append("/home/ggdhines/github/pyIBCC/python") else: sys.path.append("/Users/greghi...
camallen/aggregation
experimental/mongo/IBCC.py
Python
apache-2.0
12,657
#!c:\users\fredqian\appdata\local\programs\python\python36-32\python.exe # EASY-INSTALL-ENTRY-SCRIPT: 'esptool==2.3.1','console_scripts','esptool.py' __requires__ = 'esptool==2.3.1' import re import sys from pkg_resources import load_entry_point if __name__ == '__main__': sys.argv[0] = re.sub(r'(-script\.pyw?|\.ex...
xbed/Mixly_Arduino
mixly_arduino/mpBuild/common/esptool.py-script.py
Python
apache-2.0
442
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
mixturemodel-flow/tensorflow
tensorflow/python/estimator/model_fn.py
Python
apache-2.0
12,164
from ._Attitude import * from ._BasicStatus import * from ._BasicMode import * from ._RCState import *
cberner/rospilot
src/rospilot/msg/__init__.py
Python
apache-2.0
103
# Copyright 2012 VMware, 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 ...
cloudbase/neutron-virtualbox
neutron/tests/unit/openvswitch/test_ovs_tunnel.py
Python
apache-2.0
28,244
from django.contrib import admin from account.models import UserProfile from django.contrib.auth.models import Permission, Group class UserProfileAdmin(admin.ModelAdmin): #,'qq','first_name','last_name','truename','email','groups' fieldsets = [ (None,{'fields':['username']}), ('Profile',{'fields':['last_name','fir...
raphaelsoul/supermilai
account/admin.py
Python
bsd-2-clause
918
# -*- coding: utf-8 -*- """ chemreac.chemistry ================== This module collects classes useful for describing substances, reactions and reaction systems. The classes have methods to help with consistent low-level conversion to numerical parameters of the model. The classes are from the `chempy <https://pypi.pyt...
chemreac/chemreac
chemreac/chemistry.py
Python
bsd-2-clause
1,640
import json from io import BytesIO import pytest from rest_framework.exceptions import ParseError from rest_framework_json_api.parsers import JSONParser from rest_framework_json_api.utils import format_value from tests.views import BasicModelViewSet class TestJSONParser: @pytest.fixture def parser(self): ...
django-json-api/rest_framework_ember
tests/test_parsers.py
Python
bsd-2-clause
4,172
#!/usr/bin/python # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 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: # # 1. Redistributions of source code must retain the ab...
andir/ganeti
lib/tools/burnin.py
Python
bsd-2-clause
47,078
# -*- coding: utf-8 -*- """Functions to plot evoked M/EEG data (besides topographies).""" from __future__ import print_function # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # ...
teonlamont/mne-python
mne/viz/evoked.py
Python
bsd-3-clause
94,662
""" ================================================================ Plot the decision surface of a decision tree on the iris dataset ================================================================ Plot the decision surface of a :ref:`decision tree <tree>` trained on pairs of features of the iris dataset. For each p...
cdegroc/scikit-learn
examples/tree/plot_iris.py
Python
bsd-3-clause
2,073
#!/usr/bin/python # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Cros unit test library, with utility functions.""" from __future__ import print_function import collections import contextlib i...
zhang0137/chromite
lib/cros_test_lib.py
Python
bsd-3-clause
29,541
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'openwisp2.settings') from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
openwisp/django-x509
tests/manage.py
Python
bsd-3-clause
252
#Main GWR classes #Offset does not yet do anyhting and needs to be implemented __author__ = "Taylor Oshan Tayoshan@gmail.com" import numpy as np import numpy.linalg as la from scipy.stats import t from .kernels import * from .diagnostics import get_AIC, get_AICc, get_BIC import pysal.spreg.user_output as USER from c...
CartoDB/crankshaft
src/py/crankshaft/crankshaft/regression/gwr/base/gwr.py
Python
bsd-3-clause
39,275
SPIDER_MANAGER_CLASS = 'slybot.spidermanager.SlybotSpiderManager' EXTENSIONS = {'slybot.closespider.SlybotCloseSpider': 1} ITEM_PIPELINES = ['slybot.dupefilter.DupeFilterPipeline'] SPIDER_MIDDLEWARES = {'slybot.spiderlets.SpiderletsMiddleware': 999} # as close as possible to spider output SLYDUPEFILTER_ENABLED = True P...
aazen/DayOne
slybot/slybot/settings.py
Python
bsd-3-clause
425
""" =========================================== Robust linear model estimation using RANSAC =========================================== In this example we see how to robustly fit a linear model to faulty data using the RANSAC algorithm. """ import numpy as np from matplotlib import pyplot as plt from sklearn import ...
Tong-Chen/scikit-learn
examples/linear_model/plot_ransac.py
Python
bsd-3-clause
1,671
import numpy as np from numpy.testing import assert_array_equal from numpy.testing.decorators import skipif from skimage.morphology import convex_hull_image from skimage.morphology._convex_hull import possible_hull try: import scipy.spatial scipy_spatial = True except ImportError: scipy_spatial = False @...
emmanuelle/scikits.image
skimage/morphology/tests/test_convex_hull.py
Python
bsd-3-clause
2,035
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from numpy.testing import assert_allclose from .. import bayesian_blocks, RegularEvents def test_single_change_point(rseed=0): rng = np.random.RandomState(rseed) x = np.concatenate([rng.rand(100), ...
funbaker/astropy
astropy/stats/tests/test_bayesian_blocks.py
Python
bsd-3-clause
4,205
# being a bit too dynamic # pylint: disable=E1101 from __future__ import division import warnings import re from collections import namedtuple from distutils.version import LooseVersion import numpy as np from pandas.util._decorators import cache_readonly, Appender from pandas.compat import range, lrange, map, zip, ...
harisbal/pandas
pandas/plotting/_core.py
Python
bsd-3-clause
128,319