src
stringlengths
721
1.04M
# # Copyright (c) 2016, Arista Networks, Inc. # 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 list of condit...
import numpy from scipy.special import binom, gamma from matplotlib import pyplot import sys def factorial(x): try: return gamma(x + 1) except OverflowError: print "Overflow, x =",x exit(0) def B(x, y): return factorial(x - 1) * factorial(y - 1) / factorial(x + y - 1) n = ...
# Generated by Django 2.1.4 on 2018-12-27 08:50 from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('tasks', '__first__'), ...
from ..utility import settings from . import ui from . import common from . import node import sys import bpy class PhMaterialHeaderPanel(bpy.types.Panel): bl_label = "" bl_context = "material" bl_space_type = "PROPERTIES" bl_region_type = "WINDOW" bl_options = {"HIDE_HEADER"} COMPATIBLE_ENGINE...
import cv2 import dlib import numpy import sys # https://pan.baidu.com/s/1dGIcuvZ PREDICTOR_PATH = "./shape_predictor_68_face_landmarks.dat" SCALE_FACTOR = 1 FEATHER_AMOUNT = 11 FACE_POINTS = list(range(17, 68)) MOUTH_POINTS = list(range(48, 61)) RIGHT_BROW_POINTS = list(range(17, 22)) LEFT_BROW_POINTS = list(range...
from __future__ import (absolute_import, division, print_function, unicode_literals) __all__ = ['Tensor', 'contract', 'distance', 'matrix_to_tensor', 'tensor_to_matrix', 'random_tensor', 'tensor_product', 'tensor_svd', 'truncated_svd', 'zeros_tensor'] import copy import w...
import os import base64 import subprocess import threading import pickle as pickle import signal from copy import deepcopy from GangaCore.Core.exceptions import GangaException from GangaCore.Utility.logging import getLogger logger = getLogger() def bytes2string(obj): if isinstance(obj, bytes): return obj....
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class WebhookTestCase(Integrati...
from django.views.generic.dates import BaseMonthArchiveView from django.views.generic.list import MultipleObjectTemplateResponseMixin from django.core.exceptions import ImproperlyConfigured from calendar import Calendar from collections import defaultdict import datetime class BaseCalendarMonthArchiveView(BaseMonthAr...
import logging from sqlite3 import OperationalError from .cursors import * logger = logging.getLogger(__name__) # _KeyValueStorage _CREATION_SCRIPT = """ CREATE TABLE metadata ( "key" VARCHAR(64) NOT NULL, value VARCHAR, PRIMARY KEY ("key") ); CREATE TABLE nodes ( id VAR...
#!/usr/bin/env python # Copyright (c) 2016, Simon Brodeur # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, th...
import sys import commands import utility usage = ''' Kit, a project manager for C/C++ -------------------------------- - usage: kit <command> [all|<module>] [flags/options] kit [flags/options] - commands: build ...... compile all sources clean ...... remove compilati...
from hoomd.data.local_access import ( ParticleLocalAccessBase, BondLocalAccessBase, AngleLocalAccessBase, DihedralLocalAccessBase, ImproperLocalAccessBase, ConstraintLocalAccessBase, PairLocalAccessBase, _LocalSnapshot) from hoomd.data.array import HOOMDArray from hoomd import _hoomd class Par...
# -*- coding: utf-8 -*- """ flask_security.forms ~~~~~~~~~~~~~~~~~~~~ Flask-Security forms module :copyright: (c) 2012 by Matt Wright. :copyright: (c) 2017 by CERN. :license: MIT, see LICENSE for more details. """ import inspect from flask import Markup, current_app, flash, request from flas...
import glob,os,re,math,sys,random # Should version this... 140813-16 TAW # More flexible handling of residue/molecule names # More extensive support for geometric operations # In the context of this module, a residue is a list of atoms, where each atom/item # is a list or tuple with at least 7 values: # # (atom nam...
#!/usr/bin/env python import sys import textwrap try: import virtualenv # @UnresolvedImport except: from .lib import virtualenv # @Reimport from . import snippits __version__ = "0.9.1" def file_search_dirs(): dirs = [] for d in virtualenv.file_search_dirs(): if "vootstrap" not in d: ...
## FormEncode, a Form processor ## Copyright (C) 2003, Ian Bicking <ianb@colorstudy.com> """ Validator/Converters for use with FormEncode. """ import cgi import locale import re import warnings from encodings import idna try: # import dnspython import dns.resolver import dns.exception except (IOError, Impo...
# -*- coding: utf-8 -*- from flask import abort from marshmallow import Schema, fields, validates, ValidationError from webargs.flaskparser import use_args from ..utils import RestBlueprint, update_model from ..models import Bank, BankAccount, db from .bank_account import BankAccountSchema bank_api = RestBlueprint(...
# -*- coding:utf-8 -*- import hashlib from bson.objectid import ObjectId import motor from tornado.httpclient import HTTPRequest, AsyncHTTPClient from tornado.gen import Return import tornadoredis import constant __author__ = 'george' import config import json from json import JSONEncoder from pymongo import MongoCl...
#!/usr/bin/env python # # Find NULL symbols in file, then correlate with the phase reference symbol and # plot the resulting correlation result. # # This will display the Channel Impulse Reference # # Copyright (C) 2016 # Matthias P. Braendli, matthias.braendli@mpb.li # http://www.opendigitalradio.org # Licence: The MI...
""" Statsd Client that takes configuration first from the rejected configuration file, falling back to environment variables, and finally default values. Environment Variables: - STATSD_HOST - STATSD_PORT - STATSD_PREFIX """ import logging import os import socket from tornado import iostream LOGGER = logging.ge...
from __future__ import print_function, division, absolute_import import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.model_zoo as model_zoo import os import sys __all__ = ['InceptionV4', 'inceptionv4'] pretrained_settings = { 'inceptionv4': { 'imagenet': { 'ur...
""" WSGI config for doolittle project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`...
# Copyright 2017 Andreas Riegg - t-h-i-n-x.net # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'mr.S' import bottle from gevent import monkey import datetime from kernel.widget import get as loadWidget from kernel.helpers import is_ajax from bottle import default_app, Bottle, route, static_file, ServerAdapter, Jinja2Template, request, error, redirect, j...
# -*- coding: utf-8 -*- ############################################################################## # # Infrastructure # Copyright (C) 2014 Ingenieria ADHOC # No email # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License...
import dragonfly import dragonfly.pandahive import bee from bee import connect import math, functools from panda3d.core import NodePath import dragonfly.scene.unbound, dragonfly.scene.bound import dragonfly.std import dragonfly.io import dragonfly.canvas import Spyder # ## random matrix generator from random impor...
from django.core.files.base import ContentFile from django.shortcuts import render from django.http.response import HttpResponse from django.views.generic import base from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt from django.conf import settings import ast imp...
import numpy as np from scipy.signal import butter, lfilter, freqz import matplotlib.pyplot as plt from clean_bad_trace import clean_bad_trace file = open("processing/save_to_file/data.txt") trace = file.readlines() trace_clean = clean_bad_trace(trace) print(trace_clean) plt.plot(trace_clean, label='Noisy signal') ...
from ykman.device import connect_to_device, list_all_devices, read_info from ykman.pcsc import list_devices from yubikit.core import TRANSPORT from yubikit.core.otp import OtpConnection from yubikit.core.fido import FidoConnection from yubikit.core.smartcard import SmartCardConnection from yubikit.management import USB...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Creates a Line between two points as a special case of a :class:`~psychopy.visual.ShapeStim` """ # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public Licen...
#!/usr/bin/env python import sys from csvkit.unicsv import UnicodeCSVReader from pymongo import objectid import config import utils if len(sys.argv) < 2: sys.exit('You must provide the filename of a CSV as an argument to this script.') FILENAME = sys.argv[1] YEAR = '2010' collection = utils.get_geography_co...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Address', fields=[ ('id', models.AutoField(verb...
"""SAX document handlers that support output generation of XML, SGML, and XHTML. This module provides three different groups of objects: the actual SAX document handlers that drive the output, DTD information containers, and syntax descriptors (of limited public use in most cases). Output Drivers -------------- The...
from learningobjects.utils.google import search as search_google import sha import xml.etree.ElementTree as ET import unfurl import urllib2, urllib import json import time from urlunshort import resolve import wikipedia import re import requests class SearchEngine(object): def __init__(self, engine): self...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Gives a picture of the CPU activity between timestamps. When executed as a script, takes a loading trace, and prints the activity breakdown for the reque...
#!/usr/bin/python # # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import pr...
"""API.""" from flask import Blueprint, jsonify, request from tagio.models.user import User from tagio.extensions import csrf_protect from . import user __all__ = ('user',) blueprint = Blueprint('api', __name__, url_prefix='/api/v<string:version>') @blueprint.route('/l...
"""Provides a class for managing BIG-IP iRule resources.""" # coding=utf-8 # # Copyright (c) 2017-2021 F5 Networks, 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.apac...
__version__ = 'v0.1.0' import time class CacheDriver: def __init__(self, creator): self.creator = creator self.ready = False self.name = "" def set_cache_args(self, args): self.args = args def set(self, name, key, value): if not self.ready or self.name != name: ...
#coding=utf-8 from cookielib import MozillaCookieJar from urllib2 import Request, build_opener, HTTPHandler, HTTPCookieProcessor from urllib import urlencode import base64 import os from Errors import * from re import compile from Cache import Cache from gzip import GzipFile try: from cStringIO import StringIO exce...
####################### # Plot results of skew surface tests ####################### import os, re, glob import numpy as np import pylab import scipy.spatial as spatial import ldac ####################### def loadCats(cluster, lensfilter, image, filter): clusterdir = '/u/ki/dapple/subaru/%s/' % cluster pho...
# Copyright (c) 2007-2017 Joseph Hager. # # Copycat is free software; you can redistribute it and/or modify # it under the terms of version 2 of the GNU General Public License, # as published by the Free Software Foundation. # # Copycat is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; with...
""" Tests for core models. """ from django.test import TestCase from django_dynamic_fixture import G from social_django.models import UserSocialAuth from {{cookiecutter.repo_name}}.apps.core.models import User class UserTests(TestCase): """ User model tests. """ TEST_CONTEXT = {'foo': 'bar', 'baz': None} ...
from ds.vortex.core import baseNode from ds.vortex.core import plug as plugs class ToArray(baseNode.BaseNode): def __init__(self, name): """ :param name: str, the name of the node """ baseNode.BaseNode.__init__(self, name) def initialize(self): baseNode.BaseNode.initia...
import param import numpy as np from ..element import Element, NdElement from .. import util class Interface(param.Parameterized): interfaces = {} datatype = None @classmethod def register(cls, interface): cls.interfaces[interface.datatype] = interface @classmethod def cast(cls, ...
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
"""Implementation of :class:`Domain` class.""" import abc import inspect from ..core import Expr from ..core.compatibility import HAS_GMPY from ..polys.orderings import lex from ..polys.polyerrors import CoercionFailed, UnificationFailed from ..polys.polyutils import _unify_gens from ..printing.defaults import Defaul...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ daily_log_plot.py parse day log to 3 figs: 1. requests count; 2. requests throughput; 3. responses time Copyright (c) 2016年 li3huo.com All rights reserved. """ import argparse,logging from subprocess import Popen, PIPE import numpy as np import matplotlib.pyplot as p...
from pyrevit import revit, DB, UI from pyrevit import script from pyrevit import forms logger = script.get_logger() selection = revit.get_selection() linkedModelName = '' if len(selection) > 0: for el in selection: if isinstance(el, DB.RevitLinkInstance): linkedModelName = el.Name.split(':...
# This file is part of the Frescobaldi project, http://www.frescobaldi.org/ # # Copyright (c) 2008 - 2014 by Wilbert Berendsen # # 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 ...
""" .. module:: category_encoders :synopsis: :platform: """ from category_encoders.backward_difference import BackwardDifferenceEncoder from category_encoders.binary import BinaryEncoder from category_encoders.count import CountEncoder from category_encoders.hashing import HashingEncoder from category_encoders.h...
""" fonctions """ from itertools import permutations, product from functools import reduce import numpy as np def combi_possibles(val_tot,nbr_cases,nbr_max): """ retourne la liste des combinaisons possibles """ #test si la valeur est certaine if nbr_cases==1: return [(val_t...
#!/usr/bin/env python # -*- coding: utf-8 -*- """contains a dictionary of language names, based on the iso code""" # Copyright 2002, 2003 St James Software # # This file is part of jToolkit. # # jToolkit is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
# Copyright (C) British Crown (Met Office) & Contributors. # This file is part of Rose, a framework for meteorological suites. # # Rose 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 L...
################################################## # # FastJet module # # Author: Andre Sailer, CERN # based on GSL module by J. Engels, Desy # Date: Jul, 2010 # ################################################## ...
#!/usr/bin/env python # -*- coding: utf8 -*- import numpy as np import matplotlib.pyplot as plt from scipy.interpolate import griddata CSV_FILENAME = "bilayer_prot_apl_frame_00000.csv" GRO_FILENAME = "bilayer_prot.gro" PNG_FILENAME = "bilayer_prot_apl_frame_00000.png" # Get Box vectors last_line = "" with open(GRO_F...
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 t...
############################################################################## # eintegration_edi_manager # Copyright (c) 2016 e-integration GmbH (<http://www.e-integration.de>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Li...
"""Construction of parameter spaces.""" import collections import itertools from six import string_types from psyrun.utils.doc import inherit_docs def dict_concat(args): """Concatenates elements with the same key in the passed dictionaries. Parameters ---------- args : sequenece of dict Di...
import os from typing import Dict import pytest import yaml from mockito import when, expect from app.config.triggear_config import TriggearConfig from app.clients.jenkins_client import JenkinsInstanceConfig pytestmark = pytest.mark.asyncio @pytest.mark.usefixtures('unstub') class TestTriggearConfig: VALID_CRE...
# Copyright 2015 Ryan Brown <sb@ryansb.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 ...
import math import random import struct import GLWindow import ModernGL # Window & Context wnd = GLWindow.create_window() ctx = ModernGL.create_context() prog = ctx.program( ctx.vertex_shader(''' #version 330 uniform vec2 Screen; in vec2 vert; void main() { gl_Posit...
# Django settings for ThuCloudDisk project. import os.path dirname = os.path.dirname(__file__).replace("\\", "/") ROOT_PATH = os.path.dirname(dirname) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('thuclouddisk', 'thuclouddisk@gmail.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': ...
""" Django settings for myblog project. Generated by 'django-admin startproject' using Django 1.11.6. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import os ...
from billy.utils.fulltext import pdfdata_to_text, text_after_line_numbers from .bills import VTBillScraper from .legislators import VTLegislatorScraper from .committees import VTCommitteeScraper from .events import VTEventScraper metadata = dict( name='Vermont', abbreviation='vt', capitol_timezone='America...
import inspect try: # Django>=1.9 from django.template import library except ImportError: # Django<1.9 from django.template import base as library def container_tag(register, name=None): def dec(func): params, varargs, varkw, defaults = inspect.getargspec(func) params = params[1:...
# coding=utf-8 from django.core.mail import send_mail from django.db import models from django.core import validators from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.utils import timezone from django.contrib.auth.models import AbstractBaseUser, UserManager, Permis...
#!/usr/bin/env python3 # --------------------- # # -- SEVERAL IMPORTS -- # # --------------------- # from pathlib import Path from pytest import fixture from orpyste.data import ReadBlock as READ # ------------------- # # -- MODULE TESTED -- # # ------------------- # from mistool import python_use # -----------...
""" hybrid sort module """ from sort.framework import validate THRESHOLD = 10 # threshold when to fallback to insert sort @validate def sort(arr): """ hybrid sort """ hybridsort(arr, 0, len(arr) - 1) return arr def hybridsort(arr, first, last): """ hybrid sort """ stack = [] stack.append(...
from getpass import getpass from ncclient.transport.errors import AuthenticationError from paramiko import AuthenticationException from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.db import transaction from dcim.models import Device, Module, Site class C...
from django.db.models import Q from django.db import models from django.contrib.contenttypes.models import ContentType try: from django.contrib.contenttypes.fields import GenericForeignKey except ImportError: from django.contrib.contenttypes.generic import GenericForeignKey from .generic import GFKOptimizedQue...
# # @file TestRateRule.py # @brief RateRule unit tests # # @author Akiya Jouraku (Python conversion) # @author Ben Bornstein # # $Id$ # $HeadURL$ # # ====== WARNING ===== WARNING ===== WARNING ===== WARNING ===== WARNING ====== # # DO NOT EDIT THIS FILE. # # This file was generated automatically by converting t...
# -*- encoding: utf-8 -*- from shapely.wkt import loads as wkt_loads import dsl from . import FixtureTest class RoadsAccess(FixtureTest): def test_restricted_access(self): # Add surface properties to roads layer (at max zooms) # restricted access road in military base, Kraków, Poland self...
import os from pyalp.php_load import load_lang_file locale_data = os.path.join(os.path.dirname(__file__), '..', 'locale_data') lang = load_lang_file(os.path.join(locale_data, 'en.php')) # lang = load_lang_file(os.path.join(locale_data, 'fr.php')) # this is really just one way of doing things; another would be via ...
# -*- coding: utf-8 -*- """ Data Visualization HS 17 - Exercise 4 Moritz Eck - 14-715-296 """ import ex4_reader as data_reader import matplotlib.pyplot as plt import numpy as np # z-value constants MIN_HEIGHT = 0.035 MAX_HEIGHT = 19.835 STEP_SIZE = 0.2 # desired height HEIGHT = 1.0 # x-values: list containing the h...
#@+leo-ver=4-thin #@+node:2014pythonE.20140517034519.1935:@shadow test.py #@@language python import cherrypy # 這是 MAN 類別的定義 ''' # 在 application 中導入子模組 import programs.cdag30.man as cdag30_man # 加入 cdag30 模組下的 man.py 且以子模組 man 對應其 MAN() 類別 root.cdag30.man = cdag30_man.MAN() # 完成設定後, 可以利用 /cdag30/man/assembly # 呼叫 man...
# Copyright 2018 The TensorFlow Authors. 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 applica...
import imdb import string import os import sys import re import time execfile("hmdb.conf") def print_help(): print "hmdb | [Home Media Data Base]" print " use: %s <-n|-u|-c|-h>" %(sys.argv[0]) print " -n: Create a new database from scratch" print " -u: Update an existing databse with only new files" print ...
# Consider the case where you have one sequence of multiple time steps and one feature. from numpy import array data = array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1.0]) # We can then use the reshape() function on the NumPy array to reshape this one-dimensional array # into a three-dimensional array with 1...
# from pip import models import numpy as np import sys import os import argparse ################################################################### # Variables # # When launching project or scripts from Visual Studio, # # input_dir and output_dir are pa...
import gzip import json import os import shutil import hashlib from os.path import join from warnings import warn from contextlib import closing from functools import wraps from typing import Callable, Optional, Dict, Tuple, List, Any, Union import itertools from collections.abc import Generator from collections import...
""" sentry.management.commands.collectstatic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import os from itertools import chain, izip from operator import itemgett...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('lotnisko', '0005_auto_20160117_1041'), ] operations = [ migrations.RemoveField( model_name='reservedseat', ...
from __future__ import unicode_literals import logging import httplib import operator from requests.adapters import HTTPAdapter import requests from .exceptions import OpenExchangeRatesAccessRestrictedError, OpenExchangeRatesAccessRestrictedOverUseError, \ OpenExchangeRatesInvalidAppIdError, OpenExchangeRatesInv...
from __init__ import * from oauthclient import * class TumblrClient(OauthClient): """ Wrapper for Tumblr APIs :CONSUMER_KEY: Tumblr App ID :CONSUMER_SECRET: Tumblr API Secret :blog: the connected Tumblr blog, if any :user_auth: account of the user on Showcase :auth: boolean flag (if True,...
""" Forms to support third-party to first-party OAuth 2.0 access token exchange """ import provider.constants from django.contrib.auth.models import User from django.forms import CharField from edx_oauth2_provider.constants import SCOPE_NAMES from oauth2_provider.models import Application from provider.forms import OAu...
import os import numpy as np import sonnet as snt import tensorflow as tf import matplotlib.pyplot as plt from utils.data_utils_kitti import wrap_angle, compute_statistics, split_data, make_batch_iterator, make_repeating_batch_iterator, rotation_matrix, load_data_for_stats from utils.method_utils import atan2, compute...
# -*- coding: utf-8 -*- # # PVLIB_Python documentation build configuration file, created by # sphinx-quickstart on Fri Nov 7 15:56:33 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. ...
# -*- coding: utf-8 -*- # # This file is part of EventGhost. # Copyright © 2005-2016 EventGhost Project <http://www.eventghost.net/> # # EventGhost 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 versio...
from .tee_output_file import TeeOutputFile class Environment( object ): class CloneOptions( object ): InheritVariables = "inherit_vars" InheritStreams = "inherit_streams" MakeParentLink = "parent_link" def __init__( self, starting_directory = None, parent = None, starting_variables = N...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2017-2020 Fogpy developers # This file is part of the fogpy package. # 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 versio...
# -*- coding: utf-8 -*- # # pyseqan documentation build configuration file, created by # sphinx-quickstart on Thu Nov 14 22:17:53 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
import Tkinter as tk import sys class Canvas(object): def __init__(self, width, height, size): self.width = width self.height = height self.size = size self.root = tk.Tk() self.root.title('Maze Generation Visualizer') self.canvas = tk.Canvas( self.root, ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('socialaccount', '0001_initial'), ] operations = [ migrations.CreateModel( name='OpenIDNonce', fields...
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014-2017 CERN. # # INSPIRE 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 ...
def extractItsametranslationWordpressCom(item): ''' Parser for 'itsametranslation.wordpress.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('person with an inferior ability', 'person w...
#pylint: disable=no-init,invalid-name from __future__ import (absolute_import, division, print_function) import mantid.simpleapi as api from mantid.api import * from mantid.kernel import * import os from reduction_workflow.find_data import find_data class SANSBeamSpreaderTransmission(PythonAlgorithm): def categ...
# -*- coding: utf-8 -*- import sys import locale from .__about__ import __version__ as version _DEFAULT_ENCODING = "latin1" LOCAL_ENCODING = locale.getpreferredencoding(do_setlocale=True) """The local encoding, used when parsing command line options, console output, etc. The default is always ``latin1`` if it cannot b...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable, Function from binge.layers import ScaledEmbedding, ZeroEmbedding from binge.native import align, get_lib def _gpu(tensor, gpu=False): if gpu: return ...