src
stringlengths
721
1.04M
# bootloader.py # Anaconda's bootloader configuration module. # # Copyright (C) 2011 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later versi...
from cloudinit import util from cloudinit.config import cc_yum_add_repo from .. import helpers import logging from StringIO import StringIO import configobj LOG = logging.getLogger(__name__) class TestConfig(helpers.FilesystemMockingTestCase): def setUp(self): super(TestConfig, self).setUp() ...
''' Created on Nov 2, 2014 @author: Arrington ''' from pyHopeEngine import engineCommon as ECOM from superPong.actors.ballAI.ballState.ballState import BallState class BallSad(BallState): #Goal: Feels down, stays on bottom half of screen def __init__(self, ball): super().__init__(ball) transformC...
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2017 Hans-Peter Jansen <hpj@urpla.net> ## Copyright (C) 2016 The Qt Company Ltd. ## ## This file is part of the examples of the Qt Toolkit. ## ## $QT_BEGIN_LICENSE:BSD$ ## Commercial License Usage ##...
# This file is part of PyEMMA. # # Copyright (c) 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER) # # PyEMMA 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 vers...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core, workspace, test_util from caffe2.proto import caffe2_pb2 import caffe2.python.nomnigraph as ng from hypothesis import given import hypoth...
# coding: utf-8 import time # noinspection PyUnresolvedReferences import machine # noinspection PyUnresolvedReferences import hardware on_board_led = machine.Pin(hardware.ON_BOARD_LED_PIN_NO, machine.Pin.OUT) on_board_led.value(0 if hardware.ON_BOARD_LED_HIGH_IS_ON else 1) # LED off def blink_on_board_led(times =...
# -*- coding: utf-8 -*- # Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can r...
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Lab ISO request mapper. """ from sqlalchemy.orm import relationship from everest.repositories.rdb.utils import mapper from thelma.entities.experiment import...
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
import unittest from django.core.exceptions import FieldError from django.db import IntegrityError, connection, transaction from django.db.models import CharField, Count, F, IntegerField, Max from django.db.models.functions import Abs, Concat, Lower from django.test import TestCase from django.test.utils import regist...
''' Reinforcement learning agents. David Johnston 2015 ''' import numpy as np import collections import numbers import random random.seed(1) class OnlineAgent: """ Generic online agent class; executes e-greedy policy, looks up values """ def __init__(self,problem,epsilon=1e-1,tiles=False): ...
# blaplay, Copyright (C) 2012-2013 Niklas Koep # 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 dist...
import sys sys.path[0:0] = [""] import unittest from ctrldaemon import ControlDaemon class TestCtrlDaemon(unittest.TestCase): def setUp(self): self.ctrl_daemon = ControlDaemon("httpd") self.ctrl_daemon_fail = ControlDaemon("service_fail") def test_start_service(self): self.assertTrue...
#!/usr/bin/env python from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2012, The QIIME project" __credits__ = ["Jai Ram Rideout", "Michael Dwan", "Logan Knecht", "Damien Coy", "Levi McCracken", "Greg Caporaso"] __license__ = "GPL" __version__ = "1.8.0-dev" __mainta...
#!/usr/bin/python # # Copyright 2015 VMware Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # unless required by...
# coding=utf-8 # Copyright 2021 The Google Research 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 applicab...
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from coll...
# graphics.py """Simple object oriented graphics library The library is designed to make it very easy for novice programmers to experiment with computer graphics in an object oriented fashion. It is written by John Zelle for use with the book "Python Programming: An Introduction to Computer Science" (Franklin, Beedl...
# coding: utf-8 from django.conf.urls import patterns, url from econordeste.event.views import (CalendarYearArchiveView, CalendarMonthArchiveView, CalendarDayArchiveView, CalendarListView, ...
''' Behaviors ========= .. versionadded:: 1.8.0 This module implements behaviors that can be mixed with existing base widgets. For example, if you want to add a "button" capability to an :class:`~kivy.uix.image.Image`, you could do:: class IconButton(ButtonBehavior, Image): pass This would give you an...
import unittest import axelrod class TestTournamentManager(unittest.TestCase): @classmethod def setUpClass(cls): cls.test_output_directory = './assets/' cls.test_with_ecological = True cls.test_tournament_name = 'test_tournament' cls.test_file_name = 'test_file_name' c...
#!/usr/bin/env python3 """ Unit Tests for the Senate Evacuation problem for Google Code Jam 2016 Round 1C Link to problem description: https://code.google.com/codejam/contest/4314486/dashboard#s=p0 Author: Chris Nitsas (nitsas) Language: Python 3(.4) Date: May, 2016 Usage: python3 test_runme.py """ imp...
#!/usr/bin/env python # encoding: utf-8 #========================================================================================= # 如果提示告警信息,可以根据提示看是否为libgmp版本低的问题,如果是的话,直接升级就可以了 # 使用源码安装或者yum直接安装 #========================================================================================= import argparse import parami...
#__BEGIN_LICENSE__ # Copyright (c) 2015, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # All rights reserved. # # The xGDS platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance ...
import unittest from Practica4 import SchoolMemberFactory, Teacher class SchoolMemberFactoryTest(unittest.TestCase): def test_student_creation(self): student = SchoolMemberFactory.make("student", name = "foo") self.assertEqual(str(student), "Soy el alumno foo!, tengo -1 años y mi ID = XXXXXX") ...
# Copyright (C) 2010 Joel Dunham # # This file is part of OnlineLinguisticDatabase. # # OnlineLinguisticDatabase 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 o...
''' ____ _ _ _ _ _ ____ ___ | _ \ ___ __| | \ | | ___| |_ / \ | _ \_ _| | |_) / _ \ / _` | \| |/ _ \ __| / _ \ | |_) | | | __/ (_) | (_| | |\ | __/ |_ / ___ \| __/| | |_| \___/ \__,_|_| \_|\___|\__| /_/ \_\_| |___| File: ChObject.py Author: Zach Podbie...
from odoo import api, fields, models from odoo import exceptions import logging _logger = logging.getLogger(__name__) class TodoWizard(models.TransientModel): _name = 'todo.wizard' _description = 'To-do Mass Assignment' task_ids = fields.Many2many( 'todo.task', string='Tasks') new_d...
from django.db import models class Quiz(models.Model): title = models.CharField(max_length=200) description = models.TextField() start = models.DateTimeField() end = models.DateTimeField() def __unicode__(self): return self.title class Meta: verbose_name_plural = 'quizes' c...
#!/usr/bin/env python3 import csv import pydoc import subprocess import tempfile class Analyzer(): '''Analyze sequences in fasta file by RDP Classifier. Parameters ---------- fasta_file : str Path to the fasta file containing sequences to be analyzed (default: None) analyzer_file : str ...
#!/usr/bin/env python """TcEx Framework Template Download/Generation Module.""" # standard library import os import sys from typing import Any, Optional # third-party import colorama as c import requests try: # third-party from mako.template import Template except ImportError: # mako is only required for ...
import logging from ckan.lib.cli import CkanCommand class InitDBCommand(CkanCommand): """ Initialises the database with the required tables Connects to the CKAN database and creates the member request tables Usage: paster initdb - Creates the database table member request """...
# ----- Info ------------------------------------------------------------------ __author__ = 'Michael Montero <mcmontero@gmail.com>' # ----- Imports --------------------------------------------------------------- from .exception import ColumnCannotBeNullException from .exception import DataStoreException from .excep...
""":class:`BasePreprocessor` define input and ouutput for processors.""" import abc import functools import typing from pathlib import Path import dill import matchzoo as mz def validate_context(func): """Validate context in the preprocessor.""" @functools.wraps(func) def transform_wrapper(self, *args...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Telegram bot to play UNO in group chats # Copyright (c) 2016 Jannes Höke <uno@jhoeke.de> # # This program 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 Foundatio...
"""Provide the Comment class.""" from typing import Any, Dict, Optional, TypeVar, Union from ...const import API_PATH from ...exceptions import ClientException, InvalidURL from ...util.cache import cachedproperty from ..comment_forest import CommentForest from .base import RedditBase from .mixins import ( Fullname...
import random class Yecrypto: @staticmethod def ascii_encryption(new_file, normal_string): num = 0 ns_dic = {} for i in normal_string: num = num + 1 ns_dic[num] = i ns_dic_keys = [] for i in ns_dic.keys(): ns_dic_keys.append(i) ...
# Copyright 2014-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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 versio...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
import hashlib import logging import cryptography.hazmat.primitives.hashes as c_hashes import cryptography.hazmat.primitives.kdf.hkdf as c_hkdf import cryptography.hazmat.primitives.asymmetric.ec as c_ec import cryptography.hazmat.primitives.serialization as c_ser import cryptography.hazmat.primitives.asymmetric.utils...
import numpy as np from optparse import OptionParser import scipy.linalg as la import scipy.stats as stats import scipy.linalg.blas as blas import pandas as pd import csv import time import fastlmm.util.VertexCut as vc from pysnptools.snpreader.bed import Bed import pysnptools.util as pstutil import pysnptools.util.phe...
# -*- coding: utf-8 -*- # # Author: Taylor Smith <taylor.smith@alkaline-ml.com> # # Metaestimators for the ARIMA class. These classes are derived from the # sklearn metaestimators, but adapted for more specific use with pmdarima. from operator import attrgetter from functools import update_wrapper __all__ = [ 'if...
#!/usr/bin/python ''' Copyright 2015 Javier Legido javi@legido.com rss_py 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...
import unittest import sys from PySide.QtGui import QStandardItemModel, QWidget, QStandardItem from helper import UsesQApplication class QStandardItemModelTest(UsesQApplication): def setUp(self): super(QStandardItemModelTest, self).setUp() self.window = QWidget() self.model = QStandardItemM...
import bpy from bpy.props import IntProperty, CollectionProperty from bpy.types import Panel, UIList # ######################################### # Register # ######################################### def get_activeSceneObject(): return bpy.context.scene.objects.active.name class Uilist_actions_cylinder(bpy.types...
import math from pathlib import Path import youtube_dl from PyQt5 import QtCore class StopError(Exception): pass class DownloadSignals(QtCore.QObject): "Define the signals available from a running download thread" status_bar_signal = QtCore.pyqtSignal(str) remove_url_signal = QtCore.pyqtSignal(str...
naive_hex_c_template = """ #include <libcgc.h> #include <stdlib.h> #include <boolector.h> #include <string.h> enum register_t { eax = 0, ecx = 1, edx = 2, ebx = 3, esp = 4, ebp = 5, esi = 6, edi = 7 }; void die(const char *str) { transmit(2, str, strlen(str), NULL); _terminate(...
from __future__ import print_function import json import threading import time import websocket import alexapi.bcolors as bcolors from baseplatform import BasePlatform class HyperionPlatform(BasePlatform): def __init__(self, config): if config['debug']: print("Initializing Hyperion platform") super(Hyperi...
# Copyright (c) 2010 Cloud.com, Inc # Copyright (c) 2012 Cloudbase Solutions Srl # # 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....
from flask import Flask, Response, request, jsonify import fedmsg.config import fedmsg.meta import json import datetime import pretty import requests from pytz import timezone, UnknownTimeZoneError meta_config = fedmsg.config.load_config([], None) fedmsg.meta.make_processors(**meta_config) app = Flask(__name__) app.d...
# -*- coding: utf-8 -*- """Add permissions for proxy model. This is needed because of the bug https://code.djangoproject.com/ticket/11154 in Django (as of 1.6, it's not fixed). When a permission is created for a proxy model, it actually creates if for it's base model app_label (eg: for "article" instead of "about", ...
#!/usr/bin/env python # # k8000 install script # # See COPYING for info about the license (GNU GPL) # Check AUTHORS to see who wrote this software. from distutils.core import setup from distutils.extension import Extension import sys, glob, re, os # Check for Python < 2.2 if sys.version < '2.2': sys.exit('Error: ...
# -*- coding: utf-8 -*- from django.contrib import admin from django.utils.translation import ugettext_lazy as _ from mptt.admin import MPTTModelAdmin from .models import Channel from .forms import ChannelAdminForm from opps.core.admin import PublishableAdmin from opps.core.admin import apply_opps_rules from opps.cor...
#!/usr/bin/python2 # -*- coding: utf-8 -*- ######################################################################## # # Odoo Tools by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
# coding: utf-8 # ----------------------------------------------------------------------------- # Karajlug.org # Copyright (C) 2010-2013 Karajlug community # # 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 # th...
# Ariane CLI Python 3 # NICard acceptance tests # # Copyright (C) 2015 echinopsii # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) ...
# -*- coding:Utf-8 -*- from tastypie_mongoengine import fields from notification.api.resources.base import NotificationBaseResource from notification.api.doc import HELP_TEXT from notification.models import invoicing_notifications __all__ = ( 'QuotationMakeInvoiceResource', 'QuotationMakeDownPaymentInvoiceR...
# Copyright (C) 2010 Canonical # # Authors: # Gary Lasker # Michael Vogt # # 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; version 3. # # This program is distributed in the hope that it will b...
# (C) British Crown Copyright 2010 - 2015, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
######################################################################## # $Header: /var/local/cvsroot/4Suite/Ft/Xml/Xslt/SaxWriter.py,v 1.9 2005/03/18 23:47:19 jkloth Exp $ """ SAX2 event writer for XSLT output Copyright 2005 Fourthought, Inc. (USA). Detailed license and copyright information: http://4suite.org/COPYR...
""" Simple unlink routines @license: GPL-3+ @author: Paul Tagliamonte <paultag@gmail.com> @date: August 8th, 2011, 00:10 -0000 Unlink a package into the filesystem """ import os.path import Syn.Exceptions import Syn.Policy.Db as D import Syn.Policy.BinaryPackage as B import Syn.Policy.Chroot as C import Syn...
# 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 # d...
# Django settings for kinoko project. import os import sys BASE_PATH = os.path.abspath(os.path.dirname(__file__) + '/..') DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.', # Add '...
#!/usr/bin/python ''' Created on Sep 18, 2009 @author: sgallagh ''' import unittest import os from stat import * import sys srcdir = os.getenv('srcdir') if srcdir: sys.path.append("./src/config") srcdir = srcdir + "/src/config" else: srcdir = "." import SSSDConfig class SSSDConfigTestValid(unittest.Tes...
#!/usr/bin/env python3 # # FILE: 1197-Lonesome_Knight.py # # @author: Arafat Hasan Jenin <opendoor.arafat[at]gmail[dot]com> # # LINK: # # DATE CREATED: 15-06-18 15:40:41 (+06) # LAST MODIFIED: 15-06-18 17:29:41 (+06) # # VERDICT: Accepted # # DEVELOPMENT HISTORY: # Date Version Description # ---------------...
# Copyright (c) 2013 LE GOFF Vincent # 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 th...
''' Bspines and smoothing splines. General references: Craven, P. and Wahba, G. (1978) "Smoothing noisy data with spline functions. Estimating the correct degree of smoothing by the method of generalized cross-validation." Numerische Mathematik, 31(4), 377-403. Hastie, Tibshirani and Friedman (20...
# 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 import json from frappe import msgprint, _ from frappe.utils import cstr, flt, cint from erpnext.stock.stock_led...
import unittest import uuid import pytest import azure.cosmos.documents as documents from azure.cosmos.vector_session_token import VectorSessionToken from azure.cosmos.errors import CosmosError @pytest.mark.usefixtures("teardown") class SessionTokenUnitTest(unittest.TestCase): """Test to ensure escaping of non-asc...
# -*- coding: utf-8 -*- # © 2015 Avanzosc # © 2015 Pedro M. Baeza # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import api, models, fields class MrpProductionWorkcenterLine(models.Model): _inherit = 'mrp.production.workcenter.line' operation_time_lines = fields.One2many( ...
__problem_title__ = "Find the 200th prime-proof sqube containing the contiguous sub-string "200"" __problem_url___ = "https://projecteuler.net/problem=200" __problem_description__ = "We shall define a sqube to be a number of the form, , where and are " \ "distinct primes. For example, 200 = 5...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import jso...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ **tests_constants.py** **Platform:** Windows, Linux, Mac Os X. **Description:** Defines units tests for :mod:`manager.globals.constants` module. **Others:** """ from __future__ import unicode_literals import sys if sys.version_info[:2] <= (2, 6): imp...
from django.core.cache import cache from django.db import models from django.utils.translation import ugettext_lazy as _ from cms.models import CMSPlugin, Page class Teaser(CMSPlugin): """ A Teaser """ title = models.CharField(_("title"), max_length=255) image = models.ImageField(_("image"), upload...
import unittest, time, sys, random sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_hosts, h2o_import as h2i, h2o_jobs, h2o_rf class Basic(unittest.TestCase): def tearDown(self): h2o.check_sandbox_for_errors() @classmethod def setUpClass(cls): localhost = h2o.decide_if_localhost()...
# coding=utf-8 ## # Playback/SelectionInTree test # <p> # Test the node selection in a tree. ## from qtaste import * # update in order to cope with the javaGUI extension declared in your testbed configuration. javaguiMI = testAPI.getJavaGUI(INSTANCE_ID=testData.getValue("JAVAGUI_INSTANCE_NAME")) subtitler = testAPI...
import operator from functools import reduce from django.core import checks from shapely import speedups if speedups.available: speedups.enable() try: import rtree except OSError: rtree_index = False class Index: def __init__(self): self.objects = {} def insert(self, va...
from django.conf.urls import url from . import views app_name = 'wmdadict' urlpatterns = [ # # / # url(r'^$', views.index, name='index'), # /dict/ url(r'^dict/$', views.dictionary_list, name='dictionary_list'), # /dict/5/ url(r'^dict/(?P<field_id>[0-9]+)/$', views.dictionary_detail, name='dict...
""" Read in parts from a cad metrics file. """ import numpy as np from lxml import etree import re from geom_utils import matrix_from_nx_ny_ro conv_dict = {"inch" : 0.0254, "millimeter" : 0.001, "mm" : 0.001, "m" : 1.0} def get_parts(cad_metric_xml_file): """ Return a list of part information. ...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2008-2020, Luis Pedro Coelho <luis@luispedro.org> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal ...
import numpy as np from .._exceptions import ReadError from .._mesh import CellBlock numpy_to_xdmf_dtype = { "int8": ("Int", "1"), "int16": ("Int", "2"), "int32": ("Int", "4"), "int64": ("Int", "8"), "uint8": ("UInt", "1"), "uint16": ("UInt", "2"), "uint32": ("UInt", "4"), "uint64": ("...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Nova Billing # Copyright (C) GridDynamics Openstack Core Team, GridDynamics # # 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...
import OErr, OSystem, Image, InfoList, FArray err=OErr.OErr() ObitSys=OSystem.OSystem ("Python", 1, 103, 1, ["None"], 1, ["../PythonData/"], 1, 0, err) OErr.printErrMsg(err, "Error with Obit startup") # for debugging #OErr.Bomb() list = InfoList.InfoList(); dim = [1,0,0,0,0] InfoList.PPutLong (list, "longItem", dim,...
import logging import posixpath import requests import arrow from functools import partial from errbot import BotPlugin, botcmd from apscheduler.scheduler import Scheduler from BeautifulSoup import BeautifulSoup STOPS = { 'xmassteps': 'bstgajt', 'centre': 'bstgajp', 'hippodrome': 'bstdwmd', 'kennave':...
# -*- coding: utf-8 -*- from __future__ import absolute_import import logging from django.contrib.auth.models import User from django.core.urlresolvers import reverse from sentry.constants import MEMBER_OWNER from sentry.models import Project, Team from sentry.testutils import fixture from sentry.testutils import T...
# 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 not u...
from .FacialEngine import FacialEngine import http.client, urllib.request, urllib.parse, urllib.error, base64 import json, requests import os,sys sys.path.append('/home/mack/threatdetectionservice/') from api import * from api.sql.models import * class MSFTFacialEngine(FacialEngine): name = "MSFT Facial Engine" ...
def Setup(Settings,DefaultModel): # shuffle_effective_1200.py # - in this case always shuffled is better than not shuffled # - and then osm only val is best, osm img mix is second and last is img only Settings["experiment_name"] = "Test_Shuffling_3 models vs 3 models_1200x_markable_299x299_shuffleNowIn...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 15 17:54:35 2017 @author: ale """ #sys.stdout.write(frmt_date) # Counting the number of lines in a file each 5 min import time import datetime as dt import matplotlib.pyplot as plt import plotly as py import plotly.graph_objs as go import numpy as ...
# -*- coding: utf-8 -*- # Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com> # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """This file implements the Kodi xbmcvfs module, either using stubs or alternative functionality""" # flake8: noqa: FI14; pylint: disable=i...
# (C) William W. Cohen and Carnegie Mellon University, 2016 # # support for debugging/visualization # import sys import tkinter as TK import tkinter.ttk import tkinter.font import time from tensorlog import comline from tensorlog import config from tensorlog import dataset from tensorlog import declare from tensorlo...
from __future__ import division, absolute_import, print_function from .base import PlotFunc, PlotFactory from .recursive import popargs, KWS, extract_args, alias import matplotlib.pyplot as plt from matplotlib.axis import Axis as pltAxis import numpy as np import os # for savefig __all__ = ["get_axes", "get_figure",...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import datetime import time from heapq import heappop, heappush fr...
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # ---------------------------------------------------------------------------## # # Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 2003 Mt. Hood Playing Card Co. # Copyright (C) 2005-2009 Skomoroh # # This program is free softwa...
from modules.GoSymbolsExtractor import GoSymbolsExtractor from modules.ImportPathsDecomposer import ImportPathsDecomposer from glob import glob from os import path import sys class ProjectInfo: def __init__(self, noGodeps = []): self.err = "" self.warn = "" self.imported_packages = [] self.package_imports_oc...
"""Helper functions for working with Credentials.""" from __future__ import unicode_literals import logging from openedx.core.djangoapps.credentials.models import CredentialsApiConfig from openedx.core.djangoapps.programs.utils import get_programs_for_credentials from openedx.core.lib.edx_api_utils import get_edx_api_...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import requests from PIL import Image import base64 import datetime import io import json import re from werkzeug import urls from odoo import api, fields, models, SUPERUSER_ID, _ from odoo.addons.http_routing.models.i...
# -*- coding: utf-8 -*- # Copyright(C) 2015 Julien Veyssier # # This file is part of a weboob module. # # This weboob module is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
import calendar import datetime import itertools import os import re import time import zlib from base.constants import CONSTANTS from datasources import thumbnails, twitter, twitterappengine, twitterdisplay from datasources.oauth_keys import SERVICE_PROVIDERS TWITTER_SERVICE_PROVIDER = SERVICE_PROVIDERS['tweetdigest...