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
# -*- coding: utf-8 -*- # 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...
msabramo/kallithea
kallithea/config/middleware.py
Python
gpl-3.0
4,316
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp import SUPERUSER_ID from openerp.addons.web import http from openerp.addons.web.http import request import werkzeug import datetime import time from openerp.tools.translate import _ from openerp.addons.webs...
aifil/odoo
addons/website_quote/controllers/main.py
Python
gpl-3.0
11,948
#!/usr/bin/env python """ Just as e01_plot_root_files, but plots same hists into same canvases. Also normalizes histograms to integral. See the mk_rootfile_plotter call below. """ outdir = 'MyPlottedRootFilesCombined' # set root to batch mode (it opens an x-connection otherwise) import ROOT ROOT.gROOT.SetBatch() RO...
HeinerTholen/Varial
varial_example/e01_plot_root_files_combined.py
Python
gpl-3.0
1,161
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, erpnext from frappe.utils import cint, cstr, flt from frappe import _ from erpnext.setup.utils import get_exchange_rate from frappe.websi...
bohlian/erpnext
erpnext/manufacturing/doctype/bom/bom.py
Python
gpl-3.0
21,742
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import os import re im...
pavels/pootle
setup.py
Python
gpl-3.0
9,329
import os from os.path import join from distutils.core import setup def read(fname): return open(join(os.path.dirname(__file__), fname)).read() setup( name = "RNAsketch", version = "1.5", author = "Stefan Hammer", author_email = "s.hammer@univie.ac.at", description = ("A wrapper framework to d...
ribonets/RNAsketch
setup.py
Python
gpl-3.0
1,145
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of emesene. # # emesene 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) ...
tiancj/emesene
codestats.py
Python
gpl-3.0
2,104
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import json import pytest from django impo...
unho/pootle
tests/core/views.py
Python
gpl-3.0
27,597
from pprint import pprint from pyknyx.api import Device, FunctionalBlock from pyknyx.core.ets import ETS # Weather station class definition class WeatherStationFB(FunctionalBlock): # Datapoints (= Group Objects) definition DP_01 = dict(name="temperature", dptId="9.001", default=0., access="output") DP_02...
knxd/pKNyX
pyknyx/proto/dummy_1.py
Python
gpl-3.0
1,907
from mock import ( patch, Mock ) from pytest import raises from kiwi.volume_manager import VolumeManager from kiwi.exceptions import KiwiVolumeManagerSetupError class TestVolumeManager: def test_volume_manager_not_implemented(self): with raises(KiwiVolumeManagerSetupError): VolumeManager...
SUSE/kiwi
test/unit/volume_manager/init_test.py
Python
gpl-3.0
1,030
#!/usr/bin/python import sys, os, string, shutil, time def walktree(top = '.', depthfirst = True): import os, stat, types names = os.listdir(top) if not depthfirst: yield top, names for name in names: try: st = os.lstat(os.path.join(top, name)) except os.error: continue if stat.S_ISDIR(st.st_mode):...
fabiencastan/TuttleOFX
plugins/_scripts/newPlugin.py
Python
gpl-3.0
5,048
"""Fixes file permissions after the file gets written on import. Put something like the following in your config.yaml to configure: permissions: file: 644 dir: 755 """ import os from beets import config, util from beets.plugins import BeetsPlugin from beets.util import ancestry def conver...
rembo10/headphones
lib/beetsplug/permissions.py
Python
gpl-3.0
4,108
# Copyright (C) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/WebKit/Source/bindings/scripts/v8_utilities.py
Python
gpl-3.0
24,681
__author__ = 'traviswarren' from datetime import datetime from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from train_track.apps.event.models import Event from train_track.tests.model_factory import EventFactory class EventGetDeleteViewTestCa...
travisjwarren/train_track
train_track/tests/apps/profile/test_user_profile_active_views.py
Python
gpl-3.0
2,174
# -*- coding: utf-8 -*- """ This is and example local_config file. It is loaded if no local_config file is found. To make your own one, create a local_config.py and place it in one of the same directories where pyHegel.ini can be placed (see pyHegel_default.ini for those locations) It is often in the .pyHegel dir...
JeanOlivier/pyHegel
pyHegel/local_config_template.py
Python
gpl-3.0
2,433
# CUPS Cloudprint - Print via Google Cloud Print # Copyright (C) 2011 Simon Cadman # # 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 y...
jjscarafia/CUPS-Cloud-Print
testing/mockrequestor.py
Python
gpl-3.0
2,318
# -*- coding: utf-8 -*- from rules.rule import * class Rule(KLCRule): """ Create the methods check and fix to use with the kicad lib files. """ def __init__(self, component): super(Rule, self).__init__(component, 'Pin requirements') def checkPinOrigin(self, gridspacing=100): self...
KiCad/kicad-library-utils
schlib/rules/S4_1.py
Python
gpl-3.0
4,217
#!/usr/bin/env python # -*- coding: utf-8 -*- # Cypress -- C++ Spiking Neural Network Simulation Framework # Copyright (C) 2016 Andreas Stöckel # # 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 Found...
hbp-sanncs/cypress
scripts/plot_epsp.py
Python
gpl-3.0
2,113
# -*- coding: latin-1 -*- from __future__ import print_function import unittest from aiml.WordSub import WordSub class TestWordSub( unittest.TestCase ): longMessage = True def setUp(self): self.subber = WordSub() self.subber["apple"] = "banana" self.subber["orange"] = "pear" ...
walterbender/speak
aiml/PyAIML-0.9.3/test/test_wordsub.py
Python
gpl-3.0
957
# 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...
jctanner/ansible
lib/ansible/module_utils/urls.py
Python
gpl-3.0
78,192
# This file is part of Indico. # Copyright (C) 2002 - 2015 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; either version 3 of the # License, or (a...
XeCycle/indico
indico/modules/rb/services/rooms.py
Python
gpl-3.0
4,183
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division, unicode_literals ## ## This file is part of MoaT, the Master of all Things. ## ## MoaT is Copyright © 2007-2016 by Matthias Urlichs <matthias@urlichs.de>, ## it is licensed under the GPLv3. See the file `READM...
smurfix/MoaT
test/mod_io.py
Python
gpl-3.0
2,424
__author__ = 'DM_' import time import cmd import sys import os from impacket.smbconnection import * from impacket.dcerpc.v5.dcomrt import DCOMConnection from impacket.dcerpc.v5.dcom import wmi from impacket.dcerpc.v5.dtypes import NULL from lib.ProxiesFunctions import * OUTPUT_FILENAME = '__' class WMIEXEC: d...
x0day/MultiProxies
modules/Exploit/windows/wmi_exec.py
Python
gpl-3.0
6,738
# -*- coding: utf-8 -*- """ Created on Thu Jul 23 09:40:41 2015 This file is part of pyNLO. pyNLO 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 optio...
ycasg/PyNLO
src/pynlo/devices/grating_compressor.py
Python
gpl-3.0
7,774
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # Author: Zheng <zxyful@gmail.com> # Create: 2017-03-25 13:45:16 from pymemcache.client.base import Client client = Client(('localhost', 11211)) client.set('name', 'zxyle') client.get('name') client.delete('name') client.replace('key', 'value') client.append('key', 'valu...
zxyle/LearningPython
memcached.py
Python
gpl-3.0
405
"""Return some useful reddit info""" import pickle from datetime import datetime import dave.module import dave.config from twisted.words.protocols.irc import assembleFormattedText, attributes as A from requests import get from humanize import naturaltime, naturaldelta, intcomma @dave.module.match(r'.*(?:^| )(?:https?...
w4/belle
dave/modules/reddit.py
Python
gpl-3.0
5,611
#!/usr/bin/env python """ cmaling:: [mm] thf cmalign RF01831.cm 4lvv.seq # STOCKHOLM 1.0 #=GF AU Infernal 1.1.2 4lvv -GGAGAGUA-GAUGAUUCGCGUUAAGUGUGUGUGA-AUGGGAUGUCG-UCACACAACGAAGC---GAGA---GCGCGGUGAAUCAUU-GCAUCCGCUCCA #=GR 4lvv PP .********.******************9999998.***********.8999999***...
mmagnus/rna-pdb-tools
rna_tools/tools/rna_alignment/rna_align_seq_to_alignment.py
Python
gpl-3.0
1,675
import argparse import logging import os import re import subprocess import sys from six import iteritems here = os.path.abspath(os.path.dirname(__file__)) wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir)) logger = logging.getLogger() def build(tag="wpt:local", *args, **kwargs): subprocess.c...
splav/servo
tests/wpt/web-platform-tests/tools/docker/frontend.py
Python
mpl-2.0
4,629
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2004-2012 Pexego Sistemas Informáticos All Rights Reserved # $Omar Castiñeira Saavedra$ <omar@pexego.es> # # This program is free software: you can redistribute it and/or modify # it unde...
Comunitea/CMNT_00040_2016_ELN_addons
eln_custom/__openerp__.py
Python
agpl-3.0
2,034
from queue import Queue from bears.general.LineCountBear import LineCountBear from tests.LocalBearTestHelper import LocalBearTestHelper from coalib.results.Result import RESULT_SEVERITY, Result from coalib.settings.Section import Section from coalib.settings.Setting import Setting class LineCountBearTest(LocalBearTe...
sounak98/coala-bears
tests/general/LineCountBearTest.py
Python
agpl-3.0
1,068
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or m...
gurneyalex/vertical-travel
airport/__openerp__.py
Python
agpl-3.0
1,806
# -*- coding: utf-8 -*- from django.shortcuts import render from api_v1.models import Sticker, Tag def index(request): stickers = Sticker.objects.all() tags = Tag.objects.all() content = { 'stickers': stickers, 'tags': tags, } return render( request, 'sti...
chaostreff-bern/stickerview
page/views.py
Python
agpl-3.0
355
"""Handle events that were forwarded from the segment.io webhook integration""" import datetime import json import logging from django.conf import settings from django.contrib.auth.models import User from django.http import HttpResponse from django.views.decorators.http import require_POST from django_future.csrf imp...
DNFcode/edx-platform
common/djangoapps/track/views/segmentio.py
Python
agpl-3.0
10,090
# -*- 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): # Adding field 'Building.walk_score' db.add_column(u'building_building', 'walk_score', ...
City-of-Bloomington/green-rental
building/migrations/0002_auto__add_field_building_walk_score__add_field_building_energy_score__.py
Python
agpl-3.0
9,143
try: import ujson as json except ImportError: import json from six.moves.urllib.parse import parse_qsl import requests.sessions from . import session # Catalog class # ________________________________________________________________________________________ class Catalog(object): """:todo: Document Catal...
wumpus/internetarchive
internetarchive/catalog.py
Python
agpl-3.0
5,796
# -*- coding: utf-8 -*- # Kuulemma # Copyright (C) 2014, Fast Monkeys Oy # # 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, or # (at your option) any later...
fastmonkeys/kuulemma
gunicorn.conf.py
Python
agpl-3.0
831
#!/usr/bin/env python # encoding: utf-8 """ process.py Created by Daniel Yang on 2011-08-22. Copyright (c) 2011 __MyCompanyName__. All rights reserved. """ import sys import os xml = """<?xml version="1.0" encoding="utf-8"?> <openerp> <data> <!-- Resource: res.partner --> %s </data> ...
Johnzero/erp
openerp/addons/fg_picking/data/process_cus.py
Python
agpl-3.0
2,049
# Copyright (C) 2011 Lincoln de Sousa <lincoln@comum.org> # # 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, or # (at your option) any later version. # # ...
clarete/dad
dad/model.py
Python
agpl-3.0
11,069
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from django.core.urlresol...
suutari-ai/shoop
shuup/admin/modules/products/views/toolbars.py
Python
agpl-3.0
7,024
# Generated by Django 2.0.13 on 2021-02-02 11:30 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('iati_synchroniser', '0020_auto_20201102_2000'), ] operations = [ migrations.CreateModel( name=...
openaid-IATI/OIPA
OIPA/iati_synchroniser/migrations/0021_datasetfailedpickup.py
Python
agpl-3.0
933
from django.conf.urls import patterns from django.conf.urls import url from django.conf.urls import include urlpatterns = patterns( '', url('', include('api.activity.urls')), url('^v1/', include('api.v1.urls')), url('', include('api.v3.urls')), )
catalpainternational/OIPA
OIPA/api/urls.py
Python
agpl-3.0
265
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Telegram bot to play UNO in group chats # Copyright (c) 2016 Jannes Höke <uno@jhoeke.de> # # 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 Foundatio...
jh0ker/mau_mau_bot
user_setting.py
Python
agpl-3.0
1,412
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Accounting and Finance', 'version': '1.1', 'author': 'OpenERP SA', 'category': 'Accounting & Finance', 'sequence': 10, 'summary': 'Financial and Analytic Accounting', 'description': ...
tvtsoft/odoo8
addons/account_accountant/__openerp__.py
Python
agpl-3.0
951
"""Tests for augur mask NOTE: Several functions are monkeypatched in these tests. If you change the arguments for any function in mask.py, check that it is correctly updated in this file. """ import argparse import os import pytest import random import string from Bio import SeqIO from Bio.Seq import Seq from Bio.Seq...
nextstrain/augur
tests/test_mask.py
Python
agpl-3.0
19,766
import grok from lxml import etree import cgi from zope import component from zope.publisher.interfaces import INotFound from imagestore.interfaces import IRest, IXml, IHTTPEmbed, IHTTPOnly200 from imagestore.xml import (export, Settings, NS, XMLValidationError, XMLRecognitionError, ...
idstudiolab/imagestore
src/imagestore/rest.py
Python
lgpl-2.1
9,543
#!/usr/bin/env python3 #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgp...
nuclear-wizard/moose
modules/stochastic_tools/examples/batch/plot.py
Python
lgpl-2.1
2,889
# 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) import os import pytest import spack.spec import llnl.util.filesystem as fs import spack.environment as ev from spack.main...
iulian787/spack
lib/spack/spack/test/cmd/dev_build.py
Python
lgpl-2.1
13,278
def itemTemplate(): return ['object/tangible/wearables/armor/kashyyykian_hunting/shared_armor_kashyyykian_hunting_bicep_l.iff'] def customItemName(): return 'Kashyyykian Hunting Bicep Left' def customItemStackCount(): return 1 def customizationAttributes(): return [] def customizationValues(): return ...
agry/NGECore2
scripts/loot/lootItems/armor/kashyyykian_hunting/kashyyykian_hunting_bicep_left.py
Python
lgpl-3.0
678
from services.sui import SUIWindow from services.sui.SUIWindow import Trigger from java.util import Vector import sys def setup(): return def run(core, actor, target, commandString): core.chatService.broadcastPlanet(commandString, actor.getPlanet()) actor.sendSystemMessage(' \\#FE2EF7 [GM] \\#FFFFFF broadca...
agry/NGECore2
scripts/commands/broadcastplanet.py
Python
lgpl-3.0
374
import sys from ase.calculators.emt import EMT from ase.constraints import FixInternals from ase.optimize.bfgs import BFGS from ase.structure import molecule from ase.test import NotAvailable if sys.version_info[0] == 3: raise NotAvailable system = molecule('CH3CH2OH') system.center(vacuum=5.0) system.rattl...
suttond/MODOI
ase/test/dihedralconstraint.py
Python
lgpl-3.0
2,118
# # 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...
rednaxelafx/apache-spark
python/pyspark/streaming/tests/test_kinesis.py
Python
apache-2.0
3,759
#!/usr/bin/env python # # $Id: process_detail.py 1498 2012-07-24 21:41:28Z g.rodola $ # # Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Print detailed information about a process. Author:...
sergecodd/FireFox-OS
B2G/gecko/python/psutil/examples/process_detail.py
Python
apache-2.0
4,567
#!/usr/bin/env python3 from __future__ import print_function import os import pwd import sys def check_venv(filename): # type: (str) -> None try: import ujson except ImportError: print("You need to run %s inside a Zulip dev environment." % (filename,)) user_id = os.getuid() ...
vaidap/zulip
tools/lib/sanity_check.py
Python
apache-2.0
672
# Copyright (c) 2010 Citrix Systems, 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 applicab...
shakamunyi/nova
nova/tests/unit/virt/xenapi/test_xenapi.py
Python
apache-2.0
176,510
# 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
tutorials/autotvm/tune_relay_cuda.py
Python
apache-2.0
15,613
#!/usr/bin/env python # -*- coding: utf-8 -*- # Import unicode literals so that StringIO works on both Python 2 and 3 from __future__ import unicode_literals from __future__ import print_function import sys import os import re from argparse import ArgumentParser try: # Python 3 from io import StringIO except...
fbudin69500/ITK
Wrapping/Generators/SwigInterface/igenerator.py
Python
apache-2.0
42,200
"""Tests for the HomeKit component.""" from __future__ import annotations import asyncio import os from unittest.mock import ANY, AsyncMock, MagicMock, Mock, patch from pyhap.accessory import Accessory from pyhap.const import CATEGORY_CAMERA, CATEGORY_TELEVISION import pytest from homeassistant import config as hass...
w1ll1am23/home-assistant
tests/components/homekit/test_homekit.py
Python
apache-2.0
39,316
"""Support for the Pico TTS speech service.""" import logging import os import shutil import subprocess import tempfile import voluptuous as vol from homeassistant.components.tts import CONF_LANG, PLATFORM_SCHEMA, Provider _LOGGER = logging.getLogger(__name__) SUPPORT_LANGUAGES = ["en-US", "en-GB", "de-DE", "es-ES"...
Cinntax/home-assistant
homeassistant/components/picotts/tts.py
Python
apache-2.0
1,833
from django.conf import settings import pika from pika.adapters.blocking_connection import BlockingChannel from pika.spec import Basic import logging import ujson import random import time import threading from collections import defaultdict from zerver.lib.utils import statsd from typing import Any, Callable, Dict, ...
Galexrt/zulip
zerver/lib/queue.py
Python
apache-2.0
12,945
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ggrc.views Handle non-RESTful views, e.g. routes which return HTML rather than JSON """ import collections import json from flask import flash from flask import g from flask import render_template from ...
VinnieJohns/ggrc-core
src/ggrc/views/__init__.py
Python
apache-2.0
12,838
# Copyright 2014 # The Cloudscaling Group, 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...
stackforge/ec2-api
ec2api/api/availability_zone.py
Python
apache-2.0
7,486
# Copyright 2018 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...
renyi533/tensorflow
tensorflow/python/tpu/feature_column_v2.py
Python
apache-2.0
41,509
# -*- coding: utf-8 -*- # # goose3 documentation build configuration file, created by # sphinx-quickstart on Sat Jan 6 10:10:16 2018. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
goose3/goose3
docs/source/conf.py
Python
apache-2.0
5,445
import unittest import Mariana.layers as ML import Mariana.layers as ML import Mariana.decorators as dec import Mariana.costs as MC import Mariana.regularizations as MR import Mariana.scenari as MS import Mariana.activations as MA import Mariana.training.datasetmaps as MD import theano.tensor as tt import numpy clas...
JonathanSeguin/Mariana
Mariana/tests/datasetmaps_tests.py
Python
apache-2.0
1,261
# Copyright 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
nikesh-mahalka/networking-bgpvpn
networking_bgpvpn/neutron/db/migration/alembic_migrations/versions/start_networking_bgpvpn.py
Python
apache-2.0
869
# =============================================================================== # Copyright 2012 Jake 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.org/licens...
USGSDenverPychron/pychron
pychron/lasers/points/points_programmer.py
Python
apache-2.0
17,080
#coding:UTF-8 """ 核心配置文件 """ #邮件预警配置 EMAIL_FROM = "邮箱" EMAIL_PASSWORD = "密码" EMAIL_TO = "收件箱" EMAIL_TITLE = u"服务器警告邮件" EMAIL_SMTP = "smtp.gmail.com" #功能开启 USE_DISK = True #是否启用磁盘监控 USE_HTTP = True #是否启用http检测监控 USE_MYSQL = True #是否启用mysql监控 #警报间隔时间(防止短时间内发送大量警报) WARN_INTERVAL = 600
yubang/smallMonitor
config/config.py
Python
apache-2.0
432
"""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 agreed to in ...
dq922/PerfKitExplorer
server/perfkit/explorer/handlers/explorer_config.py
Python
apache-2.0
2,132
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache/incubator-airflow
airflow/providers/google/cloud/operators/pubsub.py
Python
apache-2.0
40,994
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ COHORTE Monitor: State machines definitions :author: Thomas Calmant :license: Apache Software License 2.0 .. Copyright 2014 isandlaTech Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance...
isandlaTech/cohorte-devtools
qualifier/deploy/cohorte-home/repo/cohorte/monitor/fsm.py
Python
apache-2.0
3,626
"""Support for Reddit.""" from __future__ import annotations from datetime import timedelta import logging import praw import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.const import ( ATTR_ID, CONF_CLIENT_ID, CONF_CLIENT_SECRET, CONF...
mezz64/home-assistant
homeassistant/components/reddit/sensor.py
Python
apache-2.0
4,505
#!/usr/bin/env python """ CmpRuns - A simple tool for comparing two static analyzer runs to determine which reports have been added, removed, or changed. This is designed to support automated testing using the static analyzer, from two perspectives: 1. To monitor changes in the static analyzer's reports on real co...
jeltz/rust-debian-package
src/llvm/tools/clang/utils/analyzer/CmpRuns.py
Python
apache-2.0
9,340
# =============================================================================== # Copyright 2020 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.org/licenses/LICE...
USGSDenverPychron/pychron
pychron/gis/nodes.py
Python
apache-2.0
1,821
from a10sdk.common.A10BaseClass import A10BaseClass class Inside(A10BaseClass): """Class Description:: Inside configuration for NAT. Class inside supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` :param DeviceProxy: The de...
amwelch/a10sdk-python
a10sdk/core/ip/ip_nat_inside.py
Python
apache-2.0
824
# 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 appli...
PaddlePaddle/Paddle
python/paddle/fluid/incubate/fleet/tests/fleet_deep_ctr.py
Python
apache-2.0
6,715
# Copyright 2012 Rackspace Hosting, 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 ...
zhaoxuan/baidu_restkin
restkin/scribe.py
Python
apache-2.0
2,308
import textparser import pyPdf text1 = "" pdf = pyPdf.PdfFileReader(open('nick_bostrom-the_ethics_of_artificial_intelligence.pdf', "rb")) for page in pdf.pages: text1 += page.extractText() print('Parsing text from pyPDF') parser1 = textparser.TextParser() parser1.parse(text1) out1 = open('out1.txt', 'w') for s...
mrzl/ECO
src/experiments/parser_test.py
Python
apache-2.0
1,613
# Copyright (c) 2016 Ansible, Inc. # All Rights Reserved # Django from django.core.management.base import BaseCommand from django.core.management.base import CommandError from django.contrib.auth.models import User class UpdatePassword(object): def update_password(self, username, password): changed = Fal...
GoogleCloudPlatform/sap-deployment-automation
third_party/github.com/ansible/awx/awx/main/management/commands/update_password.py
Python
apache-2.0
1,421
############################################################################ # Copyright 2016 Albin Severinson # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may no...
severinson/Coded-Shuffling
tests/solvertests.py
Python
apache-2.0
6,564
#!/usr/bin/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 required b...
donspaulding/adspygoogle
examples/adspygoogle/dfp/v201204/get_all_third_party_slots.py
Python
apache-2.0
1,664
# -*- coding: 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, Version 2.0 (the #...
artwr/airflow
tests/contrib/operators/test_gcp_container_operator.py
Python
apache-2.0
12,581
# pyOCD debugger # Copyright (c) 2006-2013,2018-2021 Arm Limited # Copyright (c) 2021 Chris Reed # SPDX-License-Identifier: Apache-2.0 # # 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 # # ...
pyocd/pyOCD
pyocd/probe/pydapaccess/cmsis_dap_core.py
Python
apache-2.0
21,387
#! /usr/bin/env python3 """Base16, Base32, Base64 (RFC 3548), Base85 and Ascii85 data encodings""" # Modified 04-Oct-1995 by Jack Jansen to use binascii module # Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support # Modified 22-May-2007 by Guido van Rossum to use bytes everywhere import re import struc...
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.5.9/Python-3.5.9/Lib/base64.py
Python
apache-2.0
20,511
#!/usr/bin/env python """OSX specific utils.""" import ctypes import ctypes.util import os import platform import logging from grr.client import client_utils_linux from grr.client.osx import objc from grr.lib import utils from grr.lib.rdfvalues import paths as rdf_paths def OSXFindProxies(): """This reads the ...
pidydx/grr
grr/client/client_utils_osx.py
Python
apache-2.0
8,804
''' Created on Oct 6, 2010 @author: jnaous ''' from django.conf import settings from expedient.common.tests.manager import SettingsTestCase from django.contrib.auth.models import User from expedient.common.middleware import threadlocals from openflow.dummyom.models import DummyOM from expedient.common.tests.client imp...
dana-i2cat/felix
expedient/src/python/expedient/clearinghouse/geni/gopenflow/tests/__init__.py
Python
apache-2.0
9,657
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
queria/my-tempest
tempest/api/identity/admin/v3/test_tokens.py
Python
apache-2.0
6,739
# 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...
gongweibao/cloud
demo/image_classification/resnet.py
Python
apache-2.0
2,488
# -*- coding: utf-8 -*- # # Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
dhermes/google-cloud-python
container/google/cloud/container_v1/gapic/transports/cluster_manager_grpc_transport.py
Python
apache-2.0
17,477
# Copyright 2015-2017 Capital One Services, 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 ...
jimmyraywv/cloud-custodian
c7n/policy.py
Python
apache-2.0
26,383
import time from functools import wraps from typing import Any, Dict, List, Set, cast from django.core.exceptions import ValidationError from django.http import HttpRequest, HttpResponse from django.utils.translation import ugettext as _ from zerver.lib.actions import recipient_for_user_profiles from zerver.lib.addre...
rht/zulip
zerver/lib/drafts.py
Python
apache-2.0
6,549
import pymongo import json import random import datetime import uuid import bson positions = ['Flogsta','Polacksbacken','Central Station','Granby','Gamla Uppsala','Uppsala Science Park','Uppsala Centrum','Carolina Rediviva', 'Uppsala Hospital'] coordinates = [[59.851252, 17.593290], [59.840427, 17.647628], [59.858052,...
EricssonResearch/monad
TravelRecommendation/Scripts/case5_requests.py
Python
apache-2.0
3,470
# Copyright 2014, 2017 IBM Corp. # # 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...
Juniper/nova
nova/tests/unit/virt/powervm/test_vm.py
Python
apache-2.0
24,497
# Copyright (c) 2014 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
projectcalico/calico-neutron
neutron/cmd/sanity/checks.py
Python
apache-2.0
4,937
# -*- coding: utf-8 -*- import unittest import inspect import os import sys import glob import hashlib # ensure that androguard is loaded from this source code localmodule = os.path.realpath( os.path.join(os.path.dirname(inspect.getfile(inspect.currentframe())), '..')) if localmodule not in sys.path: sys.path...
reox/androguard
tests/test_apk.py
Python
apache-2.0
39,603
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
silenceli/nova
nova/api/openstack/compute/contrib/hosts.py
Python
apache-2.0
12,910
# Copyright 2013: Mirantis 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...
eonpatapon/rally
tests/unit/common/test_utils.py
Python
apache-2.0
20,461
from flask_wtf import Form as BaseForm class StripFilter(): def __call__(self, value): if value is not None and hasattr(value, 'strip'): return value.strip() else: return value class Form(BaseForm): """ A form that strips the values of all its fields. """ _decorat...
opendatadurban/multi-app
multiapp/forms.py
Python
apache-2.0
745
#!/usr/bin/env python """This is a selenium test harness used interactively with Selenium IDE.""" import copy import socket import threading import urllib from wsgiref import simple_server # pylint: disable=unused-import # pylint: disable=g-bad-import-order from grr.gui import admin_ui from grr.gui import django_lib...
spnow/grr
gui/runtests.py
Python
apache-2.0
4,296
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
queria/my-tempest
tempest/api/compute/keypairs/test_keypairs.py
Python
apache-2.0
5,304
#!/usr/bin/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 required b...
donspaulding/adspygoogle
examples/adspygoogle/dfp/v201206/get_all_user_team_associations.py
Python
apache-2.0
1,933