gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# coding=utf-8 # Copyright 2019 The SEED 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 agre...
# # test01 # import sys import os import numpy as np import matplotlib.pyplot as plt from skimage.transform import resize from skimage import data from scipy.misc import imresize import tensorflow as tf from libs import gif import IPython.display as ipyd n_iterations = 500 LAYERSIZE=256 NHIDLAYERS=2 tamimg=128 #fi...
import sys import os import logging import tempfile import shutil import six from six.moves import shlex_quote if six.PY3: from collections.abc import Sequence else: from collections import Sequence logger = logging.getLogger(__name__) class ContainerCommandError(Exception): def __init__(self, comman...
# Very rudimentary test of threading module import test.support from test.support import verbose, strip_python_stderr import random import re import sys _thread = test.support.import_module('_thread') threading = test.support.import_module('threading') import time import unittest import weakref import os import subpro...
import datetime from dateutil.tz import * from django.db import models from django.contrib.auth.models import User from django.test import TestCase from tastypie.bundle import Bundle from tastypie.exceptions import ApiFieldError, NotFound from tastypie.fields import * from tastypie.resources import ModelResource from c...
import uuid from collections import defaultdict from datetime import datetime from functools import partial from django.db import models, transaction from django.db.models import Q import jsonfield from django_bulk_update.helper import bulk_update as bulk_update_helper from django_cte import CTEQuerySet from memoized...
""" @author: Bryan Silverthorn <bcs@cargo-cult.org> """ __all__ = [ "CoercionError", "Value", ] import numpy import qy import qy.llvm as llvm class CoercionError(TypeError): """ Failed to coerce a value to that of another type. """ def __init__(self, from_type, to_type): """ ...
"""Support for Nexia / Trane XL Thermostats.""" from __future__ import annotations from nexia.const import UNIT_CELSIUS from homeassistant.components.sensor import ( SensorDeviceClass, SensorEntity, SensorStateClass, ) from homeassistant.config_entries import ConfigEntry from homeassistant.const import PE...
#!/usr/bin/env python import numpy as np import numpy.random as nr from numpy.testing import(assert_array_equal, assert_array_almost_equal, assert_almost_equal) from nose.tools import assert_true, assert_equal from ..graph import (WeightedGraph, complete_graph, mst, knn, eps_nn, ...
from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from builtins import super from builtins import int from future import standard_library standard_library.install_aliases() import re from qtpandas.compat import QtCore, Q...
''' Represent transformations of data to happen on the client (browser) side. ''' from __future__ import absolute_import from textwrap import dedent from types import FunctionType from ..core.enums import StepMode, JitterRandomDistribution from ..core.has_props import abstract from ..core.properties import Bool, Dic...
# Copyright 2022 The T5 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 in writi...
# 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 ...
# Copyright (c) 2018 PaddlePaddle 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...
""" MIT License Copyright (c) 2016 Jon Sellars Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, d...
import os import pprint import random import wx import numpy # The recommended way to use wx with mpl is with the WXAgg # backend. # import matplotlib matplotlib.use('WXAgg') from matplotlib.figure import Figure from matplotlib.backends.backend_wxagg import \ FigureCanvasWxAgg as FigCanvas, \ NavigationToolb...
# pylint: disable=g-bad-file-header # Copyright 2016 The TensorFlow 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/LICENS...
# Copyright 2014: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# 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 ...
# -*- coding: utf-8 -*- """ Backend to the console plugin. @author: Eitan Isaacson @organization: IBM Corporation @copyright: Copyright (c) 2007 IBM Corporation @license: BSD All rights reserved. This program and the accompanying materials are made available under the terms of the BSD which accompanies this distribut...
#!/usr/bin/env python # encoding: utf-8 """ Run all scripts in examples on specific sample world. """ import sys import os import subprocess import shutil import tempfile import glob import logging import unittest try: from unittest import skip as _skip except ImportError: # Python 2.6 has an older unittest A...
from collections import defaultdict import datetime import json from collections import OrderedDict from moto.core import BaseBackend, BaseModel, CloudFormationModel from moto.core.utils import unix_time from moto.core import ACCOUNT_ID from .comparisons import get_comparison_func class DynamoJsonEncoder(json.JSONEn...
# 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 ...
"""Support for Bluesound devices.""" from __future__ import annotations import asyncio from asyncio import CancelledError from datetime import timedelta from http import HTTPStatus import logging from urllib import parse import aiohttp from aiohttp.client_exceptions import ClientError from aiohttp.hdrs import CONNECT...
import matplotlib matplotlib.use('Agg') from isochrones.dartmouth import Dartmouth_Isochrone from isochrones.starmodel import StarModel from isochrones.observation import ObservationTree import pandas as pd import matplotlib.pyplot as plt import sys from mpi4py import MPI comm = MPI.COMM_WORLD rank = comm.Get_rank() ...
################################################################################ # iso_read.py # # Simple ISO NC code parsing # # Hirutso Enni, 2009-01-13 """ use this script to backplot nc files to *.scr file for autocad,bricscad, draftsight,progecad,ares commander, etc.... usage: python cad_iso_read.py temp....
# ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # <fred@dushin.net> wrote this file. You are hereby granted permission to # copy, modify, or mutilate this file without restriction. If you create a # work derived from this file, you may optionally...
""" Database Class ----------------- This class captures information and methods on the main dhs database. This class will create both a regular psycopg2 connection to the database for running queries, but also create a pandas connection to the postgres database with sqlalchemy to write tables. """ __author__ = 'kr...
""" Unit testing for the Command system itself. """ from evennia.utils.test_resources import EvenniaTest, TestCase from evennia.commands.cmdset import CmdSet from evennia.commands.command import Command # Testing-command sets class _CmdA(Command): key = "A" def __init__(self, cmdset, *args, **kwargs): ...
from __future__ import unicode_literals import sys import re from StringIO import StringIO class DecompilerBase(object): def __init__(self, out_file=None, indentation=' ', match_line_numbers=False): self.out_file = out_file or sys.stdout self.indentation = indentation self.match_line_num...
''' Created on Dec 12, 2013 @author: Mark V Systems Limited (c) Copyright 2013 Mark V Systems Limited, All rights reserved. ''' import os, sys, re from arelle import PluginManager from arelle import ModelDocument, XbrlConst, XmlUtil, UrlUtil, LeiUtil from arelle.HashUtil import md5hash, Md5Sum from arelle.ModelDtsObje...
import functools import os import pkgutil import sys from collections import OrderedDict, defaultdict from importlib import import_module import django from django.apps import apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.management.base import ( Bas...
# 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 # # Unless required by applicable law or ...
import importlib from tempfile import NamedTemporaryFile import time from yaml import safe_load from charmhelpers.core.host import ( lsb_release ) from urlparse import ( urlparse, urlunparse, ) import subprocess from charmhelpers.core.hookenv import ( config, log, ) import os CLOUD_ARCHIVE = """# ...
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
#!/bin/env python3 import sys import os import os.path import glob import copy import traceback import re import csv import tempfile import urllib.request, urllib.parse, urllib.error import shutil import atexit import subprocess import time import math from collections import defaultdict, Counter from os.path import jo...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
# -*- coding: utf-8 -*- # Copyright (c) 2013, First Party Software # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, # t...
# coding: utf-8 from __future__ import absolute_import import functools import re from flask.ext import login from flask.ext import wtf from flask.ext.oauthlib import client as oauth from google.appengine.ext import ndb import flask import unidecode import wtforms import cache import config import model import task...
import logging import json from datetime import datetime, timedelta from unittest import TestCase, mock from data_enterprise import EnterpriseEnvironment, get_enterprise_data, enterprise_allocate_ids from keepercommander import api, crypto, utils from keepercommander.record import Record from keepercommander.params im...
"""Support for SimpliSafe alarm control panels.""" import logging import re from simplipy.entity import EntityTypes from simplipy.system import SystemStates from simplipy.system.v3 import VOLUME_HIGH, VOLUME_LOW, VOLUME_MEDIUM, VOLUME_OFF from homeassistant.components.alarm_control_panel import ( FORMAT_NUMBER, ...
"""Test sensor of Brother integration.""" from datetime import datetime, timedelta import json from unittest.mock import Mock, patch from homeassistant.components.brother.const import DOMAIN from homeassistant.components.brother.sensor import UNIT_PAGES from homeassistant.components.sensor import ( ATTR_STATE_CLAS...
import numpy as np import scipy as sp #==================================================================== # EOSMod: Equation of State Model # eoslib- library of common equation of state models #==================================================================== # mgd_ref_model() # ref_model: BM3, ...
#!/usr/bin/python # Copyright (c) 2014 Jon Maur # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, p...
# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2011 Isaku Yamahata <yamahata at valinux co jp> # # 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 # # h...
# Copyright 2013 Big Switch Networks, 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 ...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ ''' Copyright (c) 2009, Patrick Maupin, Austin, Texas Automated testing for rst2pdf See LICENSE.txt for licensing terms ''' import os import sys import glob import shutil import shlex from copy import copy from opt...
from itertools import islice from six.moves import range import collections import inspect import os import shutil import socket import sys import tempfile from bpython._py3compat import py3 from bpython import config, repl, cli, autocomplete from bpython.test import MagicIterMock, mock, FixLanguageTestCase as TestCas...
# Copyright 2010-2011 OpenStack Foundation # Copyright 2013-2014 Rackspace Hosting # 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://...
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.23 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
""" differential_evolution: The differential evolution global optimization algorithm Added by Andrew Nelson 2014 Modified to add time criteria """ from __future__ import division, print_function, absolute_import import time import numpy as np from scipy.optimize import OptimizeResult, minimize from scipy.optimize.optim...
"""Asuswrt status sensors.""" from __future__ import annotations from dataclasses import dataclass from numbers import Real from homeassistant.components.sensor import ( SensorDeviceClass, SensorEntity, SensorEntityDescription, SensorStateClass, ) from homeassistant.config_entries import ConfigEntry f...
from io import BytesIO import numpy as np from ..core.indexing import NumpyIndexingAdapter from ..core.utils import Frozen, FrozenDict from ..core.variable import Variable from .common import BackendArray, WritableCFDataStore from .file_manager import CachingFileManager, DummyFileManager from .locks import ensure_loc...
# Copyright 2015 Novo Nordisk Foundation Center for Biosustainability, DTU. # 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 ...
# -*- coding: utf-8 -*- # Copyright 2022 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...
# Copyright 2021, Bloomberg Finance L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in wri...
import matplotlib.pyplot as plt import numpy as np from matplotlib import dates import os import pickle from datetime import datetime from pprint import pprint import sys from datetime import timedelta import calendar import math import copy timezone = timedelta(hours = 0) #using zero here b/c most files were writte...
"""Base primititve classes for working with Storm.""" from __future__ import absolute_import, print_function, unicode_literals import io import logging import os import signal import sys from collections import deque, namedtuple from logging.handlers import RotatingFileHandler from os.path import join from threading i...
"""Random collection of usefull functions""" import os from math import log10 import numpy as np from enrico.constants import met_ref,mjd_ref, jd_ref, DAY_IN_SECOND def _log(text, line=True): if line: print("\033[34m"+'# ' + '*' * 60) print("\033[34m"+"# *** %s ***" % text) if line: print "...
# Copyright (c) 2012 Santosh Philip # Copyright (c) 2016 Jamie Bull # ======================================================================= # Distributed under the MIT License. # (See accompanying file LICENSE or copy at # http://opensource.org/licenses/MIT) # ======================================================...
# -*- test-case-name: twisted.trial.test.test_script -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from __future__ import print_function import gc import inspect import os import pdb import random import sys import time import warnings from twisted.internet import defer from twisted.ap...
# 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,...
# -*- coding: utf-8 -*- ''' Swift utility class =================== Author: Anthony Stanton <anthony.stanton@gmail.com> ''' from __future__ import absolute_import # Import python libs import logging from sys import stdout from os import makedirs from os.path import dirname, isdir from errno import EEXIST # Import Sal...
# coding: utf-8 # Copyright (c) 2013 Jorge Javier Araya Navarro <jorgean@lavabit.org> # # This file is free software: you may copy, redistribute 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...
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
from __future__ import unicode_literals import datetime from decimal import Decimal from django.core.exceptions import FieldDoesNotExist, FieldError from django.db.models import ( BooleanField, CharField, Count, DateTimeField, ExpressionWrapper, F, Func, IntegerField, Sum, Value, ) from django.db.models.funct...
# -*- coding: utf-8 -*- # Copyright 2022 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...
#!/usr/bin/env python2.6 ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "Licens...
"""Backend for distributed parameter evaluation.""" import os import shutil from psyrun.backend.base import Backend, JobSourceFile from psyrun.jobs import Job, JobChain, JobArray from psyrun.pspace import dict_concat, missing, Param from psyrun.mapper import map_pspace_hdd_backed from psyrun.store import DefaultStore...
#!/usr/bin/env python3 """Unit tests run as PYTHONPATH=../../.. python3 ./test_valve.py.""" # pylint: disable=too-many-lines # Copyright (C) 2015 Research and Innovation Advanced Network New Zealand Ltd. # Copyright (C) 2015--2019 The Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); #...
""" Copyright (c) 2019 John Robinson Author: John Robinson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge,...
########################################################################## # # Copyright (c) 2019, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
import rospy import roslib import rosgraph_msgs import std_msgs.msg import navigation import heapq import random import database import heapq class Node(object): IDLE = 0 RESPONDING = 1 BUSY = 2 def __init__(self, name): self.name = name self.status = Node.IDLE self.idled = True self.navigator = navigati...
# Copyright (c) 2014 Mirantis, 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...
import os import sys import argparse import datetime import logging import multiprocessing as mp import json import dateutil.relativedelta import numpy as np import pyfolio as pf import pandas as pd from pyfolio import timeseries try: from . import module_loader except: import module_loader try: from . ...
import os import unittest import json import trebek import entities import fakeredis import time import datetime # Reference this SO post on getting distances between strings: # http://stackoverflow.com/a/1471603/98562 def get_clue_json(): with open('test-json-output.json') as json_data: clue = json.load(j...
#<!---------------------------------------------------------------------------> #<!-- ITU - IT University of Copenhagen --> #<!-- SSS - Software and Systems Section --> #<!-- File : OpenCV3D.py --> ...
#!/usr/bin/env python # # Copyright 2017 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. from __future__ import print_function import argparse import collections import contextlib import json import logging import tempfil...
#!/usr/bin/env python #Copyright (C) 2013 by Glenn Hickey # #Released under the MIT license, see LICENSE.txt import unittest import sys import os import argparse import logging import random import numpy as np from teHmm.track import TrackData from teHmm.trackIO import readBedIntervals, getMergedBedIntervals from teH...
"""Beam search parameters tuning for DeepSpeech2 model.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import os import numpy as np import argparse import functools import gzip import logging import paddle.v2 as paddle import _init_paths from ...
data = ( 'Po ', # 0x00 'Feng ', # 0x01 'Zhuan ', # 0x02 'Fu ', # 0x03 'She ', # 0x04 'Ke ', # 0x05 'Jiang ', # 0x06 'Jiang ', # 0x07 'Zhuan ', # 0x08 'Wei ', # 0x09 'Zun ', # 0x0a 'Xun ', # 0x0b 'Shu ', # 0x0c 'Dui ', # 0x0d 'Dao ', # 0x0e 'Xiao ', # 0x0f 'Ji ', # 0x10...
# # Module providing various facilities to other parts of the package # # multiprocessing/util.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # import os import itertools import sys import weakref import atexit import threading # we want threading to install it's ...
"""Array printing function $Id: arrayprint.py,v 1.9 2005/09/13 13:58:44 teoliphant Exp $ """ from __future__ import division, absolute_import, print_function __all__ = ["array2string", "set_printoptions", "get_printoptions"] __docformat__ = 'restructuredtext' # # Written by Konrad Hinsen <hinsenk@ere.umontreal.ca> ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
import director.applogic as app from director import lcmUtils from director import transformUtils from director import visualization as vis from director import filterUtils from director import drcargs from director.shallowCopy import shallowCopy from director.timercallback import TimerCallback from director import vtk...
from __future__ import unicode_literals, division, absolute_import import datetime from math import ceil from flask import jsonify, request from flask_restplus import inputs from flexget.api import api, APIResource from flexget.plugins.api.series import NoResultFound from flexget.plugins.filter import movie_queue as...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2014 IBM Corporation # Copyright 2017-2018 Lenovo # # 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/licens...
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
""" Utilities for transforming the syntax/style/grammar of a document, usually asciidoc or markdown Instantiates Objects derived from the `_sre.SRE_Pattern` class (compiled regular expressions) so they work with regex.sub() """ import logging # Simport regex from copy import copy from nlpia.regexes import Pattern, RE...
import json import pytest import jsonschema from framework.auth.core import Auth from framework.exceptions import PermissionsError from website.settings import DOI_FORMAT, DATACITE_PREFIX from website.project.licenses import set_license from osf.models import FileMetadataSchema, NodeLicense, NodeLog from osf_tests.fac...
#!/usr/bin/env python """ Try out different partition assignment algorithms on a simulation trace, and evaluate their performance. """ import argparse import math import matplotlib.pyplot as plt import numpy as np import os import pickle def ParseArguments(): parser = argparse.ArgumentParser(description="Plot ti...
# coding: utf-8 """Website building routines.""" import os import shutil import traceback from publicstatic import conf from publicstatic import const from publicstatic import logger from publicstatic import helpers from publicstatic import templates def order(): """Returns a sequence of builder functions.""" ...
# Copyright 2017 IBM Corp. # # 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 a...
# Django settings for testdjango project. import os try: from local_settings import APP_NAME, COMMENTS_APP except ImportError: APP_NAME = "tb" COMMENTS_APP = "CommentRecaptcha" DEBUG = False TEMPLATE_DEBUG = DEBUG SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) ADMINS = ( ('Admini...
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 i...
<<<<<<< HEAD #!/usr/bin/env python # # nginx-updater.py - updates nginx proxy based on udp requests from __future__ import print_function import socket import re import time import os from select import select import itertools import StringIO import hashlib import sys import subprocess class Request: """Represents ...
import json import os from datetime import datetime from tempfile import NamedTemporaryFile from time import strftime, strptime from django.conf import settings from django.contrib.auth.models import User from django.core.files.storage import FileSystemStorage from django.core.files.storage import get_storage_class fr...
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
""":mod:`sqlalchemy_imageattach.entity` --- Image entities ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module provides a short way to attach resizable images to other object-relationally mapped entity classes. For example, imagine there's a fictional entity named :class:`User` and it has its :attr...
import os import sys import time from copy import deepcopy from typing import Any, Dict, List, Tuple, Union from urllib.parse import urljoin from django.template.loaders import app_directories import zerver.lib.logging_util from scripts.lib.zulip_tools import get_tornado_ports from zerver.lib.db import TimeTrackingCo...