src
stringlengths
721
1.04M
""" Provide container class for gas chemistry data. """ import hashlib import warnings import numpy as np import tables from tables.exceptions import NoSuchNodeError, NodeError from spectroscopy.class_factory import ResourceIdentifier from spectroscopy.plugins import get_registered_plugins from spectroscopy import da...
""" Serializer for Inventory App related API end-points """ #import LMIS project modules from core.api.serializers import BaseModelSerializer from inventory.models import (Inventory, InventoryLine, ConsumptionRecord, ConsumptionRecordLine, IncomingShipment, IncomingShipmentLine, Outgo...
"""Operator transformation.""" import numpy import chaospy from ..baseclass import Distribution class OperatorDistribution(Distribution): """Operator transformation.""" def __init__(self, left, right, exclusion=None, repr_args=None): if not isinstance(left, Distribution): left = numpy.at...
from __future__ import absolute_import import uuid from datetime import datetime from sqlalchemy import Column, DateTime, String, Integer from sqlalchemy.schema import Index, UniqueConstraint from changes.config import db from changes.constants import Result, Status from changes.db.types.enum import Enum from change...
#!/usr/bin/env python3 """ Produces a correlation map of the mean time series within the seed with every voxel in the functional file. Usage: ciftify_seed_corr [options] <func> <seed> Arguments: <func> functional data (nifti or cifti) <seed> seed mask (nifti, cifti or gifti) Options: ...
import asyncio from collections import defaultdict from enum import Enum from typing import Any from typing import DefaultDict from typing import Dict from typing import Iterable from typing import List from typing import Mapping from typing import MutableMapping from typing import Optional from typing import Sequence ...
#!/usr/bin/env python # # Copyright 2016 The BigDL 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...
from degas.gridding import gridGalaxy datadir='/mnt/bigdata/erosolow/surveys/DEGAS/' datadir = '/mnt/bigdata/erosolow/surveys/DEGAS/' ppo = True # gridGalaxy(galaxy='IC0342', setup='12CO', # release='QA0', datadir=datadir, # PostprocOnly=ppo) gallist = [#'IC0342', 'NGC0337', ...
#!/usr/bin/env python # ********************************************************************* # * Copyright (C) 2015 Luca Baldini (luca.baldini@pi.infn.it) * # * * # * For the license terms see the file LICENCE, distributed * # * along ...
# by TR from helper import add_doc from obspy.core.util import gps2DistAzimuth from scipy.signal import get_window import logging import numpy as np import warnings from scipy.signal import iirfilter, freqz log = logging.getLogger(__name__) r_earth = 6371 def sind(x): return np.sin(x / 180. * np.pi) def cosd(x): re...
# # This file is part of Magnet2. # Copyright (c) 2011 Grom PE # # Magnet2 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. ...
############################################################################## # Copyright (c) 2013-2016, 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...
#!/usr/bin/env python #------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #----------------------------------------------------------------...
# -*- encoding: utf-8 -*- import tools from osv import fields, osv class common_report(osv.osv): _name = "clivia_analysis.production_report" _description = "报表视图" _auto = False _rec_name = 'date' _columns = { 'year': fields.char('年份', size=4, readonly=True), 'month': fie...
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2016 Alex Forencich 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 righ...
import os import json import shutil import urlparse import re import uuid import codecs import xbmc import xbmcgui import xbmcplugin import mapper import gmusicapi from addon.gmusic_wrapper import GMusic from addon import utils from addon import listing from addon import thumbs from addon import ADDON from addon im...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ budget_term_densities Calculates density maps for nutrient budget terms from NEMO-ERSEM output. NERC-DEFRA SSB-BlueC projects Created on Tue Jan 24 09:18:52 2017 @author: TAMS00 """ #import pandas as pd import netCDF4 import xarray as xr import num...
# # 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 ...
#!/usr/bin/env python3 # Bryant Hansen # USAGE: # sys.argv[0] media_file # where media_file full path/filename to mplayer-compatible file on the local # system # # initial conditions: pyplayerd is running import os import sys from time import sleep import traceback import pyplayer_config as config import pyplay...
"Base classes for services." import web import local def have_role(role_id): "Return True iff the currently logged user has the given role." user_id = local.session.user_id it = local.db.select('role_assignments', where='user_id=$user_id AND role_id=$role_id', vars=locals() ...
# -*- coding: utf-8 -*- """Doctest for method/function calls. We're going the use these types for extra testing >>> from UserList import UserList >>> from UserDict import UserDict We're defining four helper functions >>> def e(a,b): ... print a, b >>> def f(*a, **k): ... ...
from __future__ import unicode_literals import json from uuid import uuid4 from django.conf import settings from django.core.urlresolvers import reverse from django.db import models from django.utils.translation import ugettext_lazy as _ from . import provider_factory DEFAULT_PAYMENT_STATUS_CHOICES = ( ('waiting...
""" Django settings for MxOnline project. Generated by 'django-admin startproject' using Django 1.9.8. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os i...
import sys import string import termcolor import pymongo import pronouncing import unidecode import distance # a decorator that caches functions but stores results with a db backend would be nice. def mongo_collection(): collection = pymongo.MongoClient().poetry.poems return collection def word_tokenize(sen...
#!/usr/bin/python # -*- coding: utf-8 -*- import smtplib import os import re import sys import imaplib import email import tempfile import shutil import datetime import quopri import base64 import hashlib import quopri import base64 import hashlib from email.MIMEMultipart import MIMEMultipart from email.MIMEBase imp...
""" SVMLight tools """ import sys import argparse import gzip import math import numpy as np import random import re PROG = 'python svmlight_format.py' ID_NAME_PATTERN = re.compile(r'^#\s*(\d+)\s*:\s*(\S+.*)\s*$') class AutoHelpArgumentParser(argparse.ArgumentParser): """ """ def error(self, message): ...
# Lint as: python2, python3 # Copyright 2018 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 # ...
""" Plugin for generating markov text, or a summary if you will. """ import logging import random import re from collections import defaultdict, deque from functools import partial import asyncio import discord from pcbot import utils, Annotate, config, Config import plugins client = plugins.client # type: discord...
from pprint import pprint from pymongo import MongoClient from bson import ObjectId dbuser = "monitor" dbpasswd = "monitor678" remote = MongoClient("nuev9.com")['monitor'] remote.authenticate(dbuser, dbpasswd) local = MongoClient()['monitor'] """ laccs = set([x['_id'] for x in local.accounts.find()]) accs = remote.ac...
import unittest import operator from color_contrast_calc.color import Color from color_contrast_calc.sorter import sorter from color_contrast_calc import utils class TestSorter(unittest.TestCase): def setup(self): pass def test_is_hsl_order(self): self.assertTrue(sorter.is_hsl_order('hsl')) ...
# Despy: A discrete event simulation framework for Python # Version 0.1 # Released under the MIT License (MIT) # Copyright (c) 2015, Stacy Irwin """ ******** despy.dp ******** .. autosummary:: """ EARLY = -1 STANDARD = 0 LATE = 1 class AbstractPackage(): def __init__(self): import despy.abstra...
import unittest import tempfile import csv import axelrod as axl import axelrod_dojo as dojo C, D = axl.Action.C, axl.Action.D player_class=axl.EvolvableFSMPlayer class TestFSMPopulation(unittest.TestCase): temporary_file = tempfile.NamedTemporaryFile() def test_score(self): name = "score" ...
from datetime import datetime from odoo import api, fields, models from odoo.tools.translate import _ from odoo.exceptions import UserError, ValidationError class AccountPayment(models.Model): _inherit = 'account.payment' payment_amount_original = fields.Monetary(string='Original Value', ...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Widget to display simulation data of a CSDF graph. author: Sander Giesselink """ from PyQt5.QtWidgets import QGraphicsItem, QInputDialog, QMessageBox from PyQt5.QtCore import Qt, QRectF, QPointF from PyQt5.QtGui import QColor, QPen, QBrush, QPainterPath, QF...
import pygame, sys, copy, random, operator from entityclasses import * from compositeclasses import * #from statushandler import * def useSpell(spell, source, target): for func in spell.effectsList: funcdict[func[0]](func[1], source, target) def useSpellAoE(spell, source, target): for x in range(0, len(target)): ...
#!/bin/env python # # AutoPyfactory batch plugin for Condor # from CondorCEBatchSubmitPlugin import CondorCEBatchSubmitPlugin from autopyfactory import jsd class CondorGRAMBatchSubmitPlugin(CondorCEBatchSubmitPlugin): def __init__(self, apfqueue, config=None): if not config: qcl = apfqu...
import numpy as np from grid import Grid class Magnet: def __init__(self, b, grid = None, ortho = False): self.grid = grid self.isortho = ortho if isinstance(b, str): if not self.grid: raise ValueError('Grid object not defined.') self.mag = self._get_...
from sympy import S, Symbol, I, Rational, PurePoly from sympy.matrices import Matrix, SparseMatrix, eye, zeros, ShapeError from sympy.utilities.pytest import raises, XFAIL def test_sparse_matrix(): def sparse_eye(n): return SparseMatrix.eye(n) def sparse_zeros(n): return SparseMatrix.zeros(n)...
# 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...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
import numpy import matplotlib.pyplot import pylab import sys def plot_learning_curves(experiment, epochs, train_losses, cross_validation_losses, dice_scores, x_limits = None, y_limits = None): axes = matplotlib.pyplot.figure().gca() x_axis = axes.get_xaxis() x_axis.set_major_locator(pylab.MaxNLocator(...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 10b.py ~~~~~~ Advent of Code 2017 - Day 10: Knoth Hash Part Two The logic you've constructed forms a single round of the Knot Hash algorithm; running the full thing requires many of these rounds. Some input and output processing is also req...
# Copyright 2013 Red Hat, 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 agre...
# 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, software # distributed under ...
#!/usr/bin/python # # Copyright (C) 2010, 2013, 2015 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright notice, # ...
from gates import * from models import * from logic_path import LogicPath from operator import mul from math import log # create a predecoder chain # the algorithm is as follows # start with the highest level, and recursively split it into 2 # at each level, if the size is odd, take the smaller partition # create a br...
from __future__ import absolute_import, division, print_function import functools from toolz import merge from multipledispatch import Dispatcher from .convert import convert from .append import append from .resource import resource from .utils import ignoring import datashape from datashape import discover from d...
#!/usr/bin/env python # Based on previous work by # Charles Menguy (see: http://stackoverflow.com/questions/10217067/implementing-a-full-python-unix-style-daemon-process) # and Sander Marechal (see: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/) # Adapted by M.Hendrix [2015] (deprecated)...
""" Implementation of a vectorized four-momentum vector class Adapted from http://lapth.cnrs.fr/pg-nomin/wymant/FourMomentumClass.py originally implemented by Chris Waymant """ import numpy as np class FourMomentum: def __init__(self, E, px, py, pz): self.E = np.array(E) self.px = np.array(px) self...
#!/usr/bin/env python2 # This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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, ...
""" Created on Jul 22, 2015 Modified on Apr 21, 2016 @author: Aaron Klein @modified: Hector Mendoza """ import numpy as np from sklearn.utils.validation import check_random_state import theano import theano.tensor as T import theano.sparse as S import lasagne DEBUG = True def sharedX(X, dtype=theano.config.floatX, ...
# 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...
# -*- coding: utf-8 -*- #!/usr/bin/python # # Author Yann Bayle # E-mail bayle.yann@live.fr # License MIT # Created 13/10/2016 # Updated 20/01/2017 # Version 1.0.0 # """ Description of svmbff.py ====================== bextract -mfcc -zcrs -ctd -rlf -flx -ws 1024 -as 898 -sv -fe filename.mf -w out.arff ...
# 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 t...
import argparse import os from shutil import copyfile import subprocess import sys from utils.analyze_taken_metrics import merge_metrics import config from config import MSPK_PARTITION_PATH, THREADS, TOTAL_CORES, KMC_PATH, CLEAR_MEM_SCRIPT_PATH def parse_arguments(): parser = argparse.ArgumentParser( desc...
# -*- coding: utf-8 -*- # Copyright 2017 Omar Castiñeira, Comunitea Servicios Tecnológicos S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields class ResPartner(models.Model): _inherit = "res.partner" consolidate = fields.Boolean("Consolidate", company_depend...
import os import re import pandas as pd def load_duc_docset(input_source): docs = DucSgmlReader().read(input_source) return docs def load_duc_abstractive_summaries(input_source): models = DucAbstractSgmlReader().read(input_source) return models class FileInput(object): def gather_paths(self, sou...
# csv_j2.py # Protoype the joining of 2 different CSV files based on a common item. import csv import collections import pprint ############ # Functions ############ # TODO: Check for key_field # TODO: Automaticly parse CSV files that have the key_field # TODO: Add key_name field name as key_name : key_field def re...
import cupy as cp import numpy as np import asyncio import cupyx.scipy.ndimage as cpndimage import scipy.signal as sg from drivers.Spectrum_m4x import SPCM_MODE, SPCM_TRIGGER from drivers.pyspcm import * import scripts.photon_wave_mixing.devices as dev from lib2.IQPulseSequence import IQPulseBuilder from concurrent.fut...
import logging from motorway.grouping import HashRingGrouper from motorway.pipeline import Pipeline from examples.ramps import WordRamp from examples.intersections import SentenceSplitIntersection, WordCountIntersection, AggregateIntersection # logging.basicConfig(level=logging.INFO, format=) logging.config.dictCon...
import os import math def rotatePoint(centerPoint,point,angle): angle = math.radians(angle) temp_point = point[0]-centerPoint[0] , point[1]-centerPoint[1] temp_point = ( temp_point[0]*math.cos(angle)-temp_point[1]*math.sin(angle) , temp_point[0]*math.sin(angle)+temp_point[1]*math.cos(angle)) temp_point...
""" Author: RedFantom Contributors: Daethyra (Naiii) and Sprigellania (Zarainia) License: GNU GPLv3 as in LICENSE Copyright (C) 2016-2018 RedFantom """ # Standard Library import os import _pickle as pickle # Project Modules from data.components import COMPONENT_TYPES, COMP_TYPES_REVERSE, COMPONENTS from parsing.ships i...
import inspect import unittest try: import class_pybind11 as py11 has_pybind11 = True except: has_pybind11 = False import class_boost_python as boost class TestFunction(unittest.TestCase): def test_function_py11(self): if not has_pybind11: return dog = py11.Dog() ...
import datetime import netsvc from openerp.osv import orm, fields from openerp.tools import DEFAULT_SERVER_DATE_FORMAT from tools.translate import _ class OrderRequirementLineAdd(orm.TransientModel): _name = "order.requirement.line.add" _description = "Add sale Order to line" def default_get(self, cr, u...
import unittest2 import mitogen.minify import testlib def read_sample(fname): sample_path = testlib.data_path('minimize_samples/' + fname) sample_file = open(sample_path) sample = sample_file.read() sample_file.close() return sample class MinimizeSource(unittest2.TestCase): func = staticmet...
#!/usr/bin/python3 # piconzero.py is a library to interact with the 4Tronix Picon Zero # motor controller - https://4tronix.co.uk/blog/?p=1224 # Copyright (C) 2017 Keith Ellis # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
#!/usr/bin/env python def compile_plotters(): from chiplotle import plotters content = 'Chiplotle Known Plotters\n' content += '========================\n\n' ## get classes in plotters... for cls in dir(plotters): if not cls.startswith('__'): content += '.. autoclass:: chiplo...
# -*- coding: utf-8 -*- # Copyright 2017 GIG Technology NV # # 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...
from PySide2 import QtWidgets, QtCore, QtGui from pymel import core as pmc from auri.auri_lib import AuriScriptView, AuriScriptController, AuriScriptModel, grpbox from auri.scripts.Maya_Scripts import rig_lib from auri.scripts.Maya_Scripts.rig_lib import RigController reload(rig_lib) class View(AuriScriptView): ...
from tkinter import * import numpy as np import math import Classes as hi def Insert(): name = text1.get() Text1.insert(END, name) text.delete(0,END) def Key_issue(): bases = text1.get() long_message = text2.get() bb84 = hi.Various_measurement(int(bases),int(long_message),0) bb84.be...
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################ # iRGBit's indexhelper for reading texts and helping with creating an index # # http://www.github.com/iRGBit # # hypertext ät birgitbachler dot ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Nicira Networks, 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.apach...
# -*- coding: utf-8 -*- # # Copyright (C) 2019-2020 Matthias Klumpp <matthias@tenstral.net> # # Licensed under the GNU Lesser General Public License Version 3 # # This program 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...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website_slides.tests import common from odoo.exceptions import AccessError, UserError from odoo.tests import tagged from odoo.tests.common import users from odoo.tools import mute_logger @tagged('secur...
import multiprocessing import sqlite3 import time import urllib def do_query(uri): t1 = time.time() try: for line in urllib.urlopen(uri): pass print "Got %s in %f" % (uri, time.time() - t1) except Exception as e: print "Failed on %s: %s" % (uri, str(e)) if __name__ == ...
from django.db import models from geonode.layers.models import Layer from geonode.documents.models import Document from datetime import datetime from django.utils.translation import ugettext_lazy as _ from geonode.base.models import ResourceBase from geonode.people.models import OrganizationType from django_enumfield i...
import api_info from dateutil.parser import parse import requests import json import pandas as pd import logging map_ghcn_by_date_tuple = {} #dictionary, caching fully downloaded/parsed GHCN in memory def get_ncei_daily_climate_dicts( date_start, date_xend): """ obtain daily Global Historical Climatology Net...
# Copyright 2016 Intel 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 applicable law or agreed to...
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import copy import hashlib import multiprocessing import os.path import re import signal import subprocess import sys import gyp import gyp.common import gyp.msvs_...
import abc import sys from uqbar.cli.CLI import CLI class CLIAggregator(CLI): """ Aggregates CLI scripts. :: >>> import uqbar.cli >>> class ExampleAggregator(uqbar.cli.CLIAggregator): ... @property ... def cli_classes(self): ... return [] ...
import sys import time try: import wx except: print("ImportError: No module named wx\n\n" "wxPython is not installed. This program requires wxPython to run.\n" "See your package manager and/or http://wxpython.org/download.php.") time.sleep(10) sys.exit(-1) import os.path from configtool.data ...
"""Tests for cookiecutter's output directory customization feature.""" import pytest from cookiecutter import main @pytest.fixture def context(): """Fixture to return a valid context as known from a cookiecutter.json.""" return { 'cookiecutter': { 'email': 'raphael@hackebrot.de', ...
""" An action that resets *all* perspectives. """ # Enthought library imports. from pyface.api import YES # Local imports. from .workbench_action import WorkbenchAction # The message used when confirming the action. MESSAGE = 'Do you want to reset ALL perspectives to their defaults?' class ResetAllPerspectivesAc...
# Copyright 2010 Dan Smith <dsmith@danplanet.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is ...
# # Copyright 2015 Electric Cloud, 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 agree...
import sys #sys.path.append('/home/dskola/workspace/expression_modeling/') import matplotlib #matplotlib.use('Agg') import collections import contextlib import csv import datetime import math import multiprocessing import os import re import shutil import subprocess import gzip import numpy import scipy.ndimage import ...
from datetime import date from django.core.management.base import BaseCommand, CommandError from django.db.models import Sum from summary_data.utils.summary_utils import summarize_committee_periodic_webk from summary_data.models import Candidate_Overlay, Authorized_Candidate_Committees, Committee_Time_Summary, Comm...
""" Schedule scan with parameters from BOY script @author: Kay Kasemir """ from org.csstudio.scan.ui import SimulationDisplay from org.csstudio.scan.server import SimulationResult from org.eclipse.ui import PlatformUI from errors import showException from scan.commands.loop import Loop from scan.commands.wait impo...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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...
# 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 Builders import wigile_query from Builders import kml_builder class ClassName(): #These are the options we will set def __init__(self): # Descriptions that are required!!! self.name = "Registry Network info corelation" self.description = "WIGLE Query your known BSSID" self.langu...
# # Kontexa vCard data structure and processing # from email.utils import parseaddr import re from six.moves.urllib.parse import urlparse from .atom import Atom from .bag import Bag from .utils import new_id REX_BEGIN = "^BEGIN:VCARD" REX_END = "END:VCARD$" REX_PHONE_NUMBERS = "\+?1? *\(?([0-9]{3})\)?[-. ]?([0-9]{3}...
# -*- coding: utf-8 -*- # HDTV - A ROOT-based spectrum analysis software # Copyright (C) 2006-2009 The HDTV development team (see file AUTHORS) # # This file is part of HDTV. # # HDTV is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright Martin Manns # Distributed under the terms of the GNU General Public License # -------------------------------------------------------------------- # pyspread is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
import argparse import os import random from math import log10 import scipy.stats as stats import torch.backends.cudnn as cudnn import torch.optim as optim import torch.optim.lr_scheduler as lr_scheduler import torchvision.utils as vutils from tensorboardX import SummaryWriter from torch.autograd import Variable, grad ...
# coding: utf-8 class Solution: def numDecodings(self, s): """ :type s: str :rtype: int """ if s == "" or s[0] == '0': return 0 # Initialization before_previous = 0 previous_one = 0 current = 1 for i in range(1, len(s)):...
# DETER DEVICE # this is test code for putting the deter device into server mode, and getting a message via bluetooth from the detection device, and # then going ahead and playing scare sounds. You need to determine your MAC address. It is for the server in this case, so the MAC address # of the deter device. You also ...
# -*- coding: utf-8 -*- # # Nuorisovaltuustovaalit documentation build configuration file, created by # sphinx-quickstart on Tue Oct 18 20:28:37 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerate...
import arrow import datetime from .exceptions import DateParseException, DateTimeParseException, NumberParseException class Parameter(): def __init__(self): pass def to_internal(self, value): return value class String(Parameter): def __init__(self, name, description=None, default_value...
''' The `Extractor` hierarchy contains Transformer classes that take a `Stim` of any type as input and return extracted feature information (rather than another `Stim` instance). ''' from .base import Extractor, ExtractorResult, merge_results from .api import (ClarifaiAPIImageExtractor, ClarifaiAPIVi...