text
stringlengths
12
6.59M
# # TODO: Add support for vector. # import contextlib import llvm.core as lc import llvm.ee as le import llvm.passes as lp from llvm import LLVMException from . import shortnames as types ### # Utilities ### class FunctionAlreadyExists(NameError): pass def _is_int(ty): return isinstance(ty, lc.IntegerType)...
from __future__ import print_function import multiprocessing import pkgutil import pyclbr import subprocess import os import sys import warnings from docopt import docopt import dj_database_url from django import VERSION from django.utils import autoreload from django.conf import global_settings from django.conf impo...
import sys import logging import os.path import shlex import traceback import collections import tempfile import re import fnmatch import lldb from . import expressions from . import debugevents from . import disassembly from . import handles from . import terminal from . import formatters from . import PY2, is_string,...
import json import re from typing import Any, Callable, Optional from django.db import models from django.utils.functional import cached_property from django.utils.translation import gettext as _ import attr import jsonfield import corehq.motech.auth from corehq.motech.auth import ( AuthManager, BasicAuthMan...
# fetch courses and sections # This query should return all courses and sections active with a start date less # than six months from the current date. # Based on the dates for the terms courses and sections are made active # or inactive automatically. COURSES = ''' SELECT TRIM(jenzccd_rec.title) Co...
#!/usr/bin/env python # This is the refactored version for the benchmark script. Once this # is completely under test coverage, the original benchmark.py gets # turned into this, then this can be deleted. # TODO: Why are records over & underclumped? ie. Charles Linder 7475467, # Nirmala Ramanujam 7570988, Edwin L. Th...
#!/usr/bin/env python # # Load favorites for a Twitter user and output them to a file. # import os import twitter from time import sleep from sqlalchemy import desc from sqlalchemy.orm.exc import NoResultFound from myarchive.db.tables.file import TrackedFile from myarchive.db.tables.twittertables import RawTweet, Tw...
from django.db import models from django.utils.encoding import force_unicode from django.views.generic.edit import FormMixin, ModelFormMixin, UpdateView, CreateView, ProcessFormView, FormView from django.views.generic.base import TemplateView, View from django.views.generic import DetailView, ListView import django.fo...
#!/usr/bin/python def interrogator(path, search, query = 'any', show = 'words', exclude = False, case_sensitive = False, lemmatise = False, titlefilter = False, lemmatag = False, ...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from dmoj.executors.mono_executor import MonoExecutor class Executor(MonoExecutor): ext = '.cs' name = 'MONOCS' command = 'mono-csc' command_paths = ['mono-csc', 'dmcs', 'mcs', 'gmcs'] test_program = '''\ using System; class test { static void Main() { string line; while (!st...
#!/usr/bin/env python # again21.py measures the DS18B20 temperature. # uses moving averages # Wiring : # VIN = 01 - 3v3 # Data = 07 - GPIO04 # GND = 09 - GND import ConfigParser import glob # import math import os import sys import syslog import time import traceback from li...
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Christopher Lenz # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. from decimal import Decimal import doctest import os import unittest from couchdb import client, schema ...
#!/usr/bin/env python3 # daemon98.py file post-processor. import configparser import os import subprocess import sys import syslog import time import traceback from libdaemon import Daemon from random import randrange as rnd # constants DEBUG = False IS_JOURNALD = os.path.isfile('/bin/journalctl') MYID ...
#!/usr/bin/env python3 import sys import types import opcode if sys.version_info <= (2, 8, 0): raise Exception("3.x only") omap = opcode.opmap class Compiler: def __init__(self): self.co_consts = [] self.co_freevars = [] self.co_kwonlyargcount =[] self.co_lnotab = [] ...
# -*- coding: UTF-8 -*- # Copyright (C) 2008-2010 by Yung-Yu Chen. See LICENSE.txt for terms of usage. """ Definition of the structure of solvers. """ from ctypes import Structure from .gendata import TypeWithBinder class BaseSolverExedata(Structure): """ Execution information for BaseSolver. """ fr...
import numpy as np from solver.cache import DissimilarityMeasureCache def evaluate(individual): """Evaluates fitness value for given individual. Fitness value is calculated as sum of dissimilarity measures between each adjacent pieces. :params individual: One sample from population which fitness value is...
# TODO: properly handle enumerated nodes import os.path import sys #import xml.etree.ElementTree as ET import lxml.etree as ET from props import PropertyNode, root # internal xml tree parsing routine def _parseXML(pynode, xmlnode, basepath): merge = 'merge' in xmlnode.attrib exists = xmlnode.tag in pynode._...
#!/usr/bin/env python # # igcollect - process stat # # Copyright (c) 2016, InnoGames GmbH # from argparse import ArgumentParser from collections import namedtuple from re import compile from subprocess import check_output from time import time from platform import system def parse_args(): parser = ArgumentParser(...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from IPy import IP import os representers = [] def representer(fn): representers.append(fn) return fn @repr...
# 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...
from __future__ import absolute_import from django import forms from isisdata.models import * import rules class CCRelationForm(forms.ModelForm): subject = forms.CharField(widget=forms.HiddenInput()) object = forms.CharField(widget=forms.HiddenInput()) """We will set these dynamically in the rendered f...
#!/usr/bin/python -W ignore # Script based off of gcalcli to print a daily schedule from the calendar # Ryan Tucker <rtucker@gmail.com> import cups from datetime import * from dateutil.tz import * from dateutil.parser import * import gcalcli import miniweather import os import random import re import shelve import sy...
#/usr/bin/env python # Copyright (c) 2013, Carnegie Mellon University # All rights reserved. # Authors: Michael Koval <mkoval@cs.cmu.edu> # Authors: Siddhartha Srinivasa <siddh@cs.cmu.edu> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following c...
#!/usr/bin/python # # Copyright 2018-2020 Polyaxon, 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 ...
#!/usr/bin/env python """A systray app to set the JACK configuration from QjackCtl presets via DBus. """ import argparse import logging import os import sys os.environ['NO_AT_BRIDGE'] = "1" # noqa import gi gi.require_version('Gtk', '3.0') # noqa from gi.repository import Gtk, GObject from gi.repository.GdkPixbuf i...
#/usr/bin/env python # Copyright (c) 2013, Carnegie Mellon University # All rights reserved. # Authors: Michael Koval <mkoval@cs.cmu.edu> # Authors: Siddhartha Srinivasa <siddh@cs.cmu.edu> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following c...
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditio...
"""Useful commands for Jacquard development.""" import io import json import functools import itertools import contextlib from werkzeug.test import Client from jacquard.cli import main as run_command from jacquard.service import get_wsgi_app from jacquard.commands import BaseCommand, CommandError from jacquard.utils...
"""Base class for storage engine implementations.""" import abc import contextlib from .utils import TransactionMap class StorageEngine(metaclass=abc.ABCMeta): """ Base storage engine class. StorageEngine subclasses are required to be thread-safe. """ @abc.abstractmethod def __init__(self,...
#!/usr/bin/python2 """Downloads data from the National Water Model via HydroShare. The National Water Model is a series of model products from the National Weather Service which compute streamflow for roughly 2.7 million river reaches in the contiguous United States, where each river reach is a feature from the Nation...
import ast from jaspyx.ast_util import ast_load, ast_call, ast_store from jaspyx.context.class_ import ClassContext from jaspyx.visitor import BaseVisitor class Class(BaseVisitor): def visit_ClassDef(self, node): if len(node.bases) > 1: raise Exception('Multiple inheritance not supported') ...
# module pyparsing.py # # Copyright (c) 2003-2015 Paul T. McGuire # # 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 u...
# # Jasy - Web Tooling Framework # Copyright 2010-2012 Zynga Inc. # import polib, json import jasy.item.Abstract import jasy.core.Console as Console def getFormat(path): """ Returns the file format of the translation. One of: gettext, xlf, properties and txt """ if path: if path.endswith("....
from decimal import Decimal from django.conf import settings from django.db import transaction from django.utils.translation import ugettext as _ import stripe from corehq.apps.accounting.models import ( BillingAccount, CreditLine, CustomerInvoice, Invoice, LastPayment, PaymentRecord, Pre...
from __future__ import absolute_import from __future__ import unicode_literals import mock import uuid from datetime import datetime, timedelta from casexml.apps.case.mock import CaseFactory, CaseStructure from casexml.apps.case.tests.util import delete_all_cases from casexml.apps.case.xform import get_case_updates fro...
import datetime from django.utils.dateparse import parse_date from django.utils.translation import ugettext as _ from corehq.apps.es.case_search import case_property_query from eulxml.xpath.ast import serialize class XPathFunctionException(Exception): pass def date(node): assert node.name == 'date' if...
import errno import json import logging import os import os.path from collections import namedtuple from contextlib import contextmanager from datetime import datetime from memoized import memoized from sqlalchemy import ( Column, Index, Integer, String, Text, and_, bindparam, func, ...
""" A set of wrappers that return the JSON bodies you use to interact with the formplayer backend for various sets of tasks. This API is currently highly beta and could use some hardening. """ import json import socket from django.conf import settings from django.http import Http404 import requests from requests imp...
from __future__ import absolute_import import datetime import math import operator from collections import defaultdict, namedtuple from django.conf import settings from django.utils.translation import ugettext as _, ugettext_lazy, ugettext_noop from pygooglechart import ScatterChart import pytz from corehq import to...
from __future__ import absolute_import from __future__ import unicode_literals from datetime import datetime, timedelta from django.test import TestCase, SimpleTestCase from corehq.apps.domain.shortcuts import create_domain from corehq.apps.users.models import CommCareUser, DeviceAppMeta from corehq.form_processor.uti...
from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults from airflow.hooks.base_hook import BaseHook from airflow.plugins_manager import AirflowPlugin import cpgintegrate import requests import time class XComDatasetToCkan(BaseOperator): @apply_defaults def __init__(self, ...
""" Header- and Status-specific detail/definition messages Each should be in the form: HDR_HEADER_NAME = {'lang': u'message'} or STATUS_NNN = {'lang': u'message'} where HEADER_NAME is the header's field name in all capitals and with hyphens replace with underscores, NNN is the three-digit status code, lang' is a...
# Copyright (c) Anna Buhman. # # 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...
# Copyright (c) 2016 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from PyQt5.QtCore import QObject, pyqtSlot, pyqtProperty, pyqtSignal import UM.Settings from UM.Application import Application import cura.Settings ## The settingInheritance manager is responsible for checking each set...
# coding=utf-8 import logging import time class HarajsTime(object): """ Converting the string date to time using 'GMT'. """ tm_minute = 0 tm_hour = 0 tm_day = 0 tm_week = 0 tm_month = 0 tm_year = 0 lang = [ "دقيقه", # "minute" "ساعه", # "hour" "يوم", ...
from dataactcore.interfaces.db import GlobalDB from dataactcore.logging import configure_logging from dataactcore.models import lookups from dataactcore.models.validationModels import FieldType, RuleSeverity, RuleImpact from dataactvalidator.health_check import create_app def setup_validation_db(): """Create vali...
import os import json import collections import shutil from shutil import ignore_patterns import errno import datetime import time import sys import subprocess from subprocess import check_output import random import string import re import jwrite import electionUtils def copy(src, dest): try: shutil.copy...
# -*- coding: utf-8 -*- from time import sleep from requests import post, delete, get from django.core.exceptions import ObjectDoesNotExist from dbaas_credentials.models import CredentialType from physical.models import Host, Instance from util import get_credentials_for, exec_remote_command_host from base import Bas...
#!/usr/bin/env python ################################################################################# # Copyright 2018 ROBOTIS CO., 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 # # ...
import requests import json from getpass import getpass from datetime import datetime, timedelta """ Make sure to set a valid nodeID in line 55 before using! """ def _json_serial(obj): """JSON serializer for objects not serializable by default json code""" if isinstance(obj, datetime): serial = obj....
''' Created on Oct 24, 2016 @author: stefan ''' import requests import unittest import urllib class SKBRESTClient(): TRANSLATION_PATH = '1.0/skb/translation?' def __init__(self, url, usr=None, pwd=None): ''' :param url: URL of the SKB web service ''' self.url = url ...
#!/usr/bin/python # -*- coding: utf-8 -*- ''' Created on 07.04.2014 @author: heinz-peterlang ''' from weblyzard_api.model.parsers import XMLParser class XML2013(XMLParser): VERSION = 2013 SUPPORTED_NAMESPACE = 'http://www.weblyzard.com/wl/2013#' DOCUMENT_NAMESPACES = {'wl': SUPPORTED_NAMESPACE, ...
from __future__ import print_function from securityhandlerhelper import securityhandlerhelper dateTimeFormat = '%Y-%m-%d %H:%M' import arcrest from arcrest.agol import FeatureLayer from arcrest.agol import FeatureService from arcrest.ags import FeatureService from arcrest.hostedservice import AdminFeatureService fr...
""" Module to associate default readers to file extensions. The module reads an xml file to get the readers for each file extension. The readers are tried in order they appear when reading a file. """ ############################################################################ #This software was developed by the Univer...
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
""" Created on 26 Nov 2018 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) This version of MessageManager for AWS lambda function with multi-part response. Equivalent to cURL: curl "https://aws.southcoastscience.com/topicMessages?topic=unep/ethiopia/loc/1/climate &startTime=2018-12-13T07:03:59.712Z&endTim...
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
import struct from seabreeze.pyseabreeze.protocol import OOIProtocol, OBPProtocol from seabreeze.pyseabreeze.features._base import SeaBreezeFeature from seabreeze.pyseabreeze.features.eeprom import SeaBreezeEEPromFeatureOOI # Definition # ========== # class SeaBreezeNonlinearityCoefficientsFeature(SeaBreezeFeature):...
"""A notebook manager that uses mongodb for storage. Based on Travis Harrison's shocknbmanager and the azurenbmanager Authors: * Steve Chan <sychan@lbl.gov> """ #----------------------------------------------------------------------------- # Copyright (C) 2013 The KBase Project # # Distributed unspecified open s...
from __future__ import absolute_import, print_function import hashlib import hmac import logging from django.conf import settings from django.http import HttpResponse from django.views.generic import View from django.utils.crypto import constant_time_compare from email_reply_parser import EmailReplyParser from email....
import datetime import time from tdl.queue.processing_rules import ProcessingRules from tdl.queue.actions.publish_action import PublishAction from tdl.queue.transport.remote_broker import RemoteBroker class QueueBasedImplementationRunner: def __init__(self, config, deploy_processing_rules): self._config ...
from datetime import datetime import random import string from django.template.defaultfilters import timesince from django.utils.translation import ugettext as _ from django.template import Library from django.conf import settings from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.db....
"""Generic (shallow and deep) copying operations. Interface summary: import copy x = copy.copy(y) # make a shallow copy of y x = copy.deepcopy(y) # make a deep copy of y For module specific errors, copy.Error is raised. The difference between shallow and deep copying is only relev...
# Licensed under a 3-clause BSD style license - see LICENSE.rst __all__ = ['Constant'] class Constant(float): """A physical or astronomical constant. Objects of this class behave just like `float` values when used in expressions, but they contain additional information Attributes ---------- ...
from wires import * from models.post import Post from models.user import User from pdb import set_trace as debug def index(parameters): template = open('./templates/posts/index.html').read() posts = Post.all(Post.cxn, "posts") post_template = open('./templates/posts/show.html').read() rendered_posts ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Implements roations, including spherical rotations as defined in WCS Paper II [1]_ `RotateNative2Celestial` and `RotateCelestial2Native` follow the convention in WCS Paper II to rotate to/from a native sphere and the celestial sphere. The user inter...
# -*- 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 (...
# coding=utf-8 # Copyright (c) 2001-2016, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility an...
import os, sys from time import sleep import pyDMCC import bot.lib.lib as lib class Rail_Mover: def __init__(self): self.bot_config = lib.get_config() rail_motor_conf = self.bot_config["dagu_arm"]["rail_cape"]["rail_motor"] board_num = rail_motor_conf["board_num"] motor_num = ra...
# Copyright (c) 2021, Manfred Moitzi # License: MIT License from typing import Any, List from ezdxf.lldxf.tags import Tags from ezdxf.lldxf.types import render_tag from ezdxf.lldxf.loader import SectionDict from PyQt5.QtCore import QModelIndex, QAbstractListModel, Qt from PyQt5.QtGui import QStandardItemModel, QStand...
# Copyright (c) 2019-2022, Manfred Moitzi # License: MIT License from typing import TYPE_CHECKING, Optional import logging from ezdxf.lldxf import validator from ezdxf.lldxf.attributes import ( DXFAttr, DXFAttributes, DefSubclass, RETURN_DEFAULT, group_code_mapping, ) from ezdxf.lldxf.const import (...
from django.core.management.base import BaseCommand, CommandError from django.conf import settings from django.db import connection from protein.models import Protein from protein.models import ProteinFamily from protein.models import ProteinAlias from protein.models import ProteinSegment from protein.models import Pr...
# Copyright 2015 Metaswitch Networks # # 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 w...
import sublime, sublime_plugin import os, re, json, codecs, shutil, zipfile p = sublime.platform() version = sublime.version() v = version[0] ps = os.path.abspath(__file__).split(os.sep) pName = ps[-2] if '.' in pName: pName = os.path.splitext(pName)[0] pkgs = sublime.packages_path() if not pkgs: pkgs = os.sep.join...
import twstock def run(argv): print('四大買賣點判斷 Best Four Point') print('------------------------------') for sid in argv: bfp = twstock.BestFourPoint(twstock.Stock(sid)) bfp = bfp.best_four_point() print('%s: ' % (sid), end='') if bfp: if bfp[0]: p...
# -*- coding: utf-8 -*- # # ----------------------------------------------------------------------------------- # Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this softw...
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import Command, ICommand, IModuleData, ModuleData from txircd.utils import ModeType, timestamp from zope.interface import implements irc.RPL_CREATIONTIME = "329" class ModeCommand(ModuleData): implements(IPlugi...
# -*- coding: utf-8 -*- import datetime import json import xml.etree.ElementTree from openfisca_core import conv, legislations, legislationsxml from openfisca_france import init_country TaxBenefitSystem = init_country() def check_legislation_xml_file(year): legislation_tree = xml.etree.ElementTree.parse(TaxB...
from zope.interface import implements from twisted.trial import unittest from twisted.test import proto_helpers from twisted.internet import task, defer, endpoints, reactor from twisted.internet.interfaces import IStreamClientEndpoint, IReactorCore import psutil import subprocess from txtorcon import TorControlProtoco...
#!/usr/local/bin/env python # ============================================================================== # MODULE DOCSTRING # ============================================================================== """ MultistateSampler ================= Base multi-thermodynamic state multistate class COPYRIGHT Current ...
import numpy import chainer from chainer import cuda from chainer import function from chainer.functions.activation import lstm from chainer.functions.array import concat from chainer.functions.array import reshape from chainer.functions.array import split_axis from chainer.functions.array import stack from chainer.fu...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from __future__ import with_statement from twisted.python import log from twisted.internet import defer from twisted.internet.interfaces import IProtocolFactory from twisted.internet.error import ConnectionDone from t...
# -*- coding: utf-8 -*- # Copyright (c) 2010-2012, GEM Foundation. # # OpenQuake 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....
import signal import time import tornado.httpserver import tornado.ioloop from django.core.management.base import BaseCommand, CommandError from chat.tornado_chat import app class Command(BaseCommand): help = 'Starts the Tornado application for message handling.' def sig_handler(self, sig, frame): ...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2019, GEM Foundation # # OpenQuake 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, ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import can from brave_new_world.constants import * from brave_new_world.canopen_msgs.msg import CanOpenMessage from brave_new_world.canopen_msgs.cob import CanOpenId class CanOpenMessageSdoError(CanOpenMessage): """docstring for CanOpenMessageSdoError""" def __...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2014-2016 GEM Foundation # # OpenQuake 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 Licen...
### author: alessio.marcozzi@gmail.com ### version: 2019_10 ### licence: MIT ### requires Python >= 3.6 from Bio import pairwise2, Entrez, SeqIO from Bio.SubsMat import MatrixInfo as matlist from Bio.Blast.Applications import NcbiblastnCommandline from Bio.Blast import NCBIXML import tensorflow as tf from urllib.r...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2014-2018 GEM Foundation # # OpenQuake 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 Licen...
from unittest.mock import patch from django.test import TestCase from derrida.books.models import Reference, Instance from derrida.books.search_indexes import ReferenceIndex class TestReferenceIndex(TestCase): fixtures = ['test_references.json'] def setUp(self): '''None of the Instacefixtures have sl...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
#!/usr/bin/env python # -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2020 Daniel Schick # # 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 with...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2015-2021 GEM Foundation # # OpenQuake 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 Licen...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2012-2018 GEM Foundation # # OpenQuake 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 Licen...
import numpy as np import emcee from astropy.time import Time from datetime import datetime, timedelta from astropy.coordinates import Longitude, SkyCoord from astropy import units as uts from astropy.coordinates import AltAz from astropy.coordinates import EarthLocation import astropy.units as u from skyfield.api im...
# -*- coding: utf-8 -*- """ Created on Mar 13, 2014 @author: StarlitGhost """ from twisted.plugin import IPlugin from desertbot.moduleinterface import IModule from desertbot.modules.commandinterface import BotCommand from zope.interface import implementer from desertbot.message import IRCMessage from bs4 import Beau...
""" This command creates a demo database for Devilry. See dev_autodb.readme.md for more info. """ import logging from datetime import datetime, timedelta from django.core.management.base import BaseCommand from django.core import management from optparse import make_option from devilry.utils.command import setup_loggi...
"""ClientRepository module: contains the ClientRepository class""" from PandaModules import * from TaskManagerGlobal import * from MsgTypes import * from ShowBaseGlobal import * import Task import DirectNotifyGlobal import ClientDistClass import CRCache import Datagram # The repository must import all known types of D...