src
stringlengths
721
1.04M
#!/usr/bin/env python # # @license Apache-2.0 # # Copyright (c) 2018 The Stdlib 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 # # ...
class ArgumentsTo(object): KEY = '' def __init__(self, args): self.args = args def build(self): raise NotImplementedError @property def database_name(self): return self.args['database'].name def get_database_arg(self): return "Database: {}".format(self.databas...
#!/usr/bin/env python # -*- coding: utf-8 -*- import __init__ import numpy as np from scipy.weave import inline from sklearn.ensemble import RandomForestClassifier import cpLib.concept as cp import utils.skUtils as sku # PROJECTION def projCosSim(c1, c2): v1 = c1.vect v2 = c2.vect dimCount = len(v1) ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'CaronaModel.date' db.delete_column(u'caronasbrasil_caronamodel', 'date') # Adding...
from layout import datatypes from . import root class VerticalLM(root.GroupLayoutManager): """ Keeps a set of elements above one another. We can control how they are distributed vertically, as well as their horizontal alignment. """ #: Align the elements so they are bunched at the top of the ...
# Copyright 2016 Cloudbase Solutions Srl # All Rights Reserved. from oslo_log import log as logging from coriolis import api from coriolis.api.v1 import diagnostics from coriolis.api.v1 import endpoint_actions from coriolis.api.v1 import endpoint_destination_minion_pool_options from coriolis.api.v1 import endpoint_de...
#Copyright ReportLab Europe Ltd. 2000-2016 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/widgets/signsandsymbols.py # signsandsymbols.py # A collection of new widgets # author: John Precedo (johnp@reportlab.com) __version__...
#-*- coding: utf-8 -*- from PyQt4.QtGui import * from PyQt4.QtCore import * from PyQt4 import uic import matplotlib matplotlib.rcdefaults() import matplotlib.pyplot as plt from matplotlib.figure import Figure from matplotlib.backends.backend_qt4agg import ( FigureCanvasQTAgg as FigureCanvas, NavigationToolba...
"""Support for Amcrest IP cameras.""" import asyncio from datetime import timedelta import logging from urllib3.exceptions import HTTPError from amcrest import AmcrestError import voluptuous as vol from homeassistant.components.camera import ( Camera, CAMERA_SERVICE_SCHEMA, SUPPORT_ON_OFF, SUPPORT_STREAM) from ho...
# -*- coding: utf-8 -*- import os import sys import transaction from datetime import datetime from sqlalchemy import engine_from_config from pyramid.paster import ( get_appsettings, setup_logging, ) from pyramid.scripts.common import parse_vars from ..models import ( DBSession, Setting, Te...
# Copyright (c) 2013 Red Hat, 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 wri...
""" The MIT License (MIT) Copyright (c) 2015 Kyle Hollins Wray, University of Massachusetts 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 ...
# Copyright (c) 2013 Peter Rowlands from __future__ import absolute_import from flask.ext.security import UserMixin, RoleMixin from . import db class Conference(db.Model): """A college football conference""" id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String(255), unique=True) ...
#!/usr/bin/env python3 # based on example from https://github.com/PagerDuty/API_Python_Examples/tree/master/EVENTS_API_v2 import json import requests import os import sys ROUTING_KEY = os.environ['PAGERDUTY_SERVICE_KEY'] INCIDENT_KEY = sys.argv[1] def resolve_incident(): # Triggers a PagerDuty incident without...
# -*- coding: utf-8 -*- # Copyright (c) 2015 by intelligenia <info@intelligenia.es> # # The MIT License (MIT) # # Copyright (c) 2016 intelligenia soluciones informáticas # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"...
# encoding: utf-8 # # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # # THIS THREADING MODULE IS PERMEATED BY THE ple...
#!/usr/bin/env python # Original Author: Marco Rovere # Created: Tue Feb 9 10:06:02 CEST 2010 # Last Updated: Thu Mar 26 16:04:30 CET 2020 import re import sys, os import sqlite3 import FWCore.ParameterSet.Config as cms import FWCore.ParameterSet import locale import argparse locale.setlocale(locale...
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # # qooxdoo - the new era of web development # # http://qooxdoo.org # # Copyright: # 2010-2010 1&1 Internet AG, Germany, http://www.1und1.de # # License: # LGPL: http://www.gnu.org/li...
# -*- coding: utf-8 -*- import simplejson from django.http import HttpResponse, HttpResponseNotAllowed, HttpResponseRedirect from django.template import RequestContext from django.shortcuts import get_object_or_404 from django.conf import settings from django.template.loader import get_template from django.template.l...
from __future__ import absolute_import from sqlalchemy.exc import IntegrityError, DataError from datetime import datetime, timedelta from celery import Celery from celery.utils.log import get_task_logger from flask import current_app as app from ..app import create_app logger = get_task_logger('fquest') if not a...
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
# old16 is to preserve the code that was adding one element to all the # radial arrays in adhoc.py and cyleq.py. # Generic cylindrical equilibrium solutions def zfunc(rho, bz, bq, lam, press): return -lam * bq - press / (bz**2 + bq**2) * bz def qfunc(rho, bz, bq, lam, press): if rho == 0.0: return (...
''' Reference: https://github.com/openai/imitation I follow the architecture from the official repository ''' import tensorflow as tf import numpy as np from baselines.common.mpi_running_mean_std import RunningMeanStd from baselines.common import tf_util as U def logsigmoid(a): '''Equivalent to tf.log(tf.sigmoid(...
# Import packages import theano, theano.tensor as T import numpy as np # Import modules from model_data import noteStateSingleToInputForm # Main class class OutputFormToInputFormOp(theano.Op): # Properties attribute __props__ = () def make_node(self, state, time): state = T.as_tensor_variable(sta...
""" 链接:https://www.nowcoder.com/questionTerminal/0385945b7d834a99bc0010e67f892e38 来源:牛客网 给定一个 n 行 m 列的地牢,其中 '.' 表示可以通行的位置,'X' 表示不可通行的障碍,牛牛从 (x0 , y0 ) 位置出发,遍历这个地牢,和一般的游戏所不同的是,他每一步只能按照一些指定的步长遍历地牢,要求每一步都不可以超过地牢的边界,也不能到达障碍上。地牢的出口可能在任意某个可以通行的位置上。牛牛想知道最坏情况下,他需要多少步才可以离开这个地牢。 输入描述: 每个输入包含 1 个测试用例。每个测试用例的第一行包含两个整数 n 和 m(1 <= ...
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals try: from urllib.parse import urlparse except ImportError: from urlparse import urlparse import tempfile from boto.s3.connection import S3Connection def make_s3_connection(aws_access_key_id=None, aws_secr...
""" One server connects to a deployed forwarder One legacy client connects to the server One new client connects to the server A few messages are exchanged """ #pragma repy restrictions.normal include NatForwardingShim.repy include NATLayer_rpc.repy def response(remote_ip,remote_port,sock,th,listenhandle): try...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 OpenStack 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 requ...
import numpy as np import pytest from pandas.core.dtypes.dtypes import ExtensionDtype import pandas as pd from pandas import ( DataFrame, Timestamp, ) import pandas._testing as tm from pandas.core.arrays import ExtensionArray class DummyDtype(ExtensionDtype): type = int def __init__(self, numeric):...
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
import tensorflow as tf from tensorflow.contrib.learn import LinearRegressor from tensorflow.contrib import layers from tensorflow.contrib.learn.python.learn.utils import input_fn_utils tf.logging.set_verbosity(tf.logging.INFO) import pandas as pd FEATURES = ["ttt30", "all", "MEP", "triaged", "PRIO3", "PRIO4"] pdfra...
#!/home/ubuntu/anaconda2/bin/python # MIT License # Copyright (c) 2016 Druce Vertes drucev@gmail.com # 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 ...
import hashlib import re from regparser.tree import struct from regparser.tree.depth import markers as mtypes from regparser.search import segments p_levels = [list(mtypes.lower), list(mtypes.ints), list(mtypes.roman), list(mtypes.upper), list(mtypes.em_ints), list(mtypes.em_roman)] def p_level_of(mark...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Canada - Accounting', 'version': '1.0', 'author': 'Savoir-faire Linux', 'website': 'https://www.savoirfairelinux.com', 'category': 'Localization/Account Charts', 'description': """ This...
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup setup( name="ctypeslib2", version="2.3.2", description="ctypeslib2 - FFI toolkit, relies on clang", long_description=open("README.md").read(), long_description_content_type="text/markdown", author="Loic Jaquemet", a...
#-*- coding: utf-8 -*- from django import forms from models import Link from django.contrib.auth import get_user_model, authenticate from django.utils.translation import ugettext as _ class UserCreationForm(forms.Form): """ UserForm - Form to create a new user """ error_messages = { 'password_m...
class Symbol(object): def __init__(self, value, pre=None, succ=None): self.value = value self.pre = pre self.succ = succ class Solution: # @param {string} s # @return {integer} def calculate(self, s): s = s.replace(" ", "") head = Symbol(None) current = h...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This is very different to AboutModules in Ruby Koans # Our AboutMultipleInheritance class is a little more comparable # from runner.koan import * from another_local_module import * from local_module_with_all_defined import * class AboutModules(Koan): def test_i...
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import print_function, absolute_import, unicode_literals import json import logging import os from osbs.build.manipulate imp...
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, fields class mailser...
# -*- coding: utf-8 -*- # # sphinx test documentation build configuration file, created by # sphinx-quickstart on Sat May 9 20:23:49 2015. # # 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 # autogenerated file. #...
#!/usr/bin/env python # _*_ coding: utf-8_*_ # # Copyright 2016 7x24hs.com # thomas@7x24hs.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...
""" This file is part of XDEMO Copyright(c) <Florian Lier> https://github.com/warp1337/xdemo This file may be licensed under the terms of the GNU Lesser General Public License Version 3 (the ``LGPL''), or (at your option) any later version. Software distributed under the License is distributed on an ``AS IS'' basis...
# # Utilities to handle timestamps / durations from/to integers and strings # # datetime.{datetime,timedelta} are powerful tools, but these objects are not # natively marshalled over xmlrpc # import time, calendar import datetime from PLC.Faults import * from PLC.Parameter import Parameter, Mixed # a dummy class mos...
#!/usr/bin/env python #------------------------------------------------------------------------------ # # Extract O&M-EOP metadata document. # # Project: EO Metadata Handling # Authors: Martin Paces <martin.paces@eox.at> # #------------------------------------------------------------------------------- # Copyright (C...
from contexting_lib.runtime_context import ContextDependentFunction, RuntimeContext def default(foo): runtime_context = RuntimeContext() def_p_ctx = runtime_context.default_process_context def_t_ctx = runtime_context.default_thread_context runtime_context._contexts_to_foo_mapping \ [foo.__qualn...
# Copyright (C) 2013 Intel Corporation # # Released under the MIT license (see COPYING.MIT) # This module provides a class for starting qemu images using runqemu. # It's used by testimage.bbclass. import subprocess import os import sys import time import signal import re import socket import select import errno impor...
#!/usr/bin/env python2 # # Copyright (c) 2016 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementati...
import datetime import threading import sickchill.oldbeard.search_queue from sickchill import logger, settings from sickchill.helper.exceptions import MultipleShowObjectsException from sickchill.show.Show import Show from . import common, db, network_timezones class DailySearcher(object): # pylint:disable=too-few-...
# ELBE - Debian Based Embedded Rootfilesystem Builder # Copyright (c) 2015-2017 Manuel Traut <manut@linutronix.de> # Copyright (c) 2015-2018 Torben Hohn <torben.hohn@linutronix.de> # Copyright (c) 2015 Silvio Fricke <silvio.fricke@gmail.com> # Copyright (c) 2017 Philipp Arras <philipp.arras@linutronix.de> # Copyright (...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Copyright (c) 2017-2018 Alan Frost, All rights reserved. Implementation of user forms """ from flask_wtf import FlaskForm from wtforms import (BooleanField, HiddenField, PasswordField, StringField, SubmitField, FileField, ValidationError) from wtform...
#!/usr/bin/env python # # Author: Rui Yan <yan49@purdue.edu>, Sep 2015 # Copyright (c) 2012 Purdue University # # This software is issued under a joint BSD/GNU license. You may use the # source code in this file under either license. However, note that the # complete EMAN2 and SPARX software packages have some GPL dep...
# coding=utf-8 import datetime import httplib import json import os import unittest from github3 import login import responses from cumulusci.tasks.release_notes.generator import BaseReleaseNotesGenerator from cumulusci.tasks.release_notes.generator import StaticReleaseNotesGenerator from cumulusci.tasks.release_not...
# coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #...
#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine (xbmcmegapack@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 Softwar...
from __future__ import print_function """ This module produces a stream of random variables from a moving average model. The first command line argument is the number of samples negative means infinite. The second argument is the window size. The moving average is uniform over the window. The third argument is the fi...
# Copyright (c) 2015 Mirantis, Inc. # 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...
''' Created on 25 juil. 2014 @author: Nevrose ''' import csv class weightEvaluator(): def __init__(self): self.datas={} def prepareStructure(self,problemBank): for problemName in problemBank.dicPbm.iterkeys(): problem=problemBank.dicPbm[problemName] for indexInfo in ra...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distrib...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
#!/usr/bin/env python from __future__ import division import os import argparse import console import sys """ Parsing XML BLAST output for tab delimited file for easier parsing with samples, hit descripttions, hit identities and hit aligment length values. Input is taken from STDIN, use it in pipe command. """ pa...
# Copyright (c) 2012-2020, Intel Corporation # Author: Andi Kleen # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This program is distributed in the hope it will...
# From python import datetime import pytz from decimal import Decimal, InvalidOperation import re # From Django from django.core.mail import EmailMessage from django.core.mail import get_connection from django.utils import timezone from django import forms from django.core.urlresolvers import reverse, reverse_lazy fr...
''' Created on May 26, 2015 @author: jhkwakkel ''' import matplotlib.pyplot as plt import ema_workbench.analysis.cart as cart from ema_workbench import ema_logging, load_results ema_logging.log_to_stderr(level=ema_logging.INFO) def classify(data): # get the output for deceased population result = data['dec...
""" http://adventofcode.com/day/10 --- Day 11: Corporate Policy --- Santa's previous password expired, and he needs help choosing a new one. To help him remember his new password after the old one expires, Santa has devised a method of coming up with a password based on the previous one. Corporate policy dictates th...
# -*- coding: utf-8 -*- import scrapy from BiggerPockets.items import postItem, userItem from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta import json class ForumSpider(scrapy.Spider): name = "forum" allowed_domains = ["https://www.biggerpockets.com/"] # Starting fro...
#!/usr/bin/python3 """ Given a binary tree, return the vertical order traversal of its nodes values. For each node at position (X, Y), its left and right children respectively will be at positions (X-1, Y-1) and (X+1, Y-1). Running a vertical line from X = -infinity to X = +infinity, whenever the vertical line touche...
# -*- coding: utf-8 -*- # Django settings for social pinax project. import os.path import posixpath import pinax PINAX_ROOT = os.path.abspath(os.path.dirname(pinax.__file__)) PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) # tells Pinax to use the default theme PINAX_THEME = "default" DEBUG =...
MainForm.setObjectName(_fromUtf8("MainForm")) MainForm.resize(281, 120) MainWindow.browseButton = QtGui.QPushButton(MainForm) MainWindow.browseButton.setGeometry(QtCore.QRect(150, 30, 51, 21)) MainWindow.browseButton.setFlat(False) MainWindow.browseButton.setObjectName(_fromUtf8("browseButton"))...
# -*- coding: utf-8 -*- from django.conf import settings from django.core.urlresolvers import resolve, Resolver404, reverse from django.http import Http404 from django.shortcuts import render from django.template.response import TemplateResponse from cms import __version__ from cms.cache.page import set_page_cache fro...
# Copyright 2015 - Raphaël Rigo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. # # This program is distributed ...
try: import unittest2 as unittest except ImportError: import unittest import json import subprocess import os from nose_parameterized import parameterized, param def get_exec_path(): return os.path.abspath(os.path.dirname(os.path.realpath(__file__))) def lookup_dir_path(dirname, dir=get_exec_path()): ...
# -*- coding: utf-8 -*- import scrapy import json from scrapy.http.request import Request from crawler_scrapy.items import ComicItem, ChapterItem class NewComicSpider(scrapy.Spider): name = "new_comic" allowed_domains = ["v2.api.dmzj.com"] start_urls = ['http://v2.api.dmzj.com/latest/100/%d.json?channel=i...
""" pixelStats.py Compute a multi-epoch (multi-day) statistics for each lat/lon pixel read from daily Level-3 grids. Also do statistics roll-ups from daily to monthly, monthly to seasonal, seasonal to yearly, yearly to multi-year, and multi-year to total N-year period. Simple code to be run using Spark or Dpark. "...
# Copyright 2014, 2015 The ODL development group # # This file is part of ODL. # # ODL 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. ...
#-*- coding: utf-8 -*- from django.db import models from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from django.conf import settings from django.utils import timezone from django.db import IntegrityError from spirit.signals.comment import comment_posted from spiri...
# This file is part of the Enkel web programming library. # # Copyright (C) 2007 Espen Angell Kristiansen (espen@wsgi.net) # # 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...
#!/usr/bin/env python3 ### BEGIN INIT INFO # Provides: wurstminebot # Required-Start: $remote_fs $network # Required-Stop: $remote_fs $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: starts the wurstminebot Minecraft/IRC bot # Description: starts wurstminebot ...
# -*- coding: utf-8 -*- # # Cipher/DES.py : DES # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # n...
""" Module for kraken methods """ from razer_daemon.dbus_services import endpoint @endpoint('razer.device.lighting.kraken', 'getCurrentEffect', out_sig='y') def get_current_effect_kraken(self): """ Get the device's current effect :return: The internal bitfield like 05 (in hex) :rtype: int """ ...
# Copyright (C) 2012,2013,2015,2016 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the term...
import math, sys from SPARQLWrapper import SPARQLWrapper, JSON from queries.keywordSectionCount import keywordSectionCount from queries.createKeywordSectionQuery import createKeywordSectionQuery # get the year to query from the user year = input("Enter year to query: ") year = str(year) # there are too many results t...
import os import copy from operator import attrgetter try: from lxml import etree except ImportError: import xml.etree.ElementTree as etree class Content(object): type = None def __init__(self): self.id = None def __eq__(self, other): return self.__dict__ == other.__dict__ cla...
import os import uuid from osipkd.tools import row2dict, xls_reader from datetime import datetime from sqlalchemy import not_, func from sqlalchemy.orm import aliased from pyramid.view import (view_config,) from pyramid.httpexceptions import ( HTTPFound, ) import colander from deform import (Form, widget, Vali...
#!/usr/bin/env python ''' Lucas-Kanade tracker ==================== Lucas-Kanade algorithm to track cars on a highway and save output lk_track2.py [<video_source>] ESC - exit ''' from __future__ import print_function import numpy as np import cv2 #import video from common import anorm2, draw_str from time import...
__author__ = 'bptripp' import numpy as np import matplotlib matplotlib.rcParams['xtick.labelsize'] = 14 matplotlib.rcParams['ytick.labelsize'] = 14 import matplotlib.pyplot as plt from cnn_stimuli import get_image_file_list from alexnet import preprocess, load_net, load_vgg def get_clutter_responses(remove_level): ...
''' Module settings ''' class Settings(object): BASE_URL = 'eservices.mas.gov.sg/api/action/datastore/search.json?resource_id=%s' PROTOCOL = "https" INTEREST_RATES_DOMESTIC_WEEKLY = '9a51d255-fec1-4aca-9818-b7a47490243c' INTEREST_RATES_DOMESTIC_MONTHLY = 'b5adb5c2-4604-49f3-b924-b69691252380' IN...
""" Copyright 2018 Oliver Smith This file is part of pmbootstrap. pmbootstrap 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. pmbootstrap ...
# ------------------------------ # Quick script to add insitutions and # affiliate them with dataverse installations # # Only deletes redundant institutions to refresh their affiliation # ------------------------------ import os, sys from os.path import abspath, isdir, realpath, isfile proj_paths = [abspath('../'), ab...
import os import distutils from setuptools import setup, Extension, Command from distutils.command import build as build_module from distutils.command.install import install BINUTILS_VERSION = "binutils-2.26" module = Extension( name = "bfdpie._bfdpie", sources = ["bfdpie.c"], # Include dir is our own binu...
from django.contrib.staticfiles.templatetags.staticfiles import static from django.db import models from django.db.models.deletion import PROTECT from django_extensions.db.fields import AutoSlugField class Workshop(models.Model): event = models.ForeignKey('events.Event', on_delete=PROTECT, related_name='workshops...
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # Copyright (C) Zing contributors. # # This file is a part of the Zing project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from django...
''' Version: MRT v3.0 Type: Library Location: C:\MRT3.0\module Author: Chintan Patel Email: chintanlike@gmail.com ''' import math import datetime as dt #import numpy as np import module.qsdateutil as qsdateutil from math import sqrt import pandas as pd from copy import deepcopy import matplotlib.pyp...
"""Defining instruction set architectures.""" from __future__ import absolute_import from collections import OrderedDict from .predicates import And, TypePredicate from .registers import RegClass, Register, Stack from .ast import Apply from .types import ValueType from .instructions import InstructionGroup # The typin...
""" setuptools ---------- Helper functions for AMICI core and module package preparation """ import os import sys import shlex import subprocess import shutil from distutils import log from .swig import find_swig, get_swig_version try: import pkgconfig # optional # pkgconfig python module might be installe...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import math from fairseq import metrics, utils from fairseq.criterions import register_criterion from .label_smoothed_cross_entropy import L...
#!/usr/bin/env python # # Copyright 2014 Google Inc. 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...
# Copyright 2016 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
# Steganography Cypher Program # Made by AnthonyCodes # Source Code: https://github.com/anthonycodes/Python-Scripts/tree/master/scp/ # Imports import config as conf import api as appapi from sys import argv, exit # Variables unsecure = conf.unsecure # Functions def getstring(): try: arg = argv[1] ex...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # 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...