src
stringlengths
721
1.04M
# Django settings for adl_lrs project. from unipath import Path # Root of LRS SETTINGS_PATH = Path(__file__) PROJECT_ROOT = SETTINGS_PATH.ancestor(3) # If you want to debug DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': ...
# -*- 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...
# -*- coding: utf-8 -*- import numpy as np from django.db import models import drivers.MPL3115A2 as mpl class Temperature(models.Model): temp = models.FloatField(default=-999.9) #Celcius altitude = models.FloatField(default=np.nan) #meters timestamp = models.DateTimeField(auto_now=True) instrument = m...
import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) SECRET_KEY = os.getenv('SECRET_KEY') # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = ['*'] # Application definition INSTALLED_APPS = ( 'django.contrib.admin', 'django.contrib.au...
import ssl import time import struct import asyncio import platform import functools import collections from . import Mumble_pb2 from .constants import MESSAGE_TYPES class Client: version = (1, 3, 0) def __init__(self, host, port=64738, username='snek', password=None): self.host = host self...
# Xlib.X -- basic X constants # # Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.se> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # ...
#!/opt/python/bin/python ''' @author: Jiri Vrany A module for handling flow123d transport output Parses transport_out pos file, takes only non-zero values of concetrations and saves them to json file, also saves list of times (even if all conc at such time was zero). ''' from multiprocessing import Process, Queue, ...
from cyclone.web import HTTPError from go_api.cyclone.handlers import BaseHandler from go_api.collections.errors import ( CollectionUsageError, CollectionObjectNotFound) from twisted.internet.defer import maybeDeferred class ContactsForGroupHandler(BaseHandler): """ Handler for getting all contacts for ...
import glob import pandas as pd import matplotlib.pyplot as plt import matplotlib.colors as colors import matplotlib.patches as mpatches from matplotlib import style import numpy as np import os import re ''' The SERFF .xlsm files should be downloaded into a directory within the current working directory named "network...
#!/usr/bin/python """Sound an alarm if a raspberry pi hasn't been heard from lately To set an alarm for pi named 'pi', create a file in mmdata/pulse.d named pi.alarm """ import os.path import time pulse="/home/mojotronadmin/mmdata/pulse.d/" logfile="/home/mojotronadmin/mmdata/incoming.log" maxinterval = 15*60 # h...
# =============================================================================== # Copyright 2016 ross # # 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/LICE...
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
# Copyright 2015-present The Scikit Flow 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 require...
# -*- encoding: utf-8 -*- # Copyright (C) 2015 Alejandro López Espinosa (kudrom) class NotFoundDescriptor(Exception): def __init__(self, name): self.name = name def __str__(self): return "Descriptor %s couldn't have been found" % self.name class NotListenerFound(Exception): def __init__...
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
#!/usr/bin/env python3 # NOTE: this example requires PyAudio because it uses the Microphone class import speech_recognition as sr # obtain audio from the microphone r = sr.Recognizer() with sr.Microphone() as source: print("Say something!") audio = r.listen(source) # recognize speech using Sphinx try: p...
""" This file contains a class useful for plotting streamline plots with steady state information using matplotlib """ from __future__ import division import warnings import numpy as np from numpy.linalg import norm, eig, eigvals, solve from scipy.optimize import fsolve, newton import matplotlib.pyplot as plt cla...
import os import sys import logging import importlib import subprocess import traceback import platform import json import shutil from functools import reduce from string import Template from django.http import HttpResponse from app.models import Plugin from app.models import Setting from django.conf import setting...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
from django import forms from django.core.exceptions import ImproperlyConfigured from django.test import TestCase from django.contrib import admin from django.contrib.admin.validation import validate, validate_inline from models import Song, Book, Album, TwoAlbumFKAndAnE, State, City class SongForm(forms.ModelForm):...
# Copyright (c) 2012-2017, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. import cfn_flip import collections import json import re import sys import types from . import validators __version__ = "1.9.4" # constants for DeletionPolicy Delete = 'Delete' Retain = 'Retain' Snaps...
# -*- coding: utf-8 -*- import json from django.http import HttpResponse from django.views.generic.detail import View class JSONResponseMixin(object): """ A mixin that can be used to render a JSON response. """ def render_to_json_response(self, context, **response_kwargs): """ Returns ...
__author__ = 'jonathan' from misc import ModelsObjectComparatorMixin from nova import test from oslo.serialization import jsonutils from test.nova import _fixtures as models from lib.rome.core.orm.query import Query as RomeQuery from lib.rome.core.session.session import Session as RomeSession from sqlalchemy.sql imp...
# ----------------------------------------------------------------------------- # Copyright (c) 2005-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this ...
# -*- 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...
# Copyright (c) 2005-2009 Jaroslav Gresula # # Distributed under the MIT license (See accompanying file # LICENSE.txt or copy at http://jagpdf.org/LICENSE.txt) # import jagpdf import jag.testlib as testlib import os import string import math media = 400, 400 def function(doc, spot): def spot_transform(fn): ...
""" Tests for the FM Regressor based in part on sklearn's logistic tests: https://github.com/scikit-learn/scikit-learn/blob/master/sklearn/linear_model/tests/test_logistic.py """ from io import BytesIO import pickle import sys from unittest import mock import numpy as np import pytest import scipy.sparse as sp from ...
# -*- coding: utf-8 -*- # # Multilingual websites with Sphinx documentation build configuration file, created by # sphinx-quickstart on Thu Nov 13 11:09:54 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the names...
import numba from .utils import exponential_search from .strgen import * def _split_init_into_coords_init_str(dim): return "coords_{} = loc[:, {}]".format(dim, dim) def split_init_into_coords_init_str(ndim): return '\n'.join([_split_init_into_coords_init_str(dim) for dim in range(ndim)...
# ========================================================================= # Copyright 2012-present Yunify, Inc. # ------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this work except in compliance with the Licens...
from urllib2 import HTTPError from util import hook, http @hook.command(autohelp=False) def gb(inp): '.gb - lists upcoming shows on Giant Bomb' url = 'http://www.giantbomb.com' try: doc = http.get_html(url) except HTTPError as e: errors = {400: 'bad request (ratelimited?) 400', ...
import numpy as np import scipy.stats as ss import scipy.special as sp from .family import Family from .flat import Flat from .gas_recursions import gas_recursion_normal_orderone, gas_recursion_normal_ordertwo from .gas_recursions import gasx_recursion_normal_orderone, gasx_recursion_normal_ordertwo from .gas_recursi...
#!/usr/bin/python """ Handler to assign Earth Engine Engine to request. """ ## MIT License ## ## Copyright (c) 2017, krishna bhogaonker ## 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 wi...
#!/usr/bin/env python #-*- coding:utf-8 -*- """ This module provide configure file management service in i18n environment. """ import os import logging import logging.handlers _LOG_FORMAT = "%(levelname)s: %(asctime)s: %(filename)s:%(lineno)d * %(thread)d %(message)s" _LOG_DATEFMT = "%m-%d %H:%M:%S" def init_log(lo...
# # Copyright 2015 Quantopian, 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 wr...
import os from django import forms from django.conf import settings from django.template.defaultfilters import filesizeformat from ietf.doc.models import Document from ietf.group.models import Group from ietf.name.models import DocTypeName from ietf.meeting.models import Meeting, Session # -------------------------...
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osgscalarbar" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osg from osgpypp import osgDB from osgpypp import osgGA from osgpypp import osgSim from osgpypp import osg...
# -*- coding: utf-8 -*- # # (DC)² - DataCenter Deployment Control # Copyright (C) 2010, 2011, 2012, 2013, 2014 Stephan Adig <sh@sourcecode.de> # 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; eit...
"""A collection of useful utilities for Honeybee""" import uuid import re def random_name(shorten=True): """Generate a random name as a string using uuid. Args: shorten: If True the name will be the first to segment of uuid. """ if shorten: return '-'.join(str(uuid.uuid4()).split('-')...
# -*- coding: utf-8 -*- # # Copyright (C) 2003-2009 Edgewall Software # Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com> # Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part ...
#======================================================================= # # Python Lexical Analyser # # Converting NFA to DFA # #======================================================================= from src.gnue.common.external.plex.Machines import LOWEST_PRIORITY from src.gnue.common.external.plex.Transitions...
import symbol_table import syntax_tree import interpreter negated_relation = { '=' : '#', '#' : '=', '<' : '>=', '>' : '<=', '<=' : '>', '>=' : '<' } class Parser_error(Exception): def __init__(self, error): self.error = error def __str__(self): return "error: {}".format(self.error) class Parser(object):...
# -*- coding: utf-8 -*- ''' Covenant Add-on This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This prog...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ 09a.py ~~~~~~ Advent of Code 2017 - Day 9: Stream Processing Part One A large stream blocks your path. According to the locals, it's not safe to cross the stream at the moment because it's full of garbage. You look down at the stream; rathe...
# coding: utf-8 ############################################################################## # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # Licens...
#usage (example): #python3.4 hybrid.py git_url=https://github.com/junit-team/junit.git repository_path=/home/geryxyz/hybrid_repo mom_hash=3e43555e1f4df95b0a239f453af6d3226a8fef6e dad_hash=bcbf43dcaa5efee1418685a9a523dc11dedc77c7 source_path=. pom_path=pom.xml output_path=/home/geryxyz/hybrid_test_results soda_rawDataRe...
#!/usr/bin/env python """ Example that does inference on an LSTM networks for amazon review analysis $ python examples/imdb/auto_inference.py --model_weights imdb.p --vocab_file imdb.vocab --review_files /pfs/reviews --output_dir /pfs/out """ from __future__ import print_function from future import standard_lib...
"""Check the log N log F slope of a local population.""" import numpy as np import matplotlib.pyplot as plt from frbpoppy import CosmicPopulation, Survey, SurveyPopulation from frbpoppy.population import unpickle from tests.convenience import plot_aa_style, rel_path MAKE = True if MAKE: population = CosmicPopu...
import re from collections import OrderedDict class Harness: GCOV_START = "GCOV_COVERAGE_DUMP_START" GCOV_END = "GCOV_COVERAGE_DUMP_END" FAULTS = [ "Unknown Fatal Error", "MPU FAULT", "Kernel Panic", "Kernel OOPS", "BUS FAULT", "CPU Pa...
#!/usr/bin/env python3 # # Copyright © 2012 - 2021 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.org/> # # 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, eithe...
# 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 applica...
from clang.cindex import TranslationUnit import unittest class TestCodeCompletion(unittest.TestCase): def check_completion_results(self, cr, expected): self.assertIsNotNone(cr) self.assertEqual(len(cr.diagnostics), 0) completions = [str(c) for c in cr.results] for c in expected:...
# coding=utf-8 # Copyright 2021 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# -*- coding: utf-8 -*- # # Django Backbone Boilerplate documentation build configuration file, created by # sphinx-quickstart on Thu Sep 19 19:15:23 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogen...
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
# -*- coding: utf-8 -*- # # setup.py # colorific # """ Package information for colorific. """ import os.path import platform try: from setuptools import setup except ImportError: from distutils.core import setup PROJECT_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__))) README_PATH = os.path....
# -*- coding: utf-8 -*- import urllib import base64 import rsa import binascii def PostEncode(userName, passWord, serverTime, nonce, pubkey, rsakv): "Used to generate POST data" encodedUserName = GetUserName(userName)#Encode username using base64 encodedPassWord = get_pwd(passWord, serverTime, nonce, pubke...
from tentacle.dht.routing_table import DHTRoutingTable, distance from math import pow MAX_BUCKET_SIZE = 8 class DHTBucket(object): def __init__(self): self._nodes = dict() def add_node(self, dhtNode): self._nodes[dhtNode._id] = dhtNode def is_bucket_full(self): return len(self._...
#!/usr/bin/env python #coding:utf-8 """ Author: --<v1ll4n> Purpose: Mixer for multiparser! Created: 03/09/17 """ import unittest from .dict_parser import DictParser from ..utils.iter_utils import iter_mix #DictParser(filename) DEFAULT_SESSION_ID = 'default_session_id_{index}' DEFAULT_SESSION_FILENAME = 'se...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Oct 4 14:47:47 2017 @author: slerp4 Compared with _debug version, this version excludes RMSprop optimizer """ #import tensorflow as tf from keras import backend as K from keras.applications.mobilenet import MobileNet from keras.preprocessing.image im...
# # This file is part of Bakefile (http://www.bakefile.org) # # Copyright (C) 2003,2004 Vaclav Slavik # # 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 wit...
#!/usr/bin/env python """This module compiles the lecture notes.""" import argparse import glob import os import shutil import subprocess def compile_single(is_update): """Compile a single lecture.""" for task in ["pdflatex", "bibtex", "pdflatex", "pdflatex"]: cmd = [task, "main"] subprocess.c...
"""Helpers that help with state related things.""" import asyncio import datetime as dt import json import logging from collections import defaultdict from types import TracebackType from typing import ( # noqa: F401 pylint: disable=unused-import Awaitable, Dict, Iterable, List, Optional, Tuple...
# -*- coding: utf-8 -*- # # gamescene.py # Defines the behaviour of the actual game scene # # (c) Jakob Florell and Jonne Mickelin 2009 import error #################### # Standard library # #################### import math import heapq import os #################### # Required Modules # #################### impor...
# pylint: disable=redefined-outer-name """ Test different error functions as isolated units. """ from unittest import mock import numpy as np import pytest import scipy.stats from tinydb import where from pycalphad import Database, Model, variables as v from espei.paramselect import generate_parameters from espei.er...
# Load the required packages import EKP import csv import os import datetime # Knowledge platform URL url = '' # User credentials: Please fill in! username = '' password = '' # Set the output directory os.chdir("NIZO input & Output/") # Get the user token, required for access t = EKP.getToken(username, password, ur...
#!/usr/bin/env python import window import os class RunmapWindow(window.Window): """ Gui application interface. """ GLADE_FILE = os.path.splitext(__file__)[0] + '.glade' WINDOW_NORMAL = 'window_normal' WINDOW_EXPERT = 'window_expert' ROOT_WINDOW = WINDOW_NORMAL def __init__(self...
# -*- coding: utf-8 -*- __author__ = 'Rainer Arencibia' import PyQt4 import numpy as np import cv2 from PyQt4.QtCore import QString from PyQt4.QtGui import QColor, QPen, QBrush from Histograms import Ui_Histograms """ The MIT License (MIT) Copyright (c) 2016 Rainer Arencibia Permission is hereby granted, free of c...
from django.conf.urls.defaults import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', (r'^admin/', include(admin.site.urls)), (r'^accounts/login/$', 'accounts.views.customLogin'), (r'^accounts/logou...
""" Created on Apr 26, 2016 @author: niels """ from subprocess import PIPE, STDOUT from BogusFormBuilder import BogusFormBuilder import subprocess import re import os import time import sys import pexpect class Wallet(object): """ This class will manage the bitcoins going in and out off the agent. """ def __init...
# Copyright 2017-2021 TensorHub, 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 writ...
#!/usr/bin/env python # # Copyright (C) 2015 eNovance SAS <licensing@enovance.com> # # 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 # # Unle...
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-09-05 02:47 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Create...
# Created by Evgeny Kamyshanov on March, 2014 # Copyright (c) 2013-2014 BEFREE Ltd. # Modified by Evgeny Kamyshanov on March, 2015 # Copyright (c) 2014-2015 Evgeny Kamyshanov # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softw...
import argparse import importlib import os from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand from django_excel_to_model.field_tools import get_valid_excel_field_name from django_excel_to_model.file_readers.csv_reader import CsvFile from django_excel_to_model...
import pylibmc memcached = pylibmc.Client(['127.0.0.1'], binary=True, behaviors={"tcp_nodelay": True}) #Using mapping interface memcached["First"] = "First Value" print memcached["First"] del memcached["First"] #Using classic style if memcached.add("Second", "Second Value"): print memcached.get("Second") if mem...
# -*- encoding: utf-8 -*- from __future__ import print_function import json import time from builtins import str as text import pytest from django.contrib.auth.models import User from django.utils.translation import gettext_lazy as _ from model_bakery import baker from multiseek import logic from multiseek.logic impo...
import collections import inspect import re from enum import Enum, unique, IntEnum from cloudbot.event import EventType valid_command_re = re.compile(r"^\w+$") @unique class Priority(IntEnum): # Reversed to maintain compatibility with sieve hooks numeric priority LOWEST = 127 LOW = 63 NORMAL = 0 ...
# -*- coding: utf-8 -*- # Copyright (C) 2010-2012 Bastian Kleineidam # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
import warnings import numpy as np import six from .._externals.ppca import PPCA from .._shared.helpers import get_type def format_data(x, vectorizer='CountVectorizer', semantic='LatentDirichletAllocation', corpus='wiki', ppca=True, text_align='hyper'): """ Formats data into a list of numpy ...
# Copyright 2008,2009,2012-2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later...
from amgut.lib.mail import send_email from amgut.handlers.base_handlers import BaseHandler from amgut.util import AG_DATA_ACCESS from amgut import text_locale class KitIDHandler(BaseHandler): def get(self): self.render('retrieve_kitid.html', message='', output='form', loginerror='') ...
import pickle from typeguard import check_argument_types from asphalt.serialization.api import Serializer class PickleSerializer(Serializer): """ Serializes objects using the standard library :mod:`pickle` module. .. warning:: This serializer is insecure because it allows execution of arbitrary code wh...
""" Define extension dtypes. """ import re from typing import ( TYPE_CHECKING, Any, Dict, List, MutableMapping, Optional, Tuple, Type, Union, cast, ) import numpy as np import pytz from pandas._libs.interval import Interval from pandas._libs.tslibs import NaT, Period, Timestam...
import unittest import os from latexbuild.utils import ( random_str_uuid, random_name_filepath, list_filepathes_with_predicate, read_file, recursive_apply, ) PATH_FILE = os.path.abspath(__file__) PATH_TEST = os.path.dirname(PATH_FILE) class TestRandomStrUuid(unittest.Te...
from __future__ import print_function from icalendar import * from datetime import date, datetime, timedelta import mysql.connector from mysql.connector import errorcode import pickle import csv import pandas from pandas.io import sql import matplotlib.pyplot as plt import xlsxwriter import numpy as np import os import...
from unittest import TestCase from ..functions import getDiffOfMean, getMeanDiffListForAllPermutations\ , getDiffOfMeanRandomized import numpy as np class TestGetDiffOfMean(TestCase): def test_calculation(self): lst_1 = [1,2,3] lst_2 = [4,5,6] res = getDiffOfM...
# -*- coding: utf-8 -*- """ Desenvolvedor: David Pereira de Araújo Projeto: credenciamento E-mail: daraujo@tins.com.br Mês: 01 Ano: 2017 Empresa: TINS - Soluções Corporativas """ __author__ = u'daraujo' from django.conf.urls import url from app_a...
# -*- coding: utf-8 -*- # Copyright (c) 2014 CoNWeT Lab., Universidad Politécnica de Madrid # Copyright (c) 2018 Future Internet Consulting and Development Solutions S.L. # This file is part of OAuth2 CKAN Extension. # OAuth2 CKAN Extension is free software: you can redistribute it and/or modify # it under the terms...
# 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 ...
#!/usr/bin/env python3 from astroquery.sdss import SDSS from astropy import coordinates as coords from astropy.io import fits import numpy as np from PIL import Image import matplotlib.patches as patches import matplotlib.pyplot as plt from astropy.table import Table,vstack,Column,unique import copy import os.path from...
import unittest import numpy import chainer from chainer.backends import cuda import chainer.functions as F from chainer import gradient_check from chainer import testing from chainer.testing import attr from chainer.testing import backend from chainer.testing import condition @testing.parameterize(*(testing.produc...
# noqa: D300,D400 # Copyright (c) 2016, Aaron Christianson # 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...
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
#!/usr/bin/env python import subprocess import os import sys import time import thread import argparse # parse the command line parameters import string import re # regex import select import logging # non standard librarys from subtitle_manager import SubtitleManager from series_manager import SeriesManager fr...
#!/usr/bin/env python import os import sys import shutil from pwd import getpwnam from grp import getgrnam from setuptools import setup from pkg_resources import Requirement, resource_filename CPSVERSION = '1.2.0' CONFDIR = '/etc/cpsdirector' if not os.geteuid() == 0: CONFDIR = 'cpsdirectorconf' long_descript...
import json from django import forms from django.template.loader import render_to_string from django.utils.safestring import mark_safe from wagtail.wagtailadmin.edit_handlers import (BaseCompositeEditHandler, FieldPanel, widget_with_script) from wagtail.wagtailimages.edi...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models from django.conf import settings import os # Create your models here. def get_file_path(instance,filename): return (settings.MEDIA_ROOT+'/'+instance.subject.department_code+'/'+instance.subject.subject_code+'/'+filename) ...
"""This module is used to store some examples for the documentation""" from numpy import array, reshape from pypuf.simulation.arbiter_based.ltfarray import NoisyLTFArray from pypuf.property_test.base import PropertyTest from pypuf.tools import sample_inputs def main(): """This method is used to execute all exampl...