text stringlengths 2 999k |
|---|
import json
import pytz
import time
import re
import datetime
from logging import warn
from SeleniumLibrary.utils import is_noney
from robot.libraries.BuiltIn import BuiltIn
from SeleniumLibrary import ElementFinder
from SeleniumLibrary.errors import ElementNotFound
from SeleniumLibrary.keywords.waiting import Waitin... |
#
# This class was auto-generated from the API references found at
# https://support.direct.ingenico.com/documentation/api/reference/
#
from ingenico.direct.sdk.api_resource import ApiResource
from ingenico.direct.sdk.call_context import CallContext
from ingenico.direct.sdk.response_exception import ResponseException
f... |
"""
Transport adapters gibme-crypto uses to define and maintain connections.
"""
from __future__ import annotations
import asyncio
import socket
from typing import Any, Optional, Tuple
import websockets
from aiohttp import ClientResponse, ClientSession, ClientTimeout
TIMEOUT = ClientTimeout(total=60)
REPLY_TIMEOUT ... |
"""
Script that contains different click options and the functions to add them to the click command.
FIXME
"""
import click
def add_options(options):
"""decorator to pass list of options to click commands."""
def _add_options(func):
for option in reversed(options):
func = option(func)
... |
import asyncio
from typing import List, Optional, Coroutine
from opal_common.logger import logger
from opal_common.git.repo_watcher import RepoWatcher
class RepoWatcherTask:
"""
Manages the asyncio tasks of the repo watcher
"""
def __init__(self, repo_watcher: RepoWatcher):
self._watcher = re... |
import LibCall
from .module import Module
from .. import functional as F
class _InstanceNorm(Module):
def __init__(
self,
num_features,
eps=1e-5,
momentum=0.1,
affine=False,
track_running_stats=False,
):
super(_InstanceNorm, self).__init__()
self... |
"""Test plot utils."""
from pyei.plot_utils import * # pylint:disable=wildcard-import,unused-wildcard-import
|
from __future__ import annotations
from unittest import TestCase
from tests.classes.cb_product import CBProduct
from tests.classes.cbm_product import CBMProduct
from tests.classes.cbo_product import CBOProduct
class TestDecoratedOnDelete(TestCase):
def test_callback_are_called_for_existing_objects_on_delete(self... |
#!/usr/bin/env python3
n, m, a, b, *c = map(int, open(0).read().split())
for i in range(m):
if n <= a:
n += b
n -= c[i]
if n < 0:
print(i+1)
exit()
print("complete") |
# Generated by Django 2.2.13 on 2020-09-16 21:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('reo', '0075_remove_loadprofilemodel_year_one_electric_load_series_kw_bau'),
]
operations = [
migrations.RenameField(
model_name... |
"move_mean template"
from copy import deepcopy
import bottleneck as bn
__all__ = ["move_mean"]
FLOAT_DTYPES = [x for x in bn.dtypes if 'float' in x]
INT_DTYPES = [x for x in bn.dtypes if 'int' in x]
# Float dtypes (no axis=None) -----------------------------------------------
floats = {}
floats['dtypes'] = FLOAT_... |
"""Tests for sf_card_viewer.py."""
import pytest
from tests.testlibraries.instance_resource import InstanceResource
from tests.testlibraries.row_data import ZaimRowData
from zaimcsvconverter import CONFIG
from zaimcsvconverter.inputcsvformats.sf_card_viewer import (
SFCardViewerEnterExitRow,
SFCardViewerRow,
... |
"""Helper script for interacting with dataframes"""
import pandas as pd
from pyspark.sql import DataFrame, SparkSession
def read_csv(spark: SparkSession, file_path: str) -> DataFrame:
"""Converts a CSV into a spark DataFrame"""
spark.conf.set('spark.sql.execution.arrow.enabled', 'true')
dframe = pd.read_c... |
#导入必要的库
from tkinter import *
import tkinter.messagebox
from tkinter import filedialog
#新建主窗口
window = Tk()
#初始化主窗口
window.title("Jvav编辑器——让您的智商降低")
window.geometry("550x650")
window.iconbitmap("icon.ico")
#————函数区————
#新建文件函数
def newFile():
#获取用户的文本输入
INPUT = text.get("0.0","end")
#如果用户有输入,那... |
#!/usr/bin/env python
#
# 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 requir... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# @trojanzhex
from bot import Bot
Bot().run() |
#перебор всех вариантов минимизации булевых функций n-аргументов
def getSdnf(vector, n):
sdnf = []
argCount = 1 << n
arg = 0
while (arg < argCount):
if ((vector >> arg) & 1):
sdnf.append(getConstituent(arg, n))
arg = arg + 1
return sdnf
def getConstituent(arg, n):
... |
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------... |
# Copyright 2015, Banashankar Veerad, Copyright IBM Corporation
#
# 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... |
from fontTools.misc.testTools import parseXML, getXML
from fontTools.misc.textTools import deHexStr
from fontTools.ttLib import TTFont, newTable, TTLibError
from fontTools.misc.loggingTools import CapturingLogHandler
from fontTools.ttLib.tables._h_m_t_x import table__h_m_t_x, log
import struct
import unittest
class H... |
import random
import string
import pandas as pd
from . import config
from . import utils
def nomer_dokumen():
pass
def nomer_faktur():
pass
def tanggal_faktur():
pass
# ====== identitas pemilik ====== #
def degree(name, csv_path = None):
if csv_path == None:
csv_path = config.csv_gelar
... |
#
# 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... |
# coding: utf-8
"""
Katib
Swagger description for Katib # noqa: E501
OpenAPI spec version: v1beta1-0.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from kubeflow.katib.models.v1beta1_feasible_space import V1beta1Feasib... |
"""TODO(kor_nli): Add a description here."""
from __future__ import absolute_import, division, print_function
import os
import datasets
# TODO(kor_nli): BibTeX citation
_CITATION = """\
@article{ham2020kornli,
title={KorNLI and KorSTS: New Benchmark Datasets for Korean Natural Language Understanding},
author={... |
from datacode.summarize.subset.outliers.typing import DfDict
from datacode.typing import DocumentOrTable
import pyexlatex.table as lt
from pyexlatex import Document
def df_dict_to_table(df_dict: DfDict, as_document: bool=False,
author: str=None, caption: str=None) -> DocumentOrTable:
table = ... |
from __future__ import division
from builtins import object
import numpy as np
import pandas as pd
from featuretools.utils import is_string
class Variable(object):
"""Represent a variable in an entity
A Variable is analogous to a column in table in a relational database
Args:
id (str) : Id of... |
#!/usr/bin/env 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 require... |
# 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.
import logging
import math
from crash import crash_util
from crash.changelist_classifier import GetStackInfosForFilesGroupedByDeps
from crash.loglinear.chan... |
import copy
from hearthbreaker.agents.basic_agents import DoNothingAgent
class CardTestingAgent(DoNothingAgent):
def __init__(self, play_on=1):
super().__init__()
self.player = None
def do_turn(self, player):
self.player = player
while len(player.hand) > 0 and player.hand[0]... |
#! /usr/bin/env python
import roslib
roslib.load_manifest('free_gait_action_loader')
from free_gait_action_loader import *
from free_gait import *
import rospy
import actionlib
import free_gait_msgs.msg
import free_gait_msgs.srv
import std_srvs.srv
import traceback
from actionlib_msgs.msg import *
import thread
class... |
def partition(nums, left, right, pivot):
# pivot的值移到最右端
nums[pivot], nums[right] = nums[right], nums[pivot]
# nums[left:right-1] 根据nums[rigth]的值进行划分
target = nums[right]
# 小于区的右边界
lessRight = left - 1
# 大于区的左边界
moreLeft = right
# 循环控制变量,标记来到数组中的位置
i = left
while i < moreLeft... |
# coding: utf-8
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "lice... |
# -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import Authenticati... |
import struct
import collections
from ..dmu.configuration_field import CONFIGURATION_FIELD_DEFINES_SINGLETON
from ..dmu.eeprom_field import EEPROM_FIELD_DEFINES_SINGLETON
from .dmu_field_parser import decode_value
class DMU_PACKET_STATUS(object):
PREV_PACKET_TYPE = ''
PREV_TIME_FIELD_VALUE = ''
PRE_ELAPSE... |
"""Generate json form isabellaalstrom."""
from customjson.defaults import REUSE, VISIT
def get_isabellaalstrom(github, selected_repos):
"""Generate json form isabellaalstrom."""
org = "isabellaalstrom"
data = {}
repos = []
all_repos = ["krisinfo-card", "pollenkoll-card"]
if selected_repos:
... |
# Copyright 2022 MosaicML Composer authors
# SPDX-License-Identifier: Apache-2.0
"""Hyperparameters for callbacks."""
from __future__ import annotations
import abc
import textwrap
from dataclasses import asdict, dataclass
from typing import Optional, Union
import yahp as hp
from composer.callbacks.checkpoint_saver ... |
# 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... |
from django.contrib import admin
from django_peeringdb.models import (
Facility,
InternetExchange,
InternetExchangeFacility,
IXLan,
IXLanPrefix,
Network,
NetworkContact,
NetworkFacility,
NetworkIXLan,
Organization,
)
class HandleRefAdminMixIn:
"""Dummy MixIn that just hide... |
import colorama
# Some ANSI escape sequences for colours and effects
BLACK = '\u001b[30m'
RED = '\u001b[31m'
GREEN = '\u001b[32m'
YELLOW = '\u001b[33m'
BLUE = '\u001b[34m'
MAGENTA = '\u001b[35m'
CYAN = '\u001b[36m'
WHITE = '\u001b[37m'
RESET = '\u001b[0m'
BOLD = '\u001b[1m'
UNDERLINE = '\u001b[4m'
REVERSE = '\u001b[7... |
#!/share/software/user/open/python/3.6.1/bin/python3
from src.ModelDriver import *
## MODIFY THESE PARAMS FOR SPECIFIC RUN ###
X_train = "/oak/stanford/groups/aboettig/Aparna/NNproject/clean_data/train_5.23.18_unbalanced_unaugmented_xyz.txt"
Y_train = "/oak/stanford/groups/aboettig/Aparna/NNproject/clean_data/train_5.... |
#!/usr/bin/env python3
"""
Generate a generator.py from currently built payload
"""
import os
import sys
import argparse
# Configs
# Used to change some usual settings
ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
VERSION = "1.0.0"
# architecture: endianness (1 for little, 2 for big)
ARCHITECTUR... |
from parity import parse_conferences
from nose.tools import assert_equals
from StringIO import StringIO
CONFERENCE_2010 = StringIO("""
3
Major Teams
ACC
Boston College"
Clemson"
Big 12
Colorado"
Iowa State"
Texas A&M"
""")
OUTPUT_2010 = {
"year": 2010,
"conferences": [
{
"name... |
"""
Model for the cases
"""
# Import from libraries
import jsonpatch
import logging as log
from sqlalchemy.dialects.postgresql import JSON
from sqlalchemy.exc import DBAPIError, IntegrityError
# Import from internal modules
from .base_data_model import BaseDataModel
from cornflow_core.exceptions import InvalidPatch, ... |
import asyncio
import itertools
import logging
import time
from collections import UserList
from async_generator import async_generator, yield_
from .messageparse import MessageParseMethods
from .uploads import UploadMethods
from .. import utils
from ..tl import types, functions, custom
__log__ = logging.getLogger(_... |
"""
Django settings for django7h project.
Generated by 'django-admin startproject' using Django 3.2.8.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathli... |
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that ... |
"""
This function is kinda nice.
"""
def Nice():
pass
for i in [1, 2, 3]:
print(i)
|
## @file
# This file is used to save global datas used by ECC tool
#
# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. Th... |
class ElectricalSystem(MEPSystem, IDisposable):
""" Provides access to the Electrical System in Autodesk Revit MEP. """
def AddToCircuit(self, components):
"""
AddToCircuit(self: ElectricalSystem,components: ElementSet) -> bool
Add a set of exist components to the Electrical System.
... |
import json
import pytest
import datacraft
import datacraft.builder as builder
from datacraft import distributions, DataSpec, SpecException
def test_api_builder():
# raw data for both specs
animal_names = ['zebra', 'hedgehog', 'llama', 'flamingo']
action_list = ['fling', 'jump', 'launch', 'dispatch']
... |
# -*- coding: utf-8 -*-
from api.document.doc_base import ApiHolder, ExampleParam
#define api mannager as a globe variable
api_manager = ApiHolder()
ex = ExampleParam({}, 'ex')
|
from flask import render_template, request
from . import main
@main.app_errorhandler(403)
def forbidden(e):
return render_template('403.html'), 403
@main.app_errorhandler(404)
def page_not_found(e):
if request.accept_mimetypes.accept_json and not request.accept_mimetypes.accept_html:
response = jsonify({'... |
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'conditions': [
# In component mode (shared_lib), we build all of skia as a single DLL.
# However, in the static mode, we need to build skia ... |
name = "mailsender"
|
# This file is generated by /home/patrick/Documents/PPText/PPTexEnv_x86_64/build/scipy/-c
# It contains system_info results at the time of building this package.
__all__ = ["get_info","show"]
atlas_3_10_blas_info={}
atlas_3_10_blas_threads_info={}
atlas_threads_info={}
blas_opt_info={'libraries': ['f77blas', 'cblas', ... |
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _
class CMSPluginNewsPlusConfig(AppConfig):
name = 'cmsplugin_newsplus'
verbose_name = _('News App')
|
from ruamel.yaml import SafeLoader
from yamlmacros import get_loader
from sublime_lib import ResourcePath
__all__ = ['get_extensions']
def parse_documents(text):
loader = SafeLoader(text)
composer = loader.composer
while composer.check_node():
yield composer.get_node()
def get_extensions(base... |
import re
import macholib
from .errors import MachoError
from .dependency import _list_dependencies_macho, _change_command_data_inplace, \
_find_lc_dylib_command
from .detect import detect_macho_type
from .misc import _install_name_macho, _change_id_dylib_command
from .rpath import _add_rpath_to_header, _list... |
"""
Bayesian analysis of multiple observations of rare events
each observation characterized by n_i counts in time t_i
using eq. 2.14b of gelman et al, DBA3 chapter 2.6
"""
import random as rn
import numpy as np
import matplotlib.pyplot as plt
import kimpy_utilities as ku
from math import *
import sys
percentsign = '%'... |
#!/usr/bin/env python
"""Prepare GFF transcript files for use as input to RNA-seq pipelines
Usage, from within the main genome directory of your organism:
prepare_tx_gff.py <organism> <org_build>
requires these python and external packages which come pre-installed
with bcbio using bioconda:
mysql-python
gffutils
r... |
'''#
# name : connection.py
## synopsis
Realiza la conexión con la base de datos
```python
N/A
```
## examples
```python
N/A
```
## description
Realiza la conexión con la base de datos y retorna dicha conexión mediante una función
## arguments
N/A
## requirements
Nombre de la base de datos
URL de la base de datos
E... |
import contextlib
import hashlib
import json
import logging
import re
import six
import sys
import socket as _socket
from six.moves.urllib.parse import urlparse
from django.utils.functional import cached_property
from scrapy import Request
from scrapy.settings import Settings
from splash.browser_tab import JsError
fr... |
"""Preprocessing."""
import argparse
import io
from collections import Counter
from pathlib import Path
UNK = "<unk>"
def normalize_tok(tok):
if tok.isnumeric():
tok = "N"
return tok
def _linearize(fout, train_file, vocab, ignore_cat_label):
"""Convert column to one-per-line format."""
with... |
#!/usr/bin/env python
# coding: utf-8
"""
create at 2017/11/7 by allen
"""
module_priority_chain = [
'sqlalchemy',
'redis_manager',
]
|
#!/usr/bin/env python3
# Copyright (c) 2015-2016 The LipCoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import socket
import os
from test_framework.socks5 import Socks5Configuration, Socks5Command, Socks5Serv... |
"""Test circulation-specific extensions to the self-test infrastructure."""
import datetime
from StringIO import StringIO
from core.testing import DatabaseTest
from core.model import (
ExternalIntegration,
)
from core.opds_import import (
OPDSImportMonitor,
)
from api.authenticator import BasicAuthenticationPr... |
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... |
"""
Autopsy Forensic Browser
Copyright 2016-17 Basis Technology Corp.
Contact: carrier <at> sleuthkit <dot> org
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/L... |
# -*- coding: utf-8 -*-
"""
Django settings for syssel 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, unicode_lite... |
"""
mbed CMSIS-DAP debugger
Copyright (c) 2006-2013 ARM Limited
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 json
from PIL.Image import SEQUENCE
import matplotlib
import matplotlib.pyplot as plt
from numpy.random.mtrand import shuffle
import cv2
import numpy as np
import scipy.ndimage as scpy
from tensorflow.keras.layers import Conv2D, MaxPool2D, Dropout, BatchNormalization, Flatten
from tensorflow.keras.callbacks impo... |
from optparse import Values
from typing import List
from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import SUCCESS
from pip._internal.exceptions import CommandError
class HelpCommand(Command):
"""Show help for commands"""
usage = """
%prog <command>"""
ignore... |
# 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 ... |
import pandas as pd
from pprint import pprint
from glob import glob
import numpy as np
import re
import csv
import os
import fnmatch
import sys
followUp = {}
ack = {}
nonIntimate = {}
intimate = {}
featureList = {}
questionType_DND={}
questionType_PN={}
def readHelperData():
global followUp, ack, nonIntimate, in... |
#
# Copyright (c) 2014 Juniper Networks, Inc. All rights reserved.
#
import re
from distutils.util import strtobool
import kombu
import gevent
import gevent.monkey
gevent.monkey.patch_all()
import time
import signal
from gevent.queue import Queue
try:
from gevent.lock import Semaphore
except ImportError:
# olde... |
# Add ability to pass TF_Output_Dialog a data structure
# instead of an XML filename. XML file is only for
# initial creation, but for updates or showing user-
# modified settings, need this other option.
# Read_XML_File() should return True or False depending
# on whether XML file is found and formatted correctly.
... |
###############################################################################
# _*_ coding: utf-8
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org
#
from __future__ import unicode_literals
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook... |
from types import TracebackType
from typing import (
Any,
Awaitable,
Callable,
Iterable,
MutableMapping,
Optional,
Tuple,
Type,
)
ExcInfo = Tuple[Type[BaseException], BaseException, Optional[TracebackType]]
Message = MutableMapping[str, Any]
Scope = MutableMapping[str, Any]
Receive =... |
"""
Copyright (c) 2018-2022 Intel Corporation
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... |
from flask_restful import Resource, reqparse
import logging
class StatusDispositivo(Resource):
# parser
parser = reqparse.RequestParser()
# descripcion
parser.add_argument("descripcion", type=str, required=True, help="descripcion es necesario")
# Post
def post(self):
data = Status... |
#
# PySNMP MIB module Juniper-TSM-CONF (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-TSM-CONF
# Produced by pysmi-0.3.4 at Mon Apr 29 19:53:51 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar ... |
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt
"""Command-line support for coverage.py."""
from __future__ import print_function
import glob
import optparse
import os.path
import sys
import textwrap
import tra... |
"""
Base classes for job runner plugins.
"""
import datetime
import os
import string
import subprocess
import sys
import threading
import time
import traceback
from queue import (
Empty,
Queue,
)
import galaxy.jobs
from galaxy import model
from galaxy.job_execution.output_collect import default_exit_code_file,... |
# Generated by Django 3.0.3 on 2020-02-15 08:50
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('accounting', '0002_auto_20200215_0832'),
]
operations = [
migrations.AlterField(
model_name='projectapproval',
... |
# Automatically generated on 2021-03-21T13:03:19+08:00
# DO NOT EDIT or your changes may be overwritten
from .account_entry import AccountEntry
from .account_entry_ext import AccountEntryExt
from .account_entry_extension_v1 import AccountEntryExtensionV1
from .account_entry_extension_v1_ext import AccountEntryExtension... |
from __future__ import absolute_import
from django.conf import settings
from celery import conf
from djcelery.tests.utils import unittest
SETTING_VARS = (
("CELERY_DEFAULT_QUEUE", "DEFAULT_QUEUE"),
("CELERY_DEFAULT_ROUTING_KEY", "DEFAULT_ROUTING_KEY"),
("CELERY_DEFAULT_EXCHANGE_TYPE", "DEFAULT_EXCHANGE... |
#
# Celery (https://docs.celeryproject.org/en/stable/userguide/configuration.html)
#
# Metamapper supports a pretty basic Celery setup with an optional
# results backend. We recommend using either Redis or RabbitMQ as your broker.
#
# You can override these default settings by creating your own file and referencing the... |
# -*- coding: utf-8 -*-
# Copyright (C) 2020-2022 by SCICO Developers
# All rights reserved. BSD 3-clause License.
# This file is part of the SCICO package. Details of the copyright and
# user license can be found in the 'LICENSE' file distributed with the
# package.
"""Functionals that are norms."""
from typing impo... |
import json
import logging
import re
import progressbar
from graphbrain import build_atom
from graphbrain.cognition.agent import Agent
from graphbrain.op import create_op
def file_lines(filename):
with open(filename, 'r') as f:
for i, _ in enumerate(f, 1):
pass
return i
def title_parts... |
#!/usr/bin/python
import re
import sys
import imp
import os
from mininet.cli import CLI
from mininet.log import setLogLevel, info, error
from mininet.net import Mininet
from mininet.topolib import TreeTopo
from mininet.node import Controller, RemoteController
import time
def main():
setLogLevel("info")
info... |
# coding=utf-8
# Copyright 2018 The TF-Agents 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... |
import pandas as pd
from sklearn import model_selection
df = pd.read_csv("../data/train.csv")
df = df.dropna().reset_index(drop = True) # 过滤缺失数据并重置索引
df["kfold"] = -1 # 数据对折
df = df.sample(frac = 1).reset_index(drop = True) # 随机采样
# 按sentiment分层采样
kf = model_selection.StratifiedKFold(n_splits = 5)
for fold,... |
from unittest import mock
from django.db import transaction
from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature
from .models import (
Article, InheritedArticleA, InheritedArticleB, Publication, User,
)
class ManyToManyTests(TestCase):
def setUp(self):
# Create a couple of Publica... |
# Time-stamp: <2015-06-02 23:47:29 Tao Liu>
"""Description: Filter duplicate reads depending on sequencing depth.
Copyright (c) 2011 Tao Liu <taoliu@jimmy.harvard.edu>
This code is free software; you can redistribute it and/or modify it
under the terms of the BSD License (see the file COPYING included
with the distr... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('meta', '0007_sattel_event_trigger_polygon'),
]
operations = [
migrations.AddField(
model_name='satteleventtrigge... |
# uncompyle6 version 3.2.4
# Python bytecode 2.7 (62211)
# Decompiled from: Python 2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]
# Embedded file name: lib.coginvasion.gags.WholeFruitPie
from lib.coginvasion.gags.ThrowGag import ThrowGag
from lib.coginvasion.gags import GagGlobals
from l... |
"""
Provides functionality to interact with climate devices.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/climate/
"""
import asyncio
import logging
import os
import functools as ft
from numbers import Number
import voluptuous as vol
from homeassista... |
import os
import time
import logging
import argparse
import cv2
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.nn.functional as F
import torch.nn.parallel
import torch.utils.data
from util import dataset, transform, config
from util.util import AverageMeter, intersectionAndUnion, ch... |
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import os
import aws_encryption_sdk # type: ignore
import boto3 # type: ignore
import toml
from .api import DocumentBucketOperations
from .config import config
def initialize() -> DocumentBucketOperati... |
from tests.conftest import api_client
def test_endpoint():
with api_client() as client:
response = client.get('/docs')
assert response.status_code == 200
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.