text stringlengths 3 1.05M |
|---|
/*
Copyright 2019-2020 The Tekton 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 in writing, sof... |
const { createRoom } = require('./src/Game/GameController')
const {
NAME,
PORT
} = process.env
createRoom({
name: NAME || 'NAMELESS SERVER'
}, {
port: PORT || 5000
}) |
import React, { Fragment, useState, useRef } from "react"
import { Content } from "gatsby-theme-monolog/src/components/Layout"
import axios from "axios"
import qs from "qs"
const SuccessMessage = () => (
<Fragment>
<p className="text-delta text-shadow-delta">Welcome to the party, pal!</p>
<p>
We add th... |
import copy
import logging
import re
import six
from markupsafe import escape
from galaxy import model, util
from galaxy.web.base.controller import BaseUIController, web
from galaxy.web.framework.helpers import grids, iff, time_ago
log = logging.getLogger(__name__)
VALID_FIELDNAME_RE = re.compile(r"^[a-zA-Z0-9\_]+$... |
#!/usr/bin/env python
"""
"""
import numpy.random as rnd
def rand_in_range(max): # returns integer, max: integer
return rnd.randint(max)
def rand_un(): # returns floating point
return rnd.uniform()
def rand_norm (mu, sigma): # returns floating point, mu: floating point, sigma: floating point
return rnd... |
import { createVNode as _createVNode } from "vue";
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? Object(arguments[i]) : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.ge... |
var webviewGroup = function(id, options) {
this.id = id;
this.options = options;
this.styles = options.styles;
this.items = options.items;
this.onChange = options.onChange
this.options.index = options.index || 0;
this.webviews = {};
this.webviewContexts = {};
this.currentWebview = false;
this._init();
};
v... |
const path = require("path");
const HtmlWebpackPlugin = require("html-webpack-plugin");
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
const VueLoaderPlugin = require("vue-loader/lib/plugin");
module.exports = {
mode: "development",
entry: [
"@babel/polyfill",
path.resolve(__dirname, 'src/... |
import os
import csv
import copy
from torch.utils.data import Dataset
def read_csv(file):
with open(file, mode="r") as csv_file:
csv_reader = csv.DictReader(csv_file)
lines = []
for row in csv_reader:
lines.append(dict(row))
return lines
class Brats2020:
"""
Br... |
from .fadingedge import FadingEdgeEffect
|
/*
* @license MIT http://www.opensource.org/licenses/mit-license.php
* @author Hovhannes Babayan <bhovhannes at gmail dot com>
*/
var loaderUtils = require('loader-utils');
var REGEX_STYLE = /<style[\s\S]*?>[\s\S]*?<\/style>/i
var REGEX_DECLARATION = /^\s*<\?xml [^>]*>\s*/i
var REGEX_DOUBLE_QUOTE = /"/g
var REGEX... |
// define("bootstrapLoader", ["popper"], function(popper) {
// // show everyone what we're up to
// console.log("loading bs");
// // set popper as required by Bootstrap
// window.Popper = popper;
// require(["bootstrap"], function(bootstrap) {
// // do nothing - just let Bootstrap initialise... |
import math
from concurrent.futures import ProcessPoolExecutor
class ProgressBarError(Exception):
"""
Raise when something goes wrong in ProgressBar
"""
pass
class ProgressBar(object):
def __init__(self, iterable, desc=None, start=0, step=1, cols=50, block=u"\u2588", last_index=None):
s... |
"""
Scenario:
1 speaker, 2 listeners (one of which is an adversary). Good agents rewarded for proximity to goal, and distance from
adversary to goal. Adversary is rewarded for its distance to the goal.
"""
import numpy as np
from multiagent.core import World, Agent, Landmark
from multiagent.scenario import BaseScenar... |
import { fromJS, Map } from "immutable"
import {
UPDATE_SELECTED_SERVER,
UPDATE_REQUEST_BODY_VALUE,
UPDATE_REQUEST_BODY_INCLUSION,
UPDATE_ACTIVE_EXAMPLES_MEMBER,
UPDATE_REQUEST_CONTENT_TYPE,
UPDATE_SERVER_VARIABLE_VALUE,
UPDATE_RESPONSE_CONTENT_TYPE,
SET_REQUEST_BODY_VALIDATE_ERROR,
CLEAR_REQUEST_BOD... |
import React from 'react'
import Link from 'gatsby-link'
import Img from 'gatsby-image'
const IndexPage = ( { data } ) => {
return (
<div>
<h1>Pages</h1>
{data.allWordpressPage.edges.map(({ node }) =>
<div>
<h3 style={{ color: 'blue' }}>{node.title}</h3>
<p>{node.date}</p... |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const path_1 = require("path");
const child_process_1 = require("child_process");
const nodeBin = path_1.join(__dirname, 'bin', 'node');
const bootstrap = path_1.join(__dirname, '..', 'nodejs', 'bootstrap.js');
child_process_1.spawn(nodeBin, [... |
import React, { Component } from 'react';
class StaffManageNavbarHeadingBtns extends Component {
state = {}
highlightColor = () => {
let color = "flex place-items-center justify-center bg-black w-full ml-3 mr-3 shadow-2xl rounded-xl h-16 text-white text-sm";
return color;
}
... |
/**
* Copyright (c) 2015-present, Facebook, Inc.
* 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. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*
* @flow
*/... |
import { registerBidder } from '../src/adapters/bidderFactory.js';
import { ajax } from '../src/ajax.js';
import { config } from '../src/config.js';
import { BANNER, VIDEO } from '../src/mediaTypes.js';
import {
deepAccess,
deepSetValue,
inIframe,
isArrayOfNums,
isInteger,
isNumber,
isStr,
logError,
p... |
import { pushTarget, popTarget } from './Dependency'
export default class Watch {
constructor(getter, callback) {
this.getter = getter
this.callback = callback
this.value = this.get()
}
get() {
pushTarget(this)
const value = this.getter()
popTarget()
return value
}
update() {
... |
// This file is part of Moodle - http://moodle.org/
//
// Moodle 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.
//
// Moodle... |
import React from 'react';
import ReactDOM from 'react-dom';
import App from './src/App.js';
require('file-loader?name=[name].[ext]!./index.html');
ReactDOM.render(<App />, document.getElementById('home'));
|
var fs = require('fs'),
argv = require('argv');
var args = argv.option([
{
name: 'input',
short: 'i',
type: 'string',
description: 'text file',
example: "'script --input filename' or 'script -i filename'"
},
{
name: 'output',
short: 'o',
type: 'string',
description: 'JSON f... |
from rest_framework import serializers
from datetime import datetime, timezone
from django.utils.timesince import timesince
from apps.users.models import CustomUser, Review
from rest_framework.authtoken.models import Token
class UserSerializer(serializers.ModelSerializer):
"""Serializer class for user in order... |
var Greeting = function(term) {
const date = new Date();
console.log(date);
this.getDate = function() {
return date;
};
this.greeting = term;
};
var obj1 = new Greeting("Hello");
setTimeout(function() {
obj2 = new Greeting("Hi");
}, 3000); |
"""
callooktools: asynchronous editon
---
Copyright 2021 classabbyamp, 0x5c
Released under the terms of the BSD 3-Clause license.
"""
from typing import Optional
import aiohttp
from ..common import mixins, dataclasses, exceptions
from .callook import CallookClientAbc
class CallookAsyncClient(mixins.AsyncMixin, Ca... |
import React from 'react';
import { render, cleanup } from 'react-testing-library';
import { BrowserRouter as Router } from 'react-router-dom';
import FormModelConverter from './converter.component';
describe.only('Form Model Converter', () => {
afterAll(cleanup);
const { container, getByTestId } = render(
<R... |
$(document).ready(function() {
$('#mydataTables').dataTable( {
"bProcessing": true,
"sAjaxSource": '../model/view_data.php',
responsive: true
} );
$('#mydataTables_cat').dataTable( {
"bProcessing": true,
"sAjaxSource": '../model/view_cat.php',
responsive: true
} );
$('#m... |
const mysql=require("mysql")
var pool=mysql.createPool({
host:"127.0.0.1",
port:3306,
user:"root",
password:"",
database:"xz",
connectionLimit:15
});
module.exports=pool;
|
module.exports = {
simple: {
response: {
200: {
type: 'object',
properties: {
result: { type: 'string' }
}
}
}
},
swagger: {
description: '获取区域数据(省、市)',
tags: ['基础数据'],
respons... |
#!/usr/bin/env python
"""Tests for `conda_env_export` package."""
import unittest
from click.testing import CliRunner
from conda_env_export import conda_env_export
from conda_env_export import cli
class TestConda_env_export(unittest.TestCase):
"""Tests for `conda_env_export` package."""
def setUp(self):
... |
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
requir... |
import Immutable from 'immutable';
import * as ACTIONS from 'store/actionTypes';
import byId from 'store/byId';
describe('byId reducer', () => {
it('should return the initial state', () => {
expect(byId(undefined, {})).toEqual(Immutable.Map());
});
it('should handle HACKER_NEWS_FETCH_SUCCESS', () => {
... |
"use strict";
const conversions = require("webidl-conversions");
const utils = require("./utils.js");
const impl = utils.implSymbol;
const HTMLElement = require("./HTMLElement.js");
function HTMLFieldSetElement() {
throw new TypeError("Illegal constructor");
}
Object.setPrototypeOf(HTMLFieldSetElement.prototype, ... |
const mongoose = require('mongoose');
const bcrypt = require('bcryptjs');
const jwt = require('jsonwebtoken');
const crypto = require('crypto');
const nodemailer = require('nodemailer');
const responseHandler = require('../helper/responseHandler');
// mailing credentials
const smtpTransport = nodemailer.createTransp... |
(function() {
this.CommitFile = (function() {
function CommitFile(file) {
if ($('.image', file).length) {
new ImageFile(file);
}
}
return CommitFile;
})();
}).call(this);
|
/*!
* devextreme-angular
* Version: 21.2.5
* Build date: Mon Jan 17 2022
*
* Copyright (c) 2012 - 2022 Developer Express Inc. ALL RIGHTS RESERVED
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file in the root of the project for details.
*
* h... |
/**
* Welcome to your Workbox-powered service worker!
*
* You'll need to register this file in your web app and you should
* disable HTTP caching for this file too.
* See https://goo.gl/nhQhGp
*
* The rest of the code is auto-generated. Please don't update this file
* directly; instead, make changes to your Wor... |
/*! ramp-theme-intranet Plugins 10-06-2015 18:00:13 : v. 5.4.0-ckan
*
* RAMP GIS viewer - Groundhog; Sample of an implementation of RAMP with Intranet Theme
**/
RAMP.plugins.featureInfoParser.tempParse=function(a){"use strict";var b=a.match(/value=(-?\d+\.?\d?)\d*\n/),c=a.match(/unit=(.*)\n/);return b=b?b[1]:"",c... |
# 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... |
'use strict';
var _regeneratorRuntime = require('babel-runtime/regenerator')['default'];
var _interopRequireDefault = require('babel-runtime/helpers/interop-require-default')['default'];
var _chai = require('chai');
var _chai2 = _interopRequireDefault(_chai);
var _chaiAsPromised = require('chai-as-promised');
var... |
/* eslint-disable*/
const fs = require('fs');
const path = require('path');
const {Wallets} = require('fabric-network');
let CRYPTO_CONFIG;
let CRYPTO_CONFIG_PEER_ORGS;
let WALLET_FOLDER;
let wallet;
let action = 'list';
init();
async function init() {
CRYPTO_CONFIG = path.join(__dirname, '../../../../yrbc_network... |
"""
A simple testing framework for lldb using python's unit testing framework.
Tests for lldb are written as python scripts which take advantage of the script
bridging provided by LLDB.framework to interact with lldb core.
A specific naming pattern is followed by the .py script to be recognized as
a module which impl... |
import "react-toastify/dist/ReactToastify.css";
import "tailwindcss/tailwind.css";
import { AnimatePresence } from "framer-motion";
import { Elements } from "@stripe/react-stripe-js";
import { loadStripe } from "@stripe/stripe-js";
import { ToastContainer } from "react-toastify";
import Head from "next/head";
import ... |
/*
credits
brunt of the work by increpare (www.increpare.com)
all open source mit license blah blah
testers:
none, yet
code used
colors used
color values for named colours from arne, mostly (and a couple from a 32-colour palette attributed to him)
http://androidarts.com/palette/16pal.htm
the editor is a slight mo... |
const { oneLine } = require('common-tags');
const Command = require('../base');
module.exports = class PingCommand extends Command {
constructor(client) {
super(client, {
name: 'ping',
group: 'util',
memberName: 'ping',
description: 'Verifica o ping do bot para o servidor Discord.',
throttling: {
... |
# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.md
#
# Astropy documentation build configuration file.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this file.
#
# All configuratio... |
# Copyright 2021 The Flax 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 in wri... |
/* global chrome */
import React, { Component } from 'react';
import PropTypes from 'prop-types'
import { isDevTools } from './helpers';
//
// Helper functions
//
// collapseStack
// - obj: object to populate based on keys
// - keys: array of key names (i.e. to populate test.demo.property, ['test','demo','property'])... |
const mongoose = require('mongoose')
const Schema = mongoose.Schema
//Create Schema
const InvoiceSchema = new Schema(
{
//Không cần thuộc tính ID vì trong MongoDB sẽ tự tạo ID cho mình khi insert vào
idMember: {
type: mongoose.Schema.Types.ObjectId,
required: true,
ref: 'Members'
},
... |
import React from 'react';
import PropTypes from 'prop-types';
import DimensionSelect from './DimensionSelect';
import DimensionItemsSelect from './DimensionItemsSelect';
import RemoveFilter from '../filter/RemoveFilter';
import styles from './styles/DimensionFilterRow.module.css';
const DimensionFilterRow = ({
di... |
var Generator = require('yeoman-generator');
var path = require('path');
var fs = require('fs');
var request = require('request-promise');
var Crypt = require('simple-crypto-js').default;
var os = require('os');
var Questions = require('./questions');
module.exports = class extends Generator {
_private_get_valid_t... |
#
# Copyright (c) 2015-2016 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
import functools
from nfv_common import debug
from nfv_common.timers._timer import Timer
from nfv_common.timers._timer_scheduler import TimerScheduler
DLOG = debug.debug_get_logger('nfv_common.timers.timer_module')
_sched... |
import { convertToPercent } from '@/common/utils';
import debounce from '@/common/utils.debounce';
import Canvas from '../helpers/helpers.canvas';
import Util from '../helpers/helpers.util';
const TITLE_HEIGHT = 30;
const TEXT_HEIGHT = 14;
const LINE_SPACING = 8;
const COLOR_MARGIN = 16;
const VALUE_MARGIN = 50;
const... |
import escapeStringRegexp from 'escape-string-regexp';
export default function makeRegex(str, simple = false) {
let value;
if (simple) {
value = str;
} else {
value = '(\'' + str + '\')';
}
return new RegExp(escapeStringRegexp(value));
}
|
#
# MIT License
#
# Copyright (c) 2020 Airbyte
#
# 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 without limitation the rights
# to use, copy, modify, merge, pu... |
from django.apps import AppConfig
class VaccineConfig(AppConfig):
name = "vaccine"
|
import os
os.system("sudo apt-get install python3-pip")
os.system("sudo pip3 install geoip2")
os.system("sudo apt-get install python3-nmap")
os.system("python3 main.py")
|
let sleep = (time, info) => {
return new Promise(function (resolve) {
setTimeout(function () {
console.log(info)
resolve('this is ' + info)
}, time)
})
};
let loser = sleep(1000, 'loser');
let winner = sleep(4, 'winner');
let other = sleep(50, 'other');
// main
Promise.all([winner, loser,... |
import React from 'react'
import { Link } from 'gatsby'
import { graphql } from "gatsby"
import Layout from '../components/layout'
import SEO from '../components/seo'
const Post = (props) => (
<Layout>
<SEO title="post" />
<h1>BlogPost Page</h1>
<p>Welcome to the post</p>
<Link to="/">Go b... |
const HDWalletProvider = require('truffle-hdwallet-provider');
const Web3 = require('web3');
const config =require("config");
const provider = new HDWalletProvider(
'answer margin gallery suit decide tonight custom crisp eternal modify tiger huge',
'https://rinkeby.infura.io/v3/ddae119e519b4ed9b2d16eea07ab3498... |
/** @type {import('aegir').PartialOptions} */
export default {
build: {
bundlesizeMax: '109KB',
}
}
|
/*
Copyright (C) Federico Zivolo 2019
Distributed under the MIT License (license terms are at http://opensource.org/licenses/MIT).
*/(function (e, t) { 'object' == typeof exports && 'undefined' != typeof module ? module.exports = t() : 'function' == typeof define && define.amd ? define(t) : e.Popper = t() })(this, f... |
var searchData=
[
['mainwindow',['MainWindow',['../class_ui_1_1_main_window.html',1,'Ui']]],
['mainwindow',['MainWindow',['../class_main_window.html',1,'']]]
];
|
(function(d){ const l = d['tr'] = d['tr'] || {}; l.dictionary=Object.assign( l.dictionary||{}, {"%0 of %1":"%0/%1",Aquamarine:"Su Yeşili",Big:"Büyük",Black:"Siyah","Block quote":"Alıntı",Blue:"Mavi",Bold:"Kalın","Bulleted List":"Simgeli Liste",Cancel:"İptal","Cannot upload file:":"Dosya yüklenemedi:","Centered image"... |
/**
* Creates a Dann model from a json object.
* @method createFromJSON
* @for Dann
* @static
* @param {Object} data model data json object, you can get this object from a yourmodel.toJSON(); See docs <a href="https://dannjs.org">here</a>.
* @return {Dann} A Dann model.
* @example
* <code>
* const nn = new Dan... |
jQuery(function ($) {
$.fontpicker.regional['en'] = {
'ok': 'OK',
'cancel': 'Cancel',
'none': 'None',
'button': 'Font',
'title': 'Pick a font',
'family': 'Family:',
'style': 'Style:',
'size': 'Size:',
'unit-pixel': 'px',
'unit-percentage': '%',
'settings-character': 'Character',
'settings-parag... |
// Par nome/valor
const saudacao = "Olá" // Contexto léxico. Local a qual a variável foi fisicamente definida no código. (1)
function executa() {
const saudacao = "Tudo bem?" // Contexto léxico (2). Não gera conflito.
return saudacao
}
// Objetos são grupos aninhados de Chave/Valor.
const client = {
no... |
import { config, mount } from '@vue/test-utils'
import ContributionForm from './ContributionForm.vue'
import Vue from 'vue'
import Vuex from 'vuex'
import PostMutations from '~/graphql/PostMutations.js'
import CategoriesSelect from '~/components/CategoriesSelect/CategoriesSelect'
import ImageUploader from '~/componen... |
const { user: globalUser } = require("./userTestUtils");
const { db } = require("./dbConnection");
const request = require("supertest");
const { app } = require("./server.js");
const { hashPassword } = require("./authenticationController.js");
const nock = require("nock");
afterAll(() => app.close());
describe("add i... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
'use strict';
var assert = require('chai').assert;
var ArgumentError = require('azure-iot-common').errors.ArgumentError;
var SharedAccessSignature = require('./shared_... |
const { DateTime } = require("luxon");
const CleanCSS = require("clean-css");
const UglifyJS = require("uglify-es");
const htmlmin = require("html-minifier");
const pluginRss = require("@11ty/eleventy-plugin-rss");
const pluginPWA = require("eleventy-plugin-pwa");
module.exports = function(eleventyConfig) {
eleventy... |
/* jshint expr:true */
import { expect } from 'chai';
import { describeModule, it } from 'ember-mocha';
describeModule('route:protected', 'ProtectedRoute', {
needs: ['router:main']
}, function() {
it('is still testable when using the AuthenticatedRouteMixin', function() {
const route = this.subject();
exp... |
(window.webpackJsonp=window.webpackJsonp||[]).push([[81],{"/7aX":function(e,t,a){"use strict";a.r(t),a.d(t,"_frontmatter",(function(){return s})),a.d(t,"default",(function(){return c}));a("5hJT"),a("W1QL"),a("K/PF"),a("t91x"),a("75LO"),a("PJhk"),a("mXGw");var i=a("/FXl"),n=a("TjRS");a("aD51");function o(){return(o=Obje... |
import React from "react";
import ReactDOM from "react-dom";
import CityList from "./CityList";
it("renders without crashing", () => {
const div = document.createElement("div");
ReactDOM.render(<CityList />, div);
});
|
import urllib2
import simplejson
import datetime
from django.conf import settings
from django_hpcloud.authentication import get_auth_token
def _get_cdn_enabled_containers():
path = "%s%s?format=json" % (settings.CDN_URL, settings.TENANT_ID)
req = urllib2.Request(path)
req.add_header("Content-type", "appl... |
import { Vue } from '../../../vue'
import {
EVENT_NAME_ROW_CLICKED,
EVENT_NAME_ROW_HOVERED,
EVENT_NAME_ROW_UNHOVERED
} from '../../../constants/events'
import {
PROP_TYPE_ARRAY_OBJECT_STRING,
PROP_TYPE_FUNCTION,
PROP_TYPE_OBJECT_FUNCTION
} from '../../../constants/props'
import { SLOT_NAME_ROW_DETAILS } fro... |
function getCtx(selector) {
const pages = getCurrentPages();
const ctx = pages[pages.length - 1];
console.log(ctx);
const componentCtx = ctx.selectComponent(selector);
console.log(componentCtx);
if (!componentCtx) {
console.error("无法找到对应的组件,请按文档说明使用组件");
return null;
}
... |
import ResultSource from "./ResultSource";
import { connect } from "react-redux";
import {addResponse, searchSupplierByID} from '../../store/actionCreators/search'
const mapStateToProps = (state) => ({
sources: state.addResponseToStore.responses,
});
const mapDispatchToProps = (dispatch) => ({
addToStore: (data)=>... |
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["mdc-tabs"]=e():t["mdc-tabs"]=e()}(window,function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:... |
const console_el = document.getElementById('console')
export function log(x) {
console_el.innerHTML += JSON.stringify(x) + '\n'
} |
import pandas as pd
import numpy as np
import os
import tensorflow as tf
import functools
####### STUDENTS FILL THIS OUT ######
#Question 3
def reduce_dimension_ndc(df, ndc_df):
'''
df: pandas dataframe, input dataset
ndc_df: pandas dataframe, drug code dataset used for mapping in generic names
return:... |
################################################################################
### Python port of LassoShooting.fit.R
### https://github.com/cran/hdm/blob/master/R/LassoShooting.fit.R
################################################################################
####################################################... |
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[5],{"03b8":function(e,n,t){"use strict";t.r(n);var a=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("q-layout",{attrs:{view:"lHh Lpr lFf"}},[t("q-page-container",[t("router-view")],1)],1)},o=[],r={name:"MainLayout",components:{},data(){return... |
import util from './utils/index'
let source, destination
const getMixerChannel = (index, p) => {
return Math.round((destination[index] - source[index] * p) / (1 - p))
}
const getPercentage = (index, edge) => {
return (edge - destination[index]) / (edge - source[index])
}
const validatePercentage = p => {
p = u... |
import RESTAdapter from 'ember-cli-gatekeeper/-lib/user/adapters/rest';
export default RESTAdapter.extend ({
});
|
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-06-06 06:50
from __future__ import unicode_literals
from django.db import migrations
import form_designer.fields
class Migration(migrations.Migration):
dependencies = [
('form_designer', '0001_initial'),
]
operations = [
migrat... |
import importlib
import json
import logging
import os
import sys
import uuid
from abc import ABCMeta
from abc import abstractmethod
from ast import literal_eval
from enum import Enum
from enum import unique
import requests
from flask import current_app as app
from kubernetes import config
from kubernetes.client import... |
/**
* Copyright IBM Corp. 2016, 2018
*
* This source code is licensed under the Apache-2.0 license found in the
* LICENSE file in the root directory of this source tree.
*/
import { useCallback } from 'react';
/**
* Combine multiple refs into a single ref. This use useful when you have two
* refs from both `Re... |
module.exports={A:{A:{"1":"E B A","2":"J C G TB"},B:{"1":"D X g H L"},C:{"1":"0 2 4 F I J C G E B A D X g H L M N O P Q R S T U V W u Y Z a b c d e f K h i j k l m n o p q r w x v z t s","16":"1 RB PB OB"},D:{"1":"0 2 4 8 Z a b c d e f K h i j k l m n o p q r w x v z t s DB AB SB BB","16":"F I J C G E B A D X g","132":... |
var searchData=
[
['makevideocall',['makeVideoCall',['../classcom_1_1hyphenate_1_1chat_1_1_e_m_call_manager.html#a3e49344c1ff527960e8978f2ba6858db',1,'com::hyphenate::chat::EMCallManager']]],
['makevoicecall',['makeVoiceCall',['../classcom_1_1hyphenate_1_1chat_1_1_e_m_call_manager.html#ab18d852e3ce41debf25142b69ff0... |
/*CLASS*/
function PropertyDelegate(obj, path, calcCallBack) {
BaseObject.apply(this, arguments);
this.$obj = obj;
this.$path = path;
this.$calc = calcCallBack; // Callback to calculate the property if it is null
}
PropertyDelegate.Inherit(BaseObject, "PropertyDelegate");
PropertyDelegate.... |
import axios from 'axios'
const http = axios.create({
baseURL: 'http://localhost:3000/'
})
http.interceptors.response.use(function(response) {
return response;
}, function(error) {
return error.response;
});
export { http } |
const express = require('express');
const app = express();
const bodyParser = require("body-parser");
const morganImport = require ('morgan');
const jwt = require('jsonwebtoken');
const config = require("./config");
const routesAuth = require('./routes/routesAuth');
const routesData = require('./routes/routesData');
co... |
/*!
* Copyright 2022 - Swiss Data Science Center (SDSC)
* A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
* Eidgenössische Technische Hochschule Zürich (ETHZ).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the Li... |
from __future__ import print_function, with_statement, division
import copy
import os
import torch
from tqdm import tqdm
from torch.optim.lr_scheduler import _LRScheduler
import matplotlib.pyplot as plt
import torch.nn.functional as F
import numpy as np
from data_prefetcher import DataPrefetcher
class LRFinder(object... |
'use strict';Object.defineProperty(exports,'__esModule',{value:true});require('externalNoImport');var defaultLegacy=require('external'),externalAuto=require('externalAuto'),externalDefault=require('externalDefault'),externalDefaultOnly=require('externalDefaultOnly');function _interopDefaultLegacy(e){return e&&typeof e=... |
import {setupHome, showHome} from './home.js';
import {setupCreate, showCreate} from './create.js';
import {setupPost} from './post.js';
const main = document.querySelector('main');
setupSection('home-topics', setupHome);
setupSection('create-topic', setupCreate);
setupSection('post-with-comments', setupPost);
funct... |