src
stringlengths
721
1.04M
# This is a Python module containing functions to parse and analyze ncf components # This module is designed to run on the latest major versions of the most popular # server OSes (Debian, Red Hat/CentOS, Ubuntu, SLES, ...) # At the time of writing (November 2013) these are Debian 7, Red Hat/CentOS 6, # Ubuntu 12.04 LT...
# Copyright (C) 2016-2019 Virgil Security Inc. # # Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com> # # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # (1) Redistribution...
#! /usr/bin/python import sys,cPickle as pkl,numpy as np from keras.layers import Dense, Dropout from keras.models import Sequential from keras.utils.np_utils import to_categorical import stack5 as st_learn # SAMPLE USAGE # ./docClassify.py vectors_docs_siamese.pkl def build_nn(input_dim, output_dim,hidden_dim=100):...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (c) 2018 - 2020 Mario Mlačak, mmlacak@gmail.com # Licensed under 3-clause (modified) BSD license. See LICENSE for details. from util import in_range import gen_steps as GS from piece import PieceType from board import BoardType, Board from mark import MarkT...
""" Django settings for demo project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impor...
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Unlimited developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import test_framework.loginit # This is a template to make creating new QA tests easy. # You can als...
import os import pickle import numpy as np from tqdm import tqdm class SumTree: def __init__(self, capacity): self.capacity = capacity self.tree = np.zeros(2 * capacity - 1, dtype=np.float32) self.data = np.empty(capacity, dtype=object) self.head = 0 @property def total_p...
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
""" We need two special hostnames to connect to: StationA and StationB """ from __future__ import with_statement, print_function from fabric.api import local, settings, abort, run, sudo, cd, hosts, env, execute from fabric.contrib.console import confirm from fabric.operations import put, get from fabric.contri...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2020 CERN. # # INSPIRE 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...
import gym import time import torch from torch import nn, autograd, optim import torch.nn.functional as F import numpy as np num_hidden = 4 print_every = 100 max_steps_per_episode = 2000 class ValueEstimator(nn.Module): def __init__(self, num_obs_features): super().__init__() # self.num_actions ...
"""Tool to calculate accuracy for loadgen accuracy output found in mlperf_log_accuracy.json We assume that loadgen's query index is in the same order as the images in coco's annotations/instances_val2017.json.""" from __future__ import division from __future__ import print_function from __future__ import unicode_liter...
# encoding: UTF-8 """ Common tests that apply to multiple Attr-derived classes. """ import copy from collections import namedtuple, Mapping, ItemsView, KeysView, ValuesView from itertools import chain import pickle from sys import version_info from nose.tools import (assert_equals, assert_not_equals, ...
# Copyright (C) 2015-2021 Regents of the University of California # # 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...
# -*- coding: utf-8 -*- import unittest from .utils import all_available_methods, get_config_path from noterator import Noterator from noterator.config import ConfigurationError class TestConfigValidation(unittest.TestCase): def test_valid_config(self): noterator = Noterator( method=all_ava...
# Copyright 2014 ETH Zurich # # 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...
#!/usr/bin/env python # vi:ai:et:ts=4 sw=4 # # -*- coding: utf8 -*- # # PyMmr My Music Renamer # Copyright (C) 2007-2010 mathgl67@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 Foundatio...
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library ...
import time import numpy as np from numpy import random as rand from matplotlib import pyplot, gridspec, animation data = rand.uniform(0,100,(36,6,112)) fig = pyplot.figure(1, (18,8)) axs = [] pts = [] sector_grid = gridspec.GridSpec(2,3,wspace=0.3,hspace=0.3) for sec in range(6): slyr_grid = gridspec.GridSpecFr...
"""Authentication middleware This module provides one piece of middleware named ``authkit.authenticate.middleware`` which is used to intercept responses with a specified status code, present a user with a means of authenticating themselves and handle the sign in process. Each of the authentication methods supported...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (...
'''Helper functions for plotting histograms, sequences, and ntuple columns Copyright (c) 2010 Juan Palacios juan.palacios.puyana@gmail.com Subject to the Lesser GNU Public License - see < http://www.gnu.org/licenses/lgpl.html> ''' # This program is free software: you can redistribute it and/or modify # it under...
# coding=utf-8 # Copyright 2020 Google Health Research. # # 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 la...
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
def path_sum(root, sum): if not root: return [] res = [] DFS(root, sum, [], res) return res def DFS(root, sum, ls, res): if not root.left and not root.right and root.val == sum: ls.append(root.val) res.append(ls) if root.left: DFS(root.left, sum - root.val, ls +...
""" Tests for Replicator Dynamics """ import numpy as np import pytest from hypothesis import given, settings from hypothesis.strategies import integers from hypothesis.extra.numpy import arrays from nashpy.learning.replicator_dynamics import ( get_derivative_of_fitness, replicator_dynamics, get_derivative...
#! /usr/bin/env python from __future__ import print_function import glob import re import os import io import time import shutil import tempfile import subprocess import ply.lex # Python2 FileNotFoundError support try: FileNotFoundError except NameError: FileNotFoundError = IOError """ usage: python parx...
# 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 os import sys from metadata import MetadataUpdateRunner from sync import SyncFromUpstreamRunner from tree import...
# for python 3 # You'll need to customize this according to your needs. Proper orientation of # the kinect is vital; if participants are able to maintain their head or wrists # continuously inside the word rects, they will repeatedly trigger the collision # detection from pykinect2 import PyKinectV2 from pykinect2.PyKi...
from service.tca_service import TCAService def run(): # Object service = TCAService() # Get traffic lights print() print('Traffic lights dictionary:') print(service.get_traffic_lights()) print() # Start running fixed time # service.fixed_time_start(10) # service.random_fixed_...
import os import time from selenium.webdriver.support.select import Select from selenium.webdriver.common.keys import Keys import util from test_base import TestCase class Test_ModConfigUI(TestCase): # TODO: bookmark.tag_order # TODO: bookmark.tag_aliases def setUp(self): TestCase.setUp(self) self.co...
import logging from gi.repository import Gtk, Gdk, GdkPixbuf from ...core.utils.callback import Callbacks, SignalFlags logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class BuilderWidget(Callbacks): __signals__ = {'destroy': (SignalFlags.RUN_FIRST, None, ())} def __init__(self, gladefil...
import logging import random from tornado import gen log = logging.getLogger() def arguments(parser): parser.add_argument( "--workers", "-w", type=int, default=3, help="Number of workers to launch." ) parser.add_argument( "--lock-path", "-p", type=str, default="examplelock", ...
# -*- coding: utf-8 -*- import unittest from universe import components, fields, engine, exceptions class ComponentTestCase(unittest.TestCase): class SpecialComponent(components.Component): foo = fields.IntField(required=False) bar = fields.IntField(required=False) def validate(self, dat...
# -*-coding:utf-8-*- # @auth ivan # @time 2016-10-20 20:53:16 # @goal test for Command Pattern class Order: def __init__(self): return def execute(self): return class Stock: def __init__(self): self.name = 'ABC' self.quantity = 10 def buy(self): print("Stock...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Structurizr Python documentation build configuration file, created by # sphinx-quickstart on Mon Jun 5 16:42:42 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present i...
from analysis_base import * class ScalingAnalysis(ScalingPlot, ReactionModelWrapper): """ .. todo:: __doc__ """ def __init__(self, reaction_model): self._rxm = reaction_model self.scaling_mode = 'linear' ScalingPlot.__init__(self, self.descriptor_names, ...
import scipy.io.wavfile as sciwave from scipy.fftpack import fft import math import numpy as np import RecPing import time import pylab # ========= (1) ENREGISTREMENT ========== filename = time.strftime("%d%b%Y_%H%M%S.wav") # titre du fichier = date RecPing.recPing(filename) # enregistrement # ========= (2) RECEIV...
#!/usr/bin/python # -*- coding: utf-8 -*- # Module: main # Author: G.Breant # Created on: 14 January 2017 # License: GPL v.3 https://www.gnu.org/copyleft/gpl.html import xbmcvfs import os import xbmcaddon import xbmcplugin import xbmcgui import json import shutil import dateutil.parser from datetime import datetime f...
""" Implementation of the CyberSource credit card processor using the newer "Secure Acceptance API". The previous Hosted Order Page API is being deprecated as of 9/14. For now, we're keeping the older implementation in the code-base so we can quickly roll-back by updating the configuration. Eventually, we should repl...
# Copyright (c) 2012 by California Institute of Technology # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this...
from __future__ import absolute_import from __future__ import unicode_literals import io import os.path import re import shutil import subprocess import sys import mock import pre_commit.constants as C from pre_commit.commands.install_uninstall import CURRENT_HASH from pre_commit.commands.install_uninstall import in...
from cloudfoundry_client.v2.entities import EntityManager class ServiceBrokerManager(EntityManager): def __init__(self, target_endpoint, client): super(ServiceBrokerManager, self).__init__(target_endpoint, client, '/v2/service_brokers') def create(self, broker_url, broker_name, auth_username, auth_pa...
#!/usr/bin/python from Adafruit_PWM_Servo_Driver import PWM import time import sys # =========================================================================== # Example Code # =========================================================================== # Initialise the PWM device using the default address pwm = PWM(...
# 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...
from django.http import HttpResponse from django.utils import simplejson from account.models import UserProfile from conversation.models import ConversationPost, ConvoWall, ConversationComment from notification.views import notifyComment, notifyPost def post(request): results = {'success': False} if request.u...
from __future__ import division from collections import defaultdict import numpy as np from base_sample import BaseSample from sklearn.cluster import AffinityPropagation as AP import pandas as pd from collections import Counter class StratifiedRandom(BaseSample): def __init__(self, data_frame, number_arms=2):...
from pycp2k.inputsection import InputSection class _each241(InputSection): def __init__(self): InputSection.__init__(self) self.Just_energy = None self.Powell_opt = None self.Qs_scf = None self.Xas_scf = None self.Md = None self.Pint = None self.Meta...
# coding: utf-8 # Copyright (C) 1994-2016 Altair Engineering, Inc. # For more information, contact Altair at www.altair.com. # # This file is part of the PBS Professional ("PBS Pro") software. # # Open Source License Information: # # PBS Pro is free software. You can redistribute it and/or modify it under the # term...
#coding: utf-8 import sys def morethan(keyword,n): """ Arguments: - `keyword`: - `n`: """ ans = 0 for line in keyword: if len(line.split()) - 1 <= n : ans += 1 print "少余%s的词占总的百分比为%s"%(n,1.0*ans/len(keyword)) def aw(kf,nc): """ """ f = open(kf) ...
import os import sys import pygame pygame.init() import importlib from loader import * from QuadTree import QuadTree from Montag import * from Obstacles import * from Floor import Floor from pygame.locals import * from CONSTANTS import * """ This code is extremely bad, use at your own risk. """ TILEWIDTH = 128 TILEHEIG...
""" Django settings for cattrack project. Generated by 'django-admin startproject' using Django 1.9.5. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import date...
from modules.base.plugin import Plugin import random class Magic8Plugin(Plugin): replies = [ 'It is certain', 'It is decidely so', 'Without a doubt', 'Yes definitely', 'You may rely on it', 'As I see it, yes', 'Most likely', ...
# SPDX-License-Identifier: Apache-2.0 # # Copyright (C) 2015, ARM Limited and contributors. # # 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 # # ...
#! /usr/bin/python import rospy from sensor_msgs.msg import Image from cv_bridge import CvBridge, CvBridgeError import numpy as np import cv2 import sys import os from os.path import expanduser import signal import threading from multiprocessing import Pool import time from random import randint from std_msgs.msg impo...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import yaml import sys import time import sqlite3 import requests import datetime as dt import pandas as pd gtype_dict = {'10m': '', '3m': 'sb', '10s': 's1'} WCSA_PATTERN = re.compile(r'(?<=receiveMove\(\").+?(?=\"\);)') GAME_HEADER_PATTERN = re.com...
# Copyright 2014-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
# # Copyright (C) 2016-2021, Alexandre Gazet. # # Copyright (C) 2012-2015, Quarkslab. # # This file is part of ret-sync. # # ret-sync 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 Lic...
#!/usr/bin/env python # # Small script for generating a logstash grok filter and patterns for postgresql # using a non-default log_line_prefix setting. # # Output of this script has NOT been tested in any production environment as of yet. # # Copyright (c) 2014, Teemu Haapoja <teemu.haapoja@gmail.com> # All rights rese...
# -*- coding:utf-8 -*- __author__ = 'jervyshi' import chardet import os class Change(object): def __init__(self, readPath, writePath, fromEncoding, toEncoding): self.readPath = readPath self.writePath = writePath self.fromEncoding = fromEncoding self.toEncoding = toEncoding ...
# -*- 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...
from .preprocessing.utils import show_proportions, cleanup from .preprocessing.utils import set_initial_size, get_initial_size from .preprocessing.neighbors import get_connectivities from .preprocessing.moments import get_moments from .tools.utils import * from .tools.rank_velocity_genes import get_mean_var from .too...
# -*- coding: utf-8 -*- from odoo.tests import common, Form from odoo.tools import float_compare @common.tagged('post_install', '-at_install') class TestDeliveryCost(common.TransactionCase): def setUp(self): super(TestDeliveryCost, self).setUp() self.SaleOrder = self.env['sale.order'] se...
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import socket import traceback, sys from binascii import hexlify import time, os from test_framework.socks5 im...
#!/usr/bin/env python #ALLEYOOP: #Additional sLamdunk heLpEr tools for anY diagnOstics Or Plots # Copyright (c) 2015 Tobias Neumann, Philipp Rescheneder. # # This file is part of Slamdunk. # # Slamdunk is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Licen...
# -*- coding: utf-8 -*- # Copyright 2015 Donne Martin. 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. A copy of # the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "lice...
# flake8: noqa import io import logging import os import zipfile from .. import asutil, exception logger = logging.getLogger(__name__) expect_ok = asutil.expect_ok_closure(exception.AdjustCommandError) stdout_options = asutil.process_stdout_options stderr_options = asutil.process_stderr_options # This provider MAY...
# -*- coding: utf-8 -*- import os from json import encoder from json import dumps from sklearn_porter.estimator.classifier.Classifier import Classifier class MLPClassifier(Classifier): """ See also -------- sklearn.neural_network.MLPClassifier http://scikit-learn.org/stable/modules/generated/ ...
import unittest from PyFoam.RunDictionary.SolutionFile import SolutionFile from os import path,environ,remove,system from tempfile import mktemp from shutil import copyfile from .test_TimeDirectory import damBreakTutorial,gammaName from PyFoam.FoamInformation import foamVersionNumber,foamFork theSuite=unittest.Test...
# coding=utf-8 """ Tests for the course home page. """ from datetime import datetime, timedelta import ddt import mock from django.conf import settings from django.core.urlresolvers import reverse from django.http import QueryDict from django.utils.http import urlquote_plus from django.utils.timezone import now from p...
""" Stepic.org harvester of MOOC-online courses for SHARE Notification Service Example API query: https://stepic.org:443/api/lessons/100 """ from __future__ import unicode_literals import json import pycountry from dateutil.parser import parse from scrapi import requests from scrapi.base import JSONHarvester from s...
#!/usr/bin/env pypy # -*- coding: utf-8 -*- from __future__ import print_function import sys import random from itertools import count from collections import Counter, OrderedDict, namedtuple ARG_OUTPUTFILE = 2 GAMES_PLAYED = 10 # The table size is the maximum number of elements in the transposition table. TABLE_SI...
from pywb.webapp.handlers import WBHandler from pywb.cdx.zipnum import ZipNumCluster from pywb.cdx.cdxserver import CDXServer import os import requests import shutil #============================================================================= class ItemHandler(WBHandler): def __init__(self, query_handler, confi...
''' Created on 5 mai 2017 Copyright 2017 Jean-Marie Mineau, Maxime Keller This file is part of "ISN's Cube". "ISN's Cube" 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...
# -*- coding: utf-8 -*- # Define your item pipelines here # # Don't forget to add your pipeline to the ITEM_PIPELINES setting # See: https://doc.scrapy.org/en/latest/topics/item-pipeline.html import pymysql class SpiderMysqlpjtPipeline(object): def __init__(self): print(">>>init_spider") # 刚开始时连...
from pprint import pprint import asyncio from panoramisk import fast_agi loop = asyncio.get_event_loop() async def call_waiting(request): pprint(['AGI variables:', request.headers]) pprint((await request.send_command('ANSWER'))) pprint((await request.send_command('SAY DIGITS 1 \"\"'))) # To Raise a...
import numpy as np import pandas import scipy, scipy.spatial import sklearn import sys from sklearn import linear_model from sklearn.metrics import precision_score, recall_score, f1_score import argparse def main(): parser = argparse.ArgumentParser() parser.add_argument('train', help='Training Data') p...
#!/usr/bin/env python2 # Copyright (c) 2015 The Beardcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class Sig...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify #...
#!/usr/bin/env python ################################# # File name: covergae.py # Author: Lucy Mallin # Date created: 16/05/2017 # Date last modified: 20/05/2017 # Python version: 2.7 # License: MIT ################################# import sys import pandas as pd import pdfkit import argparse from jinja2 import En...
#!/usr/bin/env python2 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * class SignM...
""" lstm-math/main.py Train a Seq2Seq network to predict the result of math equations on the character level. Configuration through global variables because I'm lazy. Written by Max Schumacher (@cpury) in Summer 2017. """ from __future__ import print_function import random import itertools from time import sleep im...
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test Hierarchical Deterministic wallet function.""" from test_framework.test_framework import BitcoinTestFr...
#!c:\xampp\htdocs\scripts\python.exe """PILdriver, an image-processing calculator using PIL. An instance of class PILDriver is essentially a software stack machine (Polish-notation interpreter) for sequencing PIL image transformations. The state of the instance is the interpreter stack. The only method one will norm...
from PyQt5.QtWidgets import QMainWindow, QLabel, QWidget, QFrame, QSizePolicy from PyQt5.QtGui import QImage, QPixmap from PyQt5.QtCore import Qt, QSize import numpy as np w = QMainWindow(size=QSize(640, 640)) ww = QWidget() w.setCentralWidget(ww) asp = AspectLayout(1.0) ww.setLayout(asp) w.setWindowFlags(Qt.WindowSta...
""" Django settings for superlists project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...)...
import bpy import bmesh import struct import array # Target file to save to target = "C:/Users/Will/Source/WillowEngine/bin/Content/Maps/Sactuary.wmesh" # Get the active object active = bpy.context.object active.update_from_editmode() # Copy and triangulify it's mesh data mesh = bmesh.new() mesh.from_mesh(active.dat...
# -*- coding: utf-8 -*- """ ORCA Open Remote Control Application Copyright (C) 2013-2020 Carsten Thielepape Please contact me by : http://www.orca-remote.org/ This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as publi...
#-*-coding:utf-8-*- """ @package btractor.alf.base @brief Base classes for use with tractor @author Sebastian Thiel @copyright [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl.html) """ from __future__ import unicode_literals from butility.future import str __all__ = ['AlfOperatorMeta', 'AlfOpera...
import sys import traceback from bhulan.processVehicles import importTrucks, initCompute from bhulan.processStops import saveComputedStops from bhulan.util import notify, getTime from pymongo import MongoClient from bhulan.constants import WATTS_DATA_DB_KEY from bhulan.inputOutput import saveStopsToFile import numpy as...
from __future__ import absolute_import import six from sentry.models import Integration, ProjectIntegration from sentry.testutils import APITestCase class ProjectIntegrationDetailsTest(APITestCase): def setUp(self): super(ProjectIntegrationDetailsTest, self).setUp() self.login_as(user=self.user...
#!/usr/bin/python # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import random import logging from node import Node from connection import Connection class PeerManager(object): def __init__(self, node, mempool, chaind...
import sys import os.path from pyquery import PyQuery as pq import time import common def getValues(item): url = item[3] print("getValues(): ", url) format = "%b %d %Y %H:%M:%S" d = pq(url=url) list = d(".list td") index = 0 while index < len(list): try : obj = {} obj['date'] = common.removeNumber...
"""Support for displaying persistent notifications.""" from collections import OrderedDict import logging from typing import Awaitable import voluptuous as vol from homeassistant.components import websocket_api from homeassistant.core import HomeAssistant, callback from homeassistant.exceptions import TemplateError f...
#! /usr/bin/env python # This is a toolbox I'm using to look for specific things in the XML DOM ################## # Import modules # ################## from __future__ import print_function from xml.dom.minidom import parse, parseString #import xml.dom.minidom ################# # Parse the XML # ################# ...
# Stellar Magnate - A space-themed commodity trading game # Copyright (C) 2016-2017 Toshio Kuratomi <toshio@fedoraproject.org> # # 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 ver...
from knowledge import settings import django from django.db import models from django.utils.translation import ugettext_lazy as _ from django.conf import settings as django_settings from knowledge.managers import QuestionManager, ResponseManager from knowledge.signals import knowledge_post_save from ckeditor.fields im...
import types from collections import defaultdict from functools import wraps from urlparse import urljoin from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse, NoReverseMatch LIST_METHODS = ('POST',) DETAIL_METHODS = ('PUT', 'PATCH', 'DELETE',) ALL_METHODS = LIST_ME...
# -*- coding: utf-8 -*- # import numpy def uniform_dft(time_interval_length, data): """Discrete Fourier Transform of real-valued data, interpreted for a uniform time series over an interval of length time_interval_length. The original data can be recovered from the output of this function by data = ...