text
stringlengths
475
200k
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import argparse import os from datetime import timedelta from colorclass.toggles import disable_all_colors from flexget import options, plugin from flexget.event import ev...
# -*- coding: utf-8 -*- """ Chat Room Demo for Miniboa. """ import logging from miniboa import TelnetServer IDLE_TIMEOUT = 300 CLIENT_LIST = [] SERVER_RUN = True def on_connect(client): """ Sample on_connect function. Handles new connections. """ logging.info("Opened connection to {}".format(cli...
#!/usr/bin/env python """ pycallgraph U{http://pycallgraph.slowchop.com/} Copyright Gerald Kaszuba 2007 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 ...
import sys, socket, select, time from optparse import OptionParser XBOX_PORT = 5050 XBOX_PING = "dd00000a000000000000000400000002" XBOX_POWER = "dd02001300000010" help_text = "xbox-remote-power.py -a <ip address> -i <live id>" py3 = sys.version_info[0] > 2 def main(): parser = OptionParser() parser.add_opti...
#!/usr/bin/env python3 """Describe the test coverage of PSA functions in terms of return statuses. 1. Build Mbed Crypto with -DRECORD_PSA_STATUS_COVERAGE_LOG 2. Run psa_collect_statuses.py The output is a series of line of the form "psa_foo PSA_ERROR_XXX". Each function/status combination appears only once. This scr...
# Copyright 2016 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...
# Copyright (c) 2013 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 agreed to...
"""SCons.Tool.g++ Tool-specific initialization for g++. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001 - 2015 The SCons Foundation # # Permission is hereby granted, free of charge, to...
""" Tests for dit.npscalardist. """ from __future__ import division from nose.tools import assert_almost_equal, assert_equal, assert_raises, \ assert_true, assert_false from numpy.testing import assert_array_almost_equal from dit import Distribution, ScalarDistribution from dit.exceptions impo...
#!/usr/bin/env python # Test whether a client responds correctly to a PUBLISH with QoS 1. # The client should connect to port 1888 with keepalive=60, clean session set, # and client id publish-qos1-test # The test will send a CONNACK message to the client with rc=0. Upon receiving # the CONNACK the client should veri...
# Copyright © 2020, Joseph Berry, Rico Tabor ([EMAIL]) # OpenDrop is released under the GNU GPL License. You are free to # modify and distribute the code, but always under the same license # (i.e. you cannot make commercial derivatives). # # If you use this software in your research, please cite the following # journal...
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-02 22:32 from __future__ import unicode_literals import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone import django.views.generic.base class Migration(migrations.Mi...
# -*- coding: utf-8 -*- # # 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 #...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>) # Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>) # # This program is f...
# -*- coding: utf-8 -*- # Copyright(C) 2013-2014 Fourcot Florent # # 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 Lesser General Public License as published by # the Free Software Foundation, either version 3 of th...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ A reproduction of Figure 5.6 from Rasmussen & Williams (2006). http://www.gaussianprocess.org/gpml/ """ from __future__ import division, print_function import numpy as np import scipy.optimize as op import statsmodels.api as sm import matplotlib.pyplot as pl import ...
#!/usr/bin/python import numpy as np import flycapture2 as fc2 import ctypes import sys import time import cv2 def getBuildInfoStr(ver): verStr = "FlyCapture2 library version: %d.%d.%d.%d" % \ (ver.major, ver.minor, ver.type, ver.build) return verStr def getCameraInfoStr(pCamInfo): camInfoStr = "\n*** CAMERA IN...
# Configuration file for jupyter-notebook. #------------------------------------------------------------------------------ # Application(SingletonConfigurable) configuration #------------------------------------------------------------------------------ ## This is an application. ## The date format used by logging f...
import itertools import logging import os import time from math import pow def next_or_default(it, default=None): """ return the next() value of `it`, unless it raises StopIteration, in which case `default` is returned. """ try: return next(it) except StopIteration: return defa...
#******************************************************************************* # Copyright (c) 2015 Dr. Philip Wenig # # All rights reserved. # This program and the accompanying materials are made available under the # terms of the Eclipse Public License v1.0 which accompanies this distribution, # and is available at...
#!/usr/bin/env python # Copyright 2014 Scalyr 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 ag...
from __future__ import division, print_function, absolute_import from scipy._lib.six import with_metaclass from numpy.testing import dec from scipy.special._testutils import MissingModule, check_version, DecoratorMeta from scipy.special._mptestutils import mp_assert_allclose from scipy.special._precompute.utils import...
# Copyright (C) by Josh Blum. See LICENSE.txt for licensing information. import unittest import gras import numpy from gras import TestUtils class MyBlock(gras.Block): def __init__(self): gras.Block.__init__(self, "MyBlock", out_sig=[numpy.uint32], in_sig=[numpy.uint32]) self.numeric_value = 0 ...
# -*- coding: utf-8 -*- # Dioptas - GUI program for fast processing of 2D X-ray diffraction data # Principal author: Clemens Prescher ([EMAIL]) # Copyright (C) 2014-2019 GSECARS, University of Chicago, USA # Copyright (C) 2015-2018 Institute for Geology and Mineralogy, University of Cologne, Germany # Copyright (C) 201...
# -*- coding: utf-8 -*- # pylint: disable=too-many-ancestors """This module defines exceptions for tableaupy package """ from __future__ import absolute_import from __future__ import division from __future__ import print_function class AutoExtractException(Exception): """AutoExtract Command exception""" pas...
# This file is part of QuTiP. # # QuTiP 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. # # QuTiP is distributed in the ...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 ~ 2012 Deepin, Inc. # 2011 ~ 2012 Hou Shaohui # # Author: Hou Shaohui <[EMAIL]> # Maintainer: Hou Shaohui <[EMAIL]> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pu...
from a10sdk.common.A10BaseClass import A10BaseClass class CaCert(A10BaseClass): """ :param pfx_password: {"description": "The password for certificate file (pfx type only)", "format": "string", "minLength": 1, "optional": true, "maxLength": 128, "type": "string"} :param csr_generate: {"default": 0, "o...
# coding: utf-8 # Copyright Luna Technology 2015 from .base import SettingsBase class SettingsDev(SettingsBase): DEBUG = True DB_NAME = 'vre' DB_USER = 'vre' DB_PASS = 'vre' BASE_URL = 'http://10.81.73.73:8000' @property def INSTALLED_APPS(self): installed_apps = super(Setting...
# Copyright 2013-2015. The Regents of the University of California. # All rights reserved. Use of this source code is governed by # a BSD-style license which can be found in the LICENSE file. # # Authors: # 2013 Martin Uecker <[EMAIL]> # 2015 Jonathan Tamir <[EMAIL]> import numpy as np def readcfl(name): # get...
from blending.src.connector.base_connector import BaseConnector from blending.src.connector.connect_util import * import blending.src.connector.equal_link_key as eq_link __author__ = 'DongMin Kim' class ConnectSimple(BaseConnector): """Link connector that connects every links to new blends. 1. Find the dupl...
"""Platform for the opengarage.io cover component.""" import logging import requests import voluptuous as vol from homeassistant.components.cover import ( DEVICE_CLASS_GARAGE, PLATFORM_SCHEMA, SUPPORT_CLOSE, SUPPORT_OPEN, CoverDevice, ) from homeassistant.const import ( CONF_COVERS, CONF_H...
# Copyright (c) 2011 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...
# Copyright 2014 Red Hat, 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 agreed to in writing, s...
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import fnmatch impor...
#!/usr/bin/env python # # A simple example of how to use delv to manipulate archives. # # Copyright 2014-2015 Bryce Schroeder, www.bryce.pw, [EMAIL] # Wiki: http://www.ferazelhosting.net/wiki/delv # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pub...
#!/usr/bin/python2.7 import sys import os import uuid import re from optparse import OptionParser #Options parser = OptionParser() parser.add_option("-i", dest="kaiju", help='Input kaiju.out file') parser.add_option("-t", dest="nodes", help='nodes.dmp file') parser.add_option("-n", dest="names", help='names.dmp file')...
''' MacroCommand The MacroCommand class is a macro class for all the macro commands for interacting with multiple commands ''' from __future__ import absolute_import from __future__ import division from __future__ import print_function from DIRAC import gLogger from DIRAC.ResourceStatusSystem.Command.Command imp...
""" The module is used by the Twisted plugin system (twisted.plugins.slyd_plugin) to register twistd command to manage slyd server. The command can be used with 'twistd slyd'. """ from os.path import join, dirname from twisted.python import usage from twisted.web.resource import Resource from twisted.application.intern...
# This file is part of Buildbot. Buildbot 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 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
""" Tests for settings utility module. """ import logging import tempfile from ..qtcompat import QSettings from ..settings import Settings, config_slot from ...gui import test class TestUserSettings(test.QAppTestCase): def setUp(self): logging.basicConfig() test.QAppTestCase.setUp(self) de...
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals from marshmallow_enum import EnumField from webargs import fields...
# Copyright 2014 Red Hat, 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 agreed to in writing, s...
""".""" import numpy as _np def _get_matrix_ss_section(leng): return _np.array([ [1, -leng/2, 0, 0], [1, leng/2, 0, 0], [0, 0, 1, -leng/2], [0, 0, 1, leng/2]]) # NOTE: these matrices translates the desired angle and positions of # the bump to the BPM orbit distortions needed to g...
#!/usr/bin/env python ############################################################################### # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License...
# # snippet.py # # engine for doing search result snippets # # import search_help # snipper = search_help.Snippet() # snippet = snipper.snippet(query,data) # # 04-17-02 - written by Brandon Long for discuss/archive # 12-12-02 - adapted by Brandon Long for Trakken # 03-08-03 - improved by David Jeske # import re, str...
# Copyright 2021 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, ...
from typing import Optional, List, Union, Tuple, Dict from . import JsonRecord class StrRecord(metaclass=JsonRecord): schema = {"str": str} class BoolRecord(metaclass=JsonRecord): schema = {"bool": bool} class IntRecord(metaclass=JsonRecord): schema = {"int": int} class FloatRecord(metaclass=JsonRe...
"""Basic example on how to use the functional class together with solvers. This file shows an example of how to set up and solve an optimization problem using the default functionals. The problem we will solve is minimize 1/2 * ||x - g||_2^2 + lam*||x||_1, for some vector g and some constant lam, subject to that...
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Canal para piratestreaming # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import re import sys import urlparse from core import c...
import os import argparse import logging import sys import luigi.server import luigi.process import luigi.configuration import luigi.interface def luigi_run(argv=sys.argv[1:]): luigi.interface.run(argv, use_dynamic_argparse=True) def luigid(argv=sys.argv[1:]): parser = argparse.ArgumentParser(description=u...
# This program accesses all the chessboard image files and identifies which one # is suitable to do the camera calibration. The original raw images are in the # folder called calibration_pictures and the image file names are in the format # left_xx.ppm for images taken by left camera and right_xx.ppm for images taken #...
from py2neo import Graph,authenticate,Node,Relationship import MySQLdb import threading authenticate("localhost:7474","neo4j","8760neo4j") graph = Graph() mynode = list(graph.find('fw', property_key='count')) ct=1 fobj = open("textdump1.txt","r").readlines() file_tacker=open("tarcker.txt","a") #for i in fobj: def inde...
import numpy as np import math import pdb class PolySurrogate(object): '''Class for creating surrogate models using non-intrusive polynomial chaos. :param int dimensions: number of dimensions of the polynomial expansion :param int order: order of the polynomial expansion [default 3] :param str/...
# # Copyright 2008-2014 Universidad Complutense de Madrid # # This file is part of Numina # # SPDX-License-Identifier: GPL-3.0+ # License-Filename: LICENSE.txt # ''' Basic Data Products ''' from astropy.io import fits class DataFrame(object): '''A handle to a image in disk or in memory.''' def __init__(self...
#-*- coding: utf8 '''Score functions to evaluate models''' from scipy.stats import norm import numpy as np DBL_COST = 8 * 8 #(64 bits) def _fast_log2(x): x = int(np.ceil(x)) return x.bit_length() - 1 def _fast_log2_star(x): if x <= 1: return 0 #tail recursion should take care of large numb...
# -*- encoding: utf-8 -*- import pytest from abjad import * def test_scoretools_Voice_lilypond_voice_resolution_01(): r'''Anonymous voice with a sequence of leaves, in the middle of which there is a simultaneous, which in turn contains two anonymous voices. How does LilyPond resolve voices? LilyPo...
from __future__ import unicode_literals from datetime import datetime from optparse import make_option from time import mktime from django.contrib.auth.models import User from django.core.management.base import BaseCommand from django.utils.timezone import get_default_timezone, make_aware from feedparser import parse...
""" pghoard: clean up unused WAL from archive Copyright (c) 2017 Ohmu Ltd See LICENSE for details """ from pghoard import common, config, logutil, version from pghoard.rohmu import get_transfer from pghoard.rohmu.errors import InvalidConfigurationError import argparse import logging import os import sys class Archiv...
from kivy.uix.codeinput import CodeInput from kivy.core.clipboard import Clipboard from kivy.properties import BooleanProperty class DesignerCodeInput(CodeInput): '''A subclass of CodeInput to be used for KivyDesigner. It has copy, cut and paste functions, which otherwise are accessible only using K...
from gensim import corpora, models, similarities from mindynode_nltk.models import Page, PageGroup, TrendWord from .nltk import noun_phrases_zh, noun_phrases_en from datetime import datetime, date, time, timedelta from itertools import groupby import operator import json import math import gc import logging logging.b...
# coding: utf-8 from __future__ import division, unicode_literals __author__ = "Bharat Medasani" __copyright__ = "Copyright 2013, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[EMAIL]" __date__ = "Aug 2, 2013" import unittest import os import re from pymatgen.core.periodi...
import random from pprint import pprint from botlistbot.custemoji import Emoji TEST = "{} Test".format(Emoji.ANCHOR) BACK_TO_MENU = "{} Back to Menu".format(Emoji.LEFTWARDS_BLACK_ARROW) EXIT = "🔙 Exit" REFRESH = "🔄 Refresh" ADD_BOT = "➕ Add new bot" EDIT_BOT = "🛠 Edit Bot" SEND_BOTLIST = "☑ Update BotList" SEND_AC...
#!/usr/bin/python # -*- coding: cp1252 -*- # # suitename.py # # Assigns suite names to RNA structures. # __author__ = "Kristian Rother, Raphael Bauer" __credits__ = ["Marcin Domagalski","Magdalena Musielak", "Janusz Bujnicki", "Marie Curie"] __license__ = "GPL" __version__ = "1.0.1" __maintainer__ = "Krist...
import pytest import aiohttp import asyncio from aiohttp import web from rauc_hawkbit.ddi.client import DDIClient from rauc_hawkbit.ddi.client import APIError async def hello(request): data = { "config" : { "polling" : { "sleep" : "12:00:00" } }, "_l...
# Copyright 2012 the rootpy developers # distributed under the terms of the GNU General Public License from __future__ import absolute_import, print_function import sys import re import fnmatch try: from collections import OrderedDict except ImportError: # py 2.6 from ..extern.ordereddict import OrderedDict ...
# Copyright 2011 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 ...
#!/usr/bin/env python3 import sys import json from collections import OrderedDict # merge subtitles from kcwiki format into quotes.json # * quotes.json must be using descriptive keys # the latest subtitles.json can be downloaded from: # http://api.kcwiki.moe/subtitles # See: https://github.com/kcwikizh/poi-plugin-su...
# -*- coding: utf-8 -*- """ adam.domain.accounts.py ~~~~~~~~~~~~~~~~~~~~~~~ 'accounts' resource and schema settings. :copyright: (c) 2013 by Nicola Iarocci and CIR2000. :license: BSD, see LICENSE for more details. """ from collections import namedtuple from common import base_schema, required_stri...
from .mixins import * from .types import * from .decorators import * import json def build_param_message(missing_params): return "The following parameters were missing: {0}".format(", ".join(missing_params)) def build_param_type_message(invalid_params): return "The following parameters were of the wrong type: {0}"....
#!/usr/bin/python3 # # Copyright 2017 Alex Vesev # # This file is part of Script Crypt. # # Script Crypt 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 op...
""" test with the .transform """ import pytest import numpy as np import pandas as pd from pandas.util import testing as tm from pandas import Series, DataFrame, Timestamp, MultiIndex, concat, date_range from pandas.core.dtypes.common import ( _ensure_platform_int, is_timedelta64_dtype) from pandas.compat import ...
#!/usr/bin/python3 # -*- coding: UTF-8 -*- import sys import json import urllib.request, urllib.error, urllib.parse import base64 import datetime import time import hmac import hashlib import base64 import OpenSSL import uritemplate import pycountry import math import os import socket import config from ognddbfuncs imp...
#!/usr/bin/python # -*- coding: utf-8 -*- # Hive Appier Framework # Copyright (c) 2008-2015 Hive Solutions Lda. # # This file is part of Hive Appier Framework. # # Hive Appier Framework is free software: you can redistribute it and/or modify # it under the terms of the Apache License as published by the Apach...
# 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 use ...
import re import testinfra import pytest # test_path @pytest.fixture def test_path(test_data): return test_data["test_path"] def read_pester_result(output): reg = re.compile(r".*Tests Passed: (?P<passed>[0-9]+), Failed: (?P<failed>[0-9]+), Skipped: (?P<skipped>[0-9]+), Pending: (?P<pending>[0-9]+), Inconclusive...
import time from collections import OrderedDict, defaultdict from datetime import datetime, timedelta import logging from typing import Any, Callable, Dict, List, \ Optional, Text, Tuple, Type, Union from django.conf import settings from django.db import connection, models from django.db.models import F from anal...
# -*- coding: utf-8 -*- """ Created on Tue Sep 9 12:28:45 2014 @author: xueweuchen """ import pandas as pd import csv as csv import numpy as np from sklearn.ensemble import RandomForestClassifier def extract_feature(dataframe): dataframe['Gender'] = dataframe['Sex'].map( {'female': 0, 'male': 1}).astype...
# # Copyright 2015 Naver 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 agreed to in writ...
# -*- coding: utf-8 -*- # # 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 ...
""" Unit tests for enrollment methods in views.py """ import ddt from mock import patch from django.contrib.auth.models import User from django.core.urlresolvers import reverse from courseware.tests.helpers import LoginEnrollmentTestCase from xmodule.modulestore.tests.factories import CourseFactory from student.test...
"""ATA over Ethernet Protocol.""" import struct import dpkt class AOE(dpkt.Packet): __hdr__ = ( ('ver_fl', 'B', 0x10), ('err', 'B', 0), ('maj', 'H', 0), ('min', 'B', 0), ('cmd', 'B', 0), ('tag', 'I', 0), ) _cmdsw = {} def _get_ver(self): retu...
import json import mock from django.test import TestCase from readthedocs.rtd_tests.mocks.paths import fake_paths_by_regex from readthedocs.projects.models import Project class Testmaker(TestCase): fixtures = ["eric", "test_data"] def setUp(self): self.client.login(username='eric', password='test')...
def init_actions_(service, args): """ this needs to returns an array of actions representing the depencies between actions. Looks at ACTION_DEPS in this module for an example of what is expected """ return { 'test': ['install'] } def test(job): import requests, sys service = jo...
# -*- coding: utf-8 -*- """Critic, Generator, optimizers and hyper params definitions.""" import numpy as np from chainer import Chain, Variable, cuda, initializers, optimizers from chainer import functions as F from chainer import links as L Z_VECTOR_DIM = 128 BASE_CH = 64 HEIGHT = 128 WIDTH = 128 CHANNEL = 3 FLIP...
from __future__ import unicode_literals from future.builtins import int from future.builtins import input import os from optparse import make_option import shutil from django.conf import settings from django.core.management.base import BaseCommand, CommandError from mezzanine.utils.importing import path_for_import ...
# Copyright (c) 2015 Mirantis 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 agreed to in writing...
#!/usr/bin/python # # This is a free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This Ansible library is distributed in the hope that i...
# This file is part of beets. # Copyright 2013, Adrian Sampson. # # 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, ...
# ============================================================================= # config_map.py # # Create a mapping between CLI and JSON expressons of config. # # December 2015 # # Copyright (c) 2015 by cisco Systems, Inc. # All rights reserved. # =======================================================================...
"""Add missing blocking principal constraints Revision ID: 252c0015c9a0 Revises: 4f98f2f979c7 Create Date: 2018-12-13 10:49:51.279917 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '252c0015c9a0' down_revision = '4f98f2f979c7' branch_labels = None depends_on =...
# # 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...
#!/usr/bin/env python3 import pygame from Tile import Grass, Path def main(): """ Set up the game and run the main game loop """ pygame.init() # Prepare the pygame module for use surface_sz = 500 # Desired physical surface size, in pixels. # Create surface of (width, height), and its window. ...
# sql/visitors.py # Copyright (C) 2005-2011 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Visitor/traversal interface and library functions. SQLAlchemy schema and expressio...
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2018 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
#!/usr/bin/python # -*- coding: utf-8 -*- # =========================================================================== # eXe # Copyright 2004-2006, University of Auckland # Copyright 2006-2007 eXe Project, New Zealand Tertiary Education Commission # # This module is for the TwiSteD web server. # # This program is free...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # Author: Nic Wolfe <[EMAIL]> # URL: https://sickrage.tv # Git: https://github.com/SiCKRAGETV/SickRage.git # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publ...
#--------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. #---------------------------------------------------------------------...
#------------------------------------------------------------------------------ # Pylon Tutorial "Optimal Power Flow" # # Author: Richard Lincoln, [EMAIL] #------------------------------------------------------------------------------ """ This tutorial provides a guide for solving an Optimal Power Flow problem using P...
import passlib from app import db from datetime import datetime from sqlalchemy_utils import PasswordType class Base(db.Model): """ Base model for other database tables to inherit """ __abstract__ = True id = db.Column(db.Integer, primary_key=True) date_created = db.Column(db.DateTime( ...