src
stringlengths
721
1.04M
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand from applications.product.models import Category, Product from applications.discount.models import Action __author__ = 'Alex Starov' class Command(BaseCommand, ): def handle(self, *args, **options): try: action_cate...
from src.base.solution import Solution from src.tests.part2.q081_test_rotated_search_ii import RotatedSearchIiTestCases class RotatedSearchIi(Solution): def gen_test_cases(self): return RotatedSearchIiTestCases() def run_test(self, input): return self.search(input[0], input[1]) def searc...
# -*- coding: iso-8859-1 -*- from __future__ import print_function import sys, time, re, codecs, string, traceback, socket, hashlib import unicodedata, requests, feedparser from . import param, transform, util, porter2 import bleach try: import html.entities as htmlentitydefs except ImportError: import htmlentityd...
"""SolTrack: a simple, free, fast and accurate C routine to compute the position of the Sun. Copyright (c) 2014-2020 Marc van der Sluys, Paul van Kan and Jurgen Reintjes, Sustainable Energy research group, HAN University of applied sciences, Arnhem, The Netherlands This file is part of the SolTrack packa...
# -*- coding: utf-8 -*- EGSPHAN_EXT = ".egsphant" EGSINP_EXT = ".egsinp" EGSPHSF_EXT = ".egsphsp1" def make_cup_prefix(radUnit, outerCup, innerCupSer, innerCupNum): """ Makes filename prefix given RU, OC, IC info Parameters ---------- radUnit: string radiation unit oute...
from landscape.client.deployment import Configuration ALL_PLUGINS = ["ActiveProcessInfo", "ComputerInfo", "LoadAverage", "MemoryInfo", "MountInfo", "ProcessorInfo", "Temperature", "PackageMonitor", "UserMonitor", "RebootRequired", "AptPreferences", "NetworkActivity", ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('taxonomy', '0001_initial'), ] operations = [ migrations.CreateModel( name='Clones', fields=[ ...
# -*- coding: utf-8 -*- __author__ = "Javier de la Rosa" __license__ = "GPL 3" __version__ = "2.0.2" __email__ = "versae@gmail.com" __url__ = "https://github.com/versae/neo4j-rest-client" __description__ = """Object-oriented Python library to interact with """ \ """Neo4j standalone REST server""" __st...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015, 2016 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 # License, or (at your option) any...
""" 博客应用的视图函数。 """ import json from django.shortcuts import render, redirect, get_object_or_404 from django.contrib.auth.decorators import login_required from django.core.paginator import Paginator, InvalidPage from django.contrib import messages from django.conf import settings from django.http import HttpResponse fro...
# -*- coding: utf-8 -*- """ Created on Fri Dec 2 04:39:22 2016 @author: reyansh """ import numpy as np import pygame import matplotlib.pyplot as plt import time import sys import os print("Visualisation Program started.\n") location = os.getcwd()+"/HistogramData/" pygame.init() myfont = pygame.font.SysFont("Robo...
import requests import json from datetime import datetime, timedelta def get_stock(query): # query 可以是多支股票, 如 TPE:2330,TPE:2498, 不同股票以 , 分開 resp = requests.get('http://finance.google.com/finance/info?client=ig&q=' + query) if resp.status_code == 200: # 移除回傳資料開頭的 // # 剩下的資料是一個 list of dict,...
from datetime import timedelta from flask import Flask, redirect, render_template, request, url_for import json from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from tornado.wsgi import WSGIContainer from webpixels import PixelSet, RgbPixel from webpixels.controller import ColorKinetics app ...
#!/bin/env python """ e.g.: $ python rowe-adcp-bottom-track-summary.py /mbari/LRAUV/makai/missionlogs/devel/20150617-ADCP-in-tank/20150617T172914/ADCP-2015061717.ENS.mat """ import numpy as np import scipy as sp import scipy.io import matplotlib.pyplot as plt def plot_adcp_bottom_track_summary(infile, save=True, sho...
#!/usr/bin/env python """ @package ion.services.mi.instrument_driver Instrument driver structures @file ion/services/mi/instrument_driver.py @author Edward Hunter @brief Instrument driver classes that provide structure towards interaction with individual instruments in the system. """ __author__ = 'Steve Foley' __lic...
import os import sys import json from datamanagerpkg import ProtonCommunication_data_manager from datamanagerpkg import GalaxyCommunication_data_manager from sequencer.models import Experiments, GalaxyUsers from sequencer.models import GalaxyJobs, ExperimentRawData from sequencer.models import UserCommonJobs,Supported...
# -*- python -*- # # Git Version: @git@ #----------------------------------------------------------------------- # XALT: A tool that tracks users jobs and environments on a cluster. # Copyright (C) 2013-2014 University of Texas at Austin # Copyright (C) 2013-2014 University of Tennessee # # This library is free softw...
#!/usr/bin/env python # Copyright (C) 2012 pleed@dexlabs.org # # 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 -*- # WxGeometrie # Dynamic geometry, graph plotter, and more for french mathematic teachers. # Copyright (C) 2005-2013 Nicolas Pourcelot # # 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 #...
#!/usr/bin/python # # This file is part of django-socialize project. # # Copyright (C) 2011-2020 William Oliveira de Lagos <william.lagos@icloud.com> # # Socialize is free software: you can redistribute it and/or modify # it under the terms of the Lesser GNU General Public License as published by # the Free Software Fo...
import os import tensorflow as tf from threading import Thread from networks.factory import NetworkFactory import util class Trainer(object): def __init__(self, config): util.log('Creating network and training operations') self.config = config # Creating networks factory = NetworkFactory(config) ...
# csv2pskc.py - script to convert a CSV file to PSKC # # Copyright (C) 2018 Arthur de Jong # # 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 License, or (at yo...
from io import BytesIO from rocker.rocker import Rocker from rocker.restclient import HttpResponseError import json import os import sys import tarfile # Data class representing a Docker image class Image: def __init__(self, json): self.config = Image._getValue(json, 'ContainerConfig') self.created = Image._get...
#!/usr/bin/env python ''' Copyright (c) 2016, Paul-Edouard Sarlin All rights reserved. Project: Autonomous Monitoring System File: main.py Date: 2016-08-08 Author: Paul-Edouard Sarlin Website: https://github.com/skydes/monitoring ''' from multiprocessing import Que...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack 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 # ...
# Copyright (C) 2015 Allen Li # # This file is part of Dantalian. # # Dantalian 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. # # Da...
#!/usr/bin/python3 import argparse import fnmatch import numpy as np import os.path from props import getNode from lib import project # for all the images in the project image_dir, detect features using the # specified method and parameters # # Suggests censure/star has good stability between images (highest # like...
#!/usr/bin/python # coding=UTF-8 # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the...
# Copyright 2017 TWO SIGMA OPEN SOURCE, 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 agr...
import lxml.etree import sieve.operators as ops from nose.tools import raises @raises(AssertionError) def test_assert_eq_xml(): ops.assert_eq_xml("<foo></foo>", "<bar></bar>") def test_eq_xml(): b = "<foo><bar>Value</bar></foo>" c = """ <foo> <bar> Value </bar> </foo> """ assert ops....
#!/usr/env/python # -*- coding: utf-8 -*- ''' Script to predict articles for an entire WikiProject using its trained model and the entire snapshot dataset. Copyright (c) 2017 Morten Wang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (t...
""" Check that the flake8 (and pandas-dev-flaker) pins are the same in: - environment.yml - .pre-commit-config.yaml, in the flake8 hook - .pre-commit-config.yaml, in the additional dependencies of the yesqa hook The flake8 hook revision in .pre-commit-config.yaml is taken as the reference revision. Usage: either - ...
import os import pytest from pyqode.core.api import TextHelper, TextBlockHelper from pyqode.qt import QtCore from pyqode.qt.QtTest import QTest from pyqode.core import panels from test.helpers import editor_open, ensure_visible def get_panel(editor): return editor.panels.get(panels.FoldingPanel) def test_enable...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron # Copyright 2015, TODAY Clouder SASU # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License with Attribution # ...
try: import h5py except: pass import logging import scipy as np from pysnptools.pstreader import PstReader from pysnptools.pstreader.pstdata import PstData import warnings try: from builtins import range except: pass class PstHdf5(PstReader): ''' A :class:`.PstReader` for reading \*.pst.hdf5 f...
# -*- 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 field 'Ticket.checked_in' db.add_column(u'reg_ticket', 'checked_...
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
""" Tests for creating new tokenizers. """ import pytest from nominatim.db import properties from nominatim.tokenizer import factory from nominatim.errors import UsageError from dummy_tokenizer import DummyTokenizer @pytest.fixture def test_config(def_config, tmp_path, property_table, tokenizer_mock): def_config....
# coding=utf-8 from tornado_websockets.modules.module import Module class ProgressBar(Module): """ Initialize a new ProgressBar module instance. If ``min`` and ``max`` values are equal, this progress bar has its indeterminate state set to ``True``. :param min: Minimum value ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('pyspy', '0003_surveillancevideos'), ] operations = [ migrations.CreateModel( name='SurveillanceVideo', ...
## ## Biskit, a toolkit for the manipulation of macromolecular structures ## Copyright (C) 2004-2007 Raik Gruenberg & Johan Leckner ## ## 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 v...
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
import urlparse import os, sys, re import time from flask import Flask, request, jsonify, abort, json, make_response from msc_apps import * #tools_dir = os.environ.get('TOOLSDIR') #lib_path = os.path.abspath(tools_dir) #sys.path.append(lib_path) data_dir_root = os.environ.get('DATADIR') app = Flask(__name__) app.debu...
import os import numpy as np from nose.plugins.attrib import attr from nose.tools import assert_almost_equal, assert_dict_equal from nose.tools import assert_list_equal from microscopes.lda import model, runner from microscopes.lda.definition import model_definition from microscopes.common.rng import rng from microsc...
import csv import os parentdir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) lighthousedir = os.path.dirname(os.path.dirname(parentdir)) os.sys.path.insert(0,parentdir) f_database = csv.reader(open(lighthousedir+'/Dlighthouse/Computational/dataBase/le_invert.csv')) databaseRoutines = [] for line in f...
import logging from mongoengine import connect, ConnectionError from mongoengine.connection import disconnect from pywall.funnycats.config import Config from pywall.funnycats.score_job import ScoreJob, need_to_add_job from pywall.funnycats.user import User class FunnyCats(): def __init__(self, jenkins, score_view,...
import pytest from cfme import test_requirements from cfme.common.host_views import HostDriftAnalysis from cfme.infrastructure.host import Host from cfme.infrastructure.provider import InfraProvider from cfme.utils import testgen from cfme.utils.appliance.implementations.ui import navigate_to from cfme.utils.blockers ...
import cloudstorage import csv import datetime import json import logging import os import StringIO import tba_config from google.appengine.api import taskqueue from google.appengine.api import urlfetch from google.appengine.ext import ndb from google.appengine.ext import webapp from google.appengine.ext.webapp import...
''' Created on Sep 27, 2018 @author: lqp ''' import os from os import environ from flask.app import Flask from util.TrackUtil import current_milli_time import json from flask.globals import request from util.logger import mainLogger from util import TrackUtil from flask import logging rootDir = '../..' if 'rootDir' ...
# document_AIKIF.py written by Duncan Murray 18/4/2014 # All Python Program Statistics # 26/08/2014 : Files = 110 Bytes = 377221 Lines = 10694 Lines of Code = 8836 # 30/10/2014 : Files = 127 Bytes = 444760 Lines = 12595 Lines of Code = 10409 # 04/03/2015 : Files = 142 Bytes = 572245 Lines = 15947 Li...
from manifestgen.app import convert_filenames_to_urls import unittest class TestConvertFilenamesToUrls(unittest.TestCase): def test_cannonical(self): result = convert_filenames_to_urls( [ '/usr/proj/index.html', '/usr/proj/js/util.js'], '/usr/proj', '/sample/static' ) self.assertEqual( result...
from django.db import models from django.urls import reverse from guardian.models import GroupObjectPermissionBase, UserObjectPermissionBase class Article(models.Model): title = models.CharField('title', max_length=64) slug = models.SlugField(max_length=64) content = models.TextField('content') crea...
# charset.py """Handle alternate character sets for character strings.""" # # Copyright (c) 2008-2012 Darcy Mason # This file is part of pydicom, released under a modified MIT license. # See the file license.txt included with this distribution, also # available at https://github.com/darcymason/pydicom # from pyd...
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Matt Martz <matt@sivel.net> # Copyright (C) 2015 Rackspace US, 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 3 of ...
# MIT License # # Copyright (c) 2017 Dan Persons <dpersonsdev@gmail.com> # # 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 ...
# GUI Application automation and testing library # Copyright (C) 2006-2018 Mark Mc Mahon and Contributors # https://github.com/pywinauto/pywinauto/graphs/contributors # http://pywinauto.readthedocs.io/en/latest/credits.html # All rights reserved. # # Redistribution and use in source and binary forms, with or with...
import os import glob from .reader import reader as sql_reader from mygrations.formats.mysql.definitions.database import database as database_definition class database(database_definition): def __init__(self, strings): """ Constructor. Accepts a string or list of strings with different possible contents ...
# coding=utf-8 # Copyright (c) 2017 Presslabs SRL # # 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 ...
# -*- coding: utf-8 -*- import datetime from openerp import http from openerp.http import request from openerp import tools from openerp.tools.translate import _ class website_account(http.Controller): @http.route(['/my', '/my/home'], type='http', auth="public", website=True) def account(self): partn...
# -*- coding: utf-8 -*- """ Created on Wed Apr 5 20:13:42 2017 @author: AmatVictoriaCuramIII """ firsttime = '07/01/1983' secondtime = '01/01/1995' thirdtime = '01/01/2006' fourthtime = '01/01/2010' lasttime = '01/01/2050' ticker = '^GSPC' import pandas as pd from ChaikinAggMaker import ChaikinAggMaker ...
# -*- coding: utf-8 -*- #!/usr/bin/env python import os import csv import codecs import string import random from datetime import datetime, time import django.core.management import alcide.settings django.core.management.setup_environ(alcide.settings) from django.contrib.auth.models import User from alcide.actes.mod...
from typing import Any, Dict, Mapping, Optional, Text, Union from django.conf import settings from django.utils.timezone import now as timezone_now from django.utils.translation import ugettext as _ from django.contrib.sessions.models import Session as djSession try: from django.middleware.csrf import _compare_sa...
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
import unittest import SimPEG.VRM as VRM import numpy as np class VRM_waveform_tests(unittest.TestCase): def test_discrete(self): """ Test ensures that if all different waveform classes are used to construct the same waveform, the characteristic decay they produce should be the s...
#!/usr/bin/env python3 import argparse import subprocess from pathlib import Path from textwrap import dedent from typing import List, Sequence, Set def main() -> None: folders = create_parser().parse_args().folders for fp in get_files_with_import(folders): remove_builtins(file_path=fp) if safe_to_remov...
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. from tweepy.error import TweepError from tweepy.utils import parse_datetime, parse_html_value, parse_a_href class ResultSet(list): """A list like object that holds results from a Twitter API query.""" def __init__(self, max_id=None, s...
#!/usr/bin/python # -*- coding: utf-8 -*- # log_deps.py file is part of slpkg. # Copyright 2014-2015 Dimitris Zlatanidis <d.zlatanidis@gmail.com> # All rights reserved. # Slpkg is a user-friendly package manager for Slackware installations # https://github.com/dslackw/slpkg # Slpkg is free software: you can redist...
############################################################################## # Copyright (c) 2013-2017, 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...
import numpy as np from scipy.special import gamma, gammaln def W(t, x, alpha, sigma, tau): if tau > 0: logout = np.log(alpha) + np.log(1. - np.exp(-tau * (x - t))) + (-1 - sigma) * np.log(t) + (-t * tau) - np.log( tau) - gammaln(1. - sigma) else: logout = np.log(alpha) - gammaln(1...
from django.test import TestCase from django.core.exceptions import ValidationError from core.interface.static_intr.models import StaticInterface from core.interface.static_intr.models import StaticIntrKeyValue from systems.models import System from mozdns.domain.models import Domain from mozdns.address_record.models ...
import os import sys sys.path.append('..') import numpy as np from ovf2vtk import analysis as ana from ovf2vtk import omfread as omf from ovf2vtk import analysis_original """all the tests developed for the analysis.py script for ovf2vtk stored in one place. By Harry Wilson. Last updated 04/11/15""" # ***********...
# -*-coding:utf-8-*- import wtforms_json import re from wtforms import IntegerField, StringField, FloatField from wtforms import TextAreaField, BooleanField, FieldList from wtforms import FormField, FieldList from wtforms.validators import ValidationError, Length, DataRequired from wtforms import Form """ 基于wtforms的...
"""growth_studio URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/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') Cl...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # [The "New BSD" license] # Copyright (c) 2014 The Board of Trustees of The University of Alabama # All rights reserved. # # See LICENSE for details. """ Code for generating the corpora. """ from StringIO import StringIO import re import gensim import dulwich import du...
""" As mat2_p2D.py, but the boundary conditions are different. Here, u=0 on x=0 and u=1 on x=1, while du/dn=0 on y=0 and y=1. This yields a solution u(x,y)=x, regardless of the values of k. """ from dolfin import * import sys, math, numpy mesh = UnitSquareMesh(4, 6) # Define a MeshFunction over two subdomains subdom...
# coding=utf-8 ''' Created on 3/20/2017 8:58 57PM Wang Weimin @author: wangwm ''' import os from pcd_corners_est import exact_full_marker_data import numpy as np from pcd_corners_est import generate_grid_coords import matplotlib.pyplot as plt import matplotlib import vtk import config from ast import literal_eval as m...
from flask_login import current_user from app.brain.utilities import prepare_history_entry from app.constants import HISTORY_CONSTANTS, TAXONOMY_CONSTANTS from app.service import RepExercisesHistoryService, RepExercisesTaxonomyService class UserData(object): """ Returns the relevant data for one user I ...
""" Copyright 2013 Jun Funada 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 wri...
# -*- Import: -*- from paver.easy import * from paver.setuputils import setup from setuptools import find_packages try: # Optional tasks, only needed for development # -*- Optional import: -*- from github.tools.task import * import paver.doctools import paver.virtual import paver.misctasks ...
# Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University # Copyright (c) 2011, 2012 Open Networking Foundation # Copyright (c) 2012, 2013 Big Switch Networks, Inc. # See the file LICENSE.pyloxi which should have been included in the source distribution # Automatically generated by LOXI from ...
"""Task runner""" from multiprocessing import Process, Queue as MQueue from threading import Thread import pickle import queue import cloudpickle from .exceptions import InvalidTask, CatchedException from .exceptions import TaskFailed, SetupError, DependencyError, UnmetDependency from .task import Stream, DelayedLoa...
import sys import os import numpy as np from pprint import pprint from datetime import datetime from datetime import timedelta import mysql.connector import math import calendar import matplotlib.pyplot as plt import matplotlib.cm as cm from matplotlib import dates start = datetime(2009,7,15,4) #2...
# coding: utf-8 import datetime from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.core.mail import EmailMessage from django.db import IntegrityError from django.db import models from django.template.loader import render_to_string from django.urls import reverse fr...
# -*- coding: utf-8 -*- """ Sahana Eden Common Alerting Protocol (CAP) Model @copyright: 2009-2015 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to dea...
# 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 u...
import make_places.fundamental as fu import mp_utils as mpu import mp_bboxes as mpbb import make_places.primitives as pr #from make_places.fundamental import element from make_places.scenegraph import node from make_places.floors import floor from make_places.primitives import arbitrary_primitive from make_places.primi...
''' Project: Arduino SC Interface - A GUI for Arduino serial comunication @author: Andrea Cirillo <sabageek.blogspot.com> @copyright: 2012 Andrea Cirillo @license: GPL-3 This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as p...
# -*- coding: utf-8 -*- """ Installs <Django Project Name> ------------------------------ Copyright 2011-2012 Plexical. See LICENCE for permissions. """ import os import sys import subprocess try: from setuptools import setup except ImportError: from distutils.core import setup if 'boot' in sys.argv: if ...
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
# encoding: utf-8 # # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import from _...
# -*- coding: utf-8 -*- # Authors: Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Lars Buitinck # Robert Layton <robertlayton@gmail.com> # Jochen Wersdörfer <jochen@wersdoerfer.de> # Roman Sinayev <roman.sinayev@gmail.com> # # License: B...
import os from flask import Flask, request, render_template from flask_restful import Resource, Api, reqparse from simple_salesforce import Salesforce app = Flask(__name__) api = Api(app) #Initialize a connection with Salesforce sf = Salesforce(username=os.environ.get('SALESFORCE_USERNAME'), password=os.environ.get('...
""" parser module for EMBOSS QA files """ from pyparsing import Optional, Suppress, Word, OneOrMore, ZeroOrMore, \ printables, Group, alphanums, alphas, restOfLine, oneOf, nums from .qa import ApplicationRef, FilePattern, FileGroup, Qa, CommandLine, \ InputLine TEST_ID = Suppress("ID") + Word(alphanums + '-'...
##################################################### # Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2019.08 # ############################################################################################ # NAS-Bench-201: Extending the Scope of Reproducible Neural Architecture Search, ICLR 2020 # ##########################...
# Copyright 2020 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 agreed to in writing, ...
import sys from ctypes.util import find_library from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.db.backends.sqlite3.base import ( Database, DatabaseWrapper as SQLiteDatabaseWrapper, SQLiteCursorWrapper, ) from django.utils import six from .client impo...
# -*- coding: utf-8 -*- # Copyright 2020 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...
from xml.etree.ElementTree import SubElement from insalata.model.Node import Node from insalata.helper import ipAddressHelper class Layer3Network(Node): def __init__(self, id, address, netmask, collectorName=None, timeout=None): Node.__init__(self, collectorName=collectorName, timeout=timeout) self...
import paddle.fluid as fluid import numpy as np import sys import args import logging logging.basicConfig(format='%(asctime)s - %(levelname)s - %(message)s') logger = logging.getLogger("fluid") logger.setLevel(logging.INFO) def infer(args): place = fluid.CUDAPlace(0) if args.use_gpu else fluid.CPUPlace() exe ...