src
stringlengths
721
1.04M
from tcms.settings.devel import * DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': '', 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } LISTENING_MODEL_SIGNAL = False LOGGING = { 'version': 1, 'disable_existing_loggers':...
''' -- imports from python libraries -- ''' # import os -- Keep such imports here import json ''' -- imports from installed packages -- ''' from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.http import HttpResponseRedirect from django.http import HttpRespo...
if __name__ == '__main__': print("The upgrade script has changed. You need to execute the upgrade command again to update the data structure.") exit(0) import hashlib import hmac import json import tarfile import time import uuid import os from common import file def add_page_id(list_item): list_item["u...
""" Django settings for gitcodereview project. """ import os from os.path import abspath, dirname, join import dj_database_url from django.core.urlresolvers import reverse_lazy # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)...
"""Tests for Euclidean algorithms, GCDs, LCMs and polynomial remainder sequences. """ from sympy.polys.euclidtools import ( dup_gcdex, dup_half_gcdex, dup_invert, dup_euclidean_prs, dmp_euclidean_prs, dup_primitive_prs, dmp_primitive_prs, dup_subresultants, dmp_subresultants, dup_prs_resultant, dmp...
import wx from griddict import GridDictionary import Global class FrameFinish(wx.Frame): def __init__(self, parent, true_count, false_count, falses): FRAME_SIZE_WIDTH = 800 FRAME_SIZE_HEIGHT = 300 FRAME_POS_X = 200 FRAME_POS_Y = 200 wx.Frame.__init__(self, parent, -1, ...
# -*- coding: utf-8 -*- """ http://www.astroml.org/sklearn_tutorial/dimensionality_reduction.html """ print (__doc__) import numpy as np import copy from sklearn.cluster import KMeans from sklearn.cluster import k_means from sklearn.manifold import spectral_embedding from sklearn.utils import check_random_state impo...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # 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 # au...
#!/usr/bin/python # # Reference: Matt Hawkins's Code on # http://www.raspberrypi-spy.co.uk/ # Revised by Austin Tian #-------------------------------------- import smbus import time from ctypes import c_short from ctypes import c_byte from ctypes import c_ubyte from time import sleep DEVICE = 0x77 # Default device I...
import pytest from .. import surface class TestSurfaceMeasure(object): def test_surface_measure_neighbors(self, meshdata): sm = surface.SurfaceMeasure(meshdata["verts"], meshdata["faces"]) for v, v_n in sm.neighbors.items(): assert v_n == pytest.approx(meshdata["neighbors"][v]) ...
# -*- coding: utf8 -*- import sys, os sys.path.append(os.path.abspath('.')) import re from operator import attrgetter import difflib # Pylons model init sequence import pylons.test import logging from quanthistling.config.environment import load_environment from quanthistling.model.meta import Sessi...
from sklearn.cross_validation import train_test_split from sklearn import metrics import matplotlib.pyplot as plt import pickle from src.utils.get_time_stamp import get_time_stamp from sklearn.grid_search import GridSearchCV def make_roc_curve(pipeline, X, y, train_frac, subject, cfg): X_train, X_test, y_train, y...
from django.conf.urls import patterns, include, url from myuw.views.api.current_schedule import StudClasScheCurQuar from myuw.views.api.finance import Finance from myuw.views.api.hfs import HfsBalances from myuw.views.api.future_schedule import StudClasScheFutureQuar from myuw.views.api.library import MyLibInfo from my...
""" Gnumeric-py: Reading and writing gnumeric files with python Copyright (C) 2017 Michael Lipschultz 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 opti...
# Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Example of kNN implemented from Scratch in Python import csv import random import math import operator def loadDataset(filename, split, trainingSet=[] , testSet=[]): with open(filename, 'rb') as csvfile: lines = csv.reader(csvfile) dataset = list(lines) for x in range(len(dataset)-1): for y...
# -------------------------------------------------------- # FCN # Copyright (c) 2016 # Licensed under The MIT License [see LICENSE for details] # Written by Yu Xiang # -------------------------------------------------------- """FCN config system. This file specifies default config options for Fast R-CNN. You should ...
# -*- coding: utf-8 -*- from django import template from django.template import TemplateSyntaxError, Node from ..icons.base import Icon from ..tags import token_kwargs, resolve_kwargs register = template.Library() class IconNode(Node): def __init__(self, _icon, kwargs=None): super(IconNode, self).__in...
# Copyright (c) 2012 NetApp, 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...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.http import HttpResponse from django.views.decorators.http import require_POST from twilio.twiml.messaging_response import MessagingResponse # Create your views here. from twilio_sms_handler.TrelloQuery import TrelloQuery from twilio_trello.tw...
#!/usr/bin/python #------------------------------------------------------------------------------ # # Copyright (C) 2016 Cisco Systems, Inc. # # 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 Fou...
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-16 20:06 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ofahrtbase', '0019_auto_20161020_1750'), ] operations = [ migrations.AlterF...
# -*- coding: utf-8 -*- # @j00zek 2015 from __init__ import * from Components.ActionMap import ActionMap from Components.config import * from Components.MenuList import MenuList from Components.ScrollLabel import ScrollLabel from Components.Sources.StaticText import StaticText from enigma import eConsoleAppContainer...
# Copyright 2016 - Nokia # # 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, sof...
""" # Definition for a Node. class Node: def __init__(self, val, prev, next, child): self.val = val self.prev = prev self.next = next self.child = child """ class Solution: def flatten(self, head: 'Node') -> 'Node': start = head head = head while head != ...
# coding: utf-8 # tools.py written by Duncan Murray 20/3/2014 (C) Acute Software # Script to configure the functional toolbox of AIKIF import os import sys import time from random import randint import aikif.toolbox.Toolbox as mod_tool import aikif.config as mod_cfg aikif_dir = mod_cfg.core_folder # os.path.dirname(o...
# -*- coding: utf8 -*- __author__ = 'shin' import re import jieba import random import datetime ''' namelist=[395,237,283,432,370,137,388,453,447,270,407,378,190,350,308,205,422,20,280,297,261,231,306,213,457,161,459,364,420,75,383,117,112,428,325,179,454,443,390,424] countlist=[224,417,434,209,134,223,393,95,286,396,1...
"""Public interface managing the workflow for peer assessments. The Peer Assessment Workflow API exposes all public actions required to complete the workflow for a given submission. """ import logging import json from django.db import DatabaseError, IntegrityError, transaction from django.utils import timezone from...
# Software License Agreement (BSD License) # # Copyright (c) 2011, Willow Garage, 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: # # * Redistributions of source code must retain the above...
#PBS -l nodes=20:ppn=4:opteron4 #PBS -q verylong #PBS -N amc_n100_conv1 #PBS -m ae import os from montecarlo import SurfaceMonteCarloData from ase.cluster.cubic import FaceCenteredCubic from ase.cluster import data from asap3.MonteCarlo.Metropolis import Metropolis from asap3.MonteCarlo.Moves import SurfaceMove from as...
""" Data model objects, some of which extend the DAO for storage purposes """ import json, redis, logging from datetime import datetime from openarticlegauge import config from openarticlegauge.dao import DomainObject from openarticlegauge.slavedriver import celery from werkzeug import generate_password_hash, check...
#!/usr/bin/env python from __future__ import print_function import logging from dateutil.parser import parse as parse_date from elasticsearch import Elasticsearch def print_search_stats(results): print('=' * 80) print('Total %d found in %dms' % (results['hits']['total'], results['took'])) print('-' * 80)...
# Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # 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/LICEN...
import data.store import bottle from io import BytesIO from data.store import api def test_api_exists(): assert hasattr(data.store, "api") def test_get_collections_returns_list_of_collections(): assert data.store.api.get_collections() == {} def test_del_collection_deletes_a_collection(): api.post_collect...
# coding: utf-8 from django import forms from django.utils.translation import ugettext as _ from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Div, Submit, HTML, Button, Row, Field from crispy_forms.bootstrap import AppendedText, PrependedText, FormActions from erp_test.models import S...
""" hook specifications for pytest plugins, invoked from main.py and builtin plugins. """ from _pytest._pluggy import HookspecMarker hookspec = HookspecMarker("pytest") # ------------------------------------------------------------------------- # Initialization hooks called for every plugin # ----------------------...
from __future__ import absolute_import, unicode_literals import os WAGTAIL_ROOT = os.path.dirname(__file__) STATIC_ROOT = os.path.join(WAGTAIL_ROOT, 'test-static') MEDIA_ROOT = os.path.join(WAGTAIL_ROOT, 'test-media') MEDIA_URL = '/media/' DATABASES = { 'default': { 'ENGINE': os.environ.get('DATABASE_ENG...
# -*- coding: utf-8 -*- # from rest_framework import serializers from django.db.models import Prefetch, F from django.utils.translation import ugettext_lazy as _ from orgs.mixins.serializers import BulkOrgResourceModelSerializer from common.serializers import AdaptedBulkListSerializer from ..models import Asset, Node...
# # Copyright 2013 Quantopian, 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 wr...
#!/usr/bin/env python import sys from elasticsearch import Elasticsearch import requests from queue import Queue import threading # Setup some queues global total_size global url_q global count_q url_q = Queue() url_q.maxsize = 1000 count_q = Queue() q_threads = 8 class Reference: "CVE References class" def...
from typing import Dict, Union import requests from .environment import ( get_default_environment, ISignEnvironment, ) from .error import ISignError class ISignConnection: def __init__(self, access_token: str, user_agent: str = "Python iSign", environme...
import tensorflow as tf import numpy as np import os,glob,cv2 import sys,argparse from google.cloud import vision from google.cloud.vision import types import webcolors import sys, os sys.path.append(os.path.join(os.path.dirname(__file__),'..','constants')) import Constant # print(Constant.Classifier_Model) def predict...
## functions for analyzing empirical/simulated CMS output ## last updated 09.14.2017 vitti@broadinstitute.org import matplotlib as mp mp.use('agg') import matplotlib.pyplot as plt import numpy as np import math from scipy.stats import percentileofscore ################### ## DEFINE SCORES ## ################### def...
""" stringjumble.py Author: Mary Feyrer Credit: Tess Snyder, Daniel Wilson Assignment: The purpose of this challenge is to gain proficiency with manipulating lists. Write and submit a Python program that accepts a string from the user and prints it back in three different ways: * With all letters in reverse. * Wi...
from httplib import HTTPSConnection import json import imaplib import re import base import tools import secrets class GmailApi(base.ApiBase): list_re = re.compile(r'\((.+)\) "(.+)" "(.+)"') def __init__(self): base.ApiBase.__init__(self, "gmail") self.token = "" def icon_url(self): ...
"""Main launcher for pyliteco. Author: Robert Walker <rrah99@gmail.com> Copyright (C) 2015 Robert Walker This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2. This program is ...
# -*- coding: utf-8 -*- from __future__ import print_function from collections import defaultdict def extract_devices(sensors): _DEVICE = defaultdict(dict) for sensors_group in sensors: if not sensors[sensors_group]['acquisition_mode']: continue # analog channels for item ...
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import re def CreateLowOverheadFilter(): """Returns a filter with the least overhead possible. This contains no sub-traces of thread tasks, so it's on...
import os import sys import wx import mymail try: from agw import gradientbutton as GB bitmapDir = "bitmaps/" except ImportError: # if it's not there locally, try the wxPython lib. import wx.lib.agw.gradientbutton as GB bitmapDir = "agw/bitmaps/" wildcard = "Text File (*.txt)|*.txt|" \ ...
# -*- coding: utf-8 -*- ############################################################################## # # school module for OpenERP # Copyright (C) 2010 Tecnoba S.L. (http://www.tecnoba.com) # Pere Ramon Erro Mas <pereerro@tecnoba.com> All Rights Reserved. # # This file is a part of school module # # ...
import re from urllib import urlencode from urllib2 import urlopen import sys from corehq.apps.sms.mixin import SMSBackend, BackendProcessingException from corehq.apps.sms.forms import BackendForm from corehq.apps.reminders.forms import RecordListField from django.forms.fields import * from django.core.exceptions impor...
from selenium import webdriver from selenium.webdriver.common.keys import Keys from django.test import LiveServerTestCase from django.contrib.auth.models import User from django.conf import settings from django.conf.urls.static import static import sys from op_tasks.models import Dataset, Product, OpTask, UserProfile,...
# ScatterBackup - A chaotic backup solution # Copyright (C) 2016 Ingo Ruhnke <grumbel@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 your ...
import math import numpy as np import measurement_stats as mstats import functools import pandas as pd def compute_fitness_rankings(df): """ :param df: :return: """ fitness_values = [] for index, row in df.iterrows(): fitness_values.append( compute_fitness(row['swing'], r...
import numpy as np import os from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D # has to change whenever noise_width and noise_height change in the PerlinNoise.hpp file DIMENSION1 = 200 DIMENSION2 = 200 # works if the working directory is set path = os.path.dirname(os.path.realpath(__file__)...
# -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incor...
import sublime from sublime_plugin import TextCommand from ..git_command import GitCommand from ...common import util from ..ui_mixins.quick_panel import show_remote_panel class GsRemoteAddCommand(TextCommand, GitCommand): """ Add remotes """ def run(self, edit): # Get remote name from user ...
# -*- coding: utf-8 -*- from django.shortcuts import render_to_response from django.template import RequestContext, Context, loader from subways.models import Map, Line, Stop from subways.utilis import ride_path, longest_ride_path def map(request, map_name, template_name=None): """ view a map """ map = Map...
# This file is part of the Printrun suite. # # Printrun 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. # # Printrun is distributed in ...
#!/usr/bin/env python """ some configureation parameters list here. Titainium Deng knifewolf@126.com """ import asyncio import os import re import sys from pyArango import connection import jieba import uvloop from config import JIEBA_LOGGER class BaseCutter: """ A word segment class base on jieba librar...
# -*- coding: utf-8 -*- from PySide.QtCore import * from PySide.QtGui import * class AsyncProcess (QThread): progressUpdated = Signal (int) changed = Signal (str) errorOccured = Signal (str) bannerUpdated = Signal (str) def __init__ (self, target, parent, changeCursor = False): ...
import json from api.model.sessionHelper import get_session from api.model.models import Notification from api.authentication.AuthenticatedHandler import AuthenticatedHandler from sqlalchemy.orm.exc import NoResultFound, MultipleResultsFound from tornado.gen import coroutine from api.Utils import authenticated class ...
import stomp from stomp import exception from stomp.listener import TestListener from .testutils import * @pytest.fixture() def conn(): conn = stomp.Connection12(get_default_host()) listener = TestListener("123", print_to_log=True) conn.set_listener("testlistener", listener) conn.connect(get_default_u...
""" WSGI config for scrsites project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION``...
import numpy as np from numpy import concatenate as cat from scipy.sparse import csr_matrix import scipy.sparse.linalg as spla from copy import copy import matplotlib.pyplot as plt import warnings from .preprocess import shape, discretization, boundaryCondition plt.rc('text', usetex=True) plt.rc('font', family='serif'...
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2015 Dag Wieers <dag@wieers.com> # # 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 Lice...
#!/usr/bin/env python import sys import os import warnings from distutils.dist import Distribution display_option_names = Distribution.display_option_names + ['help', 'help-commands'] query_only = any('--' + opt in sys.argv for opt in display_option_names) or len(sys.argv) < 2 or sys.argv[1] == 'egg_info' # Use set...
import requests import time from xml.dom import minidom from common.methods import set_progress from xui.veeam.veeam_admin import VeeamManager def run(server, *args, **kwargs): set_progress(f"Starting Veeam Backup restoration... ") veeam = VeeamManager() server_ci = veeam.get_connection_info(...
''' python poolseq_tk.py count Description: Count alleles at each SNP give the pileups Author: Simo V. Zhang Input: pileup file with reads bases converted to corresponding alleles Output: pielup file with allele counts (1) chr (2) pos (3) ref base (4) alt base (5) allele counts in the o...
#!/usr/bin/python ''' Weather.py John Heenan 14 February 2014 A simple utlity to send notifications to your phone when it starts raining outside of your windowless CS lab. Run as a login item/launchd process/drop it in .bashrc and it will only call you when you're in the lab. ''' import urllib2 import json import time...
# The content of this file was generated using the Python profile of libCellML 0.2.0. from enum import Enum from math import * __version__ = "0.1.0" LIBCELLML_VERSION = "0.2.0" STATE_COUNT = 0 VARIABLE_COUNT = 2 class VariableType(Enum): CONSTANT = 1 COMPUTED_CONSTANT = 2 ALGEBRAIC = 3 VOI_INFO = {"...
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.18 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import c...
"""Test letsencrypt.client.reverter.""" import logging import os import shutil import tempfile import unittest import mock from letsencrypt.client import errors class ReverterCheckpointLocalTest(unittest.TestCase): # pylint: disable=too-many-instance-attributes """Test the Reverter Class.""" def setUp(s...
# -*- coding: utf-8 -*- from __future__ import division, print_function import numpy as np from ...state import State __all__ = ["test_dtype", "test_serialization", "test_repr"] def test_dtype(seed=1234): np.random.seed(seed) dtype = [ ("coords", np.float64, (4, )), ("log_prior", np.float...
# -*- coding: utf-8 -*- # -*- Channel HDFullS -*- # -*- Created for Alfa-addon -*- # -*- By the Alfa Develop Group -*- from builtins import chr from builtins import range import sys PY3 = False if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int if PY3: from lib import alfaresolver_py...
import hashlib from pathlib import Path from docutils import nodes from docutils.parsers.rst import Directive, directives import sphinx import matplotlib as mpl from matplotlib import cbook from matplotlib.mathtext import MathTextParser mathtext_parser = MathTextParser("Bitmap") # Define LaTeX math node: class late...
import os import shutil def recursive_scandir(top_dir, dir_first=True): """Recursively scan a path. Args: top_dir: The path to scan. dir_first: If true, yield a directory before its contents. Otherwise, yield a directory's contents before the directory itself. Returns: A ...
# Copyright 2012 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 in...
#!/usr/bin/python # -*- coding: UTF-8 -*- # # Copyright 2011 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...
# TensorFlow-Tacyt # # This script connects to 11Path's Tacyt database # and learns to identify malicious applications. # Connection to Tacyt through the tacyt python API. # Machine learning through TFLearn and TensorFlow. # # Copyright (C) 2017 Rafael Ortiz <rafael@ortizmail.cc> # # This library is free software; you ...
#!/usr/bin/python ''' This scripts converts tpt file format to RTTM format so that it can be converted by NIST evaluation script ''' import os,commands,sys inp = open(sys.argv[1],'r') # inpit tpt file FLAG = 0 # initiation mark UMF = 0 # UNIDENTIFIED Male/Female def remove_zeros(string): # extracts time stamp for...
#! /usr/bin/env python # # example2_gtk.py -- Simple, configurable FITS viewer. # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from __future__ import print_function import sys, os import logging, logging.handlers from ginga import AstroImage from ginga.g...
# encoding: utf8 from __future__ import unicode_literals __all__ = ['StockImage', 'StockImageException', 'TK_IMAGE_FORMATS'] import os import logging try: import tkinter as tk except: import Tkinter as tk logger = logging.getLogger(__name__) class StockImageException(Exception): pass BITMAP_TEMP...
# coding=utf-8 # Nemubot is a modulable IRC bot, built around XML configuration files. # Copyright (C) 2012 Mercier Pierre-Olivier # # 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, eith...
# -*- coding: utf-8 -*- # # lyman documentation build configuration file, created by # sphinx-quickstart on Mon Jul 29 23:25:46 2013. # # 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...
#!/usr/bin/env python # :noTabs=true: """ create a directory of the contents in a PDB splits into chains, grouped chains (pairings parsed from the header), individual HETATM PDB lines, sequence files (FASTA), etc. verbosely: This method behaves slightly differently for PDB files with multiple models, nucleic ...
#!/usr/bin/env python import argparse import os import configure from settings import APP_PATH, CONFIG_DB import watcher __author__ = 'Terry Chia' if __name__ == '__main__': parser = argparse.ArgumentParser() action = parser.add_mutually_exclusive_group(required=True) action.add_argument('--start', help...
# Copyright (c) 2014-present PlatformIO <contact@platformio.org> # # 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...
#!/usr/bin/python import io import os import signal import sys from subprocess import call hit = miss = bypass = expired = 0 ######################################################################################### ######################################################################################### def main(): ...
import time import sdl #Frame delta vars. currTime = 0 prevTime = 0 prevFpsUpdate = 0 #Updated with a certain frequency. fps = 0 averageDelta = 0 #The frequency by which to update the FPS. fpsUpdateFrequency = 1 #Frames since last FPS update. frames = 0 #The current timestep. dt = 0 #The timer period (reciproca...
# -*- 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, softw...
# 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...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# -*- coding: utf-8 -*- # 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 json import platform import socket import struct import sys from os.path import abspath ...
"""INSTEON Message All-LinkCleanup Failup Report.""" from insteonplm.messages.message import Message from insteonplm.constants import ( MESSAGE_ALL_LINK_CEANUP_FAILURE_REPORT_0X56, MESSAGE_ALL_LINK_CEANUP_FAILURE_REPORT_SIZE, ) from insteonplm.address import Address class AllLinkCleanupFailureReport(Message):...
from AnyQt.QtWidgets import QAction, QToolButton from .. import test from ..toolgrid import ToolGrid class TestToolGrid(test.QAppTestCase): def test_tool_grid(self): w = ToolGrid() w.show() self.app.processEvents() def buttonsOrderedVisual(): # Process layout events ...
import glob import logging import os import datadb import crypto import utils from datetime import datetime from datetime import timedelta SERVICES = {'pgwatch2': {'log_root': '/var/log/supervisor/', 'glob': 'pgwatch2-stderr*'}, 'influxdb': {'log_root': '/var/log/supervisor/', 'glob': 'influxdb-stderr*'},...
""" EndMessage.py message / menu that appears upon completion or failure of puzzle EndMessage.win is where puzzle profile data is modified after completion """ import pygame import dinosInSpace import static56 import infoGraphic56 import tween import soundFx56 import dino56 import dataStorage56 import sna...
import pytest #from flask import url_for from app.models import User from app import mail def test_login_and_logout(client, db): # Add test user. user = User(email='test@example.com', password='secretsauce', confirmed=True) db.session.add(user) db.session.commit() # Login rv = client.post('/a...