src
stringlengths
721
1.04M
""" The copy mutual information, as defined by Kolchinsky & Corominas-Murtra. """ from .pmf import relative_entropy from ..utils import unitful __all__ = ( 'copy_mutual_information', ) def binary_kullback_leibler_divergence(p, q): """ Compute the binary Killback-Leibler divergence. Parameters ...
# Some exception classes for the Smalltalk VM class SmalltalkException(Exception): """Base class for Smalltalk exception hierarchy""" exception_type = "SmalltalkException" _attrs_ = ["msg"] def __init__(self, msg="<no message>"): self.msg = msg class PrimitiveFailedError(SmalltalkException): ...
from __future__ import unicode_literals import functools import logging import traceback import sys import pafy from flask import Flask, jsonify, request import youtube_dl from youtube_dl.version import __version__ as youtube_dl_version import youtube_dl if not hasattr(sys.stderr, 'isatty'): # In GAE it's not ...
# -*- coding: utf-8 -*- # @Author: patrick # @Date: 2016-09-01 17:04:53 # @Last Modified by: Patrick Bos # @Last Modified time: 2016-10-12 14:25:52 # as per tensorflow styleguide # https://www.tensorflow.org/versions/r0.11/how_tos/style_guide.html from __future__ import absolute_import from __future__ import divis...
#!/usr/bin/python # Copyright (c) 2010-2012 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 appl...
#!/usr/bin/env python import os.path config = { "default_vcs": "tc-vcs", "default_actions": [ 'checkout-sources', 'checkout-lightsaber', 'build', 'build-symbols', 'make-updates', 'prep-upload', 'submit-to-balrog' ], "balrog_credentials_file": "balr...
from setuptools import setup, find_packages import versioneer # read the contents of your README file with open('README.md') as f: long_description = f.read() setup( name='rna_tools', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), packages=find_packages(), test_suite...
#/u/GoldenSights import praw # simple interface to the reddit API, also handles rate limiting of requests import time import sqlite3 '''USER CONFIGURATION''' APP_ID = "" APP_SECRET = "" APP_URI = "" APP_REFRESH = "" # https://www.reddit.com/comments/3cm1p8/how_to_make_your_bot_use_oauth2/ USERAGENT = "" #This is a sho...
"""Resource manager for python. Main purpose of this class is to check that it is installed correctly. """ import commands import os import os.path import copy import fixup_python_path import engage.drivers.resource_manager as resource_manager import engage_utils.process as procutils import engage.utils.log_setup fro...
# Copyright 2013-2014 MongoDB, 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...
#!/usr/bin/python ## Copyright (C) 2008, 2009, 2010, 2012 Red Hat, Inc. ## Authors: ## Tim Waugh <twaugh@redhat.com> ## 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 2 of the...
''' Copyright (c) 2017 Vanessa Sochat 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, distribute...
# coding=utf-8 import os, sys import xbmc, xbmcaddon, xbmcplugin, xbmcgui, xbmcvfs import xml.etree.ElementTree as xmltree from traceback import print_exc from urllib.parse import unquote from resources.lib.common import * class OrderByFunctions(): def __init__(self, ltype): self.ltype = ltype def _l...
import logging import requests from django.conf import settings from django.contrib.auth.models import User from django.contrib.sites.models import Site from rest_framework import generics, views, viewsets from rest_framework import status from rest_framework.generics import CreateAPIView from rest_framework.parsers i...
# Copyright (c) Mathias Kaerlev 2011-2012. # This file is part of pyspades. # pyspades 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...
# --------------------------------------------------------------------------- # # test_nextid.py # # # # Copyright © 2015-2021, Rajiv Bakulesh Shah, original author. # ...
# Possible executions of this script # ./yadempi script.py #interactive will spawn additional workers # mpiexec -n 4 ./yadempi script.py #non interactive NSTEPS=100 #turn it >0 to see time iterations, else only initilization TODO!HACK import os from yade import mpy as mp numThreads = 6 #add spheres young = 5e6 co...
# Copyright 2017 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...
#encoding: utf-8 import tkMessageBox import urllib2 from bs4 import BeautifulSoup import os import django from pip._vendor.pyparsing import unicodeString import unicodedata os.environ.setdefault("DJANGO_SETTINGS_MODULE", "src.settings") django.setup() from mundoDeportivo.models import * url = 'http://www.mundodeport...
# Convert a CSV file into a JSON object with distribution import classifiedunicodevalue from classifiedunicodevalue import ClassifiedUnicodeValue from datautil import compressedValueSequence, compressedValues import unicodecsv from version import savutilName, savutilVersion def blankNone (x): if x is None: return...
############################################################################# ## ## Copyright (c) 2014 Riverbank Computing Limited <info@riverbankcomputing.com> ## ## This file is part of PyQt5. ## ## This file may be used under the terms of the GNU General Public License ## version 3.0 as published by the Free Softw...
# Output # # $ ./triton ./examples/callback_after.py ./samples/crackmes/crackme_xor a # 0x40056d: push rbp # -> #0 = (bvsub (_ bv140735022953896 64) (_ bv8 64)) ; Aligns stack # -> #1 = (_ bv140735022953936 64) # -> #2 = (_ bv4195694 64) ; RIP # # 0x40056e: mov rbp, rsp # -> #3 = (...
"""deceased report cause of death Revision ID: cd009f1475ff Revises: a4ab3afcb460 Create Date: 2020-09-08 11:48:27.208496 """ from alembic import op import sqlalchemy as sa import rdr_service.model.utils from rdr_service.participant_enums import PhysicalMeasurementsStatus, QuestionnaireStatus, OrderStatus from rdr_...
# Copyright 2014 VMware. # # 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, sof...
""" Pylot """ import os import datetime import inspect from werkzeug.contrib.fixers import ProxyFix from flask_classy import (FlaskView, route) from flask import (Flask, abort, redirect, request, render_template, ...
# Django settings for openstax project. import os import sys import raven import logging.config from django.utils.log import DEFAULT_LOGGING PROJECT_ROOT = os.path.join(os.path.dirname(__file__), '..', '..') BASE_DIR = PROJECT_ROOT # check if running local dev server - else default to DEBUG=False if len(sys.argv) > ...
#!/usr/bin/env python # Copyright(c)2012-2013 Internet Archive. Software license AGPL version 3. # # This file is part of the `surt` python package. # # surt 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 Soft...
single_port_ram = """module SinglePortRam # ( parameter DATA_WIDTH = 8, parameter ADDR_WIDTH = 4, parameter RAM_DEPTH = 1 << ADDR_WIDTH ) ( input clk, input rst, input [ADDR_WIDTH-1:0] ram_addr, input [DATA_WIDTH-1:0] ram_d, input ram_we, output [DATA_WIDTH-1:0] ram_q ); reg [DATA_WIDTH-1:0] mem [0...
''' numero = int(input("Número para a tabuada: ")) for multiplicador in range(1,11): print (numero,"x",multiplicador,"=",(numero*multiplicador)) ''' # # Calculo de Horas trabalhadas. # Autor: Igor Nunes # Materia: Programa Python # Orientador: Ronaldo # Aula de total de horas trabalhadas # #Leitur...
from lnst.Common.Parameters import Param, StrParam from lnst.Common.IpAddress import ipaddress from lnst.Controller import HostReq, DeviceReq, RecipeParam from lnst.Recipes.ENRT.BaseEnrtRecipe import BaseEnrtRecipe from lnst.Recipes.ENRT.ConfigMixins.OffloadSubConfigMixin import ( OffloadSubConfigMixin) from lnst.R...
#!/usr/bin/env python3 # # This file is part of Magnum. # # Original authors — credit is appreciated but not required: # # 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 # — Vladimír Vondruš <mosra@centrum.cz> # # This is free and unencumbered software released into the p...
# # Copyright (C) 2006, 2012-2014 Red Hat, Inc. # Copyright (C) 2006 Daniel P. Berrange <berrange@redhat.com> # # 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 2 of the License, o...
from sympy import sin, cos, exp, E, series, oo, S, Derivative, O, Integral, \ Function, log, sqrt, Symbol, Subs, pi, symbols from sympy.abc import x, y, n, k from sympy.utilities.pytest import raises from sympy.series.gruntz import calculate_series def test_sin(): e1 = sin(x).series(x, 0) e2 = series(sin(...
import datetime Mandatory = 100 RequiredConditional = 200 IfAvailable = 300 FIELD_NO = 0 FIELD_NAME = 1 FIELD_TYPE = 2 FIELD_LENGTH = 3 FIELD_OPTIONS = 4 OTHER_ID = ( ('', 'Not Available'), ('STAFF', 'Staff ID'), ('STUD', 'Student ID'), ('SERV', 'Service ID'), ('NHIS', 'National Health Insurance ID'), ) MARIT...
# ----------------------------------------------------------------------------- # Python repl config # ----------------------------------------------------------------------------- import datetime import math import os import random import re import sys from math import * from pydoc import pager try: from see imp...
"""Unit tests for util.py.""" import unittest from frexp.util import * class UtilCase(unittest.TestCase): def test_stopwatch(self): n = 10 def dummytimer(): return n t = StopWatch(dummytimer) # Init. self.assertEqual(t.elapsed, 0) ...
""" Perform basic validation of the models """ from unittest.mock import patch import pytest from django.test import TestCase from opaque_keys.edx.keys import CourseKey from organizations.models import Organization from ..models import DiscussionsConfiguration from ..models import ProviderFilter SUPPORTED_PROVIDERS...
# Copyright (c) 2015 SUSE Linux GmbH. 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 la...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # This action is used to produce test archives. # # Ideally, the data in this file should be defined in moz.build files....
from FitsAnalysis import convert,StarCalibration from catalog import queryVizier,queryFitsImage import os import warnings from radec import radec from functions import * #ignore the warning caused by astropy warnings.filterwarnings("ignore") #This specifies the center of fits images retrieved from the data base #Tho...
import numpy as np from scipy.fftpack import fft2,fftshift from scipy import signal from astropy.io import fits from matplotlib import pyplot as plt import matplotlib as mpl import itertools from power import PSD2,pspec dum = fits.open("/home/prabhu/sunrise_holly/movie_data/post_demod_tr2_output_22.fits") data = dum...
# -*- encoding: utf-8 -*- """ Python setup file for the cmsplugin_accordion app. In order to register your app at pypi.python.org, create an account at pypi.python.org and login, then register your new app like so: python setup.py register If your name is still free, you can now make your first release but first...
from TestStack.White.UIItems import ProgressBar from WhiteLibrary.keywords.librarycomponent import LibraryComponent from WhiteLibrary.keywords.robotlibcore import keyword class ProgressbarKeywords(LibraryComponent): @keyword def verify_progressbar_value(self, locator, expected): """Verifies the value ...
# -*- coding: utf8 -*- from __future__ import absolute_import from __future__ import division, print_function, unicode_literals import unittest from nose import tools from lxml import html from justext.core import preprocessor, html_to_dom class TestDomUtils(unittest.TestCase): def test_remove_comments(self): ...
from django.test import TestCase from month.models import Month from example.models import Example import datetime # Create your tests here. def TestMonthFunctions(TestCase): def test_constructors(self): m = Month(2010, 1) self.assertEqual(m.year, 2010) self.assertEqual(m.month, 1) ...
# # Tuxemon # Copyright (c) 2014-2017 William Edwards <shadowapex@gmail.com>, # Benjamin Bean <superman2k5@gmail.com> # # This file is part of Tuxemon # # 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 #...
#----------------------------------------------------------------------------- # Copyright (c) 2005-2016, 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...
# SyConn # Copyright (c) 2016 Philipp J. Schubert # All rights reserved from typing import Optional import pandas as pd import tqdm import os from collections import defaultdict import seaborn as sns from scipy.special import softmax import numpy as np import matplotlib.pyplot as plt from syconn.handler.prediction im...
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2010,2011,2012,2013,2014,2015,2016,2017,2018 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ma...
# -*- coding: utf-8 -*- # Copyright (c) 2013-2014, Camptocamp SA # 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 above copyright notice, this #...
#!env/python3 # coding: utf-8 try: import ipdb except ImportError: pass import os import shutil import json import zipfile import datetime import time import uuid import subprocess import requests from config import * from core.framework.common import * from core.framework.postgresql import execute from co...
import datetime import time from django.http import HttpResponse from django.shortcuts import render_to_response, get_object_or_404 from django.utils.timezone import localtime, now from graphite.util import json from graphite.events import models from graphite.render.attime import parseATTime from django.core.urlresol...
import unittest from StringIO import StringIO from os.path import join from tempfile import NamedTemporaryFile from crumbs.vcf.snv import (VCFReader, FREEBAYES, VARSCAN, GATK, VCFWriter, GENERIC) from crumbs.utils.test_utils import TEST_DATA_DIR # Method could be a function # pylint: dis...
# -*- coding: utf-8 -*- import time import datetime import random import os import pygtk pygtk.require( '2.0' ) import gtk, gobject import git from multiprocessing import Process, Queue from Queue import Empty from traceback import format_exc def git_sync ( queue, sync_path, repo_name, uri ): """ Sync the rep...
import numpy as np import scipy.misc def shanbhag(imgdata) : """Returns a binary segmentation threshold using the Shanbhag algorithm given imgdata as a grayscale image of type numpy.ndarray """ # get normalized histogram hist, bins = np.histogram(imgdata,range(0,257),density=True) # calculate ...
# #!/usr/bin/env python3 # # -*- coding: utf-8 -*- # ############################################## # # The MIT License (MIT) # # Copyright (c) 2018 Kevin Walchko # # see LICENSE for full details # ############################################## # # import time # import argparse # import os # from pygecko.transport.beac...
from Components.Converter.StringList import StringList class TemplatedMultiContent(StringList): """Turns a python tuple list into a multi-content list which can be used in a listbox renderer.""" def __init__(self, args): StringList.__init__(self, args) from enigma import eListboxPythonMultiContent, gFont, RT_HAL...
from __future__ import print_function import traceback #import tornado.ioloop from twisted.words.protocols import irc from twisted.internet import reactor, protocol from internals.commandRegistry import CommandRegistry import re, codecs, json from utils import sock class IrcBot(irc.IRCClient): """Expose stuff t...
# pylint: disable=E1101 from warnings import catch_warnings from datetime import datetime, timedelta from functools import partial from textwrap import dedent import pytz import pytest import dateutil import numpy as np import pandas as pd import pandas.tseries.offsets as offsets import pandas.util.testing as tm imp...
from helper import unittest, PillowTestCase, hopper, imagemagick_available import os.path class TestFilePalm(PillowTestCase): _roundtrip = imagemagick_available() def helper_save_as_palm(self, mode): # Arrange im = hopper(mode) outfile = self.tempfile("temp_" + mode + ".palm") ...
#!/usr/bin/env python 'Unit test for trepan.lib.file' import os, stat, sys, tempfile, unittest from trepan.lib import file as Mfile class TestLibFile(unittest.TestCase): def test_lookupmodule(self): m, f = Mfile.lookupmodule('os.path') self.assertTrue(f) self.assertTrue(m) m, f =...
# Copyright (C) 2010-2011 Richard Lincoln # # 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...
# -*- coding: utf-8 -*- # Copyright 2014 Stéphane Bidoul <stephane.bidoul@acsone.eu> # Copyright 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo.tests.common import TransactionCase import random class TestAccountReversal(TransactionCase...
# -*- coding: utf-8 -*- """ *************************************************************************** DeleteHoles.py --------------------- Date : April 2015 Copyright : (C) 2015 by Etienne Trimaille ***************************************************************************...
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
"""temp URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/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') Class-based ...
# $Filename$ # $Authors$ # # Last Changed: $Date$ $Committer$ $Revision-Id$ # # Copyright (c) 2003-2011, German Aerospace Center (DLR) # All rights reserved. # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are #met: # ...
from typing import TYPE_CHECKING import numpy as np from pandas.core.dtypes.common import is_integer, is_list_like from pandas.core.dtypes.generic import ABCDataFrame, ABCIndex from pandas.core.dtypes.missing import isna, remove_na_arraylike from pandas.io.formats.printing import pprint_thing from pandas.plotting._m...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function import numpy as np import pandas as pd from xarray.core import formatting from xarray.core.pycompat import PY3 from . import TestCase, raises_regex class TestFormatting(TestCase): def test_get_indexer_at_least_n_items(sel...
#! /usr/bin/env python3 import sys import lexer from tree import Node, CompositeNode class SymbolDesc: def __init__(self, symbol, lprio, rprio, evaluator): self.symbol = symbol self.lprio = lprio self.rprio = rprio self.evaluator = evaluator def __repr__(self): return...
import datetime import os import random import sys sys.path = [os.path.abspath(os.path.dirname(__file__))] + sys.path from quantile_ml import Predictor from quantile_ml.utils_models import load_ml_model import dill import numpy as np import pandas as pd from nose.tools import assert_equal, assert_not_equal, with_set...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # KDE, App-Indicator or Qt Systray # Copyright (C) 2011-2018 Filipe Coelho <falktx@falktx.com> # # 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; e...
#!/usr/bin/env python import os import sys import argparse from EMAN2 import * import pat3dem.pdb as p3p import pat3dem.main as p3m def main(): progname = os.path.basename(sys.argv[0]) usage = progname + """ [options] <localres.mrc> Get local resolution from localres.mrc and transfer to bfactors in pdb. """ ar...
import os import wget from dem.dependency.archive import ArchiveInstaller from dem.project.reader import Config class UrlInstaller: def __init__(self, project, packages, cache): self._packages = packages self._project = project self._download_directory = os.path.join('.devenv', project, '...
"""Django forms for hs_core module.""" import copy from models import Party, Creator, Contributor, validate_user_url, Relation, Source, Identifier, \ FundingAgency, Description from django.forms import ModelForm, BaseFormSet from django.contrib.admin.widgets import forms from django.utils.safestring import mark_s...
import os,sys,xbmc,xbmcplugin,xbmcaddon,xbmcgui,urllib,urllib2,re,time,datetime,string,StringIO,logging,random,array,htmllib,xbmcvfs #import common addon_id='plugin.program.sgs.notifications' ##Change this to the same as the addon.xml try: from addon.common.addon import Addon except: try: from t0mm0.common.ad...
# # Copyright 2018 Analytics Zoo Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # LabVariant.py # # Copyright 2014 olegartys <olegartys@gmail.com> # # 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 2 of ...
""" Server API Copyright (C) 2014 Walid Benghabrit 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...
from src.graph.agraph import AbstractGraph class WeightedGraph(AbstractGraph): def add_edge(self, n1, n2, w=0): if n1 not in self.graph: self.graph[n1] = [] if n2 not in self.graph: self.graph[n2] = [] self.graph[n1].append([n2, w]) self.graph[n2].append([n1, w]) def del_edg...
## Copyright 2016 - 2018 Raik Gruenberg ## This file is part of the LabHamster project (https://github.com/graik/labhamster). ## LabHamster is released under the MIT open source license, which you can find ## along with this project (LICENSE) or at <https://opensource.org/licenses/MIT>. from __future__ import unicode...
#!/usr/bin/env python # draft implementation # * TODO: # * centering should be optional # * viewpoint should be optional # * check for nonunique ids and warn # * check for bedtools version # * write bed files for sequence coordinates # * set rnd init for shuffling to have reproducible results # * use my ...
# -*- coding: utf-8 -*- import xml.etree.ElementTree as etree import base64 from struct import unpack, pack import sys import io import os import time import itertools import xbmcaddon import xbmc import urllib2,urllib import traceback import urlparse import posixpath import re import hmac import hashl...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Feb 18 16:59:33 2020 @author: heiko """ import unittest import numpy as np from parameterized import parameterized class TestNoiseCeiling(unittest.TestCase): def test_cv_noise_ceiling(self): from pyrsa.inference import cv_noise_ceiling ...
# https://old.reddit.com/r/GlobalOffensive/comments/8mjqgc/i_made_a_python_script_that_generates_stats_using/ # https://pastebin.com/LLpym05c import datetime import matplotlib.pyplot as plt def min_to_sec(line): # converts minutes in string format 'XXX:XX' to seconds seconds = 0 seconds += (int(line[-1])) ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from decimal import Decimal as D import responses from libnexmo import Nexmo from libnexmo.response import NexmoResponse API_KEY = 'my_api_key' API_SECRET = 'my_api_secret' nexmo = Nexmo(API_KEY, API_SECRET) FRM = '+33123456789' TO = '+33987654321' M...
#!/usr/bin/env python import ast import base64 import calendar import copy import datetime import getpass import json import os import pickle import pprint import re import readline import socket import stat import string import sys import time from requests.exceptions import ConnectionError import argparse import is...
# Copyright 2017 AT&T Intellectual Property. All other 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...
########################################################################################### # Filename: # Device.py ########################################################################################### # Project Authors: # Juhapekka Piiroinen # Brian Wu # # Changes: # June 14, 2010 by Juhapekka Pi...
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def HostInternetScsiHbaTargetSet(vim, *args, **kwargs): '''A collection of one or more st...
# -*- coding: utf-8 -*- """Test textlib module.""" # # (C) Pywikibot team, 2011-2019 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, division, unicode_literals import codecs from collections import OrderedDict import functools import os import re import pywikibot import p...
# # This source file is part of appleseed. # Visit http://appleseedhq.net/ for additional information and resources. # # This software is released under the MIT license. # # Copyright (c) 2014-2017 The appleseedhq Organization # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this s...
import subprocess import shlex from keypad.api import (Plugin, register_plugin, Filetype, Cursor) from keypad.abstract.code import IndentRetainingCodeModel, AbstractCompletionResults from keypad.core.syntaxlib import SyntaxHighlighter, lazy from keypad...
#!/usr/bin/python import requests import boto3 import argparse class Dns(object): # Default constructor of the class. def __init__(self): self.ec2_client = boto3.client('ec2') self.dns_client = boto3.client('route53') self.role = None self.env = None self.instance_id = ...
# -*- coding: utf-8 -*- """ Logging capabilities for the IRC Bot. """ import time from helpers import * LOG_NORMAL = "norm" LOG_INFO = "info" LOG_WARNING = "warn" LOG_ERROR = "error" class colors: BLACK = '\033[30m' GRAY = '\033[37m' GREEN = '\033[32m' MAGENTA = '\033[95m' VIOLET = '\033[95m' ...
import os import codecs import time from datetime import datetime class Train: def __init__(self, root=''): # Setting root directory for training data if root: self.root = root self.using_builtin_training = False else: #self.root = 'corpora/corpus-esare...
#!/usr/bin/env python # -*-coding:utf-8-*- # @Time : 2017/11/1 ~ 2019/9/1 # @Author : Allen Woo import json import os import socket import time import logging from logging.handlers import TimedRotatingFileHandler from apps.configs.sys_config import LOG_PATH, SOCKET_PORT from apps.utils.osr_async.osr_async import async...
""" Filters ------- Filters are an interesting and somewhat challenging part of the code base. They are used for two different purposes: - To figure out which nodes in the xml hierarchy to start rendering from. These are called 'finder filters' or 'content filters'. This is done before rendering starts. - To fig...
# Arithmetic tests for DataFrame/Series/Index/Array classes that should # behave identically. from datetime import datetime, timedelta import numpy as np import pytest from pandas.errors import OutOfBoundsDatetime, PerformanceWarning import pandas as pd from pandas import ( DataFrame, DatetimeIndex, NaT,...
# Reporting tool for querying Sales- and Financial Reports from iTunes Connect and Google Developer Console # # This tool can be used to download financial reports from both Google and Apple # for the app of your choice (of course i assume that you are the owner of this app) # # Copyright (c) 2017 Ayhan Sakarya, Kaasa ...