src
stringlengths
721
1.04M
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2009 Gary Burton # Copyright (C) 2011 Tim G L Lyons # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. from mixbox import entities from mixbox import fields import cybox.bindings.win_prefetch_object as win_prefetch_binding from cybox.objects.device_object import Device from cybox.objects.win_volume_object import Win...
__author__ = 'Gareth Coles' import logging import os import yaml from bottle import run, default_app, request, hook from internal.api import ApiManager from internal.db import Db from internal.highlight import Highlight from internal.schemas import schemas from internal.singleton import Singleton from internal.util ...
# This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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 ...
# :coding: utf-8 import re import functools from .helper import collapse_all from .helper import get_docstring #: Regular Expression pattern for data _DATA_PATTERN = re.compile( r"(?P<start_regex>(\n|^)) *(?P<export>export +)?(?P<default>default +)?" r"(?P<type>(const|let|var)) (?P<name>[\w._-]+) *= *(?P<va...
from __future__ import absolute_import import six from datetime import timedelta from django.utils import timezone from rest_framework.exceptions import ParseError from rest_framework.response import Response from functools import partial from sentry import eventstore from sentry.api.base import EnvironmentMixin fr...
from PySide import QtGui , QtCore import math #this is just a color picker class ColorWidget(QtGui.QWidget): colorChangedSignal = QtCore.Signal(int , int ,int) def __init__(self, parent = None , color = [255,0,0]): QtGui.QWidget.__init__(self,parent) self.width ...
#!/usr/bin/env python import sys from g03 import * from g09 import * from gamess import * from nwchem import * from orca import * from qchem import * from xyz import * def guess(filename): '''Returns the correct class needed to parse filename, if it exists.''' # # Dictionary of unique sentences in QM pa...
import socket import os import struct from ctypes import * # Host to listen on, (change as needed) host = "0.0.0.0" # Our IP header class IP(Structure): _fields_ = [ ("ihl", c_ubyte, 4), ("version", c_ubyte, 4), ("tos", c_ubyte), ("len", c_ushort), ("id", c_ushort), ("offset", c_ushort), ("ttl", c_ubyte)...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division, unicode_literals ## ## This is part of Pybble, a WMS (Whatever Management System) based on ## Jinja2/Haml, Werkzeug, Flask, and Optimism. ## ## Pybble is Copyright © 2009-2014 by Matthias Urlichs <matthias@urlichs.de>, ## it is li...
import click from valohai_cli.exceptions import NoProject from valohai_cli.messages import success from valohai_cli.settings import settings from valohai_cli.utils import get_project_directory from typing import Optional, Union, overload from typing_extensions import Literal from valohai_cli.models.project import Proj...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # bts_tools - Tools to easily manage the bitshares client # Copyright (c) 2014 Nicolas Wack <wackou@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 Softwa...
# -*- coding: utf-8 -*- # # Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
# -*- encoding: utf-8 -*- ############################################################################### # # # Copyright (C) 2015 Trustcode - www.trustcode.com.br # # ...
# Copyright (c) 2017, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import unittest from mixbox.vendor.six import u from cybox.objects.win_network_share_object import WinNetworkShare from cybox.test.objects import ObjectTestCase class TestWinNetworkShare(ObjectTestCase, unittest...
""" Copyright (C) 2014, 申瑞珉 (Ruimin Shen) 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. This program is distributed i...
# Copyright 2014-2020 Rumma & Ko Ltd # License: GNU Affero General Public License v3 (see file COPYING for details) from django.db import models from django.db.models import Q from lino.api import dd, rt, _ from lino.modlib.checkdata.choicelists import Checker from lino_xl.lib.countries.mixins import AddressLocation ...
import os # SECURITY WARNING: don't run with debug turned on in production! DEBUG = os.environ.get('DJANGO_DEBUG', '') TEMPLATE_DEBUG = DEBUG PROJECT_DIR = os.path.abspath(os.path.join( os.path.dirname(__file__), os.path.pardir) ) # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY ...
######## # Copyright (c) 2013 GigaSpaces Technologies Ltd. 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 requir...
import sys import os import shutil import re from time import gmtime, strftime # # vmHeader # vmHeader = '#* @vtlvariable name="content" type="org.apache.turbine.services.pull.tools.ContentTool" *#\n' vmHeader += '#* @vtlvariable name="displayManager" type="org.nrg.xdat.display.DisplayManager" *#\n' vmHead...
import multiprocessing import time import threading import urllib from mongo_cache import MongoCache from mongo_queue import MongoQueue from downloader import Downloader DEFAULT_DELAY = 5 DEFAULT_AGENT = 'wswp' DEFAULT_RETRY = 1 DEFAULT_THREAD = 10 DEFAULT_TIMEOUT = 60 SLEEP_TIME = 1 def threaded_crawler(seed_url,...
''' test_Benchmark.py Tests the results of benchmark_thedom.py against project performance metrics Copyright (C) 2015 Timothy Edmund Crosley 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 Soft...
from JumpScale import j base = j.data.capnp.getModelBaseClassCollection() class RepoCollection(base): """ This class represent a collection of Issues """ def list(self, owner=0, name='', id=0, source="", returnIndex=False): """ List all keys of repo model with specified params. ...
from __future__ import absolute_import import itertools import lit.Util from lit.ShCommands import Command, Pipeline, Seq class ShLexer: def __init__(self, data, win32Escapes = False): self.data = data self.pos = 0 self.end = len(data) self.win32Escapes = win32Escapes def eat(...
# 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 # # Unless required by applicab...
# Copyright 2018 Capital One Services, LLC # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 from c7n.utils import type_schema from c7n_gcp.actions import MethodAction from c7n_gcp.provider import resources from c7n_gcp.query import QueryResourceManager, TypeInfo """ todo, needs detail_sp...
# 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 may ...
# coding:utf-8 ''' Created on 27/1/2015 @author: Programacion ''' from ec.edu.itsae.conn import DBcon #from flask import redirect, url_for import json class VentaDao(DBcon.DBcon):#heredando ''' classdocs ''' def __init__(self): ''' Constructor ''' ...
#!/usr/bin/env python import os import os.path as osp import numpy as np import tensorflow as tf from model import TPNModel import argparse import glog as log import glob from data_io import tpn_test_iterator import cPickle def bbox_transform_inv(boxes, deltas): if boxes.shape[0] == 0: return np.zeros((0,...
def cells(): ''' # Linear algebra overview ''' ''' ''' ''' Linear algebra is the study of **vectors** and **linear transformations**. This notebook introduces concepts form linear algebra in a birds-eye overview. The goal is not to get into the details, but to give the reader a taste of th...
#!/usr/bin/env python ''' Taken from ccnmtldjango and modified https://github.com/ccnmtl/ccnmtldjango''' import os import sys import subprocess import shutil pwd = os.path.abspath(os.path.dirname(__file__)) vedir = os.path.abspath(os.path.join(pwd, "ve")) if os.path.exists(vedir): shutil.rmtree(vedir) virtualenv...
#This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. from datetime import datetime # noqa from flask.sessions import SessionInterface, SessionMixin from werkzeug.contrib.sessions import Session as SessionBase, SessionStor...
import numpy import unittest import os import filecmp from trussme import truss TEST_TRUSS_FILENAME = os.path.join(os.path.dirname(__file__), 'example.trs') class TestSequenceFunctions(unittest.TestCase): def test_build_methods(self): # Build truss from scratch t1 = truss.Truss() t1.add_...
#!/usr/bin/env python from __future__ import print_function """ Selects and prints metrics. Author: Mateusz Malinowski Email: mmalinow@mpi-inf.mpg.de """ import os from uuid import uuid4 from compute_wups import get_metric_score as wups_score from compute_wups import get_class_metric_score as class_wups_score fro...
#!/usr/bin/env python """models.py Udacity conference server-side Python App Engine data & ProtoRPC models $Id: models.py,v 1.1 2014/05/24 22:01:10 wesc Exp $ created/forked from conferences.py by wesc on 2014 may 24 """ __author__ = 'wesc+api@google.com (Wesley Chun)' import httplib import endpoints from protor...
import numpy as np import pandas as pd from threeML.utils.histogram import Histogram from threeML.utils.interval import Interval, IntervalSet from threeML.plugins.OGIP.response import InstrumentResponse from threeML.utils.stats_tools import sqrt_sum_of_squares class Channel(Interval): @property def channel_w...
from __future__ import division import jedi.jedi as jedi from jedi.utils import plot, init_tools, seedutil import numpy as np import cPickle import sys def main(seed): # Setting Seeds seeds = seedutil.load_seeds("main_seeds.npy", "../../../data/stability") if seed is not None: seeds = seeds[:seed] ...
""" miner map for U.S. Census 2010 Minnesota database """ from miner import * class USCensus2010: description = 'Data from the 2010 Dicennial US Census.' homepage = 'http://www.census.gov' # Place all download functionality in here, should download files to a standard download directory # Should check whether ...
import sys import json import logging from flask import Flask, render_template, request, redirect, url_for sys.path.append("../../Common/python") import lockerfs import client import util app = Flask(__name__) @app.route("/setupAuth") def setupAuth(): return render_template("setupAuth.html") @app.route("/save"...
import time, datetime import unittest import alarm format = "%a %d-%b-%Y %H:%M" current_time = datetime.datetime(2015,4,4,16,4,0) #april 4 2015 16:04 default = {'name' : 'default', 'time' : datetime.time(12,0,0), 'days' : ('MO','TU','WE','TH','FR','SA','SU'), 'date' : None, 'path' : './', 'date'...
#!/usr/bin/env python3 """ Created on 16 Apr 2017 @author: Bruno Beloff (bruno.beloff@southcoastscience.com) DESCRIPTION The host_id utility reports the serial number of the host system processor board. The meaning of "serial number" is implemented differently on each platform: * Raspberry Pi: /proc/cpuinfo * Beag...
# -*- coding: utf-8 -*- # Generated by Django 1.11.17 on 2018-12-25 06:14 from __future__ import unicode_literals import apps.images.handlers from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): initial = True dependen...
"""Adds attendee.hotel_pin field Revision ID: 5dced3c6ef91 Revises: adf30f2f47d5 Create Date: 2017-09-13 14:28:17.567037 """ # revision identifiers, used by Alembic. revision = '5dced3c6ef91' down_revision = 'adf30f2f47d5' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa try...
# Copyright (c) 2019-2020, Manfred Moitzi # License: MIT License from typing import TYPE_CHECKING, Iterable, Optional, Union from ezdxf.lldxf import const from .base import BaseLayout if TYPE_CHECKING: from ezdxf.eztypes import DXFGraphic, AttDef class BlockLayout(BaseLayout): """ BlockLayout has the same fa...
import glob import json import os import threading import discord from urllib.request import urlopen from urllib.request import Request from Config import getToken commandsCalled = 0 members = {} VINNY_COLOR = int('008cba', 16) async def getStats(message, client): serverCount = 0 channelCount = 0 for ser...
# -*- coding: utf-8 -*- __author__ = 'saf' import logging from flask import render_template, url_for, request from flask.views import View from arps_old.models import CeleryResult from arps_old.restserver import app, redis_conn log = logging.getLogger(__name__) class TaskResultView(View): methods = ['GET', ] ...
# -*-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 # lis...
# coding:utf-8 import os.path import cherrypy import sys if sys.version[0] == '2': reload(sys) sys.setdefaultencoding("utf-8") from app import themen,diskussionen,beitraege,login,logout,administration,templates def error_page(status, message, traceback, version): return templates.RenderTemplate("error.html"...
# EQUIPE 2 # # Ana Beatriz Frota - 1615310027 # # # #Kylciane Cristiny Lopes Freitas - 1615310052 #Questao 19 votos = [0 ,0, 0, 0, 0, 0] sistemas =["1- Windows Server", "2- Unix", "3- Linux","4- Netware","5- Mac OS","6- Outro","0- Sair da enquete"] continua = True total = 0 porc_votos = [] while(continua): p...
# -*- coding: utf-8 -*- ''' Salt returner that reports stats to InfluxDB. The returner will inspect the payload coercing values into floats where possible. Pillar needs something like:: influxdb_returner: url: http://localhost:8086 user: root password: root database: salt ''' import base6...
import sys import os import numpy as np import pandas as pd pd.options.mode.chained_assignment = None from fax_production_process import ProductionProcess import hax class BuildMiniTree(ProductionProcess): '''Run hax to create minitree''' process_oerder = 5 __version__ = '0.0.1' def _check(self): ...
input = """ % invocation: % dlv <name of this file> <problem instance> -silent -N=k -pfilter=move % % where % <problem instance> is the file which contains the specification of the % planning problem (i.e. initial state and goal state) % -silent suppresses various version informat...
import csv import dateutil.parser import os import splparser.parser from user import * from query import * from logging import getLogger as get_logger from os import path from splparser.exceptions import SPLSyntaxError, TerminatingSPLSyntaxError BYTES_IN_MB = 1048576 LIMIT = 2000*BYTES_IN_MB logger = get_logger("q...
# -*- coding: utf-8 -*- """Resend Invite Handler.""" import json from util import login_required from utils import json_response from utils import Utils from custom_exceptions import NotAuthorizedException from . import BaseHandler from google.appengine.ext import ndb __all__ = ['ResendInviteHandler'] class ResendIn...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __openerp__.p...
""" """ # Created on 2015.11.27 # # Author: Giovanni Cannata # # Copyright 2015, 2016, 2017 Giovanni Cannata # # This file is part of ldap3. # # ldap3 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, ei...
#!/usr/bin/env python # Licensed under a 3-clause BSD style license - see LICENSE.rst import glob import os import sys import ah_bootstrap from setuptools import setup #A dirty hack to get around some early import/configurations ambiguities if sys.version_info[0] >= 3: import builtins else: import __builtin_...
from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>' import os from calibre.utils.zipfile import ZipFile from calibre.ptempfile import TemporaryDirectory from calibre import CurrentDir def get_metadata(stream): from calibre.ebooks.metadata.m...
from bolt.discord.models.base import SearchableList, SearchableDict from bolt.discord.events import Subscription from bolt.utils import snakecase_to_camelcase class Cache(): def __init__(self, api): self.api = api self.guilds = SearchableDict() self.private_channels = SearchableDict() ...
from builtins import str import MySQLdb import time import sys #sys.path.insert(0, '../spoken') #sys.path.insert(0, '../../spoken') from youtube_upload import * from config import * def convert_video(path): file_name, file_extension = os.path.splitext(path) try: """ffmpeg -i Hardware-requirement-to-in...
import numpy as np import tensorflow as tf import random as random # import cntk as C # """ # The below is necessary in Python 3.2.3 onwards to # have reproducible behavior for certain hash-based operations. # See these references for further details: # https://docs.python.org/3.4/using/cmdline.html#envvar-PYTHONHASHSE...
# # Copyright (c) 2019 by VMware, Inc. ("VMware") # Used Copyright (c) 2018 by Network Device Education Foundation, Inc. # ("NetDEF") in this file. # # Permission to use, copy, modify, and/or distribute this software # for any purpose with or without fee is hereby granted, provided # that the above copyright notice and...
board = [] for i in range(3): board.append(["*"] * 3) #a function that creats the board def print_board(board): for row in board: print (" ".join(row)) print("Let\'s play Tic Tac Toe! the rules are simple. you, the players, is given two choices: the row and column of your symbol. note that the numbers are between 0...
from .connection import Connection from .constants import UNITED_STATES from .constants import EUROPE from .constants import KOREA from .constants import TAIWAN from .constants import CHINA from .enums import RACE from .enums import CLASS from .enums import QUALITY from .enums import RACE_TO_FACTION from .enums impor...
import urllib from django_authopenid.forms import OpenidDissociateForm, AssociateOpenID from django_authopenid.forms import OpenidSigninForm from django_authopenid import DjangoOpenIDStore from django_authopenid.models import UserAssociation from django_authopenid.utils import * from django_authopenid.views import ass...
from django.utils.translation import ugettext_lazy as _ from horizon import tables from openstack_dashboard.dashboards.integra.schedules import utils from django.utils.http import urlencode from django.core.urlresolvers import reverse class AddTableData(tables.LinkAction): name = "addSchedule" verbose_name =...
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2007 Lukáš Lalinský # # 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...
from os import remove from shutil import copyfile import ddt from unittest import mock from i18n.changed import Changed from . import I18nToolTestCase, MOCK_APPLICATION_DIR @ddt.ddt class TestChanged(I18nToolTestCase): """ Tests functionality of i18n/changed.py """ def setUp(self): super().s...
#!/home/arthurb/bin/anaconda/bin/python # python ax1.py params_file FILEIN FILEOUT # python ax1.py params_file FILEIN FILEOUT START STOP # python ax1.py FS NFFT NW K PVAL FILEIN FILEOUT # python ax1.py FS NFFT NW K PVAL FILEIN FILEOUT START STOP # # analyze a set of time series with multi-taper spectral analysis and #...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import re import sys import json import requests def get_raw(url): r = requests.get(url) if r.status_code != 200: return None return r.text def parse_models(regex, text): result = [] lastModel = "" model_regex = re.compile(r'.*\d,\d') ...
""" add lower() indexes to pg. Revision ID: 439766f6104d Revises: 20671b28c538 Create Date: 2012-07-09 21:33:28.404627 """ from __future__ import unicode_literals from alembic import op from alembic.context import get_context # noqa: F401 from sqlalchemy.dialects.postgresql.base import PGDialect # revision identifi...
"""Tests for classes, MROs, inheritance etc.""" import unittest from pytype.pytd import pytd from pytype.tests import test_inference class InheritanceTest(test_inference.InferenceTest): """Tests for class inheritance.""" @unittest.skip("needs (re-)analyzing methods on subclasses") def testSubclassAttributes(s...
""" @summary: Creates a report with comparative statistics across providers @author: CJ Grady @version: 1.0 @status: alpha @license: gpl2 @copyright: Copyright (C) 2014, University of Kansas Center for Research Lifemapper Project, lifemapper [at] ku [dot] edu, Biodiversity Institute, 13...
# Copyright 2014 - StackStorm, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib import admin from models import * from django.contrib.auth.models import Permission def column_lister(model): """ Creates a new ModelAdmin that always lists the models in a table fashion. """ class ListAdmin(admin.Model...
# coding: utf-8 try: from unittest import mock except ImportError: import mock from pysuru.http import HttpClient def test_headers_attribute_should_always_have_authorization_header_with_token(): client = HttpClient('TARGET', 'TOKEN') assert 'Authorization' in client.headers assert client.headers[...
# -*- coding: utf-8 -*- from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import models from django.conf import settings from django.utils.translation import ugettext_lazy as _ from .managers import FavoriteManager class Favorite(models.Model): ...
import distutils import glob import os import shutil import sys import textwrap from os.path import curdir, join, pardir import pytest from pip._vendor.six import PY2 from pip import __version__ as pip_current_version from pip._internal import pep425tags from pip._internal.cli.status_codes import ERROR, SUCCESS from ...
import numpy as np import tof from configuration import loadConfiguration as loadConfig from aolUtil import struct import sys import random import lmfit from burning_detectors import projector import simplepsana # A bunch of methods to take care of the cookie box data _source_dict = {} def get_source(source_string): ...
import os,subprocess from shlex import quote from igf_data.utils.fileutils import check_file_path,get_temp_dir,remove_dir,copy_local_file class GATK_tools: ''' A python class for running gatk tools :param gatk_exe: Gatk exe path :param java_param: Java parameter, default '-XX:ParallelGCThreads=1 -Xmx4g' :...
# -*- coding: utf-8 -*- ''' test_qgsatlascomposition.py -------------------------------------- Date : Oct 2012 Copyright : (C) 2012 by Dr. Hugo Mercier email : hugo dot mercier at oslandia dot com **************...
import theano import theano.tensor as T from baselayers import RandomLayer from deepmonster import config floatX = config.floatX class NonDeterministicLayer(RandomLayer): """ Any layer subclassing this class should have limited applications such as dropout where it changes the theano graph only fo...
# -*- coding: iso-8859-1 -*- """ MoinMoin - DocBook-XML Parser This code was tested with 4Suite 1.0a4 and 1.0b1 @copyright: 2005 Henry Ho <henryho167 AT hotmail DOT com>, 2005 MoinMoin:AlexanderSchremmer @license: GNU GPL, see COPYING for details. DOCBOOK Parser: Features: ...
import json from sklearn.feature_extraction.text import TfidfVectorizer import nltk from nltk.corpus import stopwords from wordcloud import WordCloud import matplotlib.pyplot as plt import db import os DATASET_PATH = os.environ['HOME'] + '/nltk_data/corpora/twitter_samples/tweets.20150430-223406.json' def calc_frequen...
#!/usr/bin/python #!/usr/bin/python2 #!/usr/bin/python3 # +-------------------------------------------------------------------------------------------------------------+ # | ZTE ZXHN H267N Router with <= V1.0.01_CYTA_A01 - RCE Root Exploit | # | Copyright (c) 2017 Kropalis ...
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: __init__.py import dsz import dsz.file import dsz.path import dsz.version def Install(project, driverName, localDriverName, startValue, typeValue, a...
#!/bin/python # *-* encoding=utf-8 *-* ''' Image Priting Program Based on Haftoning ''' import sys import numpy, scipy from scipy import ndimage from scipy import misc import scipy.fftpack as fftpack import matplotlib.pyplot as plt sys.path.append('../Proj04-01') from DFT import DFT_2D, IDFT_2D def en_padding(img):...
"""Supporting definitions for the Python regression tests.""" if __name__ != 'test.support': raise ImportError('support must be imported from the test package') import collections.abc import contextlib import errno import faulthandler import fnmatch import functools import gc import importlib import importlib.uti...
import bpy # Get a handle to the active object object = bpy.context.active_object # If the object is in edit mode, come out of it if object.mode == 'EDIT': bpy.ops.object.mode_set(mode='OBJECT', toggle=True) # Get a handle to the active object's mesh data bmesh = object.data ####################################...
from app import app from flask import render_template, request from config import BASE_URL import csv # Not being used anywhere @app.route('/connect-choropleth') def connect(): page_url = BASE_URL + request.path return render_template('health-connect-choropleth.html', page_url=page_url) @app.route('/sewage'...
# The MIT License (MIT) # # Copyright (c) 2016 David I Urbina # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mo...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base import serialize from twilio.base import values from twilio.base.instance_context import InstanceContext from twilio.base.instance_resource import InstanceResource from twilio.base.l...
''' Prime digit replacements Find the smallest prime which, by replacing part of the number (not necessarily adjacent digits) with the same digit, is part of an eight prime value family. For a family of size 8, we can employ some optimizations: * only search for 3-repeated digits, since any other patterns will contai...
import numpy as np from vpipe_flow_calc.interpolation import face_interp def calculate_wall_friction_factor_colebrook_white_explicit( Re, D, ε ): # We are doing a linear interpolation on the relative roughness to calculate the Reynolds number of the transition # between laminar and turbulent ...
from test import support import types import unittest class FuncAttrsTest(unittest.TestCase): def setUp(self): class F: def a(self): pass def b(): return 3 self.fi = F() self.F = F self.b = b def cannot_set_attr(self, obj, name, v...
import pandas from scipy.stats.stats import pearsonr print("Неделя №1. Задание №1") # Функция вывода ответа def write_result(result, index): print("Ответ: " + str(result)) file = open("./Answers/" + str(index) + ".txt", "w") file.write(result) file.close() data = pandas.read_csv('./Data/titanic.csv', ...
import scrapy from scrapy import log from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from rcbi.items import Part import copy import os import urlparse import urllib MANUFACTURERS = ["Cobra", "Dinogy", "SkyRC", "DYS", "HQProp", "iPower", "Tattu", "GemFan", "SunnySky", "Emax...
class Progression: """Iterator producing a generic progression Default iterator produces the whole numbers 0, 1, 2, ... """ def __init__(self, start=0): """Initialize current to the first value of the progression.""" self._current = start def _advance(self): """Update self...
# This file is part of LiSE, a framework for life simulation games. # Copyright (c) Zachary Spector, public@zacharyspector.com # # 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, version 3....
import os import shutil import markdown import tempfile import datetime import json import re import tempfile import logging import glob import hippod.api_shared import hippod.error_object log = logging.getLogger() class ReportGenerator(object): LAST_ACHIEVEMENTS = 1 FILTER_BY_ANCHOR = 2 FILTER_BY_CHOIC...