src
stringlengths
721
1.04M
# Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com> # Copyright 2017 David Vidal <david.vidal@tecnativa.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import fields from odoo.tests import common from datetime import timedelta, date class TestEventProject(common.SavepointCase):...
# -*- coding: utf-8 -*- from __future__ import absolute_import import numpy as np import ast import jsonpickle from jsonpickle.compat import unicode __all__ = ['register_handlers', 'unregister_handlers'] class NumpyBaseHandler(jsonpickle.handlers.BaseHandler): def restore_dtype(self, data): dtype = d...
# -*- coding: UTF-8 -*- # Copyright 2008-2017 Luc Saffre # License: BSD (see file COPYING for details) """Model mixins for `lino_xl.lib.ledger`. .. autosummary:: """ from __future__ import unicode_literals from builtins import str from django.db import models from lino.api import dd, rt, _ from lino.mixins impor...
# Copyright 2005 Duke University # Copyright (C) 2012-2015 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later versi...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
'''Copyright Gigaspaces, 2017, All Rights Reserved''' from cloudify_aws.connection import EC2ConnectionClient from cloudify_aws.ec2.instance import Instance as AwsInstance def stop(ctx, **_): ''' Stops an instance ..note: This is slightly modified version of the built-in AWS Instance...
from __future__ import print_function import logging from w3lib.url import is_url from scrapy.commands import ScrapyCommand from scrapy.http import Request from scrapy.item import BaseItem from scrapy.utils import display from scrapy.utils.conf import arglist_to_dict from scrapy.utils.spider import iterate_spider_out...
"""Django REST Framework - User! User App for Django with API Views""" __title__ = "User - Django REST Framework" __version__ = "0.0.8" __author__ = "101Loop" __license__ = "GPLv3" default_app_config = "drf_user.apps.DRFUserConfig" user_settings = { "DEFAULT_ACTIVE_STATE": False, "OTP": { "LENGTH": 5...
# -*- coding: utf-8 -*- import hashlib import json import pycurl from ..base.multi_account import MultiAccount class LinkifierCom(MultiAccount): __name__ = "LinkifierCom" __type__ = "account" __version__ = "0.01" __status__ = "testing" __description__ = """Linkifier.com account plugin""" _...
import models import base64 import json import logging import os import time from google.appengine.ext import db from google.appengine.api import memcache def generate_id(): return base64.b64encode(os.urandom(6), '-_') def error_message(user, data, message = ""): return json.dumps({'status': False, ...
# -*- coding: utf-8 -*- """ Created on Tue Jan 10 20:09:35 2017 @author: ruben """ import os from functools import wraps import pandas as pd def persist_timeseries_to_file(filename_cache=None): """ Persits a Pandas DataFrame object returned by a function into cache file using a decorator, s...
from direct.task.Task import Task import math from panda3d.core import PGButton, VBase4, DepthWriteAttrib, Point3 from toontown.chat.ChatBalloon import ChatBalloon from toontown.margins import MarginGlobals from toontown.margins.MarginVisible import MarginVisible from toontown.nametag import NametagGlobals from toonto...
# MIT License # # Copyright (c) 2016 Daily Actie # # 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, ...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
# coding: utf-8 from __future__ import absolute_import, division, print_function import os from shutil import rmtree from plumbum import FG from plumbum.cmd import pandoc, sphinx_build from shovel import task from watchdog.observers import Observer from watchdog.tricks import ShellCommandTrick from watchdog.watchmedo...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module contains the main object used to identify the coordination environments in a given structure. If you use this module, please cite the following: David Waroquiers, Xavier Gonze, Gian-Marco Rign...
#Boa:Frame:kejadian_lain import os import wx import wx.lib.buttons import data_penduduk import sqlite3 import string import gettext import peringatan db = sqlite3.connect('/opt/sidesa/sidesa') cur = db.cursor() def create(parent): return kejadian_lain(parent) [wxID_KEJADIAN_LAIN, wxID_KEJADIAN_LAINCARI_KK, wxI...
#!/usr/bin/env python #-*- coding:utf-8 -*- """ popup menu by right click Tested environment: Mac OS X 10.6.8 http://developer.qt.nokia.com/doc/qt-4.8/qmenu.html#details http://diotavelli.net/PyQtWiki/Handling%20context%20menus """ import sys try: from PySide import QtCore, QtGui except ImportError: from...
import numpy as np import matplotlib.pyplot as plt from scipy import interpolate from matplotlib.path import Path from matplotlib.patches import PathPatch, Circle from . import positions def plot_scalp(densities, sensors, sensor_locs=None, plot_sensors=True, plot_contour=True, cmap=None, clim=None, smark='k.', line...
# -*- coding: utf-8 -*- """ Name : radcenter_distribution Author : Joan Juvert <trust.no.one.51@gmail.com> Version : 1.0 Description : This script calculates the influence of the distribution of : radiative centers in the active layer on the observed : spectrum. Copyright 2012 J...
import unittest from semantic_version import Version from maintain.release.base import Releaser from maintain.release.aggregate import AggregateReleaser from maintain.release.version_file import VersionFileReleaser from ..utils import temp_directory, touch class MockReleaser(Releaser): def __init__(self, curren...
import time import datetime import boto.glacier.exceptions _RETRY_INTERVAL_S = 60 * 1 _ANNOUNCE_INTERVAL_S = 60 * 10 _MAX_ATTEMPTS = 0 def auto_retry(description, cb, loop_on_error_substring, retry_interval_s=_RETRY_INTERVAL_S, announce_interval_s=_ANNOUNCE_INTERVAL_S, max_attempts=_MAX_ATTEMPTS): print("Waiting...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='DeliriumUser', fields=[ ('id', models.AutoField...
"""! @brief Unit-tests for SOM-SC algorithm. @authors Andrei Novikov (pyclustering@yandex.ru) @date 2014-2020 @copyright BSD-3-Clause """ import unittest # Generate images without having a window appear. import matplotlib matplotlib.use('Agg') from pyclustering.cluster.somsc import somsc from p...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import itertools from sqlalchemy import func from sqlalchemy.orm import class_mapper from sqlalchemy.sql.expression import not_ from .base import BaseFilterBackend def lower(value): try: return value.lower()...
"""ThreatConnect TI URL""" # standard library from urllib.parse import quote_plus from ..indicator import Indicator class URL(Indicator): """Unique API calls for URL API Endpoints""" def __init__(self, ti: 'ThreatIntelligenc', **kwargs): """Initialize Class Properties. Args: tex...
# # $Id: ImportTest.py 9277 2011-06-09 20:28:09Z ahartvigsen $ # # Proprietary and confidential. # Copyright $Date:: 2011#$ Perfect Search Corporation. # All rights reserved. # import unittest, os, tempfile, subprocess, sys from testsupport import checkin, RUNROOT @checkin class ImportTest(unittest.TestCase): de...
#!/usr/bin/env python from __future__ import print_function import os, sys import time, datetime import rumps import webbrowser from jupyter import Jupyter class JupyterStatusBarApp(rumps.App): #def __init__(self): # super(JupyterStatusBarApp, self).__init__("jupyter") # self.title="jupyter" #...
""" Conversions to unicode. Author(s): Arno Bakker """ import binascii import chardet def ensure_unicode(s, encoding, errors='strict'): """Similar to six.ensure_text() except that the encoding parameter is *not* optional """ if isinstance(s, bytes): return s.decode(encoding, errors) elif isi...
''' Created on Jul 10, 2014 @author: jtaghiyar ''' import codecs import os import re from setuptools import setup def read(*paths): here = os.path.dirname(os.path.abspath(__file__)) with open(os.path.join(here, *paths)) as f: return f.read() def get_version(): version_file = read("kronos", "kron...
# -*- coding: utf-8 -*- # Copyright (c) 2012-2014 Andrey Vlasovskikh # # 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, ...
from fpdf import FPDF import os import glob import PIL from PIL import Image import click __doc__ = """ saves each image in a directory on a page of a newly created PDF """ letter_width_inches = 8.5 letter_height_inches = 11 def images_to_pdf(path, offset_coords=(-5, 0), ext='.png'): path = os...
# ---------------------------------------------------------------------- # Copyright (C) 2015 by Rafael Gonzalez # # 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, includi...
# -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2015 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by th...
from bs4 import BeautifulSoup import urllib import config as c from pymongo import MongoClient client = MongoClient() db = client.articles.entries def gen_index(seed=db.count()): i = seed while True: i +=1 yield i index = gen_index() def generate_filename(entry, directory = c.ARTICLE_DIR): authors = [...
import os, sys, re #Image manipulation from PIL import Image from PIL import ImageFont from PIL import ImageDraw #Check input format import mmap #XML parsing import xml.etree.ElementTree #HTML parsing from lxml import html from StackIt import scraper, config, decklist, globals from StackIt.globals import Card, spe...
import time from boto.ec2.autoscale import AutoScaleConnection def get_asg_connection(): conn = AutoScaleConnection() autoscale_groups = conn.get_all_groups(max_records=1) return conn def find_unused_launch_configs(): conn = get_asg_connection() autoscale_groups = conn.get_all_groups(max_record...
""" Django settings for pythonapp project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build pa...
#!/usr/bin/env python #-*- coding:utf-8 -*- import string import re import random import hashlib from flask import request, session def generate_csrf_token(): rand_str = randstr(20) session['_csrf_token'] = get_session_token(rand_str) return rand_str def get_session_token(rand_str): key = 'SaltOfToken...
#!/usr/bin/env python import webapp2 from google.appengine.api import app_identity from google.appengine.api import mail,memcache from conference import ConferenceApi,MEMCACHE_FEATURED_SPEAKER_KEY from google.appengine.ext import ndb from models import Session, Speaker class SetAnnouncementHandler(webapp2.RequestHandl...
import argparse import pandas as pd import os import sumpy import sumpy.eval def load_docsets(duc_dir): docset_paths = [os.path.join(duc_dir, fname) for fname in os.listdir(duc_dir)] docset_paths = [path for path in docset_paths if os.path.isdir(path)] docsets = {} for docset_path ...
#!/usr/bin/env python import sys import json import argparse import time from webapollo import WAAuth, WebApolloInstance, OrgOrGuess, GuessOrg, AssertUser import logging logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) if __name__ == "__main__": parser = argparse.ArgumentParser( ...
# coding: utf-8 """ Este processamento gera uma tabulação de datas do artigo (publicação, submissão, aceite, entrada no scieloe atualização no scielo) """ import argparse import logging import codecs import datetime import xylose.scielodocument import utils import choices logger = logging.getLogger(__name__) d...
# -*- coding: utf-8 -*- ''' Describe database model for Django @author: Laurent GAY @organization: sd-libre.fr @contact: info@sd-libre.fr @copyright: 2015 sd-libre.fr @license: This file is part of Lucterios. Lucterios is free software: you can redistribute it and/or modify it under the terms of the GNU General Publi...
from urlparse import urlparse import tarfile import pytest import os from ..automation import TaskManager import utilities TEST_SITES = [ 'http://google.com', 'http://facebook.com', 'http://youtube.com', 'http://yahoo.com', 'http://baidu.com', 'http://wikipedia.org', 'http://qq.com', '...
"""DPMatrix.py This class models a dynamic progamming matrix for use in sequence alignment models. The design of this class is based on the description of dynamic programming matrices in: Durbin et al. 1998. Biological Sequence Analysis. Cambridge University Press. Classes: * DPMatrix * DPMatrixCell "...
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
# helpers for handling last calls on Internet Drafts import datetime from django.db.models import Q from ietf.doc.models import Document, State, DocEvent, LastCallDocEvent, WriteupDocEvent from ietf.doc.models import save_document_in_history from ietf.doc.models import IESG_SUBSTATE_TAGS from ietf.person.models impo...
"""Test `Grapheme Cluster Break`.""" import unittest from backrefs import uniprops import re class TestGraphemeClusterBreak(unittest.TestCase): """Test `Grapheme Cluster Break` access.""" def test_table_integrity(self): """Test that there is parity between Unicode and ASCII tables.""" re_key...
from PyQt4.QtGui import QFormLayout, QColor, QApplication, QLineEdit from PyQt4.QtCore import Qt, QTimer import numpy import pyqtgraph as pg from Orange.data import Table, Domain, StringVariable from Orange.data.sql.table import SqlTable, AUTO_DL_LIMIT from Orange.preprocess import Normalize from Orange.projection im...
# Copyright (c) 2012 Hal Blackburn <hwtb2@caret.cam.ac.uk> and # CARET, University of Cambridge http://www.caret.cam.ac.uk/ # # 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 Softwa...
import time import unittest import logging import subprocess import shlex import os import signal from nose.plugins.skip import SkipTest from daemon import AgentSupervisor class TestAutoRestart(unittest.TestCase): """ Test the auto-restart and forking of the agent """ def setUp(self): self.agent_fore...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- DICO = { 'ref' : { "name" : "Apte without POR (reference version)", "call" : "apte", "branch" : "", "benchs": { "TEST": { "new" : False, "file": "TEST.txt", "res" : True, ...
from __future__ import annotations from collections import OrderedDict as OD from uuid import uuid4 from itertools import chain from operator import itemgetter import logging logger = logging.getLogger(__name__) class NodeMeta(type): '''used to magically update the nb_attrs''' def __new__(mcs, name, bases, att...
import unittest from tests import mocks from hasoffers.api import Client, BrandClient, AffiliateClient class TestBrandAPI(unittest.TestCase): def setUp(self): self.client = BrandClient("token", "id") def test_client(self): self.assertEqual("token", self.client.network_token) self.ass...
# Copyright (c) 2009-2011 by Bjoern Kolbeck, Zuse Institute Berlin # Licensed under the BSD License, see LICENSE file for details. TestSets = { 'short' : { 'ssl': False, 'mrc_repl': False, 'dir_repl': False, 'snmp': False, }, 'full' : { ...
print(__doc__) # Code source: Gaël Varoquaux # Andreas Müller # Modified for MCZA015-13 class project by Rodrigo Martins de Oliveira # License: BSD 3 clause import matplotlib.pyplot as plt import numpy as np from matplotlib.colors import ListedColormap from sklearn.datasets import make_circles from skle...
from django.forms.models import modelformset_factory from django.core.exceptions import ImproperlyConfigured class ModelFormSetFactoryMixin(object): formset_fields = None formset_exclude = None formset_extra = 1 def get_formset_model(self): if self.formset_model: model = self....
from common_fixtures import * # NOQA from cattle import ApiError from test_physical_host import disable_go_machine_service # NOQA from copy import deepcopy from test_authorization import service_client # NOQA @pytest.fixture(scope='module') def update_ping_settings(request, super_client): # These settings need...
import datetime from django.test import TestCase from django.urls import reverse from coredata.models import Person, Unit from advisornotes.models import NonStudent, AdvisorNote from courselib.testing import basic_page_tests, Client class AdvisorNotestest(TestCase): fixtures = ['basedata', 'coredata'] def t...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'PerNatureByYear' db.create_table(u'montanha_pernaturebyye...
""" import logging import logging.handlers import logging.config logging.config.fileConfig('logging.ini') log = logging.getLogger(__file__) """ import os, sys import subprocess import traceback from singleton import Singleton import simplejson from apscheduler import events from apscheduler.scheduler import...
from opaflib.parser import parse,bruteParser,normalParser,xrefParser,multiParser from opaflib.xmlast import etree #payload,setpayload,xmlToPy,etree,create_node from opaflib.filters import defilterData from opaflib.xref import * #Logging facility import logging logging.basicConfig(filename='opaf.log',level=logging.DEBUG...
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
""" Tests for cohorts """ # pylint: disable=no-member import ddt from mock import call, patch from nose.plugins.attrib import attr import before_after from django.contrib.auth.models import User from django.db import IntegrityError from django.http import Http404 from django.test import TestCase from opaque_keys.edx....
import base64 import time import warnings from django.contrib.auth.models import User from django.core import mail from django.http import HttpRequest from django.test import TestCase from tastypie.authentication import Authentication, BasicAuthentication, ApiKeyAuthentication, DigestAuthentication, OAuthAuthentication...
# Copyright (c) 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...
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.18 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
# This file is part of Indico. # Copyright (C) 2002 - 2016 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...
from querylist.dict import BetterDict from querylist.fieldlookup import field_lookup class QueryList(list): """A QueryList is an extension of Python's built in list data structure that adds easy filtering, excluding, and retrieval of member objects. >>> from querylist import QueryList >>> sites = Que...
''' Copyright (c) 2019 Timothy Savannah under terms of LGPLv3. All Rights Reserved. See LICENSE (https://gnu.org/licenses/lgpl-3.0.txt) for more information. See: https://github.com/kata198/AdvancedHTMLParser for full information ==INTERNAL== xpath._body.py - Internal module for dealing with it...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings import django.contrib.gis.db.models.fields class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ...
# encoding: utf-8 """ DrawingML objects related to line formatting """ from __future__ import absolute_import, print_function, unicode_literals from ..enum.dml import MSO_FILL from .fill import FillFormat from ..util import Emu, lazyproperty class LineFormat(object): """ Provides access to line properties ...
# # Copyright 2013, 2018 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later versio...
import io # --- Day 19: An Elephant Named Joseph --- # # The Elves contact you over a highly secure emergency channel. Back at # the North Pole, the Elves are busy misunderstanding White Elephant # parties. # # Each Elf brings a present. They all sit in a circle, numbered starting # with position 1. Then, starting w...
""" Demonstrate how to build a quick and dirty Base Line Model using scikit learn """ # Load Libraries import numpy as np from sklearn import datasets from sklearn.metrics import accuracy_score, confusion_matrix # Let us use Iris dataset iris = datasets.load_iris() x = iris.data y = iris.target from sklearn.dumm...
"""Tests for sendfile functionality.""" import asyncio import os import socket import sys import tempfile import unittest from asyncio import base_events from asyncio import constants from unittest import mock from test import support from test.test_asyncio import utils as test_utils try: import ssl except Import...
''' Copyright 2016 Travel Modelling Group, Department of Civil Engineering, University of Toronto This file is part of the TMG Toolbox. The TMG Toolbox is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Fou...
from lib.build_graph import build_graph, load, recursive_partition, save import lib.models.default.lda as lda from lib.models.default.url_ingestor import RCPIngestor import pickle import networkx import csv from lib.models.default.configmap import Config import os config = Config() if __name__ == "__main__": # t...
##################################################################################### # # Copyright (C) Tavendo GmbH # # Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you # have purchased a commercial license), the license terms below apply. # # Should you enter into a separate licen...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.shortcuts import render from django.shortcuts import HttpResponse from django.views.generic import DetailView, ListView from .models import Lobby # Create your views here. class LobbyShortView(DetailView): # One-line view of Lobby for list ...
### import parsing from xml.dom.minidom import parse import xml.dom.minidom ### import ElementTree from xml.etree.ElementTree import ElementTree, Element, parse def simple_dual(DOMTree, collection, level): ### ???? a = 0 # new_for_parse.py ### to count the number of three dual notes chord_pre =...
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2017 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # 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, eith...
# (c) Copyright 2012-2014 Hewlett-Packard Development Company, L.P. # 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...
from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver # CUSTOM FILE SIZE VALIDATOR def validate_image(fieldfile_obj): """ Limit image size upload """ ...
#=============================================================================== # - CPython is the real name of default standard Python implementation # - Implemented in C # - There are Python implementations in other languages: # - Jython: Python 2.5 interpreter written in Java which runs bytecode in the JVM # ...
# -*- coding: utf-8 -*- """ reporead command Parses a repo.db.tar.gz file and updates the Arch database with the relevant changes. Usage: ./manage.py reporead ARCH PATH ARCH: architecture to update; must be available in the database PATH: full path to the repo.db.tar.gz file. Example: ./manage.py reporead i686...
from __future__ import absolute_import, division from plotly import exceptions, optional_imports import plotly.colors as clrs from plotly.figure_factory import utils from plotly.graph_objs import graph_objs from plotly.validators.heatmap import ColorscaleValidator # Optional imports, may be None for users that only u...
# # Copyright (c) 2015, Scott J Maddox # # This file is part of Open Band Parameters Device Simulator (OBPDS). # # OBPDS 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...
# 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 (t...
#!/usr/bin/env python3 # Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """An example functional test The module-level docstring should include a high-level description of what ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # from nose.tools import assert_equal, assert_true import numpy as np import numpy.testing as npt from pymwm.muller import Muller def test_func1(): vals = np.sort( np.around( [1 + 0j, (-1 + 1j * np.sqrt(3)) / 2, (-1 - 1j * np.sqrt(3)) / 2], ...
from Texture import Texture from Tex import Tex #from weakref import * from PIL import Image ## ## @brief stores and keeps track of on card textures ## ## stores and keeps track of on card textures. ## TODO: resizes and caches to disk texture shrinking HORIZONTAL=0 VERTICAL=1 import weakref class TextureEngine: ...
# <copyright> # (c) Copyright 2017 Hewlett Packard Enterprise Development LP # # 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 ve...
import os import os.path import tempfile import shutil import json from nose.tools import eq_ from nose.tools import with_setup from build_pack_utils import utils from common.integration import ErrorHelper from common.components import BuildPackAssertHelper from common.components import HttpdAssertHelper from common.co...
# Copyright 2021 The FedLearner 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...
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para cuevana # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re import sys import urlparse from core import config f...
class Node(): """docstring for Node""" def __init__(self, cargo, next=None): self.cargo = cargo self.next = next def __str__(self): return str(self.cargo) class LinkedList(): def __init__(self, head=None): self.head = None def is_empty(self): return self.he...
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2016 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # 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, eith...