src
stringlengths
721
1.04M
from PyQt4.QtCore import * from PyQt4.QtGui import * from qgis.core import * from qgis.gui import * from collections import OrderedDict from ..data import (non_spatial_table_columns) from ui_gpx_table_widget import Ui_Dialog from gpx_add_attribute_info import GPXAttributeInfoDialog class GpxTableWidgetDialog(QDial...
############################################################################ # scspell # Copyright (C) 2009 Paul Pelzl # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2, as # published by the Free Software Foundation. # # This prog...
#!/usr/bin/python # This file is part of Ansible # # Ansible 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. # # Ansible is distributed...
import datetime import traceback from colors import Color from constants import * class CliHelper: @staticmethod def print_call_info(cli_object): print(Color.control('Request was sent at ' + '{:%Y-%m-%d %H:%M:%S}'.format(datetime.datetime.now()))) print('Endpoint URL: {}'.format(cli_object.ap...
#!/usr/bin/env python # # This file is part of the pKaTool package # Copyright (C) Jens Erik Nielsen 2008 # All rights reserved # #comment def Nonefix(value): if value: return '%6.3f' %(value) else: return 'NA' def main(options,args): """Calculate the change in chemical shift due to a full ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import argparse import os import sys from functools import partial from multiprocessing import Pool from tabulate import tabulate from thesis.utils import find def process_file(ifile, meta): print('Processing %s' %...
#!/usr/bin/python # -*- coding: iso-8859-15 -*- """ Programa cliente que abre un socket a un servidor """ import socket import sys # Cliente UDP simple. # Dirección IP del servidor. try: SERVER = sys.argv[1] PORT = int(sys.argv[2]) # Contenido que vamos a enviar METHOD = sys.argv[3] LINE = sys.arg...
# Copyright (c) 2013 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 writ...
#!/usr/bin/env python3.4 # coding: utf-8 __all__ = ( 'Shell', ) import os import glob import traceback import colorama import subprocess from importlib.machinery import SourceFileLoader from collections import OrderedDict from sluggo.repl import * colorama.init() class Shell(REPL): def __init__(self, base...
''' FromTruth.py Initialize params of a bnpy model using "ground truth" information, such as human annotations These are provided within a Data object, as a "TrueLabels" field ''' import numpy as np import FromScratchMult def init_global_params(hmodel, Data, initname=None, seed=0, nRepeatTrue=2, **kwargs): ''' In...
#!/usr/bin/python # Orthanc - A Lightweight, RESTful DICOM Store # Copyright (C) 2012-2014 Medical Physics Department, CHU of Liege, # Belgium # # 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, ...
# -*- coding: utf-8 -*- # File: input_source.py import threading from contextlib import contextmanager from itertools import chain import tensorflow as tf from ..compat import tfv1 from ..callbacks.base import Callback, CallbackFactory from ..callbacks.graph import RunOp from ..dataflow import DataFlow, MapData, Rep...
import collections import datetime import redis from django.conf import settings from django.utils.timezone import utc from admin_tools.dashboard.modules import DashboardModule class StatusModule(DashboardModule): title = "Status" template = "admin_tools/dashboard/modules/status.html" def init_with_c...
import json from caliopen_storage.helpers.json import JSONEncoder def dump_indexes(**kwargs): # Discover base core classes from caliopen_main.user.core import User from caliopen_main.contact.objects.contact import Contact from caliopen_main.message.objects.message import Message from caliopen_main...
#!/usr/bin/python import ctypes import sys import logging from multiprocessing import Process, Pipe, Value, Manager, Lock from Platform import platform_unit as platform_unit from Computation import computation_unit as computation_unit # configure logging logging.basicConfig(filename='computational_system.log',level...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Example demonstrating how stereo video frames can be captured using a frame grabber card that supports this feature. """ import time import cv2 import numpy as np from pygiftgrab import (IObserver, VideoSourceFactory, ColourSpace, Device, Vide...
# -*- coding: utf-8 -*- ''' /************************************************************************************************************************** SemiAutomaticClassificationPlugin The Semi-Automatic Classification Plugin for QGIS allows for the supervised classification of remote sensing images, provid...
#* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgpl-2.1.html import os im...
# -*- coding: utf-8 -*- ############################################################################### # $Id$ # # Project: wxGIPE # Purpose: Satellite image [multi/hyper][spectral/temporal] pixel plotting # Author: Yann Chemin, <yann.chemin@gmail.com> # #####################################################...
from django.test import TestCase from model_mommy import mommy class PersonTests(TestCase): def test_display_name(self): person = mommy.make( 'alumni.Person', graduation_first_name='Bobbie', graduation_last_name='Smith', ) self.assertEqual(person.displ...
#!/usr/local/bin/python import unittest import sys from selenium import webdriver servers = { 'live' : 'http://safe-sands-8472.herokuapp.com/', 'local': 'http://127.0.0.1:5000/' } class TestApp(unittest.TestCase): BASE = servers['local'] @classmethod def setUpClass(cls): ...
# Copyright 2014 Jon Eyolfson # # This file is distributed under the GPLv3 license import datetime import logging import markdown import os import pygit2 from django_blog.models import Post from django_gitolite.utils import home_dir logger = logging.getLogger('django_blog') def update_blog(push): repo_path = pu...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# -*- coding: utf-8 -*- ## @file testsuite/python/seqGenTest.py ## @date may 2017 ## @author PhRG - opticalp.fr ## ## Test the sequence generation module # # Copyright (c) 2017 Ph. Renaud-Goud / Opticalp # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associ...
import matplotlib.pyplot as plt import numpy as np # rho - charge density xvals = np.arange(0, 1.01, 0.01) yvals = 1-xvals plt.plot(xvals, yvals, "b-", label=r"${\rho}$") xvals = np.arange(1, 2, 0.01) yvals = xvals * 0 plt.plot(xvals, yvals, "b-") # Q - enclosed charge xvals = np.arange(0, 1.01, 0.01) ...
# -*- encoding: UTF-8 -*- # Lightproof grammar checker for LibreOffice and OpenOffice.org # 2009-2012 (c) László Németh (nemeth at numbertext org), license: MPL 1.1 / GPLv3+ / LGPLv3+ import uno, unohelper, os, sys, traceback from lightproof_impl_en import locales from lightproof_impl_en import pkg import lightproof_i...
from apollo.core import Service, cache from apollo.locations.models import Sample, LocationType, Location import unicodecsv try: from cStringIO import StringIO except: from StringIO import StringIO class SamplesService(Service): __model__ = Sample class LocationTypesService(Service): __model__ = Loc...
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above ...
from estructuras import Cola from estructuras import Pila #from estructuras import Matriz class Usuario: def __init__(self,nombre,contraseña): self.__nombre = nombre self.__contraseña = contraseña self.__cola = Cola() self.__pila = Pila() #self.__matriz = Matriz() #self.__matrizTranspuesta = self.__va...
from inro.emme.matrix import MatrixData import inro.modeller as m import warnings as warn mm = m.Modeller() class Face(m.Tool()): def page(self): desc = 'Collection of tools working with <a href="http://pandas.pydata.org/">pandas</a>' pb = m.ToolPageBuilder(self, runnable=False, title='Utilities'...
# -*- coding: utf-8 -*- __author__ = 'eternnoir' import os from subprocess import Popen, PIPE SOURCEANALYZERBIN = 'sourceanalyzer' def __build_dll_args__(folder_path): ret = ["-libdirs"] dll_list = get_all_dll_path(folder_path) if len(dll_list) == 0: return [] dll_path_string = "" for d...
from mmptypes import * import utils import UserDict import cStringIO import socket import struct import email from email.Utils import parsedate wp_request = {} wp_request_reversed = {} for k,v in [(key, locals()[key]) for key in locals().keys() if key.startswith('MRIM_CS_WP_REQUEST_PARAM')]: wp_request[v] = k for ...
from django.shortcuts import render, redirect from django.http import HttpResponse from django.db.models import Min, Count, Max from django.conf import settings from django.views.decorators.cache import cache_page from django import forms from construct.models import * from structure.models import Structure from prote...
from django.shortcuts import render from django.contrib import messages from django.shortcuts import redirect from constance import config from django.contrib.auth.decorators import login_required from django.utils import timezone from django.http import JsonResponse, HttpResponse from django.core.exceptions import Obj...
# mssql.py """Support for the Microsoft SQL Server database. Connecting ---------- See the individual driver sections below for details on connecting. Auto Increment Behavior ----------------------- ``IDENTITY`` columns are supported by using SQLAlchemy ``schema.Sequence()`` objects. In other words:: Table('t...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/MedicationAdministration) on 2017-03-22. # 2017, SMART Health IT. from . import domainresource class MedicationAdministration(domainresource.DomainResource): """ Administration of medicati...
import os import shutil from unittest import TestCase from nose.tools import eq_, ok_ from pyerarchy.ex import BadValueError from pyerarchy.modulenode import ModuleNode, ThisModuleNode __author__ = 'bagrat' class ModuleNodeTest(TestCase): test_module_name = 'testmodule' module_dir = os.path.join(os.path.dirn...
import math #import needed modules import pyaudio #sudo apt-get install python-pyaudio import struct import pickle from time import sleep PyAudio = pyaudio.PyAudio #initialize pyaudio #See http://en.wikipedia.org/wiki/Bit_rate#Audio BITRATE = 48000 #number of frames per second - 44.1kHz does not work pro...
import numpy as np from scipy.optimize import differential_evolution as DE import time as t from .abcpmc import sampler, threshold from ..synth_clust import synth_cluster from . import likelihood from .emcee_algor import varPars, closeSol, discreteParams, convergenceVals def main( lkl_method, e_max, err_lst, com...
# group.py - group entry lookup routines # # Copyright (C) 2010, 2011 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your op...
# Copyright 1999 by Jeffrey Chang. All rights reserved. # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. # Patched by Brad Chapman. # Chris Wroe added modifications for work in myGrid """Code to inv...
# Copyright (c) 2015 Uber Technologies, Inc. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publ...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from socorro.external import ( MissingArgumentError, ResourceNotFound, ResourceUnavailable, ServiceUnava...
import abc import tensorflow as tf from .recommendation_graphs import relative_cosine class AbstractPredictionGraph(object): __metaclass__ = abc.ABCMeta @abc.abstractmethod def connect_dense_prediction_graph(self, tf_user_representation, tf_item_representation): """ This method is respon...
import py from rpython.rlib.parsing.lexer import SourcePos from rpython.rlib.parsing.tree import Node, Symbol, Nonterminal class Rule(object): def __init__(self, nonterminal, expansions): self.nonterminal = nonterminal self.expansions = expansions def getkey(self): return (self.nonterm...
# -*- coding: utf-8 -*- ############################################################################### # # Module for OpenERP # Copyright (C) 2015 Akretion (http://www.akretion.com). # @author Valentin CHEMIERE <valentin.chemiere@akretion.com> # # This program is free software: you can redistribute it and/or m...
from . import xdr as stellar_xdr from .__version__ import __issues__ from .exceptions import ValueError from .strkey import StrKey __all__ = ["SignerKey"] class SignerKey: """The :class:`SignerKey` object, which represents an account signer key on Stellar's network. :param signer_key: The XDR signer object ...
# -*- coding: utf-8 -*- import Queue import StringIO import wave import time import angus.client import pyaudio import sys import numpy as np CHUNK = 8192 PYAUDIO_FORMAT = pyaudio.paInt16 NUMPY_FORMAT = np.int16 def list_inputs(): p = pyaudio.PyAudio() for i in range(p.get_device_count()): info = p.g...
#!/usr/bin/env python import commands import optparse import os import os.path import re import sys def extract_exe_symbol_names (arch, exe_path, match_str): command = 'dsymutil --arch %s -s "%s" | grep "%s" | colrm 1 69' % (arch, exe_path, match_str) (command_exit_status, command_output) = commands.getstatus...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import copy import datetime import pytest from socorro.lib import BadArgumentError from socorro.external.es.super_sear...
# -*- coding: utf-8 -*- import json import datetime import urllib import hashlib import tornado.gen import tornado.web import tornado.httpclient from controllers.basehandler import BaseHandler from models.novelmodel import NovelModel import utils from utils import json_success, json_failed, cache_error import const ...
from types import SimpleNamespace import asynctest from asynctest import CoroutineMock, Mock, call from stig.client.aiotransmission.api_freespace import FreeSpaceAPI class TestFreeSpaceAPI(asynctest.ClockedTestCase): async def setUp(self): self.rpc = SimpleNamespace(free_space=CoroutineMock()) s...
# Game properties should be registered at import time class GameProperty: __slots__ = ('__propname', '__default', '__readonly') def __init__(self, propname, default=None, readonly=False, tmp=False): if not tmp: self.__propname = '_GameProperty_' + propname else: self.__...
"""Test the collective allreduice API on a distributed Ray cluster.""" import pytest import ray from ray.util.collective.types import ReduceOp import cupy as cp import torch from ray.util.collective.tests.util import create_collective_workers @pytest.mark.parametrize("group_name", ["default", "test", "123?34!"]) @p...
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Builds applications in debug mode: - Copies the module directories into their destinations. - Copies app.h...
#!/usr/bin/env python # a bar plot with errorbars import matplotlib import numpy as np import matplotlib.pyplot as plt from matplotlib.patches import Ellipse, Polygon from pylab import * width = 0.28 # the width of the bars font = {'family' : 'sans-serif', 'variant' : 'normal', 'weight' : 'light', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # coding: utf-8 # Copyright (c) 2008-2011 Volvox Development Team # # 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, includin...
#!/usr/bin/env python from __future__ import print_function, division, unicode_literals import os from .diff_tools_shared import ( DiffWorkerBase , on_each_matching_font ) import diffenator from diffenator.diff import Diff...
import re from django import template from django.utils.translation import ugettext as _ from django.utils.html import mark_safe register = template.Library() @register.simple_tag def ticket_seat_class(session, layout, seat, row, col): row = str(row) col = str(col) if seat == 'R': return 'seat...
import os import re import subprocess from operator import add from functools import reduce import ycm_core def pkg_config(pkg): return subprocess.check_output(['pkg-config', '--cflags', pkg], universal_newlines=True).split() PKGS = ('sdl2', 'SDL2_image', 'SDL2_mixer', 'gtk+-3.0', 'gtkmm-3.0') kernel_version = ...
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
# -*- coding: utf-8 -*- # # MIT License # # Copyright (c) 2016 Michal Stefanik <stefanik.m@mail.muni.cz>, Milan Cermak <cermak@ics.muni.cz> # Institute of Computer Science, Masaryk University # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentati...
""" Main test script for running the code. Created on Mon Dec 15 13:21:07 2014 @author: DStauffman """ #%% Imports import os from dstauffman import setup_dir import dstauffman2.archery.tournaments as arch #%% Variables # simulate stuff? SIMULATE = True # folder and file locations folder = arch.get_roo...
# -*- coding: utf-8 -*- """Test for HTML5 Remote Consoles of VMware/RHEV/RHOSP Providers.""" import pytest import imghdr import time import re from cfme.cloud.provider.openstack import OpenStackProvider from cfme.common.provider import CloudInfraProvider from cfme.infrastructure.provider.virtualcenter import VMwarePro...
from igraph import Graph def weisfeiler_lehman_graph_isomorphism_test(G1,G2): """ Performs the Weisfeiler-Lehman test of Isomorphism: Weisfeiler and Lehman: A reduction of a graph to a canonical form and an algebra arising during this reduction, Nauchno-Technicheskaya Informatsiya, Ser. 2, no. 9 (196...
# This file is part of OMG-tools. # # OMG-tools -- Optimal Motion Generation-tools # Copyright (C) 2016 Ruben Van Parys & Tim Mercy, KU Leuven. # All rights reserved. # # OMG-tools 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...
# Written by Arno Bakker # see LICENSE.txt for license information import sys import re from threading import Timer DEBUG = False def parse_playtime_to_secs(hhmmss): if DEBUG: print >>sys.stderr,"miscutils: Playtime is",hhmmss r = re.compile("([0-9\.]+):*") occ = r.findall(hhmmss) ...
# ========================================================================= # Copyright 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the Licens...
################################################################ # # # testAptofile.py # # Copyright (c) 2013 Aptomar AS, All Rights Reserved # # ...
# -*- coding: utf-8 -*- ######################################################################## # # MIT License # # Copyright (c) 2017 Matej Vadnjal <matej@arnes.si> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), ...
import datetime from sqlalchemy import Column, ForeignKey from sqlalchemy.types import DateTime, Date, String, Integer, Float, Boolean from intranet3.models import Base class TimeEntry(Base): __tablename__ = 'time_entry' id = Column(Integer, primary_key=True, index=True) user_id = Column(Integ...
# -*- coding: utf-8 -*- import logging from operator import attrgetter from django.db import models from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse from django.contrib.auth.models import User from djangotoolbox.fields import BlobField, SetField from django.template impor...
# Copyright 2018, OpenCensus 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 applicable law or agreed to in w...
#!/usr/bin/python # -*- coding: utf-8 -*- import os.path import re import subprocess try: from lxml import etree except ImportError: try: import xml.etree.cElementTree as etree except: import elementtree.ElementTree as etree import ProjectWalker import GlobMatch from interpol import inter...
""" Tests for helpers.py """ from __future__ import absolute_import import datetime import hashlib from django.test import TestCase from mock import patch from pytz import UTC from openedx.core.djangolib.testing.utils import skip_unless_lms from student.tests.factories import UserFactory from ..image_helpers import...
# coding=utf-8 # Copyright 2020 Microsoft and the Hugging Face Inc. team. # # 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...
# coding=utf-8 # Copyright 2018 T5 Authors and HuggingFace Inc. team. # # 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...
from __future__ import with_statement import py import sys from rpython.rlib.parsing.tree import Nonterminal, Symbol, RPythonVisitor from rpython.rlib.parsing.codebuilder import Codebuilder from rpython.rlib.objectmodel import we_are_translated class BacktrackException(Exception): def __init__(self, error=None): ...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import json from frappe.model.naming import set_name_by_naming_series from frappe import _, msgprint import frappe.defaults from frappe.ut...
#!/usr/bin/env python """Simple command line interface to get/set password from a keyring""" import getpass import optparse import sys import keyring import keyring.core def input_password(prompt): """Ask for a password to the user. This mostly exists to ease the testing process. """ return getpas...
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2017-2020 Ryan Roden-Corrent (rcorre) <ryan@rcorre.net> # # This file is part of qutebrowser. # # qutebrowser 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...
# 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...
# -*- coding: utf-8 -*- from typing import Text from django.test import TestCase from zerver.lib.test_classes import WebhookTestCase from zerver.webhooks.appfollow.view import convert_markdown class AppFollowHookTests(WebhookTestCase): STREAM_NAME = 'appfollow' URL_TEMPLATE = u"/api/v1/external/appfollow?str...
# Cipher suite tests # Copyright (c) 2013, Jouni Malinen <j@w1.fi> # # This software may be distributed under the terms of the BSD license. # See README for more details. import time import subprocess import logging logger = logging.getLogger() import os.path import hwsim_utils import hostapd def check_cipher(dev, a...
#!/usr/bin/python """ Builder Class generic Male-Female comparison plot """ ## MIT License ## ## Copyright (c) 2017, krishna bhogaonker ## 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 w...
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright (c) 2017 SML 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...
# -*- coding: utf-8 -*- # Copyright(C) 2012 Romain Bignon # # This file is part of weboob. # # weboob 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 opti...
# """ # Django settings for biblio project. # # For more information on this file, see # https://docs.djangoproject.com/en/1.7/topics/settings/ # # For the full list of settings and their values, see # https://docs.djangoproject.com/en/1.7/ref/settings/ # """ # Build paths inside the project like this: os.path.join(B...
#!/usr/bin/env python3 import os import shutil import sys try: import markdown except ImportError: markdown = None if not os.path.exists("docs/scripts"): print("Run this script from the project root directory") sys.exit(1) last_main_option = "" last_main_option_added = False option_data = {} option...
# Copyright 2018 - Vitrage team # # 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 writi...
import psycopg2 import os, sys TOPIC_NUM_LIST = [30, 100, 200, 500] if len(sys.argv) is 1: print("トピック数を入力") exit() topic_num = int(sys.argv[1]) if not topic_num in TOPIC_NUM_LIST: print("入力可能なトピック数は ", end="") for each in TOPIC_NUM_LIST: print("{0} ".format(each), end="") print("です.") exit() ...
queries = { "column": { "head": "select %s from %s limit %d;", "all": "select %s from %s;", "unique": "select distinct %s from %s;", "sample": "select %s from %s order by rand() limit %d;" }, "table": { "select": "select %s from %s;", "head": "select * from %s...
from functools import partial import yaml from pytest_regressions.common import Path, check_text_files, perform_regression_check class DataRegressionFixture: """ Implementation of `data_regression` fixture. """ def __init__(self, datadir, original_datadir, request): """ :type datadi...
"""Graphical user interface.""" import collections import ctypes import sdl2 import hienoi.renderer from hienoi._common import GLProfile, GraphicsAPI, ParticleDisplay, UserData from hienoi._vectors import Vector2i, Vector2f, Vector4f class NavigationAction(object): """Enumerator for the current nagivation acti...
from distutils.core import setup, Extension module1 = Extension('pycompdev', sources = ['pycompdev.c','list.c','../../pyaccords/pysrc/ctools.c','../../pyaccords/pysrc/pytools.c'], depends = ['component.c','list.c','../../pyaccords/pysrc/listoccibuilder.h','../../pyaccords/py...
#---------------------------------------------------------------------- # Copyright (c) 2011-2016 Raytheon BBN Technologies # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including ...
#!/usr/bin/python3 # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016-2017 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...
from django.contrib import admin from django.urls import reverse from .models import Partner, PartnerCommunity, PartnerUser class PartnerAdmin(admin.ModelAdmin): """ Django admin customizations for Partner model """ list_display = ('id', 'label', 'slug', 'partner_url') readonly_fields = ('partner...
# Amara, universalsubtitles.org # # Copyright (C) 2013 Participatory Culture Foundation # # 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 ...
# GUI Application automation and testing library # Copyright (C) 2006-2018 Mark Mc Mahon and Contributors # https://github.com/pywinauto/pywinauto/graphs/contributors # http://pywinauto.readthedocs.io/en/latest/credits.html # All rights reserved. # # Redistribution and use in source and binary forms, with or with...