text
stringlengths
17
737k
# 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 # d...
from .common import * class GetHistoricalRacesByMeetTest(EntityTest): @classmethod def setUpClass(cls): cls.meet = pyracing.Meet.get_meets_by_date(historical_date)[0] cls.races = pyracing.Race.get_races_by_meet(cls.meet) def test_types(self): """The get_races_by_meet method should return a list of Race ob...
from celery.utils.log import get_task_logger from mygpo.celery import celery from mygpo.episodestates.models import EpisodeState logger = get_task_logger(__name__) @celery.task def update_episode_state(historyentry): """ Updates the episode state with the saved EpisodeHistoryEntry """ user = historyentry.u...
# -*- coding: utf-8 -*- from typing import Dict, List, Iterable import dpath import numpy as np from copy import deepcopy from openfisca_core.entities import Entity from openfisca_core.variables import Variable from openfisca_core.commons import basestring_type from openfisca_core.errors import VariableNotFound, Sit...
from ctypes import * from ctypes.util import find_library import sys def loadLibrary(): '''tries to load the swi-prolog shared library''' # try to get lib path from the swipl executable # TODO: check whether this is reliable(different versions) from subprocess import Popen, PIPE try: if sys...
####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ######################################################...
''' Runner to manage Windows software repo ''' # Import python libs import os # Import third party libs import yaml import msgpack # Import salt libs import salt.output import salt.utils import logging import salt.minion log = logging.getLogger(__name__) def genrepo(): ''' Generate win_repo_cachefile base...
# -*- coding: utf-8 -*- ''' Manage RDSs ================= .. versionadded:: 2014.7.1 Create and destroy RDS instances. Be aware that this interacts with Amazon's services, and so may incur charges. This module uses ``boto``, which can be installed via package, or pip. This module accepts explicit rds credentials bu...
import numpy as np from gym.envs.mujoco import mujoco_env from gym import utils def mass_center(model): mass = model.body_mass xpos = model.data.xipos return (np.sum(mass * xpos, 0) / np.sum(mass))[0] class HumanoidStandupEnv(mujoco_env.MujocoEnv, utils.EzPickle): def __init__(self): mujoco_en...
#!/usr/bin/env python import os, sys, time, json import requests import pika QUEUE_HOST = "cbemq" QUEUE_USER = "super" QUEUE_PASS = "super" EXCHANGES = ['notify.retail.sale.Sale.updated','notify.retail.sale.Sale.created',] DLX = 'microservice.loyalty_transaction.dlx' RETRY_EXCHANGE = 'microservice.loyalty_transacti...
# -*- coding: utf-8 -*- ''' Manage events This module is used to manage events via RAET ''' # Import python libs import logging import time from collections import MutableMapping # Import salt libs import salt.payload import salt.loader import salt.state import salt.utils.event from salt.transport.road.raet import s...
# coding: utf-8 """ ASN.1 type classes for public and private keys. Exports the following items: - DSAPrivateKey() - ECPrivateKey() - EncryptedPrivateKeyInfo() - PrivateKeyInfo() - PublicKeyInfo() - RSAPrivateKey() - RSAPublicKey() Other type classes are defined that help compose the types listed above. """ ...
""" Driver for the ETL based on sub-commands and central place to govern command line args. This can be the entry point for a console script. Some functions are broken out so that they can be leveraged by utilities in addition to the top-level script. """ import abc import argparse import logging import os import sh...
from __future__ import print_function # Python 2 and 3 print compatibility import warnings from decorator import decorator from hail.expr import Type, TGenotype, TString, TVariant, TArray from hail.typecheck import * from hail.java import * from hail.keytable import KeyTable from hail.representation import Interval...
import abc from nalaf.structures.data import Entity from nalaf import print_verbose, print_debug from collections import namedtuple import random import math import uuid class Evaluation: Computation = namedtuple('Computation', ['precision', 'recall', 'f_measure']) def __init__(self, label, tp, fp, fn, fp_o...
#!/usr/bin/python3 import configparser import argparse arg_parser = argparse.ArgumentParser(description = "ini config parser for qremote") arg_parser.add_argument('config', help = "path to xml config file") arg_parser.add_argument('option', help = "name of connection") args = arg_parser.parse_args() config = config...
import simplejson as json import yaml from django.http import HttpResponse, JsonResponse from django.utils import timezone from django.views.decorators.csrf import csrf_exempt import api.models as models import directions.models as directions import users.models as users from api.to_astm import get_iss_astm from barco...
from __future__ import print_function import time import subprocess import os import sys import signal import turtle import dbus import dbus.mainloop.glib import gobject from optparse import OptionParser from threading import Thread from io import ProxGround #time step, 0.1 second dt = 100 class Thymio(object): ...
"""This module provides the HaaS service's public API. TODO: Spec out and document what sanitization is required. """ from haas import model from flask import Flask, request from functools import wraps import inspect class APIError(Exception): """An exception indicating an error that should be reported to the use...
# -*- coding: utf-8 -*- info = """The idea for this script originates from https://github.com/BergWerkGIS/convert-bev-address-data/blob/master/README.md The input are the files STRASSE.csv, GEMEINDE.csv and ADRESSE.csv from the publicly available dataset of addresses of Austria, available for download at http://www.b...
from __future__ import print_function import os import re import ujson from six import text_type from typing import Any, Dict, List from django.core.management.commands import compilemessages from django.conf import settings import polib class Command(compilemessages.Command): def handle(self, *args, **option...
''' 역전파 backpropagation 미분을 구하는 방법. 수치미분보다 빠르게 미분을 구할 수 있다. 연쇄법칙을 이용하는 방법으로 연산을 우에서 좌로 거슬러 올라가며 연산 전 입력에 대한 연산 후 출력의 미분을 구해서 각 연산을 지날때마다 곱해나가는 방식 ''' # 곱셈 계층 - 곱셈 노드 class MulLayer: def __init__(self): self.x = None self.y = None def forward(self, x, y): ''' 순전파. 두 수의 곱을 출력하는데 ...
from __future__ import unicode_literals from django.core.exceptions import ObjectDoesNotExist from django.utils import six from djblets.webapi.decorators import (webapi_response_errors, webapi_request_fields) from djblets.webapi.errors import DOES_NOT_EXIST from reviewboard.revi...
version_info = (0, 1, 1) __version__ = '.'.join(map(str, version_info))
import gzip import pandas as pd import numpy as np import pandas.util.testing as tm import os import dask import bcolz from pframe import pframe from operator import getitem from toolz import valmap import tempfile import shutil import dask.dataframe as dd from dask.dataframe.io import (read_csv, file_size, categories...
import threading import sys import os import subprocess import json import time import datetime import click # from pick import pick from howmanypeoplearearound.oui import * def which(program): """Determines whether program exists """ def is_exe(fpath): return os.path.isfile(fpath) and os.access...
# -*- coding: utf-8 -*- import collections import numpy as np from tec.electrode import Metal from tec import TECBase from astropy import units import unittest import copy em = Metal(temp=1000., barrier=2., richardson=10.) co = Metal(temp=300., barrier=1., richardson=10., position=10.) class Base(unittest.TestCase)...
#-*- coding: utf-8 -*- import io import itertools import json import pandas as pd import numpy as np import quantipy as qp import copy import time import sys import warnings from link import Link from chain import Chain from view import View from helpers import functions from view_generators.view_mapper import ViewMa...
import os import sys import stat import shutil import importlib import contextlib import pytest from textwrap import dedent from setuptools import Distribution from ..setup_helpers import get_package_info, register_commands from ..commands import build_ext from . import reset_setup_helpers, reset_distutils_log # ...
""" This module implements file reader for AlphaOmega MPX file format version 4. This module expect default channel names from the AlphaOmega record system (RAW ###, SPK ###, LFP ###, AI ###,…). This module reads all *.lsx and *.mpx files in a directory (not recursively). Listing files The specifications are mostly ...
#!/usr/bin/env python # # Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Frederic Lepied <frederic.lepied@enovance.com> # # 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 #...
# -*- coding: utf-8 -*- """Unit tests for cartoframes.layers""" import unittest import os import sys import json import random import warnings import requests import cartoframes from carto.exceptions import CartoException from carto.auth import APIKeyAuthClient from carto.sql import SQLClient from pyrestcli.exception...
from ..ui import read from ..ipac import Ipac DATA = ''' | a | b | | char | char | ABBBBBBABBBBBBBA ''' def test_ipac_default(): # default should be right table = read(DATA, Reader=Ipac) assert table['a'][0] == 'ABBBBBB' assert table['b'][0] == 'ABBBBBBB' def test_ipac_between(): table =...
from rest_framework import generics, permissions as drf_permissions from rest_framework.exceptions import ValidationError, NotFound from framework.auth.oauth_scopes import CoreScopes from website.project.model import Q, Node from api.base import permissions as base_permissions from api.base.views import JSONAPIBaseVie...
""" Support for Honeywell Round Connected and Honeywell Evohome thermostats. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/climate.honeywell/ """ import logging import socket import datetime import requests import voluptuous as vol from homeassistant....
# -*- coding: utf-8 -*- """Unit tests for cartoframes.context""" import unittest import os import sys import json import warnings from carto.exceptions import CartoException from cartoframes.context import CartoContext from cartoframes import Dataset from cartoframes.columns import normalize_name from utils import ...
# Python import pytest import mock # AWX from awx.api.serializers import JobTemplateSerializer, JobSerializer, JobOptionsSerializer from awx.main.models import Label, Job #DRF from rest_framework import serializers @pytest.fixture def job_template(mocker): return mocker.MagicMock(pk=5) @pytest.fixture def job(m...
"""Config flow for ONVIF.""" from pprint import pformat from typing import List from urllib.parse import urlparse from onvif.exceptions import ONVIFError import voluptuous as vol from wsdiscovery.discovery import ThreadedWSDiscovery as WSDiscovery from wsdiscovery.scope import Scope from wsdiscovery.service import Ser...
"""MediaPlayer platform for Roon integration.""" import logging from homeassistant.components.media_player import MediaPlayerEntity from homeassistant.components.media_player.const import ( SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PLAY, SUPPORT_PLAY_MEDIA, SUPPORT_PREVIOUS_TRACK, SUPPORT_SEEK...
#! /usr/bin/env python # http://trac.secdev.org/scapy/ticket/31 # scapy.contrib.description = IGMPv3 # scapy.contrib.status = loads from scapy.packet import * """ Based on the following references http://www.iana.org/assignments/igmp-type-numbers http://www.rfc-editor.org/rfc/pdfrfc/rfc3376.txt.pdf """ # TODO:...
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2016, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
from parsing import * import pytest test_data_inputs = [] with open("test/data_test_parsing.txt", "r") as f: test_data_inputs = f.readlines() # Large inputs should go to that file. # Only inputs should go there, not the parsing method and the expected output, # because the input is always a string and `parse_meth...
from mininet.net import * from mininet.topo import * from mininet.node import OVSSwitch from mininet.link import TCLink from mininet.log import setLogLevel from mininet.cli import CLI from mininet.node import Node, RemoteController import sys import signal from time import sleep HOST_MACHINE_IP = '192.168.198.129' cl...
# Windows Azure Linux Agent # # Copyright 2014 Microsoft Corporation # # 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 ...
"""Provide a base HTML template variable for population with appropriate statistics in the report.py module. """ base_template = \ """ <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="h...
""" Command for importing transport services. So far, all services in the SE, EA, Y and NCSD regions can be imported without known errors. Usage: ./manage.py import_services EA.zip [EM.zip etc] """ from django.core.management.base import BaseCommand, CommandError from busstops.models import Operator, StopPoint,...
#!/usr/bin/python3.4 # -*-coding:Utf-8 -* '''module to manage bounce settings''' import xml.etree.ElementTree as xmlMod from settingMod.MinMax import * import os class BounceSet: '''class to manage bounce settings''' def __init__(self, xml= None): '''initialize bounce settings with default value or values extr...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2012 OpenERP - Team de Localización Argentina. # https://launchpad.net/~openerp-l10n-ar-localization # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
import collections from itertools import zip_longest import logging import numpy as np import re import datetime from . import DataJointError, config from .fetch import Fetch, Fetch1 logger = logging.getLogger(__name__) def equal_ignore_case(str1, str2): try: return str1.upper() == str2.upper() excep...
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.utils.translation import ugettext_lazy as _ import logging from django_services import admin from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirec...
import json import os import random import re import requests import sys import tempfile import time import collections import IPython import pandas as pd import carto from carto.auth import APIKeyAuthClient from carto.sql import SQLClient from .utils import dict_items from .layer import BaseMap from .maps import non...
from __future__ import absolute_import, unicode_literals from dash.orgs.models import Org, TaskState from dash.orgs.views import OrgPermsMixin, OrgObjPermsMixin from datetime import timedelta from django.conf import settings from django.core.cache import cache from django.core.urlresolvers import reverse from django.ht...
import matplotlib.pyplot as plt import numpy as np from scipy.stats import rv_discrete import scipy import datetime import dataset plt.rcdefaults() # Debug mode debug = True def printdebug(debugmode, string=None, vartuple=None): ''' prints string, varname and var for debug purposes :param debugmode: True...
# -*- coding: utf-8 -*- import simplejson as json from django.http import (HttpResponse, HttpResponseNotAllowed, HttpResponseForbidden, Http404, ) from django.shortcuts import redirect, render, get_object_or_404 from django.conf import settings from .models import UserActivation, User, AccessT...
"""Tests for vumi.scripts.vumi_list_messages.""" import sys from datetime import datetime, timedelta from uuid import uuid4 from StringIO import StringIO from twisted.internet.defer import inlineCallbacks from twisted.python import usage from vumi.components.message_store import MessageStore from vumi.scripts.vumi_l...
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
# -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals from multiprocessing import Pool, Lock import six import numpy as np import numexpr import pandas import h5py # global lock because libhdf5 builds are not thread-safe by default :( lock = Lock() class Worker(object): """ ...
import ip class Ipv4(ip.Ip): # planned/desired features: # - Adding netmask gen/calc/tester (allow for easy error checking for valid # masks, or easy generation of masks using bit count/cidr notation @property def address(self): """Ipv4.address -> return address""" return supe...
#!/usr/bin/python """ The purpose behind this component is to allow the following to occur: pipeline( dataSource(), ExternalPipeThrough("command", *args), dataSink(), ).run() More specificaly, the longer term interface of this component will be: ExternalPipeThrough: inbox - data recieved here is sent to ...
#!/Users/loomis/.pyenv/versions/2.7.13/bin/python2.7 """ SlipStream Client ===== Copyright (C) 2014 SixSq Sarl (sixsq.com) ===== 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://w...
import json import logging import os from types import LambdaType from typing import Any, Dict, List, Optional, Text, Tuple import numpy as np import time from rasa.core import jobs from rasa.core.actions.action import Action from rasa.core.actions.action import ( ACTION_LISTEN_NAME, ActionExecutionRejection,...
# Copyright (c) 2014 Jesse Meek <https://github.com/waigani> # This program is Free Software see LICENSE file for details. """ GoOracle is a Go oracle plugin for Sublime Text 3. It depends on the oracle tool being installed: go get code.google.com/p/go.tools/cmd/oracle """ import sublime, sublime_plugin, subprocess, ...
from io import BytesIO import gzip import os import os.path as op import json from glob import glob import shutil import boto3 import s3fs import numpy as np import pandas as pd import logging from bids import BIDSLayout from botocore import UNSIGNED from botocore.client import Config from dask import compute, delay...
# Invoked by: S3 Object Change # Returns: Error or status message # # Environment variables for applications are stored in encruypted s3 files. # When those files are updated, the env config file should be updated with the # current object version number for the application for that app and env # import zipfile import...
import sys sys.path.append('./build/lib.linux-i686-2.4') import cdms import spanlib import vcs import MV import Numeric import cdutil import genutil cdms.axis.latitude_aliases.append('Y') cdms.axis.longitude_aliases.append('X') cdms.axis.time_aliases.append('T') f=cdms.open('../example/data2.cdf') s=f('ssta') SP=sp...
# -*- coding: utf-8 -*- """ python -m lifelines.tests.test_suit """ from __future__ import print_function import os import unittest try: from StringIO import StringIO except ImportError: from io import StringIO import numpy as np import numpy.testing as npt from collections import Counter import matplotlib.p...
# Create a probability density map over a single path/row # Given a stack of L8 scenes in a parent directory, # analyze the stack of pixels for changes in (blue - red) vs (green - nir) import os import re import numpy as np import pyproj import rasterio as rio from sklearn.neighbors import KernelDensity from l8 i...
""" DataTypes used by this provider """ import hashlib import inspect import logging from botocore.exceptions import ClientError import cloudbridge.cloud.base.helpers as cb_helpers from cloudbridge.cloud.base.resources import BaseAttachmentInfo from cloudbridge.cloud.base.resources import BaseBucket from cloudbridge....
import numpy as np import socket import pickle import os import statsmodels.api as sm from statsmodels.tsa.api import VAR from statsmodels.tsa.stattools import adfuller from statsmodels.base.model import LikelihoodModel from statsmodels.sandbox.regression.numdiff import (approx_hess, ...
import argparse import logging import sys import os from asyncio.events import get_event_loop import lightbus import lightbus.bus from lightbus.config import Config from lightbus.plugins import autoload_plugins, plugin_hook, remove_all_plugins from lightbus.utilities.logging import configure_logging from lightbus.util...
from lab.with_log import WithLogMixIn from lab.decorators import section from lab.server import Server UNIQUE_PATTERN_IN_NAME = 'sqe' class CloudNetwork(object): def __init__(self, common_part_of_name, class_a, number, vlan_id, is_dhcp, cloud): from netaddr import IPNetwork is_via_neutron = Tru...
from __future__ import unicode_literals from django.test import TestCase from .models import ImagerProfile, Address from django.contrib.auth.models import User from django.db import models from django.conf import settings from django.utils.encoding import python_2_unicode_compatible from django.dispatch import receive...
""" Some useful functions This module shouldn't contain anything equipments, like GPIB or serial functions """ import smtplib import ConfigParser import sys import os import numpy as np import matplotlib.pyplot as plt import glob from scipy import stats def twoscomplement(int_in, bitsize): """ Compute two's co...
""" Hexcells Solver Usage: hexcells.py [--debug=LEVEL] [--show-moves] HEXCELLS_FILES... Options: -h --help Show this screen. --debug=LEVEL Debug print level [default: 10] --show-moves Show moves made during solving (synonym for --debug=15) """ from __future__ import unicode_literals from __futu...
''' Degradation Module This module contains functions to calculate the degradation rate of photovoltaic systems. ''' from __future__ import division import pandas as pd import numpy as np import statsmodels.api as sm def degradation_ols(normalized_energy): ''' Description ----------- OLS routine ...
# # Description: # This is the main of the glideinFactory # # Arguments: # $1 = poll period (in seconds) # $2 = advertize rate (every $2 loops) # $3 = glidein submit_dir # # Author: # Igor Sfiligoi (Sept 15th 2006) # import os import os.path import sys import traceback import time import threading sys.path.a...
#!/usr/bin/env python __encoding__ = "utf-8" import os import pytoml as toml class Trigger(object): """ This class provides a filter to test a string against. """ def __init__(self, config): self.config = config self.goodlistpath = config['trigger']['goodlist_path'] self.good...
#!/usr/bin/python import sys import signal import subprocess from time import sleep from threading import Thread from datetime import datetime class Filter(): LAN_INTERFACE = "eth0" WAN_INTERFACE = "eth1" DEF_HTB_RATE = "20Mbit" #Rate of the def bucket USER_UP_RATE = "2Mbit" USER_DOWN_RATE = "10Mbit" wan...
#!/usr/bin/env python3 # # scanner.py - part of the FDroid server tools # Copyright (C) 2010-13, Ciaran Gultnieks, ciaran@ciarang.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, eit...
""" Neural Network by Vincent Jeanselme vincent.jeanselme@gmail.com """ import numpy as np from model.classifier import Classifier import dataManipulation class ClassifierNN(Classifier): """ Structure for a neural network classifier """ def __init__(self, dims, activationFunction, costFunction): """ Creat...
# # Copyright 2013 eNovance <licensing@enovance.com> # # 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 ...
metadata = { # --------------------------------------------------------------------------------------------------------------------- # netParams # --------------------------------------------------------------------------------------------------------------------- "netParams": { "label": "Network Parameter...
import os import errno import hashlib import operator import posixpath from itertools import islice, chain from jinja2 import Undefined, is_undefined from jinja2.utils import LRUCache from jinja2.exceptions import UndefinedError from werkzeug.urls import url_join from werkzeug.utils import cached_property from lekt...
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import time import uuid from functools import wraps from memoized import memoized import itertools from dimagi.utils.logging import notify_exception class NestableTimer(object): """Timer object that ca...
import numpy as np import warnings try: import matplotlib.pyplot as pl import matplotlib except ImportError: warnings.warn("matplotlib could not be loaded!") pass from shap.plots import labels from shap.common import safe_isinstance, format_value from . import colors def waterfall_plot(expected_value,...
# Copyright (C) 2005, 2014 by INRIA #!/usr/bin/env python import numpy as np # import Siconos.Numerics * fails with py.test! import Siconos.Numerics as SN def vi_function_1D(n, x, F): F[0] = 1.0 + x[0] pass def vi_nabla_function_1D(n, x, nabla_F): nabla_F[0] = 1.0 pass def vi_function_2D(n, z, F) :...
# -*- coding: utf-8 -*- ############################################################################### # # ODOO (ex OpenERP) # Open Source Management Solution # Copyright (C) 2001-2015 Micronaet S.r.l. (<http://www.micronaet.it>) # Developer: Nicola Riolini @thebrush (<https://it.linkedin.com/in/thebrush>) # This prog...
# Lint as: python3 # Copyright 2020 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
# Copyright 2015 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
import os, sys from time import sleep import pyDMCC import bot.lib.lib as lib class Rail_Mover: def __init__(self): self.bot_config = lib.get_config() rail_motor_conf = self.bot_config["dagu_arm"]["rail_cape"]["rail_motor"] board_num = rail_motor_conf["board_num"] motor_num = ra...
import time import datetime import dateutil import stripe import hashlib import re import redis import uuid import mongoengine as mongo from pprint import pprint from django.db import models from django.db import IntegrityError from django.db.utils import DatabaseError from django.db.models.signals import post_save fro...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) # All Rights Reserved # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsibility of ...
#!/usr/bin/python3 from tkinter import * from tkinter.messagebox import * def sendMPandDestroy(msg, pseudo, fenetre, rouage ): rouage.sendTimedMessage(msg,pseudo) fenetre.destroy() def destroy_and_shutdown(rouage, fenetre): fenetre.destroy() rouage.quit() def MP(rouage): """ Fonction ouvrant une fenêtre perme...
import time import datetime import dateutil import stripe import hashlib import redis import mongoengine as mongo from django.db import models from django.db import IntegrityError from django.db.utils import DatabaseError from django.db.models.signals import post_save from django.db.models import Sum, Avg, Count from d...
#========================================================================= # StrSearchFunc.py #========================================================================= from new_pymtl import * from new_pmlib import InValRdyBundle, OutValRdyBundle from StrSearchFunc import StrSignalValue from collections impo...
import argparse import sys import os import time import traceback from shock import Client as ShockClient from biokbase.CompressionBasedDistance.Helpers import job_info_dict from biokbase.userandjobstate.client import UserAndJobState, ServerError as JobStateServerError desc1 = ''' NAME cbd-getmatrix -- get dista...
#-*- coding: utf-8 -*- import json import os import uuid from django.conf import settings from django.contrib import messages from django.contrib.auth.forms import PasswordChangeForm from django.contrib.auth.decorators import login_required from django.contrib.auth.models import Group from django.core.mail import send...
#!/usr/bin/python2.4 # # Copyright 2007 The Python-Twitter Developers # # 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...
from django.core.urlresolvers import reverse from django.db import models from django.utils.translation import ugettext_lazy as _ from model_utils.choices import Choices from model_utils.models import StatusModel, TimeStampedModel from members.models import Member from .choices import RESEARCH_FIELDS from lib.storag...
from collections import Callable, Iterable, OrderedDict, Mapping, MutableSet, deque from functools import reduce import numpy as np from multidict import MultiDict from devito.tools.utils import as_tuple, filter_ordered from devito.tools.algorithms import toposort __all__ = ['Bunch', 'EnrichedTuple', 'ReducerMap', '...