text
stringlengths
17
737k
{ 'target_defaults': { 'default_configuration': 'Release', 'configurations': { 'Release': { 'xcode_settings': { 'GCC_OPTIMIZATION_LEVEL': '3', }, }, }, }, 'targets': [ { 'target_name': 'isolated_vm', 'cflags_cc': [ '-std=c++14', '-g', '-Wno-unknown-pragmas' ], 'cflags_cc!': [ '-fn...
{ 'targets': [ { 'target_name': 'keytar', 'include_dirs': [ '<!(node -e "require(\'nan\')")' ], 'sources': [ 'src/main.cc', 'src/keytar.h', ], 'conditions': [ ['OS=="mac"', { 'sources': [ 'src/keytar_mac.cc', ], 'link_...
# -*- 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...
{ 'includes': [ 'common.gypi' ], 'targets': [ { 'target_name': 'action_before_build', 'type': 'none', 'hard_dependency': 1, 'actions': [ { 'action_name': 'run_protoc', 'inputs': [ './proto/index.proto' ], 'outputs': [ ...
# -*- coding: utf-8 -*- import os from datetime import datetime from ChatExchange.chatexchange.client import Client import HTMLParser import md5 import ConfigParser from helpers import environ_or_none class GlobalVars: false_positives = [] whitelisted_users = [] blacklisted_users = [] ignored_posts =...
#!/usr/bin/python import os, sys, re, shutil, unittest, doctest WITH_CYTHON = True from distutils.dist import Distribution from distutils.core import Extension from distutils.command.build_ext import build_ext distutils_distro = Distribution() TEST_DIRS = ['compile', 'errors', 'run', 'pyregr'] TEST_RUN_DIRS = ['run...
{ 'targets': [ { 'target_name': 'kerberos', 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [ '-fno-exceptions' ], 'include_dirs': [ '<!(node -e "require(\'nan\')")', '/usr/include/mit-krb5' ], 'conditions': [ ['OS=="mac"', { 'sources': [ 'lib/kerberos.cc', 'l...
#!/usr/bin/env python3 # # XGL # # Copyright (C) 2014 LunarG, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to use, cop...
# Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import print_function from collections import defaultdict from astropy.table import Table from ..query import BaseQuery from ..utils import async_to_sync from . import conf __all__ = ['Dace', 'DaceClass'] class ParseException(Exception):...
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
import os import traceback from Queue import Queue from UserDict import UserDict import time import thread import datetime from django_git.management.commands.git_pull_utils.change_notifier import ChangeNotifier from iconizer.gui_client.notification_service_client import NotificationServiceClient from libtool import fo...
#!/usr/bin/python import os, sys, re, json, shutil from subprocess import Popen, PIPE, STDOUT exec(open(os.path.expanduser('~/.emscripten'), 'r').read()) sys.path.append(EMSCRIPTEN_ROOT) import tools.shared as emscripten EMSCRIPTEN_SETTINGS = { 'SKIP_STACK_IN_SMALL': 1, 'INIT_STACK': 0, 'AUTO_OPTIMIZE': 0, ...
from datetime import datetime from django.db import models from django.db.models.signals import post_save from odk_dropbox.models import Submission from odk_dropbox import utils class GPS(models.Model): latitude = models.FloatField() longitude = models.FloatField() altitude = models.FloatField() accura...
from django.core.mail import send_mail from django.forms import model_to_dict import json import logging import os from copy import deepcopy from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render, render_to_response, redirect from django.template import Context, Template, Request...
from _ast import In from django.core.mail import send_mail from django.forms import model_to_dict import json import logging import os from copy import deepcopy from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render, render_to_response, redirect from django.template import Conte...
import logging import os import threading import onedrivesdk.error from bidict import loosebidict from inotify_simple import flags as _inotify_flags, masks as _inotify_masks, INotify as _INotify from .od_tasks import delete_item, move_item, merge_dir, update_mtime, upload_file from .od_models.path_filter import PathF...
""" .. _intro_basic_tracking: ============================== Introduction to Basic Tracking ============================== Local fiber tracking is an approach used to model white matter fibers by creating streamlines from local directional information. The idea is as follows: if the local directionality of a tract/p...
""" birthday.py Author: Nils Kingston Credit: Roger Assignment: Your program will ask the user the following questions, in this order: 1. Their name. 2. The name of the month they were born in (e.g. "September"). 3. The year they were born in (e.g. "1962"). 4. The day they were born on (e.g. "11"). If the user's bir...
# import math # # import constants # from lib.connectwise_py.connectwise.ticket import Ticket # from lib.connectwise_py.connectwise.time_entry import TimeEntry # from .system_report import SystemReport from .connectwise import Connectwise class Product: def __init__(self, **kwargs): for kwarg in kwargs: ...
# -*- coding: utf-8 -*- """ License Copyright (C) 2013 YunoHost This program 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 l...
import os import logging from django.conf import settings from uw_sws.dao import SWS_DAO from userservice.user import UserService from myuw.models import User from uw_pws import PWS logger = logging.getLogger(__name__) def get_netid_of_current_user(): user_service = UserService() logger.info("original_user=...
import os if not os.path.exists("temp"): os.mkdir("temp") def add_pi_obj_func_test(): import os import pyemu pst = os.path.join("utils","dewater_pest.pst") pst = pyemu.optimization.add_pi_obj_func(pst,out_pst_name=os.path.join("temp","dewater_pest.piobj.pst")) print(pst.prior_information.loc["...
import argparse import logging import os import pickle import re import sys import time from multiprocessing.connection import Client from pathlib import Path from urllib import parse as urlparse import requests from Pegasus.command import Command, CompoundCommand, LoggingCommand from Pegasus.db.ensembles import Ense...
from __future__ import absolute_import, division, print_function import logging; _L = logging.getLogger('openaddr.process_one') from urllib.parse import urlparse from os.path import join, basename, dirname, exists, splitext, relpath from shutil import copy, move, rmtree from argparse import ArgumentParser from os impo...
""" Module for declaration of common constants available throughout Open Civic Data code. """ DIVISION_ID_REGEX = r'^ocd-division/country:[a-z]{2}(/[^\W\d]+:[\w.~-]+)*$' JURISDICTION_ID_REGEX = r'^ocd-jurisdiction/country:[a-z]{2}(/[^\W\d]+:[\w.~-]+)*/\w+$' # helper for making options-only lists _keys = lambda allopt...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 import time import pygsm import Queue from rapidsms.message import Message from rapidsms.connection import Connection from rapidsms.backends import Backend import backend from rapidsms import log from rapidsms import utils POLL_INTERVAL=2 # num secs ...
# Copyright 2007, 2008 Owen Taylor # # This file is part of Reinteract and distributed under the terms # of the BSD license. See the file COPYING in the Reinteract # distribution for full details. # ######################################################################## import gobject import gtk import re from shell_...
import saliweb.backend import logging, os import shutil from random import randint,choice import string, re import subprocess class Stage(object): """Keep track of where we are in a multi-stage job. The current stage of the job is stored in a file in the job directory.""" filename = 'stage.out' @c...
# -*- coding: utf-8 -*- """Preprocessor functions for use by tabular data outputs.""" from decimal import Decimal from cli_helpers import utils from cli_helpers._compat import text_type def convert_to_string(data, headers, **_): """Convert all *data* and *headers* to strings. Binary data that cannot be dec...
# -*- coding: utf-8 -*- # # Copyright (©) 2010-2013 Estêvão Samuel Procópio # Copyright (©) 2010-2013 Gustavo Noronha Silva # # This program 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 ver...
def plotter(title, df, x_label = False, y_label = False, style = 'ggplot', figsize = (13, 6), save = False, legend = 'best', num_to_plot = 7, tex = 'try', subplots = False, **kwargs): ...
#!/usr/bin/python # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
######## # Copyright (c) 2015 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...
"""Main Module of knex Defines API points and starts the application """ import time import uuid import json import json5 from flask import request, jsonify, make_response, g, Blueprint from pymongo.collection import ReturnDocument from flask_security import login_required, current_user from api.helper import upload...
__version = (1, 1, "rc2") __version__ = version = '.'.join(map(str, __version)) __project__ = PROJECT = __name__ from .manager import JSONRPCResponseManager from .dispatcher import Dispatcher dispatcher = Dispatcher() # lint_ignore=W0611,W0401
# Copyright 2014 Google Inc. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agre...
#!/usr/bin/env python3 # # yosys -- Yosys Open SYnthesis Suite # # Copyright (C) 2012 Clifford Wolf <clifford@clifford.at> # # 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 ...
# -*- coding: utf-8 -*- ''' Gmvault: a tool to backup and restore your gmail account. Copyright (C) <2011-2013> <guillaume Aubert (guillaume dot aubert at gmail do com)> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from bluebird import * import re import os import platform from math import inf from time import sleep from threading import Thread from elftools.elf.elffile import * from collections import defaultdict from mmap import PROT_EXEC, PROT_READ, PROT_WRITE, \ MAP_...
# Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
import hashlib import logging import time import uuid from collections import namedtuple import googleapiclient import cloudbridge as cb from cloudbridge.cloud.base import helpers as cb_helpers from cloudbridge.cloud.base.resources import ClientPagedResultList from cloudbridge.cloud.base.resources import ServerPagedR...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Authors: Daniel van de Velden (d.vandevelden@yahoo.de) # # License: BSD (3-clause) # from jumeg.jumeg_utils import loadingBar loadingBar=None import mne import numpy as np from scipy.optimize import leastsq from sklearn.neighbors import BallTree from mne.transforms imp...
#!/usr/bin/env python # Run from directory above all the database gbks import argparse import os import re import csv import sys import pandas as pd import logging from collections import defaultdict from dojo.taxonomy import NCBITree from ninja_utils.parsers import FASTA # The arg parser def make_arg_parser(): pa...
# 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 the...
#!/usr/bin/env python import os import sqlite3 import wx # Deprecated #import win32file #import win32api import yaml import res __version__ = '1.1.0 (2019-07-21)' class MainApp(wx.App): def OnInit(self): frame = MainFrame() frame.Show() self.SetTopWindow(frame) return True c...
#!/usr/bin/env python config = { "exes": { # Get around the https warnings "hg": ['/usr/local/bin/hg', "--config", "web.cacerts=/etc/pki/tls/certs/ca-bundle.crt"], "hgtool.py": ["/usr/local/bin/hgtool.py"], "gittool.py": ["/usr/local/bin/gittool.py"], }, 'gecko_pull_url': 'ht...
# Copyright (c) 2006-2008 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this ...
from coalib.bearlib.languages.Language import Language @Language class PHP: aliases = 'php', extensions = '.php', comment_delimiter = '//' multiline_comment_delimiters = {'/*': '*/'} string_delimiters = {'"': '"', "'": "'"} keywords = [ '__halt_compiler', 'abstract', 'and', 'array', 'a...
import pickle import math import consensx.graph as graph from consensx.csx_libs import methods as csx_func from consensx.csx_libs import objects as csx_obj # Equation and coefficients from: # Wang & Bax (1996) JACS 118:2483-2494. Table 1, NMR + X-ray data Jcoup_dict1 = { 'A': {"3JHNCB": 3.39, "3JHNHA": 6.98, ...
from __future__ import print_function, absolute_import, division import time from distutils.version import LooseVersion import numpy as np import sklearn from sklearn.base import is_classifier, clone from sklearn.metrics.scorer import check_scoring from sklearn.externals.joblib import Parallel, delayed from sklearn.c...
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2012 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) a...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Copyright (c) 2016 ASMlover. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above copyrig...
## Copyright (c) 2012, 2013 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. """ Run performance tests. """ import os import re import signal import sys import csv from collections import OrderedDict from qisys import ui ...
"""The Panasonic Viera integration.""" import asyncio from functools import partial import logging from urllib.request import URLError from panasonic_viera import EncryptionRequired, Keys, RemoteControl, SOAPError import voluptuous as vol from homeassistant.components.media_player.const import DOMAIN as MEDIA_PLAYER_...
#!/usr/bin/python # # Copyright 2017 Macmule # # 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...
# coding: utf-8 from __future__ import unicode_literals, division import re import logging import math import time import dateutil.parser import six if six.PY3: from urllib.parse import urlencode else: from urllib import urlencode from . import conf from .api import rest_request, uploading_request from .exce...
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters import logging from lookup import * TOKEN='331304045:AAGVjGkL-11ysUPoSTk-EStFTNB93s00Gxw' logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s') logger = logging.getLogger(__name__) # Define a f...
__author__ = 'Timothy D. Morton <tim.morton@gmail.com>' """ Module for convenient access to kepler cumulative KOI table data. """ from __future__ import division,print_function import numpy as np import os,sys,re,os.path import pandas as pd from .errors import BadKOINameError KOIFILE = os.path.expanduser('~/.keputil...
from kindred import * import xml.etree.ElementTree import sys from kindred import CandidateBuilder class Entity: nextInternalID = 1 def __init__(self,entityType,text,pos,sourceEntityID=None): posErrorMsg = "Entity position must be list of tuples (startPos,endPos)" if sys.version_info >= (3, 0): assert is...
import os from pprint import pprint from utilityFunc import splitNameToWords, getKernelFileName, \ getStructFileName, getKernelType class KernelFuncBuilder: def __init__(self, strName, lstFuncs, strFolder = 'out'): # the strFileName is for output self.strFileName = getKernel...
# -*- coding: utf-8 -*- import unittest from unittest.mock import Mock, patch from nose_parameterized import parameterized from sqlalchemy.orm.exc import MultipleResultsFound from werkzeug.exceptions import HTTPException from url_shortener.models import ( Alias, AliasValueError, IntegerAlias, AliasLengthValueErro...
""" smashlib.patches yup, this means I need to use IPython.ipmaker.make_IPython.. """ import new from smashlib.util import do_it_later # copied and modified from IPython.completer def global_matches(self, text): """Compute matches when text is a simple name. Return a list of all keywords, built...
from ..rfb_logger import rfb_log from ..rfb_utils.envconfig_utils import envconfig import bpy import os import json __RFB_TRANSLATIONS_DICT__ = dict() def load_locale_file(jsonfile): global __RFB_TRANSLATIONS_DICT__ jdata = json.load(open(jsonfile)) locale_nm = jdata['locale'] translation_dict = dict...
import base64 import copy import json import mock try: from StringIO import StringIO except ImportError: from io import StringIO import unittest import rollbar from rollbar.lib import python_major_version, string_types from rollbar.test import BaseTest try: eval(""" def _anonymous_tuple_func(x, ...
from SPARQLWrapper import SPARQLWrapper, JSON import numpy as np import math import time from database_interface.data_interface.edge_query_result import EdgeQueryResult from database_interface.search_filters.prefix_filter import PrefixFilter class FreebaseInterface: endpoint = None prefix = None max_enti...
# coding=utf-8 """Utility module for generating workflow definitions during testing.""" import os import json import jinja2 from ..workflow_definitions import add_workflow_definition def load_workflow_definition(workflow_id: str = None, workflow_version: str = None, ...
# -*- coding: utf-8 -*- """ keyboard ======== Take full control of your keyboard with this small Python library. Hook global events, register hotkeys, simulate key presses and much more. ## Features - Global event hook on all keyboards (captures keys regardless of focus). - **Listen** and **sends** keyboard events. ...
import nltk import sys from nltk.corpus import wordnet as wn import kindred from nltk.parse.util import taggedsents_to_conll from nltk.parse.stanford import StanfordDependencyParser from kindred import Dependencies nltkPackagesOkay = False def checkNLTKPackages(): global nltkPackagesOkay if not nltkPackagesOkay: ...
""" Author: Armon Dadgar Start Date: January 22nd, 2009 Description: Provides a method of transferring data to machines behind firewalls or Network Address Translation (NAT). Abstracts the forwarding specification into a series of classes and functions. """ # Define Module Constants FORWARDER_MAC = "FFFFFFFFFFFF" ...
# ---------------------------------------------------------------------------- # Copyright 2014 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
""" 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. Written (W) 2013 Heiko Strathmann """ from main.distribution.Gaussian impor...
import re from django import forms from django.db.models import Count, Q from ipam.models import IPAddress from utilities.forms import BootstrapMixin, SmallTextarea, SelectWithDisabled, ConfirmationForm, APISelect, \ Livesearch, CSVDataField, CommentField, BulkImportForm, FlexibleModelChoiceField, ExpandableNameF...
from django.conf import settings from django.core.mail import send_mail from django.db import models from django.template import Template, Context from django.utils.translation import ugettext_lazy as _ from sentry_sdk import capture_exception from .states import states class EmailTemplate(models.Model): state = ...
# pyflakes=ignore # # Copyright (c) 2011 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....
#!/usr/bin/env python """Plot trajectories from, compute statistics of, etc. trial data files. If no arguments are given, then print a brief summary. """ from __future__ import print_function import sys import argparse import json import numpy as np import matplotlib.pyplot as plt from fmrb import integrator_chains ...
from django.db.models import Q from django.utils.translation import ugettext_lazy as _ from meinberlin.apps.dashboard2.forms import ProjectCreateForm from meinberlin.apps.dashboard2.forms import ProjectDashboardForm from . import models LABELS = { 'name': _('Title of your container'), 'description': _('Short...
""" Base class for XDiGraph. XDiGraph allows directed graphs with self-loops, multiple edges, arbitrary (hashable) objects as nodes, and arbitrary objects associated with edges. """ __author__ = """Aric Hagberg (hagberg@lanl.gov)\nPieter Swart (swart@lanl.gov)\nDan Schult(dschult@colgate.edu)""" # Copyright (C)...
import os import random class Corpus: def __init__(self, path, use_tokens=True): """Pass path to corpus. Expects following structure: path/to/my/corpus corpus.txt corpus.tokens.txt """ self.path = os.path.normpath(path) self.use_tokens = use_tokens ...
# Copyright 2006 James Tauber and contributors # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.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/...
# Module: core # Date: 2nd August 2005 # Author: James Mills, prologic at shortcircuit dot net dot au """core - Core Component Core management component and main loop handler. All events are processes by this component and also handles system signals to help reload the configuration and terminate the system. ...
""" NIPAP API ========= This module contains the Nipap class which provides most of the logic in NIPAP apart from that contained within the PostgreSQL database. NIPAP contains three types of objects: VRFs, prefixes and pools. VRF ------ A VRF represents a Virtual Routing and Forwarding in...
""" This module implements plotting functions useful to report analysis results. Author: Martin Perez-Guevara, Elvis Dohmatob, 2017 """ import os import warnings from string import ascii_lowercase import numpy as np import pandas as pd import nibabel as nib from scipy import stats from scipy import ndimage import ni...
import asyncio import discord import random import os import configparser import json from discord.ext import commands from discord import errors import globals from operator import itemgetter import urllib.request import urllib import re import webbrowser import platform import html import math impo...
#!/usr/bin/env python import sys import pytest if "__pypy__" in sys.modules: pytest.skip("Broken on pypy") from time import strftime from circuits import Event, Component from circuits.app.log import Log, Logger LEVELS = list(Logger.LEVELS.keys()) class Test(Event): """Test Event""" class App(Component...
import unittest import sys from nxdrive.osi import AbstractOSIntegration class DarwinTest(unittest.TestCase): if AbstractOSIntegration.is_mac() and not AbstractOSIntegration.os_version_below("10.10"): def test_folder_registration(self): try: name = "TestCazz" ...
#!/usr/bin/env python # encoding: utf-8 import sys import json import subprocess project_name = 'bourne' def run_command(args): print("Running: {}".format(args)) sys.stdout.flush() subprocess.check_call(args) def get_tool_options(properties): options = [] if 'tool_options' in properties: ...
from __future__ import absolute_import import operator import logging import struct import math bytecodes = {} from rpython.rlib.rarithmetic import longlongmask from classconstants import * from klass import Class, ClassInstance, ArrayInstance, ArrayClass from descriptor import parse_descriptor, descriptor_is_array ...
#!/usr/bin/python import json from urllib import urlopen import requests import getpass from string import Template import sys import os import subprocess class RunError(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value) def run(command, **kwar...
"""Provides an interface the QCDB Server instance""" import json import os import re from collections import defaultdict from typing import Any, Dict, List, Optional, Union import pandas as pd import requests from pydantic import ValidationError from .collections import collection_factory, collections_name_map from...
# -*- 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....
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010-2014, 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 Lice...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010-2011, GEM Foundation. # # OpenQuake is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License version 3 # only, as published by the Free Software Foundation. # # OpenQuak...
""" Universidad Nacional de La Matanza Catedra Lenguajes y Compiladores - 2013 Mariano Francischini, Alejandro Giorgi, Roberto Bravo TP Compilador Basado en PLY (Python Lex-Yacc) http://www.dabeaz.com/ply/ Ej: http://www.dalkescientific.com/writings/NBN/parsing_with_ply.html """ # coding=utf8 import ply.yacc a...
""" Utils for reading flat files that are loaded into database """ import copy import re import traceback from tqdm import tqdm from utils import * POPS = { 'AFR': 'African', 'AMR': 'Latino', 'ASJ': 'Ashkenazi Jewish', 'EAS': 'East Asian', 'FIN': 'European (Finnish)', 'NFE': 'European (Non-Finn...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #======================================================================= # # aes.py # ------ # Simple, pure Python model of the AES block cipher. The model is # used as a reference for the HW implementation. The code follows # the structure of the HW implementation as much...
import shutil import tempfile import unittest import spreads.vendor.confit as confit from mock import call, MagicMock as Mock, patch from spreads.vendor.pathlib import Path import spreads.util spreads.util.find_in_path = Mock(return_value=True) import spreadsplug.autorotate as autorotate class TestAutorotate(unitte...
import numpy as np from openmdao.main.api import Component from openmdao.lib.datatypes.api import Float class Mission(Component): """Place holder for real mission analysis. Could consider a pseudospectral optimal control approach""" #Inputs speed_max = Float(308, iotype="in", units="m/s", desc="M...
import logging from django import template from django.conf import settings from django.template.defaultfilters import stringfilter from django.utils.text import slugify from wagtail.contrib.wagtailroutablepage.\ templatetags.wagtailroutablepage_tags import routablepageurl from wagtail.wagtailcore.models import Pa...
import csv import logging from django.core.urlresolvers import reverse from django.db.models import Q, Count, Max from django.http import HttpResponseForbidden, HttpResponseRedirect, HttpResponse from django.views.generic import TemplateView, ListView, DetailView, View from parrainage.app.models import Elu, User cl...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Stephen Fromm <sfromm@gmail.com> # # This file is part of Ansible # # Ansible 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 Lice...