src
stringlengths
721
1.04M
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
#!/usr/bin/python import re import json import random import urllib import requests from requests import Request, Session from requests.cookies import RequestsCookieJar MS_LOGIN = "https://logSpartanTokenService.pyin.live.com/login.srf?id=2" WAYPOINT_GATEWAY = "https://www.halowaypoint.com/oauth/signin?returnUrl=htt...
from setuptools import setup # , find_packages import emailage LONG_DESCRIPTION = open('README.rst').read() CLASSIFIERS = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: BSD License', 'Natural Language :: English', 'Operating System ...
import datetime import time import smtplib import os from email.mime.text import MIMEText from email.mime.application import MIMEApplication from email.mime.multipart import MIMEMultipart from smtplib import SMTP class Mailer(): smtp_server = '' smtp_username = '' smtp_password = '' smtp_port = '...
# (C) British Crown Copyright 2010 - 2015, Met Office # # This file is part of Iris. # # Iris 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 option) any l...
# Copyright (C) 2020 Philipp Hörist <philipp AT hoerist.com> # # This file is part of nbxmpp. # # 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 opt...
# -*- coding: utf-8 -*- # # 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 # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import json ...
##################################################################################### # Python script to convert Google Maps JSON file to a KML file # Copyright (C) 2017 Dimitri Souza # https://github.com/dmrsouza/json2kml ##################################################################################### # This...
# Sketch - A Python-based interactive drawing program # Copyright (C) 1996, 1997, 1998 by Bernhard Herzog # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the Lice...
""" #;+ #; NAME: #; continuum #; Version 1.0 #; #; PURPOSE: #; Module for continuum code #; 20-Aug-2015 by JXP #;- #;------------------------------------------------------------------------------ """ from __future__ import print_function, absolute_import, division, unicode_literals import numpy as np import ...
# sqlalchemy/__init__.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from .sql import ( alias, all_, and_, any_, asc, bet...
# -*- coding: utf-8 -*- """Chronojump Server views controller.""" from chronojumpserver import app from flask import render_template, request, redirect, url_for, abort, flash from urlparse import urlparse, urljoin from flask_wtf.file import FileField from chronojumpserver.models import Person, Station, RFIDHistory, Use...
# vim: set fileencoding=utf-8 : # # (C) 2018 Guido Günther <agx@sigxcpu.org> """A git repository for Debian packages that can roll back operations""" from .. import log from .. git import GitRepositoryError from . git import DebianGitRepository class RollbackError(GitRepositoryError): """ Error raised if th...
# -*- coding: utf-8 -*- """ Module entry point: call get_store() to instanciate a KittyStore implementation. Copyright (C) 2012 Aurelien Bompard Author: Aurelien Bompard <abompard@fedoraproject.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Lice...
# -*- coding: utf-8 -*- # # Copyright (c) 2014 Netheos (http://www.netheos.net) # # 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 req...
# -*- coding: utf-8 -*- # $Id$ # # Copyright (c) 2007-2011 Otto-von-Guericke-Universität Magdeburg # # This file is part of ECSpooler. # ################################################################################ # Changelog # #####################...
#!/usr/bin/env python3 import pywind as tcp_handler import pywind.web.lib.websocket as websocket import pywind.web.lib.httputils as httputils import socket, time class ws_listener(tcp_handler.tcp_handler): def init_func(self, creator, listen, is_ipv6=False): if is_ipv6: fa = socket.AF_INET6 ...
# Django settings for sandbox project. import os import oscar_fancypages.utils as ofp PROJECT_DIR = os.path.dirname(__file__) location = lambda x: os.path.join(os.path.dirname(os.path.realpath(__file__)), "../%s" % x) DEBUG = True TEMPLATE_DEBUG = DEBUG USE_LESS = True ADMINS = ( # ('Your Name', 'your_email@ex...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
'''OpenGL extension ARB.multi_draw_indirect This module customises the behaviour of the OpenGL.raw.GL.ARB.multi_draw_indirect to provide a more Python-friendly API Overview (from the spec) The ARB_draw_indirect extension (included in OpenGL 4.0) introduced mechanisms whereby the parameters for a draw function m...
#!/usr/bin/env python """ Extracts each segment of a PDB file to a separate file. usage: python pdb_splitseg.py <pdb file> example: python pdb_splitseg.py 1CTF.pdb Author: {0} ({1}) This program is part of the PDB tools distributed with HADDOCK or with the HADDOCK tutorial. The utilities in this package can be used...
import pytest from sitemessage.messengers.base import MessengerBase from sitemessage.models import Subscription, DispatchError from sitemessage.toolbox import recipients, schedule_messages, send_scheduled_messages from sitemessage.utils import get_registered_messenger_objects from .testapp.sitemessages import ( WO...
# vi: ts=8 sts=4 sw=4 et # # setup.py: distutils setup script for Draco2 # # This file is part of Draco2. Draco2 is free software and is made available # under the MIT license. Consult the file "LICENSE" that is distributed # together with this file for the exact licensing terms. # # Draco2 is copyright (c) 1999-2007 b...
#!/usr/bin/env python import glob from time import sleep, time import os from itertools import cycle import threading import subprocess import RPi.GPIO as GPIO import steppermotor last_played_time = time() + 3600 sound_interval = 2 * 60 gain = 90 GPIO.cleanup() GPIO.setmode(GPIO.BCM) class RunWheels(threading.Thre...
""" This module contains the PerfRepoTest class. Copyright 2015 Red Hat, Inc. Licensed under the GNU General Public License, version 2 as published by the Free Software Foundation; see COPYING for details. """ __author__ = """ olichtne@redhat.com (Ondrej Lichtner) """ import textwrap from xml.etree import ElementTre...
# Copyright (C) 2012-2017 Germar Reitze # # 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 pro...
import json import logging from webob import Response from ryu.app.simple_switch_13 import SimpleSwitch13 from ryu.controller import ofp_event from ryu.controller.handler import MAIN_DISPATCHER, CONFIG_DISPATCHER, DEAD_DISPATCHER from ryu.controller.handler import set_ev_cls from ryu.app.wsgi import ControllerBase, WS...
""" Lattice module, with Lattice object and utilities @author: Chris Scott """ from __future__ import absolute_import from __future__ import unicode_literals from __future__ import division import logging import copy import numpy as np from .atoms import elements from ..algebra import vectors from . import _lattic...
##################################################################################### # # Copyright (c) Crossbar.io Technologies GmbH # # Unless a separate license agreement exists between you and Crossbar.io GmbH (e.g. # you have purchased a commercial license), the license terms below apply. # # Should you enter ...
import os import socket import StringIO import tempfile import time import traceback from django.conf import settings import commonware.log import elasticsearch import requests from cache_nuggets.lib import memoize from PIL import Image from lib.crypto import packaged, receipt from lib.crypto.packaged import Signing...
""" Compute ternary contours using matplotlib.pyplot.contour function """ import numpy as np import matplotlib.pyplot as plt import ternary import math import itertools def shannon_entropy(p): """Computes the Shannon Entropy at a distribution in the simplex.""" s = 0. for i in range(len(p)): try: ...
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Philippe Biondi <phil@secdev.org> # This program is published under a GPLv2 license """ Operating system specific functionality. """ from __future__ import absolute_import import socket import scapy.consts fr...
from datetime import datetime from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.fields import GenericForeignKey from django.db import models from django.db.models.signals import post_save from django.dispatch import receiver from ac...
import os import re import sys from functools import wraps from getpass import getpass, getuser from glob import glob from contextlib import contextmanager from posixpath import join from fabric.api import env, cd, prefix, sudo as _sudo, run as _run, hide, task from fabric.contrib.files import exists, upload_template ...
"""A few convenience functions to setup the Hubbard model. .. math:: H=\sum_{i}\vec{S}_{i}\cdot\vec{S}_{i+1}= \sum_{i}\left[S^{z}_{i}S^{z}_{i+1}+ \frac{1}{2}\left(S^{\dagger}_{i}S^{-}_{i+1}+ S^{-}_{i}S^{\dagger}_{i+1}\right)\right] """ class HubbardModel(object): """Implements a few convenience fu...
# Copyright 2007 Zachary Pincus # This file is part of CellTool. # # CellTool is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. import bisect, numpy from . import utility_tools def pca(data): ...
PINS_AF = ( ('A1', (1, 'TIM2_CH2'), (2, 'TIM5_CH2'), (7, 'USART2_RTS'), (8, 'UART4_RX'), ), ('CS_DAC', (1, 'TIM2_CH3'), (2, 'TIM5_CH3'), (3, 'TIM9_CH1'), (7, 'USART2_TX'), ), ('MX30', (1, 'TIM2_CH4'), (2, 'TIM5_CH4'), (3, 'TIM9_CH2'), (7, 'USART2_RX'), ), ('A4', (5, 'SPI1_NSS'), (6, 'SPI3_NSS'), (7, 'USART2_CK'...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # metadata ''' Load metadata (DocType) class Example: meta = frappe.get_meta('User') if meta.has_field('first_name'): print "DocType" table has field "first_name" ''' from __future__ import unicode_literals im...
import threading import time import traceback from uuid import uuid4 from fsgamesys.input.enumeratehelper import EnumerateHelper from fsgamesys.platforms.platform import PlatformHandler class Instance: STATE_INITIALIZED = "INITIALIZED" STATE_PREPARING = "PREPARING" STATE_READY = "READY" STATE_RUNNING...
'''Selects protein sequences from NCBI that are in a list from Geisha text file. Output is written to standard output. ''' import os import sys import time from Bio import SeqIO, Entrez def parse(infile): '''Return a set of gene IDs from an input file.''' for line in open(infile): geneid = line.spl...
#!/usr/bin/env python from sqlalchemy import between from sqlalchemy.sql import and_, label from app import db, models import htsql_methods as hsql Clinical = models.ClinicalData Attribute = models.Attribute """ Example SQL atomic query for modified nested model: select * from clinical_data (selec...
#!/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. """\ Wrapper script around Rietveld's upload.py that simplifies working with groups of files. """ import json import optparse impo...
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
# -*- coding: utf-8 -*- from __future__ import division __author__= "Luis C. Pérez Tato (LCPT) Ana Ortega (AO_O)" __copyright__= "Copyright 2018, LCPT AO_O " __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@gmail.com ana.ortega.ort@gmail.com" import xc_base import geom import xc from actions import loa...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
"""module mydjangolib.bigint_patch A fix for the rather well-known ticket #399 in the django project. Create and link to auto-incrementing primary keys of type bigint without having to reload the model instance after saving it to get the ID set in the instance. """ from django.core import exceptions from django.conf...
from fixures import * from freezegun import freeze_time from datetime import datetime from time import sleep from django.core import mail from django.conf import settings from funcy import is_list, all, str_join from . import tasks as T import fixures from .models import JobStatus, job_status, get_questions, get_anon, ...
# -*- coding: utf-8 -*- """ Use nose `$ pip install nose` `$ nosetests` """ from hyde.generator import Generator from hyde.site import Site from fswrap import File, Folder from util import assert_no_diff SCSS_SOURCE = File(__file__).parent.child_folder('scss') TEST_SITE = File(__file__).parent.parent.child_folder('_...
# stdlib import unittest import logging import gc import sys # 3p #from nose.plugins.attrib import attr # project import checks.system.win32 as w32 logging.basicConfig(level=logging.DEBUG) log = logging.getLogger(__file__) AGENT_CONFIG = {} # None of the windows checks use this. class TestWin32(unittest.TestCase)...
# GUI Application automation and testing library # Copyright (C) 2006-2017 Mark Mc Mahon and Contributors # https://github.com/pywinauto/pywinauto/graphs/contributors # http://pywinauto.readthedocs.io/en/latest/credits.html # All rights reserved. # # Redistribution and use in source and binary forms, with or with...
import sys # this class gets all output directed to stdout(e.g by print statements) # and stderr and redirects it to a user defined function class PrintHook: # out = 1 means stdout will be hooked # out = 0 means stderr will be hooked def __init__(self, out=1): self.func = None ##self.func is user...
# Copyright 2016, Fabien Boucher # # 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 ...
from csv import DictReader hackers = [h for h in DictReader(open('resumes.csv')) if h.get('resume', 'None') != 'None'] from collections import defaultdict hackers_with_names = defaultdict(int) def strip_name(name): alphabet = 'abcdefghijklmnopqrstuvwxyz ' return ''.join([c for c in name if c in alphabet + alphabet....
import exceptions as exp import random cmd_list = [] cmd_class_list = [] h_page = 'Страница с командами:\n' prefix = '!' # Базовый класс команды. От него наследуются все остальные команды. # Обязательно ставьте декоратор регистрации команды (@registercmd)! Иначе не будет команды! class Command(): def __init__(se...
"""Simple high-performance Open Pixel Control client.""" # # Copyright (c) 2013 Micah Elizabeth Scott # # 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 ...
"""Find duplicate files inside a directory tree.""" from os import walk, remove, stat from os.path import join as joinpath from hashlib import md5 import threading import Queue import time import sys class Scanner(threading.Thread): def __init__(self, path, queue, finished_scan): threading.Thr...
######## # Copyright (c) 2013 GigaSpaces Technologies Ltd. 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...
import heapq from scipy.sparse import dok_matrix, csr_matrix import numpy as np from representations.matrix_serializer import load_vocabulary, load_matrix class Explicit: """ Base class for explicit representations. Assumes that the serialized input is e^PMI. """ def __init__(self,...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010-2013 Código Sur Sociedad Civil. # All rights reserved. # # This file is part of Cyclope. # # Cyclope 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 Foundat...
#!/usr/bin/env python # This file is part of VoltDB. # Copyright (C) 2008-2017 VoltDB 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 limitati...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
import os import hashlib import subprocess BUILD_UTILS_PATH = os.path.join(os.path.split(__file__)[0], 'build_utils') # can be overridden from command line tools such as update-mirrors, # for the version that has the buildbot hooks. vcs_binaries = dict(bzr='bzr', hg='hg', git='git') def ez_hash(url): """Return...
# -*- coding: utf-8 -*- """ Compatibility module for Python 2.7 and > 3.3 """ from __future__ import unicode_literals import sys import time try: import queue except ImportError: import Queue as queue PY2 = sys.version < '3' clock = None if PY2: unichr = unichr long = long fileopen = file els...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # ThinkOpen Solutions Brasil # Copyright (C) Thinkopen Solutions <http://www.tkobr.com>. # # This...
""" Various distance functions. """ from server.logic.projection.util import Projection, Coordinate from collections import namedtuple def distance_to_edge_sqr(point, edge_start, edge_end): """ Retrieves the distance between a segment (edge) and a point. Function args: point -- a Vector of...
########################################################################### # # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/l...
# Copyright (c) 2014 Rackspace, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
""" Implementes functions ring support. """ # # Author: Pearu Peterson # Created: April, 2008 # __all__ = ['FunctionRing'] from ..core import classes, objects, init_module from ..basealgebra import Verbatim, Algebra from ..ring import CommutativeRing init_module.import_heads() class FunctionRing(CommutativeRing): ...
#!/usr/bin/env python # <configuration default="false" name="pong" type="Application" factoryName="Application"> # <option name="MAIN_CLASS_NAME" value="gd.twohundred.jvb.Main" /> # <option name="VM_PARAMETERS" value="" /> # <option name="PROGRAM_PARAMETERS" value="&quot;$PROJECT_DIR$/../vb-roms/all-roms/pong.vb...
#!/usr/bin/env python r"""Test runner for typeshed. Depends on mypy and pytype being installed. If pytype is installed: 1. For every pyi, do nothing if it is in pytype_blacklist.txt. 2. If the blacklist line has a "# parse only" comment run "pytd <foo.pyi>" in a separate process. 3. If the file is n...
from __future__ import absolute_import class _delegate(object): def __init__(self, name, attr): self._name = name self._attr = attr def __get__(self, instance, _): if instance is None: return self return getattr(self.delegate(instance), self._attr) def __set__(self, insta...
from tempfile import NamedTemporaryFile from genmod.vcf_tools import sort_variants def setup_csv_file(): """ Print some variants to a vcf file and return the filename """ variant_lines = [ '1\t1\t11900\t.\tA\tT\t100\tPASS\tMQ=1\tGT:GQ\t0/1:60\t0/1:60\t1/1:60\n', '3\t3\t947378\t.\tA\tT\...
# type: ignore import asyncio import io import json import pathlib import sys import zlib from typing import Any, Optional from unittest import mock import pytest import aiohttp from aiohttp import payload from aiohttp.hdrs import ( CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_TRANSFER_ENCODING, CON...
# Copyright (c) 2018 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import configparser #To get version numbers from config files. from typing import Dict, Iterable, List, Optional, Set, Tuple from UM.VersionUpgrade import VersionUpgrade # Superclass of the plugin. from . import MachineIn...
import ibmseti import os import pandas as pd from sklearn.model_selection import StratifiedKFold from sklearn.utils import shuffle import numpy as np import h5py from tqdm import tqdm def create_tensors_hdf5_logmod2_ph(dataset_name, dataset_folder, output_folder, number_of_folds, ti...
# Implementation of classic arcade game Pong import simplegui import random # initialize globals - pos and vel encode vertical info for paddles WIDTH = 600 HEIGHT = 400 BALL_RADIUS = 20 PAD_WIDTH = 8 PAD_HEIGHT = 80 HALF_PAD_WIDTH = PAD_WIDTH / 2 HALF_PAD_HEIGHT = PAD_HEIGHT / 2 LEFT = False RIGHT = True LINE_...
# coding=utf-8 import json import requests import collections import logging __author__ = 'phil' # logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger(__name__) def doLog(func): def wrapped(*args, **kwargs): result = func(*args, **kwargs) logger.debug('called {0} params: {1} re...
""" Script that analyzes the classification edits of an archive. The analysis focuses on changes user "dleick" made to classifications created by user "cvoss", in order to inform decisions about how to most efficiently direct classification effort. """ from collections import defaultdict import sqlite3 # Set up Dja...
# coding: utf-8 # Licensed under a 3-clause BSD style license - see LICENSE.rst import numpy as np from numpy.testing import assert_array_equal import pytest from astropy import units as u from astropy.coordinates import SkyCoord, representation as r from astropy.time import Time from .. import Masked class TestRe...
import copy from itertools import cycle, islice from model import * import view import parserLastFM __author__ = "Rafael Arquero Gimeno" def add(users, parser): """ :type users: ABB :param parser: File parser :return: A Binary Search Tree containing old + parsed values """ for user in isli...
# -*- coding: utf-8 -*- ''' Title: OptAlgOptions.py Units: - Author: E. J. Wehrle, S. Rudolph Date: August 6, 2017 ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- Description: -------------------...
#!/usr/bin/env python # coding=utf-8 #chrome localhost ''' import os from selenium import webdriver chromedriver = "/home/softs/selenium/chromedriver" os.environ["webdriver.chrome.driver"] = chromedriver driver = webdriver.Chrome(chromedriver) driver.get("http://baidu.com") driver.quit() ''' #firefox(iceweasel) localh...
from PortalRaid.views import NewCharacterFormView, ServerListView, ListCharactersUser, DetailsCharacter,\ DetailsCharacterFromAPI, RaidListView, RaidDetailView, SignUpRaidView, ClassCharacterAPI __author__ = 'Alexandre Cloquet' from django.conf.urls import patterns, include, url from django.contrib import admin ...
from default import * import theano import theano.tensor as T import lasagne as nn import deep_learning_layers import layers import preprocess import postprocess import objectives import theano_printer import updates cached = "memory" # Save and validation frequency validate_every = 10 validate_train_set = False sa...
class Scene: """ Scene is the base class for playable environments, like exteriors, interiors and the world map. The interface defines methods that are called in different situations, such as entering a scene, or leaving a scene which allows the users to define things like loading and unload...
import pytz from pytz import timezone from datetime import timedelta, datetime, date, time import re from corehq.apps.casegroups.models import CommCareCaseGroup from corehq.apps.hqcase.dbaccessors import get_case_ids_in_domain from corehq.apps.reminders.dbaccessors import get_surveys_in_domain from dimagi.ext.couchdbki...
# Copyright 2015, 2016 OpenMarket Ltd # Copyright 2017 New Vector Ltd # # 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...
# Copyright (c) 2018 The Johns Hopkins University/Applied Physics Laboratory # 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/LICEN...
# Copyright: Ankitects Pty Ltd and contributors # License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html import os import unicodedata from typing import Any, Dict, List, Optional, Tuple from anki.collection import Collection from anki.consts import * from anki.decks import DeckManager from anki....
import pytest import mock from jenkinsapi.jenkins import JenkinsBase @pytest.fixture(scope='function') def jenkinsbase(): return JenkinsBase('http://localhost:8080/', poll=False) def test_called_in__poll(jenkinsbase, monkeypatch, mocker): def fake_poll(cls, tree=None): # pylint: disable=unused-argument ...
# Flatten navigable space to one voxel thick layer # For walking and driving actors # May 2016 - Martijn Koopman # Input idi = self.GetInput() dims = idi.GetDimensions() numTuples = dims[0]*dims[1]*dims[2] cellsArr = idi.GetPointData().GetArray('cell_id') typesArr = idi.GetPointData().GetArray('cell_type')...
# system configuration generated and used by the sysconfig module build_time_vars = {'AC_APPLE_UNIVERSAL_BUILD': 0, 'AIX_GENUINE_CPLUSPLUS': 0, 'AR': 'ar', 'ARFLAGS': 'rc', 'ASDLGEN': './Parser/asdl_c.py', 'ASDLGEN_FILES': './Parser/asdl.py ./Parser/asdl_c.py', 'AST_ASDL': './Parser/Python.asdl', 'AST_C': 'Pytho...
# Copyright (c) 2021 Ultimaker B.V. # Cura is released under the terms of the LGPLv3 or higher. import json import threading from json import JSONDecodeError from typing import List, Dict, Any, Callable, Union, Optional from PyQt5.QtCore import QUrl from PyQt5.QtGui import QDesktopServices from PyQt5.QtNetwork import ...
#!/usr/bin/env python # ~*~ encoding: utf-8 ~*~ """ This file is part of SOCSIM. SOCSIM 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) an...
#!/usr/bin/python # -*- coding: utf-8 -*- # # This file is part of Calypso Server - Calendar Server # Copyright © 2009-2011 Guillaume Ayoub # # This library is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eith...
# This file contains tests that exercise multiple AST nodes from sympy.external import import_module from sympy.printing.ccode import ccode from sympy.utilities._compilation import compile_link_import_strings, has_c from sympy.utilities._compilation.util import TemporaryDirectory, may_xfail from sympy.utilities.pytest...
#! /bin/env python # # Protein Engineering Analysis Tool Structure Analysis (PEATSA) # Copyright (C) 2010 Michael Johnston & Jens Erik Nielsen # # Author: Michael Johnston # # 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 # th...
''' Splits Complete Genomics masterVar files into chromosome specific masterVar files when given an input file path and an output directory path. e.g. >python masterVar_chr_split.py -i /path/to/masterVar.tsv.bz2 -o /path/to/output_dir/ Python package dependencies: pandas, numpy python 2.7 for argparse module ''' ...
# Copyright (C) 2009 Alessandro Decina # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 3.0.0.11832 on 2017-03-22. # 2017, SMART Health IT. import io import json import os import unittest from . import appointment from .fhirdate import FHIRDate class AppointmentTests(unittest.TestCase): def instantiate_from(self, filename): ...