src
stringlengths
721
1.04M
import pymysql.cursors import csv # CSV file generator to upload in amazon machine learning with some statistics to use # in multiclass, binary or regression analisys def csvGenerator(league, now, cvs_file): connection = pymysql.connect(host='192.168.99.100', user='root', ...
# Django settings for server project. # A nice way of getting around the absolute path hardcoding import os SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { ...
# coding: utf-8 from functools import partial import sublime from sublime_plugin import WindowCommand, TextCommand from .util import noop from .cmd import GitCmd from .helpers import GitStatusHelper, GitBranchHelper, GitErrorHelper, GitLogHelper, GitRemoteHelper from .helpers import GitTagHelper GIT_BRANCH_EXISTS_M...
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest import os from ...workbook import Workbook from ..helperfunctions import _compare_xlsx_files class TestCompareXLSXFiles(unittest.TestC...
""" API to extract bits and pieces from CURL (command line utility) headers file. The headers can be obtained by calling: curl -D 'headers' 'url'. Currenlty supported formats are for protocols: HTTP, HTTPS. """ class Curlheaders: # response codes and headers container reponses = list() def __init__(self, heade...
"""Logic for reading list behavior across all properties.""" from django.conf import settings from django.core.cache import cache from elasticsearch import TransportError from elasticsearch_dsl import filter as es_filter from bulbs.content.filters import NegateQueryFilter, SponsoredBoost from bulbs.content.models imp...
# drivers.py - high-level functions for filtering SQLAlchemy queries # # Copyright 2011 Lincoln de Sousa <lincoln@comum.org>. # Copyright 2012, 2013, 2014, 2015, 2016 Jeffrey Finkelstein # <jeffrey.finkelstein@gmail.com> and contributors. # # This file is part of Flask-Restless. # # Flask-Restless is distribu...
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible 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) an...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'BugModel' db.create_table(u'bugform_bugmodel', ( ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import smbus import time import datetime import sys sys.path.append("/home/pi/HomeRpi") import commands import ConfigParser iniFile = ConfigParser.SafeConfigParser() iniFile.read('./config.ini') # influxDBサーバへ送信 url = iniFile.get('server', 'url') def influxUp(text) : ...
#!/usr/bin/env python # # Copyright 2016 the original author or 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 require...
from __future__ import print_function from __future__ import division import dsz import dsz.ui import ops.data ALIGN_LEFT = '<' ALIGN_CENTER = '_' ALIGN_RIGHT = '>' def pprint(data, header=None, dictorder=None, echocodes=None, align=None, print_handler=print): if ((data is None) or (len(data) == 0)): retu...
# Copyright 2019 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 agreed to in writing, so...
"""The WaveBlocks Project IOM plugin providing functions for handling linear combinations of general wavepackets. @author: R. Bourquin @copyright: Copyright (C) 2013, 2016 R. Bourquin @license: Modified BSD License """ import numpy as np def add_lincombwp(self, parameters, timeslots=None, lincombsize=None, blockid...
#!/usr/bin/env python from __future__ import print_function import os from config import lrs, activity_map from arbtt_record import ArbttRecord from tincan import ( RemoteLRS, Statement, Agent, Verb, Activity, ActivityDefinition, Extensions, Context, LanguageMap, ) def create...
import re import itertools import functools from enum import auto, Flag from jembatan.core.spandex import (Span, Spandex) from jembatan.core.af import process_default_view, AnalysisFunction from jembatan.typesys.chunking import NounChunk, Entity from jembatan.typesys.segmentation import (Document, Sentence, Token) fro...
# flask imports from flask.ext.pymongo import PyMongo from flask import Flask, request, render_template, abort, jsonify, redirect, url_for, session # base python imports import json import uuid import random from bson.json_util import dumps from datetime import datetime # EventsNear.me imports from event import * from ...
# -*- coding: utf-8 -*- from __future__ import with_statement import logging import time import json import Queue import argparse import os import ConfigParser from logging.handlers import RotatingFileHandler from random import randint from threading import Thread from datetime import datetime, timedelta from flask...
# Copyright 2020 The dm_control 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 applicable law or agreed to i...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of tofbot, a friendly IRC bot. # You may redistribute it under the Simplified BSD License. # If we meet some day, and you think this stuff is worth it, # you can buy us a beer in return. # # Copyright (c) 2011,2015 Etienne Millon <etienne.millon@gmail....
# 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 ...
# 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 # distributed under t...
# Django settings for forum project. import os.path import forum DEBUG = False TEMPLATE_DEBUG = False # for OpenID auth ugettext = lambda s: s LOGIN_URL = '/%s' % (ugettext('login/')) ADMINS = ( ('Yuming Cao', 'caogecym@gmail.com'), ) SEND_BROKEN_LINK_EMAILS = True MANAGERS = ADMINS DATABASES = { 'default'...
from __future__ import print_function from six.moves import zip from numpy import array, zeros, unique, searchsorted, arange, pi from pyNastran.bdf.dev_vectorized.cards.elements.property import Property #from pyNastran.bdf.field_writer_8 import set_blank_if_default from pyNastran.bdf.field_writer_8 import print_card...
# # jython examples for jas. # $Id$ # from java.lang import System from java.lang import Integer from jas import PolyRing, ZZ, QQ, GF, ZM # sparse polynomial powers #r = Ring( "Mod 1152921504606846883 (x,y,z) G" ); #r = Ring( "Rat(x,y,z) G" ); #r = Ring( "C(x,y,z) G" ); #r = Ring( "Z(x,y,z) L" ); r = PolyRing( ZZ()...
# Lowest Common Ancestor of a Binary Search Tree # https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(objec...
from suds.client import Client import suds import time import helplib as hl #be aware that you need a chemspider_token.txt in the directory for the app to work #the chemspider_token.txt should only contain the token (available online for free) class ChemicalObject(): def __init__(self, name = '', cas = '', inchi...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2015 Andhitia Rama. All rights reserved. # @author Andhitia Rama # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
# coding: utf8 import sublime from unittest import TestCase _ST3 = sublime.version() >= "3000" version = sublime.version() content_string = """Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitati...
import pygame, sys, math class Wall(pygame.sprite.Sprite): def __init__(self, pos=[0,0], size=None): pygame.sprite.Sprite.__init__(self, self.containers) self.image = pygame.image.load("rsc/wall/wall.png") if size: self.image = pygame.transform.scale(self.image, [size,size]) ...
''' Created on 12 Apr 2020 @author: Ronny Andersson (ronny@andersson.tk) @copyright: (c) 2020 Ronny Andersson @license: MIT Demo of how to iterate over an instance of the Audio class, for chunk-based processing. Typically the chunks have a size that is a power of two, for example 256, 1024 or 4096. In this example th...
#******************************************************************************** #* Dionaea #* - catches bugs - #* #* #* #* Copyright (C) 2015 Tan Kean Siong #* #* This program is free software; you can redistribute it and/or #* modify it under the terms of the...
# # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. # # 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; version 2 of the License. # # This program is distributed in th...
import sys import os from spec import eq_, skip, Spec, raises, ok_, trap from invoke.runner import Runner, run from invoke.exceptions import Failure from _utils import support def _run(returns=None, **kwargs): """ Create a Runner w/ retval reflecting ``returns`` & call ``run(**kwargs)``. """ # Set ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-11 00:54 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Produt...
# -*- coding: utf-8 -*- from __future__ import absolute_import import struct from ..thrift import TType from .exc import TProtocolException # VERSION_MASK = 0xffff0000 VERSION_MASK = -65536 # VERSION_1 = 0x80010000 VERSION_1 = -2147418112 TYPE_MASK = 0x000000ff def pack_i8(byte): return struct.pack("!b", byt...
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- from sys i...
#! /usr/bin/python # ****************************************************************************** # @file PTXML_client.py # @brief Example using PTXMLServer # # Copyright (C) 2014 # # @author Miguel Jimenez Lopez <klyone@ugr.es> # # ****************************************************************************** ...
# # Copyright (c) 2013-2018 Quarkslab. # This file is part of IRMA project. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License in the top-level directory # of this distribution and at: # # http:...
# 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 ...
#!/usr/bin/env python from __future__ import print_function import roslib import rospy try: import readline except ImportError: import pyreadline as readline # for Windows import sys import os import signal import argparse from moveit_commander import ( MoveGroupCommandInterpreter, MoveGroupInfoLev...
import logging from abc import ABCMeta, abstractmethod from c7n.utils import local_session from c7n_azure.session import Session class DeploymentUnit(metaclass=ABCMeta): log = logging.getLogger('custodian.azure.deployment_unit.DeploymentUnit') def __init__(self, client): self.type = "" ...
# -*- 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): # Adding field 'Challenge.done' db.add_column('progress_challenge', 'done', self.gf('d...
import re from urllib.parse import urljoin import requests from bs4 import BeautifulSoup from multiprocessing.managers import BaseManager ''' [分布式爬取解析工作端,可台机器分别运行] 简单主从模式的分布式爬虫,支持多节点管理 Ubuntu OSError: [Errno 98] Address already in use $ sudo netstat -tlnp|grep 8001 tcp 0 0 0.0.0.0:8001 0.0.0.0:* LISTEN 24314/...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: mcp/v1alpha1/resource.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflec...
#!/usr/bin/env python #Creates a seamless, rectangular, square, 2-byte signed integer representation #of the HGT input files. import sys import re if len(sys.argv)==1: print("Syntax: {0} <OUTPUT FILE> <DIMENSION> <SRTM1 FILE> [SRTM1 FILE] [SRTM1 FILE]".format(sys.argv[0])) print("SRTM1 files have dimensions 3601...
import configparser import pyodbc import sqlalchemy from os import getcwd # Read configuration file cfg = configparser.ConfigParser() try: cfg.read('weather.ini') except Exception as e: exit('Script could not be executed because a "weather.ini" config file could not be found.') cfg['FILES']['cwd'] = getcwd()...
# PyUI # Copyright (C) 2001-2002 Sean C. Riley # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope that it will be useful...
#!/usr/bin/env python ## Walk Root Directory and Return List or all Files in all Subdirs too def recursive_dirlist(rootdir): import os regex_CR2 = re.compile(r'.+?\.[CR2cr2]{3}') regex_jpg = re.compile(r'.+?\.[JPGjpg]{3}') regex_png = re.compile(r'.+?\.[pngPNG]{3}') walkedlist = [] for dirname,...
from setuptools import setup setup( name='django-badger', version='0.0.1', description='Django app for managing and awarding badgers', long_description=open('README.rst').read(), author='Leslie Michael Orchard', author_email='me@lmorchard.com', url='http://github.com/lmorchard/django-badge...
from rpy2.robjects import Formula from rpy2.robjects import pandas2ri from rpy2.robjects.packages import importr class LM(object): '''Class for fitting (simple) linear models using rpy2. When extracting the coefficients for a model (lmerMod or glmerMod) that uses orthogonal polynomials (poly in R syntax), it is nec...
# -*- coding: utf-8 -*- # © 2015 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # import email # import datetime # from openerp import fields from openerp import http from openerp.http import request class Main(http.Controller): @http.route('/my_module/books', type...
import matplotlib.pyplot as plt import scipy.interpolate as scinterp import numpy as np import peakfinding import peak_original import smoothing import plotter import random import readin import sys import os if __name__== '__main__': Mbdata = [] delM15data = [] path = "/Users/zaidi/Documents/REU/restframe...
from telegram.messageentity import MessageEntity from fjfnaranjobot.components.sorry.info import ( logger, sorry_group_handler, sorry_handler, ) from tests.base import CallWithMarkup from ...base import BOT_USERNAME, BotHandlerTestCase class SorryHandlersTests(BotHandlerTestCase): def _fake_user_men...
from pathlib import Path from ansicolor import Colors, colorize DEFAULT_FORMAT = '{file_path}:{line_number}:{column_number}: {description} (see {reference})' FORMAT_COLOR_MAP = { 'file_path': Colors.Red, 'file_name': Colors.Red, 'line_number': Colors.White, 'column_number': Colors.White, 'severit...
# -*- coding: utf-8 -*- """ QGIS Server HTTP wrapper This script launches a QGIS Server listening on port 8081 or on the port specified on the environment variable QGIS_SERVER_DEFAULT_PORT .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public Licen...
""" .. module:: dj-stripe.contrib.rest_framework.views. :synopsis: Views for the dj-stripe REST API. .. moduleauthor:: Philippe Luickx (@philippeluickx) """ from rest_framework import status from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from rest_framework.v...
__author__ = 'mark' # StarbaseMini Staribus/Starinet Client for the British Astronomical Association Staribus Protocol # Copyright (C) 2017 Mark Horn # # This file is part of StarbaseMini. # # StarbaseMini is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
# Copyright 2013 Sascha Peilicke # # 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...
from PyQt5.QtCore import QPointF, QRect, QRectF, QSize, QSizeF, Qt from PyQt5.QtWidgets import QGraphicsItem, QGraphicsPixmapItem from PyQt5.QtGui import QFontMetricsF, QFont class InputGraphic(QGraphicsItem): def __init__(self, aItemStack, aParent, aPos, aToolkitTypes): super().__init__(aParent) self.setPos(aP...
# coding=utf-8 from __future__ import (division, print_function, absolute_import, unicode_literals) ''' Chemical Evolution - chem_evol.py Functionality ============= This is the superclass inherited by the SYGMA and the OMEGA modules. It provides common functions for initialization and for ...
#!/usr/bin/env python import json # Used when TRACE=jsonp import os # Used to get the TRACE environment variable import re # Used when TRACE=jsonp import sys # Used to smooth over the range / xrange issue. # Python 3 doesn't have xrange, and range behaves like xrange. if sys.version_info >= (3,): xra...
import mock from unittest import TestCase from alamo_worker.alerter.plugins.image_renderer import ImageRendererPlugin from alamo_worker.alerter.preprocessor import AlertPreprocessor from alamo_common.test.utils import override_settings from tests.base import run_async, AsyncMock class AlertPreprocessorTestcase(Test...
__author__ = 'SolarLune' from bge import logic # Time-based mechanics. class TimerBank(): def __init__(self): self.time = 0.0 self.timers = {} def add(self, timer_name): self.timers[timer_name] = Timer() def set(self, timer_name, time): self.timers[timer_name].set(...
# vim: filetype=python3 tabstop=2 expandtab fileencoding=utf-8 # blowfish # Copyright (C) 2015 Jashandeep Sohi <jashandeep.s.sohi@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 Software Foundation, ei...
""" Command for launching GRaaS. """ import sys import click from twisted.internet import reactor from twisted.python import log from twisted.web.server import Site from .api import GraasApi from .devserver import GraasServerFactory @click.command("graas") @click.version_option() @click.option( '--host', '-h'...
"""Python TAXII 2.0 Client API""" from __future__ import unicode_literals import json import logging import re import time import requests.exceptions import six from six.moves.urllib import parse as urlparse from .. import MEDIA_TYPE_STIX_V20, MEDIA_TYPE_TAXII_V20 from ..common import ( _filter_kwargs_to_query_p...
''' Play mp3s and also call a function to move the mouth when the mp3 starts to play ''' import time import os import random import glob import pygame import moves_play class AudioPlayer(object): '''-''' def __init__(self, mouth_callback): '''-''' pygame.mixer.init() pygame.m...
################## ''' matrixMult.py Written by: Brian O'Dell, September 2017 This is a short python script that fills 2 NxN matricies with random numbers and then multiplies them together There is no output, the program is meant to just test the runtimes of compiled vs. interpreted codes. The algorithm used is the ...
######################################################### # run_orangelab_temperature.py # Author: Jamie Zhu <jimzhu@GitHub> # Created: 2015/8/24 # Last updated: 2015/8/24 ######################################################### import numpy as np import os, sys, time sys.path.append('../') from commons.utils impor...
# Copyright 2015 Scalyr 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 writing, so...
import re import subprocess import time from unit.applications.lang.python import TestApplicationPython from unit.option import option class TestRespawn(TestApplicationPython): prerequisites = {'modules': {'python': 'any'}} PATTERN_ROUTER = 'unit: router' PATTERN_CONTROLLER = 'unit: controller' def...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2004-2014 Zuza Software Foundation # # This file is part of translate. # # translate 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...
""" **DEPRECATED** A print function that pretty prints sympy Basic objects. :moduleauthor: Brian Granger Usage ===== Once the extension is loaded, Sympy Basic objects are automatically pretty-printed. As of SymPy 0.7.2, maintenance of this extension has moved to SymPy under sympy.interactive.ipythonprinting, any m...
from django.conf import settings from django.conf.urls import patterns, url from django.contrib.auth import views as auth_views from django.views.generic.base import TemplateView from invitation import views as invitation_views from registration import views as reg_views from comics.accounts.forms import ( Authen...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import gym import time import unittest import ray from ray.rllib.evaluation.rollout_worker import RolloutWorker from ray.rllib.tests.test_rollout_worker import MockPolicy class TestPerf(unittest.TestCase): ...
# Tests of the full ZIP64 functionality of zipfile # The test_support.requires call is the only reason for keeping this separate # from test_zipfile from test import test_support # XXX(nnorwitz): disable this test by looking for extra largfile resource # which doesn't exist. This test takes over 30 minutes to r...
import attr from navmazing import NavigateToAttribute, NavigateToSibling from widgetastic.exceptions import NoSuchElementException from cfme.common import Taggable from cfme.exceptions import ItemNotFound from cfme.modeling.base import BaseCollection, BaseEntity, parent_of_type from cfme.networks.views import SubnetDe...
#!/usr/bin/env python # Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except i...
#!/usr/bin/env python # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import unittest from compiled_file_system import CompiledFileSystem from object_store_creator import ObjectStoreCreator fr...
import logging from urllib import quote import jsonpickle from Goal import Goal from GoalEnvironmentProperties import GoalEnvironmentProperties from tests.CairisTests import CairisTests __author__ = 'Robin Quetin' class GoalTests(CairisTests): # region Class fields logger = logging.getLogger(__name__) ex...
from io import IOBase from ._runtime import Story as RStory, InkList as RInkList, Path as RPath from .choice import Choice from .inklist import InkList from .js import dec import json class Story: # Constructor def __init__(self, file_): if isinstance(file_, str): closefile = True ...
# -*- coding: utf-8 -*- # # Cherokee-admin # # Authors: # Alvaro Lopez Ortega <alvaro@alobbs.com> # # Copyright (C) 2001-2011 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published by the Free S...
#!/usr/bin/env python # -*- coding: utf-8 -*- """hangman.py: Let's play a game of hangman.""" # importing the time module import time, random # welcoming the user name = raw_input("What is your name? ") print "Hello, " + name, "Time to play hangman!" print "\n" # wait for 1 second time.sleep(1) print "Start gues...
from Module import AbstractModule class Module(AbstractModule): def __init__(self): AbstractModule.__init__(self) def run( self, network, antecedents, out_attributes, user_options, num_cores, outfile): """preprocess the inputfile with MAS5 using preprocess.py will g...
# # Tuxemon # Copyright (c) 2014-2017 William Edwards <shadowapex@gmail.com>, # Benjamin Bean <superman2k5@gmail.com> # # This file is part of Tuxemon # # 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 #...
# Copyright (C) 2016 Forest and Biomass Romania # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import base64 from odoo.tests.common import TransactionCase from odoo.modules.module import get_module_resource class TestINGImport(TransactionCase): """Run test to import MT940 BRD import.""" ...
# encoding: utf-8 # Copyright (c) 2001-2018, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public transport: # a non ending quest ...
import argparse from collections import defaultdict import json from mozlog import reader class StatusHandler(reader.LogHandler): def __init__(self): self.run_info = None self.statuses = defaultdict(lambda:defaultdict(lambda:defaultdict(lambda: defaultdict(int)))) def test_id(self, test): ...
import datetime from django.test import TestCase from couchforms.dbaccessors import get_forms_by_type, clear_forms_in_domain, \ get_number_of_forms_by_type, get_number_of_forms_of_all_types, \ get_form_ids_by_type, get_number_of_forms_all_domains_in_couch from couchforms.models import XFormInstance, XFormError ...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Comunitea All Rights Reserved # $Jesús Ventosinos Mayor <jesus@comunitea.com>$ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
# Copyright 2017 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 required by applicable law or ag...
## @file # parse FDF file # # Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR> # Copyright (c) 2015, Hewlett Packard Enterprise Development, L.P.<BR> # # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # w...
#!/usr/bin/env python # encoding: utf-8 ''' choose_once -- Simulation handler that initially makes the cheapest choice and then keeps it for a lifetime. Region and instance type can be fixed with the corresponding parameters. @author: Christian Holler (:decoder) @license: This Sourc...
from wrangler import dw import sys if(len(sys.argv) < 3): sys.exit('Error: Please include an input and output file. Example python script.py input.csv output.csv') w = dw.DataWrangler() # Split data repeatedly on newline into rows w.add(dw.Split(column=["data"], table=0, status="act...
''' Created on 2017. 5. 12. @author: Byoungho Kang http://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/ ''' import numpy as np import pandas as pd import matplotlib.pyplot as plt import math from keras.models import Sequential from keras.layers import LSTM, ...
''' Created on 15/03/2015 @author: josanvel ''' from PyQt4 import QtCore, QtGui from BotonesReportes import Ui_BotonesReportes from pyReporteGanancia import MyformReporteGanancias from pyReporteProducto import MyformReporteProductos class MyformBotonesReportes(QtGui.QMainWindow): def __init__(self, parent=N...
#!/usr/bin/env python import fnmatch import os from pathlib import Path import re import shlex import subprocess import sys import tempfile import time from concurrent.futures import ThreadPoolExecutor from contextlib import contextmanager from typing import Optional import click import git import typer import yaml fr...
import os as os import subprocess as _subprocess from .utils import netcdf2dict, psp_name # from .input import AbinitInput class AbiFiles: """ Read an 'abinit.files' file and extract the names of input, output filenames and put them into dictionary called 'files'. """ basedir = "." filen...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Chrome remote inspector utility for pyauto tests. This script provides a python interface that acts as a front-end for Chrome's...