src
stringlengths
721
1.04M
# Copyright (c) 2016-present, Facebook, 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...
class Node: def __init__(self, value): self.value = float(value) self.parent = None self.children = [] def addChild(self, child): self.children.append(child) def __repr__(self): return '<value: %s children: (%s)>' % (self.value, len(self.children)) @property def right(self): return...
""" ==================================================== Comparison of cross validated score with overfitting ==================================================== These two plots compare the cross validated score of a the regression of a simple function. We see that before the maximum value of 7 the regression is far ...
#! /usr/bin/env python # -*- coding: UTF-8 -*- #----------------------------------------------------------------------------------------------------------------------* import sys, time, os, json import makefile, default_build_options import generic_galgas_makefile import tool_chain_installation_path import cross_com...
""" pphrase.py : Generate a random passphrase Generate a random passphrase from a subset of the most common words (max 10000) in Google's trillion-word corpus. See http://xkcd.com/936 for the motivation and inspiration. Licensed under terms of MIT license (see LICENSE-MIT) Copyright (c) 2014 Jason...
import warnings import sys import codecs import numpy import argparse import theano import json import pickle from rep_reader import RepReader from util import read_passages, evaluate, make_folds from keras.models import Sequential, Graph, model_from_json from keras.layers.core import TimeDistributedDense, Dropout fr...
"""Bayesian Markov state model, with MCMC sampling of the transition matrix posterior distribution. This can be used to assess sampling uncertainty in the MSM transition matrix and functions of the transition matrix. TODO ---- * MCMC for models which are not constrained to be reversible is currently not implemented....
from baselines.common.mpi_running_mean_std import RunningMeanStd import baselines.common.tf_util as U import tensorflow as tf import gym from baselines.common.distributions import make_pdtype class MlpPolicy(object): recurrent = False def __init__(self, name, *args, **kwargs): with tf.variable_scope(na...
import pygame import sys import random import level1_main import menu from pygame.locals import * pygame.init() reloj = pygame.time.Clock() opciones = [ ("Jugar", level1_main.Nivel_1), ("Creditos", menu.creditos), ("Salir", menu.salir_del_programa) ...
""" Provides an APIView class that is the base of all views in REST framework. """ from __future__ import unicode_literals from django.conf import settings from django.core.exceptions import PermissionDenied from django.db import connection, models, transaction from django.http import Http404 from django.http.response...
## # Copyright 2014-2019 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
# -*- coding: utf-8 -*- # Copyright 2016 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 # # Un...
import numpy import six from chainer import cuda from chainer import function from chainer.utils import type_check class Accuracy(function.Function): def __init__(self, ignore_label=None): self.ignore_label = ignore_label def check_type_forward(self, in_types): type_check.expect(in_types.si...
# flake8: noqa # port of docker names-generator import random left = [ "admiring", "adoring", "affectionate", "agitated", "amazing", "angry", "awesome", "blissful", "boring", "brave", "clever", "cocky", "compassionate", "competent", "condescending", "conf...
# View more python learning tutorial on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial """ Please note, this code is only for python 3+. If you are using python 2+, please modify the code acco...
from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import io import codecs import os import sys import eppy here = os.path.abspath(os.path.dirname(__file__)) def read(*filenames, **kwargs): encoding = kwargs.get('encoding', 'utf-8') sep = kwargs.get('sep', '\...
import argparse from itertools import count import numpy as np import h5py from traits.api import HasTraits, Range, Instance, Bool, Int, on_trait_change from traitsui.api import View, Item, HGroup, RangeEditor from tvtk.api import tvtk from tvtk.pyface.scene_editor import SceneEditor from tvtk.common import configure_i...
from sklearn.multiclass import OneVsRestClassifier from sklearn.svm import LinearSVC from src.multi_class import input_preproc from src.multi_class import calculate_metrics def runClassifier(X_train, X_test, y_train, y_test): # print y_train predictions = OneVsRestClassifier(LinearSVC(), n_jobs=-1)\ ...
# -*- coding: utf-8 -*- # @COPYRIGHT_begin # # Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland # # 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.apac...
from __future__ import unicode_literals import abc import inspect import os import re import six MYPY = False if MYPY: # MYPY is set to True when run under Mypy. from typing import Any, List, Match, Optional, Pattern, Text, Tuple, cast Error = Tuple[Text, Text, Text, Optional[int]] def collapse(text): ...
import sys import time import logging import asyncio import aiohttp import hailtop.aiogoogle as aiogoogle log = logging.getLogger(__name__) class AsyncIOExecutor: def __init__(self, parallelism): self._semaphore = asyncio.Semaphore(parallelism) async def _run(self, fut, aw): async with self....
# (C) British Crown Copyright 2010 - 2015, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
import pytest @pytest.fixture def push_based_project(accio_project): accio_project.deploy_on = 'push' accio_project.save() return accio_project @pytest.fixture def status_based_project(accio_project): accio_project.deploy_on = 'status' accio_project.save() return accio_project @pytest.mark...
""" .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com> """ import abc import copy import math import warnings from typing import Any, Dict, List, Mapping, Optional, Sequence, Union, cast import typepy from dataproperty import ( ColumnDataProperty, DataProperty, DataPropertyExtractor, Form...
#!/usr/bin/python3 """ doctest style unit tests for APL monadic functions WIP - grows as more monadic functions are implemented. The tests in this module exercise monadic functions with numeric scalar and vector arguments only. Other cases are covered in other test modules. Each test pa...
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
""" This is the template for the computation problem of computing a Groebner basis of an ideal generated by a finite set of polynomials with integer coefficients (commutative). It creates code for the computer algebra system Magma. .. moduleauthor:: Albert Heinle <albert.heinle@rwth-aachen.de> """ #------------------...
from dipsim import multiframe, util import numpy as np import matplotlib.pyplot as plt import matplotlib import matplotlib.patches as patches import os; import time; start = time.time(); print('Running...') import matplotlib.gridspec as gridspec # Main input parameters col_labels = ['Geometry (NA${}_{\\textrm{ill}}$ =...
"""Python library to enable Axis devices to integrate with Home Assistant.""" import asyncio import logging from typing import Callable, List, Optional from .configuration import Configuration from .rtsp import SIGNAL_DATA, SIGNAL_FAILED, SIGNAL_PLAYING, STATE_STOPPED, RTSPClient _LOGGER = logging.getLogger(__name__...
# -*- coding: utf-8 -*- # # This file is part of pypuppetdbquery. # Copyright © 2016 Chris Boot <bootc@bootc.net> # # 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.or...
# -*- coding: utf-8 -*- """ :copyright: (c) 2014 by Armin Ronacher. :copyright: (c) 2014 by Niclas Moeslund Overby. :license: BSD, see LICENSE for more details. """ from sqlite3 import dbapi2 as sqlite3 from flask import Flask, request, session, g, redirect, url_for, abort, \ render_template, flash a...
# Databricks notebook source # MAGIC %md # MAGIC ScaDaMaLe Course [site](https://lamastex.github.io/scalable-data-science/sds/3/x/) and [book](https://lamastex.github.io/ScaDaMaLe/index.html) # MAGIC # MAGIC This is a 2019-2021 augmentation and update of [Adam Breindel](https://www.linkedin.com/in/adbreind)'s initial ...
# -*- coding: utf-8 -*- from itertools import product # Use Python 2 map here for now from funcy.py2 import map, cat from django.db.models.query import QuerySet from django.db.models.sql import OR from django.db.models.sql.query import Query, ExtraWhere from django.db.models.sql.where import NothingNode # This thing e...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from .models import * class CompanyForm(forms.ModelForm): class Meta: model = Company fields = ('name', 'division', 'address', 'city', 'state_province', 'count...
# -*- coding: utf-8 -*- ''' This module defines :class:`Block`, the main container gathering all the data, whether discrete or continous, for a given recording session. base class used by all :module:`neo.core` classes. :class:`Block` derives from :class:`Container`, from :module:`neo.core.container`. ''' # needed fo...
""" Automatafl HTTP game server. There is a central store of all currently-running games, with the board and game state. Each game is identified by a UUIDv4. When creating a game, the client has an option to make the game public or private. Public games will be listed publically. A player may join any game which they ...
#!/usr/bin/env python3 from __future__ import print_function, division, unicode_literals import unittest def is_even(n): if int(n) != n: raise ValueError('Argument should be integer') return n % 2 == 0 class IsEvenTestCase(unittest.TestCase): def test_even(self): self.assertTrue(is_eve...
#! /usr/bin/env python import saga_api, sys, os ########################################## def xyz2shp(fTable): table = saga_api.SG_Get_Data_Manager().Add_Table() if table.Create(saga_api.CSG_String(fTable)) == 0: table.Add_Field(saga_api.CSG_String('X'), saga_api.SG_DATATYPE_Double) table.A...
from __future__ import absolute_import from datetime import datetime from django.core.urlresolvers import reverse from sentry.models import Release, ReleaseCommit, ReleaseProject from sentry.testutils import APITestCase class ProjectReleaseListTest(APITestCase): def test_simple(self): self.login_as(user...
from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from django.views import defaults as default_views from pfc.applications.views import ApplicationConfigurationView from pf...
from collections import namedtuple from .data import filter_transactions_period import re class Category(namedtuple('Category', ['name', 'color', 'keywords', 'warning_threshold'])): @classmethod def from_dict(cls, dct): return cls(name=dct['name'], color=dct.get('color'), keywords=dct.get('keywords', ...
## datastructure.py ## Author: Yangfeng Ji ## Date: 08-29-2013 ## Time-stamp: <yangfeng 02/14/2015 00:28:50> class SpanNode(object): """ RST tree node """ def __init__(self, prop): """ Initialization of SpanNode :type text: string :param text: text of this span """ ...
__all__ = ['KerasNNClassifierMixin', 'keras_f1_score', 'EarlyStopping'] import logging import math import os import shutil from tempfile import NamedTemporaryFile try: from keras import backend as K from keras.callbacks import Callback, ModelCheckpoint from keras.models import load_model import tenso...
# -*- encoding: utf-8 -*- import click import csv import logging from strephit.commons import wikidata, cache from collections import defaultdict logger = logging.getLogger(__name__) COLUMN_TO_PROPERTY = { 'localit&agrave;': 'P131', 'Prov': 'P131', 'indirizzo': 'P969', 'proprieta': 'P127', 'WLMID...
import os import json import numpy as np from astropy.table import Table, join from desispec.io import findfile from desiutil.log import get_logger from pkg_resources import resource_filename log=get_logger() fname='/project/projectdirs/desi/spectro/redux/daily/tsnr-exposures.fits' opath=resource_filename('desisp...
""" Copyright (c) 2011-2015 Nathan Boley This file is part of GRIT. GRIT 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. GRIT is distribut...
# Copyright 2013 Openstack Foundation # 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 requ...
#!/usr/local/bin/env python3 # Copyright 2016 José Lopes de Oliveira Jr. # # Use of this source code is governed by a MIT-like # license that can be found in the LICENSE file. ## """ Acan - basic maths around brewing. Overview This Python module implements some equations used by homebrewers. Although there is no ca...
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsDistanceArea. .. note:: 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. """ _...
__author__ = 'bachmann.s & elias.t' import base64 from Crypto.Cipher import Blowfish import zipfile import sys from os.path import isdir from os.path import exists from os.path import join from os.path import split from os import listdir from argparse import ArgumentParser blfs = 'res/raw/blfs.key' config = 'res/raw/...
#!/usr/bin/env python # # xml_parser.py: Parse XML document, the result is a python dict. # # Copyright (C) 2010-2012 Red Hat, Inc. # # libvirt-test-API 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 v...
import unittest from anoisetools.scripts import split def _line_iterator(s): return iter(s.splitlines()) class ReadBarcodeTestCase(unittest.TestCase): def test_basic(self): s = "Barcode1,ACGTGA,ACGT" i = _line_iterator(s) actual = split.load_barcodes(i) self.assertEqual(1, le...
# db_utils.py def execute_query_for_single_value(cursor, query): ''' query is a string containing a well-formed query that is executed against the specified cursor. RETURNS: the following tripe: (results_flag, err_msg, value) ''' try: # Execute the query cursor.exe...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
#!/usr/bin/env python """ Copyright 2015 The Trustees of Princeton University Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unle...
#!/usr/bin/env python #*********************************************************** #* Software License Agreement (BSD License) #* #* Copyright (c) 2010, CSIRO Autonomous Systems Laboratory #* All rights reserved. #* #* Redistribution and use in source and binary forms, with or without #* modification, are permitte...
#!/usr/bin/env python3 from statistics import mean import tensorflow as tf import numpy as np from tfx.logging import LogMessage class BaseModel: def __init__(self, data, FLAGS): self.data = data self.FLAGS = FLAGS self.batch_idx = tf.placeholder("int32", name='batch_idx') self....
# vim: set expandtab sw=4 ts=4: # # Unit tests for dashboard related functions # # Copyright (C) 2014-2016 Dieter Adriaenssens <ruleant@users.sourceforge.net> # # This file is part of buildtimetrend/python-lib # <https://github.com/buildtimetrend/python-lib/> # # This program is free software: you can redistribute it a...
from bottle import Bottle import pymongo load = Bottle() conn = pymongo.MongoReplicaSetClient( 'example01.com, example02.com', replicaSet='rs1', ) db = conn.reports @load.get('/<server>') def get_loaddata(server): cpu_user = list() cpu_nice = list() cpu_system = list() cpu_idle = list() cp...
#!/usr/bin/env python # -*- coding:gbk -*- import sys import os import pandas as pd from openpyxl import Workbook from openpyxl.reader.excel import load_workbook # ͳ¼Æbuy_sellϵļǼ£¬½¨ÒéʹÓÃÉÏÒ»¼¶µÄtransaction_sum.py£¬Í³¼ÆÐÅÏ¢¸ü¶à # Main pindex = len(sys.argv) if pindex<2: sys.stderr.write("Usage: " +os.path.ba...
""" Description: Requirements: pySerial, wxPython Phoenix glossary and of other descriptions: DMM - digital multimeter PSU - power supply SBC - single board computer INS - general instrument commands GEN - general sequence instructions """ import logging import sys import time import wx import theme import base ...
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2012, 2013, 2014, 2015 CERN. # # Zenodo 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 o...
## Authorization AuthorizationRequestParam = tuple AuthorizationRequestType = str AUTHCODE_AUTHREQTYPE = AuthorizationRequestType('code') IMPLICIT_AUTHREQTYPE = AuthorizationRequestType('token') class AuthorizationRequest(object): def __init__(self, request_type: AuthorizationRequestType, params: [AuthorizationRequ...
# # gPrime - A web-based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2011 Tim G L Lyons # # 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 versio...
# Copyright 2019 Microsoft Corporation # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import datetime import json import mock from c7n.actions.webhook import Webhook from c7n.exceptions import PolicyValidationError from .common import BaseTest import os class WebhookTest(BaseTest): ...
# Always prefer setuptools over distutils # To use a consistent encoding from codecs import open from os import path from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.rst'), encoding='utf-8') as f:...
#!/usr/bin/env python3 import simplejsondb as sjdb import json # user { id, nickname, name, password, address, } # # session { id, fk_user, last_login, last_activity, } # # payee { id, name, desc, } # # category { id, name, desc, parent_id, } # # mode { id, name, } # # bank { id, name, bic_code, s...
# -*- coding: utf-8 *-* # Copyright (c) 2013 Tisserant Pierre # # This file is part of Dragon dice simulator. # # Dragon dice simulator is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either ve...
# Copyright 2012 Nebula, Inc. # Copyright 2014 IBM Corp. # # 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...
from vendors import PostageApp import unittest class TestPostageApp(unittest.TestCase): def setUp(self): self.vendor = PostageApp() def test_ZeroEmails(self): self.assertEqual(self.vendor.getPrice(0), 9) def test_Zero_10000(self): self.assertEqual(self.vendor.getPrice(1), 9) ...
# # Copyright 2007-2009 Fedora Unity Project (http://fedoraunity.org) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; version 2, or (at your option) any # later version. # # This program is di...
#!/usr/bin/env python #-*- coding: utf-8 -*- #project imports from general import General #fill in the dictionary bellow if your posix locale language code #differs from the iso code used in the database: code_dict = { 'ptbr': 'pt_BR', } class I18n(object): g = General() def __init...
## Copyright (C) 2011 Stellenbosch University ## ## This file is part of SUCEM. ## ## SUCEM 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 v...
from enigma import eRCInput, getPrevAsciiCode from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Screens.VirtualKeyBoard import VirtualKeyBoard from Components.ActionMap import NumberActionMap from Components.Label import Label from Components.Input import Input from Components.Pixmap impo...
#!/usr/bin/env python2 # -*- coding: UTF-8 -*- # --------------------------------------------------------------------------- # ___ __ __ __ ___ # / | \ | \ | \ / Automatic # \__ |__/ |__/ |___| \__ Annotation # \ | | | | \ ...
c = ['fulano@usm.cl', 'erika@lala.de', 'li@zi.cn', 'a@a.net', 'gudrun@lala.de', 'otto.von.d@lorem.ipsum.de', 'org@cn.de.cl', 'yayita@abc.cl', 'jozin@baz.cz', 'jp@foo.cl', 'dawei@hao.cn', 'pepe@gmail.com', 'ana@usm.cl', 'polo@hotmail.com', 'fer@x.com', 'ada@alumnos.usm.cl', 'dj@foo.cl', 'jan@baz....
"""Linux kernel watchdog support""" import time import _thread class WatchdogClass: _singleton = None def __init__(self): self.watchdog_device = None self.watchdog_timeout = 60 self.stop_feeding = time.time() + self.watchdog_timeout WatchdogClass._singleton = self ...
# # Copyright (c) SAS Institute 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 w...
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2020, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
import nltk from nltk import FreqDist import json import csv print "* Loading corpus" #raw = gutenberg.raw('melville-moby_dick.txt') #raw = gutenberg.raw('bible-kjv.txt') #raw = gutenberg.raw('tss-lyrics.txt') lines = [] with open("tss-lyrics.txt", 'r') as raw: lines = raw.read() print "* Tokenizing" #tokens =...
""" """ import os import numpy as np import pandas as pd from .dataprep import IO from .dataprep import extract_floats as extr from .dataprep import dict_values as dvals class Analysis(): """ """ def __init__(self): self.loc = os.getcwd() self.structs = next(os.walk('.'))[1] self....
#= ------------------------------------------------------------------------- # @file game1.py # # @date 11/17/15 23:12:50 # @author Martin Noblia # @email martin.noblia@openmailbox.org # # @brief # # @detail # # Licence: # This program is free software: you can redistribute it and/or modify # it under the terms of the...
# -*- coding: utf-8 -*- # * Authors: # * TJEBBES Gaston <g.t@majerti.fr> # * Arezki Feth <f.a@majerti.fr>; # * Miotte Julien <j.m@majerti.fr>; import functools import deform from colanderalchemy import SQLAlchemySchemaNode from autonomie import forms from autonomie.forms.user.user import get_list_sch...
''' Created on Aug 1, 2017 @author: alkaitz ''' ''' An integer array defines the height of a 2D set of columns. After it rains enough amount of water, how much water will be contained in the valleys formed by these mountains? Ex: [3 2 3] X X X W X X X X -> X X X -> 1 X X X X X X ''' d...
# -*- coding: utf-8 -*- #------------------------------------------------------------ # streamondemand - XBMC Plugin # Conector para bigfile # http://www.mimediacenter.info/foro/viewforum.php?f=36 #------------------------------------------------------------ import re from core import logger def test_video_exists( ...
import datetime import jsonpickle as json import logging from enum import Enum from os import path from peewee import (SqliteDatabase, Model, CharField, IntegerField, FloatField, DateTimeField, TextField, CompositeKey, BooleanField) log = logging.getLogger('golem.db') NEUTRAL_TRUST = 0.0 # Indi...
import sys import pysvn import json import configparser, os from pymongo import MongoClient config = configparser.RawConfigParser() config.read('/Users/mcf/configuration.cfg') svnroot = config.get('SVN', 'root') svnpath = config.get('SVN', 'path') svnusername = config.get('SVN', 'username') svnpwd = config.get('SVN...
# -*- coding: utf-8 -*- # # This file is part of NINJA-IDE (http://ninja-ide.org). # # NINJA-IDE 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 # any later version. # # NIN...
#!/usr/bin/env python3 # THIS FILE IS PART OF THE CYLC SUITE ENGINE. # Copyright (C) 2008-2019 NIWA & British Crown (Met Office) & Contributors. # # 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...
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will b...
import json import traceback # from toflerdb.utils.common import Common from toflerdb.core import api as gcc_api from toflerdb.utils import exceptions from basehandler import BaseHandler class UploadFactsHandler(BaseHandler): def post(self): request_body = self.request.body if request_body is Non...
# importing libraries: import maya.cmds as cmds from Library import dpUtils as utils import dpBaseClass as Base import dpLayoutClass as Layout # global variables to this module: CLASS_NAME = "Steering" TITLE = "m158_steering" DESCRIPTION = "m159_steeringDesc" ICON = "/Icons/dp_steering.png" class Steering(Base...
# Copyright 2017 AT&T Intellectual Property. All other 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...
__author__ = 'saeedamen' # Saeed Amen # # Copyright 2016 Cuemacro # # 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 ...
import turtle #turtle.ht() turtle.title("RWG") turtle.speed(1) def square(): turtle.forward(5) turtle.left(90) turtle.forward(5) turtle.left(90) turtle.forward(5) turtle.left(90) turtle.forward(5) def window(): turtle.color("white") turtle.begin_fill() square() t...
# The next script will format a phenotype table (junctions, events, trasncripts...) # for runnning FastQTL analysis #This version is for formatting the SCLC phenotype """ @authors: Juan L. Trincado @email: juanluis.trincado@upf.edu generate_boxplot_event.py: Generates a boxplot with the PSI values, given which sampl...
# Copyright 2015 Google Inc. All Rights Reserved. """Starts the vtcombo process.""" import json import logging import os import socket import subprocess import time import urllib from google.protobuf import text_format from vttest import environment class VtProcess(object): """Base class for a vt process, vtcom...
from __future__ import absolute_import import copy import json import zipfile import pytest import requests_mock import six from requests.models import Request from databasin.client import Client from databasin.exceptions import DatasetImportError from .utils import make_api_key_callback try: from unittest impo...
# -*- coding: utf-8 -*- # # django-localflavor documentation build configuration file, created by # sphinx-quickstart on Sun Jun 2 17:56:28 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated fi...
# -*- coding: utf-8 -* import json from pyload.core.network.http.exceptions import BadHeader from ..base.decrypter import BaseDecrypter class GoogledriveComFolder(BaseDecrypter): __name__ = "GoogledriveComFolder" __type__ = "decrypter" __version__ = "0.12" __status__ = "testing" __pyload_versi...