text
stringlengths
17
737k
""" Copyright 2017-2018 Fizyr (https://fizyr.com) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in w...
# -*- coding: utf-8 -*- # © 2004-2011 - Pexego Sistemas Informáticos - Luis Manuel Angueira Blanco # © 2013 - Acysos S.L. - Ignacio Ibeas (Migración a v7) # © 2014-2016 - Serv. Tecnol. Avanzados - Pedro M. Baeza # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import fields, models, ap...
# Copyright 2021 Alfredo de la Fuente - AvanzOSC # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models class EventRegistration(models.Model): _inherit = 'event.registration' partner_bank_acc_id = fields.Many2one( string='Partner bank account', ...
import collections.abc import numpy import cupy from cupy import _core from cupy._core import internal from cupy._core._gufuncs import _GUFunc from cupy.linalg._solve import inv _gu_func_matmul = _GUFunc( _core.matmul, '(n?,k),(k,m?)->(n?,m?)', supports_batched=True) def matmul(x1, x2, out=None, *, axes=None)...
# coding: utf-8 from __future__ import unicode_literals, division import math # New QChem job module import os import shutil import copy import subprocess import numpy as np from pymatgen.core import Molecule from pymatgen.io.qchem.inputs import QCInput from pymatgen.io.qchem.outputs import QCOutput, check_for_stru...
import json import logging from twisted.internet import defer from zope.interface import ( implements, Interface, ) logger = logging.getLogger(__name__) class IJobSource(Interface): def getBoardList(): """Get the list of currently configured board names.""" def getJobForBoard(board_na...
from collections import namedtuple from telegram import InlineKeyboardButton, InlineKeyboardMarkup, ParseMode, Update from telegram.error import BadRequest from telegram.ext import CommandHandler, RegexHandler, run_async, Filters, MessageHandler, CallbackContext import const import util HINTS = { '#inline': { ...
#!/usr/bin/python # # AutoNBI.py - A tool to automate (or not) the building and modifying # of Apple NetBoot NBI bundles. # # Requirements: # * OS X 10.9 Mavericks - This tool relies on parts of the SIUFoundation # Framework which is part of System Image Utility, found in # /System/Library/CoreServices in Ma...
import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SITE_ROOT = os.path.dirname(BASE_DIR) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.9/howto/deployment/che...
import re from queue import Queue from typing import List WHITESPACE = ['\n', '\t', ' ', '', '\u3000'] # from helpers.constants import WHITESPACE def split_keep_whitespace(string): """ Splits the string on whitespace, while keeping the tokens on which the string was split. Args: string: The ...
from typing import NamedTuple from lexos.models.filemanager_model import FileManagerModel from lexos.receivers.base_receiver import BaseReceiver class KMeansOption(NamedTuple): """The typed tuple to hold kmeans options.""" n_init: int # number of iterations with different centroids. k_value: int # k val...
from cog.models import * from django.forms import ModelForm, ModelMultipleChoiceField, NullBooleanSelect from django.db import models from django.contrib.admin.widgets import FilteredSelectMultiple from django import forms from django.forms import ModelForm, Textarea, TextInput, Select, FileInput, CheckboxSelectMultipl...
import datetime import locale import os import sys from copy import deepcopy from io import BytesIO import pytils import simplejson from django.utils import timezone, dateformat from reportlab.lib import colors from reportlab.lib.enums import TA_CENTER, TA_JUSTIFY, TA_LEFT, TA_RIGHT from reportlab.lib.pagesizes import...
# -*- coding: utf-8 -*- #BEGIN_HEADER import os import sys import shutil import hashlib import subprocess import requests requests.packages.urllib3.disable_warnings() import re import traceback import uuid from datetime import datetime from pprint import pprint, pformat import numpy as np from Bio import SeqIO from ...
# -*- coding: utf-8 -*- #BEGIN_HEADER from __future__ import print_function from __future__ import division import os import sys import shutil import hashlib import subprocess import requests requests.packages.urllib3.disable_warnings() import re import traceback import uuid from datetime import datetime from pprint i...
import collections import gc import itertools import os import sys import tarfile import numpy as np from numpy.lib import recfunctions as nprf from scipy.stats import mstats import libio #============================================================================== # General-purpose MCMC diagnostic and summarizati...
# Project name PROJECT_NAME = "claims-processing-dev" # Attributes not required from specialized parser raw json NOT_REQUIRED_ATTRIBUTES_FROM_SPECIALIZED_PARSER_RESPONSE = ["textStyles", "textChanges", "revisions", "pages.image"] # GCS temp folder to store a...
# generally try not to import things up here import re, base64, string from framework.log import log def try_f(f, data, default=None): try: return f(data) except Exception, e: return default def dictsort(value, arg): """ Takes a list of dicts, returns that list sorted by the proper...
import numpy.linalg import numpy.random import scipy.stats import scipy.io import argparse import numpy import math import sys import os import os.path import matplotlib.mlab as mlab import matplotlib.pyplot as plt from scipy.interpolate import interp1d import basicutils ###########################################...
import collections import glob import logging import os from pprint import pformat import time import uuid from deploy.servctl_utils.other_command_utils import check_kubernetes_context, set_environment, get_disk_names from deploy.servctl_utils.kubectl_utils import is_pod_running, get_pod_name, get_node_name, run_in_po...
# # Copyright (c) 2004-2005 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.opensource.org...
#!/usr/bin/env python # coding=utf-8 ######################################################################################### # # Installer for spinal cord toolbox. # # This script will install the spinal cord toolbox under and configure your environment. # Must be run as a non-administrator (no sudo). # Installation...
# Licensed under the MIT License - see LICENSE.rst """ Launch a batch of hyak runs """ from __future__ import (absolute_import, division, print_function, unicode_literals) import os submit_template = """#!/bin/bash ## -------------------------------------------------------- ## NOTE: to submit ...
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import time import shutil import logging import threading import Queue from lib.cuckoo.common.config import Config from lib.cuckoo.common.co...
''' Created on 15. Sep. 2016 @author: chof ''' import json import os from git import Repo from dbversions import astring, getResourcePath, VERBOSITY import logging class Config(object): ''' classdocs The configuration class takes the project path to initialize the repo and also the configurat...
from __future__ import print_function, absolute_import, division import warnings import numpy as np from numpy.ma.core import nomask from astropy import convolution from astropy import units as u from astropy import wcs #from astropy import log from astropy.io.fits import Header, Card, HDUList, PrimaryHDU from radio...
import sys, threading from operator import attrgetter from itertools import count, ifilter, ifilterfalse, izip try: from pony.thirdparty import etree except ImportError: etree = None import pony.db from pony import options, dbschema, sqlbuilding from pony.db import LongStr, LongUnicode from pony.utils impor...
from datetime import date, datetime from database import (Friendship, PopularPath, Route, Session, SQLAlchemySession, User, Waypoint) db = SQLAlchemySession() # Add some users colin = User(name='Colin Chan') ben = User(name='Benjamin Woodruff') ron = User(name='Ron Paul') mitt = User(name='Mitt...
#!/usr/bin/env python # -*- coding: utf-8 -*- #*************************************************************************** #* * #* Copyright (c) 2015 Yorik van Havre <yorik@uncreated.net> * #* ...
""":py:mod:`postgres` is a high-value abstraction over `psycopg2`_. Installation ------------ :py:mod:`postgres` is available on `GitHub`_ and `PyPI`_:: $ pip install postgres Tutorial -------- Instantiate a :py:class:`Postgres` object when your application starts: >>> from postgres import Postgres ...
#!/usr/bin/env python3 import sys import io import os import time from time import sleep import numpy import matplotlib from PIL import Image from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from pyqt import FreakingQtImageViewer from skimage import color #from skimage import dat...
import re offensive = re.compile( r"\b(deaths?|dead(ly)?|die(s|d)?|hurts?|(sex(ual)?|child)[ -]?(abuse|trafficking|assault)|" r"injur(e|i?es|ed|y)|kill(ing|ed|er|s)?s?|wound(ing|ed|s)?|fatal(ly|ity)?|shoo?t(s|ing|er)?s?|" r"crash(es|ed|ing)?|attack(s|ers?|ing|ed)?|murder(s|er|ed|ing)?s?|hostages?|rap(e|es|...
# -*- coding:utf-8 -*- import os BASEDIR = os.path.dirname(os.path.abspath(__file__)) from flask import Flask, g, request, redirect from flask.ext.turbolinks import turbolinks from gather.extensions import db, assets, mail, cache from gather.settings import load_settings from gather.filters import sanitize, get_site...
# Copyright (C) 2010 Linaro Limited # # Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org> # # This file is part of Launch Control. # # Launch Control is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License version 3 # as published by the Free Software F...
from django.contrib import messages from django.utils.translation import ugettext_lazy as _ from django.views import generic from adhocracy4.filters import filters as a4_filters from adhocracy4.modules import views as module_views from adhocracy4.rules import mixins as rules_mixins from apps.contrib import filters fro...
# -*- coding: utf-8 -*- from ooni.oonibclient import OONIBClient from ooni.nettest import NetTestLoader from ooni.settings import config from ooni.utils import log from ooni import errors as e from twisted.python.filepath import FilePath from twisted.internet import defer import os import yaml import json from hashl...
#!/usr/bin/env python3 from autobahn.asyncio.websocket import WebSocketServerProtocol, WebSocketServerFactory import asyncio import json import random import time WORKERS_SERVER_IP = '0.0.0.0' WORKERS_SERVER_PORT = 12121 COMMANDERS_SERVER_IP = '0.0.0.0' COMMANDERS_SERVER_PORT = 21212 MAX_PONG_TIME = 3 # Seconds PING_I...
#! /usr/bin/python """ Pretty print TeXcount output """ import argparse import os import shlex import subprocess import time class Colours(object): """ ANSI code from https://wiki.archlinux.org/index.php/Color_Bash_Prompt Change '\e' to '\x1b' """ # Reset Reset = '\x1b[0m' # Text Reset...
#!/usr/bin/env python3 # Copyright 2020 The Pigweed 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
""" A string is simply an ordered collection of symbols selected from some alphabet and formed into a word; the length of a string is the number of symbols that it contains. An example of a length 21 DNA string (whose alphabet contains the symbols 'A', 'C', 'G', and 'T') is "ATGCTTCAGAAAGGTCTTACG." Given: A DNA strin...
# -*- coding: utf-8 -*- # # Copyright (c) 2010 Cidadanía Coop. # Written by: Oscar Carballal Prego <info@oscarcp.com> # # This file is part of e-cidadania. # # e-cidadania 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...
#!/usr/bin/python from sys import argv import codecs print "Start." if len(argv) < 5: print "Usage : " + argv[0] + " CoordinatesFilename LocationNamePrefix countryName CityName" print "Example : ./gen_jv_xml.py raw.txt FakePrefix Taiwan Taipei" print "NOTE : In the input file raw.txt, lines prefix with '#...
# Copyright 2020 The Meson development team # 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 ...
#!/usr/bin/env python3 # Copyright 2020 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=line-too-long """Runs unit tests on device and displays the results. This script assumes you have a ~/.servodrc...
import os from pkg_resources import resource_filename import yaml import numpy as np import holoviews as hv from bokeh.application.handlers import FunctionHandler from bokeh.application import Application from bokeh.io import show, curdoc from bokeh.layouts import layout from bokeh.models import Slider, Button, TextIn...
from __future__ import print_function, unicode_literals, absolute_import import httplib import logging import time from urlparse import urljoin from .http import get_http_session logger = logging.getLogger(__name__) class OpenshiftException(Exception): """ OpenShift didn't respond with OK (200) status """ ...
# tree.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php from git.util import join_path import git.diff as diff from gitdb.util import to_bin_sha from . import ...
# Copyright (C) 2010,2011 Chris Lalancette <clalance@redhat.com> # 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; # version 2.1 of the License. # This library is distributed in the hope...
"""The data models used in ARL are: .. image:: ./ARL_data.png :scale: 75 % The principle transitions between the data models: .. image:: ./ARL_transitions.png :scale: 75 % .. note:: There are two visibility formats: :class:`BlockVisibility` is conceived as an ingest and calibration format. The visibi...
""" desitarget.sv1.sv1_cuts ======================= Target Selection for DESI Survey Validation derived from `the SV wiki`_. A collection of helpful (static) methods to check whether an object's flux passes a given selection criterion (*e.g.* LRG, ELG or QSO). .. _`the Gaia data model`: https://gea.esac.esa.int/arch...
#!/usr/bin/python import argparse import pyalpm from pycman import config import os, shutil import datetime import pygit2 from version import __version__ """ This module is a part of PacBackup. It backs up the package list along with a scipt allowing easy recovery. """ def sanitize_path(path): return os.path...
#!/usr/bin/env python import rospy from flexbe_msgs.msg import * from rospkg import RosPack import pickle import zlib import difflib import os import yaml import xml.etree.ElementTree as ET class BehaviorLauncher(object): def __init__(self): self._sub = rospy.Subscriber("/flexbe/request_behavior", BehaviorReques...
#!/usr/bin/python # -*- coding: utf-8 -*- # This bot looks through a page, and checks for links, if a link is found it # searches for the link on wikibooks, if it's not found there it looks on # wikipedia, then finally if nothing is found there, it removes the link, this # is fairly site specific, and then very use...
""" @file PersonMenu.py @author Brian Kim @brief defines the command-line interface for the person menu """ from inv.model.Permissions import Permissions from inv.model.Person import Person from inv.model.PersonGroup import PersonGroup from common import * class PersonMenu(): class Delegate(): """ ...
"""Staff views""" import csv import datetime import json import logging import collections import traceback import webapp2 import urllib from google.appengine.ext import ndb from google.appengine.api import search from google.appengine.ext import blobstore from google.appengine.ext.webapp import blobstore_handlers ...
"""Octet Encoding Rules (OER) codec. """ import binascii from copy import copy import struct from operator import attrgetter from ..parser import EXTENSION_MARKER from . import EncodeError from . import DecodeError from . import format_or from . import compiler from .compiler import enum_values_as_dict from .ber imp...
#!/usr/bin/env python # -*- coding: utf-8 -*- ## ## Author: Adriano Monteiro Marques <adriano@umitproject.org> ## Author: Diogo Pinheiro <diogormpinheiro@gmail.com> ## ## Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA ## ## This program is free software: you can redistribute it and/or modify...
from .base import * from .commands import * from .command import * from .cybrowser import * from .session import * from .network import * import copy class cyclient(object): """ A CyREST client. :param host: CyREST host server address. default='localhost' :param port: CyREST port number. default=1234 ...
#!/usr/bin/env python import requests import sys import xml.dom.minidom #URI of the feed URI = sys.argv[1] if len(sys.argv) > 1 else 'http://www.npr.org/rss/rss.php?id=1019' #URI = 'http://www.npr.org/rss/rss.php?id=1019' #if len(sys.argv) > 1: #URI = sys.argv[1] #get feed data source request = requests.get(URI,...
# -*- coding: utf-8 -*- """ Display and control a Pomodoro countdown. Configuration parameters: - display_bar: display time in bars when True, otherwise in seconds - display_bar_and_time: display time in bar and seconds when True - display_mmss: display time in hh:mm:ss format - max_breaks: maximum num...
"""Predefined robot models. These models correspond to the Modified Denavit–Hartenberg parameters (https://en.wikipedia.org/wiki/Denavit%E2%80%93Hartenberg_parameters#Modified_DH_parameters) """ import numpy as np # type: ignore def kuka_lbr_iiwa_7() -> np.ndarray: # pragma: no cover """Get KUKA LBR iiwa 7 MDH...
#!/usr/bin/env python # encoding: utf-8 # Copyright © 2008-2010, Tom Adams # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVID...
import unittest from receiver.models import * from receiver import submitprocessor from organization.models import Domain class ProcessingTestCase(unittest.TestCase): def setup(self): print "ProcessingTestCase.Setup()" # attaches = Attachment.objects.all() # for attach in ...
#!/usr/bin/env python import geoalchemy2 as ga2 from flask import abort from flask.ext.sqlalchemy import SQLAlchemy from oauth2client.client import * from sqlalchemy import MetaData, Table, Column, ForeignKey, Enum, BigInteger, Integer, String, Index, UniqueConstraint, \ Float from sqlalchemy.dialects.postgresql i...
#!/usr/bin/env python # coding=utf-8 """ translate.py - Jenni Translation Module Copyright 2011, Michael Yanovich, yanovich.net Licensed under the Eiffel Forum License 2. More info: * Jenni: https://github.com/myano/jenni/ * Phenny: http://inamidst.com/phenny/ """ import re, urllib import web def translate(text, i...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
# Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 import locale import logging import os import re import shlex import signal import subprocess import time from pathlib import Path import serial log = logging.getLogger(_...
#!/usr/bin/env python import collections import ctypes import glob import logging import os import Queue import re import socket import simplejson as json import struct import sys import threading import time import couchstore import memcacheConstants import pump SFD_SCHEME = "couchstore-files://" SFD_VBUCKETS = 102...
import os, sys file_dir = os.path.dirname(os.path.abspath(__file__)) root = file_dir + '/..' sys.path.insert(0, root) from led_displays_searching_recognition.led import LedDisplaysRecognizer from handwritten_digit_recognition.classifier import HandwrittenDigitClassifier from number_searching.grid_recognition import num...
# # Copyright (c) 2005 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.opensource.org/licen...
''' Create Packs, like Zicbee Pack (at http://pypi.python.org/zicbee). Inspired by zicbee-workshop's manage.py ''' import os import sys import glob import shutil import platform from pyg.log import logger from pyg.req import Requirement from pyg.web import highest_version from pyg.inst import Bundler from pyg.utils i...
#------------------------------------------------------------------------------ # Copyright (C) 2007 Richard W. Lincoln # # 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; version 2 dated June, 19...
#!/usr/bin/env python """Utilities for common tasks needed to use lime framework. """ import optparse import subprocess import logging import sys import os.path import zipfile import re import shutil import fileinput import mimetypes from os.path import join, splitext, split, exists from shutil import copyfile from d...
## Copyright 2015-2018 Tom Brown (FIAS), Jonas Hoersch (FIAS) ## This program is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 3 of the ## License, or (at your option) any later version. ## T...
import time from emuvim.test.base import SimpleTestTopology from emuvim.dcemulator.resourcemodel import BaseResourceModel, ResourceFlavor class testResourceModel(SimpleTestTopology): def testBaseResourceModelApi(self): r = BaseResourceModel() # check if default flavors are there assert(le...
"""Lattice module. In this module the lattice of the corresponding accelerator is defined. """ import math as _math import pyaccel as _pyaccel from . import segmented_models as _segmented_models energy = 0.150e9 # [eV] default_optics_mode = 'M1' class LatticeError(Exception): """LatticeError class.""" pa...
import fiona from shapely import wkt, geometry from wq.io.loaders import FileLoader from wq.io.parsers.base import BaseParser from wq.io.mappers import TupleMapper class FionaLoaderParser(FileLoader, BaseParser): """ Composite loader & parser mixin for GIS data, powered by Fiona """ layer_id = None ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from apiclient import errors from base import GDBase import logging logger = logging.getLogger() logger.setLevel(logging.ERROR) from gdcmdtools.auth import GDAuth import requests import re import os import json import pprint export_format = { "application/vnd.googl...
#!/usr/bin/python import numpy as np from numpy.random import random,dirichlet from scipy.cluster import vq from scipy.linalg import eig from util import logsum, log_like_Gauss, num_param_Gauss, normalize from sampling import sample_gaussian # import C extension module try: import _hmmc extC_imported = True ...
# coding=utf-8 """ Module holding batch processing for Earth Engine """ import ee import ee.data from . import tools import os import functools import traceback import time if not ee.data._initialized: ee.Initialize() def recrusive_delete_asset(assetId): try: content = ee.data.getList({'id':assetId})...
import os from . import PYSIDE, PYSIDE2, PYQT4, PYQT5 from .QtWidgets import QComboBox if PYQT5: from PyQt5.uic import * elif PYQT4: from PyQt4.uic import * else: __all__ = ['loadUi', 'loadUiType'] # In PySide, loadUi does not exist, so we define it using QUiLoader, and # then make sure we ...
## $Id$ ## BibRank word frequency indexer utility. ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 CERN. ## ## CDS 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 Founda...
import os, glob import simplejson import web import cgitb cgitb.enable(format='text') DATA_DIR = '../data/load' db = web.database(dbn=os.environ.get('DATABASE_ENGINE', 'postgres'), db='watchdog_dev') def unidecode(d): newd = {} for k, v in d.iteritems(): newd[k.encode('utf8')] = v return newd def...
#!/usr/bin/env python # encoding: utf-8 import sys, os from glob import glob from interfaces import DocType import general from yapsy.PluginManager import PluginManager from doctype import * class Manager(object): def __init__(self, key, extList): self.key = key self.extList = extList se...
from xmlrpc.client import ServerProxy import click from packaging.version import parse import requests class QyPI: def __init__(self, index_url): self.index_url = index_url self.s = None self.xsp = None self.pre = False self.newest = False self.errmsgs = [] ...
#! /usr/bin/env python """ Main execution script for fMRI analysis in the Lyman ecosystem. """ import os import re import sys import time import shutil import os.path as op import matplotlib as mpl mpl.use("Agg") from nipype.pipeline.engine import Node from nipype.interfaces.io import DataGrabber, DataSink from nipyp...
''' Entry point module (keep at root): Used to run with tests with unittest/pytest/nose. ''' import os try: xrange except: xrange = range def main(): import sys # Separate the nose params and the pydev params. pydev_params = [] other_test_framework_params = [] found_other_test_framewor...
""" Unit tests for Onsager calculator for vacancy-mediated diffusion. """ __author__ = 'Dallas R. Trinkle' # TODO: add the five-frequency model as a test for FCC; add in BCC # TODO: additional tests using the 14 frequency model for FCC? import unittest import onsager.FCClatt as FCClatt import onsager.KPTmesh as KPTm...
from bs4 import BeautifulSoup from django.core.mail import send_mail from django.conf import settings from django.template.loader import render_to_string from .models import TaskList, RegionData from datetime import datetime import requests def validate(db_value, response_value): if db_value.lower() in response_v...
from __future__ import division import networkx import sympy import re import copy import numpy import sympy.parsing.sympy_parser import itertools import matplotlib.pyplot as plt import pysb import csv from pysb.integrate import odesolve from matplotlib.font_manager import FontProperties def parse_name(spec): m ...
__docformat__ = 'restructuredtext' import numpy as N from neuroimaging.utils.odict import odict from neuroimaging.data_io.datasource import DataSource from neuroimaging.data_io.formats import utils, binary, analyze from neuroimaging.data_io.formats.nifti1_ext import quatern2mat, \ mat2quatern from neuroimaging.c...
# remote.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php # Module implementing a remote object allowing easy access to git remotes import re import os from ....
from django.db import models class NotaFiscal(models.Model): # campos importados numero = models.IntegerField(unique=True, verbose_name='número') ativa = models.BooleanField(default=True) faturamento = models.DateTimeField(null=True, blank=True) cod_status = models.IntegerField( null=True,...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2014 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
# Copyright 2012-2015 MongoDB, 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 writin...
# -*- 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...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2014-2017 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...
{ "targets": [{ "variables": { "gcc_version%": "unknown", # Define if it's not defined already. }, "target_name": "cares_wrap", "include_dirs": [ "<!(node -e \"require('nan')\")", "deps/cares/include", "deps/cares/src", "dep...
"""reddit OAuth drop-in. reddit API docs: https://github.com/reddit-archive/reddit/wiki/API https://www.reddit.com/dev/api https://www.reddit.com/prefs/apps praw API docs: https://praw.readthedocs.io/en/v3.6.0/pages/oauth.html """ import logging from google.cloud import ndb import praw from webob import exc from . ...
# -*- 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...