code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
import smtplib from email.mime.text import MIMEText def send(config, message): sender = config.email password = config.password recipients = config.recipients session = build_session(sender, password) message = build_message(sender, recipients, message) session.sendmail(sender, recipients, me...
twbarber/toppit
toppit/mailer.py
Python
mit
741
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import re import unicodedata from odoo import _, api, fields, models from odoo.exceptions import ValidationError from odoo.tools import ustr from odoo.tools.safe_eval import safe_eval _logger = logging.g...
chienlieu2017/it_management
odoo/addons/mail/models/mail_alias.py
Python
gpl-3.0
12,189
# -*- 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-domains
samples/generated_samples/domains_v1_generated_domains_configure_contact_settings_sync.py
Python
apache-2.0
1,593
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- import numpy as np from sympy.physics.paulialgebra import delta def b...
adityaarun1/faster_rcnn_pytorch
faster_rcnn/fast_rcnn/bbox_transform.py
Python
mit
3,098
from __future__ import unicode_literals from django.core.urlresolvers import resolve from django.contrib.auth.middleware import AuthenticationMiddleware as DjangoAuthenticationMiddleware from django.contrib.auth import get_user from django.http.response import HttpResponseRedirect from is_core.exceptions import HttpR...
vojtatranta/django-is-core
is_core/middleware/__init__.py
Python
lgpl-3.0
681
import os,sys,urllib2 import xbmcplugin,xbmcgui import xml.etree.ElementTree as ET __addon__ = "SomaFM" __addonid__ = "plugin.audio.somafm" __version__ = "0.0.2" def log(msg): print "[PLUGIN] '%s (%s)' " % (__addon__, __version__) + str(msg) log("Initialized!") log(sys.argv) rootURL = "http://soma...
nils-werner/xbmc-somafm
default.py
Python
gpl-2.0
1,907
# -*- coding: utf-8 -*- """Tests for tmuxp. tmuxp.tests ~~~~~~~~~~~ """ from __future__ import absolute_import, division, print_function, \ with_statement, unicode_literals import logging import sys import pkgutil try: import unittest2 as unittest except ImportError: # Python 2.7 import unittest from ...
madelynfreed/rlundo
venv/lib/python2.7/site-packages/tmuxp/testsuite/__init__.py
Python
gpl-3.0
8,102
from __future__ import print_function, division from sympy.core.containers import Tuple from sympy.core.compatibility import range from types import FunctionType class TableForm(object): r""" Create a nice table representation of data. Examples ======== >>> from sympy import TableForm >>> ...
wxgeo/geophar
wxgeometrie/sympy/printing/tableform.py
Python
gpl-2.0
11,812
#!/usr/bin/python3 import argparse as ap import shared ACTIONS = dict() def action(key): def wrapper(function): ACTIONS[key] = function return function return wrapper def get_closed_issues(repo, milestone): issues_and_prs = repo.get_issues(milestone=milestone, state="closed") iss...
mpreisler/openscap
release_tools/query-milestones.py
Python
lgpl-2.1
1,404
# Copyright 2020 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...
annarev/tensorflow
tensorflow/python/keras/layers/preprocessing/category_crossing.py
Python
apache-2.0
8,543
""" Classes and functions used to visualize data for thermo scientific analyzers """ from pandas import Series, DataFrame import pandas as pd import datetime as dt import matplotlib.pyplot as plt import numpy as np from matplotlib import dates as d import os import math import glob import matplotlib import warnings i...
dhhagan/ACT
ACT/thermo/visualize.py
Python
mit
13,306
import random from common import generalUtils from common.log import logUtils as log from constants import clientPackets from constants import matchModModes from constants import matchTeamTypes from constants import matchTeams from constants import slotStatuses from objects import glob def handle(userToken, packetDa...
osuripple/pep.py
events/changeMatchSettingsEvent.py
Python
agpl-3.0
2,905
""" Easily manage dotfiles through the command line. """ from setuptools import find_packages, setup dependencies = ['click'] setup( name='dot-cli', version='0.0.5', url='https://github.com/kylefrost/dot', download_url='https://github.com/kylefrost/dot-cli/tarball/0.0.5', author='Kyle Frost', ...
kylefrost/dot-cli
setup.py
Python
gpl-3.0
1,706
import unittest from conans.test.utils.tools import TestClient from conans.paths import CONANFILE, CONANINFO, BUILD_INFO_CMAKE import os from conans.model.info import ConanInfo from conans.test.utils.cpp_test_files import cpp_hello_conan_files from conans.util.files import mkdir, load class InstallSubfolderTest(unitt...
birsoyo/conan
conans/test/command/install_subfolder_test.py
Python
mit
3,532
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'intbarras.ui' # # Created: Tue Feb 23 20:28:14 2016 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! """ Prueba para insertar la prueba de gráfico de barras con episodio de sueño utilizando...
acrsilva/animated-zZz-machine
pruebas/pruebainterfazbar.py
Python
lgpl-3.0
4,071
# Usage: # - python this_script path_to_image input_file # # Purpose: This script displays arrows between test points and their kNN estimates. # # We use this utility to visualize the accuracy of our kNN algorithm. # have mapped. from sys import argv, stderr, exit from PIL import Image, ImageTk ...
TeamSirius/Utilities
scripts/showneighbors.py
Python
apache-2.0
4,742
#r# ======================= #r# How to Use SubCircuit #r# ======================= #r# This example shows how to use subcircuits. #################################################################################################### import PySpice.Logging.Logging as Logging logger = Logging.setup_logging() ##########...
FabriceSalvaire/PySpice
examples/basic-usages/subcircuit.py
Python
gpl-3.0
1,938
import copy from os.path import join, expanduser from drivelink import Dict class _Cached: "This will shine the most with recursive functions. But the recursion has to call the cached function, not the function itself." f = None c = None def __init__(self, function, file_basename=None, size_limit=10...
cdusold/DriveLink
drivelink/_diskmemoize.py
Python
mit
1,491
from distutils.core import setup from Cython.Build import cythonize import numpy setup(ext_modules=cythonize("rollover_c.pyx"), include_dirs=[numpy.get_include()]) # python rollover_c_setup.py build_ext --inplace
energyPATHWAYS/energyPATHWAYS
energyPATHWAYS/_obsolete/rollover_c_setup.py
Python
mit
221
# 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...
luotao1/Paddle
python/paddle/fluid/tests/unittests/test_squeeze2_op.py
Python
apache-2.0
2,178
from tests.helper import TestHelper, TestHelperException def run(data): helper = TestHelper(data) try: value = 1 for t in range(21): helper.is_io_correct(t, 0, value, 0) if value: value = 0 else: value = 1 except TestHelperException as e: print(e...
charlesvdv/arduinint
tests/test_delai/test.py
Python
mit
397
from django_cassandra_engine.utils import get_cassandra_connections from .compat import ( Cluster, CQLEngineException, PlainTextAuthProvider, Session, connection, ) class Cursor(object): def __init__(self, connection): self.connection = connection def execute(self, *args, **kwarg...
r4fek/django-cassandra-engine
django_cassandra_engine/connection.py
Python
bsd-2-clause
3,613
from loadimage import loadImage from loadlabel import loadGroundTruth from labelreshape import reshapeLables from loadpickle import loadPickleData from loadcsvlabel import loadCSV
wuga214/Boundary-Detection-via-Convolution-Deconvolution-Neural-Network-with-BMA
Conv-Deconv-Image-Process/files/__init__.py
Python
mit
179
import pymel.all as pm import random import math import traceback helpString=""" Actual python code can be evaluated for the new value. i is the current iteration r is python's random module m is python's math module pm is pymel for example you could enter "translate" as ...
joetainment/mmmmtools
MmmmToolsMod/Dynamic/RiggerAttributeSetter.py
Python
gpl-3.0
3,023
from . import voice """ Style Guide: When writing dialogue, try to follow the following rules. - Do not use contractions. DRACONIAN: Reptiles hiss. And they never want something they can desire. DWARVEN: Dwarves use a lot of kennings in their speech. Think "The Mighty Thor". ELVEN: Lacks words w...
jwvhewitt/dmeternal
old_game/dialogue/personalizer.py
Python
gpl-2.0
22,147
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 The FATE 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/lic...
FederatedAI/FATE
python/federatedml/secureprotol/number_theory/field/base_galois_field.py
Python
apache-2.0
1,831
''' Copyright 2013-2014 Reubenur Rahman All Rights Reserved @author: reuben.13@gmail.com ''' import atexit import argparse import sys import time import ssl from pyVmomi import vim, vmodl from pyVim import connect from pyVim.connect import Disconnect, SmartConnect, GetSi inputs = {'vcenter_ip': '15.10.10.211', ...
rreubenur/vmware-pyvmomi-examples
create_and_remove_snapshot.py
Python
apache-2.0
5,882
# -*- coding: utf8 -*- ################################################################################ # # Copyright 2014-2016 Eric Lacombe <eric.lacombe@security-labs.org> # ################################################################################ # # This file is part of fuddly. # # fuddly is free softwar...
k0retux/fuddly
test/integration/test_integration.py
Python
gpl-3.0
147,040
from direct.directnotify import DirectNotifyGlobal from direct.distributed.DistributedObjectUD import DistributedObjectUD class DistributedDeliveryManagerUD(DistributedObjectUD): notify = DirectNotifyGlobal.directNotify.newCategory("DistributedDeliveryManagerUD") def hello(self, todo0): pass def ...
silly-wacky-3-town-toon/SOURCE-COD
toontown/uberdog/DistributedDeliveryManagerUD.py
Python
apache-2.0
1,707
import warnings import numpy as np from copy import deepcopy as copy from .environ import environ from .tensor import VOIGT from .deformation import update_deformation def d_from_prescribed_stress(func, t, dt, temp, dtemp, f0, f, stran, d, sig, ufield, dufield, statev, v, sigspec): '''...
matmodlab/matmodlab2
matmodlab2/core/stress_control.py
Python
bsd-3-clause
12,427
#!/usr/bin/env python """ @package mi.core.instrument.wrapper @file mi/core/instrument/wrapper.py @author Peter Cable @brief Driver process using ZMQ messaging. Usage: run_driver <module> <driver_class> <refdes> <event_url> <particle_url> run_driver <module> <driver_class> <refdes> <event_url> <particle_url> <...
janeen666/mi-instrument
mi/core/instrument/wrapper.py
Python
bsd-2-clause
16,160
# data.world-py # Copyright 2017 data.world, 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 agr...
datadotworld/data.world-py
datadotworld/config.py
Python
apache-2.0
7,935
import asynctnt from .tube import Tube __all__ = ( 'Queue', ) class Queue: __slots__ = ( '_conn', '_tube_cls', '_tubes', '_namespace' ) def __init__(self, conn: asynctnt.Connection, tube_cls=Tube, namespace='queue'): """ ...
igorcoding/asynctnt-queue
asynctnt_queue/queue.py
Python
apache-2.0
2,395
from google.appengine.ext import ndb class Dresseur(ndb.Model): tirage = ndb.KeyProperty(kind='Tirage') nomig = ndb.StringProperty() codeami = ndb.StringProperty()
crancerkill/pokeploud
server/DresseurModele.py
Python
apache-2.0
177
# -*- coding: utf-8 -*- # Copyright (c) 2003 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing the builtin documentation generator. The different parts of the module document are assembled from the parsed Python file. The appearance is determined by several templates defined within this mo...
davy39/eric
DocumentationTools/ModuleDocumentor.py
Python
gpl-3.0
44,668
# Copyright (c) 2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for implementations of L{IReactorTime}. """ __metaclass__ = type import signal from twisted.internet.defer import TimeoutError from twisted.trial.unittest import TestCase, SkipTest from twisted.python.reflect import namedAny from...
hortonworks/hortonworks-sandbox
desktop/core/ext-py/Twisted/twisted/internet/test/reactormixins.py
Python
apache-2.0
6,429
# -*- coding: utf-8 -*- import xc_base import geom import xc import math import os from model import predefined_spaces from materials import typical_materials __author__= "Luis C. Pérez Tato (LCPT)" __copyright__= "Copyright 2014, LCPT" __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@gmail.com" ndivZ= ...
lcpt/xc
verif/tests/preprocessor/cad/test_unif_grid_01.py
Python
gpl-3.0
1,501
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
phenoxim/nova
nova/conf/quota.py
Python
apache-2.0
10,497
#! /usr/bin/env python3 """ Plots an order-of-accuracy plot using data points given by a command line argument. Uses linear regression to compute slope of the data. """ import sys import numpy as np from matplotlib import pyplot as plt fname = sys.argv[1] data = np.genfromtxt(fname) n = data.shape[0] print("Number...
Slaedr/amovemesh
test-cases/curved-mesh-gen-splines/plot_order.py
Python
gpl-3.0
694
# Copyright 2014 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 imp import os.path import sys # Disable lint check for finding modules: # pylint: disable=F0401 def _GetDirAbove(dirname): """Returns the director...
boundarydevices/android_external_chromium_org
mojo/public/tools/bindings/pylib/mojom/parse/lexer.py
Python
bsd-3-clause
6,890
"""Query the switch for configured queues on a port.""" # System imports # Third-party imports # Local source tree imports from pyof.foundation.base import GenericMessage from pyof.foundation.basic_types import Pad, UBInt32 from pyof.v0x04.common.header import Header, Type from pyof.v0x04.common.port import PortNo ...
kytos/python-openflow
pyof/v0x04/controller2switch/queue_get_config_request.py
Python
mit
1,105
# -*- coding: utf-8 -* from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import range import errno import os import resource import signal import socket import stat import subprocess import sys import tempf...
migeruhito/sagenb
sagewui/util/__init__.py
Python
gpl-3.0
17,402
# Generated by Django 2.0.3 on 2018-07-19 10:20 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('order', '0048_auto_20180629_1055'), ] operations = [ migrations.AlterModelOptions( name='order', options={'ordering': ('-pk'...
UITools/saleor
saleor/order/migrations/0049_auto_20180719_0520.py
Python
bsd-3-clause
397
#!/usr/bin/python import ConfigParser import os from crontab import CronTab from decimal import * #This first section is about interpteting the configuration file This seciont includes details on how to confugre the variables that are in the first section and convert them to be used by the tests. getcontext().prec = 8...
manhof/test_isp_curl
curltest12.py
Python
mit
2,918
import os from unittest import TestCase from cookiejar.client import CookiejarClient class ClientTests(TestCase): maxDiff = None def test_pagination(self): index = os.path.join((os.path.dirname(os.path.abspath(__file__))), 'index.1.json') client = CookiejarClient(index=index) ...
fcurella/cookiejar
tests/test_client.py
Python
mit
2,942
#! /usr/bin/python # Copyright (c) 2015, Matthew P. Grosvenor # 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 # ...
camsas/qjump-nsdi15-plotting
figure1a_5/process_mem.py
Python
bsd-3-clause
5,511
import os.path import pickle import gzip as libraryGzip from OSMPythonTools.cachingStrategy.base import CachingStrategyBase class Pickle(CachingStrategyBase): def __init__(self, cacheFile='cache', gzip=True): self._cacheFile = cacheFile + '.pickle' + ('.gzip' if gzip else '') self._open = libraryG...
mocnik-science/osm-python-tools
OSMPythonTools/cachingStrategy/pickle.py
Python
gpl-3.0
1,187
# # The Qubes OS Project, http://www.qubes-os.org # # Copyright (C) 2021 Rusty Bird <rustybird@net-c.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the Lic...
QubesOS/qubes-core-admin
qubes/tests/selftest.py
Python
lgpl-2.1
1,154
from __future__ import unicode_literals, print_function import sqlite3, os, random _select_random = 'select {0} from {1} limit 1 offset abs(random()) % (select count({0}) from {1});' _select_uncommon = 'select value from uncommons where key=?;' def generate_name(): conn = sqlite3.connect(os.path.join(os.path.dirn...
rotated8/mgsv_names
mgsv_names.py
Python
unlicense
1,149
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-04-12 20:10 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crowdcop_web', '0014_auto_20160412_1607'), ] operations = [ migrations.Alter...
bocaaust/CrowdCop
CrowdCop_test/crowdcop/crowdcop_web/migrations/0015_auto_20160412_1610.py
Python
apache-2.0
653
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # drewtils documentation build configuration file, created by # sphinx-quickstart on Tue Dec 5 01:45:19 2017. # # 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 # a...
drewejohnson/drewtils
docs/conf.py
Python
mit
5,093
"""resultAnalysis URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') C...
rpsingh21/resultanalysis
resultAnalysis/resultAnalysis/urls.py
Python
mit
1,462
import os import json import datetime import logging from unittest import TestCase from supervisor_remote_logging import SyslogFormatter, DockerJsonFormatter, SyslogDockerJsonFormatter class SupervisorLoggingDateFormatTestCase(TestCase): def test_default_date_format(self): """ Test default date fo...
newrelic/supervisor-remote-logging
tests/test_formatters.py
Python
bsd-2-clause
2,184
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.hvac_templates import HvactemplateZoneFanCoil log = logging.getLogger(__name__) class TestHvactemplateZoneFanCoil(unittest.TestCase): def setUp(self): self.fd, self...
rbuffat/pyidf
tests/test_hvactemplatezonefancoil.py
Python
apache-2.0
11,132
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
krafczyk/spack
var/spack/repos/builtin/packages/font-bitstream-speedo/package.py
Python
lgpl-2.1
2,114
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # import os from os.path import join as opj from twisted.trial import unittest from twisted.python import util class CorrectComments(unittest.TestCase): def testNoSlashSlashComments(self): urlarg = util.sibpath(__file__,...
jxta/cc
vendor/Twisted-10.0.0/twisted/test/test_extensions.py
Python
apache-2.0
455
# imports - module imports from frappe.model.document import Document from frappe import _ import frappe # imports - frappe module imports from frappe.core.doctype.version.version import get_diff from frappe.chat.doctype.chat_room import chat_room from frappe.chat.util import ( safe_json_loads, ...
StrellaGroup/frappe
frappe/chat/doctype/chat_profile/chat_profile.py
Python
mit
3,304
import re from collections import namedtuple __author__ = 'Lucas Kjaero' # Used in the process_cedict_line function. Do not change. Out here to avoid recompilation each call. cedict_definition_pattern = re.compile("/(.*)/") cedict_pinyin_pattern = re.compile("\[(.*)\] /") DictionaryEntry = namedtuple("DictionaryEntr...
lucaskjaero/Chinese-Vocabulary-Finder
Dictionary.py
Python
gpl-3.0
2,125
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
Acehaidrey/incubator-airflow
airflow/providers/google/cloud/operators/spanner.py
Python
apache-2.0
23,642
# Generated by Django 2.1.5 on 2019-01-29 10:48 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('music', '0003_auto_20160213_1206'), ] operations = [ migrations.AlterField( model_name='track', name='artists', ...
Menollo/menosic
menosic/music/migrations/0004_auto_20190129_1048.py
Python
gpl-3.0
394
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (build by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
camomile-project/camomile-client-python
camomile/_version.py
Python
mit
6,914
#-*- coding: utf-8 -*- # django-sample-app - A Django app with setup, unittests, docs and demo # Copyright (C) 2013, Daniel Rus Morales # 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 ...
mwang2015/django-sample-app
sample_app/tests/views.py
Python
gpl-3.0
1,021
""" Flask-MethodHack ---------------- Description goes here... Links ````` * `documentation <http://packages.python.org/Flask-MethodHack>`_ * `development version <http://github.com/USERNAME/REPOSITORY/zipball/master#egg=Flask-MethodHack-dev>`_ """ from setuptools import setup setup( name='Flask-MethodHack'...
kijun/flask-methodhack
setup.py
Python
bsd-3-clause
1,109
prob_start = { 'P': -3.14e+100, 'B': -3.14e+100, 'M': -3.14e+100, 'S': 0.0, 'X': -3.14e+100, 'L': -3.14e+100, 'F': -3.14e+100, 'W': -3.14e+100, 'D': -3.14e+100, 'G': -3.14e+100, 'K': -3.14e+100, 'I': -3.14e+100, 'A': -3.14e+100, 'Z': -3.14e+100, 'J': -3.14e+100, 'C': -3.14e+100, }
yuanlisky/linlp
linlp/algorithm/viterbiMat/prob_start_organization.py
Python
apache-2.0
282
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php or see LICENSE file. # # Copyright (C) 2006 Fluendo, S.A. (www.fluendo.com). # Copyright 2006, Frank Scholz <coherence@beebits.net> # Copyright 2007-2008 Brisa Team <brisa-develop@garage.maemo.org> """ Contains the MSearch class which ca...
henkelis/sonospy
sonospy/brisa/upnp/control_point/msearch.py
Python
gpl-3.0
6,719
"""Storage for pytest objects during test runs The objects in the module will change during the course of a test run, so they have been stashed into the 'store' namespace Usage: # as pytest.store import pytest pytest.store.config, pytest.store.pluginmanager, pytest.store.session # imported directly ...
akarol/cfme_tests
fixtures/pytest_store.py
Python
gpl-2.0
6,628
# The Hazard Library # Copyright (C) 2014, GEM Foundation # # 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. # # T...
mmpagani/oq-hazardlib
openquake/hazardlib/tests/gsim/utils_test.py
Python
agpl-3.0
2,240
"""Implements scanners and plugins to find hypervisors in memory.""" from itertools import groupby import struct from rekall import plugin from rekall import obj from rekall import utils from rekall import scan from rekall import session as session_module from rekall.plugins.addrspaces import amd64 from rekall.plugin...
rlugojr/rekall
rekall-core/rekall/plugins/hypervisors.py
Python
gpl-2.0
27,401
# -*- coding: utf-8 -*- """ This module is used for testing the functions within the pyhpeimc.plat.netassets module. """ from unittest import TestCase from nose.plugins.skip import SkipTest from pyhpeimc.plat.netassets import * from test_machine import * ##### Test get_dev_asset_details function for multiple vend...
netmanchris/PYHPEIMC
tests/test_pyhpeimc_plat_netassets.py
Python
apache-2.0
30,488
import os import shutil import tempfile import unittest from mock import Mock, patch, call, MagicMock from pulp.devel.unit.util import touch from pulp.plugins.conduits.repo_publish import RepoPublishConduit from pulp.plugins.model import Repository from pulp.plugins.util.publish_step import PublishStep from pulp_op...
pulp/pulp_openstack
plugins/test/unit/plugins/distributors/test_glance_publish_steps.py
Python
gpl-2.0
9,368
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase from django.contrib.auth import get_user_model from django.core.cache import cache from model_mommy imp...
leominov/fabric-bolt
fabric_bolt/task_runners/tests.py
Python
mit
7,768
#!/usr/bin/env python import sys import os import Pipeline.settings.BiotoolsSettings as BiotoolsSettings import DPyGetOpt from Pipeline.core.PipelineTemplate import PipelineTemplate import Pipeline.core.PipelineUtil as PipelineUtil from Pipeline.core.PipelineError import PipelineError from Pipeline.core.PipelineCluster...
kotoroshinoto/Cluster_SimpleJob_Generator
pybin/Pipeline/commands/PipelineTemplateGenerator.py
Python
unlicense
8,154
class VNXObject(object): def __init__(self): self._props = {} def __setattr__(self, key, value): try: super(VNXObject, self).__setattr__(key, value) except AttributeError: self._props[key] = value # def __getattr__(self, item): # try: # s...
peter-wangxu/python_play
test/mock_test/test_attr.py
Python
apache-2.0
1,244
#!/usr/bin/env python # Copyright (C) 2006-2019 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
carthach/essentia
test/src/unittests/audioproblems/test_snr.py
Python
agpl-3.0
4,003
# -*- coding: utf-8 -*- # Generated by Django 1.11.9 on 2018-01-18 12:05 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('order', '0029_auto_20180111_0845'), ] operations = [ migrations.AlterModelO...
UITools/saleor
saleor/order/migrations/0030_auto_20180118_0605.py
Python
bsd-3-clause
756
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the...
valkyriesavage/invenio
modules/webcomment/lib/webcomment.py
Python
gpl-2.0
77,954
# -*- coding: utf-8 -*- import fauxfactory import pytest from cfme import test_requirements from cfme.automate.explorer import Class, Domain, Method, Namespace from cfme.automate.simulation import simulate from cfme.common.provider import cleanup_vm from cfme.services import requests from cfme.services.catalogs.service...
kzvyahin/cfme_tests
cfme/tests/services/test_add_remove_vm_to_service.py
Python
gpl-2.0
3,341
# # Copyright (c) 2010 Mikhail Gusarov # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, d...
LudditeLabs/query-reform
data/samples/Python/1.py
Python
apache-2.0
56,555
#!/usr/bin/env python3 """ Given two Bibles all in one file (with books and verses in any order), with one verse per line, with lines like this: BOOK_chapter_verse{TAB}Text of verse goes here... ... print out which verses are present in the first Bible but missing in the second, and vice-versa. """ import sys impo...
alexrudnick/terere
bibletools/unify_bibles.py
Python
gpl-3.0
1,141
############################################################################### # Copyright 2006 to the present, Orbitz Worldwide, 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...
OrbitzWorldwide/droned
romeo/lib/romeo/directives/merge_lists.py
Python
apache-2.0
6,736
# -*- encoding: utf-8 -*- """Implements different locators for UI""" from selenium.webdriver.common.by import By from .model import LocatorDict common_locators = LocatorDict({ # common locators "body": (By.CSS_SELECTOR, "body"), # Notifications "notif.error": ( By.XPATH, "//div[contains(@c...
sghai/robottelo
robottelo/ui/locators/common.py
Python
gpl-3.0
9,297
import urllib.request import urllib.parse import pprint from .utils import transform_datetime from .utils import flatten from warnings import warn import json as simplejson _debug = 1 class ChimpyException(Exception): pass class ChimpyWarning(Warning): pass class Connection(object): """mailchimp api co...
jorjun/django-mailchimp
mailchimp/chimpy/chimpy.py
Python
bsd-3-clause
16,486
####################################################################### # Copyright 2012 Mark Wolf # # This file is part of OrgWolf. # # OrgWolf 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...
m3wolf/orgwolf
wolfmail/models.py
Python
gpl-3.0
2,137
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2014 Fabian M. # # 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...
fabianm/olympiad
2014-2015/round-1/C2-chess/chess.py
Python
apache-2.0
3,035
import string def parse(url): """ Parse ZooKeeper URL. :param url: The URL in the form of "zk://username:password@servers/path". :return: Tuple (credential, servers, path). credential: Credential for authentication with "digest" scheme. Optional and default to None....
xujyan/cotton
mysos/common/zookeeper.py
Python
apache-2.0
943
import logging LOGGER = logging.getLogger(__name__) from itertools import chain import uuid class Counter(object): """ """ _redcon = None _key = None def __add__(self, other): 1 + other # sanity check return self._redcon._execute('incr', self._key, other) def __sub__(self, o...
atatsu/redcon
redcon/types.py
Python
mit
20,021
# Map bundle interfaces to member ports for path, value in get("RootCfg.InterfaceConfiguration(*).BundleMember.ID"): print('Bundle-Ether', value['BundleID'], ':', path['InterfaceName'])
cisco/xr-telemetry-m2m-web
src/assets/scriptlets/70_bundles-basic.py
Python
apache-2.0
191
# coding: utf-8 """ This script tests the traceback of a decorated template. """ __author__ = "Caleb Burns" __version__ = "0.7.4" __status__ = "Development" import os.path import pprint import sys import traceback sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../")))...
cpburnz/python-decorated-templates
pdt/test/test_traceback.py
Python
mit
665
encoders = [] for encoder in encoders: encoder["case"] = "mixedcase"
ohio813/alpha3
x86/utf_16/mixedcase/__init__.py
Python
bsd-3-clause
74
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'removeTopic.ui' # # Created: Mon Jul 4 22:26:07 2011 # by: PyQt4 UI code generator 4.7.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_removeTopic(object): def setupUi(self, rem...
seejay/feedIO
feedio/UI/removeTopic_ui.py
Python
gpl-3.0
2,356
__author__ = 'stefanperndl'
zenith0/foodroller
foodroller/tests/__init__.py
Python
apache-2.0
28
import unittest import sys sys.path.insert(0, '..') from lib.item import Item, Elem from lib.organizem import Organizem, Conf from lib.orgm_controller_base import ActionArg TEST_DATA_FILE = "orgm_test.dat" TEST_BAK_FILE = "orgm_test_bak.dat" IS_UNIT_TESTING = True Organizem(TEST_DATA_FILE, IS_UNIT_TESTING).setconf(C...
marksweiss/organize-m
test/organizem_test.py
Python
mit
30,369
#coding=utf-8 from flask import Flask app = Flask(__name__) app.debug = True @app.route('/', methods=['GET']) def index(): return '<p>Hello world</p>' if __name__ == "__main__": app.run()
Ju2ender/Python-E
a-byte-of-python/app.py
Python
mit
200
#!/usr/bin/env python """ 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");...
zouzhberk/ambaridemo
demo-server/src/main/resources/common-services/HIVE/0.12.0.2.0/package/scripts/hcat_service_check.py
Python
apache-2.0
3,624
ELECTRONIC = 0 NON_ELECTRONIC = 1 ALIAS = 2 def as_choices_tuple(): return ((ELECTRONIC, 'Electronic'), (NON_ELECTRONIC, 'Non electronic'), (ALIAS, 'Alias'))
vegarang/devilry-django
devilry/apps/core/models/deliverytypes.py
Python
bsd-3-clause
187
def revrot(s, size): if size <= 0 or not s or size > len(s): return '' result = '' for i in range(0, len(s), size): chunk = s[i:i+size] if len(chunk) != size: break if sum(int(digit)**3 for digit in chunk) % 2 == 0: result += chunk[::-1] else...
VladKha/CodeWars
6 kyu/Reverse or rotate?/solve.py
Python
gpl-3.0
384
# # 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/amazon/aws/transfers/gcs_to_s3.py
Python
apache-2.0
8,283
from django.contrib import admin from .models import Message admin.site.register(Message)
Pylvax/django
project/starter_app/admin.py
Python
mit
92
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('transactions', '0001_initial'), ] operations = [ migrations.AddField( model_name='transaction', name...
erickdom/restAndroid
transactions/migrations/0002_transaction_response.py
Python
apache-2.0
436
# ================================================================================================== # Copyright 2013 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
ericzundel/commons
tests/python/twitter/common/zookeeper/serverset/test_endpoint.py
Python
apache-2.0
7,118