src
stringlengths
721
1.04M
#!/usr/bin/env python """ tweepy(Twitter API) demo """ __author__ = "Manan Kalra" __email__ = "manankalr29@gmail.com" from tweepy import Stream, OAuthHandler from tweepy.streaming import StreamListener import time # Add your own consumer_key = "" consumer_secret = "" access_token = "" access_token_secret = "" c...
from django.shortcuts import get_object_or_404 from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.contrib import messages from django.contrib.auth.decorators import login_required from django.utils.translation import ugettext as _ from jobs_manager_app.models import As...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2014 Thibaut Lapierre <root@epheo.eu>. 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 # # ...
from __future__ import print_function # Copyright 2017 Google 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 # # Unless required by ap...
from .Argument import ArgumentParameter, ArgumentSequenceCurrent, ArgumentSequenceNext from .Column import Column from .Condition import Condition, ConditionWithParameter, ConditionWithOnlyColumns, logger as condition_logger from .ConditionTreeNode import ConditionTreeNodeAnd, ConditionTreeNodeOr from .DataType import ...
from .row import row class cursor(object): def __init__(self, impl): object.__init__(self) self.impl = impl def __getattr__(self, key): return getattr(self.impl, key) def one(self, query, params): if params is None: params = tuple() self.impl.execut...
# -*- coding: utf-8 -*- # Copyright 2020 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...
# -*- coding: utf-8 -*- from builtins import object import os import re import json import base64 import urllib2 import tempfile from copy import copy import webbrowser from qgis.PyQt.QtGui import QIcon, QCursor from qgis.PyQt.QtCore import Qt, QUrl, QFile, QEventLoop from qgis.PyQt.QtWidgets import QMessageBox, QAp...
#!/usr/bin/env python """ This module implements a management library for your collection of ID3-tagged mp3 files. """ import os from os.path import join from mutagen.easyid3 import EasyID3 class ID3Library: """Library of ID3-tagged mp3 files.""" def __init__(self): """Constructor.""" self._data = {} def getT...
""" Django settings for mysite 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, ...) imp...
# -*- coding: utf-8 -*- """Module providing views for a contentpage section""" from AccessControl import Unauthorized from Acquisition import aq_inner from Acquisition import aq_parent from plone import api from plone.api.exc import InvalidParameterError from plone.protect.utils import addTokenToUrl from Products.CMFPl...
#!/usr/bin/env python # -*- coding:utf-8 -*- ''' helper that displays all public album ids for a user''' # Copyright (C) 2009 Florian Heinle # # 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, e...
from os import path from setuptools import setup import pyoptmat here = path.abspath(path.dirname(__file__)) # Get the long description from the RpythonEADME file with open(path.join(here, 'README.md'), encoding='utf-8') as f: long_description = f.read() setup(name='pyoptmat', version=pyoptmat.__version__...
from __future__ import print_function from mqueue.models import MEvent from mqueue.utils import get_user, get_url, get_admin_url, get_object_name def mmessage_create(sender, instance, created, **kwargs): if created is True: # try to get the user user = get_user(instance) # try to get the o...
# # ------------------------------------------------------------ # Copyright (c) All rights reserved # SiLab, Institute of Physics, University of Bonn # ------------------------------------------------------------ # import unittest from basil.dut import Dut from basil.HL.RegisterHardwareLayer import Registe...
# import sys # sys.path.append(".") from keras.layers import Input, Dense import keras.optimizers from keras.models import Model import sklearn.model_selection as mds import numpy as np import problem.load_data as load_data import problem.train_MINST as train_MINST import matplotlib.pyplot as plt import hyperLearn.sam...
from django.test import TestCase from django.test.utils import override_settings from django.utils import timezone from django.core import mail from ovp.apps.users.tests.fixture import UserFactory from ovp.apps.organizations.tests.fixture import OrganizationFactory from ovp.apps.projects.models import Project, Apply...
""" .. Copyright (c) 2016 Marshall Farrier license http://opensource.org/licenses/MIT Extract specific quotes from a comprehensive DataFrame Example entry: { 'Underlying': 'NFLX', 'Strike': 100.0, 'Expiry': datetime.datetime(2016, 3, 18, 23, 0, tzinfo=<bson.tz_util.FixedOffset object at 0x10c4860b8...
#!/usr/bin/python from guild.actor import ActorException from guild.stm import Store, ConcurrentUpdate, BusyRetry import time class InsufficientFunds(ActorException): pass class Account(object): """This is the 'traditional' approach of interacting with the STM module It's here as a bare example, but le...
from tkinter import * import serial import time def ausgeben(daten): datenEinzeln = daten.split() root = Tk() root.attributes("-fullscreen", True) root.config(bg = "light green") frameo = Frame(root) frameu = Frame(root, bg = "light green") temp = "0" luftfeu = "0" luftdruck = "0" gas = "0" regen = "0"...
# Copyright 2014, 2018 IBM Corp. # # 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 ag...
import mock class EddTestCase(mock.TestCase): def setUp(self): self.setupModules( ['_isys', 'logging', 'pyanaconda.anaconda_log', 'block']) def tearDown(self): self.tearDownModules() def test_biosdev_to_edd_dir(self): from blivet.devicelibs import edd path = ed...
# Python SDK # https://github.com/box/box-python-sdk # Python scripting is usually done within a Virtual Environment # sudo pip install virtualenv # This line creates the environment, starts it, then installs the packages needed # virtualenv pythonruntime && source pythonruntime/bin/activate && pip install -U setupto...
""" locallibrary URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='h...
# -*- coding: utf-8 -*- """ werkzeug.contrib.testtools ~~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements extended wrappers for simplified testing. `TestResponse` A response wrapper which adds various cached attributes for simplified assertions on various content types. :copyright:...
""" Demo performing Bayesian optimization on an objective function sampled from a Gaussian process. This script also demonstrates user-defined visualization via a callback function that is imported from the advanced demo. Note that in this demo we are sampling an objective function from a Gaussian process. We are not,...
# hgweb/hgweb_mod.py - Web interface for a repository. # # Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net> # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2, incorporated herein by reference...
from __future__ import print_function import difflib import vfp2py def Test0(): input_str = ''' *comment; continued on another line; and another LOCAL STRING_VAL, FLOAT_VAL, MONEY_VAL, INT_VAL, BLOB_VAL, BOOL_VAL, NULL_VAL, NULLDATE_VAL, DATE_VAL, DATETIME_VAL, OBJ_VAL LOCAL Y, Z, W STRING_VAL = \'str\' ü1 ...
# Copyright 2014 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. import telemetry.timeline.async_slice as async_slice_module import telemetry.timeline.event_container as event_container import telemetry.timeline.flow_event ...
# -*- coding: utf-8 -*- # Copyright (C) 2015 ZetaOps Inc. # # This file is licensed under the GNU General Public License v3 # (GPLv3). See LICENSE.txt for details. from pyoko.db.adapter.db_riak import BlockSave from ulakbus.models import Ogrenci, User, Donem, SinavEtkinligi from zengine.lib.test_utils import BaseTest...
import base64 import logging from datetime import datetime import background import mapbox from redis import StrictRedis from . import application from .geography import is_land, random_coords from .models import SatMap __all__ = ["get_current_map"] logger = logging.getLogger("root") redis = StrictRedis.from_url(ap...
""" Infrastructure for dealing with plugins. """ import pkg_resources import warnings from collections.abc import Mapping from .exceptions import PluginExistsError, PluginNotFoundError, InvalidPluginError, verify_type __author__ = 'Aaron Hosford' __all__ = [ 'PluginGroup', 'CONFIG_LOADERS', 'URL_SCHE...
from .test_us_payslip import TestUsPayslip, process_payslip from openerp.addons.l10n_us_hr_payroll.l10n_us_hr_payroll import USHrContract from sys import float_info class TestUsPayslip2017(TestUsPayslip): # FUTA Constants FUTA_RATE_NORMAL = 0.6 FUTA_RATE_BASIC = 6.0 FUTA_RATE_EXEMPT = 0.0 # Wag...
#!/usr/bin/python # # Copyright (c) 2016, Nest Labs, 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: # 1. Redistributions of source code must retain the above copyright # notice, thi...
from typing import Optional import fsui from fsgamesys.amiga.amiga import Amiga from fsgamesys.context import fsgs from fsgamesys.product import Product from fswidgets.panel import Panel from fswidgets.widget import Widget from launcher.i18n import gettext from launcher.launcher_signal import LauncherSignal from launc...
# -*- coding: utf-8 -*- from moronbot import MoronBot from IRCMessage import IRCMessage from IRCResponse import IRCResponse, ResponseType class CommandInterface(object): triggers = [] acceptedTypes = ['PRIVMSG'] help = '<no help defined (yet)>' runInThread = False priority = 0 def __init...
# Copyright 2015 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...
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
from __future__ import absolute_import, unicode_literals from django.conf import settings from django.contrib.auth import get_user_model from django.db import connections from django.shortcuts import render from django.template.loader import render_to_string from wagtail.wagtailadmin.navigation import get_explorable_...
# # Copyright (c) 2009 CodeSourcery # Copyright (c) 2013 Stefan Seefeld # All rights reserved. # # This file is part of OpenVSIP. It is made available under the # license contained in the accompanying LICENSE.GPL file. import os import qm from qm.fields import * from qm.executable import * from qm.extension impo...
"""Tests examples of the parameters q and e""" from preprocessing import import_wsj, replace_rarities from parameters import sx_counts, uvs_counts, uv_counts, s_counts, q, e sentences = import_wsj("train") #print(sentences[0]) new_sentences = replace_rarities(sentences) #print(new_sentences[0]) sx_counts = sx_count...
import copy __author__ = "Rafael Arquero Gimeno" class Node(object): def __init__(self): self.data = [] self.left = None self.right = None def clear(self): """Empty Node""" self.data = [] self.left = None self.right = None def clearData(self): ...
import logging from pylons import request, response, session, url, tmpl_context as c from pylons.controllers.util import abort, redirect from fmod.lib.base import BaseController, render from fmod import model log = logging.getLogger(__name__) class ModerateController(BaseController): requires_auth=True def __b...
import math import numpy as np import random def initParticles(particleNum, imageHeight, imageWidth): particles = np.zeros((particleNum,3), dtype=float) for i in range(particleNum): particles[i][0] = random.randint(0,imageWidth) particles[i][1] = random.randint(0,imageHeight) particles[i][2] = 0 return par...
# Copyright 2014-2018 The PySCF Developers. 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...
import collections class Solution: def alienOrder(self, words: List[str]) -> str: letters = set() prev = '' graph = collections.defaultdict(set) for word in words: for c in word: letters.add(c) for a, b in zip(prev, word): if a...
from __future__ import division from math import pi import numpy as np import random # import matplotlib.pyplot as plt class SineOsc: def __init__(self): self.sample_rate = 44100 def wave(self, frequency, length, rate): """produces sine across np array""" length = int(length * rate) ...
#!/usr/bin/env python # encoding: utf-8 from io import BytesIO import asyncio from isperdal.response import Response from isperdal.utils import Result, Err class fakeStreamIO(): def __init__(self, buffer=b''): self.buffer = BytesIO(buffer) @asyncio.coroutine def read(self): return self....
import os, sys import re from sklearn.externals import joblib from bs4 import BeautifulSoup from collections import defaultdict basepath = os.path.expanduser('~/Desktop/src/Stumbleupon_classification_challenge/') sys.path.append(os.path.join(basepath, 'src')) from data import load_datasets class Parse(): TAGS =...
#!/usr/bin/env python import argparse import logging logging.basicConfig(level=logging.INFO) log = logging.getLogger(name="blasttab2gff3") __doc__ = """ Blast TSV files, when transformed to GFF3, do not normally show gaps in the blast hits. This tool aims to fill that "gap". """ def blasttsv2gff3(blasttsv, min_dice...
""" Parser that reads history files Files can be generated by adding ``set his 1`` to the input file """ from numpy import empty, asfortranarray, array from serpentTools.utils import convertVariableName, deconvertVariableName from serpentTools.parsers.base import BaseReader from serpentTools.messages import warning,...
# -*- coding: utf-8 -*- """A model of an Infrastructure PhysicalServer in CFME.""" import attr from navmazing import NavigateToSibling, NavigateToAttribute from cached_property import cached_property from wrapanapi.lenovo import LenovoSystem from cfme.common import PolicyProfileAssignable, WidgetasticTaggable from cfm...
# -*- coding: utf8 -*- """ Tests of helper functions from pylatest.xdocutils.utils module. """ # Copyright (C) 2018 Martin Bukatovič <martin.bukatovic@gmail.com> # # 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 S...
CURRENT_SEASON = '2016-17' TEAMS = { 'ATL': { 'abbr': 'ATL', 'city': 'Atlanta', 'code': 'hawks', 'conference': 'Eastern', 'displayAbbr': 'ATL', 'displayConference': 'Eastern', 'division': 'Southeast', 'id': '1610612737', 'name': 'Hawks', ...
from shapely.geometry import (box, LineString, MultiLineString, MultiPoint, Point, Polygon) import shapely.ops def endpoints_from_lines(lines): """Return list of terminal points from list of LineStrings.""" all_points = [] for line in lines: for i in [0, -1]: # start and end point ...
# Copyright (c) 2010-2016 OpenStack Foundation # # 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...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012 # Associazione OpenERP Italia (<http://www.openerp-italia.org>) # # This program is free software: you can redistribute it and/or modify # ...
# Copyright (c) 2017 Huawei Technologies Co., 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 # # ...
import os from django import forms from . import appsettings class TemplateFilePathFieldForm(forms.FilePathField): """ The associated formfield to select a template path. This was adapted from `fluent_pages/forms/fields.py` in the `django-fluent-pages` app. """ def __init__(self, *args, **kw...
# Copyright 2012 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 # # Unless requ...
#!/usr/bin/env python # -*- encoding: utf-8 -*- """A module with test cases for the YARA database method.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import os from grr_response_server.databases import db from grr_response_server.rdfvalues import ...
# Django settings for test project. import os, sys PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) join = lambda p: os.path.abspath(os.path.join(PROJECT_ROOT, p)) sys.path.insert(0, join('..')) DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3'...
import unittest from decimal import Decimal from io import StringIO import pandas as pd import pandas.util.testing as tm import pytest import ibis import ibis.expr.api as api import ibis.expr.types as ir from ibis import literal as L from ibis.common.exceptions import RelationError from ibis.expr.datatypes import Cat...
""" The :mod:`sklearn.utils` module includes various utilities. """ from collections import Sequence import numpy as np from scipy.sparse import issparse import warnings from .murmurhash import murmurhash3_32 from .validation import (as_float_array, assert_all_finite, warn_if_not_float, ...
"""Support for Modbus switches.""" import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_COMMAND_OFF, CONF_COMMAND_ON, CONF_NAME, CONF_SLAVE, STATE_ON) from homeassistant.helpers import config_validation as cv from homeassistant....
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, "README.md"), encoding="utf-8") as f: long_description = f.read() setup( name="brink", version="0.3.0", description="A simple real time web fra...
# encoding: utf-8 # 2013 © Václav Šmilauer <eu@doxos.eu> import unittest from minieigen import * import woo._customConverters import woo.dem class TestGridStore(unittest.TestCase): def setUp(self): self.gs=woo.dem.GridStore(gridSize=(5,6,7),cellLen=4,denseLock=True,exNumMaps=4) self.ijk=Vector3i(...
from django.conf.urls import url, include, patterns from django.contrib import admin from django.conf import settings handler403 = 'core.views.forbidden' handler404 = 'core.views.page_not_found' handler500 = 'core.views.server_error' urlpatterns = patterns( 'core.views', # api urls - WARNING: Do NOT change t...
''' This file is part of batti, a battery monitor for the system tray. Copyright (C) 2010 Arthur Spitzer 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 ...
from typing import Callable, Dict, Optional, Union from unittest.mock import Mock import pytest from eth_utils import to_canonical_address from matrix_client.user import User from raiden.network.transport.matrix import AddressReachability, UserPresence from raiden.network.transport.matrix.utils import USERID_RE, User...
""" Tools for Energy Model Optimization and Analysis (Temoa): An open source framework for energy systems optimization modeling Copyright (C) 2015, NC State University 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 So...
#!/usr/bin/env python # Copyright (c) 2014 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. """ Generate bench_expectations file from a given set of bench data files. """ import argparse import bench_util import os import ...
# coding: utf-8 from base import * from PySide import QtGui, QtCore import requests import json import urllib2 class Routine9812(WinthorRoutine): def __init__(self, *args): # super(WinthorRoutine, self).__init__('TESTE') print(args) super(Routine9812, self).__init__(args[4] or 9812, u'Cálcu...
# Copyright (C) 2012 Victor Semionov # 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 conditions and ...
#!/usr/bin/python # -*- encoding: utf-8 -*- """ Tornado Restless BaseHandler Handles all registered blueprints, you may override this class and use the modification via create_api_blueprint(handler_class=...) """ import inspect from json import loads import logging from math import ceil from traceback imp...
import numpy as np from numpy.testing import dec, assert_equal, assert_almost_equal from statsmodels.graphics.functional import \ banddepth, fboxplot, rainbowplot try: import matplotlib.pyplot as plt have_matplotlib = True except: have_matplotlib = False def test_banddepth_BD2(): xx = n...
""" Goal Sentry API Main Application """ from flask import Flask, request from database import session as db from json import dumps as jsonify from utilities import row2dict import authentication import models app = Flask(__name__) @app.route("/") def hello(): return "<h1>Goal Sentry API</h1>" """ Standard Re...
import math import requests import time import xml.etree.ElementTree as ET # from .config import config class S3: def __init__(self, bucket, endpoint_url=None): """ The S3 class provides methods to manage files from a bucket. :param bucket: The bucket to use :type bucket: String ...
# -*- coding: utf-8 -*- # Generated by Django 1.10.3 on 2016-12-05 22:18 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import modelcluster.fields class Migration(migrations.Migration): dependencies = [ ('cms', '0024_programtabpage'), ...
import logging import os from functools import wraps from flask import jsonify, request from mediacloud.error import MCException logger = logging.getLogger(__name__) def validate_params_exist(form, params): for param in params: if param not in form: raise ValueError('Missing required value f...
import datetime from decimal import Decimal, ROUND_DOWN import urllib from django.conf import settings from django.core.urlresolvers import reverse from django.utils import timezone from dwolla import constants, transactions, oauth, fundingsources import stripe TEST = 'test' LIVE = 'live' stripe.api_version = '2015-...
#init from camera from bge import logic, render from particle import Particle from mathutils import Vector, Matrix gdict = logic.globalDict def draw(): camera = scene.objects["Camera"] string = "BondCraft" ###draws bonds and changes text before frame load atoms = gdict["atoms"].copy() for atom ...
import logging from flask import request from flask_restful import Resource from apimes import utils LOG = logging.getLogger(__name__) class Message(Resource): def __init__(self): self.driver = utils.get_driver() def post(self, topic): if not utils.is_valid_name(topic): msg = ...
# -*- coding: utf-8 -*- import os from core.item import Item from platformcode import config, logger, platformtools from channelselector import get_thumb if config.is_xbmc(): import xbmcgui class TextBox(xbmcgui.WindowXMLDialog): """ Create a skinned textbox window """ def __i...
from __future__ import unicode_literals from django.apps.registry import Apps from django.db import models from django.db.utils import DatabaseError from django.utils.encoding import python_2_unicode_compatible from django.utils.timezone import now from .exceptions import MigrationSchemaMissing class MigrationRecor...
# Copyright 2021 The Orbit 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 applicable l...
# This file contains code dealing specifically with converting Mercurial # repositories to Git repositories. Code in this file is meant to be a generic # library and should be usable outside the context of hg-git or an hg command. import os import stat import dulwich.objects as dulobjs from mercurial import ( uti...
#!/usr/bin/python # coding: utf-8 -*- # (c) 2017, Wayne Witzel III <wayne@riotousliving.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1...
import os import requests from datetime import datetime from dateutil.parser import parse from dateutil import tz from pytz import timezone from threading import Thread from overlord import celery from utils import Event, Email, headers from email.mime.multipart import MIMEMultipart from email.mime.text import MIMET...
# 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...
# -*- coding: utf-8 -*- # # Copyright (C) 2011-2014 Martijn Kaijser # # 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 ...
# Copyright 2014 Open Source Robotics Foundation, 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 # # Unless required by applicable law...
import unittest import scipy from SloppyCell.ReactionNetworks import * lorenz = Network('lorenz') lorenz.add_compartment('basic') lorenz.add_species('x', 'basic', 0.5) lorenz.add_species('y', 'basic', 0.5) lorenz.add_species('z', 'basic', 0.5) lorenz.add_parameter('sigma', 1.0) lorenz.add_parameter('r', 2.0) lorenz....
#!/usr/bin/python # # Copyright 2015 Google 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 # # Unless required by applicable law or a...
from dateutil import parser from pdb import set_trace import random from olipy.ia import Audio from botfriend.bot import BasicBot from botfriend.publish.podcast import PodcastPublisher class PodcastBot(BasicBot): COLLECTION = "podcasts" def update_state(self): # Grab the 100 most recently posted po...
""" @file constants.py This script contains TraCI constant definitions from <SUMO_HOME>/src/traci-server/TraCIConstants.h generated by "rebuildConstants.py" on 2012-12-03 12:37:11.425000. SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ Copyright (C) 2009-2013 DLR (http://www.dlr.de/) and contr...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.contrib.gis.db.models.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='WorldBorder', fields...
import decimal import datetime import json from functools import wraps import dateutil import pemi.transforms __all__ = [ 'StringField', 'IntegerField', 'FloatField', 'DateField', 'DateTimeField', 'BooleanField', 'DecimalField', 'JsonField' ] BLANK_DATE_VALUES = ['null', 'none', 'na...
#coding=utf-8 import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'hard to guess string' SQLALCHEMY_COMMIT_ON_TEARDOWN = True MAIL_SERVER = 'smtp-mail.outlook.com' MAIL_PORT = 25 MAIL_USE_TLS = True MAIL_USERNAM...
# -*- coding: utf-8 -*- # Copyright 2009-2017 Noviat # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import calendar from datetime import datetime from dateutil.relativedelta import relativedelta import logging from sys import exc_info from traceback import format_exception from openerp import api, fi...