gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013, Big Switch Networks, 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...
from __future__ import print_function from __future__ import division from __future__ import unicode_literals from __future__ import absolute_import # Techniques to smooth jumps in location tracking. Each of these returns a # boolean mask of inliers and outliers. We assume that the incoming dataframe # has a column cal...
# -*- encoding: utf-8 -*- """The home of the various metrics we gather.""" import logging import os import socket from abc import ABCMeta from abc import abstractmethod from datetime import datetime from datetime import timezone import boto3 import psutil class Metric(metaclass=ABCMeta): """ABC for metrics we tr...
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe import os, json from frappe import _ from frappe.modules import scrub, get_module_path from frappe.utils import flt, cint, get_html_format, cstr from frappe.transl...
# 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 ...
""" Testing for the gradient boosting module (sklearn.ensemble.gradient_boosting). """ import warnings import numpy as np from itertools import product from scipy.sparse import csr_matrix from scipy.sparse import csc_matrix from scipy.sparse import coo_matrix from sklearn import datasets from sklearn.base import clo...
# Copyright 2014 Cloudbase Solutions Srl # # 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...
from urllib.request import urlretrieve from os.path import isfile, isdir from tqdm import tqdm import problem_unittests as tests import tarfile cifar10_dataset_folder_path = 'cifar-10-batches-py' class DLProgress(tqdm): last_block = 0 def hook(self, block_num=1, block_size=1, total_size=None): self...
# -*- coding: utf-8 -*- import uuid from django.conf import settings from django.conf.urls import url from django.contrib.auth import authenticate, login from django.core.mail import EmailMessage from django.http import Http404 from django.shortcuts import render, redirect from django.template import loader from djang...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' # Selenium Framework A framework built around the Selenium WebDriver to simplify the basic capabilities that are most frequently used (in my experience anyway). ''' __title__ = 'Selenium Framework' __version__ = '0.5.0' __copyright__ = '2011 - 2020' __author__ = 'John ...
from collections import defaultdict from itertools import tee, chain, combinations from pgmpy.factors.discrete import DiscreteFactor from pgmpy.factors import factor_product from pgmpy.inference import Inference, BeliefPropagation class DBNInference(Inference): def __init__(self, model): """ Clas...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2011 Nexenta Systems, 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.apa...
# -*- coding: utf-8 -*- from django.conf import settings from django.http import HttpResponse from django.test import TestCase, override_settings from django_auth_ldap.backend import _LDAPUser from django.test.client import RequestFactory from typing import Any, Callable, Dict, Optional, Text from builtins import objec...
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software wit...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
from collections import OrderedDict from django.conf import settings from django.contrib import messages from django.contrib.auth import update_session_auth_hash from django.contrib.auth import views as auth_views from django.db import transaction from django.forms import Media from django.http import Http404 from dja...
#!/usr/bin/env python3 from auto.config import ARM, GOPTS, RV32, SBT, TOOLS, X86 from auto.utils import cat, path, unique class ArchAndMode: def __init__(self, farch, narch, mode=None): self.farch = farch self.narch = narch self.mode = mode # get arch prefix string def prefix(self...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
""" The rechunk module defines: intersect_chunks: a function for converting chunks to new dimensions rechunk: a function to convert the blocks of an existing dask array to new chunks or blockshape """ from __future__ import absolute_import, division, print_function import heapq from itertools ...
# coding=utf-8 # Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
# # ESPrinkler2 testserver.py # # This is a smiple server so data-uncompressed can be tested # and edited using a local browser to http://localhost # Note that data-uncompressed does not save config.json nor sched.json # This server saves that data as strings # Similarly current time and zone status are simulated # imp...
# -*- coding: utf-8 -*- """SQLite parser plugin for Android call history database files.""" from dfdatetime import java_time as dfdatetime_java_time from plaso.containers import events from plaso.containers import time_events from plaso.parsers import sqlite from plaso.parsers.sqlite_plugins import interface class ...
# Copyright (C) 2013 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 ...
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license ## Copyright (C) 2005 Guillaume Valadon <guedou@hongo.wide.ad.jp> ## Arnaud Ebalard <arnaud.ebalard@...
# Copyright (C) 2016, Red Hat, 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...
# -*- coding: utf-8 -*- """This file contains a MRUList Registry plugin. Also see: https://winreg-kb.readthedocs.io/en/latest/sources/explorer-keys/Most-recently-used.html """ import abc import os from dtfabric.runtime import data_maps as dtfabric_data_maps from plaso.containers import events from plaso.containers ...
{% if cookiecutter.use_sentry == 'y' -%} import logging {% endif -%} from .base import * # noqa from .base import env # GENERAL # ------------------------------------------------------------------------------ # https://docs.djangoproject.com/en/dev/ref/settings/#secret-key SECRET_KEY = env('DJANGO_SECRET_KEY') # htt...
# # Training a Network w/Tensorflow # # PART 3 - Multiple images # # refer: # 4 imgs, 128x128, 10 iter: biswal home 38.9s; cyclop (vm): 7.7s # 16 imgs, 128x128, 3 iter: biswal home 46.8s; cyclop (vm): 8.3s # 16 imgs, 128x128, 10 iter: biswal home: 151.8s; cyclop (vm): 30.2s # 16 imgs, 128x128, 1k iter:...
#!/usr/bin/env python """ The Computer Language Benchmarks Game http://benchmarksgame.alioth.debian.org/ regex-dna Python 3 #5 program: contributed by Dominique Wahli 2to3 modified by Justin Peel fasta Python 3 #3 program: modified by Ian Osgood modified again by Heinrich Acker modified by Justin Peel Modified by Chr...
# -*- coding: utf-8 -*- """ Django settings for icecreamratings project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ from __future__ import absolute_import, uni...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import itertools import httplib as http import logging import math import os import requests import urllib import waffle from django.apps import apps from django.db.models import Count from flask import request, send_from_directory, Response, stream_with_...
import sys import json from torch.utils.data import DataLoader from sentence_transformers import SentenceTransformer, LoggingHandler, util, models, evaluation, losses, InputExample import logging from datetime import datetime import gzip import os import tarfile import tqdm from torch.utils.data import Dataset import r...
# django-openid-auth - OpenID integration for django.contrib.auth # # Copyright (C) 2007 Simon Willison # Copyright (C) 2008-2010 Canonical Ltd. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions o...
try: frozenset except NameError: # Import from the sets module for python 2.3 from sets import Set as set from sets import ImmutableSet as frozenset try: from collections import deque except ImportError: from utils import deque from constants import contentModelFlags, spaceCharacters from c...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Removing unique constraint on 'PendingProjectMember', fields ['project', 'email'] db.delete_unique('sentry_pendi...
""" Tests for youtube api """ import random import string import pytest from googleapiclient.errors import HttpError from cloudsync.conftest import MockHttpErrorResponse from cloudsync.youtube import YouTubeApi, YouTubeUploadException, strip_bad_chars from ui.constants import VideoStatus from ui.factories import Vide...
from direct.actor import Actor from direct.directnotify.DirectNotifyGlobal import * from direct.distributed import ClockDelta from direct.interval.IntervalGlobal import * from direct.showbase import PythonUtil from direct.showutil import Rope from direct.task import Task from pandac.PandaModules import * import Distri...
#!/usr/bin/python import argparse import re import os class Sample: def __init__(self,id,file): self.id = id self.file = file def process_input(): ############## # INPUT PROCESSSING ############## calling_dir = os.path.dirname(os.path.realpath(__file__)) print "#####################################...
"""kytos.utils.napps tests.""" import json import re import tempfile import unittest from pathlib import Path, PurePosixPath from unittest.mock import MagicMock, Mock, PropertyMock, call, patch from urllib.error import HTTPError from kytos.utils.exceptions import KytosException from kytos.utils.napps import NAppsManag...
#!/usr/bin/python # Copyright 2018 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 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # fsfs-reshard.py REPOS_PATH MAX_FILES_PER_SHARD # # Perform an offline conversion of an FSFS repository between linear (format # 2, usable by Subversion 1.4+) and sharded (format 3, usable by Subversion # 1.5+) layouts. # # The MAX_FILES_PER_SHARD argument specifies the...
# Waltz # Compare results between wild type and mutant # coding=utf-8 import numpy as np import matplotlib.pyplot as plt import pandas as pd import csv from scipy import stats from pylab import plot, show, savefig, xlim, figure, \ hold, ylim, legend, boxplot, setp, axes import pylab from numpy import *...
""" API for the command-line I{pyflakes} tool. """ from __future__ import with_statement import ast import os import platform import re import sys from pyflakes import checker, __version__ from pyflakes import reporter as modReporter __all__ = ['check', 'checkPath', 'checkRecursive', 'iterSourceCode', 'main'] PYTHO...
# -*- coding: utf-8 -*- """ Synchronisation - Controllers @author: Amer Tahir """ module = "admin" module_name = T("Synchronization") log_table = "sync_log" conflict_table = "sync_conflict" sync_peer = None sync_policy = None import_export_format = "xml" # Options Menu (available in all Functions' Views) # - ...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Email' db.create_table('sentry_email', ( ('id...
# No shebang line, this module is meant to be imported # # Copyright 2014 Oliver Palmer # # 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 # # U...
# 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...
#!/usr/bin/env python """ @package mi.dataset.parser.flort_dj_dcl @file marine-integrations/mi/dataset/parser/flort_dj_dcl.py @author Steve Myerson @brief Parser for the flort_dj_dcl dataset driver This file contains code for the flort_dj_dcl parsers and code to produce data particles. For telemetered data, there is ...
import warnings warnings.filterwarnings('ignore') import tensorflow as tf import numpy as np import pickle import time import sys import os import nltk sys.path.append(os.path.dirname(os.path.abspath(__file__))+'/../') from dnc import DNC from recurrent_controller import StatelessRecurrentController def bleu_scor...
# Copyright 2012 IBM # 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 applicabl...
############################################################################ ## ## Copyright (C) 2006-2008 University of Utah. All rights reserved. ## ## This file is part of VisTrails. ## ## This file may be used under the terms of the GNU General Public ## License version 2.0 as published by the Free Software Foundat...
""" Classes and functions used to visualize data for thermo scientific analyzers """ from pandas import Series, DataFrame import pandas as pd import datetime as dt import matplotlib.pyplot as plt import numpy as np from matplotlib import dates as d import os import math import glob import matplotlib import warnings i...
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """An example functional test The module-level docstring should include a high-level description of what the t...
# # flightlines_to_single_CHM_pit_free.py # # (c) 2014, martin isenburg - http://rapidlasso.com # rapidlasso GmbH - fast tools to catch reality # # This LAStools pipeline turns a folder full of LAS # or LAZ files (assumed to raw flightlines) into a # single pit-free CHM using the algorithms described # by A. Khosra...
# Accelerator for pip, the Python package manager. # # Authors: # - Adam Feuer <adam@adamfeuer.com> # - Peter Odding <peter.odding@paylogic.com> # Last Change: March 4, 2016 # URL: https://github.com/paylogic/pip-accel # # A word of warning: Do *not* use the cached_property decorator here, because # it interacts badl...
# Copyright (c) 2006-2009 The Trustees of Indiana University. # All rights reserved. # # Redistribution and use in source and binary forms, with or without ...
"""Tests for sgf_grammar.py.""" import unittest from betago.gosgf import sgf_grammar class SgfGrammarTestCase(unittest.TestCase): def test_is_valid_property_identifier(tc): ivpi = sgf_grammar.is_valid_property_identifier tc.assertIs(ivpi(b"B"), True) tc.assertIs(ivpi(b"PB"), True) ...
#!/usr/bin/env python #=============================================================================== # Copyright (c) 2014 Geoscience Australia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: ...
from collections import defaultdict from unittest.mock import Mock, patch from ctf_gameserver.lib.database import transaction_cursor from ctf_gameserver.lib.test_util import DatabaseTestCase from ctf_gameserver.controller import controller, database @patch('ctf_gameserver.controller.database.update_scoring') class M...
# Copyright 2015 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/LICENSE-2.0 # # Unless required by applica...
"""Default variable filters.""" import re from decimal import Decimal, InvalidOperation, ROUND_HALF_UP import random as random_module try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.4 fallback. from django.template.base import Variable, Library from d...
############################################################################### ## ## Copyright (C) 2011-2014 Tavendo GmbH ## ## 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 (c) 2019 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...
# Copyright 2017-2018 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 la...
from django.shortcuts import render, render_to_response, redirect, get_object_or_404 from django.contrib.auth import authenticate, login , logout from .models import Course, Department, User, Student, ExamPaper, Material, Announcement, CourseAllotment, Bookmark, Feedback, Contributor, Stat from .forms import RegisterFo...
import os import matplotlib.pyplot as plt import matplotlib matplotlib.style.use('ggplot') import itertools import pandas as pd import numpy as np from datetime import datetime # This project import stroke_cleaning colors = itertools.cycle(["r", "b", "g", "k", "c", "m", "y"]) #def plot_features_from_audio(audio, fe...
""" LLDB AppKit formatters part of The LLVM Compiler Infrastructure This file is distributed under the University of Illinois Open Source License. See LICENSE.TXT for details. """ # example synthetic children and summary provider for CFString (and related NSString class) # the real code is part of the LLDB core import...
from __future__ import unicode_literals from __future__ import print_function from .context import dataindex from .context.tools import to_expression from .compat import implements_to_string, text_type from .context.missing import is_missing from .interface import unproxy from pyparsing import ( Word, WordEnd...
# Copyright (c) 2012 - 2014 EMC Corporation, 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 # # ...
import os import numpy import shutil import json from shock import Client as ShockClient from biokbase.CompressionBasedDistance.Helpers import extract_seq, run_command, make_job_dir, timestamp, CommandError from biokbase.userandjobstate.client import UserAndJobState from multiprocessing import Pool from itertools impor...
# pylint: disable=W0611 ''' simpleOSC 0.2 ixi software - July, 2006 www.ixi-software.net simple API for the Open SoundControl for Python (by Daniel Holth, Clinton McChesney --> pyKit.tar.gz file at http://wiretap.stetson.edu) Documentation at http://wiretap.stetson.edu/docs/pyKit/ The main...
from sqlalchemy.exc import NoSuchTableError from sqlalchemy import schema as sa_schema, types as sqltypes import logging from .. import compat from .render import _render_server_default from sqlalchemy.util import OrderedSet log = logging.getLogger(__name__) def _run_filters(object_, name, type_, reflected, compare_...
from __future__ import unicode_literals from reviewboard.hostingsvcs.models import HostingServiceAccount from reviewboard.hostingsvcs.service import HostingService from reviewboard.reviews.models import ReviewRequest from reviewboard.scmtools.models import Repository from reviewboard.site.urlresolvers import local_sit...
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# -*- coding: utf-8 -*- """Test CLR field support.""" import System import pytest from Python.Test import FieldTest def test_public_instance_field(): """Test public instance fields.""" ob = FieldTest() assert ob.PublicField == 0 ob.PublicField = 1 assert ob.PublicField == 1 with pytest.rai...
# Copyright 2014 Cloudbase Solutions Srl # 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 r...
#!/usr/bin/env python """Utils exporting data from AFF4 to the rest of the world.""" import os import Queue import stat import time import logging from grr.lib import aff4 from grr.lib import client_index from grr.lib import rdfvalue from grr.lib import sequential_collection from grr.lib import serialize from grr.li...
from typing import Any, Dict, List, Optional, Union from django.conf import settings from django.http import HttpRequest, HttpResponse from django.shortcuts import redirect from django.utils.translation import gettext as _ from zerver.decorator import require_member_or_admin, require_realm_admin from zerver.forms imp...
# mysql/reflection.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import re from ... import log, util from ... import types as sqltypes from .enum...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2011 Ken Pepple # # Licensed under the Apache License, Versio...
""" python version of the mlayer code in shadow for reflectivity scans TODO: graded multilayers TODO: vectorization """ __author__ = 'srio' # import numpy import scipy.constants as codata tocm = codata.h*codata.c/codata.e*1e2 # 12398.419739640718e-8 from srxraylib.util.h5_simple_writer import H5SimpleWriter #...
# # 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 us...
""" Cause-effect models. """ # Author: Jose A. R. Fonollosa <jarfo@yahoo.com> # # License: Apache, Version 2.0 from multiprocessing import Pool import numpy as np from sklearn import pipeline from sklearn.base import BaseEstimator from sklearn.ensemble import GradientBoostingClassifier import features as f gbc_pa...
from django.shortcuts import get_object_or_404 from rest_framework import generics, permissions as drf_permissions from rest_framework.exceptions import NotFound, ValidationError, PermissionDenied from api.base.exceptions import Gone from api.base import permissions as base_permissions from api.base.views import JSONA...
from conans.model.options import Options, PackageOptions, OptionsValues from conans.model.requires import Requirements from conans.model.build_info import DepsCppInfo from conans import tools # @UnusedImport KEEP THIS! Needed for pyinstaller to copy to exe. from conans.errors import ConanException from conans.model.en...
#!/usr/bin/env python from bs4 import BeautifulSoup import glob import json ############################################# # Convert Hearthstone card data XML to JSON # ############################################# __author__ = "Taylor Caldwell - http://github.com/rithms" __copyright__ = "Copyright 2015, Taylor Caldw...
# -*- 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...
import re from datetime import datetime from typing import Dict, List, Optional, Tuple from urllib.parse import urlparse import pytest from bs4 import BeautifulSoup from werkzeug.test import Client from backend.common.consts.account_permission import AccountPermission from backend.common.consts.event_type import Even...
# -*- coding: utf-8 -*- # Copyright (C) 2014-2020, imageio contributors # # imageio is distributed under the terms of the (new) BSD License. # The full license can be found in 'license.txt'. # styletest: skip """ Release: * Write release notes * Increase __version__ * git tag the release (and push the tag to ...
#!/usr/bin/env python import openravepy import unittest import numpy from openravepy import Environment from prpy.clone import CloneException from prpy.planning.base import PlanningError from prpy.planning.cbirrt import CBiRRTPlanner from prpy.planning.ompl import OMPLPlanner, OMPLSimplifier from prpy.planning.retimer ...
import numpy as np import tensorflow as tf import awesome_gans.modules as t tf.set_random_seed(777) # reproducibility np.random.seed(777) # reproducibility he_normal = tf.contrib.layers.variance_scaling_initializer(factor=1.0, mode='FAN_AVG', uniform=True) l2_reg = tf.contrib.layers.l2_regularizer def pixel_norm...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'FileBlob.storage_options' db.delete_column(u'sentry_file...
# Natural Language Toolkit: API for Corpus Readers # # Copyright (C) 2001-2013 NLTK Project # Author: Steven Bird <sb@ldc.upenn.edu> # Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ API for corpus readers. """ from __future__ import un...
"""Undocumented Module""" __all__ = ['DirectGuiBase', 'DirectGuiWidget'] from panda3d.core import * from panda3d.direct import get_config_showbase from . import DirectGuiGlobals as DGG from .OnscreenText import * from .OnscreenGeom import * from .OnscreenImage import * from direct.directtools.DirectUtil import ROUND...
# Copyright 2020 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. """Test apps for running tests using xcodebuild.""" import os import plistlib import struct import subprocess import time import shard_util import test_runn...
import functools import hashlib import json import random import uuid from operator import attrgetter from django import http from django.conf import settings from django.db.models import Q from django.shortcuts import (get_list_or_404, get_object_or_404, redirect, render) from django.uti...
# Copyright 2011 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/bin/env python3 # # Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
"""Support for Bluesound devices.""" import asyncio from asyncio import CancelledError from datetime import timedelta import logging from urllib import parse import aiohttp from aiohttp.client_exceptions import ClientError from aiohttp.hdrs import CONNECTION, KEEP_ALIVE import async_timeout import voluptuous as vol im...
import pytest from rpyre.interface.lua import compile_re from rpyre.matching import find from rpyre.nfa import ( StateMatch, StateChar, StateSplit, StateDot, StateCharRange, ) class TestLuaPatternsFind(object): def test_simple_or(self): expr = compile_re('(aa|bb)') result = find(expr, 'xyzabb...