src
stringlengths
721
1.04M
import config as cfg import json from datetime import datetime from urllib2 import urlopen, quote def get_lb(): try: response = urlopen('http://www.speedrun.com/api_records.php?amount=999&game='+quote(cfg.game)) return json.load(response) except Exception, e: print datetime.now().strft...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import unicode_literals """ This module provides utility classes for io operations. """ __author__ = "Shyue Ping Ong, Rickard Armiento, Anubhav Jain, G Matteo, Ioannis Petousis" __copyright__ ...
#!/usr/bin/env @PYTHON_EXECUTABLE@ """ Description: Viewer and exporter for Siconos mechanics-IO HDF5 files based on VTK. """ # Lighter imports before command line parsing from __future__ import print_function import sys import os import json import getopt import math import traceback import vtk from vtk.util.vtkAlgor...
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
import os from django.test import TestCase from mock import Mock, patch from hmda.management.commands.load_hmda import Command from hmda.models import HMDARecord class LoadHmdaTest(TestCase): fixtures = ['dummy_tracts'] def test_handle(self): command = Command() command.stdout = Mock() ...
# -*- coding: utf-8 -*- # # UCP documentation build configuration file, created by # sphinx-quickstart on Mon Aug 22 18:19:29 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All c...
from django import forms from django.http import Http404 from django.conf import settings from django.shortcuts import render from django.contrib.admin.views.decorators import staff_member_required from smsgateway import send, __version__ from smsgateway.backends import get_backend accounts = getattr(settings, 'SMSGA...
from __future__ import unicode_literals from django.conf.urls import url from wiki.plugins.attachments import views urlpatterns = [ url(r'^$', views.AttachmentView.as_view(), name='attachments_index'), url(r'^search/$', views.AttachmentSearchView.as_view(), name='attachments_se...
# This file is part of HDL Checker. # # Copyright (c) 2015 - 2019 suoto (Andre Souto) # # HDL Checker 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 ...
#!/usr/bin/env python # # Copyright 2010 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 require...
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from rest_framework.routers import DefaultRouter from api.viewsets import ( UserProfileViewSet, ProblemViewSet, ProblemAssignmentViewSet, ProblemSheetViewSet, ProblemComm...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 Red Hat # GNU General Public License v3.0+ # (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ############################################# # WARNING # ############################################# # # This file is au...
from flask import request, session, url_for, redirect, render_template, abort, g, flash from . import app from .lib import Auth, AuthError, User, Timeline @app.before_request def before_request(): g.auth = Auth(session, app.config.get('SECRET_KEY')) @app.route('/') def timeline(): if not g.auth.authorized()...
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class NinjaFortran(Package): """A Fortran capable fork of ninja.""" homepage = "https://git...
""" `KnightsTour <http://community.topcoder.com/stat?c=problem_statement&pm=10577>`__ """ def solution (board): b, n = Board(board), 1 while b.update(): n += 1 return n class Board: def __init__ (self, board): self.board = [list(row) for row in board] def update (self): k, t = sel...
# Copyright 2016 PerfKitBenchmarker 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 appli...
# Zeobuilder is an extensible GUI-toolkit for molecular model construction. # Copyright (C) 2007 - 2009 Toon Verstraelen <Toon.Verstraelen@UGent.be>, Center # for Molecular Modeling (CMM), Ghent University, Ghent, Belgium; all rights # reserved unless otherwise stated. # # This file is part of Zeobuilder. # # Zeobuilde...
# -*- coding: utf-8 -*- """ This is the common settings file, intended to set sane defaults. If you have a piece of configuration that's dependent on a set of feature flags being set, then create a function that returns the calculated value based on the value of FEATURES[...]. Modules that extend this one can change th...
import time import math import logging # Retry decorator with exponential backoff def retry(tries, delay=3, backoff=2, test_f=lambda x: bool(x)): '''Retries a function or method until function test_f on its return returns True. test_f initially returns true when the functions return value is truthy delay...
#!/usr/bin/python # Copyright (c) 2014, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import re im...
#!/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...
# -*- coding: utf-8 -*- import pygame.rect class Rect(pygame.rect.Rect): __slots__ = () # From Pygame docs VALID_ATTRIBUTES = """ x y top left bottom right topleft bottomleft topright bottomright midtop midleft midbottom midright center cente...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016 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...
""" A Cobbler System. Copyright 2006-2009, Red Hat, Inc Michael DeHaan <mdehaan@redhat.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 Software Foundation; either version 2 of the License, or (at your option) any l...
#!/usr/bin/env python __author__ = 'Donovan Parks' __copyright__ = 'Copyright 2013' __credits__ = ['Donovan Parks'] __license__ = 'GPL3' __version__ = '1.0.0' __maintainer__ = 'Donovan Parks' __email__ = 'donovan.parks@gmail.com' __status__ = 'Development' import argparse def isNumber(s): try: float(s) return T...
"""command line client to fetch statistics via SUSHI.""" import datetime import logging import sys import click from pycounter import sushi from pycounter.helpers import convert_date_run, last_day, prev_month @click.command() @click.argument("url") @click.option("--report", "-r", default="JR1", help="report name (...
from django.shortcuts import render from django.http import HttpResponse, HttpResponseServerError from django.views.decorators.csrf import csrf_exempt from django.contrib.sessions.models import Session from django.contrib.auth.decorators import login_required from rest_framework import viewsets from rest_framework.resp...
"""Defines the functions necessary to move a file to a different workspace/uri""" from __future__ import unicode_literals import logging import os import sys from error.exceptions import ScaleError, get_error_by_exception from messaging.manager import CommandMessageManager from storage.brokers.broker import FileDownl...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Janice Cheng # import requests # import json # #获取天气数据API # #通过 http request 取天气的数据 # response = requests.get("http://wthrcdn.etouch.cn/weather_mini?city=上海") # response.encoding = 'utf-8' # print("Before", type(response)) #把它变成字符串 # #然后进行反序列化,把字符串转换成 Python 的数...
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
""" Test classes for OpenSubtitlesProvider. The classes derives all the test from BaseSubProviderTest. """ import unittest import BaseSubProviderTest class Test_all_OpenSubtitlesProviderTest( unittest.TestCase, BaseSubProviderTest.BaseSubProviderTest): def setUp(self): from SubProv...
# flake8: noqa """ Tests copied from cpython test suite: https://github.com/python/cpython/blob/3.9/Lib/test/test_dict.py """ # stdlib import collections import collections.abc import gc import pickle import random import string import sys from test import support import unittest import weakref # third party import p...
#!/usr/bin/env python # coding=utf-8 from twisted.trial import unittest from torweb import configuration class TestConfigurationTypeBoolean(unittest.TestCase): def test_values(self): entry = configuration.BooleanEntry() self.assertIs(entry.load(1), True) self.assertIs(entry.load(True), ...
## THIS FILE IS FOR C LANGUAGE ## BASED ON YCM FILE PROVIDED ON DEC. 2014 # This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy,...
generic_menu_items = [ 'Home', 'All Communities', 'Contact', 'About/FAQ', 'Legal/Contact', ] logged_out_menu_items = ['Login'] logged_in_menu_items = ['Logout'] advertisements = [ 'No registration required', 'Organize your event attendees', 'Use your existing communication channels', 'It\'s free...
#-------------------------------------------------------------------------------------------------------------------# # # IB2d is an Immersed Boundary Code (IB) for solving fully coupled non-linear # fluid-structure interaction models. This version of the code is based off of # Peskin's Immersed Boundary Method Paper...
#!/usr/bin/python3 # This takes an XML report extracted from an OpenVAS VA scanner and # creates issue tickets on ServiceNow and Redmine systems for tracking # purposes. # # Most parameters are specified in the 'ov_prefs.txt' file, however, # the XML report file may be specified on the command line. If # specified th...
#!/usr/bin/env python """Run module.""" import click import data import ReferenceModel import solve import version CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) @click.command(context_settings=CONTEXT_SETTINGS) @click.option('--folder', type=click.Path(), help='Path to data folder') @click.option('--q...
# Copyright 2018 Stanislav Krotov <https://it-projects.info/team/ufaks> # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). from datetime import datetime, timedelta import odoo.tests.common @odoo.tests.common.at_install(False) @odoo.tests.common.post_install(True) class TestOdooBackupSh(odoo.tests...
#!/usr/bin/env python # Copyright 2016 The Kubernetes 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 appli...
# BEGIN_COPYRIGHT # # Copyright (C) 2009-2013 CRS4. # # This file is part of biodoop-core. # # biodoop-core 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 optio...
from driver.serial_impl import SerialImpl from utility.log import InitLogging from utility.log import VLOG import optparse import time import sys def Init(): ser = SerialImpl() ser.LoopBackTest() ser.Close() def ContinueSend3(ser, seconds): timeout = time.time() + seconds while time.time() < timeout: ti...
from selenium.webdriver.common.by import By from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from testing.testcases import LiveTornadoTestCase from testing.selenium_helper import SeleniumHelper class PreloginTest(LiveTornadoTestCase, SeleniumHe...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the \"License\"); # you may not use this file except in compliance with the License.\n", # 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...
import json import re from couchdbkit import ResourceNotFound from django.conf import settings from dimagi.utils.couch.cache import cache_core from corehq.apps.domain.models import Domain from dimagi.utils.couch.database import get_db from django.core.cache import cache DOMAIN_MODULE_KEY = 'DOMAIN_MODULE_CONFIG' ADM_D...
from odoo import models, api, _ from odoo.exceptions import UserError class SaleOrder(models.Model): _inherit ='sale.order' # do not create delivery line but set the value in total_frete @api.multi def delivery_set(self): # Remove delivery products from the sale order self._delivery_...
""" Django settings for fngs project. Generated by 'django-admin startproject' using Django 1.10.3. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os #...
# -*- coding: utf-8 -*- """ Created on Tue Jun 16 17:42:56 2015 @author: Paco """ import numpy as np from scipy import io class Utils(object): _feat_idx = None def __init__(self): pass def generate_pairs(self,label, n_pairs, positive_ratio, random_state=42): rng = np.random.RandomS...
# -*- coding: utf-8 -*- from PySide.QtCore import * from PySide.QtGui import * import controls import ui class ConfigWidget (ui.Scrollable): _factories = { 'bool': controls.BoolControl, 'float': controls.FloatControl, 'enum': controls.EnumControl, 'uint8': controls....
import unittest from alphametics import solve # Tests adapted from `problem-specifications//canonical-data.json` @ v1.3.0 class AlphameticsTest(unittest.TestCase): def test_puzzle_with_three_letters(self): self.assertEqual(solve("I + BB == ILL"), {"I": 1, "B": 9, "L": 0}) def test_solution_must_hav...
# Copyright 2019-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...
import os import time import json import string from collections import defaultdict, Counter from random import random import tweepy class TwitterAPI: """ Class for accessing the Twitter API. Requires API credentials to be available in environment variables. These will be set appropriately if the bot...
import json import logging from django.core.exceptions import PermissionDenied from django.http import ( HttpResponse, Http404, HttpResponseNotFound, HttpResponseBadRequest, HttpResponseForbidden, HttpResponseNotAllowed, HttpResponseServerError, ) from django.utils.encoding import force_tex...
from bottle import view, route, request, response from model.model import * @route("/") @view("home") def home(): viewData = {} return viewData @route("/api/ideas", method="GET") def api_listIdeas(): ideas = Idea.query.all() result = [idea.toDict() for idea in ideas] return result @route("/api/idea", method="...
# -*- 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...
#!/usr/bin/python # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # # GNU Zebra 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, or (at your option) any # later version. # # GN...
from __future__ import absolute_import from collections import namedtuple from itertools import compress import logging import cv2 import numpy from docoskin import defaults from docoskin.dummythreadpoolexecutor import DummyThreadPoolExecutor from docoskin.exceptions import DocoskinInvalidArgumentCombinationError, D...
""" Part of the 7 Days to Die Wiki Content Generator Copyright (C) 2017 Liam Brandt <brandt.liam@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 Software Foundation, either version 3 of the License, or (at you...
from __future__ import absolute_import, print_function from changes.constants import Result, Status from changes.models import Job, JobStep, TestCase, LogSource, LogChunk, Source UNSET = object() class NotificationHandler(object): def get_test_failures(self, job): return TestCase.query.filter( ...
# Copyright 2014 IBM Corp. # 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/LIC...
# Copyright (c) 2012 Dominic van Berkel # See LICENSE for details. from plugs import plugbase from util import Event class AuthPlug(plugbase.Plug): """Auth plug. Handles auth stuffs.""" name = 'Auth' # manual_auths is a dict of source:target that are created after !auth requests so they can be # re...
''' A test runner that augments Django's standard one by finding subclasses of unittest.TestCase no matter where they are located in the project, even in directories which are not django apps. (the default test runner only looks in particular modules within each django app.) See also tests.utils.testrunner, which uses...
""" The Chain of Responsibility Pattern Notes: The Chain of Responsibility pattern allows the client programmer to dynamically create a recursive chain of objects - each of which tries to fulfill a 'responsibility' (usually represented by a method call). If an object in the chain is unable to fulfill it, the request ...
from thirdparty import log_mvnpdf, log_mvnpdf_diag import numpy as np from online import * from scipy.misc import logsumexp from gaussEM import GaussEM class Stepwise(OnlineEM): def __init__(self, param): super().__init__(param) self.param = float(param['alpha']) self.skip = int(param['skip...
# Main Loop from avoidance import logic from bin import gpsutils from math import atan2, sin, cos, sqrt import numpy as np class Avoid(object): def __init__(self,plane_lla,obj_lla,wp_lla,safety_dist,obj_rad,step_size): self.plane_lla = plane_lla self.obj_lla = obj_lla self.wp_lla = wp_lla ...
"""Navigation result messages""" from ..UBXMessage import initMessageClass, addGet, parseUBXPayload import struct from ubx import UBXESFSensor from ..Types import U2, U4, X2, X4 @initMessageClass class ESF: """Message class ESF.""" _class = 0x10 @addGet class MEAS: _id = 0x02 clas...
#!/usr/bin/env python # # Spool Migration Script # # This script takes two arguments. The first is either "dump" or "restore". # The second argument will be a file that your xdb will be dumped to, in the # case of a "dump", or restored from, in the case of a "restore". The # spool config used will be what is in confi...
__author__ = 'Statistics Canada' __copyright__ = 'Crown Copyright, Canada 2014' import urllib2 import simplejson as json # Add a new data set. For this example, we will use the NAICS 2012 dataset from Statistics Canada # Ensure the data set does not already exist. Exit if it does query_data = urllib2.quote(json.dump...
# -*- coding: utf-8 -*- import datetime import io import json from PIL import Image import re from urllib import urlencode import urllib2 from urlparse import urlparse from openerp import api, fields, models, SUPERUSER_ID, _ from openerp.tools import image from openerp.exceptions import Warning from openerp.addons.we...
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2005-2016 (ita) """ Runner.py: Task scheduling and execution """ import random try: from queue import Queue except ImportError: from Queue import Queue from waflib import Utils, Task, Errors, Logs GAP = 20 """ Wait for at least ``GAP * njobs`` before trying to...
import cv2 import numpy as np import scipy.spatial #!/usr/bin/env python #coding: utf8 import os from matplotlib.pyplot import subplot import matplotlib.pyplot as plt # figsize(12,8) T1 = cv2.imread('../dataset_templeRing/templeR0034.png', cv2.IMREAD_GRAYSCALE) sift = cv2.SIFT(nfeatures=5000) kpts1, D_i = sift.detec...
import tensorflow as tf import numpy as np from classify.lookup import Lookup from classify.util.logger import Logger from classify.util.timer import Timer class Model: """The neural network model.""" SCOPE_NAME = 'model' DEFAULT_PATH = './model/model.ckpt' def __init__(self, indexer, params, save_p...
#!/usr/bin/env python # ============================================================================= # GLOBAL IMPORTS # ============================================================================= import collections import copy import itertools import json import math import os import numpy as np import pandas as ...
# description: download Google StreetViews images and save them # the Google StreeView API is documented here: # https://developers.google.com/maps/documentation/streetview/ # author: Falcon Dai import cStringIO import mongoengine as me from PIL import Image from google_streetview_api import * class Pano(me.Document...
# -*- coding: utf-8 -*- """ Demo program of Hindi WordNet in Python. Here I demonstrate all the functionalities of the libraries, but note you can load only the pickle files which are necessary for your task rather than loading every pickle file. Loading of pickle files takes time and memory. But once loaded, all yo...
"""Tests for unix_events.py.""" import collections import contextlib import errno import io import os import pathlib import signal import socket import stat import sys import tempfile import threading import unittest from unittest import mock from test import support if sys.platform == 'win32': raise unittest.Ski...
from __future__ import unicode_literals from __future__ import print_function import unittest import os from moya import db from moya import pilot from moya.wsgi import WSGIApplication from moya.console import Console from moya.context import Context from moya.context.tools import set_dynamic class TestExpose(unit...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.conf import settings from .request import login import re UserModel = get_user_model() class UserappBackend(object): def authenticate(self, username=None, password=None, request=None, **...
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import dictConfig # this is the Alembic Config object, which provides # access to the values within the .ini file in use. config = context.config # Interpret the config file for Python...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from lib.rnn_cells.base_cell import BaseCell from lib import linalg #*************************************************************** clas...
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: os.py r"""OS routines for Mac, NT, or Posix depending on what system we're on. This exports: - all functions from posix, nt, os2, or ce, e.g. unli...
# Some of this code came from the https://github.com/tensorflow/models/tree/master/slim # directory, so lets keep the Google license around for now. # # 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 c...
# Copyright 2020 DeepMind Technologies Limited. 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 ...
# -*- encoding: utf-8 -*- """ lunaport.plugg_views.hook_registration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Class-based view for hook_registration resource. hook_registration - m2m connection case with hook. Rule to starte test. """ import json import pprint pp = pprint.PrettyPrinter(indent=4).pprint...
import tensorflow as tf # The file path to save the data save_file = './model.ckpt' # Two Tensor Variables: weights and bias weights = tf.Variable(tf.truncated_normal([2, 3])) bias = tf.Variable(tf.truncated_normal([3])) # Class used to save and/or restore Tensor Variables saver = tf.train.Saver() with tf.Session() ...
# This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. """ Make changes to channel settings graphically in the UI. **Plugin Type: Local** ``Preferences`` is a local plugin, which means it is associated with a channel. An instance can be opened for each channel. *...
# -*- coding: utf-8 -*- """ eww.command ~~~~~~~~~~~ This is our custom command module. It is a subclass of :py:class:`cmd.Cmd`. The most significant change is using classes rather than functions for the commands. Due to this change, we don't use CamelCase for command class names here. St...
#!/usr/bin/python # -*- coding: utf-8 -*- # # --- BEGIN_HEADER --- # # useradm - user administration functions # Copyright (C) 2003-2015 The MiG Project lead by Brian Vinter # # This file is part of MiG. # # MiG is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lice...
# -*- coding: utf-8 -*- """ eww.ioproxy ~~~~~~~~~~~ We replace ``sys.std[in, out, err]`` with instances of ``IOProxy``. ``IOProxy`` provides a thread-local proxy to whatever we want to use for IO. It is worth mentioning that this is *not* a perfect proxy. Specifically, it doesn't proxy an...
""" Helper methods for Studio views. """ from __future__ import absolute_import import urllib from uuid import uuid4 from django.conf import settings from django.http import HttpResponse from django.utils.translation import ugettext as _ from opaque_keys.edx.keys import UsageKey from xblock.core import XBlock impor...
from django.contrib import admin from Website.models import * from django import forms from django.utils.translation import ugettext_lazy from Skyrover.widgets import KindEditor # Register your models here. class kindeditorNewsForm(forms.ModelForm): Content = forms.CharField(label=ugettext_lazy(u"Content"), widge...
# ebs-tools, a set of tools to manage EBS volumes and snapshots # # Copyright (C) 2014 Julio Gonzalez Gil <julio@juliogonzalez.es> # # This file is part of ebs-tools (http://github.com/juliogonzalez/ebs-tools) # # ebs-tools is free software: you can redistribute it and/or modify # it under the terms of the GNU General ...
# Django settings for FileManagerHTML project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME':...
#!/usr/bin/env python # eggy - a useful IDE # Copyright (c) 2008 Mark Florisson # # 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 la...
# -*-mode: python; fill-column: 75; tab-width: 8 -*- # # $Id: tix.py 63418 2008-05-17 18:39:55Z georg.brandl $ # # Tix.py -- Tix widget wrappers. # # For Tix, see http://tix.sourceforge.net # # - Sudhir Shenoy (sshenoy@gol.com), Dec. 1995. # based on an idea of Jean-Marc Lugrin (lugrin@ms.com) # # N...
import unittest import mock from mock import call from tv_runner import TvRunner class TestTvRunner(unittest.TestCase): def setUp(self): self._sort_unsorted_files_patcher = mock.patch('tv_runner.TvRunner._sort_unsorted_files') self.mock_sort_unsorted_files = self._sort_unsorted_files_patcher.start...
# -*- coding: utf-8 -*- ######################################################################### # # # # ######################################################################### ...
"""Contain InterfaceTps class""" from askomics.libaskomics.rdfdb.SparqlQueryBuilder import SparqlQueryBuilder from askomics.libaskomics.rdfdb.SparqlQueryGraph import SparqlQueryGraph from askomics.libaskomics.rdfdb.SparqlQueryAuth import SparqlQueryAuth from askomics.libaskomics.rdfdb.QueryLauncher import QueryLaunche...