src
stringlengths
721
1.04M
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2006, Mathieu Fenniak # 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 abov...
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright 2015-2017 Nervana Systems 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 #...
import numpy as np from NearestNeighbor import * #constant for identifying one of the labels in the data for transformation into something useful later, the data used later on may only contain exactly two different labels LABEL_IDENTIFIER = 's004' #read the data to a matrix raw_data = np.loadtxt(open("DSL-StrongPassw...
# -*- coding: utf-8 -*- # See LICENSE file for copyright and license details import textwrap from misery import ( ast, datatype, ) def func_signature_to_mangled_name(func_name, func_signature): out = '' out += func_name for param in func_signature.param_list: out += '_' out += pa...
import requests import pebbles.utils class PBClient(object): def __init__(self, token, api_base_url, ssl_verify=True): self.token = token self.api_base_url = api_base_url self.ssl_verify = ssl_verify self.auth = pebbles.utils.b64encode_string('%s:%s' % (token, '')).replace('\n', ''...
#!/usr/bin/env python # # Navigator.py # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY;...
import argparse, sys, functions def fullBackup(dictionary): del dictionary['basedir'] del dictionary['increment'] del dictionary['full'] command_line = functions.getCommandLine(dictionary) functions.dump(command_line, '') if __name__ == '__main__': parser = argparse.ArgumentParser(descript...
#!/usr/bin/env python # Copyright 2019 The Vitess 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 applica...
#!/usr/bin/python # -*- coding: utf-8 -*- # # 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 require...
import re from .forms import FilterForm from email.utils import parsedate_tz from filterss import app from flask import request from textwrap import wrap from urllib.parse import urlencode from urllib.request import Request, urlopen from werkzeug.local import LocalProxy from xml.dom.minidom import parse def set_filte...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
#Display library for the MusicDownloader program #Has text boxes and display boxes and what have you import tkinter as tk from tkinter import ttk root = None #Global root (only supports one window) class MainBox(tk.Tk): def __init__(self, title = "Window", *args, **kwargs): global root root = self #Set glo...
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read().replace('.. :changelog:', ...
from TsplibParser import parser as tspparser from ArgParser import parser as argparser from VRPCenter import VRPCenter from TspPainter import tspPainter import logging # construct the logger logger = logging.getLogger("logger") logger.setLevel(logging.INFO) logFormatter = logging.Formatter("%(asctime)s [%(threadName)s...
import random # # Pathfinding class, avoids other objects # class Path(object): # Create a new Path def __init__(self, world, actor, src, dest): self.path = [] self.actor = actor self.world = world self.maxG = self.world.grid_density - 1 self.setSource(src) self.setDestination(dest) self.exclusions = {...
# -*- coding: utf-8 -*- import re import itertools from typing import Dict from typing import List from typing import Optional RE_SVAR = re.compile(r'(\$(?:\$|[0-9]+))') RE_PARSE = re.compile(r'(\s+|"(?:[^"]|"")*")') class BasicLinePattern: """ Defines a pattern for a line, like 'push $1' being $1 a patte...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserve. # # 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...
# Copyright (c) 2016-2017 Adobe Inc. 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, modif...
# -*- coding: utf-8 -*- import os import win32com.client as win32 """ # ------------------------------------------------------------------------- # SIMULATION-BASED OPTIMIZATION OF A SINGLE CONVENTIONAL DISTILLATION # COLUMN USING THE PARTICLE SWARM OPTIMIZATION ALGORITHM #--------------------------------...
# ################################################### # Copyright (C) 2008-2017 The Unknown Horizons Team # team@unknown-horizons.org # This file is part of Unknown Horizons. # # Unknown Horizons is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2011, The Linux Foundation. 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 abo...
# -*- coding: utf-8 -*- import unittest from nose.plugins.skip import SkipTest try: from urllib3.contrib.pyopenssl import (inject_into_urllib3, extract_from_urllib3) except ImportError as e: raise SkipTest('Could not import PyOpenSSL: %r' % e) from mock import patch...
import os.path from zam.protein import Protein from zam.sequence import SeqToAA1 DEFAULT_PDB_DIR = os.path.expanduser("~/Dropbox/11_28_2011/pdb") def create_zam_protein_from_path(file_path): """docstring for create_zam_protein""" p = Protein(file_path) new_zam_protein = ZamProtein(p) return new_zam_pr...
from pyVmomi import vim from lib.modules import BaseCommands from lib.tools import normalize_memory from lib.tools.argparser import args from lib.exceptions import VmCLIException from flavors import load_vm_flavor class CloneCommands(BaseCommands): """clone specific VMware objects, without any further configurat...
from Products.CMFDefault.Document import Document from plone.behavior.interfaces import IBehavior from plone.behavior.interfaces import IBehaviorAssignable from plone.directives.form import IFormFieldProvider from tn.plonehtmlimagecache import behaviors from tn.plonehtmlimagecache import interfaces from tn.plonehtmlima...
from abc import ABCMeta, abstractmethod from util import statsUtil class IConvStats(metaclass=ABCMeta): STATS_NAME_BASICLENGTH = 'basicLengthStats' STATS_NAME_LEXICAL = 'lexicalStats' STATS_NAME_WORDCOUNT = 'wordCountStats' STATS_NAME_EMOTICONCOUNT = 'emoticonCountStats' STATS_NAME_EMOTICONS = 'em...
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test longpolling with getblocktemplate.""" from decimal import Decimal import random import threading ...
import os import web import unittest import tempfile from lxml import etree case = [ "/count?op={}&value1=1&value2=1", "/count?op={}&value1=52&value2=7", "/count?op={}&value1=100.5&value2=33.1", "/count?op={}", "/count?op={}&value1=1", "/count?op={}&value2=10", "/count?op={}&value1=&value2=10", "/count?op={}&value1=kk...
import requests import json from bs4 import BeautifulSoup from collections import OrderedDict class tableFramer: def __init__(self, url): self.url = url self.response = requests.get(url, headers = {'User-Agent': 'Mozilla/5.0'}) def __call__(self): souped = BeautifulSoup(self.response...
from __future__ import print_function import warnings import numpy as np from six import next from six.moves import xrange from shapely.geometry import Polygon def plot_polygon(ax, poly, facecolor='red', edgecolor='black', alpha=0.5, linewidth=1.0, **kwargs): """ Plot a single Polygon geometry """ from desc...
from FCM.Class_File_Manager import FileManager from FCM.Class_SemiSupervisedFCM import SemiSupervisedFCM import numpy from FCM.Class_FCM import FuzzyCMeans from FCM.Class_ValidityMeasures import ValidityMeasures from numpy import zeros from FCM.Class_DataManager import DataManager from shutil import copyfile im...
from dal import autocomplete from teryt_tree.models import JednostkaAdministracyjna class VoivodeshipAutocomplete(autocomplete.Select2QuerySetView): def get_queryset(self): qs = JednostkaAdministracyjna.objects.voivodeship().all() if self.q: qs = qs.filter(name__istartswith=self.q) ...
import pika import logging import sys __mqtt_host = '172.26.50.120' __mqtt_port = 1883 def printit(ch, method, properties, body): """ prints the body message. It's the default callback method :param ch: keep null :param method: keep null :param properties: keep null :param body: the message ...
import pytest import pandas as pd import numpy as np import logging from io import StringIO from joblib import delayed, Parallel @pytest.fixture def input_data(): pass @pytest.fixture def expected_result(): pass def merge_chip_and_input(windows, nb_cpu): """Merge lists of chromosome bin df chromosom...
# Copyright 2012 OpenStack Foundation # # 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...
#!/usr/bin/env python """ 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");...
#!/usr/bin/env python from Cocoa import * from InputMethodKit import * from itertools import takewhile import bogo class BogoController(IMKInputController): def __init__(self): # Cocoa doesn't call this method at all self.reset() self.initialized = True def reset(self): self.composing_string = "" self.r...
# encoding: 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): # Removing M2M table for field sites on 'Account' db.delete_table('main_account_sites') # Adding ...
from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django import forms from django.utils.translation import ugettext_lazy as _ from .models import User class UserCreationForm(forms.ModelForm): """A form for creating new users. Includes all the required fields, plus a repea...
# coding: utf-8 from __future__ import unicode_literals from .prosiebensat1 import ProSiebenSat1BaseIE from ..utils import ( unified_strdate, parse_duration, compat_str, ) class Puls4IE(ProSiebenSat1BaseIE): _VALID_URL = r'https?://(?:www\.)?puls4\.com/(?P<id>[^?#&]+)' _TESTS = [{ 'url': 'http://www.puls4.com...
""" The following operators are understood: ~q Request ~s Response Headers: Patterns are matched against "name: value" strings. Field names are all-lowercase. ~a Asset content-type in response. Asset content types are: ...
def get_n_digits(value, base): n = 0 if value == 0: return 1 else: while value > 0: value //= base n += 1 return n def literal_int_to_string(value, base, width = 0, pad = '0', prefix = True): rtn = "" if base == 2 and prefix: rtn = "0b" elif base == 8 and prefix: rtn = "0" elif base == 16 and pr...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 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...
# -*- coding: utf-8 -*- """ This module implements a class that implements a latex command. This can be used directly or it can be inherited to make an easier interface to it. .. :copyright: (c) 2014 by Jelte Fennema. :license: MIT, see License for more details. """ from .latex_object import LatexObject from .....
# -*- coding: utf-8 -*- """ /*************************************************************************** Constraint Checker A QGIS plugin Generate reports of constraints (e.g. planning constraints) applicable to an area of interest. ------------------- ...
# Copyright 2013 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
import warnings from django_geocoder.wrapper import get_cached class GeoMixin(object): # Overridable by subclasses geocoded_by = 'address' def need_geocoding(self): """ Returns True if any of the required address components is missing """ need_geocoding = False fo...
# Copyright 2019 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
# -*- 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...
import numpy as np from sklearn.base import BaseEstimator from sklearn.linear_model import LogisticRegression, Ridge from sklearn.utils.extmath import safe_sparse_dot from sklearn.utils.validation import check_random_state from pairwise import pairwise_transform, flip_pairs def _nearest_sorted(scores, to_find, k=10...
# Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import pytest from pants_test.backend.jvm.tasks.jvm_compile.rsc.rsc_compile_integration_base import ( RscCompileIntegrationBase, ensure_compile_rsc_execution_strategy, ) class R...
import subprocess import glob import os import warnings from astropy.table import Table, join, Column import numpy as np from astropy.utils.data import get_pkg_data_filename import sys def updateLogs(output='ObservationLog.csv',release=None): if release is None: command = "wget --no-check-certificate --out...
# Copyright 2005 Duke University # Copyright (C) 2012-2016 Red Hat, Inc. # # 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 versio...
"""Raykar et al. (2010) EM crowd learning algorithm. Matthew Alger The Australian National University 2016 """ import logging import time import numpy import scipy.optimize import sklearn.linear_model from crowdastro.crowd.util import majority_vote, logistic_regression EPS = 1E-8 class RaykarClassifier(object): ...
# -*- coding: utf-8 -*- __author__ = 'zappyk' import csv #CZ#import xlsxwriter from tkinter import * from tkinter import ttk from tkinter.filedialog import askopenfilename from tkinter.messagebox import showinfo, showerror, askyesno from collections import defaultdict from lib_zappyk ...
# *-* coding: UTF-8 *-* """ Created on June 10, 2012 @author: peta15 """ __author__ = 'coto' from datetime import datetime from wtforms import fields from wtforms import Form from wtforms import validators, ValidationError from webapp2_extras.i18n import lazy_gettext as _ from webapp2_extras.i18n import ngettext, gett...
import build_response as br # ====================================================================================================================== # Skill Behavior: Welcome Response # ====================================================================================================================== class Welcome...
# -*- coding: utf-8 -*- ''' This module is to create model of Course ''' from openerp import models, fields, api, _ class Course(models.Model): ''' This class create model of Course ''' _name = 'openacademy.course' # model odoo course name = fields.Char(string='Title', required=True) # Fileds res...
from django import template from django.utils.safestring import mark_safe from core.models import User import re register = template.Library() @register.filter def userlink(user): return mark_safe("<a href='/user/%s'>%s</a>" % (user.username, user.username)) @register.filter def toArray(object): return [obj...
# Copyright (C) 2016 William Hicks # # This file is part of Writing3D. # # Writing3D 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. # ...
"""Django management command to force certificate generation""" from optparse import make_option from django.core.management.base import BaseCommand, CommandError from pdfgen.certificate import CertificatePDF from xmodule.modulestore import Location #from resource import setrlimit, RLIMIT_NOFILE def check_course_id(c...
#!/usr/bin/python # -*- coding: utf-8 -*- '''Runs a series of tests against the database to see if any of the following unidentified fragments are in there...''' from music21 import metadata from music21 import interval from music21 import note from music21 import stream from music21.alpha.trecento import cadencebo...
from warnings import warn from mizani.palettes import manual_pal from ..doctools import document from ..exceptions import PlotnineError, PlotnineWarning from ..utils import alias from .scale import scale_discrete, scale_continuous linetypes = ['solid', 'dashed', 'dashdot', 'dotted'] @document class scale_linetype...
input = """ colored(2,g) :- not diff_col(2,g). colored(2,y) :- not diff_col(2,y). colored(3,g) :- not diff_col(3,g). colored(3,y) :- not diff_col(3,y). diff_col(2,g) :- colored(2,y). diff_col(3,g) :- colored(3,y). diff_col(2,y) :- colored(2,g). diff_col(3,y) :- colored(3,g). no_stable :- colored(2,2), color...
### ### this script assigns most voted class to corems ### import sys # 0. user defined variables gene2ClassFile='/Volumes/omics4tb/alomana/projects/TLR/data/annotation/si.table.1.si.ribosomal.protein.index.information.csv' geneDictionaryFile='/Volumes/omics4tb/alomana/projects/TLR/data/annotation/si.table.1.gene.dic...
# -* coding: utf-8 -*- import json import numpy as np from handlers.basehandler import BaseHandler, ExceptionHandler from core.experiment import Experiment global numpy global random class Simulate(BaseHandler): def get(self, exp_id): """ Simulate your experiment based on four scripts, which create a cl...
#!/usr/bin/python3 """Simple CUrl porting for Python3 """ import urllib.request, re import sys import argparse from urllib.parse import urlencode import gettext import locale def main(): """"main method""" language_set() parser = argparse.ArgumentParser() #setting possible arguments parser.add_argumen...
import threading import numpy import time from collections import defaultdict from functools import partial class PrimitiveManager(threading.Thread): """ Combines all :class:`~pypot.primitive.primitive.Primitive` orders and affect them to the real motors. At a predefined frequency, the manager g...
import os import inspect path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) f = open(path+os.sep+"__DEBUG__", "rb") __DEBUG__ = f.read(1)[0] f.close() if __DEBUG__: from common import * else: from rgine.common import * _logfmt = \ '''===================================================...
import datetime import logging import collections from .base import LitecordObject from .member import Member from ..snowflake import snowflake_time from ..utils import dt_to_json from ..enums import ChannelType log = logging.getLogger(__name__) BareGuild = collections.namedtuple('BareGuild', 'id') class Guild(Lit...
# -*- coding:utf-8 -*- from point import Point from side import Side class Triangle(object): """ Class representing a Triangle that is composed by three Point objects """ def __init__(self, u, v, w): if not all(isinstance(point, Point) for point in (u, v, w)): raise TypeError...
from __future__ import unicode_literals from ..routing import route_class from ..sessions import channel_session from ..auth import channel_session_user class BaseConsumer(object): """ Base class-based consumer class. Provides the mechanisms to be a direct routing object and a few other things. Class...
# Generated by Django 2.1.2 on 2018-12-01 20:06 import colorfield.fields from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Escalafon', ...
# -*- coding: utf-8 -*- from django.test import TestCase from util.session import DEFAULT_SESSION_NAME_PREFIX from util.session import get_or_generate_session_name class UntitledSessionNamesTests(TestCase): def test_get_first_session_name(self): existing_session_names = [] expected_name = DEFAULT_...
AIR = 'air' STONE ='stone' GRASS ='grass' DIRT ='dirt' COBBLESTONE ='cobblestone' PLANKS ='planks' SAPLING ='sapling' BEDROCK ='bedrock' FLOWING_WATER ='flowing_water' WATER ='water' FLOWING_LAVA ='flowing_lava' LAVA ='lava' SAND ='sand' GRAVEL ='gravel' GOLD_ORE ='gold_ore' IRON_ORE ='iron_ore' COAL_ORE ='coal_ore' LO...
import unittest import os import logging import numpy as np import numpy.testing from pycgtool.util import tuple_equivalent, extend_graph_chain, stat_moments, transpose_and_sample from pycgtool.util import dir_up, backup_file, sliding, r_squared, dist_with_pbc from pycgtool.util import SimpleEnum, FixedFormatUnpacker...
from typing import List import torch from torch import nn from src.refinenet.residual_conv_unit import ResidualConvUnit class AdaptiveConv(nn.Module): conv_list: nn.ModuleList rcus_list: nn.ModuleList out_channels: List[int] def __init__(self, in_channels_list: List[int], out_channels: int): ...
import os import wx from PIL import Image from vistas.core.graphics.overlay import BasicOverlayButton from vistas.core.paths import get_resources_directory from vistas.ui.events import CameraSelectModeEvent class GLSelectionControls(wx.EvtHandler): """ Event handler for initiating selection interaction """ ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
import traceback import io import greenlet import time import functools from . import abc from guv import compat _g_debug = False # if true, captures a stack trace for each timer when constructed, this is useful # for debugging leaking timers, to find out where the timer was set up compat.patch() @functools.total...
from django.db import models from pygments.lexers import get_all_lexers from django.core.urlresolvers import reverse LEXERS = [item for item in get_all_lexers() if item[1]] LANGUAGE_CHOICES = sorted([(item[1][0], item[0]) for item in LEXERS]) class Snippet(models.Model): create_date = models.DateTimeField('creat...
import os import sqlite3 from pathlib import Path from jinja2 import Template from roll import RollCommand from errors import * class SavedRollManager: """ Class for managing saved rolls. Attributes: db (str): URI of database used for connections """ TABLE = 'saved_rolls' """str: N...
#!/usr/bin/env python """ Show how the posterior gets updated as a set of coin tosses are generated for a biased coin. Assume a flat prior on the bias weighting and also a Gaussian prior. """ import matplotlib.pyplot as pl from scipy.stats import norm, kstest import numpy as np # set plot to render labels using late...
#!/usr/bin/python3 # -*- coding:utf-8 -*- import __future__ import parser import sys import matplotlib.pyplot as plt #plt.style.use('ggplot') import numpy as np import operator from collections import * caseSize = (8192, 8192) if parser.args.res: maxAvailableNode = parser.args.res else: maxAvailableNode = 8 ...
"""ASCII file: Load functions""" import array from olc.channel_time import ChannelTime from olc.cue import Cue from olc.define import MAX_CHANNELS, NB_UNIVERSES, App from olc.device import Device, Parameter, Template from olc.group import Group from olc.independent import Independent from olc.master import Master fro...
# # Copyright (C) 2003-2006 Rational Discovery LLC # # @@ All Rights Reserved @@ # This file is part of the RDKit. # The contents are covered by the terms of the BSD license # which is included in the file license.txt, found at the root # of the RDKit source tree. # """ unit testing code for Lipinski parameter ...
from datetime import datetime, timedelta from pytz import timezone import warnings import pandas as pd import pytest from numpy.testing import assert_allclose from conftest import requires_siphon, has_siphon, skip_windows pytestmark = pytest.mark.skipif(not has_siphon, reason='requires siphon') if has_siphon: ...
# PiTimer - Python Hardware Programming Education Project For Raspberry Pi # Copyright (C) 2015 Jason Birch # # 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 ...
#! /usr/bin/env python """ Methods to plot data defined on Landlab grids. Plotting functions ++++++++++++++++++ .. autosummary:: :toctree: generated/ ~landlab.plot.imshow.imshow_grid ~landlab.plot.imshow.imshow_grid_at_cell ~landlab.plot.imshow.imshow_grid_at_node """ import numpy as np import insp...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Manufacturing', 'version': '2.0', 'website': 'https://www.odoo.com/page/manufacturing', 'category': 'Manufacturing/Manufacturing', 'sequence': 16, 'summary': 'Manufacturing Orders & BO...
#pylint: disable=W0703,R0912,R0915,R0904,W0105 ''' Copyright 2014 eBay Software Foundation 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 req...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings import django.contrib.gis.db.models.fields class Migration(migrations.Migration): dependencies = [ ('auth', '0006_require_contenttypes_0002'), migrations.swap...
#!/usr/bin/env python # Copyright (c) 2013 Eugene Zhuk. # Use of this source code is governed by the MIT license that can be found # in the LICENSE file. """Configures AWS Auto Scaling. This script is intended to simplify the process of setting up AWS Auto Scaling to automatically manage system capacity based on aver...
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file import urwid import logging from twisted.internet import reactor, defer from settings import settings from buffers import BufferlistBu...
''' Test suite for weighted generalized canonical correlation analysis. Adrian Benton 8/8/2016 ''' import os import unittest import wgcca as WGCCA import numpy as np import scipy import scipy.linalg class TestWeightedGCCA(unittest.TestCase): def setUp(self): ### Generate sample data with 3 views ### self...
#! /usr/bin/python #Team: Route49 #Names: Cindy Wong, Sonia Parra #Date Modified: 11-12-2015 #Description: import time import picamera import numpy as np import cv2 import matplotlib.pyplot as plt #------------Take picture with pi camera-------------- cap = cv2.VideoCapture(0) ret, frame = cap.read() gray = cv2.cv...
from erukar.system.engine import Interaction from .Command import Command from .CommandResult import CommandResult class TargetedCommand(Command): def process_args(self): if not self.args: raise Exception('Cannot process args -- Command\'s args are undefined') if 'interaction' in self...
# -*- coding: utf-8 -*- import BaseHTTPServer import webbrowser from urlparse import urlparse, parse_qs from twython import Twython, TwythonError import config import application import output import sound import time logged = False verifier = None class handler(BaseHTTPServer.BaseHTTPRequestHandler): def do_GET...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './dlg_aproximacao.ui' # # Created: Tue Dec 6 11:23:22 2016 # by: PyQt4 UI code generator 4.11.2 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 exc...
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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; eith...