text
stringlengths
12
6.59M
import rfk from rfk.api import api, check_auth, wrapper from flask import jsonify, request, g import rfk.database from rfk.database.base import User, News, ApiKey from rfk.database.show import Show, UserShow, Tag from datetime import datetime, timedelta from sqlalchemy import func, and_, or_, between @api.route('/w...
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Feature inversion''' import numpy as np import scipy.fftpack from ..core.spectrum import griffinlim from ..core.spectrum import db_to_power from .. import filters from ..util import nnls __all__ = ['mel_to_stft', 'mel_to_audio', 'mfcc_to_mel', 'mfcc_to_aud...
"""Base class for mixture models.""" # Author: Wei Xue <xuewei4d@gmail.com> # Modified by Thierry Guillemot <thierry.guillemot.work@gmail.com> # License: BSD 3 clause from __future__ import print_function import warnings from abc import ABCMeta, abstractmethod from time import time import numpy as np from scipy.mis...
""" ##BOILERPLATE_COPYRIGHT ##BOILERPLATE_COPYRIGHT """ import datetime from types import IntType, StringType from noink import mainDB from noink.data_models import Role, RoleMapping from noink.activity_table import activities as all_activities from noink.activity_table import get_activity_dict from noink.exception...
from five import grok from Products.statusmessages.interfaces import IStatusMessage from plone.directives import form from tn.bulletino import _ from tn.plonemailing import interfaces as pminterfaces from tn.plonemailing import behaviors from z3c.form import button import zope.schema import zope.component class Test...
import numpy as np def ransac(X, y, estimator, min_n_samples, residual_threshold, is_data_valid=None, is_model_valid=None, max_trials=100, stop_n_inliers=np.inf, stop_score=np.inf): """Fit a model to data with the RANSAC (random sample consensus) algorithm. RANSAC is an iterative algori...
from ..base import MLClassifierBase import numpy as np from scipy import sparse class LabelPowerset(MLClassifierBase): """Label Powerset multi-label classifier.""" BRIEFNAME = "LP" def __init__(self, classifier = None, require_dense = None): super(LabelPowerset, self).__init__(classifier = cla...
# Lint as: python3 # 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 ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
""" CLI for tibanna package """ # -*- coding: utf-8 -*- import argparse import inspect import json from ._version import __version__ # from botocore.errorfactory import ExecutionAlreadyExists from .core import API from .vars import TIBANNA_DEFAULT_STEP_FUNCTION_NAME PACKAGE_NAME = 'tibanna' class Subcommands(object...
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
"""Routines that compute Earth nutation.""" from numpy import array, cos, dot, fmod, sin, outer, zeros from .constants import ASEC2RAD, ASEC360, DEG2RAD, tau, T0 from .functions import load_bundled_npy _arrays = load_bundled_npy('nutation.npz') ke0_t = _arrays['ke0_t'] ke1 = _arrays['ke1'] lunisolar_longitude_coeffic...
from django.contrib.gis.db import models from django.contrib.auth.models import User, Group from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic from django.http import HttpResponse from lingcod.features.managers import ShareableGeoM...
#!/usr/bin/env python import sys import threading from time import sleep import signal class ThreadPool(object): """Flexible thread pool class. Creates a pool of threads, then accepts tasks that will be dispatched to the next available thread.""" def __init__(self, number_threads): """Initia...
# Copyright (C) 2014 New York University # This file is part of ReproZip which is released under the Revised BSD License # See file LICENSE for full license details. """Docker plugin for reprounzip. This files contains the 'docker' unpacker, which builds a Dockerfile from a reprozip pack. You can then build a contain...
""" Copyright (c) 2014, Samsung Electronics Co.,Ltd. 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, this list of conditions and...
# -*- coding: utf-8 -*- import django DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'django_linguist', 'USER': 'postgres', 'PASSWORD': '', 'HOST': '', } } SITE_ID = 1 DEBUG = True MIDDLEWARE_CLASSES = ( 'django.contrib.sess...
# -*- coding: UTF-8 -*- ## Copyright 2011-2013 Luc Saffre ## This file is part of the Lino project. ## Lino 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 y...
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket import socks import time import json import threading import string import random import requests import random import os from core.alert import * from core.targets import target_type from core.targets import target_to_host from lib.icmp.engine import do_one ...
# Main Oracle file from oracle_communication import OracleCommunication from db_connection import OracleDb, TaskQueue, UsedInput from oracle_protocol import RESPONSE, SUBJECT from condition_evaluator.evaluator import Evaluator from settings_local import ORACLE_ADDRESS from bitcoind_client.bitcoinclient import Bitcoin...
# -*- coding: UTF-8 -*- # Copyright 2012-2017 Luc Saffre # License: BSD (see file COPYING for details) """Defines the babel field classes (:class:`BabelCharField` and :class:`BabelTextField`) and the :class:`LanguageField` class. **Babel fields** are fields which "generate" in the Django model a series of normal Char...
# -*- coding: UTF-8 -*- # Copyright 2011-2017 Luc Saffre # License: BSD (see file COPYING for details) """Database models for this plugin. A **Project** is something into which somebody (the `partner`) invests time, energy and money. The partner can be either external or the runner of the site. Projects form a tree...
import datetime import logging from decimal import Decimal from django.conf import settings from django.db import models from django.db.models import Q, Avg, Sum, Max, Min from django.contrib.auth.models import User from django.core.exceptions import ValidationError, NON_FIELD_ERRORS from timepiece import utils from...
# # otopi -- plugable installer # Copyright (C) 2012-2013 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any late...
### # Copyright (c) 2010, Valentin Lorentz # 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 conditi...
from todo.test_base import BaseTestCase from todo.models import Entry from todo.database import db_session class EntryTestCase(BaseTestCase): def test_string_representation(self): text = "some text" entry = Entry(text) db_session.add(entry) db_session.commit() query = Entr...
# Motor driver for QuickBot_Follow. # John Brewer 3/31/16 # Copyright (C) 2016 Jera Design LLC # All Rights Reserverd import Adafruit_BBIO.GPIO as GPIO import Adafruit_BBIO.PWM as PWM from time import sleep def init_pins(): GPIO.setup("P8_12", GPIO.OUT) GPIO.output("P8_12", GPIO.LOW) GPIO.setup("P8_10", ...
#!/usr/env/python """ See LICENSE file for copyright and license details. """ from os.path import isfile import shutil import os, sys from decimal import getcontext from database.databaseaccess import DatabaseAccess from pyqt.controllerpyqt import ControllerPyqt from PyQt4 import QtGui from modules.constant ...
# # Author    : Manuel Bernal Llinares # Project   : trackhub-creator # Timestamp : 18-09-2017 09:48 # --- # © 2017 Manuel Bernal Llinares <mbdebian@gmail.com> # All rights reserved. # """ This toolbox models assembly mapping services between Ensembl and UCSC """ import abc import json import requests # Application...
# -*- coding: utf-8 -*- """ Created on Sat Jan 17 18:11:09 2015 @author: mac """ print "hello world:MiT" print "subsubtask "
#ipc_lista1.10 #Faça um programa que peça a temperatura em graus Celsius, transforme e mostre em graus farenheit. c = input("Entre com a temperatura em graus Celsius: ") vt = c * 1.8 f = vt + 32 print "A temperatura em Farenheit é: %.1f
#ipc_lista1.15 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044
# ========================================================================== # # Copyright NumFOCUS # # 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/...
#ipc_lista2.1 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #
# encoding: utf-8 '''Model in MVC :requires: `elixir <http://elixir.ematia.de/>`__ ''' # Ignore the SA string type depr warning from sqlalchemy.exceptions import SADeprecationWarning from warnings import filterwarnings filterwarnings('ignore', 'Using String type with no length for CREATE TABLE', SADepr...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2014 mjirik <mjirik@mjirik-HP-Compaq-Elite-8300-MT> # # Distributed under terms of the MIT license. """ Modul slouží k segmentaci jater. Třída musí obsahovat funkce run(), interactivity_loop() a proměnné seeds, voxelsize, segmentation a in...
#ipc_lista2.05 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um programa para a leitura de duas notas parciais de um aluno. O programa deve calcular a média alcançada por aluno e apresentar: #--A mensagem "Aprovado", se a média alcançada for maior ou igual a sete; #--A mensagem "Reprovado"...
bl_info = { "name": "MSC", "author": "jameswilddev", "version": (0, 0, 0), "blender": (2, 7, 0), "location": "File > Export > MasSplat Cloud (.msc)", "description": "Export face centres as a MasSplat Cloud (.msc)", "category": "Import-Export" } import bpy, struct, math, random class ExportMSC(bpy.types....
from __future__ import print_function import functools import inspect import json import logging.config import re from operator import attrgetter try: # noinspection PyCompatibility from UserDict import IterableUserDict as UserDict # noinspection PyCompatibility from UserList import UserList except Imp...
import tree from typing import Union from ray.rllib.models.action_dist import ActionDistribution from ray.rllib.models.modelv2 import ModelV2 from ray.rllib.utils.annotations import override from ray.rllib.utils.exploration.exploration import Exploration from ray.rllib.utils.framework import try_import_tf, try_import_...
from enum import Enum from django.db import models from django.db.models import Q from django.contrib.auth.models import User class Enumm(Enum): @classmethod def choices(cls): choices = [] for i in cls: choices.append((i.value, i.name)) return tuple(choices) class FoosBa...
from django.contrib.auth.models import User, Group from django.contrib.auth.views import login as django_login from django import forms from django.conf import settings from .models import * from django.http import HttpResponseRedirect from django.shortcuts import render_to_response, render from django.contrib.auth imp...
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Roger Philibert # # This file is part of weboob. # # weboob 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 yo...
from __future__ import unicode_literals import os import bson import logging import furl from modularodm import fields, Q from dateutil.parser import parse as parse_date from modularodm.exceptions import NoResultsFound from framework.auth import Auth from framework.mongo import StoredObject from framework.mongo.uti...
"""Run the webpack command.""" import argparse from dodo_commands.extra.standard_commands import DodoCommand from dodo_commands.framework.util import remove_trailing_dashes class Command(DodoCommand): # noqa decorators = ['docker'] docker_options = [ '--name=webpack', ] def add_arguments_imp...
#!/usr/local/sci/bin/python2.7 #***************************** # # general utilities & classes for Python gridding. # # #************************************************************************ ''' Author: Robert Dunn Created: March 2016 Last update: 12 April 2016 Location: /project/hadobs2/hadisdh/marine/PROGS/Build -...
# Copyright (c) 2016 OpenStack Foundation. # # 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 # # Unle...
# vim: fileencoding=utf-8 """ Translation of v2 """ # pylint: disable=line-too-long,bad-whitespace V2_TRANSLATION = { "en": ("Weather report for:", "Weather", "Timezone", "Now", "Dawn", "Sunrise", "Zenith", "Sunset", "Dusk"), "af": ("Weer verslag vir:", ...
class SimpleRunner(object): """ Simple blocking task runner. """ def run(self, task): """ Simple blocking task runner. Run `task` and its unfinished ancestors. """ primitive_run(task, self.run_parent) def run_parent(self, task): for parent in task...
#-*- coding: utf8 from __future__ import division, print_function from pyksc.dist import dist_all import numpy as np def cost(tseries, assign, centroids, dist_centroids=None): num_series = tseries.shape[0] if dist_centroids is None: dist_centroids = dist_all(centroids, tseries) cost_f ...
#!/usr/bin/env python # Copyright (c) 2013 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """This script will do: 1. Setup src's git initialization. 2. Place .gclient file outside of src. 3. Call gclient sync outside ...
from __future__ import print_function import os, sys, re # we assume (and assert) that this script is running from the virus directory, i.e. inside H7N9 or zika sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) import base.prepare from base.prepare import prepare from base.titer_model import TiterModel ...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division # in python there are built in: sum, min and max def last(values): for last in values: pass return last def nvl(values): for val in values: if val is not None: return val raise ValueError('Not ...
# A 'tree' is a networkx.DiGraph with a single root node (a node without parents) from operator import itemgetter from networkx import Graph from collections import defaultdict def find_root(tree): """ Search and return the first node that has zero predecessors. Will be the root node in directed graphs. A...
#!/usr/bin/env python # -*- coding: utf8 -*- """ Copyright (c) 2011 Tyler Kenendy <tk@tkte.ch> 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...
# Author: Duong Pham # a parallel, naive implementation of software frame interpolation using # provided optical flows (displacement fields) import numpy as np import multiprocessing from itertools import izip import signal def time_steps_for_int_frames(n): # python version sub_divisions = n + 1 time_steps =...
""" Module for reporting into http://www.blazemeter.com/ service Copyright 2015 BlazeMeter Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unles...
#!/usr/bin/python import sys import os.path import xml.dom.minidom import dbus def cmdline_error(): print "usage: gen-gobject xmlfile classname" sys.exit(1) def camelcase_to_lower(s): out =""; out += s[0].lower() last_upper=False if s[0].isupper(): last_upper=True for i in range(1...
import peewee import psycopg2 from playhouse import signals import time import peewee import os from urllib.parse import urlparse import playhouse import hashlib from playhouse.postgres_ext import * import re from functools import reduce import json from peewee import DateTimeField, CharField, IntegerField # urlparse....
#!/usr/bin/env python3 # Copyright 2022 Stanford University, NVIDIA Corporation # # 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 ...
import json import logging from .exceptions import ( JSONRPCInvalidParams, JSONRPCInvalidRequest, JSONRPCInvalidRequestException, JSONRPCMethodNotFound, JSONRPCParseError, JSONRPCServerError, ) from .jsonrpc1 import JSONRPC10Response from .jsonrpc2 import ( JSONRPC20BatchRequest, JSONRPC...
""" Test full indexing setup The fixtures in this module setup a full system with postgresql and elasticsearch running as subprocesses. """ import pytest pytestmark = [pytest.mark.working, pytest.mark.indexing] @pytest.fixture(scope='session') def app_settings(wsgi_server_host_port, elasticsearch_server, postgresql...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ butler allows to setup a welance craft3 cms project """ import sys import inspect from pathlib import Path import os import secrets import subprocess import json import requests import yaml import re import argparse import webbrowser config = { # configuration ve...
#! /usr/bin/env python # -*- coding: utf-8 -*- # http://www.microsoft.com/typography/otspec/otff.htm import os, sys, math #import struct import datetime PARSE_TYPE2CHARSTRING = True ################################################################################ py_ver = sys.version_info[0] # version of python ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Client module for connecting to and interacting with SmartyStreets API """ import json import numbers import requests from .data import Address, AddressCollection from .exceptions import SmartyStreetsError, ERROR_CODES def validate_args(f): """ Ensures that...
## @file # parse FDF file # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2015, Hewlett Packard Enterprise Development, L.P.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # w...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Examples:: triplexibility.py -t 2nd_triplex_FB_ABC.pdb triples-all-v2-rpr/*.pdb --way backbone+sugar --save --suffix ABC --result abc.csv triplexibility.py -t 2nd_triplex_FB_1AUA3_rpr.pdb test_data/triples2/Triple_cWW_tSH_GCA_exemplar_rpr_ren.pdb --way backbone...
import numpy as np import warnings from stingray.base import StingrayObject from stingray.gti import check_separate, cross_two_gtis from stingray.lightcurve import Lightcurve from stingray.utils import assign_value_if_none, simon, excess_variance, show_progress from stingray.fourier import avg_cs_from_events, avg_pds...
import abc import json import requests import woodpecker.misc.utils as utils from woodpecker.elements.transactions.simpletransaction import SimpleTransaction __author__ = 'Stefano' class HttpTransaction(SimpleTransaction): __metaclass__ = abc.ABCMeta def __init__(self, **kwargs): super(HttpTransa...
# # __COPYRIGHT__ # # 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, publish, # distribute, sublicen...
#!/usr/bin/env python3.4 """ Entry point to provide REPL and file processing. """ import judged from judged import context from judged import tokenizer from judged import parser from judged import logic from judged import formatting from judged import worlds from judged import extensions import sys import os import a...
# -*-: coding utf-8 -*- """ snipsskills module """ __version__ = '0.1.6.17' import os import logging SNIPS_CACHE_DIR_NAME = ".snips" HOME_DIR = "/home/pi" SNIPS_CACHE_DIR = os.path.join(HOME_DIR, SNIPS_CACHE_DIR_NAME) NODE_MODULES_LOCATION = SNIPS_CACHE_DIR NODE_MODULES_PATH = os.path.join(NODE_MODULES_LOCATION, "nod...
#!/usr/bin/env python import os, subprocess, argparse, re import webbrowser from datetime import datetime class JarvisSettings(object): def __init__(self): # TODO: Make a test mode where it writes to a test directory. self._env_dir_jarvis_root = os.environ['JARVIS_DIR_ROOT'] self._env_aut...
import os import pymatgen as pmg import pymatgen.io.nwchem as nwchem from cage.landscape import LandscapeAnalyzer from cage import Cage from json import JSONDecodeError """ Small utility scripts that support the use of the cage package. """ # Elements to ignore for the surface facet determination IGNORE = (pmg.El...
# vim:ts=4:sw=4:et: # Copyright 2017-present Facebook, Inc. # Licensed under the Apache License, Version 2.0 # no unicode literals from __future__ import absolute_import, division, print_function import os import pywatchman import WatchmanSCMTestCase import WatchmanTestCase @WatchmanTestCase.expand_matrix class Te...
import os from zapv2 import ZAPv2 as ZAP import time import subprocess from robot.api import logger import base64 import uuid import json import requests from datetime import datetime import boto3 class RoboZap(object): ROBOT_LIBRARY_SCOPE = "GLOBAL" scan_id = "" context_id = "" def __init__(self): ...
# Copyright 2015 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 a...
# -*- coding: utf-8 -*- import os from flask import Blueprint, request, render_template, g from config import config from werkzeug import secure_filename config['UPLOAD_FOLDER'] = 'static/img' config['ALLOWED_EXTENSIONS'] = set(['png', 'jpg', 'jpeg', 'gif']) cms_page = Blueprint('cms_page', __name__, template_folder=...
import datetime from pprint import pprint from django.db import connections from django.shortcuts import render from django.urls import reverse from django.views import View from utils.views import totalize_data from utils.functions import untuple_keys_concat import lotes.models import lotes.queries.pedido from est...
from django.db import models from django.contrib.auth.models import User from django.conf import settings from django.db.models import Q import uuid import json import sys from .utils import can_view_post, can_view_feed, remote_friend # Create your models here. APP_URL = settings.APP_URL class Author(models.Model):...
from __future__ import print_function from datetime import datetime import fcntl from functools import wraps import inspect import json import logging import os import pwd import re import signal import socket import struct import string import subprocess import sys import time import pymysql import consul as pyconsul...
import json import os from mock import MagicMock from tornado.testing import * from tornado.web import Application from arteria.web.app import AppService from delivery.app import routes as app_routes, compose_application from delivery.models.deliveries import StagingStatus from tests.test_utils import assert_eve...
import re import os import sys import glob import stat import time #start: import subprocess import getpass import pwd #attach: import user_client #stop/kill #import signal import errno #send import json import socket #jar-list/jar-get from twisted.internet import reactor import servers #so, guido says using nat...
# Copyright 2015 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 a...
import contextlib import uuid import pytest import stix2 import stix2.base import stix2.registration import stix2.registry import stix2.v21 from ...exceptions import ( DuplicateRegistrationError, InvalidValueError, MissingPropertiesError, ) from .constants import FAKE_TIME, IDENTITY_ID, MARKING_DEFINITION_ID # ...
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from django import forms from ..dossiers.models import PatientRecord from ..personnes.models import Worker from ..ressources.models import ActType from ..middleware.request import get_request from ajax_select import make_ajax_field from ajax_select.fi...
import asyncio import discord import importlib import os import json import random import sys import aiohttp from discord.ext import commands import pprint import logging import json import math def _setup_logging(log): if len(logging.getLogger(__package__).handlers) > 1: log.debug("Skippin...
import logging import time logger = logging.getLogger("socketIO-client") try: logger.addHandler(logging.NullHandler()) except AttributeError: # Workaround for Python 2.6 not having NullHandler # See https://docs.python.org/release/2.6/library/logging.html#configuring-logging-for-a-library class NullHa...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016 Georg Seifert. 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...
# -*- coding: utf-8 -*- import datetime from django.db.models import Q from django.shortcuts import redirect from django.http import HttpResponseRedirect from calebasse.cbv import TemplateView, CreateView, UpdateView from calebasse.agenda.models import Event, EventType, EventWithAct from calebasse.personnes.models i...
from __future__ import absolute_import import chardet import re import six import socket from base64 import b64encode from six.moves.urllib.parse import urlparse, urlunparse from ssl import SSLError from timeit import default_timer if six.PY2: from cookielib import CookieJar class ConnectionRefusedError(Excep...
# -*- coding: utf-8 -*- # pylint: disable=star-args, too-many-arguments, fixme """ This module contains classes for handling DIDL-Lite metadata. `DIDL`_ is the Digital Item Declaration Language , an XML schema which is part of MPEG21. `DIDL-Lite`_ is a cut-down version of the schema which is part of the UPnP ContentD...
# pylint: disable=too-many-lines,R0903,W0142,R0913,C0302 # -*- coding: utf-8 -*- """ This module contains all the data structures for the information objects such as music tracks or genres """ from __future__ import unicode_literals from .xml import XML from .exceptions import CannotCreateDIDLMetadata from .utils ...
# -*- coding: utf-8 -*- """ longboxed.comics.models ~~~~~~~~~~~~~~~~~~~~~~~ Comics module """ import re from datetime import datetime from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy_imageattach.entity import Image, image_attachment from ..core import db #: Many-to-Many relationship fo...
#!/usr/bin/env python from statefbk import ctrb, obsv, place, lqr import numpy as N import unittest class TestStatefbk(unittest.TestCase): def testCtrbSISO(self): A = N.matrix("1. 2.; 3. 4.") B = N.matrix("5.; 7.") Wctrue = N.matrix("5. 19.; 7. 43.") Wc = ctrb(A,B) N.testin...
# -*- coding: utf-8 -*- """ longboxed.manage.comics ~~~~~~~~~~~~~~~~~~~~~~~ comic management commands """ import csv from StringIO import StringIO from flask.ext.script import Command, Option, prompt, prompt_bool from ..core import db from ..helpers import current_wednesday, mail_content, two_wednesdays,...
#!/usr/bin/env python # -*- coding: utf-8 -*- from os import sys, path import json import riak import memcache import gc from pandas import DataFrame from sqlalchemy import create_engine from sqlalchemy.sql import text sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) from utils import fix_render fr...
import os #os.environ["CUDA_VISIBLE_DEVICES"] = "-1" import numpy as np import tensorflow as tf from tensorflow.keras import Model import tensorflow.keras.layers as layers from dense_attention import scaled_attention import sys import time from sklearn.metrics import f1_score import random #tf.enable_eager_execution()...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # The refactoring about the OpenSSL support come from Tryton # ...
#!/usr/bin/env python from __future__ import print_function # png.py - PNG encoder/decoder in pure Python # # Copyright (C) 2006 Johann C. Rocholl <johann@browsershots.org> # Portions Copyright (C) 2009 David Jones <drj@pobox.com> # And probably portions Copyright (C) 2006 Nicko van Someren <nicko@nicko.org> # # Orig...