text
stringlengths
12
6.59M
''' -- imports from python libraries -- ''' # import os -- Keep such imports here import json import datetime ''' -- imports from installed packages -- ''' from django.http import HttpResponseRedirect from django.http import HttpResponse from django.core.urlresolvers import reverse from django.shortcuts import render_...
from experience_tables import build_tables EXP_TABLES = build_tables() GROUPS = ['fluctuating', 'slow', 'medium_slow', 'medium_fast', 'fast', 'erratic'] class Experience(): """The Experience Class. The implementation is based around experience tables created in the experience tables module. ...
# Copyright 2014-2016 The ODL development group # # This file is part of ODL. # # ODL 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. ...
# -*- coding: utf-8 -*- # Copyright 2014 Objectif Libre # # 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 ...
"""This module offers the `BaseQImageRenderer` base class and its two subclasses `OneDimQImageRenderer` for rendering one-dimensional configs and `TwoDimQImageRenderer` for rendering two-dimensional configs to QImages. These classes also offer a _repr_png_ method, that is used by IPython to display configurations in-l...
""" =============================================== Advanced interactive visualization capabilities =============================================== In DIPY we created a thin interface to access many of the capabilities available in the Visualization Toolkit framework (VTK) but tailored to the needs of structural and d...
# # Copyright (c) 2009 Wireless Generation, Inc. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, ...
# -*- coding: utf-8 -*- ''' salting.py module of salt specific interfaces to raet ''' # pylint: skip-file # pylint: disable=W0611 # Import Python libs import os # Import ioflo libs from ioflo.base.odicting import odict from ioflo.base.consoling import getConsole console = getConsole() from raet import raeting, nac...
""" Django settings for cmput404project project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ i...
''' -- imports from python libraries -- ''' # import os -- Keep such imports here import json import datetime ''' -- imports from installed packages -- ''' from django.http import HttpResponseRedirect from django.http import HttpResponse from django.core.urlresolvers import reverse from django.shortcuts import render_...
#!/usr/bin/python """ Diaphora, a diffing plugin for IDA Copyright (c) 2015-2016, Joxean Koret This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) an...
#!/usr/bin/python3 import subprocess import random from math import * from multiprocessing import Pool boompjes = 100 num = boompjes * 4 filename = "result.txt" sp1 = '3' sp2 = '5' sp3 = '3' sp4 = '5' results = [] team1 = [] team2 = [] intmaxout = subprocess.check_output(['./klaverjas', '-im']) intmax = int(str(in...
# Copyright 2014-2017 The ODL contributors # # This file is part of ODL. # # 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 https://mozilla.org/MPL/2.0/. """Convenience functions for operators.""" ...
""" Basic Clousmesh finctions. .. role:: strikethrough This file contains tome veri basic utility functions that must not need any import from cloudmesh. That is no statement such as * :strikethrough:`import cloudmesh` must occur in the list of import. If functions are needed hat need to be used they must be declea...
# -*- coding: utf-8 -*- """ Created on Tue May 5 14:44:57 2015 @author: oscar """ from docutils import nodes from docutils.parsers.rst import directives from docutils.parsers.rst.directives.images import Figure class glr_thumb(nodes.General, nodes.Element): """General docutils node to track the sphinx gallery ...
#!/usr/bin/env python from flask import Flask, jsonify, session, request import zerodb PORT = 2015 HOST = "127.0.0.1" DEBUG = True DEV_SECRET_KEY = "development key" app = Flask(__name__) dbs = {} @app.route("/_connect", methods=["GET", "POST"]) def connnect(): if request.method == "GET": username = re...
# -*- coding: utf-8 -*- ''' Mercurial Fileserver Backend To enable, add ``hg`` to the :conf_master:`fileserver_backend` option in the Master config file. .. code-block:: yaml fileserver_backend: - hg After enabling this backend, branches, bookmarks, and tags in a remote mercurial repository are exposed to...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ''' @author: Pieter Moris ''' import argparse import pandas as pd import enrichment_stats import gaf_parser import genelist_importer import obo_tools # Run as stand alone script # https://stackoverflow.com/questions/419163/what-does-if-name-main-do if __name__ == '__ma...
# encoding: utf-8 # # # 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import from __f...
# IATI Data Quality, tools for Data QA on IATI-formatted publications # by Mark Brough, Martin Keegan, Ben Webb and Jennifer Smith # # Copyright (C) 2013 Publish What You Fund # # This programme is free software; you may redistribute and/or modify # it under the terms of the GNU Affero General Public License v3...
#!/usr/bin/env python import sys from twisted.web import server, resource from twisted.internet import reactor import MySQLdb import MySQLdb.cursors import optparse import time import logging ''' __author__="See AUTHORS.txt at https://github.com/Oneiroi/clustercheck" __copyright__="David Busby, Percona Ireland Ltd" _...
from .node import Node from utilities import hamming_distance, memoized import numpy as np import scipy.stats as stats from scipy.integrate import quad from scipy.optimize import minimize from queue import PriorityQueue from numbers import Number class StackDecoder: """Decodes a convolutional code transmitted ove...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from typing import Any, Callable, Optional, Sequence, TypeVar from six import text_type, binary_type import base64 import errno import hashlib import os from time import sleep from django.conf import settings from six.moves...
""" The Salt loader is the core to Salt's plugin system, the loader scans directories for python loadable code and organizes the code into the plugin interfaces used by Salt. """ import contextlib import copy import functools import importlib import importlib.machinery import importlib.util import inspect import loggi...
import os, sys from twisted.internet import reactor from twisted.internet.defer import Deferred, inlineCallbacks, returnValue from twisted.python.filepath import FilePath from twisted.python.text import greedyWrap from twisted.web.error import Error as WebError from jersey import cli, log from vtwt.svc import VtwtSe...
import copy import time import warnings from collections import deque from contextlib import contextmanager from time import timezone import utils from utils import cached_property from ibu.config import DEFAULT_DB_ALIAS, Config from ibu.connection import Error, DatabaseError try: import pytz except ImportError:...
import decimal import time import logging from random import SystemRandom import discord from discord.ext import commands from .common import Cog, CoinConverter random = SystemRandom() log = logging.getLogger(__name__) PRICES = { 'OPR': ('Operational tax', ('datamosh', 'youtube')), 'API': ('API tax', ('xkcd...
#from concurrent.futures import ThreadPoolExecutor from oeem_uploader.request import Request def upload_consumption(records): """ Takes in a list of consumption records, uploads to the configured oee datastore. """ group_records_by_project group_by_consumption_metadata # Itertools group-by...
import logging from cogbot.extensions.groups.error import * log = logging.getLogger(__name__) class GroupDirectory(object): def __init__(self): # accessing role_map[server][role_name] gives role_id # don't store role object directly (not persistent) self._role_map = {} @staticmetho...
# -*- coding: utf-8 -*- ''' A module to wrap archive calls .. versionadded:: 2014.1.0 (Hydrogen) ''' # Import salt libs import salt._compat from salt.utils import which as _which, which_bin as _which_bin from salt.exceptions import SaltInvocationError import salt.utils.decorators as decorators # TODO: Check that the...
""" Common functions """ from __future__ import absolute_import, division, print_function import sys import os import re import shutil import time import logging import socket import subprocess import tarfile import urllib import tempfile import hashlib from functools import partial try: import cPickle as pickle...
''' Jabber relay cog made for antinub-gregbot project. When added to a bot it creates an xmpp client per one configured in config.JABBER_SERVERS It will then listen on those servers and relay any messages received if they are sent by a jid in the config.JABBER_SERVERS['relay_from'] list ''' import logging from slixmp...
# -*- coding: utf-8 -*- ''' Module for gathering and managing network information ''' # Import python libs import datetime import hashlib import logging import re import socket # Import salt libs import salt.utils from salt.exceptions import CommandExecutionError import salt.utils.validate.net log = logging.getLogg...
""" okeanidanalysis.logs ==================== """ import os import datetime import numpy as np import scipy as sp import scipy.interpolate import h5py import matplotlib as mpl import matplotlib.dates import matplotlib.pyplot as plt import okeanidanalysis.lib as oalib def logpath(file_name, vehicle_name=None, logs...
from __future__ import unicode_literals from django import forms from django.core.urlresolvers import reverse from django.forms.widgets import EmailInput, MultiWidget, TextInput from django.templatetags.static import static from django.utils.html import format_html class VerifiedEmailWidget(MultiWidget): def __i...
# -*- coding: utf-8 -*- ''' Module for handling OpenStack Neutron calls :depends: - neutronclient Python module :configuration: This module is not usable until the user, password, tenant, and auth URL are specified either in a pillar or in the minion's config file. For example:: keystone.user: 'admi...
__version__ = '0.2.3' default_app_config = 'omni_blocks.apps.OmniBlocksConfig'
#!/usr/bin/env python2.7 """ Tool to facilitate book digitization with the DIY BookScanner. Copyright (c) 2013 Johannes Baiter. All rights reserved. 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...
''' Publish a command from a minion to a target ''' import zmq import salt.crypt def _get_socket(): ''' Return the ZeroMQ socket to use ''' context = zmq.Context() socket = context.socket(zmq.REQ) socket.connect(__opts__['master_uri']) return socket def publish(tgt, fun, arg=None, expr...
import json from copy import deepcopy from mock import patch, ANY from django.conf import settings from django.test import TestCase from django.test.utils import override_settings from accounts.models import CtsUser from accounts.tests.factories import CtsUserFactory from ona.representation import OnaItemBase from s...
# -*- coding: utf-8 -*- ''' Utility functions for use with or in SLS files ''' # Import Python libs from __future__ import absolute_import, unicode_literals, print_function # Import Salt libs import salt.exceptions import salt.loader import salt.template import salt.utils.args import salt.utils.dictupdate def updat...
from gurobipy import * import numpy as np import shelve import astropy.units as u import pandas as pd from constants import TIME_BLOCK_SIZE, EXPOSURE_TIME, READOUT_TIME s = shelve.open('tmp_vars.shelf',flag='r') df_metric = s['block_slot_metric'] df = s['df'] nreqs = df['total_requests_tonight'] max_exps_per_slot =...
from __future__ import absolute_import import json import os from functools import reduce from fuzzywuzzy import process from six.moves import map from .encryption_key import EncryptionKey class Keychain(object): def __init__(self, path): self._path = os.path.expanduser(path) self._load_encrypt...
# -*- coding: utf-8 -*- """ Utility functions for use with or in SLS files """ # Import Python libs from __future__ import absolute_import, print_function, unicode_literals import os import textwrap # Import Salt libs import salt.exceptions import salt.loader import salt.template import salt.utils.args import salt.u...
"""Routines for running the scheduler in simulation mode.""" import os.path import configparser import numpy as np import astropy.coordinates as coord from astropy.time import Time import astropy.units as u from .TelescopeStateMachine import TelescopeStateMachine from .Scheduler import Scheduler from .QueueManager imp...
# -*- coding: utf-8 -*- """ This is revision from 3058ab9d9d4875589638cc45e84b59e7e1d7c9c3 of https://github.com/ojii/django-load. ANY changes to this file, be it upstream fixes or changes for the cms *must* be documentet clearly within this file with comments. For documentation on how to use the functions described ...
# -*- coding: utf-8 -*- ''' Provide the service module for systemd ''' # Import python libs from __future__ import absolute_import import logging import os import re import glob # Import 3rd-party libs import salt.ext.six as six import salt.utils.systemd import salt.exceptions log = logging.getLogger(__name__) __fun...
# Copyright 2014 Sam Fishman # 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, ...
# -*- coding: utf-8 -*- from django.contrib.auth.models import Group from django.contrib.sites.models import Site from django.db.models import Q from cms.compat import get_user_model, user_related_query_name from cms.exceptions import NoPermissionsException from cms.models import Page, PagePermission, GlobalPagePermis...
""" Django settings for open_humans project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ import logging import os import sys from distutils import util # pyl...
# -*- coding: utf-8 -*- ''' Module for managing PowerShell modules :depends: - PowerShell 5.0 Support for PowerShell ''' from __future__ import absolute_import # Import python libs import copy import logging import json import os # Import salt libs import salt.utils from salt.exceptions import CommandExecutionE...
from __future__ import absolute_import from django.db.models import Max from django.core.urlresolvers import reverse from django.contrib import messages from django.shortcuts import get_object_or_404 from django.utils.translation import ugettext as _ from django.views.generic import ListView, DetailView, TemplateView, ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement import tagging from cms.models import CMSPlugin from django.conf import settings from django.core.exceptions import ValidationError from django.core.urlresolvers impor...
import logging; _L = logging.getLogger('openaddr.ci') from .. import jobs, render, util, __version__ from .webcommon import nice_domain from .objects import ( add_job, write_job, read_job, complete_set, update_set_renders, set_run, RunState, get_completed_run, read_completed_set_runs ) from . import obje...
# -*- coding: utf-8 -*- ''' Module for managing Windows Updates using the Windows Update Agent. .. versionadded:: 2015.8.0 :depends: - salt.utils.win_update ''' # Import Python libs from __future__ import absolute_import from __future__ import unicode_literals import logging # Import Salt libs from salt.ext...
''' embeddings.py -- functionality for working with non-trivial NLP embeddings In particular, functionality for reshaping a 2D temporal tensor (integer lookups) into a 5D tensor across multi-sentence embeddings. ''' from keras.layers.containers import Graph as SubGraph from keras.layers.core import Permute, Reshape f...
import logging; _L = logging.getLogger('openaddr.ci') from ..compat import standard_library from .. import jobs from os.path import relpath, splitext from urllib.parse import urljoin from datetime import timedelta from base64 import b64decode from functools import wraps from uuid import uuid4 import json, os from fl...
''' Support for YUM ''' # Import python libs import copy import logging import collections # Import salt libs import salt.utils log = logging.getLogger(__name__) __QUERYFORMAT = '%{NAME}_|-%{VERSION}_|-%{RELEASE}_|-%{ARCH}' def __virtual__(): ''' Confine this module to yum based systems ''' # Work...
from opencog.atomspace import AtomSpace, types, Atom, Handle, TruthValue import opencog.cogserver from tree import * from fishgram import * from adaptors import * from util import pp import sys, copy rules = [] trace = 0 goalId = 100 # hacking. for the lulz #kb = set([1, 3]) #rules = {(1, 2), (3, 4)} # #de...
# -*- coding: utf-8 -*- ''' Used to manage the outputter system. This package is the modular system used for managing outputters. ''' # Import python libs from __future__ import print_function from __future__ import absolute_import import os import sys import errno import logging import traceback from salt.utils.six i...
#!/usr/bin/python import sys def test( f, params=None ) : try : print("\n\n#Running %s" % f.__name__) if params == None : f() else : f(*params) print("#Function successful!\n#") except : print("#Function failed with exception %s" % sys.exc_info()[0]) """ EXERCISE 1 """ #T...
import shutil import os import mdtraj as md from openmoltools.utils import import_, enter_temp_directory, run_antechamber, create_ffxml_file import logging logger = logging.getLogger(__name__) logging.basicConfig(level=logging.DEBUG, format="LOG: %(message)s") # Note: We recommend having every function return *copie...
''' Render the pillar data ''' # Import python libs import os import collections import logging # Import salt libs import salt.loader import salt.fileclient import salt.minion import salt.crypt from salt._compat import string_types from salt.template import compile_template from salt.utils.dictupdate import update fr...
# -*- coding: utf-8 -*- # 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. # # OpenQuake is distributed in the hope that it will be...
# -*- coding: utf-8 -*- ''' Render the pillar data ''' # Import python libs from __future__ import absolute_import import copy import os import collections import logging # Import salt libs import salt.loader import salt.fileclient import salt.minion import salt.crypt import salt.transport import salt.utils.url from ...
# -*- coding: utf-8 -*- # 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. # # OpenQuake is distributed in the hope that it will be...
__author__ = 'croxis' from io import BytesIO import urllib.parse from flask import send_file, request import lib.cardlib as cardlib from . import card_craft from ..card_visual import create_card_img @card_craft.route('/mtgai/card-craft/<path:raw>') def index(raw): card = create_card(urllib.parse.unquote(raw))...
# -*- coding: utf-8 -*- ''' Jinja loading utils to enable a more powerful backend for jinja templates Jinja in States =============== .. _Jinja: http://jinja.pocoo.org/docs/templates/ The most basic usage of Jinja in state files is using control structures to wrap conditional or redundant state elements: .. code-bl...
# -*- 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 -*- ''' Manage Docker containers ======================== `Docker <https://www.docker.io>`_ is a lightweight, portable, self-sufficient software container wrapper. The base supported wrapper type is `LXC <https://en.wikipedia.org/wiki/Linux_Containers>`_, `cgroups <https://en.wikipedia.org/wiki/Cgr...
# -*- coding: utf-8 -*- # 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. # # OpenQuake is distributed in the hope that it will be...
# -*- coding: utf-8 -*- ''' :maintainer: Evan Borgstrom <evan@borgstrom.ca> Pythonic object interface to creating state data, see the pyobjects renderer for more documentation. ''' from collections import namedtuple from salt.utils.odict import OrderedDict REQUISITES = ('require', 'watch', 'use', 'require_in', 'watc...
# -*- coding: utf-8 -*- # 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. # # OpenQuake is distributed in the hope that it will be...
# -*- coding: utf-8 -*- ''' Template render systems ''' from __future__ import absolute_import # Import python libs import codecs import os import imp import logging import tempfile import traceback import sys # Import third party libs import jinja2 import jinja2.ext # Import salt libs import salt.utils from salt.e...
import logging from threading import Thread from django import shortcuts from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.contrib.auth.views import (login as django_login, logout_then_login as django_logout) from django.contrib.aut...
''' The AWS Cloud Module ==================== The AWS cloud module is used to interact with the Amazon Web Services system. To use the AWS cloud module the following configuration parameters need to be set in the main cloud config: .. code-block:: yaml # The AWS API authentication id AWS.id: GKTADJGHEIQSXMK...
############################################################################ ## ## Copyright (C) 2006-2007 University of Utah. All rights reserved. ## ## This file is part of VisTrails. ## ## This file may be used under the terms of the GNU General Public ## License version 2.0 as published by the Free Software Foundat...
# 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 ############################################################################### ## ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or with...
from pupa.scrape import Organization, Membership, Person from .base import OpenstatesBaseScraper birthdays = { 'ALL000035': '1965-03-20', 'ALL000138': '0000', } class OpenstatesPersonScraper(OpenstatesBaseScraper): _committees = {} _people = {} _roles = set() def get_term_years(self, term_n...
""" Filename: plot_ohc_trend.py Author: Damien Irving, irving.damien@gmail.com Description: Plot the spatial trend in ocean heat content """ # Import general Python modules import sys, os, pdb import argparse import numpy, math import matplotlib.pyplot as plt from matplotlib import gridspec import iris i...
from asciimatics.widgets import Frame, ListBox, Layout, Divider, Text, \ Button, TextBox, Widget from asciimatics.scene import Scene from asciimatics.screen import Screen from asciimatics.exceptions import ResizeScreenError, NextScene, StopApplication import sys import sqlite3 class ContactModel(object): def ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from django_adyen import urlpatterns urlpatterns = [ url(r'^payment-done/$', 'oscar_adyen.views.payment_result', name='payment-result'), url(r'^notify/$', 'oscar_adyen.views.notification', name='...
from __future__ import unicode_literals from django.utils.encoding import python_2_unicode_compatible from decimal import Decimal as D from django.db import models from django.utils.translation import ugettext_lazy as _ from oscar_docdata.managers import DocdataOrderManager from . import appsettings try: from po...
# -*- coding: utf-8 -*- from django.conf.urls import * from .views import (SuccessResponseView, ReceiveNotification) urlpatterns = patterns('', url(r'^preview/(?P<basket_id>\d+)/$', SuccessResponseView.as_view(preview=True), name='pagseguro-success-response'), url(r'^checkout/payment-details/$', SuccessRespon...
import pytz import functools import httplib as http from dateutil.parser import parse as parse_date from django.apps import apps from django.utils import timezone from django.conf import settings from django.db import models from osf.utils.fields import NonNaiveDateTimeField from website.prereg import utils as prereg...
"""Simplify, correct, and consolidate network topology.""" import logging as lg import geopandas as gpd import networkx as nx import pandas as pd from shapely.geometry import LineString from shapely.geometry import Point from shapely.geometry import Polygon from . import utils from . import utils_graph def _is_end...
import redis from ast import literal_eval from flask import Blueprint, request, jsonify, current_app from routes.job_utils import fetch_job from routes.ra_api import subtyping_dependencies bp_ra_statuses = Blueprint('reactapp_statuses', __name__) # new to 4.2.0 def merge_job_results(jobs_dict, redis_connection): ...
import sys, conf sys.path.append( "." ) from urlutil import * import xml.etree.ElementTree as ET def InterpretUploadResponse(response): root = ET.fromstring(response) if root.tag == "html": raise RuntimeError("Unexpected html in response") diff = {"node": {}, "way": {}, "relation": {}} for el in root: val = {}...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
"""Configuration for ACLs.""" # Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (C) 2015--2018 The Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file e...
# -*- coding: utf-8 -*- # # defivelo-intranet -- Outil métier pour la gestion du Défi Vélo # Copyright (C) 2015 Didier Raboud <me+defivelo@odyx.org> # # 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 ...
import flatbuffers import multiprocessing import queue from threading import Thread from rlbot.messages.flat import QuickChat from rlbot.messages.flat import QuickChatSelection from rlbot.utils.logging_utils import get_logger def get_quick_chats(): """ quick_chat_list = ["Information_IGotIt", ...
""" The democracy API. we have some public resources which you can get annonymousy but for the private data we require oauth authentication we have built test to acces those resouces through oauth. """ import datetime from django.contrib.auth.models import User from django.core.urlresolvers import reverse from djang...
import xyz class ArmToolchain(xyz.Package): group_only = True pkg_name = 'arm-toolchain' full_deps = [('gcc', {'target': 'arm-none-eabi'}), ('binutils', {'target': 'arm-none-eabi'}), ('gdb', {'target': 'arm-none-eabi'}), ('stlink', {}) ] ...
#!python3 # -*- coding: utf-8 -*- import os import sys from typing import Tuple sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # not required after 'pip install uiautomation' import uiautomation as auto def listDir(path: Tuple[str, bool]): if path[1]: files = [] file...
"""Impact of Dependencies. The main class inspect the impact of correlation on a quantity of interest of a model output. TODO: - Make test functions - Clean the code - Add a load/save to DependenceResult class - User np.tril to take the values of the matrices """ import json import operator import o...
import logging log = logging.getLogger(__file__) import datetime from datetime import timedelta import time from calendar import monthrange def ret_me(s): return s _ = ret_me MORE=_('more') TODAY=_('Today') def get_local_time(): return time.localtime() def get_local_date(): return datetime.date.today()...
from ..tester import Tester as BaseTester import pytest import traceback import warnings import sys import os import contextlib import time from argparse import ArgumentParser from contextlib import contextmanager if sys.version_info[0] == 2: from cStringIO import StringIO else: from io import StringIO import...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sublime import sublime_plugin import threading def achievement_dialog(message): message = "YOU GOT A NEW ACHIEVEMENT\n\n" + message sublime.message_dialog(message) def count_achievement_function(setting_name, count, achieving_counts, message): u""" ...