src
stringlengths
721
1.04M
# ##### BEGIN GPL LICENSE BLOCK ##### # # JewelCraft jewelry design toolkit for Blender. # Copyright (C) 2015-2021 Mikhail Rachinskiy # # 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, eith...
import os import time from httplib import HTTPConnection from urllib import urlencode files = [ "js/main.js", "js/service/guesser.js", "js/service/miner.js", "js/directive/navbar.js", "js/directive/notice.js", "js/directive/footer.js", "js/directive/matchdiv.js", "js/directive/betmodal...
# Utility for querying the current state of all endstops # # Copyright (C) 2018-2019 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. class QueryEndstops: def __init__(self, config): self.printer = config.get_printer() self.endstops = [...
import re import time import logging from autotest.client.shared import error from autotest.client.shared import utils from virttest import utils_misc from virttest import env_process from virttest import utils_test @error.context_aware def run(test, params, env): """ Configure watchdog, crash the guest and ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os # Verificação de repetição no eixo das abscissas indexMatriz = 46 # Index da matriz passado no click i = indexMatriz dicOrdenadas = {} # Key é o index da listaMatriz, value é o existe ou não listaMatriz = [6, 2, 4, 1, 5, 9, 7, 6, 8, 9, 7, 8, 2, 6, 3, 1, 9,...
""" The Jdic module provides the features required to manipulate JSON objects through a consistent API. """ from __future__ import unicode_literals import json import hashlib import importlib from collections import Sequence, Mapping import json_delta import jsonschema from . import drivers # pylint: disable=unused-imp...
from __future__ import unicode_literals import pytest @pytest.fixture def completer(): import pgcli.pgcompleter as pgcompleter return pgcompleter.PGCompleter() def test_ranking_ignores_identifier_quotes(completer): """When calculating result rank, identifier quotes should be ignored. The result ran...
import argparse import logging import signal import time from server.icinga2_resultwriter import IcingaResultWriter as ResultWriter import sys import os from utils import daemonize from utils import configure_logging from utils import get_logger parser = argparse.ArgumentParser(description="MoniTunnel server") parser....
from util import hook def mode_cmd(mode, text, inp, chan, conn, notice): """ generic mode setting function """ split = inp.split(" ") if split[0].startswith("#"): channel = split[0] target = split[1] notice("Attempting to {} {} in {}...".format(text, target, channel)) conn....
# -*- coding: iso-8859-1 -*- # Copyright (C) 2004-2009 Bastian Kleineidam """ General navigation writer reading .nav file info. """ import sys import os import re from cStringIO import StringIO _slashes_ro = re.compile(r"/+") _thisdir_ro = re.compile(r"^\./") _samedir_ro = re.compile(r"/\./|/\.$") _parentdir_ro = re....
from unittest import TestCase import os.path as ospath from precis.core import Document, MultiDocumentCorpus, MultiDocument class TestMultiDocumentCorpus(TestCase): def setUp(self): self.test_documents_path = ospath.join(ospath.dirname(__file__), "test_data/multi_document_test") def test_shouldCreat...
# # Copyright 2019-2021 Ghent University # # This file is part of vsc-mympirun, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # the Flemish Research Foundat...
""" @author: Fyzel@users.noreply.github.com @copyright: 2017 Englesh.org. All rights reserved. @license: https://github.com/Fyzel/weather-data-flaskapi/blob/master/LICENSE @contact: Fyzel@users.noreply.github.com @deffield updated: 2017-06-14 """ from flask_sqlalchemy import SQLAlchemy db = SQLAlchem...
# from model_mommy import mommy # from django.test import TestCase # # from ..section import Section # from django.contrib.auth.models import User # # # class TestSectionPolygon(TestCase): # # def setUp(self): # self.user = User.objects.create_user( # username='tuser', email='tuser@bhp.org.bw', ...
# # # Copyright 2013-2013 Ghent University # # This file is part of vsc-processcontrol, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules found...
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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...
import os imdb_dir = '/home/han/code/data/aclImdb' train_dir = os.path.join(imdb_dir, 'train') # Processing the labels of the raw IMDB data labels = [] texts = [] for label_type in ['neg', 'pos']: dir_name = os.path.join(train_dir, label_type) for fname in os.listdir(dir_name): if fname[-4:] == '.t...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # ui.py # # Copyright 2014 Balint Seeber <balint256@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 ...
''' Created on Oct 8, 2013 This file is part of CryptikChaos. CryptikChaos 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. CryptikChaos is...
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-04-24 14:05 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency...
# 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 # distributed under the Li...
#!/usr/bin/env python from aircraft import Aircraft import util, time, math from math import degrees, radians from rotmat import Vector3, Matrix3 class Motor(object): def __init__(self, angle, clockwise, servo): self.angle = angle # angle in degrees from front self.clockwise = clockwise # clockwis...
import SuitDNA from SuitLegList import * import SuitTimings from direct.directnotify import DirectNotifyGlobal from direct.distributed.ClockDelta import * from pandac.PandaModules import * from pandac.PandaModules import Point3 from toontown.battle import SuitBattleGlobals from toontown.toonbase import TTLocalizer TI...
from __future__ import absolute_import # Copyright 2016 F5 Networks 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 ...
import os from dotenv import load_dotenv load_dotenv() BASE_DIR = os.path.abspath(os.path.dirname(__file__)) # General Flask THREADS_PER_PAGE = 2 DEBUG = os.getenv("DEBUG") # Database MYSQL_HOST = os.getenv("MYSQL_HOST") MYSQL_DATABASE = os.getenv("MYSQL_DATABASE") MYSQL_USER = os.getenv("MYSQL_USER") MYSQL_PASSWORD...
from __future__ import print_function, absolute_import try: import requests except ImportError: requests = None from braid.api import task, sudo from braid.utils import fails from fabric.contrib import files from twisted.python.filepath import FilePath @task def create(username, homeBase='/home'): """ ...
"""Code for forward pass through layers of the network.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import tensorflow as tf class NeuralNetParams(object): """NeuralNetParams is a class that interfaces the verification code with ...
# runs integration tests against the osmo-smsc restapi # Copyright (C) 2016 Henning Heinold <henning@itconsulting-heinold.de> # # 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 Foundat...
# Copyright 2019 Open Source Robotics Foundation, 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...
from django.db import models from polyglotdb import CorpusContext # Create your models here. class Annotation(models.Model): ITEM_TYPE_CHOICES = (('U', 'Utterance'), ('W', 'Word'), ('Y', 'Syllable'), ('P', 'Phone')) corpus = models.Fo...
# -*- coding: utf-8 -*- # Copyright(C) 2014 Laurent Bachelier # # 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 ...
# -*- coding: utf-8 -*- '''The app module, containing the app factory function.''' from flask import Flask, render_template from foobar.settings import ProdConfig from foobar.assets import assets from foobar.extensions import ( bcrypt, cache, db, login_manager, migrate, debug_toolbar, ) from fo...
"""Tests for certbot_dns_digitalocean.dns_digitalocean.""" import os import unittest import digitalocean import mock from certbot import errors from certbot.plugins import dns_test_common from certbot.plugins.dns_test_common import DOMAIN from certbot.tests import util as test_util API_ERROR = digitalocean.DataRead...
# -*- coding: utf-8 -*- """region_id field of 'meetings' table Revision ID: 3e683fc1af11 Revises: 2f08fb65fe0b Create Date: 2014-05-24 21:31:25.378918 """ from __future__ import unicode_literals # revision identifiers, used by Alembic. revision = '3e683fc1af11' down_revision = '2f08fb65fe0b' from alembic import op...
# -*- coding: utf-8 -*- '''base stuf''' from operator import methodcaller from itertools import chain, starmap from collections import Mapping, Sequence, MutableMapping from stuf.six import items, strings, keys, values from stuf.utils import clsname, lazy, recursive_repr, exhaust, imap __all__ = ['corestuf', 'direct...
# The Hazard Library # Copyright (C) 2012 GEM 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 option) any later version. # # Th...
import numpy as np from scipy.sparse import csr_matrix from ..utils import column_or_1d from ..utils import check_consistent_length from ..utils.multiclass import type_of_target from ..utils.sparsefuncs import count_nonzero def _check_targets(y_true, y_pred): check_consistent_length(y_true, y_pred) type_tru...
# 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 json import os import StringIO import unittest from telemetry import benchmark from telemetry import story from telemetry.internal.results import cha...
import tweepy import json import re import time import random def create_api(config_filename): """ Creates an authorized tweepy API object given a config file containing appropriate twitter application keys :param config_filename: string containing the config filename :return: the tweepy API obje...
import unittest import operator from list_ops import * class ListOpsTest(unittest.TestCase): # tests for map def test_map_square(self): self.assertEqual( (1, 4, 9, 16, 25, 36, 49, 64, 81, 100), tuple(map_clone( lambda x: x**2, (1, 2, 3, 4, 5, 6, 7, 8, 9, 10)) ...
""" tabler.py Creates tables in HTML for Salstat Submit a list of [heading: value] pairs in the desired order p-values are automatically formatted as %1.6f (all other floats as %5.3f?) The first two routines are generic and for single answer results. Following are a handful of tabler functions for particular tests (...
# !/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'wtq' import tensorflow as tf from data_set.tensorflow_data import mnist_input_data mnist = mnist_input_data.read_data_sets("MNIST_data/", one_hot=True) def tensor_flow_test(): """ :return: """ matrix1 = tf.constant([[3, 3]]) matrix2 =...
"""recipeMerger.py This module contains code for handling the 'merging' of duplicate recipes. """ import os.path import time from typing import Union from gettext import gettext as _ from gi.repository import Gtk, Pango from gourmet import convert, gglobals, recipeIdentifier, recipeManager from gourmet.gtk_extras im...
# Copyright 2012 NTT Data # 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 appl...
""" WSGI config for abizeitung 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...
""" WSGI config for svpb 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`` set...
from collections import namedtuple import lasagne as nn from lasagne.layers.dnn import Conv2DDNNLayer, MaxPool2DDNNLayer import data_iterators import numpy as np import theano.tensor as T from functools import partial import utils_heart import nn_heart from pathfinder import PKL_TRAIN_DATA_PATH, TRAIN_LABELS_PATH, PKL_...
#! /usr/bin/env python # -*- coding: utf8 -*- # Author: Platinhom; Last Updated: 2015-09-10 # Calculate each element surface area by MS_Intersection and also match the atomic area results to the pqr file. # Usage: python ESES_ElementArea.py file.pqr # # Need: MS_Intersection (partition version) # Note: Only for PQR fo...
# 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 # distributed under the Li...
""" Volumio Platform. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.volumio/ Volumio rest API: https://volumio.github.io/docs/API/REST_API.html """ import asyncio from datetime import timedelta import logging import socket import aiohttp ...
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.db import IntegrityError from django.db.utils import OperationalError # Create your models here. PLAYER_TYPES = (("program", "program"), ("user", "user")) def program_...
#!/usr/bin/env python # -*- coding: utf-8 -*- import click import re from consolemsg import warn, step, error, u from datetime import datetime, timedelta from shutil import copyfile from pathlib import Path from slugify import slugify @click.command() @click.help_option() @click.option('-d', '--description', hel...
def whiter_shade_of_pale(hex_color): ''' This function pales the color a bit for the interior of the boxes. ''' pale_shift = 70 # separate the red, green, blue parts r_hex = hex_color[1:3] g_hex = hex_color[3:5] b_hex = hex_color[5:7] # convert from hex to dec r_dec = int(r...
"""HighThroughputExecutor builds on the Swift/T EMEWS architecture to use MPI for fast task distribution """ import logging try: import mpi4py except ImportError: _mpi_enabled = False else: _mpi_enabled = True from parsl.errors import OptionalModuleMissing from parsl.executors.high_throughput.executor im...
import devon.log import inspect, types, sys, traceback, os.path, re, cgi, imp, glob, functools, unittest, shutil from importing import * # ************************************************************************************************** UnknownType = 0 FixtureType = 1 SuiteType = 2 WrapperType = 3 FunctionT...
import numpy as np from astropy.io import fits class MockImageClass(np.ndarray): """Creates a mock version of ImageClass for testing""" def __new__(cls, image_filename='', psf_filename='', mask_filename=None, n_stamps=1, saturation=np.inf, variance=np.inf, shape=(50,50)): raw_image, header = np.ones(s...
''' Copyright (c) 2016 Tim Savannah All Rights Reserved. This software is licensed under the terms of the GPLv3. This may change at my discretion, retroactively, and without notice. You should have received a copy of this with the source distribution as a file titled, LICENSE. The most current lic...
import abc from hashlib import sha1 class Key(metaclass=abc.ABCMeta): """ Interface for a public or private key. """ @abc.abstractmethod def pub(self): pass @abc.abstractmethod def has_secret_key(self): pass @abc.abstractmethod def key_to_bin(self): pass ...
# Copyright (c) 2020 PaddlePaddle 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 app...
############################################################################### # Copyright (C) 2007, 2008, 2009 The Molecular Sciences Institute # Original Author: # Nathan Addy, Scientific Programmer Email: addy@molsci.org # The Molecular Sciences Institute # ##################################################...
# Import any required libraries or modules. import numpy as np from sklearn import svm from sklearn.ensemble import RandomForestClassifier from sklearn.neighbors import KNeighborsClassifier import csv import sys class MetaParams: n_lda_ensemble = 101 lda_ensemble_feature_fraction = 0.4 mode = 'lda_ensembl...
import luigi from luigi import configuration from luigi.s3 import S3Target, S3PathTask from mortar.luigi import mortartask """ To run, replace <your-handle-here> with something unique to you (for instance, first initial plus last name): mortar luigi luigiscripts/word-luigi-solution.py \ --output-pa...
# Time-stamp: <2017-08-10> '''Module for calculating ROC-AUC values for all TF datasets Copyright (c) 2017, 2018 Chongzhi Zang, Zhenjia Wang <zhenjia@virginia.edu> This code is free software; you can redistribute it and/or modify it under the terms of the BSD License. @status: release candidate @version: $Id$ @auth...
# Copyright 2015 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: iso-8859-1 -*- # Copyright (C) 2004-2010 Bastian Kleineidam # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later versi...
''' Rom - the Redis object mapper for Python Copyright 2013-2016 Josiah Carlson Released under the LGPL license version 2.1 and version 3 (you can choose which you'd like to be bound under). ''' from datetime import datetime, date, time as dtime from decimal import Decimal as _Decimal from functools import wraps fr...
from django.template import RequestContext from django.template.loader import select_template from django.shortcuts import get_object_or_404, render_to_response from django.utils.functional import curry from sophie.models import Blog, Category, Entry from sophie.utils import LaidbackPaginator, multiblog_enabled, rout...
from __future__ import print_function, absolute_import, division from future.builtins import * from future import standard_library standard_library.install_aliases() # Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with ...
"""Reads and writes Soundscripts.""" from enum import Enum from chunk import Chunk as WAVChunk from srctools import Property, conv_float from typing import ( Optional, Union, TypeVar, Callable, List, Tuple, Dict, TextIO, IO, ) __all__ = [ 'SND_CHARS', 'Pitch', 'VOL_NORM', 'Channel', 'Level', 'Soun...
from __future__ import unicode_literals import unittest import warnings from datetime import datetime import django from django.core.paginator import ( EmptyPage, InvalidPage, PageNotAnInteger, Paginator, ) if django.VERSION >= (1, 11, 0): from django.core.paginator import UnorderedObjectListWarning from dja...
from __future__ import absolute_import from bs4 import BeautifulSoup from collections import OrderedDict import urllib from datetime import datetime from dateutil.tz import gettz, tzutc from dateutil.parser import parse from django import template from django.conf import settings from django.urls import reverse from d...
import datetime def daterange(start, stop): """Generator for date ranges This is a generator for date ranges. Based on a start and stop value, it generates one day intervals. :param start: a date instance, end of range :param stop: a date instance, end of range :yield date: dates with one da...
#!/usr/bin/env python """ @package mi.dataset.driver.wc_wm.cspp @file mi/dataset/driver/wc_wm/cspp/wc_wm_cspp_telemetered_driver.py @author Jeff Roy @brief Driver for the wc_wm_cspp instrument Release notes: Initial Release """ from mi.dataset.dataset_parser import DataSetDriverConfigKeys from mi.dataset.dataset_dr...
# Copyright 2017 the pycolab 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# Copyright 2020 DeepMind Technologies Limited. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
#-*- coding: utf-8 -*- import sys import pygame from pygame.locals import * from utils import * from initial import LoadMenuTextures class MainMenu(LoadMenuTextures): def __init__(self, modes, win_w, win_h): self.showmain = True self.submenu = False self.click = False self.mod...
# -*- coding: utf-8 -*- from config import * print(Color( '{autored}[{/red}{autoyellow}+{/yellow}{autored}]{/red} {autocyan} lang_new.py importado.{/cyan}')) markup = telebot.types.InlineKeyboardMarkup() markup.add(telebot.types.InlineKeyboardButton('ESPAÑOL', callback_data='lang es'), telebot.types.Inl...
from django.db import IntegrityError from django.contrib.auth import authenticate from rest_framework import generics, status from rest_framework.response import Response from rest_framework.permissions import AllowAny from rest_framework.authtoken.models import Token from maker.models import (Maker, ...
#!/usr/bin/env python """ Part of weight_app :copyright: (c) 2012 by Andreas Madsack. :license: BSD, see LICENSE for more details. """ from flask.ext.script import Manager from main import create_app, db from utils import new_pw, get_emailaddress # flask-Script manager = Manager(create_app) @manager.command...
# Copyright (c) 1999-2002 Gary Strangman; All Rights Reserved. # # This software is distributable under the terms of the GNU # General Public License (GPL) v2, the text of which can be found at # http://www.gnu.org/copyleft/gpl.html. Installing, importing or otherwise # using this module constitutes acceptance of the t...
################################################################################ # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # # Please refer to the README for information about making permanent changes. # #############################################################################...
# This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import parler.appsettings import pytest from filer.models import Folder, Image from shuup...
#!/usr/bin/env python import numpy as np #Convert vector from cartesian to polar coordinate #@vector = [x, y] def cart2polar(vector): x = vector[0] y = vector[1] r = np.sqrt(x*x + y*y) th = np.arctan2(y, x) return np.array([r, th]) #Convert vector from polar to cartesian coordinate #@vector = [r, ...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2014-2021 GEM Foundation # # OpenQuake 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 th...
''' Virtual Boy ROM Object A part of the libPirate (Python) library Version: 0.2 Author: Derrick Sobodash <derrick@sobodash.com> Copyright: (c) 2008, 2012 Derrick Sobodash Web site: https://github.com/sobodash/libpirate/ License: BSD License <http://opensource.org/licenses/bsd-license.php> ''' try: import r...
from loadTeamData import loadTeamData, loadReverseTeamLookup from loadTourneyData import loadTourneyData from loadRatingData import loadRatingData from sklearn.ensemble import RandomForestClassifier from sklearn.externals import joblib from sklearn.model_selection import train_test_split import random import ast import...
#!/usr/bin/python """nrvr.distros.common.ssh - Remote commands over ssh to Linux The main class provided by this module is LinuxSshCommand. LinuxSshCommand inherits from nrvr.remote.ssh.SshCommand, including limitations documented there. Idea and first implementation - Leo Baschy <srguiwiz12 AT nrvr DOT com> Publi...
#!/usr/bin/python # # Generate SSE assembly code for a kernel operating on a 4x4 blocks. import math, optparse, sys class box: def __init__ (self, i_1, i_2, j_1, j_2): self.i_1 = i_1 self.i_2 = i_2 self.j_1 = j_1 self.j_2 = j_2 def __str__ (self): return "box: [%d-%d][%d-%d]" % (self.i_1, sel...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ """ import pygimli as pg import pygimli.solver as solver from pygimli.viewer import showMesh from pygimli.viewer.mpl import drawMesh, drawStreams from pygimli.meshtools import createMesh import matplotlib.pyplot as plt import numpy as np from solverFVM import solveF...
# Copyright (C) 2011-2012 Yaco Sistemas <lgs@yaco.es> # # 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 applicab...
import lasagne def create_NIPS(network_parms): validate_parms(network_parms) conv = get_lasagne_conv_layer() # setup network layout l_in = lasagne.layers.InputLayer([None] + network_parms.get('input_shape')) l_hid1 = conv(l_in, 16, (8, 8), stride=network_parms.get('stride')[0]) l_hid2 = con...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012-2021 SoftBank Robotics. All rights reserved. # Use of this source code is governed by a BSD-style license (see the COPYING file). """ Test Git Config """ from __future__ import absolute_import from __future__ import unicode_literals from __future__ impo...
# -*- coding: utf-8 -*- """ This is revision from 3058ab9d9d4875589638cc45e84b59e7e1d7c9c3 of https://github.com/ojii/django-load. ANY changes to this file, be it upstream fixes or changes for the poser *must* be documentet clearly within this file with comments. For documentation on how to use the functions describe...
# -*- coding:utf-8 -*- import sys import cssutils from collections import defaultdict VERBOSE = False class DiffObject(object): def __init__(self, src, dst): self.src = src self.dst = dst self.merged = full_difference(src, dst) def to_string(self): buf = [] for style, ...
# encoding: utf-8 ''' @author: Michael Große <mic.grosse@posteo.de> @repository: https://github.com/micgro42/ReceiptEval ''' import pytest from receipteval.receipt_collection import ReceiptCollection from receipteval.purchase import Purchase @pytest.fixture() # Registering this function as a fixture. def purchase_l...
# -*- coding: utf-8 -*- r"""Structure Factors NuclearStructureFactor MagneticStructureFactor MagneticFormFactor """ import numpy as np from ..constants import magnetic_ion_j class NuclearStructureFactor(object): r"""Class containing nuclear structure factor calculator Methods ------- calc_nuc_str_...
#!/usr/bin/env python3 import sys import argparse import numpy as np from mapTools import * from utilities import filesFromList, writeLog from plotTools import addImagePlot import matplotlib.pyplot as plt ''' Author: Mikko Auvinen mikko.auvinen@helsinki.fi University of Helsinki & Finnish Meteor...
#!/usr/bin/env python3 # CheckMentioned.py # Find all the symbols in scintilla/include/Scintilla.h and check if they # are mentioned in scintilla/doc/ScintillaDoc.html. import string uninteresting = { "SCINTILLA_H", "SCI_START", "SCI_LEXER_START", "SCI_OPTIONAL_START", # These archaic names are #defined to the Sci_...
# exceptions.py - collection of pskc exceptions # coding: utf-8 # # Copyright (C) 2014 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...
import os.path from . import function_type MICRO_VERSION = '2.3' HEXADECIMAL_NUMBER = '[A-Fa-f0-9]' def extract_and_add_function(entity, functions): entity_type = function_type.FunctionType( len(entity.children[0].children[1].children), function_type.make_type(entity.children[0].children[2].child...