src
stringlengths
721
1.04M
# -*- coding: utf-8 -*- import logging from .server import FHIRNotFoundException, FHIRServer, FHIRUnauthorizedException __version__ = '3.0.0' __author__ = 'SMART Platforms Team' __license__ = 'APACHE2' __copyright__ = "Copyright 2017 Boston Children's Hospital" scope_default = 'user/*.* patient/*.read openid profil...
# coding: utf-8 """ MailMojo API v1 of the MailMojo API # noqa: E501 OpenAPI spec version: 1.1.0 Contact: hjelp@mailmojo.no Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import mailmojo_sdk from mailmojo_sdk.api.ne...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'URLTweetImage' db.create_table(u'tweets_urltweetimage', (...
#!/usr/bin/env python # -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2013,2015,2016 Contributor # # 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...
# -*- coding: utf-8 -*- """ pyrseas.dbobject.column ~~~~~~~~~~~~~~~~~~~~~~~ This module defines two classes: Column derived from DbSchemaObject and ColumnDict derived from DbObjectDict. """ from pyrseas.dbobject import DbObjectDict, DbSchemaObject, quote_id from pyrseas.dbobject.privileges import privi...
# python3 # Copyright 2018 DeepMind Technologies Limited. 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 re...
#!/usr/bin/env python ''' Copyright (c) 2016, Paul-Edouard Sarlin All rights reserved. Project: Autonomous Monitoring System File: capture.py Date: 2016-08-08 Author: Paul-Edouard Sarlin Website: https://github.com/skydes/monitoring ''' from multiprocessing imp...
#!/usr/bin/env python """Testsuite for svglib. This tests conversion of sample SVG files into PDF files. Some tests try using a tool called uniconv (if installed) to convert SVG files into PDF for comparision with svglib. Read ``tests/README.rst`` for more information on testing! """ import os import glob import re...
# -*- coding: utf-8 -*- #---------------------------------------------------------------------------- # Base class for Tsubame platform modules. #---------------------------------------------------------------------------- # Copyright 2017, Martin Kolman # # This program is free software: you can redistribute it and/or...
""" @author: dhoomakethu """ from __future__ import absolute_import, unicode_literals import os from apocalypse.app import App from apocalypse.exceptions import ServiceNotRunningError, handle_exception from apocalypse.exceptions import NoServiceRunningError, NetError from apocalypse.chaos.events.net import NetworkEmula...
from django.utils import timezone from edc_constants.constants import YES, NO, POS, NEG, IND from .factories import MaternalEligibilityFactory from .factories import MaternalConsentFactory from td_maternal.forms import RapidTestResultForm, BaseMaternalModelForm from ..models import RapidTestResult from .base_test_ca...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import cStringIO import hashlib import logging import os import sys import tempfile import unittest ROOT_DIR = os.path.dirname(os....
from commando import management BaseMigrationCheckCommand = management.get_command_class( "migrationcheck", exclude_packages=("commando",)) if BaseMigrationCheckCommand is not None: base = BaseMigrationCheckCommand() class MigrationCheckCommandOptions(management.CommandOptions): """ ...
# -*- coding:utf8 -*- # File : desc_vae_mnist_mlp_bernoulli_adam.py # Author : Jiayuan Mao # Email : maojiayuan@gmail.com # Date : 3/17/17 # # This file is part of TensorArtist. from tartist.core import get_env, get_logger from tartist.core.utils.naming import get_dump_directory, get_data_directory from tartist....
"""Utility functions for generating Twitter OAuth headers and making API calls. """ import logging import urllib2 import appengine_config import handlers import requests import requests_oauthlib import tweepy def auth_header(url, token_key, token_secret, method='GET'): """Generates an Authorization header and ret...
#! /usr/bin/python2.7 """ "PYSTONE" Benchmark Program Version: Python/1.1 (corresponds to C/1.1 plus 2 Pystone fixes) Author: Reinhold P. Weicker, CACM Vol 27, No 10, 10/84 pg. 1013. Translated from ADA to C by Rick Richardson. Every method to preserve ADA-likeness ha...
# -*- 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 'GroupSnooze.count' db.add_column( 'sentry_grou...
#!/usr/bin/env python import cv2 import numpy as np import matplotlib.pyplot as plt import os import gdfmm missing_mask = (cv2.imread('missing_mask.png', cv2.CV_LOAD_IMAGE_UNCHANGED) == 0) for i in xrange(100): if os.path.isfile('images/rgb%d.png' % i) and \ os.path.isfile('images/dep%d.png' % i) and \ ...
import os from stat import * from datetime import date, datetime import re # @TODO Support for rotated log files - currently using the current year for 'Jan 01' dates. class LogFileTimeParser(object): """ Extracts parts of a log file based on a start and enddate Uses binary search logic to speed up searchi...
#!/usr/bin/env python3 # Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import contextlib import copy import glob import io import itertools import os import unittest import re import shutil...
# -*- coding: utf-8 -*- """ hunk.production ~~~~~~~~~~~~~~~ Provides a class to configure production environment. """ import importlib import os import sys from ._compat import urljoin, urlunsplit class ProductionEnvironment(object): """Holds information for a production environment to dispatch to it.""" ...
""" RESTx: Sane, simple and effective data publishing and integration. Copyright (C) 2010 MuleSoft Inc. http://www.mulesoft.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...
# Copyright 2014 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
#!/usr/bin/python # -*- coding: latin-1 -*- # Copyright 2014 Oeyvind Brandtsegg and Axel Tidemann # # This file is part of [self.] # # [self.] is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 # as published by the Free Software Fou...
from horse.models import User, Movie import pytest @pytest.fixture def service(app): return app.ctx.recommendations.smart def assert_recommendations(result, expected): def readable(lst): return [(item.pk, item.title) for item in lst] result_movies = [movie for (movie, weight) in result] a...
from PyQt5.QtWidgets import QItemDelegate, QStyle, QStyleOptionViewItem, QComboBox, QWidget from PyQt5.QtCore import Qt, QModelIndex, QAbstractItemModel, pyqtSlot from urh.controller.SendRecvSettingsDialogController import SendRecvSettingsDialogController from urh.dev.BackendHandler import BackendHandler from urh imp...
# encoding: utf-8 import 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 'Issue.slug' db.add_column('issue_issue', 'slug', self.gf('django.db.models.fields.SlugFiel...
import numpy as np from fitensemble import belt, ensemble_fitter import experiment_loader import sys import ALA3 belt.ne.set_num_threads(1) def run(ff, prior, regularization_strength, bootstrap_index_list): pymc_filename = ALA3.data_directory + "/models/model_%s_%s_reg-%.1f-BB%d.h5" % (ff, prior, regularization_st...
from cadnano.proxies.cnproxy import UndoCommand from cadnano.cntypes import ( DocT, StrandT ) class AddModsCommand(UndoCommand): def __init__(self, document: DocT, strand: StrandT, idx: int, mod_id: str): super(AddModsCommand, self).__init__() self._strand = strand self._id_num = st...
import path import logging import subprocess import pymel.core as pm import os import shutil import sys import xml.etree.cElementTree as ET import xml.dom.minidom as minidom #from test.badsyntax_future3 import result #global shader dictionary SHADER_DICT = {} log = logging.getLogger("renderLogger") def compileOSLSha...
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # 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 your option) any later version. # # This library ...
import nltk.grammar as gram import pycryptics.grammar.nodes as nd from pycryptics.utils.indicators import INDICATORS """ A Context Free Grammar (CFG) to describe allowed substructures of cryptic crossword clues and how to solve each substructure. """ # The basic wordplay transforms top = gram.Nonterminal(nd.TopNode) ...
import re from django import forms from django.shortcuts import redirect from django.core.urlresolvers import reverse from django.forms import formsets, ValidationError from django.views.generic import TemplateView from django.utils.datastructures import SortedDict from django.utils.decorators import classonlymethod ...
# Copyright 2017 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os from testrunner.local import testsuite from testrunner.objects import testcase proposal_flags = [{ 'name': 'reference-types...
import os from collections import namedtuple from random import randint RAXML_PATH = 'raxmlHPC-PTHREADS-AVX' MODELS = ['GTRGAMMA', 'GTRGAMMAI', 'GTRCAT', 'GTRCATI'] RAXML_INFO_PREFIX = 'RAxML_info' RAXML_LOG_PREFIX = 'RAxML_log' RAXML_RESULT_PREFIX = 'RAxML_result' RAXML_BESTTREE_PREFIX = 'RAxML_bestTree' RAXML_PARSTR...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: bigip_device_group shor...
# =========================================================================== # # Name: myanimelist.py # Purpose: Provide an interface to anime data; syncronize with the MyAnimeList # server; # # Copyright (c) 2008 Gareth Latty # Copyright (c) 2009 Sebastian Bartos # Copyright (c) 2009 Daniel Anderson - dan...
import os from PyQt5.QtWidgets import QDialog, QVBoxLayout, QTabWidget, QDialogButtonBox from umlfri2.application import Application from umlfri2.application.events.application import LanguageChangedEvent from .general import SettingsDialogGeneral from .updates import SettingsDialogUpdates class SettingsDialog(QDial...
""" The MIT License Copyright (c) 2010 Ricky Rosario Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publ...
# This uses the dev branch of guizero which needs to be linked to the appropriate # directory - in future this will use the normal production version of guizero from guizero.build.lib.guizero import App, Text, PushButton, info, MenuBar, Picture, yesno import quizdetails # For testing the gui without the arduino comme...
from collections import OrderedDict from django.http import HttpResponse from django.template import Context, Template from django.utils.html import escape from sqlreports.utils import CSVWriter, get_db_connection from sqlreports.models import SQLReport def dictfetchall(cursor): "Returns all rows from a cursor ...
import chainer from chainer.backends import cuda from chainer import distribution from chainer.functions.activation import sigmoid from chainer.functions.array import broadcast from chainer.functions.array import where from chainer.functions.math import exponential from chainer.functions.math import logarithm_1p from c...
""" Breadth-first search and depth-first search. Author: Wenru Dong """ from typing import List, Optional, Generator, IO from collections import deque class Graph: """Undirected graph.""" def __init__(self, num_vertices: int): self._num_vertices = num_vertices self._adjacency = [[] fo...
#!/usr/bin/python import pytest from symmRestApi import Restful ###################################### ## ADMINISTRATION Resource group ###################################### def test_administration(variables): # in the following, 'resource_id' or similar string is a valid type string but # will never be suc...
##################################### # With some tiny modification, this code is the one used by Tensorflow slim at: # https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/slim # Please refer to the link for further explanations. ### The difference is this architecture is written in fully-convoluti...
import unittest import numpy as np import bayesnet as bn class TestProduct(unittest.TestCase): def test_product(self): arrays = [ 1, np.arange(1, 5), np.arange(1, 7).reshape(2, 3), np.arange(1, 7).reshape(2, 3, 1) ] axes = [ None...
""" WSGI config for techbikers project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ------------------------------------------------------------------- # Filename: data_handler.py # Purpose: handling data (waveform/response) in obspyDMT # Author: Kasra Hosseini # Email: kasra.hosseinizad@earth.ox.ac.uk # License: GNU Lesser General...
#!/usr/bin/python # # Copyright (C) 2009, 2011 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This p...
# This file is a part of the "SuMPF" package # Copyright (C) 2018-2021 Jonas Schulte-Coerne # # 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 # Software Foundation, either version 3 of the License, or (at your ...
# -*- coding: utf-8 -*- # emma # # Copyright (C) 2006 Florian Schmidt (flo@fastflo.de) # 2014 Nickolay Karnaukhov (mr.electronick@gmail.com) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software F...
if ( ('PFVFLOW' in features) and ('TWOPHASEFLOW' in features) ): from yade import pack from yade import export from yade import timing from yade import plot import time from math import * num_spheres=1000# number of spheres young=1e6 compFricDegree = 3 # initial contact friction during the ...
""" This is a test of the FileCatalogDB It supposes that the DB is present. """ # pylint: disable=invalid-name,wrong-import-position import unittest import itertools import os import sys from DIRAC.Core.Base import Script Script.parseCommandLine() from DIRAC.DataManagementSystem.DB.FileCatalogDB import FileCat...
import shm from auv_math.math_utils import rotate from mission.framework.combinators import Concurrent, Defer, Sequential from mission.framework.movement import RelativeToInitialPositionN, RelativeToInitialPositionE, PositionN, PositionE, Heading, Depth from mission.framework.task import Task from mission.framework.pr...
""" scada.py """ from minicps.devices import SCADAServer from utils import SCADA_PROTOCOL, STATE from utils import SCADA_PERIOD_SEC from utils import IP from utils import CO_0_2a, CO_1_2a, CO_2_2a, CO_3_2a from utils import HR_0_2a import time RTU2A_ADDR = IP['rtu2a'] + ':502' RTU2B_ADDR = IP['rtu2b'] + ':502' SCADA...
#!/usr/bin/python # # Copyright 2014 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 a...
### ### Code for parsing extended SendDragonKeys syntax into a series of ### Input events suitable for calling SendInput with. ### ### Uses ctypes (requires Python 2.5+). ### ### Assumes input is 8-bit Windows-1252 encoding. ### ### ### Author: Mark Lillibridge ### Version: 0.7 ### import re from ctypes imp...
import pytest from pytest_django.fixtures import db from uuid import uuid4 from django.core.management import call_command from django.db import connection from councilmatic_core.models import Bill, BillDocument, Event, EventDocument @pytest.fixture @pytest.mark.django_db def organizations(db): call_command('loa...
__author__ = 'belinkov' import sys import os import codecs import re from data_utils import DIACS, REGEX_DIACS REGEX_SOLUTION_DIAC = re.compile(r'\((.+?)\)') # for gold diacritized word class WordAnalysis(object): """ A simplified pos analysis from treebank pos/before-treebank files. Attributes: ...
import sys import os import subprocess import logging import time import re import pandas logging.basicConfig() LOG = logging.getLogger(__name__) class TraitTableEntry(object): """ A single entry in a trait table """ def __init__(self, name): self.name = name self.traits = {} def __str...
from django.db import models from symposion.proposals.models import ProposalBase class Proposal(ProposalBase): AUDIENCE_LEVEL_NOVICE = 1 AUDIENCE_LEVEL_EXPERIENCED = 2 AUDIENCE_LEVEL_INTERMEDIATE = 3 AUDIENCE_LEVELS = [ (AUDIENCE_LEVEL_NOVICE, "Novice"), (AUDIENCE_LEVEL_INTE...
# -*- coding: utf-8 -*- import inspect import json import re from celery import chain from celery.result import AsyncResult from datetime import datetime from django.core.exceptions import ObjectDoesNotExist from django.db import transaction from django.http import HttpResponse from django.shortcuts import render from...
""" MOST OF THIS CODE IS NOT USED ITS COPY/PASTED AND LEFT HERE FOR CONVENIENCE """ import os import sys # in case our module isn't installed (running from this folder) if not os.path.abspath('../../../') in sys.path: sys.path.append('../../../') # helps spyder get docs import swhlab import swhlab.common as cm i...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
# # 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 # ...
#!/usr/bin/python # coding=utf-8 import falcon import ujson import json from catcher import models import datetime from playhouse.shortcuts import model_to_dict import logging from catcher.models import User, NullUser import peewee class PeeweeConnection(object): def process_request(self, req, resp): mo...
# Copyright (c), Michael DeHaan <michael.dehaan@gmail.com>, 2012-2013 # Copyright (c), Toshio Kuratomi <tkuratomi@ansible.com> 2016 # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function FILE_ATTRIBUTE...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ===------------------------------* Python *------------------------------=== # THIS FILE IS GENERATED BY INVAR. DO NOT EDIT !!! # ===------------------------------------------------------------------------=== from TestAbcGender import Gender try: from c...
#!/usr/bin/env python """ Online Constrained Nonnegative Matrix Factorization The general file class which is used to analyze calcium imaging data in an online fashion using the OnACID algorithm. The output of the algorithm is storead in an Estimates class More info: ------------ Giovannucci, A., Friedrich, J., Kaufm...
#!/usr/bin/env python import featurebuilder import pickle import numpy def load_data(filename): src = open(filename, "r") X, Y = eval(src.readline()) src.close() return X, Y def main(): print "Loading data..." X, Y = load_data("test_set.py") f = open("rnode.p", "rb") rnode = pickle.load(f) f.close() rno...
import uuid from django.core.exceptions import ValidationError from django.db import models class ReplyError(Exception): def __init__(self, errors_dict): self.errors_dict = errors_dict @property def errors(self): return self.errors_dict class Invitation(models.Model): name = models.C...
from math import radians from CollisionAvoidanceMonitor.transform import Transformation import os # Config happens here: # Colors for each body colors = [(0.6, 0.6, 0.6), (1, 0, 1), (1, 1, 0), (0, 1, 1), (0, 1, 0), (1, 0.5, 0), (0.2, 0.2, 1), (1, 1, 1)] # PV prefix pv_prefix = os.environ["MYPVPREFIX"] # PV prefix f...
# -- coding: utf-8 -- # 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 # "Li...
import os import csv import json import pymongo from kagen import utils from kagen.utils import config from datetime import datetime logger = utils.get_logger("khan") def work(): khan = utils.get_conn_khan() db = utils.get_conn_mongo() dtf = "%Y-%m-%dT%H:%M:%SZ" doc = utils.get_response_json(khan, ...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it und...
from __future__ import unicode_literals import os import click from pipes import quote from .push_file import push_file, pull_file from stable_world.py_helpers import urlparse, urlunparse class BaseManager(object): NAME = None PROGRAM = None @classmethod def enabled(cls): if cls.PROGRAM is ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
#!/usr/bin/python # -*- coding: utf-8 -*- # # CoMFoRT: a COntent Management system FOr Researchers and Teachers! # # Copyright (C) 2008 Projet2-L3IF ENS Lyon. # # Contributors: # * Jean-Alexandre Angles d'Auriac # * Gabriel Beaulieu # * Valentin Blot # * Pierre Boutillier # * Nicolas Brunie # * Aloï...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # MIT License # # Copyright (c) 2018 Miha Purg <miha.purg@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, in...
# -*- coding: utf-8 -*- """ Diagnostic Plots for Pipeline Author: Patrick O'Brien Date last updated: February 2017 """ # Import statements from glob import glob import os import numpy as np from matplotlib.backends.backend_pdf import PdfPages import matplotlib.pyplot as plt from PyPDF2 import PdfFileMerger import panda...
#!/usr/bin/env python import Skype4Py debug = False import threading import time class BotSkypeinterface(object): def __init__(self, commands, threading): self.skype = Skype4Py.Skype(Transport='x11') if not self.skype.Client.IsRunning: print 'You need to start skype' exit() ...
from point_cloud import wavefront import numpy as np from scipy import interpolate import matplotlib.pyplot as plt def tan_step(x, a, b, delta): # out = 1/2 * (np.tanh((x-a)/delta) - np.tanh((x - b)/delta)) out = 1/2 * ( 1- np.tanh((x-a)/delta)) return out def bspline(): # x = np.arange(0, 2*np.pi+...
# coding=utf-8 # Copyright 2021 The Ravens Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = "$Revision$" import __builtin__ import gettext import os import sys gettext.install('yaplcide') # this is a dummy to prevent gettext falling down _dist_folder = os.path.split(sys.path[0])[0] _beremiz_folder = os.path.join(_dist_folder, "beremiz") #Ensure ...
""" *************************************************************************** DeleteWorkflowAction.py ------------------------------------- Copyright (C) 2014 TIGER-NET (www.tiger-net.org) *************************************************************************** * This plugin is part of the Water Observatio...
import getpass import yaml import os import logging import getpass #from xcrypto import xcrypto from xcloud import utils log = logging.getLogger(__name__) class YamlLoader(yaml.Loader): def __init__(self, stream): self._root = os.path.split(stream.name)[0] super(YamlLoader, self).__init__(stream...
# SecuML # Copyright (C) 2017 ANSSI # # SecuML 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. # # SecuML is distributed in the hope t...
__all__ = [ 'main', ] import sys from pathlib import Path from g1.bases import argparses from g1.bases import oses from g1.bases.assertions import ASSERT from g1.texts import columns from g1.texts.columns import argparses as columns_argparses from . import models from . import xar_ops_dirs _XAR_LIST_COLUMNS = f...
from __future__ import absolute_import, print_function, unicode_literals from .jstypes import Hook, Interfaces OBSOLETE_EXTENSION_MANAGER = { 'on_get': 'This interface is part of the obsolete extension manager ' 'interface, which is not available in any remotely modern ' 'version of F...
from .. utils import TranspileTestCase, UnaryOperationTestCase, BinaryOperationTestCase, InplaceOperationTestCase from unittest import expectedFailure class DictTests(TranspileTestCase): def test_setattr(self): self.assertCodeExecution(""" x = {} try: x.attr = 42 ...
#!/usr/bin/env python import os import argparse import re from collections import defaultdict import sys KNOWN_TYPES = { "double" : "double", "int" : "int32", "size_t" : "uint32", "float" : "float", "string" : "string", "bool" : "bool", "complex<double>" : "double", ...
#!/usr/bin/env python #---- licence header ############################################################################### ## file : setup.py ## ## description : This file has been made to provide a python access to ## the Pylon SDK from python. ## ## project : pyth...
import ast from unittest import ( TestCase, ) from darglint.analysis.return_visitor import ( ReturnVisitor, ) from .utils import ( reindent, ) class ReturnsVisitorTests(TestCase): def assertFound(self, program): """Assert that the return was found. Args: program: The prog...
#K-Means++ Clustering with Gap Statistic to determine the optimal number of clusters import sys import numpy as np import scipy.io as sio #import matplotlib.pyplot as plt from sklearn.cluster import KMeans from sklearn.svm import SVC filename = sys.argv[1] datafile = sio.loadmat(filename) data = datafile['bow'] sizeda...
# Copyright (c) 2018-2021 Vector 35 Inc # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, ...
#!/usr/bin/python3 -u # A script for install alive script import subprocess import argparse import re import os import shutil import pwd from subprocess import call parser = argparse.ArgumentParser(description='A script for install alive script and cron') parser.add_argument('--url', help='The url where notify tha...
# -*- coding: utf-8 -*- import os,math from qgis.core import NULL from mole import oeq_global from mole.project import config from mole.extensions import OeQExtension from mole.stat_corr import rb_contemporary_window_uvalue_by_building_age_lookup from mole.stat_corr import nrb_contemporary_window_uvalue_by_building_ag...
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
import requests from talent_curator import app GOOGLE_DRIVE_API_URI = 'https://www.googleapis.com/drive/v2/files/' logger = app.logger HEADERS = { 'Authorization': "Bearer {access_token}", 'Content-type': "application/json", } class GoogleDriveAPI(object): def get_document(self, access_token, document_id...
# This file is part of TRS (http://math.kompiler.org) # # TRS is free software: you can redistribute it and/or modify it under the # terms of the GNU Affero General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # # TRS is distrib...