text
stringlengths
17
737k
import os import time from tarfile import filemode import StringIO import base64 import glob import fnmatch import pooler import netsvc import os from service import security class file_wrapper(StringIO.StringIO): def __init__(self, sstr='', ressource_id=False, dbname=None, uid=1, name=''): StringIO.Stri...
#!/usr/bin/env python # -*- encoding=utf8 -*- # # stl2srt A program to convert EBU STL subtitle files in the more common SRT format # # Copyright (C) 2011-2012 Yann Coupin # # 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...
"""Parse tree transformation module. Transforms Python source code into an abstract syntax tree (AST) defined in the ast module. The simplest ways to invoke this module are via parse and parseFile. parse(buf) -> AST parseFile(path) -> AST """ from compiler.astpprint import printAst from pprint import pprint # Origi...
from StringIO import StringIO import logging from django import forms from django.conf import settings from django.core.exceptions import ValidationError from django.core.validators import validate_email from django.utils.translation import ugettext as _ from corehq.util.spreadsheets.excel import flatten_json, json_to_...
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from __future__ import print_function import collections import re import sys import tempfile import types from six impor...
# -*- coding: utf-8 -*- # # Copyright (C) 2017 KuraLabs S.R.L # # 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 applicabl...
import bigdl.nn.initialization_method as BInit import numpy as np import bigdl.nn.layer as BLayer from bigdl.optim.optimizer import L1L2Regularizer as BRegularizer import bigdl.optim.optimizer as boptimizer import bigdl.nn.criterion as bcriterion from bigdl.util.common import get_activation_by_name import keras.optimi...
from schemas.user import schema as user_schema import urllib import hashlib from passlib.hash import bcrypt from database.util import insert_document, update_document, \ get_document, deliver_fields from framework.elasticsearch import es import json from framework.redis import redis from modules.util import uniqid,...
#!/usr/bin/env python3.6 import sys import os from pathlib import Path import unittest import subprocess import stat import ctypes import math import contextlib import filecmp import random import string from collections import namedtuple import utils from pybatch import * from pybatch import PythonBatchCommandAccum...
# coding: utf-8 from __future__ import division, unicode_literals """ Created on Jul 16, 2012 """ __author__ = "Shyue Ping Ong, Stephen Dacek" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Jul 16, 2012" import u...
# Copyright 2012 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 law or agreed to in wr...
# # Puppetboard version module # __version__ = '3.1.0.post2'
''' Preprocess raw DESI exposures ''' import re import os import numpy as np import scipy.interpolate from pkg_resources import resource_exists, resource_filename from scipy import signal from scipy.ndimage.filters import median_filter from desispec.image import Image from desispec import cosmics from desispec.maskb...
#!/usr/bin/python import flask, sqlalchemy, json, os, glob from flask import request, render_template, send_from_directory, current_app, session as current_session,jsonify from ..model.database import db from ..utilities import processTableData, getImages, getDAPImages,buildDAPFormDict import sdss.internal.database.u...
############################################################################### # This file holds the implementations for all the API clients. # # If you want to develop a new client, here are some suggestions: Get the fetch # methods working first, then the push, then the liquidsoap notifier. You will # probably want...
''' Tokenizer for RSON. Copyright (c) 2010, Patrick Maupin. All rights reserved. ''' import re class RSONDecodeError(ValueError): pass class Tokenizer(list): ''' The RSON tokenizer uses re.split() to rip the source string apart into smaller strings which may or may not be true standalone to...
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
#!/usr/bin/env python """ Vagrant external inventory script. Automatically finds the IP of the configured vagrant vm(s), and returns it under the host group 'vagrant' Example Vagrant configuration using this script: config.vm.provision :ansible do |ansible| ansible.playbook = "./provision/your_playbook.yml"...
""" Wrap C++ STL containers """ #import warnings from typehandlers.base import ForwardWrapperBase, ReverseWrapperBase, \ Parameter, ReturnValue, param_type_matcher, return_type_matcher, \ TypeConfigurationError, NotSupportedError from typehandlers import codesink from pytypeobject import PyTypeObject import ...
from announcerplugin.api import IAnnouncementFormatter from genshi import HTML from genshi.template import NewTextTemplate, MarkupTemplate from genshi.template import TemplateLoader from trac.config import Option, IntOption, ListOption from trac.core import Component, implements from trac.util.text import wrap, to_unic...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
import os import datetime import collections import subprocess import time from jinja2 import Environment, PackageLoader from slugify import slugify import yaml # TODO(thooms): better template parameters (dict builder) class AtillaLearn: output_dir = 'web' authors_dir = 'content/authors' items_dirs = map...
# LogManager.py # import os import sys import datetime # TODO: Should open a write to a file when started class LoggingComponent(object): def __init__(self, OutFilePath, HeaderTemplateFile=None, Verbose=False, NewLineChar=None): ''' Contructor for logging object ''' ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
"""Tactic to produce goalie behavior, which tracks the ball, moves to block if a shot on goal is taken, and stays within the goalie box (generally).""" from dataclasses import dataclass from typing import List, Optional from typing import Dict, Generic, List, Optional, Tuple, Type, TypeVar import stp.action as action...
__author__ = 'alexisgallepe' import time import logging import os import requests import json import datetime from queue import Queue from . import PeersManager from . import PeerSeeker from . import PiecesManager from . import Torrent from . import Tracker from . import HttpPeer from . import utils from . import pro...
# BEGIN_COPYRIGHT # # Copyright 2009-2014 CRS4. # # 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 agree...
import ldap.modlist as modlist import translit from django.conf import settings from .connection.LDAPManager import LDAPManagerConnection from .utils import generate_crypt_password, get_biggest_LDAP_uid def migrate_to_LDAP(pending_user, password, connection=None): password = generate_crypt_password(password) ...
# coding: utf-8 from __future__ import unicode_literals import re import traceback from functools import wraps import imp settings = imp.load_source('settings', './settings.py') BOT_NAME = settings.BOT_NAME ICON_URL = settings.ICON_URL #from settings import BOT_NAME, ICON_URL TOKENIZE_PATTERN = re.compile(r'["“](.+?...
import json from decimal import Decimal from apps.cowry.factory import _adapter_for_payment_method from apps.cowry.models import PaymentStatuses from apps.cowry_docdata.adapters import default_payment_methods from apps.cowry_docdata.tests import run_docdata_tests from django.test import TestCase from django.test.client...
import argparse import warnings warnings.simplefilter("ignore", DeprecationWarning) import logging from curate.rules import makeRuleStore from rdflib.Graph import Graph from FuXi.Rete.Util import generateTokenSet def curate(): parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("-b", de...
import datetime from rest_framework import status from django.utils import timezone from .models import State, QuestionGroupType, IncomingNumber from schools.models import School, BoundaryType from stories.models import ( Question, Questiongroup ) # Exotel numbers. Find them at http://my.exotel.in/viamentis/ap...
import numpy as np import pandas as pd class GroundFilter: pass class Zhang2003: # TODO arguments to init are messy def __init__(self, array, grid, cell_size, n_windows=5, dh_max=2, dh_0=1, b = 2, interp_method = "nearest"): """ Implements Zhang et. al (2003), a progressive morphologica...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 import re from datetime import date, datetime from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned import rapidsms from rapidsms.parsers.keyworder import * from models import * from utils import * class App(rapidsms.app.App): # lets...
# -*- coding: utf-8 -*- """ pygments.lexers.asm ~~~~~~~~~~~~~~~~~~~ Lexers for assembly languages. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, include, bygroups, using, DelegatingL...
# -*- coding: utf-8 -*- """ pygments.lexers.jvm ~~~~~~~~~~~~~~~~~~~ Pygments lexers for JVM languages. :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import Lexer, RegexLexer, include, bygroups, using, ...
# pyinfra # File: pyinfra/modules/apt.py # Desc: manage apt packages & repositories ''' Manage apt packages and repositories. ''' from __future__ import unicode_literals from datetime import timedelta from six.moves.urllib.parse import urlparse from pyinfra.api import operation from pyinfra.facts.apt import parse_...
#-*- coding:Utf-8 -*- """ .. currentmodule:: pylayers.gis.layout This class handle the description of an Indoor layout Class Layout ============ .. autosummary:: :toctree: generated Utility functions ----------------- .. autosummary:: :toctree: generated/ Layout.__init__ Layout.__repr__ Layout...
from collections import namedtuple import socket import threading import traceback import uuid import sys import logging from kombu.connection import BrokerConnection from kombu.messaging import Consumer from kombu.pools import connections, producers from kombu.entity import Queue, Exchange from kombu.common import ma...
# -*- coding: utf-8 -*- # # try: from tvtk.api import tvtk from mayavi.sources.vtk_data_source import VTKDataSource from mayavi import mlab except: print 'Layout:Mayavi is not installed' import pdb import os import time import copy import glob import pickle import cPickle import ConfigParser import num...
""" Copyright [2009-2014] EMBL-European Bioinformatics Institute 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...
""" Copyright [2009-2017] EMBL-European Bioinformatics Institute 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...
#!/usr/bin/env python """ This module defines classes representing non-periodic and periodic sites. """ from __future__ import division __author__ = "Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyuep@gmail.com" __date__ =...
# # Copyright (c) 2012 rPath, Inc. # # This program is distributed under the terms of the Common Public License, # version 1.0. A copy of this license should have been distributed with this # source file in a file called LICENSE. If it is not present, the license # is always available at http://www.rpath.com/permanent/...
def mine_assoc_rules(isets, min_support=2, min_confidence=0.5): rules = [] visited = set() for key in sorted(isets, key=lambda k: len(k), reverse=True): support = isets[key] if support < min_support or len(key) < 2: continue for item in key: left = frozenset(...
from __future__ import unicode_literals import hashlib import json import time import warnings from django import forms from django.conf import settings from django.contrib import messages from django.contrib.auth import ( authenticate, get_backends, login as django_login, logout as django_logout, ) f...
"""Convolutional dictionary learning""" # Authors: Mainak Jas <mainak.jas@telecom-paristech.fr> # Tom Dupre La Tour <tom.duprelatour@telecom-paristech.fr> # Umut Simsekli <umut.simsekli@telecom-paristech.fr> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Thomas Moreau <thomas....
from core.models import ApplicationVersion as ImageVersion from core.models import Application as Image from core.models import License, BootScript, ProviderMachine, ApplicationThreshold from rest_framework import serializers from api.v2.serializers.summaries import ( BootScriptSummarySerializer, LicenseSummary...
import argparse import json import os from collections import defaultdict from datetime import datetime from functools import partial from time import gmtime, strftime import pytz from scheduled_bots.utils import get_values from tqdm import tqdm from wikidataintegrator import ref_handlers from wikidataintegrator impo...
import glob import os import collections import argparse import subprocess class Batcher: """Takes a glob and a batchsize and returns an iterator that will return the resulting elements in batches of the specified size """ def __init__(self, pattern, batchsize=4): self.filelist = collection...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import inspect import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate __version__ = '10.1.24' def get_default_company(user=None): '''Get default company for user''' from frappe.defaults import get_user_default_as_li...
# Copyright 2011 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 law or agreed to in wr...
import time from se34euca.lib.EucaUITestLib_Base import * class EucaUITestLib_Security_Group(EucaUITestLib_Base): def test_ui_gotopage_security_groups(self): print print "Started Test: GotoPage Security Groups" print self.click_element_by_id("euca-logo") print prin...
from __future__ import with_statement import sys import os import boto from boto.ec2.regioninfo import RegionInfo from boto.exception import EC2ResponseError from ConfigParser import ConfigParser from xmlbuilder import XMLBuilder from lxml import etree as ET from sqlobject import * from sfa.util.faults import * fro...
""" Copyright 2001, 2002 Enthought, Inc. All rights reserved. Copyright 2003-2013 SciPy Developers. 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 abov...
""" Python compute layer >>> from blaze import * >>> from blaze.compute.core import compute >>> accounts = Symbol('accounts', 'var * {name: string, amount: int}') >>> deadbeats = accounts[accounts['amount'] < 0]['name'] >>> data = [['Alice', 100], ['Bob', -50], ['Charlie', -20]] >>> list(compute(deadbeats, data)) ['...
c.JupyterHub.config_file = 'jupyterhub_config.py' # Whitelist of environment variables for the subprocess to inherit # c.Spawner.env_keep = ['PATH', 'PYTHONPATH', 'CONDA_ROOT', 'CONDA_DEFAULT_ENV', 'VIRTUAL_ENV', 'LANG', 'LC_ALL'] c.Spawner.env_keep = [ 'PATH', 'LD_LIBRARY_PATH', 'JAVA_HOME', 'CPATH', 'CMAKE_ROOT', 'h...
from collections import Counter, defaultdict, deque, Iterable, Sized, OrderedDict from functools import partial, total_ordering, reduce from itertools import islice, product, chain, starmap, groupby from math import sqrt, log, ceil from operator import add import concurrent.futures import gzip import heapq import io im...
from django.db.models import BooleanField from django.forms import widgets try: # Django 1.8 from django.core.exceptions import FieldDoesNotExist except ImportError: # Django 1.7 from django.db.models.fields import FieldDoesNotExist def boolean_switch_field(field): def _f(self): v = getatt...
import os ARCH = 'risc-v' CPU = 'e310' # toolchains options CROSS_TOOL = 'gcc' #------- toolchains path ------------------------------------------------------- if os.getenv('RTT_CC'): CROSS_TOOL = os.getenv('RTT_CC') if CROSS_TOOL == 'gcc': PLATFORM = 'gcc' # EXEC_PATH = '/home/tanek/risc-...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Automated tests for checking transformation algorithms (the models package). """ import logging import unittest import multiprocess...
import yaml from tempfile import NamedTemporaryFile from StringIO import StringIO from ConfigParser import ConfigParser from django.contrib.auth import authenticate from go.base.tests.utils import VumiGoDjangoTestCase from go.base.management.commands import go_setup_env from go.base.utils import vumi_api_for_user f...
#!/usr/bin/env python from groupflow_shared import * from mininet.net import * from mininet.node import OVSSwitch, UserSwitch from mininet.link import TCLink from mininet.log import setLogLevel from mininet.cli import CLI from mininet.node import Node, RemoteController from scipy.stats import truncnorm from numpy.rando...
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = 'wesc+api@google.com (Wesley Chun)' import logging from datetime import dat...
from collections import namedtuple import logging import operator from socket import timeout import struct import serial LOGGER = logging.getLogger(__name__) class NewtonSerialConnection(serial.Serial): def __init__(self, port='/dev/ttyUSB0', baudrate=115200): super(NewtonSerialConnection, self).__init__(port=por...
# Copyright (C) 2011 Nippon Telegraph and Telephone 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 required by appli...
import gobject import gst import logging import thread from mopidy.models import Track, Playlist from mopidy.backends import (BaseBackend, BasePlaybackController, BaseCurrentPlaylistController) logger = logging.getLogger(u'backends.gstreamer') def loop(): ...
#!/usr/bin/env python import csv import re import os import time from collections import Counter, defaultdict import http.client import json ipre = re.compile('(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})') # Ignore Google, Baidu, Yandex, Trend Micro, Bing, Yahoo, etc. ignore_prefix = [tuple(p.split('.')) ...
#! /somewhere/python3 from contextlib import contextmanager, _GeneratorContextManager from queue import Queue, Empty from typing import Tuple, Any, Callable, Dict, Iterator, Optional, List from xml.sax.saxutils import XMLGenerator import _thread import atexit import base64 import codecs import os import pathlib import ...
#! /usr/bin/env python3 ''' First pass at converting ClinVar XML into RDF triples to be ingested by SciGraph. These triples comform to the core of the SEPIO Evidence & Provenance model 2016 Apr creating a test set. get a full dataset default ClinVarFullRelease_00-latest.xml.gz ge...
from django.contrib import admin from .models import * from mod import get_module from django.contrib.auth.models import User, Group class MessagePropertyInline(admin.TabularInline): model = MessageProperty extra = 0 class MessageAdmin(admin.ModelAdmin): inlines = [ MessagePropertyInline ...
import os import cgi import json import shutil import hashlib import collections from . import util from . import config from . import tempdir as tempfile DEFAULT_HASH_ALG='sha384' def move_file(path, target_path): target_dir = os.path.dirname(target_path) if not os.path.exists(target_dir): os.makedi...
# encoding: utf-8 #---------------------------------------------------------------------------- # Copyright (C) 2008-2014, IPython Development Team and Enthought, Inc. # Distributed under the terms of the BSD License. See COPYING.rst. #---------------------------------------------------------------------------- fro...
""" Test decarators, these need a seperate module because we are defining functions satically, but decorators need context objects which are defined dynamically. To remedy this, we define a global Context, and use it throughout this module. """ import unittest from unittest import TestCase import numpy from numpy.tes...
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
from operator import attrgetter from django.db import connection, connections, router from django.db.backends import util from django.db.models import signals, get_model from django.db.models.fields import (AutoField, Field, IntegerField, PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotExist) from dja...
from django import forms, VERSION from django.conf import settings +from django.contrib.admin.sites import site from django.utils.safestring import mark_safe from django.utils.text import truncate_words from django.template.loader import render_to_string from django.contrib.admin.widgets import ForeignKeyRawIdWidget ...
import logging logger=logging.getLogger(__name__) from django.conf import settings from django.utils.html import format_html from django.template.loader import get_template from django_presentation.utils import specialInterpretValue from . import FormPresentationItem # preload paths to templates FIELD_TEMPLATE_PATH...
############################################################################### ## ## Copyright (C) 2014-2015, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
import wx from wx import StatusBar as wxStatusB from wx.lib import newevent import wx.richtext import time from sans.guiframe.gui_style import GUIFRAME_ICON #numner of fields of the status bar NB_FIELDS = 4 #position of the status bar's fields ICON_POSITION = 0 MSG_POSITION = 1 GAUGE_POSITION = 2 CONSOLE...
# -*- coding: utf-8 -*- # vim:ts=4:sts=4:sw=4:expandtab import logging import yaml from blist import blist, sortedset, sortedlist from collections import deque from copy import deepcopy from datetime import datetime, timedelta from operator import attrgetter from django.db.models import F from satori.ars import perf ...
# -*- coding: utf-8 -*- from django.test import override_settings from rest_framework_extensions.test import APITestCase from .models import ( NestedRouterMixinUserModel as UserModel, NestedRouterMixinGroupModel as GroupModel, NestedRouterMixinPermissionModel as PermissionModel, NestedRouterMixinTaskM...
from __future__ import division from itertools import product, combinations_with_replacement import numpy as np from numba import unittest_support as unittest from numba import jit, typeof from numba.compiler import compile_isolated from numba.numpy_support import version as np_version from .support import TestCase,...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. #! /usr/bin/env python3 """ Simple distributed kmeans implementation Relies on an abstraction for the training matrix, that can be sharded ove...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (C) 2012 Yahoo! 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.or...
#!/usr/bin/python ''' reated on Mar 7, 2013 @author: gabrielp Given a list of * files makes trackhubs for those files Assumes that you have passwordless ssh setup between the two servers you are transfering files from ''' import argparse import re import os from itertools import groupby from trackhub import Hub, ...
#!/usr/bin/env python """ Datary python sdk version file """ __version__ = "0.1.10"
__author__ = 'patrick' import psycopg2 import os connection = psycopg2.connect(database=os.environ['OPENSHIFT_APP_NAME'], user=os.environ['OPENSHIFT_POSTGRESQL_DB_USERNAME'], password=os.environ['OPENSHIFT_POSTGRESQL_DB_PASSWORD'], host=os.environ['OPENSHIFT_POSTGRESQL_DB_HOST'], port=os.environ['OPENSHIFT_POSTGRESQL_...
from datetime import timedelta from django.utils.timezone import now from django.contrib.auth.models import AnonymousUser from bluebottle.test.factory_models.accounts import BlueBottleUserFactory from bluebottle.time_based.tests.factories import DateActivityFactory, DateActivitySlotFactory, \ DateParticipantFacto...
from __future__ import unicode_literals import datetime import json from django.core.urlresolvers import reverse from django.http import HttpResponsePermanentRedirect, JsonResponse from django.shortcuts import get_object_or_404, redirect from django.template.response import TemplateResponse from ..cart.utils import ...
# -*- coding: utf-8 -*- ''' All salt configuration loading and defaults should be in this module ''' # Import python libs from __future__ import absolute_import from __future__ import generators import os import re import sys import glob import time import codecs import logging from copy import deepcopy import types ...
# Copyright (C) 2012 Aldo Cortesi # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in ...
# Copyright (c) 2019 Aldo Cortesi # Copyright (c) 2019 Sean Vig # # 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, ...
from django.core.urlresolvers import reverse_lazy from django.views.generic import CreateView, DetailView, DeleteView, ListView, UpdateView from braces.views import LoginRequiredMixin from ..forms import RegistrationForm from ..models import get_application_model class ApplicationOwnerIsUserMixin(LoginRequiredMixin...
#!/usr/bin/python -u # -*- coding: utf-8 -*- # Function # dbus_generator monitors the dbus for batteries (com.victronenergy.battery.*) and # vebus com.victronenergy.vebus.* # Battery and vebus monitors can be configured through the gui. # It then monitors SOC, AC loads, battery current and battery voltage,to auto star...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 from collections import defaultdict from decorator import decorator from operator import attrgetter import importlib import io import logging import os import shutil import tempfile import zipfile import re...
import numpy import cupy from cupy import core # TODO(okuta): Implement delete # TODO(okuta): Implement insert def append(arr, values, axis=None): """ Append values to the end of an array. Args: arr (array_like): Values are appended to a copy of this array. values (array_...
from django.conf.urls import url from django.contrib.auth.decorators import login_required from django.contrib.auth.views import login, logout from . import views from .views import ( CreateReport, ListReport, ListMyReport, DetailReport, UpdateReport, DeleteReport, CreateUser, CreateSco...
# -*- coding: UTF-8 -*- """ This module provides functionality for data set analysis. Functions include volcano plots, sorted tables, and plotting sequence levels. """ from __future__ import division # Built-ins import itertools import logging import os import re # IPython # from IPython.display import display # C...
# -*- coding: utf-8 -*- """ kaoru.commands.start ~~~~~~~~ /start command implementation :copyright: (c) 2015 by Alejandro Ricoveri :license: MIT, see LICENSE for more details. """ from telegram import Update, ParseMode, Emoji from . import bot_command from .. import utils # /start command @bot_command def _cmd_ha...