text stringlengths 3 1.05M |
|---|
import {
blockquote,
createEditor,
code,
doc,
p,
atomInline,
strong
} from '../test-helpers';
import {
flatten,
findChildren,
findTextNodes,
findBlockNodes,
findChildrenByAttr,
findChildrenByType,
findChildrenByMark,
contains
} from '../src';
describe('node', () => {
describe('flatten',... |
var prefix = "/system/post"
$(function() {
var columns = [{
checkbox: true
},
{
field: 'postId',
title: '岗位编号'
},
{
field: 'postCode',
title: '岗位编码'
},
{
field: 'postName',
title: '岗位名称'... |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the Lic... |
global.testLog = (...message) => {
try {
message = JSON.stringify(message, null, 2);
} catch (err) {
message = message.join(' ');
}
require('fs').appendFileSync('/tmp/ts-ic.log', message + '\n');
};
|
'use strict';
// ---------------------------------------------------------------------------
const Exchange = require ('./base/Exchange');
const { ExchangeError, InvalidOrder, AuthenticationError, InsufficientFunds, BadSymbol, OrderNotFound, InvalidAddress, BadRequest } = require ('./base/errors');
const { TRUNCATE,... |
/**
* Unit tests for the team functionality
*/
describe( 'Team functionality', function() {
// mock Application to allow us to inject our own dependencies
beforeEach(angular.mock.module('league'));
// create the custom mocks on the root scope
beforeEach(angular.mock.inject(function($rootScope, _$httpBackend_... |
var regex = /[\.\-\/]+/g;
module.exports.cnpjValidation = function(cnpj) {
cnpj = cnpj.replace(regex, "");
if (cnpj == "") return false;
if (cnpj.length != 14) return false;
if (
cnpj == "00000000000000" ||
cnpj == "11111111111111" ||
cnpj == "22222222222222" ||
cnpj == "33333333333333" ||
... |
var amqp = require('amqplib'),
util = require('util'),
Promise = require('bluebird'),
debug = require('debug')('mq-simple'),
_ = require('lodash'),
Mq = require('./mq'),
CONNECT_STATUS = Mq.CONNECT_STATUS;
/**
* 队列
* @param config 数据库配置
* {
* host:地址
* account:账号
* password:... |
import unittest
import openmdao.api as om
from openmdao.utils.assert_utils import assert_near_equal
import dymos as dm
from dymos.examples.min_time_climb.min_time_climb_ode import MinTimeClimbODE
from openmdao.utils.testing_utils import use_tempdirs
def min_time_climb(optimizer='SLSQP', num_seg=3, transcription='gau... |
# Coding using UTF-8
# Imports all necessary libraries
from tkinter import *
from time import sleep
def add(text, s, cronometro):
# Function that simulates the functioning of a clock, milliseconds, seconds, minutes and hours
cronometro[10] += 1
if cronometro[10] == 10:
cronometro[10] = 0
c... |
'use strict';
const {
Model
} = require('sequelize');
module.exports = (sequelize, DataTypes) => {
class Cliente extends Model {
/**
* Helper method for defining associations.
* This method is not a part of Sequelize lifecycle.
* The `models/index` file will call this method automatically.
*... |
import gym
from agent import DQNAgent
from utils import reward_plotter
def main():
env = gym.make("CartPole-v1")
agent = DQNAgent(env)
history = agent.train(n_episodes=500)
agent.save()
reward_plotter(history,10)
if __name__ == "__main__":
main()
|
import { Connection } from './Connection.js';
export class Node {
static ids = [];
static typeSigns = {
"start": {
opening: "([",
closing: "])"
},
"stop": {
opening: "([",
closing: "])"
},
"operation": {
opening... |
import React from 'react';
import { Row, Col } from 'react-bootstrap';
import Fields from '../components/fields/Fields';
import NewFieldForm from '../components/fields/NewFieldForm';
const FieldsPage = ({ fieldsReady, fields }) => (
<div className="fields-page">
<Row>
<Col md={12}>
<h4 className="... |
from days import day01
from ddt import ddt, data, unpack
import unittest
import util
@ddt
class MyTestCase(unittest.TestCase):
@data(
[['1122'], '3'],
[['1111'], '4'],
[['1234'], '0'],
[['91212129'], '9']
)
@unpack
def test_example_a(self, test_input,... |
import time
total_start = time.time()
from mz.API import mzdb
import NoDB
import sys
import os
import cStringIO
sample_name = sys.argv[1]
raw = mzdb.File(sample_name + ".mzdb")
if not os.path.exists(sample_name):
os.mkdir(sample_name)
NoDB.create(sample_name + "/scans")
for (offset, (t, p)) ... |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _react = require("react");
var _client = require("@apollo/client");
var _reducedQueries = require("./helpers/reducedQueries");
var _pagination = require("./helpers/pagination");
var _inFlightTracking = ... |
import React from 'react';
import PropTypes from 'prop-types';
import { isArray, assign } from 'lodash';
export default class Form extends React.Component {
constructor(props) {
super(props);
['onSubmit'].forEach(fn => {
this[fn] = this[fn].bind(this);
});
}
onSubmit(e) {
e.preventDefault()... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Apache License Version 2.0
# เขียนโดย วรรณพงษ์ ภัททิยไพบูลย์
import re
import runpy
import sys
import os
import io
class ThpyPlugin(object):
"""
basic plugin class
"""
pass
def multiple_replace(dict, text):
# Create a regular expression from the diction... |
import aiohttp
from khlbot.core.Logger import Logger
async def post_json_to_khl_api(url, body, token, success=None, failed=None):
headers = {
"Authorization": f"Bot {token}"
}
async with aiohttp.ClientSession() as session:
try:
async with session.post(url=url, json=body,
... |
print(f'Loading {__file__}...')
from ophyd import EpicsSignal, EpicsSignalRO, Device, TetrAMM, Kind
from ophyd import Component as Cpt
from ophyd.status import StatusBase, wait
from ophyd.quadem import NSLS_EM
# BPM1 Statistics
class BPMStats(Device):
tot1 = Cpt(EpicsSignal, 'Stats1:Total_RBV')
tot2 = Cpt(E... |
/**
* GNU MediaGoblin -- federated, autonomous media hosting
* Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, eit... |
from .orientationclassifier import OrientationClassifier, OrientationType |
# coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose Pty Ltd" file="StlLoadOptions.py">
# Copyright (c) 2003-2019 Aspose Pty Ltd
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# ... |
const joi = require('joi')
const moment = require('moment')
const componentTypes = require('../component-types')
const formComponents = componentTypes.filter(t => t.subType === 'field').map(t => t.name)
const { buildFormSchema, buildStateSchema } = require('./helpers')
const makeComponentCollection = require('./collect... |
// BERT-JS
// Copyright (c) 2009 Rusty Klophaus (@rklophaus)
// Contributions by Ben Browning (@bbrowning)
// See MIT-LICENSE for licensing information.
// Updated for map support
// - CLASSES -
function BertClass() {
this.BERT_START = String.fromCharCode(131);
this.SMALL_ATOM = String.fromCharCode(115);
this.ATO... |
// Copyright (c) 2013 Intel Corporation. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var _promises = {};
var _next_promise_id = 0;
var _listeners = {};
// Preserve 4 spaces to hold onattach, ondetach, onconnect and ondisconnect's
// callb... |
const assert = require('assert');
const { request, shouldLogIn, shouldNotLogIn } = require('./_shared.js');
const { testAdmin, testTranslator } = require('./_shared.js');
const requestObj = {
payload: {
name: 'Name of test-translator',
language: 'en'
}
};
const oldPassword = testTranslator.password;
const... |
# Copyright 2020 The ElasticDL 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 applicable law... |
#!/usr/bin/env python
# coding: utf-8
# DO NOT EDIT
# Autogenerated from the notebook glm.ipynb.
# Edit the notebook and then sync the output with this file.
#
# flake8: noqa
# DO NOT EDIT
# # Generalized Linear Models
import numpy as np
import statsmodels.api as sm
from scipy import stats
from matplotlib import pyp... |
/*!
* jQuery JavaScript Library v2.1.0 -dimensions,-effects,-effects/Tween,-effects/animatedSelector,-event-alias,-wrap
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org... |
# -*- coding: utf-8 -*-
"""
sphinx.ext.imgconverter
~~~~~~~~~~~~~~~~~~~~~~~
Image converter extension for Sphinx
:copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import subprocess
from sphinx.errors import ExtensionError
from sphinx.loca... |
const precioOriginal = 100;
const descuento = 25;
function calcularPrecioConDescuento(precio, descuento) {
const porcentajePrecioConDescuento = 100-descuento;
const precioFinal = (precio* porcentajePrecioConDescuento)/100;
return precioFinal;
}
function onClickButtonPriceDiscount() {
const inputPrice... |
var express = require('express'),
bcrypt = require('bcrypt'),
mongoose = require('mongoose'),
passport = require('passport'),
async = require('async'),
_ = require('underscore'),
models = require('models');
module.exports = (function() {
var app = express.Router();
app.get('/:showId',... |
# ======================================================================#
# Process Hi-C data to make links
# Last edition : 2019/02/28
# ======================================================================#
import sys
import numpy as np
# ======================================================================#
# ... |
import Amplify, { Auth, Hub, API, graphqlOperation } from 'aws-amplify';
import AWS from 'aws-sdk';
window.amplifyWrapper = {
configure: config => {
Amplify.configure(config);
},
hub: {
listen: dotnetHelper => {
Hub.listen("auth", ({ payload: { event } }) => {
s... |
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Vbfnlo(AutotoolsPackage):
"""VBFNLO is a fully flexible parton level Monte Carlo program
... |
import React from 'react';
import styled from '@emotion/styled';
import { GatsbyImage, getImage } from 'gatsby-plugin-image';
import Layout from './Layout';
import { graphql } from 'gatsby';
import ListadoPropiedades from './listadoPropiedades';
const Campos = styled.div`
display: grid;
gap: 1rem;
grid-template-... |
import React, { Component } from 'react';
import '../stylesheets/App.css';
import Question from './Question';
import Search from './Search';
import $ from 'jquery';
class QuestionView extends Component {
constructor(){
super();
this.state = {
questions: [],
page: 1,
totalQuestions: 0,
... |
var targetFilm = document.getElementById("film"), confirm_film = document
.getElementById("deleteFilm"), targetBook = document
.getElementById("book"), confirm_book = document
.getElementById("deleteBook"), targetShow = document
.getElementById("show"), confirm_show = document
.getElementById("deleteShow");
... |
const express = require('express');
const router = express.Router();
const isAdmLoggedIn = require('../config/isAdmLogged');
const User = require('../models/User');
const { check, validationResult } = require('express-validator');
// ROTA INDEX (USERS) exibe todos dos usuários cadastrados
router.get('/', isAdmLoggedIn... |
function initRolesView(){
$('.gantt').hide();
$('.nongantt').show();
$("#mainWorkspace").empty();
resetToolBar();
initRolesWidgit();
initRolesDataTable('#RolesTable');
refreshRolesData('#RolesTable');
if(current_workspace_role=='admin') {
appendToolBar('Create', 'Create', function(){
initRoleEditorWi... |
import pandas
from .indexed_geometries import IndexedGeometries
from .intersections import intersections
from .crs import require_same_crs
@require_same_crs
def assign(sources, targets):
"""Assign source geometries to targets. A source is assigned to the
target that covers it, or, if no target covers the ent... |
import hashlib
from datetime import datetime
from flask import current_app
from flask import request
from flask_login import AnonymousUserMixin
from flask_login import UserMixin
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from werkzeug.security import check_password_hash
from werkze... |
(function ($) {
'use strict';
var browserWindow = $(window);
// :: 1.0 Preloader Active Code
browserWindow.on('load', function () {
$('#preloader').fadeOut('slow', function () {
$(this).remove();
});
});
// :: 2.0 Nav Active Code
if ($.fn.classyNav... |
import os
import pandas as pd
from cwl_tools.hotspots import tag_hotspots
from python_tools.util import ArgparseMock
def main():
"""
Test for tag_hotspots module
"""
output_filename = 'expected.maf'
mock_args = ArgparseMock({
'input_maf': 'test.maf',
'input_txt': 'test_hotspots.ma... |
begin_unit
comment|'# Copyright (c) 2016 OpenStack Foundation'
nl|'\n'
comment|'# All Rights Reserved.'
nl|'\n'
comment|'#'
nl|'\n'
comment|'# Licensed under the Apache License, Version 2.0 (the "License"); you may'
nl|'\n'
comment|'# not use this file except in compliance with the License. You may obtain'
nl|'\n... |
/**
* Fastly API
* Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The... |
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser(prog='split_weights_by_h2.py', description='''
Split weights (output of train_ridge) by h2
''')
parser.add_argument('--weight_prefix', help='''
Prefix of weights (should have parquet and perf.tsv.gz files)
''... |
// User Module
const frostybot_module = require('./mod.base')
var context = require('express-http-context');
var speakeasy = require('speakeasy');
var qrcode = require('qrcode');
module.exports = class frostybot_user_module extends frostybot_module {
// Constructor
constructor() {
super()
}
... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8f0e0774"],{"2cda":function(t,s,n){},"53aa":function(t,s,n){"use strict";n("2cda")},"57de":function(t,s,n){"use strict";n.r(s);var i=function(){var t=this,s=t.$createElement,n=t._self._c||s;return n("div",{staticClass:"login-wrap"},[n("div",{staticClass:... |
"""
One-stop shopping for digital filtering of arrays
"""
import numpy as np
from .design import butter_bp, cheby1_bp, cheby2_bp, notch
from ecogdata.util import get_default_args, input_as_2d, nextpow2
import typing
if typing.TYPE_CHECKING:
from ecogdata.datasource import ElectrodeDataSource
import ecogdata.paralle... |
import { Engine } from 'matter-js'
import { Entities } from 'Models/Entities'
import { Game } from 'Models/Game'
import { playerController } from 'Components/Entities/Player/playerController'
import { enemyController } from 'Components/Entities/Enemies/enemyController'
import { enemyBullets } from './enemyBullets'
impo... |
# -*- coding: utf-8 -*-
import os
import shutil
import unittest
import datetime
import json
from peewee import IntegrityError
from playhouse.test_utils import test_database
from playhouse.sqlite_ext import SqliteExtDatabase
from catstalk.cat import Cat
from catstalk.static import POST_TEMPLATE, CONF_TEMPLATE
from cat... |
// The server port - the port to run Pokemon Showdown under
exports.port = 8000;
// The server id - the id specified in the server registration.
// This should be set properly especially when there are more than one
// pokemon showdown server running from the same IP
exports.serverId = 'killthenoise';
// proxyIps... |
// Imports
const fs = require('node:fs');
require('dotenv').config();
const { Client, Collection, Intents } = require('discord.js');
const token = process.env.BOT_TOKEN;
// Utilities
const emojis = require('./utility/emojis.js');
const { server, crypto } = require('./utility/backend.js');
// Discord client and its ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from .base import AuthenticationError
from .endpoints import InstagramAPIEndPoints
class InstagramAPI(InstagramAPIEndPoints):
""" Most of the available calls are defined in the InstagramAPIEndPoints.
This subclass adds ... |
r"""Test :py:class:`lmp.model._sattn_gru` signature."""
import inspect
from inspect import Parameter, Signature
from typing import Dict, Optional
from lmp.model._sattn_gru import (SAttnGRUBlock, SAttnGRUModel, SAttnRNNBlock,
SAttnRNNModel)
from lmp.tknzr._base import BaseTknzr
def ... |
# 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 ... |
var _interopRequire = function (obj) { return obj && obj.__esModule ? obj["default"] : obj; };
var postcss = _interopRequire(require("postcss"));
var Scouter = require("scouter").Scouter;
var Source = _interopRequire(require("./Source"));
var source = new Source();
var scouter = new Scouter();
var selectors = [];
v... |
import React, { Component } from 'react'
import { observer, inject } from 'mobx-react'
import { Layout, Button, Table, Input, Tag, Select } from 'antd'
import DropOption from '../../components/Layout/DropOption.js'
import OperationBar from '../../components/Layout/OperationBar.js'
const { Content } = Layout
const Opti... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for `seamm_ff_util` package."""
import seamm_ff_util # noqa: F401
def test_torsion_explicit(pcff):
"""Test of torsion parameters, which should find explicit ones"""
expected = {
"Phi0_1": "0.0",
"Phi0_2": "0.0",
"Phi0_3": "0.0"... |
import _extends from "@babel/runtime/helpers/builtin/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/builtin/objectWithoutProperties";
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
import withStyles from '../styles/withStyles';
import Typograp... |
var callbackArguments = [];
var argument1 = function callback(a,b,c) {
callbackArguments.push(JSON.stringify(arguments))
argument2[8.748669805137695e+307] = false
return a-b*c
};
var argument2 = function callback(a,b,c) {
callbackArguments.push(JSON.stringify(arguments))
base_1[5] = ""
base_1[4] = {"969":705,"1... |
module.exports = {
displayName:
'front-feature-experiment-tab-experiment-environment-reducer-provider',
preset: '../../../../../jest.preset.js',
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
},
},
transform: {
'^.+\\.[tj]sx?$': 'ts-jest',
},
moduleFileExtensions: ... |
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
Text,
View
} from 'react-native';
//引入外部组件
var Main = require('./Component/XMGMain');
export default class DNewsDemo extends Component {
rende... |
import React from "react";
import PropTypes from "prop-types";
import cx from "classnames";
import { withFormsy } from "formsy-react";
import { Column } from "ui/Layout";
import style from "./style.scss";
function Label({ text, error }) {
return (
<p className={cx(style.field__label, error && style.field__error)... |
import { computed } from '@ember/object';
import attr from 'ember-data/attr';
import ModelBase from 'open-event-frontend/models/base';
import moment from 'moment';
import { computedDateTimeSplit } from 'open-event-frontend/utils/computed-helpers';
import { belongsTo, hasMany } from 'ember-data/relationships';
export d... |
# todo remove in next major release as we no longer support django < 3.2 anyway. Note this would make dj-stripe unuseable for djang0 < 3.2
# for django < 3.2
default_app_config = "djstripe.apps.DjstripeAppConfig"
|
const initEdit = {
title: "",
summary: "",
content: "",
content_md: ""
};
const state = {
editContent: initEdit
};
const getters = {};
const actions = {
updateEdit({ commit }, data) {
commit("saveEdit", data);
},
clearEdit({ commit }) {
commit("clearEdit");
}
};
const mutations = {
saveEd... |
"""
The most important decorator in this module is `@api_view`, which is used
for writing function-based views with REST framework.
There are also various decorators for setting the API policies on function
based views, as well as the `@detail_route` and `@list_route` decorators, which are
used to annotate methods on ... |
/*
Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang("placeholder","km",{title:"លក្ខណៈ Placeholder",toolbar:"បង្កើត Placeholder",name:"ឈ្មោះ Placeholder",invalidName:"Placeholder មិនអាចទទេរ ហើយក៏មិន... |
/*! jQuery v1.11.2 | (c) 2005, 2014 jQuery Foundation, Inc. | jquery.org/license */ ! function(a, b) {
"object" == typeof module && "object" == typeof module.exports ? module.exports = a.document ? b(a, !0) : function(a) {
if (!a.document) throw new Error("jQuery requires a window with a document");
return b(a)
}... |
import { createApp } from 'vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import 'animate.css'
import App from './App.vue'
import router from './router/routes.js'
import VueAxios from 'vue-axios'
import axios from 'axios'
import store from "./store/store.js"
import ApiPr... |
const { Client, Message, MessageEmbed } = require('discord.js')
const { color, emojis } = require('../../config.json')
module.exports = {
name: 'about',
/**
* @param {Client} client
* @param {Message} message
*/
run: async(client, message) => {
let days = Math.floor(cli... |
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the Lic... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = tslib_1.__importStar(require("react"));
var StyledIconBase_1 = require("../../StyledIconBase");
exports.Unity = React.forwardRef(function (props, ref) {
var attrs = {
"fill": "currentColo... |
import React from 'react';
import Box from '@material-ui/core/Box';
import Typography from '@material-ui/core/Typography';
import BorderedList from '../template/BorderedList';
import {SmallMarginTextField} from '../template/smallComponents';
function SourceRecording(props) {
const {
channelNumber=1,
... |
import React from 'react';
import { Link } from 'react-router-dom';
import css from '../../../css/components/App.css'
function Login() {
return (
<nav>
<link rel="stylesheet" href={css} />
<div className="login-page">
<div className="form">
<h2 classN... |
System.register(["cce:/internal/code-quality/cr.mjs", "cc", "./GameManager", "./PlayerControl", "../global/GlobalFunction", "./AudioManager"], function (_export, _context) {
"use strict";
var _reporterNs, _cclegacy, _decorator, Component, Node, CCBoolean, randomRangeInt, Vec3, Label, color, GameManager, PlayerCont... |
"""
Mapping from WI fields to DwC terms, constant values and term order for
the Darwin Core Occurrence dataframe creation.
"""
constants = {
"organismQuantityType": "individual(s)",
"basisOfRecord": "MachineObservation",
"preparations": "photograph",
"kingdom": "Animalia",
"phylum": "Chordata",
}
m... |
#!/usr/bin/env python3
# Copyright (c) 2019-2020 The Helix developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# -*- coding: utf-8 -*-
from io import BytesIO
from time import sleep
from test_framework.messages import CTran... |
#!/usr/bin/env python
"""Tests for Image."""
import copy
import torch
import numpy as np
from torchio import ScalarImage, LabelMap, Subject, INTENSITY, LABEL, STEM
from ..utils import TorchioTestCase
from torchio import RandomFlip, RandomAffine
class TestImage(TorchioTestCase):
"""Tests for `Image`."""
def... |
//@flow
import {
Image,
endFrame,
loadThreeJSTexture
} from "../../gl-react-implementation";
const THREE = require("three");
global.THREE = THREE;
require("three/examples/js/renderers/Projector");
const colors = [0xa2394a, 0xd30324, 0xf5677d, 0xad001b, 0xf24560, 0xee2242];
// inspired from https://github.com/mr... |
"""
tableデータのデータセットの作成
feature_dir_pathで指定したtrain、testにその他の特徴量を結合する。
Examples
python src/table/make_table_dataset.py -c config/table/make_table_dataset/009.yml
"""
import argparse
import os
import sys
from pathlib import Path
import pandas as pd
import yaml
from dotenv import load_dotenv
load_dotenv() # noqa
... |
const Dev = require('../models/Dev')
module.exports = {
async store(req, res) {
const { user } = req.headers;
const { devId } = req.params;
const loggedDev = await Dev.findById(user);
const targetDev = await Dev.findById(devId);
if (!targetDev) {
return res.sta... |
define({
"builder": {
"initPopup": {
"title": "Dobro došli u",
"startBtn": "Pokreni"
},
"addEditPopup": {
"test": "test",
"add": "dodaj",
"edit": "uredi"
},
"landing": {
"lblAdd": "Kako želite nazvati svoj Shortlist?",
"phAdd": "Unesite naslov... |
{"version":3,"sources":["disk_player.js"],"names":["BX","namespace","getClass","Disk","Player","player","this","isReady","is_subclass_of","Fileman","container","id","parentNode","isDiskErrorShown","isDiskStatusChecked","adjustWidth","node","maxWidth","maxHeight","videoWidth","videoHeight","type","isDomNode","width","re... |
/**
* Copyright 2013-2020 the original author or authors from the JHipster project.
*
* This file is part of the JHipster project, see https://www.jhipster.tech/
* for more information.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the L... |
// Copyright(c) 2018 Stiftelsen Nordiska museet (Aron.Ambrosiani@nordiskamuseet.se),
// Maria Lindblad (mali4@kth.se),
// Anita Software Development AB (Tommy Samuelsson) (tommysam@kth.se).
// Copyright(c) 2018 Gustav Kjellberg, Gustaf Lidfeldt, Diar Sabri, Maria Lindblad,
// Lars Lundin, Carl Hultberg, Bruhan Hashi... |
toastr.options = {
closeButton: false,
debug: false,
newestOnTop: false,
progressBar: true,
positionClass: "toast-top-center",
preventDuplicates: true,
onclick: null,
showDuration: "300",
hideDuration: "1000",
timeOut: "5000",
extendedTimeOut: "1000",
showEasing: "swing",
hideEasing: "linear",
showMethod:... |
import React from "react";
import { graphql } from "gatsby";
import { connect } from "react-redux";
import {
updatePage,
loadPageData,
} from "../redux/actions";
import Layout from "../layouts/default.js";
import { EditableText, EditableParagraph } from "react-easy-editables";
const mapDispatchToProps = dispatch ... |
__author__ = "Celest"
import urllib.request
import requests
import click
import json
import os
import re
########## RETRIEVING GENERAL METADATA ##########
@click.command()
@click.option(
"--ID", "-ID", "--id", "-id",
prompt="ID of the book?\n>>",
help="ID of the BookWalker book, taken from its URL.",
)
de... |
import React from 'react';
import { Text } from 'react-native';
import { Query } from 'react-apollo';
import gql from 'graphql-tag';
import { ContainerCentered } from '../components/styled/Shared';
import ButtonStyled from '../components/styled/ButtonStyled';
const QUERY_USER = gql`
query QUERY_USER {
viewer {
... |
from django.contrib.auth.models import User
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import generics, permissions, status, filters
from rest_framework.generics import get_object_or_404
from rest_framework.response import Response
from rest_framework.views import APIView
from qu... |
from expfactory.battery import *
from expfactory.utils import copy_directory
from expfactory.vm import download_repo
import argparse
from glob import glob
import os
import sys
import shutil
import tempfile
# Get CLI parameters
parser = argparse.ArgumentParser()
parser.add_argument('--output', dest="output", help='Bat... |
# Automatically generated by pb2py
# fmt: off
from .. import protobuf as p
if __debug__:
try:
from typing import Dict, List # noqa: F401
from typing_extensions import Literal # noqa: F401
except ImportError:
pass
class WipeDevice(p.MessageType):
MESSAGE_WIRE_TYPE = 5
|
/**
* @format
*/
import {AppRegistry} from 'react-native';
import App from './src/js/App';
import {name as appName} from './app.json';
AppRegistry.registerComponent(
// app name
appName,
// app component
() => App,
);
|
#!/bin/env python3
# Author: ph-u
# Script: tuple.py
# Desc: python homework
# Input: python3 tuple.py
# Output: python interpreter output five blocks with three-lined each
# Arguments: 0
# Date: Oct 2019
"""python homework"""
__appname__="tuple.py"
__author__="ph-u"
__version__="0.0.1"
__license__="None"
birds = (... |
#! /usr/bin/python3
# -*- coding: utf-8 -*-
#
# maria_read.py
# Jul/31/2017
#
import sys
#
import mysql.connector
#
#
sys.path.append('../../../common/python_common')
from text_manipulate import dict_display_proc
from sql_manipulate import sql_to_dict_proc
#
# -------------------------------------------------------... |