text
stringlengths
12
6.59M
""" Define a supercell This class is the basis of many different objects. """ import math from numbers import Integral import numpy as np from numpy import dot from . import _plot as plt from . import _array as _a from sisl.utils.mathematics import fnorm from sisl.shape.prism4 import Cuboid from .quaternion import Q...
#!/usr/bin/env python """ Unofficial Python API for ThePirateBay. Currently supports searching, recent torrents and top 100 torrents. @author Karan Goel @email karan@goel.im Copyright (C) 2013 Karan Goel This program is free software: you can redistribute it and/or modify it under the terms of the GN...
# -*- coding: iso8859-1 -*- # # Copyright (C) 2003, 2004 Edgewall Software # Copyright (C) 2003, 2004 Jonas Borgstrm <jonas@edgewall.com> # # Trac 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...
from datetime import datetime from math import log import operator import random import re from config import CONFIG as cfg from db import _key, msetbit, sequential_id, first_key_with_bit_set # This is pretty restrictive, but we can always relax it later. VALID_EXPERIMENT_ALTERNATIVE_RE = re.compile(r"^[a-z0-9][a-z0-...
import os import sys import time import operator import logging import requests import json import re from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler from watchdog.events import FileModifiedEvent class GamificationHandler(FileSystemEventHandler): def __init__(self, paper...
# -*- coding: utf-8 -*- from __future__ import print_function import itertools import os import errno import locale import numpy as np import sys from datetime import date, datetime, timedelta from fnmatch import fnmatch from pkgutil import get_data from threading import Lock from time import time import certifi from...
#!/usr/bin/env python from glob import iglob import signal import shutil import os import sys import ConfigParser import time def TamanoTotalArchivosEnCarpeta(): tamanoTotal = 0 for fichero in os.listdir(rutaActual): if os.path.isfile(rutaActual + "/" + fichero): tamanoTotal = tamanoTotal + ((os.path.getsize(...
#!/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 ...
import asyncio import json import logging import os import aiohttp import semver import virtool.db.processes import virtool.db.utils import virtool.http.proxy import virtool.http.utils import virtool.processes import virtool.software import virtool.utils logger = logging.getLogger(__name__) VIRTOOL_RELEASES_URL = "...
''' Jennifer's cheatsheet for Python basic syntax and handy tips. - Variables and basic operations - Strings - Console input - Lists - Tuples - Control flow - Functions - Dictionaries - Modules, namespaces and scripts - Text file I/O - Handy modules - date and time, random numbers - Sorting - IPython features - Editor ...
#!/usr/bin/python3 import sys import base64 from pyDes import * saltFn = "%(configFolder)s/salt" f = open(saltFn) salt_property = f.read() f.close() key = salt_property.split("=")[1].strip() def obscure(data=""): engine = triple_des(key, ECB, pad=None, padmode=PAD_PKCS5) data = data.encode('ascii') en_d...
# -*- coding: utf-8 -*- # Create your models here.
#!/usr/bin/env python """ Script to setup some test data. This is useful during development when we are continuously wiping the db and want to get some new data in quickly. """ import os import random import shutil from util import setup_django_env # This is the directory where this bootstrap script is located. P...
from dynqt import QtCore, QtGui, QtOpenGL import numpy, os, sys import pdftoppm_renderer, slide __version__ = "0.1" w, h = 1024, 768 OVERVIEW_COLS = 5 MARGIN_X = 30 MARGIN_Y = 24 BLEND_DURATION = 150 USE_GL = True # False USE_CACHING = True # False if USE_GL: try: from OpenGL import GL except Impor...
# -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ The classes in scene.visuals are visuals that may be added to a scenegraph using the methods and properties defined in `vispy.scene.Node` such as name, visib...
""" Methods for filtering over Variants. The fields that we allow querying against vary across different models, and for each model, the field may either be a column in the SQL database, a key in the catch-all serialized key-value dictionary. A naive implementation would pull all Variant objects from the SQl database...
from glob import glob import pandas import numpy import pickle import os import re home = os.environ["HOME"] base = "%s/DATA/PUBMED" %os.environ["SCRATCH"] counts_folder = "%s/counts" %(base) files = glob("%s/*.tsv" %counts_folder) len(files) #4660 # save a lookup to associate repos with pmids, if there are repeats ...
from __future__ import division import numpy as np import scipy.stats as stats from numpy import newaxis as na np.seterr(invalid='raise') import operator from ..basic.distributions import DirGamma from ..util.general import rle ########## # misc # ########## # TODO scaling by self.state_dim in concresampling is th...
#!/usr/bin/env python """ genonets_exmpl_minimal ~~~~~~~~~~~~~~~~~~~~~~ Demonstrates the minimal code required to create genotype networks, perform analyses, and write results to files using Genonets with default settings. Use the following command to run the script: 'python genonets_exmpl_mi...
#!/usr/bin/python # # Copyright 2011 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
from django.core.cache import cache from fo2.models import rows_to_dict_list, rows_to_dict_list_lower, GradeQtd from utils.functions import make_key_cache, fo2logger, arg_def from lotes.models import * from lotes.models.base import * def op_inform(cursor, op, cached=False): # informações gerais de 1 OP ret...
''' Created on 2016/11/3 :author: hubo ''' from __future__ import print_function from vlcp.config import manager from vlcp.scripts.script import ScriptModule import vlcp.service.sdn.viperflow as viperflow import vlcp.service.kvdb.objectdb as objectdb from vlcp.server.module import depend, callAPI from vlcp.utils.con...
"""Plotting methods for radar data.""" import numpy import matplotlib matplotlib.use('agg') import matplotlib.pyplot as pyplot import matplotlib.colors from gewittergefahr.gg_utils import grids from gewittergefahr.gg_utils import radar_utils from gewittergefahr.gg_utils import error_checking from gewittergefahr.deep_l...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Updates marks for modified results""" from __future__ import with_statement import os import time from . import paths from . import repo_walker from . import submissions from . import penalty from . import vmlogging from .paths import VmcheckerPaths from .config impo...
"""Plotting methods for radar data.""" import numpy import matplotlib matplotlib.use('agg') import matplotlib.pyplot as pyplot import matplotlib.colors from gewittergefahr.gg_utils import grids from gewittergefahr.gg_utils import radar_utils from gewittergefahr.gg_utils import error_checking from gewittergefahr.deep_l...
""" Version information for volaupload """ __version__ = "0.10.0"
import re import configparser from time import mktime from datetime import datetime, timedelta config = configparser.ConfigParser() config.read('config.ini') if 'General' not in config or not ('logfile' in config['General'] and 'outputfile' in config['General']): print('Invalid configuration!') import s...
#main.py #Copyright (c) 2015 Tyler Spadgenske #MIT License ''' Usage: If FONA is powered off, run sudo python /home/pi/tyos/src/main.py --power to turn module on and start TYOS. If FONA is already on, just run sudo python /home/pi/tyos/src/main.py Upgrade: To check for updates go to https://github.com/spadgenske/TYOS/...
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------------------------------------------------- # INFO: #----------------------------------------------------------------------------------------------------------------------- """ Author: Evan Hubin...
#!/usr/bin/python3 import sys from PyQt5.QtWidgets import QApplication import window def main(): startGUI() def startGUI(): app = QApplication(sys.argv) ex = window.MainWindow() tw = {"text": "bite"} ex.addTweet(tw) sys.exit(app.exec_()) if __name__ == '__main__': main()
"""This module runs commands given by the user.""" import sys import os import argparse import textwrap from PyBake import Path from PyBake.logger import StdOutSink, LogVerbosity, log # Make sure this module is executed, not imported. if __name__ != '__main__': raise RuntimeError("This module is meant to be execu...
#!/usr/bin/env python #=============================================================================== #Python Perlin Noise based map generation # This program creates a pseudo-random noise pattern and then # applies a cos based intropilation. It then layers several octaves of noise # and uses a weighted average ...
#!/usr/bin/python import time from modules.server import ServerThread import threading import json from modules.location import Location import logging import tornado.websocket import modules.calc import math from modules.calc import direction_to_point import modules.utils import modules.log import socket import sys i...
#!/usr/bin/env python # web framework from bottle import Bottle, template, static_file, request, redirect, app, get, post, run, delete # python built-ins import uuid, hashlib, shutil, string import random, subprocess, sys, os, re import cgi, urllib, urllib2, json, smtplib, time import pickle try: import requests e...
#!/usr/bin/python3 # # Create a degenerate FASTA from original FASTA and GTF - degenerateFasta.py # # Toni Westbrook (anthonyw@wildcats.unh.edu) # # usage: degenerateFasta.py [-h] [--fasta FASTA] [--gtf GTF] [--output OUTPUT] # # Create a degenerate FASTA from original FASTA and GTF # # optional arguments:...
# Copyright (c) 2008 Mikael Lind # # 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, modify, merge, publish, distr...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # [The "New BSD" license] # Copyright (c) 2014 The Board of Trustees of The University of Alabama # All rights reserved. # # See LICENSE for details. from __future__ import print_function import logging logger = logging.getLogger('cfl.main') import sys import os.path i...
#!/usr/bin/env python import math import sys import os from direct.showbase.ShowBase import ShowBase import panda3d.core as p3d p3d.load_prc_file('config/engine.prc') if os.path.exists(os.path.join('config', 'user.prc')): p3d.load_prc_file('config/user.prc') import ecs import inputmapper import game_modes from p...
#-*- coding: utf-8 -*- from textwrap import dedent import sys import unittest from . import format_code from .code import CodeBlock, CodeLine from .extras import tests from .exceptions import NotEnoughSpace from .utils import FormatterTestCase class LiteralsTestCase(FormatterTestCase): """ [5.2.2] + li...
import os from unittest import skip from datetime import datetime from distutils.util import strtobool from selenium import webdriver from wizard_builder.models import ( Checkbox, Choice, Conditional, Date, FormQuestion, MultiLineText, MultipleChoice, PageBase, QuestionPage, RadioButton, SingleLineText, Si...
"""GStudio implementations of osid objects.""" # pylint: disable=too-many-public-methods,too-few-public-methods # Number of methods are defined in specification # pylint: disable=too-many-ancestors # Inheritance defined in specification import importlib import itertools import uuid from deci...
# -*- coding: utf-8 -*- def test_audio_Artist_attr(a_artist): m = a_artist m.reload() assert str(m.addedAt.date()) == '2017-01-17' assert m.countries == [] assert [i.tag for i in m.genres] == ['Electronic'] assert m.guid == 'com.plexapp.agents.lastfm://Infinite%20State?lang=en' assert m.in...
''' -- Imports from python libraries -- ''' from django.template.defaultfilters import slugify import hashlib # for calculating md5 # import os -- Keep such imports here import json import datetime ''' -- imports from installed packages -- ''' from django.http import HttpResponseRedirect from django.http import HttpRes...
# -*- coding: utf-8 -*- from urllib.parse import quote_plus import pytest from plexapi.exceptions import BadRequest from . import conftest as utils from . import test_media, test_mixins def test_audio_Artist_attr(artist): artist.reload() assert utils.is_datetime(artist.addedAt) assert artist.albumSort =...
''' -- Imports from python libraries -- ''' import json import hashlib import magic import subprocess import mimetypes import os # import re import ox import threading from PIL import Image, ImageDraw # install PIL example:pip install PIL from StringIO import StringIO ''' -- imports from installed packages -- ''' fr...
from nutils import * import random, itertools, functools from nutils.testing import * @parametrize class basis(TestCase): def setUp(self): super().setUp() self.domain, self.geom = mesh.rectilinear([[0,1,2]]*self.ndims, periodic=[0] if self.periodic else []) for iref in range(self.nrefine): self.do...
from django.http import HttpResponseRedirect #from django.http import HttpResponse from django.shortcuts import render_to_response #render uncomment when to use from django.template import RequestContext from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from django_...
import os from pathlib import Path import pytest from i3configger import build, ipc, paths, config, partials HERE = Path(__file__).parent EXAMPLES = HERE.parent / 'examples' REFERENCE = HERE / 'examples' FAKE_HEADER = """\ ############################################################################### # Built by i3c...
from operator import itemgetter, attrgetter import itertools from nose.tools import assert_true, raises from numpy.testing import assert_array_equal, assert_equal import numpy as np import warnings from . import schema import datajoint as dj class TestFetch: def __init__(self): self.subject = schema.Subje...
""" Tests for file downloading and processing """ import os.path import pytest from shutil import copyfile import tempfile from le_utils.constants import languages from ricecooker.classes.files import SubtitleFile from ricecooker.classes.files import is_youtube_subtitle_file_supported_language from ricecooker.classes....
"""Tests for files.py""" import os import os.path from unittest import TestCase from coverage.files import ( FileLocator, TreeMatcher, FnmatchMatcher, ModuleMatcher, PathAliases, find_python_files, abs_file, actual_path ) from coverage.misc import CoverageException from coverage import env from tests.coverag...
import pandas as pd import numpy as np from scipy.stats.stats import _ttest_finish as get_pval from itertools import combinations from collections import defaultdict import quantipy as qp import pandas as pd import numpy as np from operator import add, sub from quantipy.core.view import View from quantipy.core.cache i...
from django import forms from django.test import TestCase from .models import JSONNotRequiredModel class JSONModelFormTest(TestCase): def setUp(self): class JSONNotRequiredForm(forms.ModelForm): class Meta: model = JSONNotRequiredModel fields = '__all__' ...
import pandas as pd import numpy as np from scipy.stats.stats import _ttest_finish as get_pval from itertools import combinations, chain from collections import defaultdict import quantipy as qp import pandas as pd import numpy as np from operator import add, sub from quantipy.core.view import View from quantipy.core.c...
"""FT ST tests Unit tests for minemeld.ft.st """ import unittest import tempfile import shutil import random import uuid import time from nose.plugins.attrib import attr import minemeld.ft.st TABLENAME = tempfile.mktemp(prefix='minemeld.ftsttest') NUM_ELEMENTS = 10000 class MineMeldFTTableTests(unittest.TestCase...
import string import unittest from compiler import error, lex class TestModuleAPI(unittest.TestCase): """Test the API of the lex module.""" @staticmethod def test_tokenize(): l1 = lex.Lexer() tokens1 = list(lex.tokenize("")) tokens2 = list(l1.tokenize("")) tokens1.should....
#!/usr/bin/env python # Copyright (c) 2020, Michael Boyle # See LICENSE file for details: <https://github.com/moble/spherical_functions/blob/master/LICENSE> import math import cmath import numpy as np import quaternion import spherical_functions as sf import pytest def test_modes_creation(): for s in range(-2, ...
# -*- coding: utf-8 from __future__ import unicode_literals from decimal import Decimal, getcontext import math from django.test import TestCase from shop.money.money_maker import AbstractMoney, MoneyMaker, _make_money class AbstractMoneyTest(TestCase): def test_is_abstract(self): self.assertRaises(Ty...
from unittest import TestCase import pytest import niche_vlaanderen import numpy as np import pandas as pd import tempfile import shutil import os import sys import distutils.spawn import subprocess class testNiche(TestCase): def test_invalidfile(self): n = niche_vlaanderen.Niche() result = n.s...
""" The MIT License Copyright (c) 2009 Vic Fryzel 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, modify, merge, publi...
from disco.test import TestCase, TestPipe from disco.compat import bytes_to_str from disco.worker.pipeline.worker import Stage from disco.worker.task_io import task_input_stream import sys import csv from functools import partial PREFIX='/tmp/' def read(interface, state, label, inp): from disco import util fo...
import importlib import sublime from unittesting import DeferrableTestCase from SublimeLinter.lint import events, util from SublimeLinter.tests.parameterized import parameterized as p LinterModule = importlib.import_module('SublimeLinter-annotations.linter') Linter = LinterModule.Annotations class TestRegex(Defe...
#!/usr/bin/env python #encoding:utf-8 #author:dbr/Ben #project:tvdb_api #repository:http://github.com/dbr/tvdb_api #license:Creative Commons GNU GPL v2 # (http://creativecommons.org/licenses/GPL/2.0/) """ tvnamer.py Automatic TV episode namer. Uses data from www.thetvdb.com via tvdb_api """ __author__ = "dbr/Ben" __v...
import re import json from twython import Twython from dateutil import parser from datetime import datetime, date, time, timedelta from flask import Flask, send_from_directory import calendar app = Flask(__name__, static_url_path='') counter = 0 def startTwitter(): global APP_KEY APP_KEY= 'YOUR KEY HERE' APP_SE...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of sbpipe. # # sbpipe 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...
import dedupe import unittest class ParsingTest(unittest.TestCase): def setUp(self): self.index = dedupe.tfidf.TfIdfIndex() def test_keywords(self): self.index.index(('AND', 'OR', 'EOF', 'NOT')) self.index._index.initSearch() assert self.index.search(('AND', 'OR', 'EOF', 'NOT'...
from common import unittest2 import pyuv class TimerTest(unittest2.TestCase): def test_timer1(self): self.timer_cb_called = 0 def timer_cb(timer): self.timer_cb_called += 1 timer.stop() timer.close() loop = pyuv.Loop.default_loop() timer = pyuv...
#!/usr/bin/env python """ Integration (not unit) tests for pylast.py """ import time import pytest import pylast from .test_pylast import WRITE_TEST, TestPyLastWithLastFm class TestPyLastTrack(TestPyLastWithLastFm): @pytest.mark.skipif(not WRITE_TEST, reason="Only test once to avoid collisions") def test_l...
from unittest import TestCase from framewirc import exceptions from framewirc.utils import chunk_message, RequiredAttributesMixin, to_bytes, to_unicode class TestToUnicode(TestCase): def test_already_unicode(self): text = 'тнιѕ ιѕ αℓяєα∂у υηι¢σ∂є' result = to_unicode(text) self.assertEqua...
#-*- coding: utf-8 -*- from unittest import TestCase from reportlab.lib.colors import Color from xhtml2pdf.tags import int_to_roman from xhtml2pdf.util import getCoords, getColor, getSize, getFrameDimensions, \ getPos, getBox, pisaTempFile, getBorderStyle, set_value, copy_attrs, transform_attrs class UtilsCoord...
# -*- coding: utf-8 -*- from datetime import datetime import pytz from tests.test_base import BaseTest from mangopay.utils import Address, Money, timestamp_from_datetime class UtilsTest(BaseTest): def test_timestamp_from_datetime_timezone_unaware(self): """ The timestamp should be correctly ca...
#!/usr/bin/python3 ## Copyright 2017 Marshall E. Giguere ## ## 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...
# -*- coding: utf-8; -*- import re from jenkins_autojobs import main def test_filter_jobs(): class Job: def __init__(self, name): self.name = name class jenkins: @staticmethod def view_jobs(x): return { 'v1': [Job('scratch-one'), Job('scratch-...
import functools import os import tempfile import csv import re import logging import uuid import pytest from datetime import datetime from retry import retry from notifications_python_client.notifications import NotificationsAPIClient from selenium.common.exceptions import NoSuchElementException, TimeoutException fro...
# -*- coding: utf-8 -*- import shutil import os import datetime import time from pelican import utils from .support import get_article, unittest from pelican.utils import NoFilesError class TestUtils(unittest.TestCase): def test_get_date(self): # valid ones date = datetime.datetime(year=2012, mo...
# -*- coding: utf-8 -*- import asyncio import io import logging import mimetypes import os import pathlib import sys import tempfile import traceback from concurrent.futures import ProcessPoolExecutor from functools import wraps from unittest.mock import patch import aiohttp import peony import pytest from peony impo...
#!/usr/bin/env python """ Test fitting the velocity dispersion. """ import numpy as np import pylab as plt import logging import dsphsim.instruments import dsphsim.dwarf import dsphsim.vdisp import dsphsim.simulator # More verbose output... logging.getLogger().setLevel(logging.DEBUG) def test_vdisp(): np.rando...
#!/usr/bin/env python # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Main Madpack installation executable. # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # import sys import getpass import re import os import glob import traceback import subprocess import datetime import tempfile import shutil...
# -*- coding: utf-8 -*- import pytest from datetime import datetime from plexapi.exceptions import BadRequest, NotFound from . import conftest as utils def test_video_Movie(movies, movie): movie2 = movies.get(movie.title) assert movie2.title == movie.title def test_video_Movie_attributeerror(movie): with...
# -*- coding: utf-8 -*- # Copyright (c) 2016 Aladom SAS & Hosting Dvpt SAS from django.db.models import CharField from django.utils.translation import ugettext_lazy as _ from ..phone import Phone from .lookups import PhoneMatchLookup __all__ = [ 'PhoneField', ] class PhoneField(CharField): description = _("...
from __future__ import unicode_literals from django.core.urlresolvers import reverse from .helpers import AdminViewPermissionViewsTestCase from .test_app.models import TestModel1 class TestModelAdminViews(AdminViewPermissionViewsTestCase): ## admin index def test_index_view_simple_user(self): self.cl...
from . import RephoneTest from re import match class TestViews(RephoneTest): def test_index(self): with self.client: response = self.client.get('/') assert response.status_code == 303 def test_outbound(self): with self.client: response = self.client.post('...
import os import pyexcel as pe from pyexcel.ext import webio from pyexcel.ext import xls from db import Session, Base, Signature, Signature2, engine import sys if sys.version_info[0] == 2 and sys.version_info[1] < 7: from ordereddict import OrderedDict else: from collections import OrderedDict from nose.tools i...
# Copyright (c) 2008, Aldo Cortesi. All rights reserved. # # 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, modify,...
""" MakeMKV CLI Wrapper Released under the MIT license Copyright (c) 2012, Jason Millward @category misc @version $Id: 1.4, 2013-04-03 09:41:53 CST $; @author Jason Millward <jason@jcode.me> @license http://opensource.org/licenses/MIT """ import subprocess import imdb import os import re from database i...
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Daniel Zhang (張道博)' __copyright__ = 'Copyright (c) 2013, University of Hawaii Smart Energy Project' __license__ = 'https://raw.github' \ '.com/Hawaii-Smart-Energy-Project/Maui-Smart-Grid/master/BSD' \ '-LICENSE.txt' import xml.etr...
# -*- coding: utf-8 -*- # Copyright (c) 2010-2014, MIT Probabilistic Computing Project # # 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/LICENS...
# encoding: utf-8 import os import datetime import cherrypy from pygments.lexers import get_all_lexers, get_lexer_by_name from pygments.formatters import HtmlFormatter from pygments import highlight from pygments.util import ClassNotFound from mako.lookup import TemplateLookup import imghdr try: unicode except Na...
#!/usr/bin/env python # -*- coding: utf-8 -*- '''Utilities for spectral processing''' import numpy as np import scipy.fftpack as fft import scipy import scipy.signal import scipy.interpolate import six from . import time_frequency from .. import cache from .. import util from ..util.exceptions import ParameterError ...
#!/usr/bin/env python #-*- coding: utf-8 -*- """ The molecules modules serves as an interface to write water molecule input files using predefined geometries, to be used with the DALTON qm package. """ from mpl_toolkits.mplot3d import Axes3D from matplotlib import pyplot as plt import numpy as np import re, os, itert...
from operator import attrgetter from django.core import serializers from view_cache_utils import cache_page_with_prefix from hashlib import md5 from django.core.paginator import Paginator, EmptyPage from django.http import HttpResponse, HttpResponseNotFound, Http404, HttpResponseForbidden from django.shortcuts import r...
#!/usr/bin/env python #-*- coding: utf-8 -*- """ The molecules modules serves as an interface to write water molecule input files using predefined geometries, to be used with the DALTON qm package. """ import re, os, itertools, warnings, subprocess, shutil, logging, string import h5py from mpl_toolkits.mplot3d import...
## @file REKTUser.py # REKTUser # @author Stephen Longofono # @brief The user class for the recommendation system # @details This file defines the User class which is used to generate and manipulate a user profile from # their Spotify profile import Mutators import traceback import Variance import functools im...
from itertools import starmap from operator import attrgetter from django.core import serializers from django.core.paginator import Paginator, EmptyPage from django.http import HttpResponse, HttpResponseNotFound, Http404, HttpResponseForbidden from django.shortcuts import redirect, render, get_object_or_404 from django...
import logging import random import json import requests import subprocess import re from time import sleep from datetime import datetime from hashlib import sha256 from StringIO import StringIO from libcloud.compute.providers import get_driver from libcloud.compute.base import Node, NodeSize, NodeImage, NodeLocation...
import logging import random import json import requests import subprocess import re from time import sleep from datetime import datetime from hashlib import sha256 from libcloud.compute.providers import get_driver from libcloud.compute.base import Node, NodeSize, NodeImage, NodeLocation from libcloud.compute.base im...
# -*- coding: UTF-8 -*- # Copyright 2009-2016 Luc Saffre # License: BSD (see file COPYING for details) """Defines the model mixins :class:`Sequenced` and :class:`Hierarchical`. A `Sequenced` is something which has a sequence number and thus a sort order which can be manipulated by the user using actions :class:`MoveUp...
# -*- encoding: utf-8 -*- # # Copyright 2015 Rackspace # 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 #...
#!/usr/bin/env python """ Web URL maniuplation and downloading/scraping/ParsingError scripts - Google Drive file download - Dropbox URL parsing and download """ import os import requests import sys from urllib.parse import urlparse from urllib.error import URLError from tqdm import tqdm from lxml.html import fromstri...
# Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """This is the **MPI for Python** package. The *Message Passing Interface* (MPI) is a standardized and portable message-passing system designed to function on a wide variety of parallel computers. The MPI standard defines the syntax and semantics of library routi...