CombinedText
stringlengths
4
3.42M
import time class Getwork_store: def __init__(self): self.data = {} def add(self, server, merkle_root): self.data[merkle_root] = {'name':server["name"], 'timestamp':time.time()} return def get_server(self, merkle_root): if self.data.has_key(merkle_...
from bs4 import BeautifulSoup import re import sys import json import time from collections import OrderedDict from django.core.management.base import BaseCommand from django.db.models import Q from programs.models import Program, ProgramModules, LearningPlan from disciplines.models import Discipline, Semester, Trai...
# ================================================= # --------- tms - module of Variables for re-use---------------- # -------------- # Section 0 - Required modules # Section 1 - Planeflight variables # Section 2 - Drivers functions # Section 3 - GeosChem (bpch) prod loss variables # Section 4 - GeosChem (bpch) gener...
import theano import unittest from numpy.testing import assert_allclose import numpy as np from keras.layers.recurrent import SimpleRNN from mock import Mock floatX = theano.config.floatX __author__ = "Jeff Ye" class TestSimpleRNN(unittest.TestCase): left_padding_data = np.array( [ [ # batc...
#!/usr/bin/env python # build_script.py - Build, install, and test XCTest -*- python -*- # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See http://swift.org/L...
from __future__ import (absolute_import, division, print_function, unicode_literals) import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib as mpl from .components import aes, assign_visual_mapping from .components import colors, shapes from .components.legend...
# -*- coding: utf-8 -*- # # dp for Tornado # YoungYong Park (youngyongpark@gmail.com) # 2014.11.11 # from __future__ import absolute_import from engine.helper import Helper as dpHelper import string unicode_type = type(u'') class StringHelper(dpHelper): @property def ascii_uppercase(self): ...
# Copyright 2019 DeepMind Technologies Ltd. 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 appl...
from flask import Flask, abort import gzip import configparser import os import uuid import json app = Flask(__name__) FILE_NAME = "picc/config.conf" if not os.path.exists("picc"): os.makedirs("picc") config = configparser.ConfigParser() shared_secret = None # Initial Setup if not os.path.isfile(FILE_NAME): ...
#!/usr/bin/env python3 import asyncio import sys sys.path.append("..") import jauxiliar as jaux import josecommon as jcommon import decimal import json import os import time from random import SystemRandom random = SystemRandom() PRICE_TABLE = { 'api': ('Tax for Commands that use APIs', jcommon.API_TAX_PRICE, \ ...
# coding=utf-8 import json import re from urllib.parse import urlparse, parse_qs from flask import current_app from lxml import html import mock import pytest from ...helpers import BaseApplicationTest, BaseAPIClientMixin from dmtestutils.api_model_stubs import FrameworkStub from dmtestutils.api_model_stubs.lot impo...
#!/usr/bin/env python # CommandLine.py # Copyright (C) 2006 CCLRC, Graeme Winter # # This code is distributed under the BSD license, a copy of which is # included in the root directory of this package. # # 12th June 2006 # # A handler for all of the information which may be passed in on the command # line. This s...
#SPDX-License-Identifier: MIT import ghdata import os import sys if (sys.version_info > (3, 0)): import configparser as configparser else: import ConfigParser as configparser from flask import Flask, request, Response, send_from_directory from flask_cors import CORS GHDATA_API_VERSION = 'unstable' def seria...
import openpathsampling as paths import numpy as np class SingleTrajectoryAnalysis(object): """Analyze a trajectory or set of trajectories for transition properties. Attributes ---------- dt : float time step between frames continuous_frames : dict dictionary mapping state to a li...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os, time from threading import Thread from PIL import Image from flask import current_app from app import db, imgs from app.models import Image as Img from app.models import Post from helpers.text import get_all_imgs _image_thread = None def jpeg_convert(infile...
import logging import asyncio import time import random import collections import discord import markovify from discord.ext import commands from .common import Cog log = logging.getLogger(__name__) def make_textmodel(texter, data): texter.model = markovify.NewlineText(data, texter.chain_length) async def mak...
""" controllers.py Point module controllers. """ from flask import Blueprint, request, Response, abort, jsonify from werkzeug.exceptions import BadRequest from datetime import datetime import logging from app.decorators import ignore_exception from app.mod_point.models import Point from app.mod_auth import oauth from...
# Copyright (c) 2010-2013, GEM Foundation. # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # OpenQuake is distri...
__copyright__ = "Copyright 2017 Birkbeck, University of London" __author__ = "Martin Paul Eve & Andy Byers" __license__ = "AGPL v3" __maintainer__ = "Birkbeck Centre for Technology and Publishing" from django.urls import reverse from utils import ( notify_helpers, models as util_models, setting_handler, ...
Change set_var_ics so it doesn't fail if there are extra things in the passed in KeyedList.
""" Starting point for DEM retrieval utilities. """ from math import pi, sin, cos from os import unlink, close from itertools import product from tempfile import mkstemp from sys import modules import NED10m, NED100m, NED1km, SRTM1, SRTM3, VFP, Worldwide from ModestMaps.Core import Coordinate from TileStache.Geograph...
# Giles: y.py # Copyright 2012 Phil Bordelon # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. # This program is...
# The Hazard Library # Copyright (C) 2016-2017 GEM Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. #...
import signal import sys import socket import struct from tools.debug import Debug UDP_IP = "127.0.0.1" UDP_PORT = 20777 sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) sock.bind((UDP_IP, UDP_PORT)) def main(): index = 1 value = None while True: data, address = sock.recvfrom(512) ...
import os import sys import json import requests from ArgumentParser import parser # Processing # ---------- def process_files(args): """ :param args: The arguments parsed by argparse :returns: A dict containing file_names as keys and a dict containing a key `content` as the value...
# Copyright 2015 Intel Corporation. # Copyright 2015 Isaku Yamahata <isaku.yamahata at intel com> # <isaku.yamahata at gmail com> # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the Licen...
import sublime import sublime_plugin import subprocess import os import re class GitManager: def __init__(self, view): self.view = view s = sublime.load_settings("Git-StatusBar.sublime-settings") self.git = s.get("git", "git") self.prefix = s.get("prefix", "") def run_git(self...
""" History related magics and functionality """ #----------------------------------------------------------------------------- # Copyright (C) 2010 The IPython Development Team. # # Distributed under the terms of the BSD License. # # The full license is in the file COPYING.txt, distributed with this software. #----...
# -*- encoding: iso-8859-1 -*- ############################################################################## # # Copyright (c) 2004-2006 TINY SPRL. (http://tiny.be) All Rights Reserved. # # $Id$ # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of ...
#!/usr/bin/env python """A simple interactive kernel that talks to a frontend over 0MQ. Things to do: * Implement `set_parent` logic. Right before doing exec, the Kernel should call set_parent on all the PUB objects with the message about to be executed. * Implement random port and security key logic. * Implement c...
# Testing for the whole ISgeneTK package import mods.gel_visualizer as gv import mods.SeqProp as sp import mods.plasmid_builder as pb import mods.MSM as msm def setup_module(module): print ("") # this is to get a newline after the dots print ("Initializing GeneTK Test...") def teardown_module(module): p...
import hashlib try: from urllib.request import urlopen except ImportError: # Python 2 from urllib2 import urlopen from django.core.exceptions import ImproperlyConfigured from django.core.files.base import ContentFile from django.core.files.storage import FileSystemStorage from django.contrib.staticfiles.finde...
# # Copyright (C) 2012 Ash (Tuxdude) <tuxdude.github@gmail.com> # # This file is part of repobuddy. # # This program 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 # ...
# Python import StringIO from collections import Counter, OrderedDict # Django from django.core import urlresolvers from django_countries import countries from django.db.models import Count, FieldDoesNotExist from django.contrib.sites.shortcuts import get_current_site # 3rd Party import xlsxwriter # Project from for...
__script__.title = 'KKB Measurement Script' __script__.version = '2.1' from gumpy.commons import sics from org.gumtree.gumnix.sics.control import ServerStatus from pickle import Pickler, Unpickler import time from math import log as ln from math import exp, isnan, isinf, sin from __builtin__ import max ...
# Python import StringIO from collections import Counter, OrderedDict # Django from django.core import urlresolvers from django_countries import countries from django.db import connection from django.db.models import F, Count, Sum, FieldDoesNotExist from django.contrib.sites.shortcuts import get_current_site # 3rd Pa...
import sys, os, glob import json from astropy.io import fits from astropy.table import Table, join import numpy as np import time, datetime from collections import OrderedDict import subprocess from copy import deepcopy from desispec.scripts.tile_redshifts import generate_tile_redshift_scripts, get_tile_redshift_scr...
__script__.title = 'KKB Measurement Script' __script__.version = '3.1' from gumpy.commons import sics from org.gumtree.gumnix.sics.control import ServerStatus from pickle import Pickler, Unpickler import time from math import log as ln from math import exp, isnan, isinf, sin from __builtin__ import max ...
#!/usr/bin/python # -*- coding: utf-8 -*- """ Copyright (c) 2014 windpro Author : windpro E-mail : windprog@gmail.com Date : 14/12/26 Desc : 接口调用规范。 """ from abc import ABCMeta, abstractmethod class BaseSpeed(object): __metaclass__ = ABCMeta def add_one(self): pass class BaseCheck...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class EtsfIo(Package): """ETSF_IO is a library implementing the Nanoquanta/ETSF file format...
import os import pytz import numpy as np import desisurvey.NTS import desisurvey.svstats import desiutil.log from desisurvey.scripts import collect_etc from astropy.io import fits from astropy.time import Time from astropy.coordinates import EarthLocation from astropy import units as u def run_plan(obsplan=None): ...
#!/usr/bin/python """ This module is the central part of MaxiNet and is intended to be the only part of MaxiNet which needs to be used by the user or third-party applications """ import re import sys import logging from functools import partial import time import subprocess import random import atexit from mininet.no...
""" Provides a JSON API for common components. """ # -*- coding: utf-8 -*- from __future__ import unicode_literals import json from django.http.response import HttpResponse from django.utils.decorators import method_decorator from django.urls import path from django.views.decorators.csrf import csrf_exempt from djan...
############################################################################## # Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditio...
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Libtree(CMakePackage): """ldd as a tree with an option to bundle dependencies into a ...
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have purchased from # Numenta, Inc. a separate commercial license for this software code, the # following terms and conditions apply: # # This pro...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Libtree(CMakePackage): """ldd as a tree with an option to bundle dependencies into a ...
from unittest import TestCase from os.path import (expanduser, join, isdir, isfile) from os import (remove, makedirs) from shutil import rmtree from glob import glob from niftynet.utilities.niftynet_global_config import NiftyNetGlobalConfig class NiftyNetGlobalConfigTest(TestCase): """For reliably testing the glo...
#!/usr/bin/env python ''' Usage: git-bin [-v] [--debug] <command> [--] <file>... git-bin init git-bin (-h|--help|--version) Commands: add store file in binstore and add it's link to the index edit retrieve a file from the binstore for local edit checkout restore th...
""" **hep_ml.losses** contains different loss functions to use in gradient boosting. Apart from standard classification losses, **hep_ml** contains losses for uniform classification (see :class:`BinFlatnessLossFunction`, :class:`KnnFlatnessLossFunction`, :class:`KnnAdaLossFunction`) and for ranking (see :class:`RankBo...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Libtree(CMakePackage): """ldd as a tree with an option to bundle dependencies into a ...
from __future__ import print_function import sys import numpy as np import os import glob import pickle as cPickle import csv import ntpath from scipy import linalg as la from scipy.spatial import distance import sklearn.svm import sklearn.decomposition import sklearn.ensemble import plotly import plotly.subplots impor...
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio 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 ## ...
""" puzzlesolver_compound_tests.py :created on: 20160701 __author__ = 'Frederic Dupont' :License: GPL3 """ import unittest from sudoku.puzzle import Puzzle, make_grid_from_string # from sudoku.puzzleconstants import DIGITS, SQUARES from sudoku.puzzlesolver import PuzzleSolver class TestPuzzleSolver(unittest.TestCas...
import json import requests from .fields import BaseField, CharField, ModelField from . import settings class APIModelCollection: def __init__(self, model, api, list_url, get_url): self._items = [] self._model = model self._api = api self._list_url = list_url self._get_url ...
from collections import OrderedDict from django.http import Http404, HttpResponseForbidden from django.shortcuts import render, redirect, get_object_or_404, get_list_or_404 from django.core.urlresolvers import reverse from django.core.exceptions import PermissionDenied from django.db import IntegrityError from django....
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import sys from spack import * class Mpibind(AutotoolsPackage): """A memory-driven algorithm to map parallel codes ...
#!/usr/bin/python2.5 # # Copyright 2008 the Melange 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...
import argparse import importlib import os import pickle import sys from . import builtins from . import find from . import packages from . import rules from . import utils from .build_inputs import BuildInputs from .environment import Environment from .version import __version__ bfgfile = 'build.bfg' def is_srcdir(...
import pyopencl as cl import numpy from pyPaSWAS.Core.SmithWaterman import SmithWaterman from pyPaSWAS.Core import STOP_DIRECTION, LEFT_DIRECTION, NO_DIRECTION, UPPER_DIRECTION, UPPER_LEFT_DIRECTION from pyPaSWAS.Core.PaSWAS import CPUcode from pyPaSWAS.Core.PaSWAS import GPUcode from pyPaSWAS.Core.StartingPoint impor...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import uni...
from collections import OrderedDict from django.http import Http404, HttpResponseForbidden from django.core.urlresolvers import reverse from django.core.exceptions import PermissionDenied from django.contrib import messages from django.contrib.auth import authenticate, login from django.contrib.auth.models import User...
# Copyright 2012, Nachi Ueno, NTT MCL, 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...
from __future__ import absolute_import, print_function import os import pytest from tests import DATA_DIR from mantid.api import AnalysisDataService from addie.rietveld import event_handler from addie.main import MainWindow bragg_file_names = ['GSAS_NaNO3_230C.gsa', 'GSAS_NaNO3_275C.gsa'] bragg_file_list = [os.path.j...
import numpy as np import matplotlib.pyplot as plt import scipy import lmfit import itertools import logging from pycqed.simulations import transmon from pycqed.utilities.timer import Timer log = logging.getLogger(__name__) ################################# # Fitting Functions Library # ########################...
from collections import OrderedDict from copy import deepcopy from django.http import Http404, HttpResponseForbidden, JsonResponse, HttpResponse from django.core.urlresolvers import reverse from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.contrib import messages from django.contrib.a...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RDismo(RPackage): """Functions for species distribution modeling, that is, predicting ...
# -*- coding: utf-8 -*- """ Created on Thu Sep 7 21:14:25 2017 @author: Suhas Somnath, Chris Smith """ from __future__ import division, print_function, unicode_literals, absolute_import import sys import numpy as np from collections import Iterable import datetime from dtype_utils import contains_integers __all__ =...
# future from __future__ import annotations # stdlib from typing import Any from typing import Dict from typing import Iterable from typing import Optional from typing import TYPE_CHECKING from typing import Tuple from typing import Union # third party import numpy as np from scipy.ndimage.interpolation import rotate...
# Copyright (C) 2010-2012 Cuckoo Sandbox Developers. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import os import logging import ConfigParser from lib.cuckoo.common.exceptions import CuckooMachineError from lib.cuckoo.common.constants impo...
from collections import OrderedDict from copy import deepcopy from django.core.mail import mail_admins from django.core.urlresolvers import reverse from django.core.exceptions import PermissionDenied, ObjectDoesNotExist from django.contrib import messages from django.contrib.auth import authenticate, login, logout fro...
from __future__ import division import random from itertools import combinations_with_replacement, izip from pydigree.common import * from pydigree.ibs import ibs from pydigree.io.smartopen import smartopen from pydigree.io.plink import write_plink, write_map from pydigree.individual import Individual from pydigree.e...
__author__ = 'noe' import psutil import numpy as np from pyemma.coordinates.clustering.interface import AbstractClustering from pyemma.coordinates.transform.transformer import Transformer from pyemma.coordinates.io.reader import ChunkedReader from pyemma.coordinates.io.feature_reader import FeatureReader from pyemma....
#!/usr/bin/env python """ Created as part of the StratusLab project (http://stratuslab.eu), co-funded by the European Commission under the Grant Agreement INSFO-RI-261552. Copyright (c) 2011, Centre National de la Recherche Scientifique (CNRS) Licensed under the Apache License, Version 2.0 (the "License"); you ...
#!/usr/bin/python import sys,os import ConfigParser import mosquitto import json import requests import time class NEEG_DataCollector(mosquitto.Mosquitto): def __init__(self,ip = "localhost", port = 1883, clientId = "NEEG2MQTT", user = "driver", password = "1234", prefix = "ElectricGridData"): mosquitto.Mosquitt...
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * import platform class Vecgeom(CMakePackage): """The vectorized geometry library for particle-de...
from copy import copy from typing import List, Tuple from typing_extensions import Literal from gilgamesh.instruction import Instruction, InstructionID from gilgamesh.opcodes import AddressMode, Op from gilgamesh.state import State, StateChange class CPU: def __init__(self, log, pc: int, p: int, subroutine: int...
#!/usr/bin/python from __future__ import division import copy """ <svg> <polyline points="0,0 50,0 150,100 250,100 300,150" fill="rgb(0,249,249)" stroke-width="0" stroke="rgb(0,0,0)" /> </svg> """ def round_point(point): return [int(point[0]), int(point[1])] def scale_point(point, k): r...
# Copyright 2016 PerfKitBenchmarker Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
#!/usr/bin/python from __future__ import unicode_literals, print_function, division from datetime import datetime, timedelta api_ok = True try: import tvdb_api import tvdb_exceptions except: print("tvdb api not available") api_ok = False from operator import itemgetter def command_ep(bot, user, chann...
import json import os.path as path import urllib import urllib2 from datetime import datetime from time import strptime from models import * # sub and dub is 0=both 1=sub only 2=dub only if path.exists('settings'): try: config = open('settings', 'r') sub_dub = int(config.read()) except: ...
# -*- coding: utf-8 -*- from __future__ import print_function from builtins import object import websocket import logging from purkinje_messages.message import TestCaseStartEvent class TestMonitorPlugin(object): """py.test plugin for monitoring test progress and capturing results TODO graceful te...
""" Highly experimental script that compiles the CPython standard library using Cython. Execute the script either in the CPython 'Lib' directory or pass the option '--current-python' to compile the standard library of the running Python interpreter. Pass '--parallel' to get a parallel build. Usage example:: $ p...
# -*- coding: utf-8 -*- """ werkzeug_dispatch ~~~~~~~~~~~~~~~~~ :copyright: (c) 2014 by Ben Mather. :license: BSD, see LICENSE for more details. """ from werkzeug import Response import json class ViewFactory(object): def get_bindings(self): raise NotImplementedError() class Binding(Vi...
""" Author: Ron Lockwood-Childs Licensed under LGPL v2.1 (see file COPYING for details) Widget types and instances. """ import math import pygame from pygame_maker.actors.gui.styles import WidgetStyle from .. import object_type from .. import simple_object_instance from pygame_maker.actions import action from pygame...
from __future__ import absolute_import # Implementation of RAKE - Rapid Automtic Keyword Exraction algorithm # as described in: # Rose, S., D. Engel, N. Cramer, and W. Cowley (2010). # Automatic keyword extraction from indi-vidual documents. # In M. W. Berry and J. Kogan (Eds.), Text Mining: Applications and Theory.unk...
import time timeStamp = int(time.time()) timeArray = time.localtime(timeStamp) otherStyleTime = time.strftime("%Y/%m/%d %H:%M:%S", timeArray) txt = open('Diary.txt', 'r+') txt = open('Diary.txt', 'a+') print "Here's your diary:" print txt.read() print "How are you today?" content = raw_input(">") txt.write(other...
# Copyright Vertex.AI. from __future__ import print_function import hashlib import os import platform import shutil import sys from subprocess import call, check_call MAIN = "__BZL_MAIN__" REQUIREMENTS = ["__BZL_REQUIREMENTS__"] VENV_ARGS = __BZL_VENV_ARGS__ def _find_in_runfiles(logical_name): key = logical_n...
# built-ins import itertools as it import sys import argparse import random import logging import json import collections from copy import deepcopy # libraries from numpy import (array, mean, zeros, zeros_like, where, unique, newaxis, nonzero, median, float, ones, arange, inf, isnan, flatnonzero, unravel_index...
#!/usr/bin/env python """ author: Stefano Gariazzo <gariazzo@ific.uv.es> Read the .tex files in a folder and creates a .bib file for the compilation of the .tex document. You should use INSPIRES keys for the bibtex entries in order to have a good behaviour of the code. Usage: python bibtexImporter.py "folder/where/t...
from django.db import models from django import forms from wheelcms_axle.content import Content from wheelcms_axle.node import Node from wheelcms_spokes.page import PageBase, PageType, PageForm from wheelcms_axle.content import type_registry from wheelcms_axle.impexp import WheelSerializer class CategorySerializer(W...
""" Part of this code is based on a similar implementation present in FireWorks (https://pypi.python.org/pypi/FireWorks). Work done by D. Waroquiers, A. Jain, and M. Kocher. The main difference wrt the Fireworks implementation is that the QueueAdapter objects provide a programmatic interface for setting important attr...
# Copyright (c) 2015 Ultimaker B.V. # Uranium is released under the terms of the AGPLv3 or higher. from UM.Controller import Controller from UM.PluginRegistry import PluginRegistry from UM.Mesh.MeshFileHandler import MeshFileHandler from UM.Resources import Resources from UM.Operations.OperationStack import OperationS...
plot: Update queue delay plot
"""Read Minigo game examples from a Bigtable. """ import collections import operator import os import re import struct import time import numpy as np from google.cloud import bigtable from google.cloud.bigtable import row_filters import tensorflow as tf import utils # Constants ROW_PREFIX = 'g_{:0>10}_' ROWCOUNT_PR...
from django.contrib import admin from django.conf.urls import patterns from django.http import HttpResponseRedirect from game.tasks import validate_bot import itertools # Register your models here. from game.models import ( Bot, Challenge, UserProfile, FinalChallenge, ) from game.tasks import run_matc...
""" Part of this code is based on a similar implementation present in FireWorks (https://pypi.python.org/pypi/FireWorks). Work done by D. Waroquiers, A. Jain, and M. Kocher. The main difference wrt the Fireworks implementation is that the QueueAdapter objects provide a programmatic interface for setting important attr...
#!/usr/bin/python # -*- coding: utf-8 -*- # Cached file-system utility library # (C) 2016 VRT Systems # # vim: set ts=4 sts=4 et tw=78 sw=4 si: import time import os import errno import collections import stat import weakref from .intnode import _Node class Node(collections.Mapping): ''' A file-system node ...
# -*- coding: utf-8 -*- from django.shortcuts import render from django.http import HttpResponse, Http404 from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User, Group from rest_framework.views import APIView from rest_framework.response import Response from rest_framework...