text
stringlengths
12
6.59M
from __future__ import print_function import sys import math import os _file_dir = os.path.abspath(os.path.dirname(__file__)) os.environ['PANDA_PRC_DIR'] = os.path.join(_file_dir, 'etc') os.chdir(_file_dir) from cefpanda import CEFPanda from direct.showbase.ShowBase import ShowBase, DirectObject from direct.gui.Onsc...
"""Data accessor class for HDF5 files produced by RTS correlator.""" import logging import numpy as np import h5py import katpoint from .dataset import DataSet, WrongVersion, BrokenFile, Subarray, SpectralWindow, \ DEFAULT_SENSOR_PROPS, DEFAULT_VIRTUAL_SENSORS, _robust_target from .sensordata im...
#!/usr/bin/env python2 # # Command line interface for the LightUpAlarm package. # # Copyright (c) 2015 carlosperate https://github.com/carlosperate/ # Licensed under The MIT License (MIT), a copy can be found in the LICENSE file # # The command line interface uses 80 vertical columns, exactly 80 in a lot of # instances...
#!/usr/bin/python2.7 # # Copyright 2012 Google Inc. All Rights Reserved. # """Main entry point for TRS service. This file contains the URL handlers for all the TRS service URLs, implemented using the appengine webapp framework. """ import datetime import json import logging import os.path import urllib from google....
from google.appengine.api import mail import config def send_test_email(user_email): subject = "Test Email" body = "This is a test email from the prelaunch website!" mail.send_mail(config.application_email, user_email, subject, body) def send_signup_email(user_email, referral_id): subject = "Crosswynd...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np from SimPEG import Utils, Mesh from SimPEG.EM.Static import DC from SimPEG.Utils import asArray_N_x_Dim, uniqueRows def electrode_separations( d...
#!/usr/bin/env python # Setup project environment in the parent directory. import os import sys sys.path[0] = os.path.dirname(sys.path[0]) from common.appenginepatch.aecmd import setup_env setup_env() import time from datetime import datetime import urllib2 import random import adns import ADNS from google.appengin...
# # Pyrex - Parse tree nodes # import string, sys, os, time import Code from Errors import error, warning, InternalError import Naming import PyrexTypes import TypeSlots from PyrexTypes import py_object_type, error_type, CTypedefType, CFuncType from Symtab import ModuleScope, LocalScope, \ StructOrUnionScope, P...
# coding=utf-8 """ .. """ from collections import Sequence from django.views.decorators.csrf import csrf_exempt from django.conf.urls import patterns, url from django.conf import settings from django.core.urlresolvers import reverse, resolve from ..http import HttpResponse, constants from .. import encoders, exceptions...
# -*- coding: utf-8 -*- # vim: set ts=4 # Copyright 2013 Rémi Duraffort # This file is part of RandoAmisSecours. # # RandoAmisSecours 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...
#!/usr/bin/env python3 """ Classify 7-series nodes and generate channels for required nodes. Rough structure: Create initial database import by importing tile types, tile wires, tile pips, site types and site pins. After importing tile types, imports the grid of tiles. This uses tilegrid.json, tile_type_*.json and ...
#coding:utf-8 import os import sys import fcntl import time import re import StringIO import tempfile import select from email.parser import Parser from email.message import Message from gettext import gettext as _ from subprocess import Popen, PIPE from mailpile.crypto.state import * from mailpile.crypto.mime import ...
# ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com>, # Just van den Broecke <justb4@gmail.com> # # Copyright (c) 2014 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated document...
from waflib import * from waflib.TaskGen import * import os import optparse FLAMBE_ROOT = os.path.dirname(__file__) + "/../.." SERVER_CONFIG = "/tmp/flambe-server.py" def options(ctx): group = ctx.add_option_group("flambe options") group.add_option("--debug", action="store_true", help="Build a debug version f...
# # Pyrex - Parse tree nodes # import sys, os, time, copy import Code import Builtin from Errors import error, warning, InternalError import Naming import PyrexTypes import TypeSlots from PyrexTypes import py_object_type, error_type, CTypedefType, CFuncType from Symtab import ModuleScope, LocalScope, GeneratorLocal...
""" Game tutor Evennia contrib - Griatch 2020 This contrib is a tutorial menu using the EvMenu menu-templating system. """ from evennia import create_object from evennia import CmdSet from evennia.utils.evmenu import parse_menu_template, EvMenu # goto callables def do_nothing(caller, raw_string, **kwargs): r...
# Initial attempt at a task definition. This is the data structure - # the parsing and interpreting code is elsewhere import logging import attrdict as ad import json import emission.net.ext_service.habitica.proxy as hp import emission.net.ext_service.habitica.auto_tasks.task as enehat def give_points_for_all_tasks(u...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import print_function from __future__ import division from __future__ import unicode_literals from sublime import active_window from os import path from json import loads from glob import glob from threading import Th...
#!/usr/bin/env python # The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/li...
from autotranslate.utils import translate_strings from django.conf import settings from django.core.management.base import BaseCommand from optparse import make_option import os import codecs import polib class Command(BaseCommand): help = ('autotranslate all the message files that have been generated ' ...
from flask import Flask, session, redirect, escape, request, render_template from flask_socketio import SocketIO # import subprocess import os # from arm_interface import ArmInterface # Global Variables and Declarations HOST_IP = "192.168.0.99" script_path = os.path.abspath('external_test_script.py') app = Flask(__na...
#!/usr/bin/env python # # # # # Generate index.html of vagrant box files in our s3 bucket # and upload said file. import boto3 import os class S3_Bucket_IndexCreator(object): """ Class to initialize s3 bucket connection, grab contents, publish index """ def __init__(self, bucket, path): self.s3 = bo...
from stable_baselines.a2c import A2C from stable_baselines.acer import ACER from stable_baselines.acktr import ACKTR from stable_baselines.ddpg import DDPG from stable_baselines.deepq import DeepQ from stable_baselines.gail import GAIL from stable_baselines.ppo1 import PPO1 from stable_baselines.ppo2 import PPO2 from s...
""" 1. Even Tree Given a tree (simple graph with no cycles), remove as many edges form the tree as possible to obtain a forest while: Each connected component of the forest should contain an even number of vertices. Find out the number of removed edges -- input format: two integers means two vertices, and a edge be...
from functools import lru_cache from django.core.management.base import BaseCommand, CommandError from django.db import transaction from events.models import Keyword, KeywordSet, DataSource HELFI_KEYWORD_SET_DATA = { 'id': 'helfi:topics', 'name_en': 'www.hel.fi themes', 'name_fi': 'www.hel.fi-aihepiirit'...
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> from ggrc.models.reflection import AttributeInfo from . import Record class RecordBuilder(object): def __init__(self, tgt_class): self._fulltext_attrs = AttributeInfo.gather_attrs( tgt_clas...
from django.core.files.uploadedfile import SimpleUploadedFile from django.core.files import File from django.core.urlresolvers import reverse from django.contrib.auth.models import User from django.utils.html import escape from django.test import TestCase from django.conf import settings import os.path from .. import...
#!/usr/bin/python # # Copyright (c) 2015, 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, # t...
from werkzeug import generate_password_hash, check_password_hash import shortuuid, datetime, hashlib, threading, json, time, copy, re from collections import defaultdict from totalimpact.providers.provider import ProviderFactory from totalimpact.providers.provider import ProviderTimeout, ProviderServerError from total...
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Mixins to add common attributes and relationships. Note, all model classes must also inherit from ``db.Model``. For example: color color .. class Market(BusinessObject, db.Model): __tablena...
"""Training objective for self-critical learning. Self-critic learning is a modifcation of the REINFORCE algorithm that uses the reward of the train-time decoder output as a baselie in the update step. For more details see: https://arxiv.org/pdf/1612.00563.pdf """ from typing import Callable, Iterable, Tuple from it...
""" Coordinate systems are used to represent the spaces in which the images reside. A coordinate system contains axes; the axes define the coordinates within the coordinate system. For example a 3D coordinate system contains 3 axes. """ __docformat__ = 'restructuredtext' import copy import numpy as np from neuro...
import frappe from frappe.core.doctype.dynamic_link.dynamic_link import deduplicate_dynamic_links from frappe.utils import update_progress_bar def execute(): frappe.reload_doc('core', 'doctype', 'dynamic_link') frappe.reload_doc('contacts', 'doctype', 'contact') frappe.reload_doc('contacts', 'doctype', 'address') ...
import commands import os import Queue import settings import time import threading import serial import sys import traceback from thirtybirds_2_0.Network.manager import init as network_init from thirtybirds_2_0.Updates.manager import init as updates_init class Network(object): def __init__(self, hostname, netwo...
""" Django settings for libreborme project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...)...
from __future__ import print_function, division import pandas as pd import numpy as np from pandas import * from copy import deepcopy from os.path import join, isdir, isfile from os import listdir import re from sys import stdout from nilmtk.datastore import Key from nilmtk.timeframe import TimeFrame from nilmtk.measur...
# -*- coding: utf-8 -*- # # Copyright (C)2006-2009 Edgewall Software # Copyright (C) 2006 Matthew Good <trac@matt-good.net> # Copyright (C) 2006 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distri...
from __future__ import unicode_literals from django import forms from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from casepro.cases.models import Partner from .models import PARTNER_ROLES, ROLE_ORG_CHOICES, ROLE_PA...
# Base class for a BLE network adapter. Each OS supported by the library should # inherit from this class and implement the abstract methods. # Author: Tony DiCola # # Copyright (c) 2015 Adafruit Industries # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associat...
from __future__ import print_function, division import pandas as pd import numpy as np from copy import deepcopy from os.path import join, isdir, isfile from os import listdir import fnmatch import re from sys import stdout from nilmtk.utils import get_datastore from nilmtk.datastore import Key from nilmtk.timeframe im...
# -*- coding: iso8859-1 -*- # # Copyright (C) 2005 Edgewall Software # Copyright (C) 2005 Christopher Lenz <cmlenz@gmx.de> # # Trac 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 # Lic...
# # Copyright (c) 2008 rPath, Inc. # import base64 import BaseHTTPServer import os, sys import urllib from catalogService import clouds from catalogService import config from catalogService import newInstance from catalogService import request as brequest from catalogService import storage from catalogService import ...
# -*- coding: utf-8 -*- # # Copyright (C) 2005-2009 Edgewall Software # Copyright (C) 2005-2006 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://...
from django.core.management.base import BaseCommand from ...models import User class Command(BaseCommand): help = 'Exports users to csv. (first_name, last_name, email)' def handle(self, *args, **options): users = User.objects.all().values( 'first_name', 'last_name', 'email') for u...
import logging import multiprocessing import os import queue import re import struct import time from .device import Device_TCP, DeviceError logger = logging.getLogger(__name__) logger.setLevel(logging.DEBUG) RE_FLOAT = r"[+-]?(\d+)*\.?\d+([eE][+-]?\d+)?" # list of essential variables, which are due to change duri...
import gzip import os import random import re import shutil import string import time import numpy as np import requests from astropy import units as u from astropy.coordinates import SkyCoord from astropy.table import Table, vstack from astroquery.gaia import Gaia Gaia.ROW_LIMIT = 0 from ..utils import makedirs_if_...
""" =========================== Analytical energy demand model algorithm =========================== """ from __future__ import division import multiprocessing as mp import pandas as pd import time import cea.globalvar import cea.inputlocator from cea.demand import occupancy_model from cea.demand import thermal_load...
# ~/ceam/ceam/framework/disease.py import os.path from datetime import timedelta from functools import partial import pandas as pd import numpy as np from ceam import config from .event import listens_for from .population import uses_columns from .values import modifies_value, produces_value from .util import rate_...
"""Ceed data analysis ====================== Code to read the load the recorded Ceed experimental data. """ import math import scipy.io import numpy as np import sys import logging import itertools import nixio as nix from numpy.lib.format import open_memmap from base_kivy_app.utils import yaml_loads from base_kivy...
from numpy.testing import assert_raises import numpy as np from .. import all from .._creation_functions import ( asarray, arange, empty, empty_like, eye, from_dlpack, full, full_like, linspace, meshgrid, ones, ones_like, zeros, zeros_like, ) from .._array_object...
import xml.etree.cElementTree as ET import calendar import datetime import logging from django.contrib.gis.geos import GEOSGeometry, LineString from django.utils.dateparse import parse_duration logger = logging.getLogger(__name__) WEEKDAYS = {day: i for i, day in enumerate(calendar.day_name)} # {'Monday:' 0, cla...
from __future__ import division, print_function import os import genapi from genapi import \ TypeApi, GlobalVarApi, FunctionApi, BoolValuesApi import numpy_api # use annotated api when running under cpychecker h_template = r""" #if defined(_MULTIARRAYMODULE) || defined(WITH_CPYCHECKER_STEALS_REFERENCE_TO_AR...
import requests import datetime import argparse def main(tree): response = requests.get('https://treestatus.mozilla.org/%s/logs?format=json&all=1' % tree, verify=False) results = response.json() delta = datetime.timedelta(0) closed = None dates = {} month = {} total = datetime.timedelta(0)...
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may n...
from . import trelloobject class Checklist(trelloobject.TrelloObject): ''' Class representing a Trello Checklist ''' def __init__(self, trello_client, checklist_id, name='', **kwargs): super(Checklist, self).__init__(trello_client, **kwargs) card_id = kwargs.get('card_id', None) ...
from .text import Text class Email(Text): max = 254 pattern = r'^[^@]+@[^@]+\.[^@]+$' messages = { 'pattern': 'Not a valid email address', }
#!/usr/bin/env python # # ----------------------------------------------------------------------------- # Copyright (c) 2017 The Regents of the University of California # # This file is part of kevlar (http://github.com/dib-lab/kevlar) and is # licensed under the MIT license: see LICENSE. # ----------------------------...
''' (c) 2011, 2012 Lucena Research, LLC. All rights reserved. Created on Jan 1, 2011 @author:Drew Bratcher @contact: dbratcher@gatech.edu @summary: Contains tutorial for backtester and report. ''' from os import path from os import sys from pylab import * from qstkutil import DataAccess as da from qs...
# coding=utf-8 import re from datetime import datetime, time from peewee import CharField, DateTimeField, Expression, Model, SqliteDatabase from .config import DB_PATH from .utils import blue, highlight_tags, pink # Add regex function to SqliteDatabase OP_REGEXP = 'regexp' def regexp(lhs, rhs): return Express...
""" backend.py Keyring Backend implementations """ from __future__ import with_statement import getpass import os import sys import base64 import copy import cPickle import codecs try: import io except ImportError: # Support Python 2.4, 2.5 import StringIO as io try: import configparser except Impo...
""" Copyright (c) 2009 Twilio, 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, publish, distribute, s...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # Autor: jordi collell <jordi@tempointeractiu.cat> # http://tempointeractiu.cat # ------------------------------------------------------------------- ''' ''' from django.views.generic.simple import direct_to_template from django.shortcuts import get_object_or_404 from djan...
''' Button ====== .. image:: images/button.jpg :align: right :class:`Button` is a :class:`~kivy.uix.label.Label` with associated actions that are triggered when the button is pressed (or released after a click/touch). To configure the button, you can use the same properties that you can use for the Label class:: ...
''' Widget class ============ The :class:`Widget` class is the base class required to create a Widget. This widget class is designed with a couple of principles in mind: Event Driven Widget interaction is built on top of events that occur. If a property changes, the widget can respond to the chang...
__version__ = '0.4.9' __author__ = 'Jimmy Liu' """ for trading data """ from tushare.stock.trading import (get_hist_data, get_tick_data, get_today_all, get_realtime_quotes, get_h_data, get_today_ticks, get...
# # Kiwi: a Framework and Enhanced Widgets for Python # # Copyright (C) 2005 Async Open Source # # 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 (a...
""" ============================== Probability Calibration curves ============================== When performing classification one often wants to predict not only the class label, but also the associated probability. This probability gives some kind of confidence on the prediction. This example demonstrates how to vi...
import os from itertools import chain from django.db import models from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from django.dispatch import receiver from django.db.models.signals import pre_save from reversion import revisions from ckeditor.fields import RichTe...
from itertools import chain from django.db import models from django.utils.translation import ugettext_lazy as _ from core.models import BaseModel from source.constants import SOURCE_FREQUENCY_PER_YEAR from source.models import Source, Seed class Harvest(BaseModel): """ Represents the event of harvestin...
# # # 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, ...
from __future__ import print_function, division import time from .delay_import import import_ from .arrays import ensure_type from .unit import in_units_of from .unitcell import (lengths_and_angles_to_box_vectors, box_vectors_to_lengths_and_angles) __all__ = ["ensure_type", "import_", "in_units_...
# # Trains an MNIST digit recognizer using PyTorch, and uses tensorboardX to log training metrics # and weights in TensorBoard event format to the MLflow run's artifact directory. This stores the # TensorBoard events in MLflow for later access using the TensorBoard command line tool. # # NOTE: This example requires you...
# Copyright 2019 DeepMind Technologies Ltd. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# Copyright 2019 DeepMind Technologies Ltd. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
""" This file defines variables for the modelled legislation. A variable is a property of an Entity such as a Person, a Household… See https://openfisca.org/doc/key-concepts/variables.html """ # Import from openfisca-core the Python objects used to code the legislation in OpenFisca from openfisca_core.periods import...
#!/usr/bin/env python3 # # Copyright (C) 2019-2020 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as # published by the Free Software Foundation. # # This program is distributed in the h...
# coding=utf-8 # Filename: hdf5.py # pylint: disable=C0103,R0903 # vim:set ts=4 sts=4 sw=4 et: """ Read and write KM3NeT-formatted HDF5 files. """ from __future__ import division, absolute_import, print_function from collections import OrderedDict import os.path import numpy as np import tables as tb import km3pipe ...
def is_valid(isbn): sum([index * int(number) for index, number in enumerate(isbn.replace('-', '').split().reverse())]) % 11 == 0
# Tweepy # Copyright 2009-2021 Joshua Roesslein # See LICENSE for details. # Appengine users: https://developers.google.com/appengine/docs/python/sockets/#making_httplib_use_sockets import json import logging import ssl from threading import Thread from time import sleep import requests import urllib3 from tweepy.a...
# -*- coding: utf-8 -*- import unittest from openprocurement.auctions.core.tests.base import snitch from openprocurement.auctions.flash.tests.base import ( BaseAuctionWebTest, test_auction_data, test_bids, test_lots, test_organization ) from openprocurement.auctions.core.tests.contract import ( AuctionContrac...
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. import logging import httplib from socket import timeout from threading import Thread from time import sleep import ssl from tweepy.models import Status from tweepy.api import API from tweepy.error import TweepError from tweepy.utils import i...
# Tweepy # Copyright 2009-2021 Joshua Roesslein # See LICENSE for details. # Appengine users: https://developers.google.com/appengine/docs/python/sockets/#making_httplib_use_sockets import json import logging import ssl from threading import Thread from time import sleep import requests import urllib3 from tweepy.a...
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging logger = logging.getLogger(__name__) logging.basicConfig(level=logging.INFO, format='%(levelname)s-[%(module)s][%(funcName)s]: %(message)s') requests_log = logging.getLogger("requests") requests_log.setLevel(logging.WARNING) import sys, time, argparse, ra...
# Copyright 2015 Ian Cordasco # # 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, sof...
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from six.moves import zip, range from six import next import itertools as it import collections import weakref class _Link(object): __slots__ = ('prev', 'next', 'key', '__weakref__') class OrderedSet(colle...
""" Logic for dealing with symlinks. Notice that there is an aditional helper file for everyone's favorite pathological OS. """ from os.path import exists from os.path import islink from os.path import join from os.path import normpath from os.path import os import sys import warnings from ubelt import util_io from ub...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Rackspace Hosting. # # 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....
################################################################################ # # # saadmin.py # # ...
#! /usr/bin/env python """ This script performs event averaging for particle spectra and anisotropic flow coefficients calculated from event-by-event simulations v_n is analyzed up to n = 6 Format for particle_XXX_vndata.dat file: n_order real_part real_part_err imag_part imag_part...
#!/usr/bin/env python # -*- coding: utf8 -*- """ This program is made possible by the awesome python knowledge of my darling Ivana <3 for ever """ import os, fnmatch, json, sys, codecs, time, eyed3, argparse, logging, uuid parser = argparse.ArgumentParser(description='Scans a given directory for MP3\'s and places the...
""" Malwaredomainlist bot Maintainer: Codenomicon <clarified@codenomicon.com> """ import time import socket import urllib import urlparse import idiokit from abusehelper.core import utils, bot, events def parse_valid(value, badset=frozenset(["", "-"])): if value.strip() in badset: return None retur...
# -*- coding: utf-8 -*- # © <YEAR(S)> <AUTHOR(S)> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import _, api, fields, models class AccountAccount(models.Model): _inherit = 'account.account' _name = 'account.account' @api.multi def _get_account_level(self, level):...
import os from celery.loaders.base import BaseLoader DEFAULT_CONFIG_MODULE = "celeryconfig" DEFAULT_SETTINGS = { "DEBUG": False, "DATABASE_ENGINE": "sqlite3", "DATABASE_NAME": "celery.sqlite", "INSTALLED_APPS": ("celery", ), } def wanted_module_item(item): is_private = item.startswith("_") r...
""" KnackHQ Application Client. """ import json import os from collections import abc import requests from knackhq import exceptions class KnackIterable(abc.Iterable): """ Base KnackHQ Iterable Python object. """ def __repr__(self): return '{cls}({self})'.format(cls=type(self).__name__, self...
from django import forms from django.forms import ModelForm from django.forms.models import modelformset_factory from django.forms.widgets import TextInput, Textarea from main import models TEXTAREA_ATTRS = {'rows': '4', 'class': 'span11'} INPUT_ATTRS = {'class': 'span11'} class DublinCoreMetadataForm(forms.Form): ...
# -*- encoding: utf-8 -*- from __future__ import absolute_import import os from .engine import Engine from flask import Flask, request, session, g, redirect, abort, render_template, flash from .utils import Metadata from .engine.acrylamid import AcrylamidEngine # TODO add logging features http://flask.pocoo.org/docs/...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import frappe.defaults from frappe.utils import cstr, cint, flt, comma_or, nowdate from frappe import _ from erpnext.stock.utils impo...
from cmdtree.tree import CmdTree from cmdtree.registry import env CMD_META_NAME = "meta" def _get_cmd_path(path_prefix, cmd_name): full_path = path_prefix if path_prefix is None: full_path = [] full_path.append(cmd_name) return full_path def _mk_group(name, help=None, path_prefix=None): ...
# -*- coding: utf-8 -*- """ Created on Sat Mar 18 19:19:25 2017 @author: Sarah Pickus Poincare plots are an important visualization technique for quantifying the non-linear characteristics of the RR interval time series. They are generated via plotting each RR interval (RR[n]) against the subsequent RR inter...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...