text stringlengths 3 1.05M |
|---|
from setuptools import find_packages, setup
setup(
name='src',
packages=find_packages(),
version='0.1.0',
description='T5 for Named Entity Recognition',
author='Campiotti, Israel',
license='MIT',
)
|
import pandas as pd
from pathlib import Path
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import numpy as np
from autocfr.utils import load_df, remove_border, png_to_pdf
plt.rc("pdf", fonttype=42)
plt.rc("ps", fonttype=42)
class PlotAlgorithmCompare:
def __init__(
... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2021 GEO Secretariat.
#
# geo-knowledge-hub-ext is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
"""GEO Knowledge Hub extension for InvenioRDM"""
import os
from setuptools import find_packag... |
OC.L10N.register(
"federatedfilesharing",
{
"Federated sharing" : "Federated sharing",
"Invalid Federated Cloud ID" : "ID Federated Cloud incorrècte",
"Sharing %s failed, because this item is already shared with %s" : "Lo partiment de %s a fracassat perque aqueste objècte es ja partejat amb %s",
... |
import argparse
from datetime import datetime, timedelta
import logging
import os
import re
import stat
import sys
import pyexiv2
import photo_rename
from photo_rename import Filemap, FilemapList, FileMetadata, Harvester
from photo_rename.utils import CustomArgumentParser
logger = logging.getLogger(__name__)
def pr... |
import functools
import pytest
from eth_tester import (
EthereumTester,
)
from eth_tester.exceptions import (
TransactionFailed,
)
from eth_utils import (
is_checksum_address,
is_dict,
is_integer,
)
from web3 import Web3
from web3._utils.module_testing import (
EthModuleTest,
GoEthereumPer... |
/*
*************************************************************************
* Ralink Tech Inc.
* 5F., No.36, Taiyuan St., Jhubei City,
* Hsinchu County 302,
* Taiwan, R.O.C.
*
* (c) Copyright 2002-2010, Ralink Technology, Inc.
*
* This program is free software; you can redistribute it and/or modify *
* it u... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import math
import sys
EULER = 0.5772156649015328606
EPS = 1e-10
if __name__ == '__main__':
x = float(input("Value of x? "))
if x == 0:
print("Illegal value of x", file=sys.stderr)
exit(1)
a = x
S, k = a, 1
while math.fabs(a) > EPS:
... |
from os import path
import sys
import click
import subprocess
import toml
import s3fs
import boto3
from shutil import copyfile
import pprint
import tempfile
from glob import glob
PREDICT_COMMAND = "cd {rsp}; ./rsp predict --create_tif --checkpoint {checkpoint} --aws_profile {aws_profile} --buffer --config {config... |
# Server mechanics
bind = '0.0.0.0:8000'
backlog = 2048
daemon = False
pidfile = None
umask = 0
user = None
group = None
tmp_upload_dir = None
proc_name = None
# Logging
errorlog = '-'
loglevel = 'info'
accesslog = '-'
access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"'
#
# Worker proces... |
/*-------------------------------------------------------------------------
*
* nodePartitionSelector.c
* implement the execution of PartitionSelector for selecting partition
* Oids based on a given set of predicates. It works for both constant
* partition elimination and join partition elimination
*
* Cop... |
import React from 'react';
import Grid from '@material-ui/core/Grid';
import Typography from '@material-ui/core/Typography';
import TextField from '@material-ui/core/TextField';
class NameForm extends React.Component {
state = {
user: {
}
};
handleCheck = () => {
con... |
import numpy as np
import os
import skimage.io as io
import skimage.transform as trans
import numpy as np
from tensorflow.keras.models import *
from tensorflow.keras.layers import *
from tensorflow.keras.optimizers import *
from tensorflow.keras.callbacks import ModelCheckpoint, LearningRateScheduler
from tensorflow.k... |
# -*- coding: utf8 -*-
"""
This is part of shot detector.
Produced by w495 at 2017.05.04 04:18:27
"""
from __future__ import absolute_import, division, print_function
import collections
import logging
# PY2 & PY3 — compatibility
from builtins import zip
from shot_detector.objects import BasePoint
from shot_d... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _IssuesCloseOutlined = _interopRequireDefault(require('./lib/icons/IssuesCloseOutlined'));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
... |
import React from 'react'
import { Menu, Dropdown, Icon, Button } from 'antd'
import PropTypes from 'prop-types'
const DropOption = ({onMenuClick, menuOptions = [], buttonStyle, dropDownProps}) => {
const menu = menuOptions.map(item => (
<Menu.Item key={item.key} >{item.name}</Menu.Item>
))
return ... |
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <string.h>
#define MAXWORD 100
#define YES 1
#define NO 0
#define BUFSIZE 100
char buf[BUFSIZE];
int bufp = 0;
struct tnode
{
char *word;
int match;
struct tnode *left;
struct tnode *right;
};
int compare(char *s, struct tnode *, int, int *... |
var nodeExternals = require('webpack-node-externals');
var webpack = require('webpack');
var path = require('path');
var fs = require('fs');
var webpack_opts = {
mode: 'development',
entry: './src/index.ts',
target: 'node',
output: {
path: path.join(__dirname, 'lib'),
filename: 'index.js',
libr... |
/*
* This header is generated by classdump-dyld 1.0
* on Saturday, June 1, 2019 at 6:47:10 PM Mountain Standard Time
* Operating System: Version 12.1.1 (Build 16C5050a)
* Image Source: /System/Library/PrivateFrameworks/StoreKitUI.framework/StoreKitUI
* classdump-dyld is licensed under GPLv3, Copyright © 2013-2016 by El... |
# -*- coding: utf-8 -*-
"""File generated according to DMatLib/gen_list.json
WARNING! All changes made in this file will be lost!
"""
from pyleecan.GUI.Dialog.DMatLib.Ui_DMatLib import Ui_DMatLib
class Gen_DMatLib(Ui_DMatLib):
def setupUi(self, DMatLib):
"""Abstract class to update the widget according to... |
/*
* Copyright (c) 2020-2021 Huawei Device 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 app... |
import pdf_to_json as p2j
import json
url = "file:data/multilingual/Tfng.TZM/Sun-ExtA_16/udhr_Tfng.TZM_Sun-ExtA_16.pdf"
lConverter = p2j.pdf_to_json.pdf_to_json_converter()
lConverter.mImageHashOnly = True
lDict = lConverter.convert(url)
print(json.dumps(lDict, indent=4, ensure_ascii=False, sort_keys=True))
|
"""Tests for privacy.schema.embed"""
from privacy.schema import embeds
def test_embed_request():
embed_request_obj = embeds.EmbedRequest(token="3523-6543-1236-8975", css="https://www.not_a.url")
assert embed_request_obj.token == "3523-6543-1236-8975"
assert embed_request_obj.css == "https://www.not_a.url"... |
# -*- coding:utf8 -*-
# File : asimplestat.py
# Author : Jiayuan Mao
# Email : mjy14@mails.tsinghua.edu.cn
# Date : 2016-05-24 12:37:55
#
# This file is part of project ``Learning in Repeated Games''
# of course ``Game Theory''.
from liblirg import *
def _d(a, ref):
return (a-ref+3)%3;
class Model(ModelBa... |
import React from 'react';
import Controllable from './Controllable';
import Customizable from './Customizable';
import UndoRedo from './UndoRedo';
import Textarea from './Textarea';
import css from './App.css';
const App = () => (
<div className={css.app}>
<h1>react-debounce-input</h1>
<section className={... |
'''
Created on Jan 19, 2017
@author: Dibyojyoti
'''
from pycas.cas.core.SofaFS import SofaFS
from pycas.cas.core.TOP import TOP
from pycas.cas.core.Annotation import Annotation
class CAS(object):
'''
This class represents a UIMA CAS
'''
def __init__(self, typesystem):
'''
Constructor
... |
/*
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")... |
/**
* Appcelerator Drillbit
* Copyright (c) 2010 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* The main drillbit module -- responsible for the setup, teardown, and running of test suites... |
event = {
"Records": [
{
"Sns": {
"Message": "{\"Instance\":{\"InstanceId\":\"\",\"PublicIpAddress\":\"\",\"PrivateIpAddress\":\"\"},\"ClusterName\":\"\",\"ContainerSpec\":{\"Bucket\":\"\",\"Key\":\"\"}}"
}
}
]
}
|
/*
* Copyright (C) 2018 Intel Corporation. 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... |
from flask import Flask
from .table.views import table
def create_app():
app = Flask(__name__)
app.register_blueprint(table, url_prefix='/table/')
return app |
!(function (e, t, n) {
"use strict";
!(function o(e, t, n) {
function a(s, l) {
if (!t[s]) {
if (!e[s]) {
var i = "function" == typeof require && require;
if (!l && i) return i(s, !0);
if (r) return r(s, !0);... |
import styled from 'styled-components';
import { layout } from '../../util/styling_vars';
import { device } from '../../util/screensizes';
export const Container = styled.div`
padding: ${layout.padding.height.mobile} ${layout.padding.width.mobile};
.vidcontainer {
max-width: 100%;
video {
... |
import keras
from keras.models import Sequential
from keras.preprocessing.image import ImageDataGenerator
from keras.datasets import cifar10
from keras.regularizers import l2
from keras.layers import Dense, Dropout, Activation, BatchNormalization, Conv2D, MaxPooling2D, Flatten, AveragePooling2D
from keras.initializers ... |
module.exports=require('../decode-property-map.js')(JSON.parse(require('zlib').gunzipSync(Buffer.from('H4sIAAAAAAAAA+2dW48byQ2F/4uf/aC+SnreZIEF9gY4+xQEhjKr2EJsjTEeJ9h/nxlvsKNufqf6VOsy8roeZ3BUzWKxSBbJKv598bKpX7745nZ/f3f77sXLxcvq5YtXHzY329evth82d5v727vH/zYvX/x0/3Z79/rnT/ub+0+b+93t/v/obz7d3W33N7+9fvXb+3/+PkYC/dOH7Z4GeXf7c... |
import React from "react";
import Layout from "../components/Layout";
import GoBack from "../components/GoBack";
import Seo from "../components/Seo";
import Mail from "../svg/Mail";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import {
faGithub,
faTwitter,
faLinkedin,
} from "@fortawesome/fre... |
import { CategoryLabel as BaseCategoryLabel } from '@cjdev/visual-stack/lib/components/SideNav';
import { connect } from 'react-redux';
import { selectCollaspedStateFromSideNav } from '../../actions';
export const CategoryLabel = connect(
state => ({
collapsed: selectCollaspedStateFromSideNav(state),
}),
null... |
"""
This package holds communication aspects
"""
import binascii
import json
import logging
import socket
import traceback
from abc import abstractmethod
from binascii import unhexlify
from threading import Thread
from pylgbst.constants import MSG_DEVICE_SHUTDOWN, ENABLE_NOTIFICATIONS_HANDLE, ENABLE_NOTIFICATIONS_VALU... |
/* @flow */
import type Watcher from './watcher'
import config from '../config'
import { callHook, activateChildComponent } from '../instance/lifecycle'
import {
warn,
nextTick,
devtools,
inBrowser,
isIE
} from '../util/index'
export const MAX_UPDATE_COUNT = 100
const queue: Array<Watcher> = []
const acti... |
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex... |
#pragma once
#include <functional>
namespace vineyard {
typedef std::function<void(void *)> Seed_Initializer;
typedef std::function<void *()> Seed_Creator;
} |
# coding: utf-8
"""
Emby Server API
Explore the Emby Server API # noqa: E501
OpenAPI spec version: 4.1.1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class QueryResultNewsNewsItem(object):
"""NOTE: This class is a... |
# Copyright 2016 IBM Corp.
# Copyright 2017 Rackspace, US 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 re... |
from .conwaygol import *
|
import numpy as np
import sys
import traceback
from numba.core.compiler import compile_isolated, Flags
from numba import jit, njit
from numba.core import types, errors
from numba.tests.support import TestCase
import unittest
force_pyobj_flags = Flags()
force_pyobj_flags.force_pyobject = True
no_pyobj_flags = Flags()... |
from typing import List, Optional
import pytest
from chia.consensus.block_record import BlockRecord
from chia.consensus.blockchain import Blockchain, StateChangeSummary
from chia.consensus.cost_calculator import NPCResult
from chia.full_node.hint_management import get_hints_and_subscription_coin_ids
from chia.types.b... |
let countFileNameOccurence = 1;
export const countOccurrences = (fileName, attchmentFileNameList) => {
return attchmentFileNameList.reduce((count, attachmentName) => (attachmentName.toLowerCase() === fileName.toLowerCase() ? count + 1 : count), 0);
}
export const generateNewFileName = (newFileName, uploadF... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .browser import Browser # noqa: F401
__all__ = [name for name in dir() if not name.startswith('_')]
|
# coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... |
import numpy as np
from scipy.linalg import cholesky
from scipy.special import loggamma
from scipy.optimize import least_squares, minimize, minimize_scalar
import pandas as pd
import cvxopt
import warnings
import os
from copy import deepcopy
import matplotlib.pyplot as plt
from .matrices import get_basis_func, constru... |
var insultOne = ["artless", "bawdy", "beslubbering", "stupid", "bootless", "churlish", "churl", "cockered", "clouted", "craven", "currish", "dankish", "dissemb", "droning ", "errant", "fawning", "fobbing", "froward", "frothy", "gleeking", "goatish", "gorbelli", "impertin", "infectio", "jarring", "loggerhe", "lumpish",... |
window._ = require('lodash');
/**
* We'll load jQuery and the Bootstrap jQuery plugin which provides support
* for JavaScript based Bootstrap features such as modals and tabs. This
* code may be modified to fit the specific needs of your application.
*/
try {
window.$ = window.jQuery = require('jquery');
... |
import unittest
from tests.test_utils import get_sample_pdf_with_labels, get_sample_pdf, get_sample_sdf, get_sample_pdf_with_extra_cols, get_sample_pdf_with_no_text_col ,get_sample_spark_dataframe
from nlu import *
class TestMultipleEmbeddings(unittest.TestCase):
def test_multiple_embeddings(self):
df ... |
import sys
from typing import Optional
import click
@click.group("wallet", short_help="Manage your wallet")
def wallet_cmd() -> None:
pass
@wallet_cmd.command("get_transaction", short_help="Get a transaction")
@click.option(
"-wp",
"--wallet-rpc-port",
help="Set the port where the Wallet is hosting... |
# -*- coding: utf-8 -*-
"""Watching for registration events"""
import time
from dataclasses import dataclass, asdict
import iscc_registry
from loguru import logger as log
import iscc
from iscc_registry.conn import db_client
from iscc_registry.publish import get_live_contract
from iscc_registry import tools
from iscc_re... |
/*
* Copyright (C) 1999-2011 Insight Software Consortium
* Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in co... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import pytest
import responses
import six
from libsourcemap import Token
from mock import patch
from requests.exceptions import RequestException
from sentry.interfaces.stacktrace import Stacktrace
from sentry.lang.javascript.processor import (
BadSo... |
from random import normalvariate
import numpy as np
# Chossing element from list, according to normal distribution
def normal_choice(lst, mean=None, stddev=None):
if len(lst) == 0:
return None
if mean is None:
# if mean is not specified, use center of list
mean = (len(lst) - 1) / 2
... |
from typing import List, Optional
from data.enums import ResponseFlags as rF
class Dialog:
def __init__(self, text: str, min_turns: Optional[int] = None, max_turns: Optional[int] = None,
flags: List[rF] = None):
self.text = text
self.max_turns = max_turns
self.min_turns =... |
#ifndef _IBODYOPT_H
#define _IBODYOPT_H
#include <unknwn.h>
/*
* IBodyOptions
*
* this interface is implemented by clients of IBodyObj. It is used to provide instance-specific options to
* the body. Thus the body does not need to know about internal Athena options. They can be provided by the client
*... |
// The ConversationPanel module is designed to handle
// all display and behaviors of the conversation column of the app.
/* eslint no-unused-vars: "off" */
/* global Api: true, Common: true*/
var ConversationPanel = (function () {
var settings = {
selectors: {
chatBox: '#scrollingChat',
fromUser: '.... |
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import logging
import time
from typing import Callable, Tuple
import click
import torch
from torch import Tensor
... |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "latestInstance.settings")
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Djang... |
/**
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
// The editor creator to use.
import ClassicEditorBase from '@ckeditor/ckeditor5-editor-classic/src/classiceditor';
import Essentials from... |
// @flow
import React from 'react';
import ErrorInfo from 'components/etc/ErrorInfo/ErrorInfo';
import { Helmet } from 'react-helmet';
import { type ContextRouter } from 'react-router-dom';
import qs from 'query-string';
import RespStatus from '../../components/etc/RespStatus';
type Props = {} & ContextRouter;
const C... |
/*module.exports = {
patch: {
options: {
patch: 'src/patches/wordfindgame.patch'
},
files: {
'src/js/wordfindgame.patched.js': "bower_components/wordfind/example/scripts/wordfindgame.js"
}
}
};*/
|
''' Bitbucket Server Interface '''
import json
import urllib
import base64
from modules.utils import print_key_value_list
from modules.git_server_callout import http_request
class AzureDevOpsHandler():
def __init__(self, host, organization, projectName, repositoryId):
self.host = host
self.organization = organ... |
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis <michael.aivazis@para-sim.com>
# (c) 1998-2022 all rights reserved
def test():
"""
Verify that channels lower in the hierarchy inherit their parent default state
"""
# get the journal
import journal
# make a channel
... |
import { NormalText, TitleText } from "@styles";
import styled from "styled-components";
import { media } from "@styles";
export const TeamSection = styled.section`
margin-bottom: 10vw;
`;
export const TitleWrapper = styled.div`
max-width: 80%;
text-align: center;
margin: 0 auto;
${media.thone`
max-widt... |
#!/usr/bin/env python
# coding=utf-8
'''
Date: 2022-01-27 14:09:33
LastEditors: Chunbai_zz
LastEditTime: 2022-02-16 14:24:16
Description: message
'''
# This files contains your custom actions which can be used to run
# custom Python code.
#
# See this guide on how to implement these action:
# https://rasa.com/docs/rasa... |
import numpy as np
import torch
from distdl.utilities.tensor_decomposition import compute_subtensor_shapes_balanced
from distdl.utilities.tensor_decomposition import compute_subtensor_start_indices
from distdl.utilities.tensor_decomposition import compute_subtensor_stop_indices
class InterpolateMixin:
r"""A mixi... |
#!/usr/bin/env python3
"""
Extract bonds from .mol file for building an atoms_list file for Blacomcalc
Author: (c) Matteo Paolieri, University of Cologne, Dec 2020
Version: 1.2
License: MIT
Docs: https://github.com/mtplr/blacomcalc
"""
import argparse
import os
def change_btype(bt):
# converts bond order to... |
/**
@param conf {Array<Array>} Ex: [["ordefield","orderdir"], ...]
*/
function ITranslateParamersToLimitOffset() {}
ITranslateParamersToLimitOffset.Interface("ITranslateParamersToLimitOffset", ITranslator);
ITranslateParamersToLimitOffset.prototype.get_offsetName = function() { throw "not impl"; }
ITranslateP... |
/*
Copyright (c) 2003-2016, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'horizontalrule', 'ru', {
toolbar: 'Вставить горизонтальную линию'
} );
|
###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... |
//
// SJVideoPlayerResourceLoader.h
// SJVideoPlayer
//
// Created by 畅三江 on 2019/11/27.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface SJVideoPlayerResourceLoader : NSObject
+ (nullable UIImage *)imageNamed:(NSString *)name;
+ (nullable NSString *)localizedStringForKey:(NSString *)key;
@e... |
# -*- coding: utf-8 -*-
from builtins import zip
from builtins import map
import os
import time
import pandas as pd
from builtins import str
from django.conf import settings as django_settings
from django.contrib import messages
from django.utils.dateparse import parse_datetime
from django.utils.translation import u... |
from crypto.configuration.network import set_network
from crypto.constants import TRANSACTION_MULTI_SIGNATURE_REGISTRATION, TRANSACTION_TYPE_GROUP
from crypto.networks.devnet import Devnet
from crypto.transactions.builder.multi_signature_registration import MultiSignatureRegistration
set_network(Devnet)
def test_mul... |
"""This module exports the CoffeeJshint plugin class."""
from SublimeLinter.lint import Linter, util
class CoffeeJshint(Linter):
"""Provides an interface to coffee-jshint."""
syntax = "coffeescript"
cmd = "coffee-jshint"
executable = None
version_args = "--version"
version_re = r"(?P<versio... |
const router = require("express").Router();
const accountSid = process.env.ACCOUNT_SID || "not authorized";
const authToken = process.env.TWILIO_TOKEN || "not authorized";
const twilioPhone = process.env.TWILIO_PHONE;
const contactPhone = process.env.CONTACT_PHONE;
const client = require("twilio")(accountSid, authToken... |
import os
import cv2
originLabelsDir = r'/home/cvos/PythonCode/dataset1/labels/val'
saveDir = r'./annos.txt'
originImagesDir = r'/home/cvos/PythonCode/dataset1/images/val'
txtFileList = os.listdir(originLabelsDir)
with open(saveDir, 'w') as f... |
# -*- coding: utf-8 -*-
"""
Created on Sun Apr 21 13:40:34 2019
@author: Winham
generate_train_val.py: 生成训练集和验证集
注意:运行前新建文件夹train_sigs,train_labels,val_sigs,val_labels
"""
import os
import numpy as np
from sklearn.model_selection import train_test_split
Sig_path = 'G:/ECG_UNet/119_SEG/'
Label_path = 'G:/ECG_UNet/... |
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript */
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(?!\*)(\w+)\b/i,t=_self.Prism={util:{encode:function(e){return e ... |
# Copyright 2019-2020 the ProGraML authors.
#
# Contact Chris Cummins <chrisc.101@gmail.com>.
#
# 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... |
/**
* Created by amrukumar on 11/23/16.
*/
|
// Copyright (c) 2019 The TradePlus_Coin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef NAVMENUWIDGET_H
#define NAVMENUWIDGET_H
#include <QWidget>
class TradePlus_CoinGUI;
namespace Ui {
class NavMenuWidge... |
function createMenu() {
var menu = [
[0, './#docs', 'Documentation'],
[1, 'gettingstarted', 'Getting Started'],
[1, 'general', 'General'],
[1, 'system', 'System'],
[1, 'cpu', 'CPU'],
[1, 'memory', 'Memory'],
[1, 'battery', 'Battery'],
[1, 'graphics', 'Graphics'],
[1, 'os', 'OS'],
... |
from modeltranslation.translator import TranslationOptions, translator
from league.models import League
class LeagueTranslationOptions(TranslationOptions):
fields = ["name", "description"]
translator.register(League, LeagueTranslationOptions)
|
// Copyright 2020 gRPC 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 i... |
from item import Item
from orderitem import OrderItem
from payment import Payment
class Order():
def __init__(self):
self.orderitems=[]
def addOrderItems(self, orderitem):
self.orderitems.append(orderitem)
def calcTotal(self):
total=0.0
for o in self.orderitem... |
import os
import unittest
from datetime import datetime
from unittest.mock import patch
import duolingo
USERNAME = os.environ.get('DUOLINGO_USER', 'ferguslongley')
PASSWORD = os.environ.get('DUOLINGO_PASSWORD')
USERNAME2 = os.environ.get("DUOLINGO_USER_2", "Spaniard")
def _example_word(lang):
"""
Returns an... |
var colorCodes = {
back: "#fff",
front: "#888",
side: "#369"
}; |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# port to python of @karpathy's matlab code for t-SNE
# visualization of Imagenet
# see http://cs.stanford.edu/people/karpathy/cnnembed/
# download imagenet_val_embed.mat, val_imgs_med.txt there
# prerequisites: imagenet 2012 validation images
# get here: www.image-net.or... |
"use strict";
/*
* Copyright (C) 2017 TypeFox and others.
*
* 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
*/
function __export(m) {
for (var ... |
import matplotlib.pyplot as plt
def show_accuracy(history):
acc = history.history['accuracy']
val_acc = history.history['val_accuracy']
epochs = range(1, len(acc) + 1)
plt.plot(epochs, acc, 'bo', label='Training accuracy')
plt.plot(epochs, val_acc, 'b', label='Validating accuracy')
plt.title(... |
# -*- 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 field 'Release.summary'
db.add_column(u'api_release', 'summary',... |
import torch
from torch.nn import functional as F
from stable_baselines3.ddpg.ddpg import DDPG
from stable_baselines3.td3.td3 import TD3
from stable_baselines3.common.utils import polyak_update
from callbacks.buffers import ReplayBuffer
from typing import Union
def train_policy(
buffer: ReplayBuffer,
mode... |
import applyTimestampRules from '#lib/utilities/preprocessor/rules/timestamp';
import addIdsToBlocks from '#lib/utilities/preprocessor/rules/addIdsToBlocks';
import radioPageAddIdsToBlocks from '#lib/utilities/preprocessor/rules/radioPage/addIdsToBlocks';
import applyBlockPositioning from '#lib/utilities/preprocessor/r... |
import kb
import libkbot as libkb
class help:
level = 1
keywords = ['хелп','начать','помощь','help']
def handler(self, msg):
msg = libkb.fix_names(msg)
text = '''[ ОБЫЧНЫЙ ЮЗЕР ]
 kb_name погода - информация о погоде (название города как аргумент)
 kb_name арт - поиск артов по тегу (на англ)
 ... |
import axios from 'axios'
export function request(config){
// 创建axios实例
const instance = axios.create({
baseURL:'http://123.207.32.32:8000',
timeout:3000
})
//axois拦截器
//1、请求拦截
instance.interceptors.request.use(config=>{
//请求拦截时需要将配置信息返回
return config
})
... |