text
stringlengths
3
1.05M
/**************************************************************************** **************************************************************************** *** *** This header was automatically generated from a Linux kernel header *** of the same name, to make information necessary for userspace to *** call i...
"use strict"; var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { t...
from __future__ import annotations from typing import cast, Optional, Sequence, Tuple, Union, ForwardRef from typeguard import typechecked from arkouda.client import generic_msg, get_config from arkouda.pdarrayclass import pdarray, create_pdarray from arkouda.pdarraycreation import zeros, zeros_like, array from arkouda...
import group_frequency_oracle as freq import linecache import random def query_on_adult_dim2(oraclePath,oracleInterval,queryPath,trueOraclePath,aggregation="count"): # adult_2 equal 5 and 7 queriesStr=linecache.getline(queryPath,1) queries=eval(queriesStr) answer=[0]*500 trueOracleStr=line...
require('./b.js') // b.js' require('./c.js') // c.js var b = 'this is pageB';
# -*- coding: utf-8 -*- # Generated by Django 1.11.24 on 2020-01-31 22:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Produ...
# Copyright 2020 Huawei Technologies Co., Ltd # # 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...
# # Copyright (C) 2013 Andrian Nord. See Copyright Notice in main.py # import ljd.ast.nodes as nodes import ljd.ast.traverse as traverse from ljd.ast.helpers import insert_table_record import utils def eliminate_temporary(ast): try: _eliminate_multres(ast) slots, unused = _collect_slots(ast) _eliminate_tempor...
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
""" WSGI config for ehub project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` set...
import argparse import json import logging import os from overrides import overrides from subprocess import Popen, PIPE from typing import List from sacrerouge.commands import MetricSetupSubcommand from sacrerouge.common import DATA_ROOT, TemporaryDirectory from sacrerouge.data import MetricsDict from sacrerouge.data....
from dagster import check from .config_type import ConfigType, ConfigTypeKind from .snap import ConfigSchemaSnapshot, snap_from_config_type def iterate_config_types(config_type): check.inst_param(config_type, "config_type", ConfigType) if config_type.kind == ConfigTypeKind.ARRAY or config_type.kind == Config...
'''Demo for creating customized multi-class objective function. This demo is only applicable after (excluding) XGBoost 1.0.0, as before this version XGBoost returns transformed prediction for multi-class objective function. More details in comments. See https://xgboost.readthedocs.io/en/latest/tutorials/custom_metri...
# 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 time import torch import torch.nn as nn import torch.nn.functional as F from functools import partial module_flop_count = [] old_functions = {} class FlopsProfiler(object): """Measures the latency, number of estimated floating point operations and parameters of each module in a PyTorch model. The flo...
# Copyright 2022 Garda Technologies, LLC. 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 applic...
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.ExtInfos import ExtInfos from alipay.aop.api.domain.MerchantIDInfo import MerchantIDInfo from alipay.aop.api.domain.UserDInfo import UserDInfo class AlipayPcreditHuabeiSpayAuthCon...
from django.contrib import admin from .models import Wallet, AccountStatement, Currency, DiffOperation admin.site.register(Wallet) admin.site.register(AccountStatement) admin.site.register(Currency) admin.site.register(DiffOperation)
'use strict'; /** * Dependencies */ var mongoose = require('mongoose'), Schema = mongoose.Schema; var S8Form = new Schema({ name: {type: String}, sex: { type: String, enum: ['M', 'F'] }, folder: {type: Schema.Types.ObjectId, ref: 'TerritoryFolder'}, sector: {type: Schema.Ty...
'use strict'; import React from 'react'; import { render } from 'react-dom'; import mapboxgl from 'mapbox-gl'; import _ from 'lodash'; import moment from 'moment'; import distance from 'turf-distance'; import { convertParamIfNeeded, circleOpacity, circleBlur, coloredCircleRadius, borderCircleRadius, selectCir...
from test.test_support import verify, TESTFN import sys, os import gzip filename = TESTFN data1 = """ int length=DEFAULTALLOC, err = Z_OK; PyObject *RetVal; int flushmode = Z_FINISH; unsigned long start_total_out; """ data2 = """/* zlibmodule.c -- gzip-compatible data compression */ /* See http://www.cdrom.c...
# -*- coding: UTF-8 -*- # @Time : 2020/10/22 # @Author : xiangyuejia@qq.com import os PATH = os.path.dirname(__file__)
dev_requires = [ "pypitools", "pyclassifiers", "black", ] install_requires = [ "termcolor", "yattag", "pyfakeuse", ] test_requires = [ "Sphinx", "pymakehelper", "pydmt", "pylint", "pytest", "pytest-cov", "flake8", "pyflakes", "pylogconf", ]
#ifndef _DIMMWITTED_CONST_H #define _DIMMWITTED_CONST_H /** * Model replication strategy * to use in DimmWitted. */ enum ModelReplType{ DW_MODELREPL_PERCORE, DW_MODELREPL_PERNODE, DW_MODELREPL_PERMACHINE, DW_MODELREPL_SINGLETHREAD_DEBUG }; /** * Data replication strategy * to use in DimmWitted. */ enum...
/*********************************************************************************************************************** * DISCLAIMER * This software is supplied by Renesas Electronics Corporation and is only intended for use with Renesas products. No * other uses are authorized. This software is owned by Renesas E...
# Copyright (c) 2021, NVIDIA 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 i...
def extractBeanylandCom(item): ''' Parser for 'beanyland.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('fight for love and peace', 'Fight for Peace and Love', ...
import numpy as np import pandas as pd import scipy import scipy.stats as st from typing import List, Union from tqdm.auto import tqdm from sklearn.experimental import enable_iterative_imputer # noqa from sklearn.impute import IterativeImputer as IterativeImputerOriginal from .IterativeImputerPR import IterativeIm...
from .base import APIBase, Network class User(APIBase): base = "https://api.bilibili.com/x" def __init__(self, network: Network, uid: int): super(User, self).__init__(network) self.uid = uid async def my_info(self) -> dict: await self.verify_auth() return await self._get(...
/* Copyright 2020 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 to in writing, software dis...
# 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
import binascii import hashlib import itertools import math import operator import re from functools import reduce import numpy as np from numcodecs.compat import ensure_bytes, ensure_ndarray from zarr.attrs import Attributes from zarr.codecs import AsType, get_codec from zarr.errors import ArrayNotFoundError, ReadOn...
import logging from pyvisdk.exceptions import InvalidArgumentError ######################################## # Automatically generated, do not edit. ######################################## log = logging.getLogger(__name__) def LicenseReservationInfo(vim, *args, **kwargs): '''A reservation describes how many lic...
var refs = { modalabout: { open: function() { document.getElementById('modalabout').classList.add('is-active'); }, close:function() { document.getElementById('modalabout').classList.remove('is-active'); } } };
# Generated by Django 1.9.13 on 2017-04-25 14:33 import django.contrib.auth.hashers from django.db import migrations, models import functools import uuid from django_ticketoffice.compat import JSONField class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ ...
from __future__ import print_function import os from git import GitConfigParser, Repo import six # github group GROUP = "BristolTopGroup" # mapping of github user names to aliases (for remotes) DEVELOPERS = { "DouglasBurns": "doug", "EmyrClement": 'emyr', "kreczko": 'luke', } GITHUB_BASE = "https://github....
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. // typedef for our parsing of the auxv variables in /proc/pid/auxv. #if defined(__i386) || defined(__ARM_EABI__) ty...
# 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...
define([ 'jsonrpc/1.1/ServiceClient', 'json!config/samples/groups.json', 'json!config/samples/schemas.json', ], (ServiceClient, sampleGroups, sampleSchemas) => { /** * A module which provides a SampleSet data model * * @module widgets/function_output/samples/SampleSet */ 'use str...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # # Contributor: qiulimao<qiulimao@getqiu.com> # http://www.getqiu.com # # Created on 2014-10-11 18:40:03 # Modified on 2016-11-02 14:52:53 import random import ...
# encoding: utf-8 import datetime import unittest.mock as mock import pytest from ckan.logic import _actions from ckan.tests import helpers, factories def _pending_task(resource_id): return { "entity_id": resource_id, "entity_type": "resource", "task_type": "datapusher", "last_u...
const fs = require('fs'); const {resolve, join} = require('path'); const cwd = require('cwd'); const { MongoMemoryServer, MongoMemoryReplSet } = require('mongodb-memory-server'); const globalConfigPath = join(__dirname, 'globalConfig.json'); const debug = require('debug')('jest-mongodb:setup'); module.exports = async...
// <<hpp_insert gen/SymbolType.js>> /** * @typedef {Object} OmSymbolType * @property {string} name What the symbol is called. * @property {Boolean} declaredPartial Whether the symbol is a declared partial. */ class OmSymbolType extends SymbolType { /** * Determine the name and whether it's a declared par...
from gpanel import * coordinates(-10, -10, 10, 10) fillcolor(None) circle(0, 0, 10) rectangle(-7.07, -7.07, 14.1, 14.1) color("yellow") rectangle(-5, -5, 10, 10) color("red") circle(0, 0, 4) color("darkblue") circle(-5, -5, 2) circle(5, 5, 2)
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require...
"use strict"; /* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ Object.defineProperty(exports, "__esModule", { value: true }); exports.ERC721Burnable__factory = void 0; const ethers_1 = require("ethers"); const _abi = [ { anonymous: false, inputs: [ ...
int myAtoi(char *str) { while (*str == ' ') { str++; } char sign = '+'; if (*str == '+' || *str == '-') { sign = *str; str++; } int current = 0; int result = 0; while (*str >= '0' && *str <= '9') { current = *str - '0'; if (result < -214748364 || result == -214748364 && current > 8...
// Copyright 2015-21 Volker Sorge // // 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 t...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var React = tslib_1.__importStar(require("react")); var PropTypes = tslib_1.__importStar(require("prop-types")); var filterProps_1 = tslib_1.__importDefault(require("../filterProps")); var MenuHeader_1 = tslib_1...
from __future__ import print_function, division import os import glob import numpy as np from astropy.logger import log from astropy.table import Table from astropy import units as u from astropy.utils.console import ProgressBar from ..convolved_fluxes import ConvolvedFluxes from ..sed import SED from ..models impor...
#ifndef LIB_CALVIN__STRING__PALINDROME_H #define LIB_CALVIN__STRING__PALINDROME_H #include "abstract_string.h" namespace lib_calvin_string { // return a vector of size 2n - 1, where n is the length of input string. // for even indices, the half of it denotes the index in the input string. // odd indices denotes th...
const { test } = require('@playwright/test'); const { QaToolPage } = require('../../pageobjects/qa-tool.page'); test.describe("Critical tests", () => { test("Show/hide answer", async ({page}) => { const qaToolPage = new QaToolPage(page); // arrange await qaToolPage.openPage(); // action await q...
#!/usr/bin/env python3 # 爬取单天数据信息 # {'LoadbalanceData': [588, '1.04%', 61, '13.17%', 50, '21.10%', 60, '0.00%'], 'samecoverdata': [1099, 1577, 896, '56.82%', 612, '55.69%', 2790, '99.10%']} from datetime import datetime, timedelta def day7(rightday): lastsunday = (rightday + timedelta(days=-8)).strftime("%Y-%m-...
var redis = require("redis"), subscriber = redis.createClient(), publisher = redis.createClient(); subscriber.on("message", function (channel, message) { console.log("Message '" + message + "' on channel '" + channel + "' arrived!"); }); subscriber.subscribe("test1", "test2"); publisher.publish("test1", "haaaaai");...
(this["webpackJsonpproject3-app"]=this["webpackJsonpproject3-app"]||[]).push([[396],{487:function(e,t){Prism.languages.sqf=Prism.languages.extend("clike",{string:{pattern:/"(?:(?:"")?[^"])*"(?!")|'(?:[^'])*'/,greedy:!0},keyword:/\b(?:breakOut|breakTo|call|case|catch|default|do|echo|else|execVM|execFSM|exitWith|for|forE...
# coding=utf-8 # 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 ...
const express = require("express"); const cors = require("cors"); const { errors } = require("celebrate"); const routes = require("./routes"); const app = express(); app.use(cors()); app.use(express.json()); app.use(routes); app.use(errors()); module.exports = app;
from udc_predict import retrieve_response from scripts.prepare_data import prepare_data from threading import Thread def tokenizer_fn(iterator): return (x.split(" ") for x in iterator) def generate_response(s): if s == 'prepare data': t = Thread(target=prepare_data, args=()) t.start() ...
''' File: emails.py Author: Nathan Hoad Description: Holds email handling classes ''' import logging import email import smtplib import imaplib import re import time import os import sys import tempfile import traceback import socket from smtplib import SMTPAuthenticationError from email import encoders from email.mi...
#!/usr/bin/env python2 """ error.py """ from __future__ import print_function from mycpp import mylib from typing import Any, TYPE_CHECKING if TYPE_CHECKING: # avoid circular build deps from _devbuild.gen.syntax_asdl import Token, word_part_t, word_t # Break circular dependency. #from asdl import runtime NO_SPID ...
/**************************************************************************** * * Copyright (C) 2012 PX4 Development Team. 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. Redistri...
from turtle import Turtle, Screen import random screen = Screen() screen.setup(width=500, height=400) # User makes a bet on which turtle will win the race user_bet = screen.textinput(title="Make your bet", prompt="Which turtle will win the race? Enter a color") # While loop boolean value changes based on whether the...
# _*_ coding: utf-8 _*_ """ define thread instances of url_fetch, htm_parse, item_save and proxies for threads_pool """ from .base import TPEnum, MonitorThread from .fetch import FetchThread from .parse import ParseThread from .save import SaveThread from .proxies import ProxiesThread
from sqlalchemy import Column, Integer, String, ForeignKey, Float, DateTime, func from sqlalchemy.orm import relationship, backref from mps_database.runtime import RuntimeBase class ThresholdAlt0History(RuntimeBase): """ Threshold class (thresholds table) Properties: i[0-3]_[l|h]: last alternative LCLS-II t...
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.15.6 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class Extensions...
/* bgzip.c -- Block compression/decompression utility. Copyright (C) 2008, 2009 Broad Institute / Massachusetts Institute of Technology Copyright (C) 2010, 2013-2018 Genome Research Ltd. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentat...
def <caret>foo(*a) if a pass
#include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <assert.h> #include "gamefontgl.h" #ifdef _MSC_VER /* MSVC++ */ #define vsnprintf _vsnprintf #endif /* a single glyph */ typedef struct { int w, h; int baseline; int xpos, ypos; } gfGlyphImpl; /* a bunch of g...
module.exports = function($scope, UserFactory) { var self = this; $scope.$watch(function() { return UserFactory.getUser(); }, function(newVal, oldVal) { if(typeof newVal !== 'undefined' ) { $scope.user = UserFactory.getUser(); } }); $scope.user = UserFactory.getUser(); if(UserFactory.isLoggedIn()) { ...
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "NSObject.h" @class NSObject<OS_dispatch_queue>; __attribute__((visibility("hidden"))) @interface OS_xpc_remote_listener : NSObject { NSObject<OS_dispatch_queue> *queu...
# -*- coding: utf-8 -*- ''' 轮盘的最大值 问题: 当 2 ≤ n ≤ 36 时,求连续 n 个数之和最大的情况, 并找出满足条件“欧式 规则下的和小于美式规则下的和”的 n 的个数。 ''' european = [0, 32, 15, 19, 4, 21, 2, 25, 17, 34, 6, 27, 13, 36, 11, 30, 8, 23, 10, 5, 24, 16, 33, 1, 20, 14, 31, 9, 22, 18, 29, 7, 28, 12, 35, 3, 26] american = [0, 28, 9, 26, 30, 11, 7, 20, 32, 17,...
var express = require('express'); var app = express(); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var mongoose = require('mongoose'); app.use(bodyParser.json({limit:'10mb',extended:true})); app.use(bodyParser.urlencoded({limit:'10mb',extended:true})); // Connecting to databs...
from __future__ import print_function import argparse import json import os import re import string import sys from collections import Counter from konlpy.tag import Mecab """KorQuAD v1.0에 대한 공식 평가 스크립트 """ """본 스크립트는 SQuAD v1.1 평가 스크립트 https://rajpurkar.github.io/SQuAD-explorer/ 를 바탕으로 작성됨.""" def postprocess(tex...
""" *Svenska språket under sjuhundra år* by Gertrud Pettersson (Studentlitteratur 2017) * Klassisk fornsvenska (Classical Old Swedish): 1225-1375 * Yngre fornsvenska (Younger Old Swedish): 1375-1526 (first prints) """ from cltk.phonology.utils import * __author__ = ["Clément Besnier <clemsciences@gmail.com>"] a = ...
""" Bindable classes """ # **************************************************************************** # Copyright (C) 2012 Nicolas M. Thiery <nthiery at users.sf.net> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by #...
// // DJFSportPolyLineSqlModel.h // LoveWalking // // Created by 佃杰峰 on 2017/5/16. // Copyright © 2017年 佃杰峰. All rights reserved. // #import <Foundation/Foundation.h> @interface DJFSportPolyLineSqlModel : NSObject @property(nonatomic,assign)CLLocationDegrees startLatitude; @property(nonatomic,assign)CLLocationDeg...
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Sep 17 2017 16:24:48). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import "WXPBGeneratedMessage.h" @class BaseResponse; @interface AddChatRoomAdminResponse : WXPBGeneratedMessage { } + (void)initial...
/** * zrender: 生成唯一id * * @author errorrik (errorrik@gmail.com) */ define(function() { var idStart = 0x0907; return function () { return idStart++; }; });
const net = require('net'); module.exports = function bridge(opt) { opt = opt || {}; console.log('internal oiptions:\n', opt); var address = opt.address; var timeout = opt.timeout || 5000; var port = opt.port | 522; var socket; var connected; var devices; // export our "object" by returning all th...
//***********Busines Logic**********// //pizza constructor function Pizza(size, crust) { this.size = size; this.crust = crust; this.toppings = []; } //location constructor function Location(name, estate) { this.name = name; this.estate = estate; } //price size var sizePrice = { small: 600, medium: 8...
/* 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...
"""NICOS GUI default configuration.""" main_window = docked( tabbed( ('PGAA', panel('nicos_mlz.pgaa.gui.panels.PGAAPanel', setups='pgaa',) ), ('Tomography', panel('nicos_mlz.pgaa.gui.panels.TomographyPanel', setups='tomography',), ), ('PGAI', panel(...
/* SPDX-License-Identifier: BSD-3-Clause * Copyright(c) 2010-2014 Intel Corporation */ #include <string.h> #include <unistd.h> #include <fcntl.h> #include <dirent.h> #include <inttypes.h> #include <sys/stat.h> #include <sys/mman.h> #include <sys/sysmacros.h> #include <linux/pci_regs.h> #if defined(RTE_ARCH_X86) #in...
/** * Created by binwang on 17/8/3. */ import React, {Component, PropTypes} from 'react'; import {connect} from 'react-redux'; import * as Antd from 'antd'; import moment from 'moment'; import _ from 'lodash'; import {Map} from 'immutable'; import DynamicQueryForm from '../../commons/dynamicQueryForm'; import Dynam...
#print (i) def PrintNumbers(): x = 4 for i in range(8, 62, x): print (i + " ") x = x + 2 PrintNumbers()
from django.core.exceptions import ValidationError import json from tastypie.exceptions import Unauthorized, ImmediateHttpResponse from tastypie.http import HttpUnauthorized from tastypie.resources import ModelResource, ALL from tastypie.authorization import Authorization from .models import Grid from billing.utils ...
#!/usr/bin/env python3 # Copyright (c) 2019 The Unit-e developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from hashlib import sha256 from struct import pack from typing import List, NamedTuple, Optional from blockchain ...
import os import shutil import numpy as np import yaml import torch from torch import nn from torchvision.transforms import transforms def save_checkpoint(state, is_best, filename='checkpoint.pth.tar'): torch.save(state, filename) if is_best: shutil.copyfile(filename, 'model_best.pth.tar') def save...
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /*--- info: <LS> between chunks of one string not allowed es5id: 8.4_A7.4 description: Insert <LS> between chunks of one string negative: ReferenceError ---*/ eval("var x = asdf\u2029ghj...
import os from celery import Celery from celery.signals import setup_logging from django.conf import settings # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dojo.settings.settings') app = Celery('dojo') # Using a string here means the worker will n...
# -*- coding: utf-8 -*- # Copyright (C) 2019, QuantStack # SPDX-License-Identifier: BSD-3-Clause # conda env equivalent environment creation from __future__ import absolute_import, print_function from os.path import basename import os, sys from conda._vendor.boltons.setutils import IndexedSet from conda.base.contex...
/* * * Copyright (c) 2021 Project CHIP 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 requir...
#pragma strict function Start () { } function Update () { } function LoadScene (level : int){ Application.LoadLevel(level); };
_base_ = [ '../_base_/default_runtime.py', '../_base_/datasets/coco_detection.py' ] # model settings model = dict( type='TTFNet', pretrained='modelzoo://resnet18', backbone=dict( type='ResNet', depth=18, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, ...
/* Copyright (c) 2008-2013, Avian Contributors Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. There is NO WARRANTY for this software. See l...
#-*- codeing = utf-8 -*- #@Time : 2021-01-06 21:24 #@Author : 苏苏 #@File : 第三节课.py #@Software : PyCharm # True or x -> True # False and x -> False #1. 程序要满足:输入分数x(0<X<100),60以下不及格,60到80及格,80到90良好,90以上优秀 score = int(input("你的分数")) if score<60: print("不及格") elif score<80: print("及格") elif score<90: print...
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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 witho...
import unittest from bpmn_dmn.dmn import DMNDecisionRunner class IntegerDecisionComparisonTestClass(unittest.TestCase): """ Doc: https://docs.camunda.org/manual/7.7/user-guide/dmn-engine/ """ @classmethod def setUpClass(cls): cls.runner = DMNDecisionRunner('integer_decision_comparison.dmn...
/** * @overview ccmjs-based web component for building a ER model training * @author André Kless <andre.kless@web.de> 2021 * @license The MIT License (MIT) * @version 1.1.0 * @changes * version 1.1.0 (17.06.2021) * - added import and export of phrases via CSV file * - textareas are changed to text input fields ...
var escolaApp = angular.module("AngularApp", ["ui.router", 'ngMaterial', 'ngMessages', 'ngMdIcons' ]); var baseUrl = "http://mobile-aceite.tcu.gov.br:80/nossaEscolaRS";