src
stringlengths
721
1.04M
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Rasta RST Editor 2010 - Gökmen Göksel <gokmeng: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 2 of the Lice...
__author__ = 'algol' import cherrypy from jinja2 import Environment, PackageLoader import memin.core as mc from configparser import ConfigParser class Menu: def __init__(self): self.menu = [ {'name': 'Главная', 'link': '/'}, {'name': 'Персоны', 'link': '/persons'}, {'n...
""" Each store has slightly different semantics wrt draft v published. XML doesn't officially recognize draft but does hold it in a subdir. Old mongo has a virtual but not physical draft for every unit in published state. Split mongo has a physical for every unit in every state. Given that, here's a table of semantics...
# coding=utf-8 # -------------------------------------------------------------------------- # 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 ...
# -*- coding: utf-8 -*- """ Scrapy settings for tegenaria project. For simplicity, this file contains only settings considered important or commonly used. You can find more settings consulting the documentation: http://doc.scrapy.org/en/latest/topics/settings.html http://scrapy.readthedocs.org/en/latest/topics/downlo...
""" Tests the scaler/adder example in our docs. This test was inconvenient to test in its place in the docs. """ # pylint: disable-msg=C0111,C0103 import unittest from openmdao.lib.datatypes.api import Float from openmdao.lib.drivers.api import SLSQPdriver from openmdao.main.api import Assembly,Component from openmda...
""" Verify gradebook API calls with unit tests """ import json import tempfile import time import httpretty import mock from pylmod import GradeBook from pylmod.exceptions import ( PyLmodUnexpectedData, PyLmodNoSuchSection, PyLmodFailedAssignmentCreation, ) from pylmod.tests.common import BaseTest class...
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
import asyncio import logging import colander from pyramid.httpexceptions import HTTPNoContent, HTTPNotFound, HTTPBadRequest from pyramid_aiorest import resource_config, ioschema from aiorm import orm from ..models import User, UserGroup, Group log = logging.getLogger(__name__) class PostUserParams(colander.Mappi...
from _utils import TestBase import json import uuid class TestPlugIt(TestBase): @classmethod def setup_class(self): super(TestPlugIt, self).setup_class() from plugit_proxy.plugIt import PlugIt self.plugIt = PlugIt('http://0.0.0.0/') myself = self def _doQuery(url...
""" This file is part of DeepConvSep. Copyright (c) 2014-2017 Marius Miron <miron.marius at gmail.com> DeepConvSep 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 Licen...
import re from gourmet.plugin import PluginPlugin from .state import WebsiteTestState class FoodNetworkPlugin(PluginPlugin): target_pluggable = 'webimport_plugin' def test_url(self, url, data): if 'foodnetwork.co.uk' in url: return WebsiteTestState.SUCCESS return WebsiteTestSta...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'ArticlesPlugin' db.create_table(u'cmsplugin_articles_arti...
# Python test set -- part 1, grammar. # This just tests whether the parser accepts them all. #from test.support import run_unittest, check_syntax_error # Currently test.support cannot be imported import unittest #import sys # testing import * #from sys import * class TokenTests(unittest.TestCase): def testBack...
#!/usr/bin/env python3 # Load the libraries #this is to test something import serial # Serial communications import time # Timing utilities import subprocess # Shell utilities ... compressing data files import os,sys # OS utils to keep working directory import json # To send JSON object to MQTT broker impor...
# coding=utf-8 # -------------------------------------------------------------------------- # 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 ...
# TestExpressionAccessControl.py # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.txt for license information # See https://swift....
import time import requests import telegram from libs.utils import build_bot from modules.uber import CURRENT_ORDER_URL, UPDATE_CARD bot = build_bot() while True: for u_id in bot.redis.sscan_iter('uber:requested_users'): u_id = int(u_id) token = bot.user_get(u_id, 'uber:access_token') res...
import os import time from unittest import TestCase from batchbook.client import Client class BatchbookTestCases(TestCase): def setUp(self): self.api_key = os.environ.get('apikey') self.account_name = os.environ.get('account_name') self.my_contact = { "person":...
""" This module provides various mesh utilities for cleaning and extruding. """ import pymel.core as pm import maya.mel as mel """ Combine multiple polygon meshes with the option of removing duplicate internal faces. Parameters: instanceGroup -- A group of meshes to combine ( pymel.core.general.group ) ...
import requests, json, argparse, os, subprocess, xmltodict envDict = {} ignoreFiles = [".gitignore",".gitattributes","LICENSE"] ignoreExt = [".md",".txt",".json",".ps1",".py"] def findBinaries(basefolder): testBinaries = [] fileidBinaries = [] for root, dirs, files in os.walk(basefolder): for file in files: i...
# -*- coding: utf-8 -*- # Copyright (C) 2014-present Taiga Agile LLC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later ver...
import numpy as np import pandas as pd from pandas import DataFrame ############################################################ # Life tables # https://www.ssa.gov/oact/STATS/table4c6.html ############################################################ ############################################################ # Male...
# -*- coding: ascii -*- r""" :Copyright: Copyright 2014 - 2016 Andr\xe9 Malo or his licensors, as applicable :License: 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....
#!/usr/bin/python import numpy as np import matplotlib.pyplot as pyplot from datetime import datetime import os import glob import sys import re import argparse import cv2 import random import ast # Argument parsing #parser = argparse.ArgumentParser(description='Jumpball analyze') #parser.add_argument('-s', '--seas...
from .layer import * class Lenet: def __init__(self): self.num_classes = 65 self.x = None self.y = None self.keep_prob = None self.pred_logits = None self.pred_labels = None self.accuracy = None self.l2_loss = None self.weights = [] ...
from __future__ import unicode_literals, absolute_import import base64 import logging import xapian from . import json from .core import get_slot, get_prefix, expand_terms, find_terms, DOCUMENT_CUSTOM_TERM_PREFIX from .serialise import normalize, serialise_value from .exceptions import XapianError MAX_DOCS = 10000 ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # docmeta - A python module to extract metadata from document files # Copyright 2012 Abdó Roig-Maranges <abdo.roig@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 ...
""" Django settings for testproject project. Generated by 'django-admin startproject' using Django 1.10.6. 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/ """ impor...
# Generated by Django 2.2.2 on 2019-06-04 21:16 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
"""Implementations of learning abstract base class queries.""" # pylint: disable=invalid-name # Method names comply with OSID specification. # pylint: disable=no-init # Abstract classes do not define __init__. # pylint: disable=too-few-public-methods # Some interfaces are specified as 'markers' and include ...
""" You are given two arrays (without duplicates) nums1 and nums2 where nums1's elements are subset of nums2. Find all the next greater numbers for nums1's elements in the corresponding places of nums2. The Next Greater Number of a number x in nums1 is the first greater number to its right in nums2. If it does not exi...
from rez.utils.resources import Resource from rez.utils.schema import Required, schema_keys from rez.utils.logging_ import print_warning from rez.utils.data_utils import cached_property, SourceCode, \ AttributeForwardMeta, LazyAttributeMeta from rez.utils.formatting import PackageRequest from rez.exceptions import ...
''' Detecting degeneracy and merging zero-length edges. ''' from geonet.network import SteinerTree, merge_pos from geonet.geometry import distance from geonet.constants import abstol def degenerate_edges(tree, steiner_pos, abstol=abstol): '''list of edges with (numerically) zero length''' assert isinstance(tr...
""" Optical flow ============ This tutorial offers a short overview of the optical flow routines available in pysteps and it will cover how to compute and plot the motion field from a sequence of radar images. """ from datetime import datetime from pprint import pprint import matplotlib.pyplot as plt im...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
#!/usr/bin/env python # Copyright (c) 2008-14 Qtrac Ltd. All rights reserved. # This program or module 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 # version 3 of the Lic...
__author__ = 'pierleonia' DEBUG=True import os, traceback from multiprocessing import Pool class BioentrySearchEngineBackend(object): def rebuild(self, bioentry_ids=[], **kwargs): raise NotImplementedError() def indexes(self, **kwargs): raise NotImplementedError() def after_insert(self...
#!/usr/bin/env python # 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. import argparse import subprocess import shutil import sys import os def main(): parser = argparse.ArgumentParser(description='Crea...
from eca import * from eca.generators import start_offline_tweets import datetime @event('init') def setup(ctx, e): '''The code that will be executed at initialization: starting the offline tweet stream.''' start_offline_tweets('cadabata_static/batatweets.txt', 'tweet', time_factor=100000, arff_file='classi...
# Copyright 2018 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
# Copyright 2015, 2020 National Research Foundation (SARAO) # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later version. # #...
# Copyright 2013 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
import os import types import shutil import struct import logging import threading import contextlib from functools import partial, wraps from collections import defaultdict import lmdb # type: ignore import synapse.lib.cell as s_cell import synapse.lib.lmdb as s_lmdb import synapse.lib.queue as s_queue import synap...
import unittest from collections import Counter import battle import inventory from character import Character class TestBattle(unittest.TestCase): def test_init_battle(self): char1 = Character(None, maxhealth=100, initiative=1000) char2 = Character(None, maxhealth=100, initiative=1) bat...
from numpy import prod, shape, sign, dot, array, tile, transpose, concatenate, dstack, swapaxes, sqrt, amax, vectorize from numpy.random import RandomState from pypuf import tools from pypuf.simulation.base import Simulation class LTFArray(Simulation): """ Class that simulates k LTFs with n bits and a constan...
#!/usr/bin/env python3 # To run the tests, use: python3 -m pytest --capture=sys from pokemonterminal.database import Database from tests.test_utils import expected_len def broken_test_extra_length(region_name='extra'): assert len(Database().get_extra()) == expected_len(region_name) def broken_test_kanto_lengt...
# coding=utf-8 # -------------------------------------------------------------------------- # 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 ...
import sys import time import datetime from operator import itemgetter import subprocess import windninja_server.windninjaqueue.windninja as wn import windninja_server.windninjaqueue.queue as wnqueue VERBOSE = False CANCEL = False LOOP_PAUSE = 5 MAX_RUNNING_JOBS = 5 # NOTES: this is a simple 'max' processes queue m...
#!/usr/bin/env python3 # This file is part of Cockpit. # # Copyright (C) 2020 Red Hat, Inc. # # Cockpit 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 ...
######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 #...
# 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 tempfile import boto3 import pytest from moztelemetry.store import S3Store, InMemoryStore @pytest.mark.paramet...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Grabfeed documentation build configuration file, created by # sphinx-quickstart on Tue Jan 19 09:26:38 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 # a...
import asynctest import json from asynctest.mock import patch from asynctest.mock import call class TestSetChannelTopic(asynctest.TestCase): def setUp(self): patcher1 = patch('charlesbot_rundeck.rundeck_lock.RundeckLock.seed_job_list') # NOQA self.addCleanup(patcher1.stop) self.mock_seed...
# SSH brute force with pxssh class and keyfile, based on chapter 2 # Python 3.4 """ Another example of this script: https://www.exploit-db.com/exploits/5720/ The 32768 keys can be found here: https://github.com/g0tmi1k/debian-ssh The exploit CVE: http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-0166 For th...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in complianc...
from pywb.utils.timeutils import iso_date_to_timestamp from pywb.utils.bufferedreaders import DecompressingBufferedReader from pywb.utils.canonicalize import canonicalize from pywb.utils.loaders import extract_post_query, append_post_query from recordloader import ArcWarcRecordLoader import hashlib import base64 imp...
""" nodes which behave similar to theano functions """ import theano import theano.tensor as T from .. import core from .. import theano_extensions fX = theano.config.floatX @core.register_node("sqr") class SqrNode(core.NodeImpl): """ like theano.tensor.sqr """ def compute_output(self, network, i...
# Zebrafish Analysis import math import numpy as np import cv2 from scipy.signal import savgol_filter class ModelConfig: def __init__(self, num_segments, min_angle, max_angle, num_angles, tail_length, tail_detection, prune_retention, test_width, draw_width, auto_detect_tail_length): self.min_angle = m...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.runner.procmon}. """ from twisted.trial import unittest from twisted.runner.procmon import LoggingProtocol, ProcessMonitor from twisted.internet.error import (ProcessDone, ProcessTerminated, ...
from __future__ import print_function import sys import time import traceback class BaseReporter(object): def begin_tests(self): pass def end_tests(self): pass class TextTestReporter(BaseReporter): head_template = '{double_dash}\n{status}: {id}\n{single_dash}\n' message_template...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import time import logging import subprocess from unittest import main, skip, TestCase from machammer import (functions, system_profiler, network, hooks, users, screensaver, defaults, printers,...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from flask import session from flask.ext.wtf import Form from wtforms import StringField, PasswordField, BooleanField, SubmitField from wtforms.validators import Required, Length, Email, EqualTo from wtforms import ValidationError from flask.ext.babel im...
#!/usr/bin/python from django.conf import settings from django.conf.urls import url, include from django.conf.urls.static import static from game import views from rest_framework.routers import DefaultRouter from rest_framework.schemas import get_schema_view app_name = 'game' router = DefaultRouter() router.register(...
""" A module that simply bolts on simple loops by translating them into interpretable code in Spaghetti. This module will probably disappear in the future. This is just a quick hack some hours before the GCJ 2010 Quals to add FOR loops for solving problems during the contest Warning: Extremely Buggy and hardly works...
# -*- coding: utf-8 -*- ''' Load required libraries and check versions PyCorder ActiChamp Recorder ------------------------------------------------------------ Copyright (C) 2010, Brain Products GmbH, Gilching PyCorder is free software: you can redistribute it and/or modify it under the terms of the GN...
'''backend.py: interface for ufw backends''' # # Copyright 2008-2011 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 th...
# -*- coding: utf-8 -*- """ *************************************************************************** Relief.py --------------------- Date : December 2016 Copyright : (C) 2016 by Alexander Bruy Email : alexander dot bruy at gmail dot com *****************...
import os import sys import unittest from uuid import UUID, uuid4 sys.path.insert(0, os.path.abspath(__file__ + "/../..")) from shortuuid.main import * class LegacyShortUUIDTest(unittest.TestCase): def test_generation(self): self.assertTrue(20 < len(uuid()), 24) self.assertTrue(20 < len(uuid("ht...
#!/usr/bin/env python3 """ K. Miernik 2013 k.a.miernik@gmail.com GPL v3 Spectrum fitting code """ import argparse import math import numpy import os import sys import time import xml.etree.ElementTree as ET import matplotlib.pyplot as plt from lmfit import minimize, Parameters, report_errors from P...
# -*- coding: utf-8 -*- # # 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 configuration values have a default; values that are commented out # serve to show the default. import sys, os...
import csv from collections import OrderedDict from django.http.response import HttpResponse from django.shortcuts import get_object_or_404, render from django.views.generic.edit import FormView from molo.polls.models import Question class QuestionResultsAdminView(FormView): def get(self, request, *args, **kwarg...
# coding=utf-8 # coding=utf-8 # Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 ...
import json import elastic from operator import itemgetter from default_query import DefaultQuery class ShowQuery(DefaultQuery): """ Handles ES queries related to shows """ def __init__(self): DefaultQuery.__init__(self) def generate_response_best_show(self, query, annotated_query): ...
from __future__ import unicode_literals import unittest from ufoLib.filenames import userNameToFileName, handleClash1, handleClash2 class TestFilenames(unittest.TestCase): def test_userNameToFileName(self): self.assertEqual(userNameToFileName("a"), "a") self.assertEqual(userNameToFileName("A"), "...
"""Defines some common utils for building APIs. The main feature of these APIs is that they are multi-threaded; in the background, there are a number of threads handling requests that maintain resources across calls (so that resources don't have to continually be reloaded). In particular, a QueryJob holds the input (...
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals from copy import deepcopy ...
''' Created on Jun 18, 2012 this is a refactoring of sheila's new_Level3_matrix script into an OO approach this test version duplicates features to test tsvIO.duplicateFeatureLabels() @author: m.miller ''' import ConfigParser from datetime import datetime import os import sys import traceback import miscIO import ...
#!/usr/bin/env python # Copyright (C) 2006, 2007, 2008, 2009,-2010 Her Majesty the Queen in # Right of Canada (Communications Research Center Canada) # This file is part of CRC-DADMOD. # # CRC-DADMOD is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as # pu...
# coding: utf-8 """ Our City App Our City App internal apis # noqa: E501 The version of the OpenAPI document: 0.0.1 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import io import json import logging import re import ssl import certifi # python 2 and pyth...
"""Leetcode 419. Battleships in a Board Medium Given an 2D board, count how many battleships are in it. The battleships are represented with 'X's, empty slots are represented with '.'s. You may assume the following rules: - You receive a valid board, made of only battleships or empty slots. - Battleships can only be p...
from random import randint from random import shuffle import operator ops = { "+": operator.add, "-": operator.sub, "/": operator.truediv, "*": operator.mul} all_ops = ["+","-","/","*"]*6 shuffle(all_ops) bigs = [25,50,75,100,250,500,750,1000]*6 shuffle(bigs) smalls = [1,2,3,4,5,6,7,8,9]*6 shuffle(smalls) ...
# -*- coding: utf-8 -*- from .investmentstate import ( InvestmentState, InvestmentStateError as StateError, forceUnicode, GenerationkwhState, AportacionsState ) import unittest from yamlns import namespace as ns from .isodates import isodate from .testutils import assertNsEqual class Investmen...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2008 Francisco José Rodríguez Bogado, # # Diego Muñoz Escalante. # # (pacoqueen@users.sourceforge.ne...
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 CERN. # # Invenio 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...
# Test to populate the folder to monitor (using create_files_from_ls) run the rules and check the results from __future__ import print_function import os import shutil import pytest from afterdown.__main__ import AfterDown from afterdown.tests.playground.create_files_from_ls import LSCreator TESTS_PATH = os.path.di...
import pytest from adhocracy4.comments.models import Comment from adhocracy4.exports import mixins @pytest.mark.django_db def test_reply_to_mixin(idea, comment_factory): mixin = mixins.CommentExportWithRepliesToMixin() virtual = mixin.get_virtual_fields({}) assert 'replies_to_comment' in virtual co...
# -*-coding:Utf-8 -* # Copyright (c) 2012 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # l...
import numpy as np from sunpy.map import GenericMap __all__ = ['SJIMap'] class SJIMap(GenericMap): """ A 2D IRIS Slit Jaw Imager Map. The Interface Region Imaging Spectrograph (IRIS) small explorer spacecraft provides simultaneous spectra and images of the photosphere, chromosphere, transition ...
#!/usr/bin/env python import sys from setuptools import find_packages, setup, Extension from Cython.Distutils import build_ext from os.path import join import numpy with open('README.rst', 'r') as fh: # Remove header for line in fh: if 'ORBKIT' in line: next(fh) next(fh) break long_descri...
'''Nif Properties, nif specific custom properties definitions via Blender types''' # ***** BEGIN LICENSE BLOCK ***** # # Copyright © 2005-2015, NIF File Format Library and Tools contributors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted ...
#coding:utf-8 import json from django.db import models from django.db import connections from django.core.exceptions import ValidationError from django.conf import settings from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import AbstractUser CONDITION_TYPES = [ 'choice', ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import argparse #Function definitions def Fasta_to_Dict(File): '''Creates a dictionary of FASTA sequences in a File, with seqIs as key to the sequences.''' with open(File, 'r') as F: Records = {} for Line in F: if...
# Script to plot equivalent width time-series curves. import pylab as pl import astronomy as ast Lines = {} Lines[r'$H_{\alpha}$'] = 'EW_Ha.dat' Lines[r'$H_{\beta}$'] = 'EW_Hb.dat' Lines[r'$He_{II}$ '] = 'EW_He.dat' pl.figure(figsize=(8,6)) pl.subplots_adjust(wspace=0.001,hspace=0.4) # ephemeris T0 = 2453964.330709...
# -*- coding: utf-8 -*--- -- from __future__ import print_function from GlyphsApp import Glyphs if Glyphs.versionNumber >= 3.0: from GlyphsApp import LTR from Foundation import NSNotFound intervalList = (1,3,5,10,20) categoryList = ( "Letter:Uppercase", "Letter:Lowercase", "Letter:Smallcaps", "Punctuation", "Sym...
#!/usr/bin/python # otlreorder.py # Grep and reorder an outline for a regex and return the branch # with all the leaves. # # Copyright 2006 Noel Henson All rights reserved # # $Revision: 1.7 $ # $Date: 2008/09/17 21:34:25 $ # $Author: noel $ # $Source: /home/noel/active/otlreorder/RCS/otlreorder.py,v $ # $L...
#! /usr/bin/env python3 """Example configuration: [eventlistener:example_check] command=/usr/local/bin/supervisor_xmlrpc_check -g example_service -n example_check -u /ping -r 3 -p 8080 events=TICK_60 """ import argparse import sys from supervisor_checks import check_runner from supervisor_checks.check_modules impor...
import sys, time, os from django.conf import settings from django.core import mail from django.core.mail.backends import locmem from django.db import DEFAULT_DB_ALIAS from django.test import signals from django.template import Template from django.utils.translation import deactivate from django.utils.unittest import sk...
"""Portal search forms.""" import string from django import forms from django.contrib.admin import widgets from django.utils import translation from django.utils.translation import ugettext_lazy as _ from django.forms.models import modelformset_factory, inlineformset_factory from jsonfield.forms import JSONFormField ...
from django import forms from jamsession.forms.fields import SchemaField from jamsession.models import Schema class SchemaAdminForm(forms.Form): error_css_class = 'error' required_css_class = 'required' name = forms.CharField(required=True, widget=forms.TextInput( ...