text
stringlengths
3
1.05M
import os import sys from math import modf from errno import EOPNOTSUPP try: from errno import ENOTSUP except ImportError: # some Pythons don't have errno.ENOTSUP ENOTSUP = 0 from rpython.rlib import rposix, rposix_stat, rfile from rpython.rlib import objectmodel, rurandom from rpython.rlib.objectmodel imp...
import numpy as np import math from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D class RBF_Filter(): def __init__(self, iWidth, iHeight, radius = 0.01, debug = False): self.debug = debug self.radius = float(radius) self.width = iWidth self.height = iHeigh...
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="visual_clutter", version="1.0.2", author="Amir Hossein Kargaran", author_email="kargaranamir@gmail.com", description="Python implementation of two measures of visual clut...
/** * Drawer toolbar class. * @param {Drawer} drawerInstance * * @constructor */ var DrawerToolbarManager = function (drawer) { this.drawerInstance = drawer; if (!drawer) { throw new Error("DrawerToolbarManager : drawer must be provided!"); } this.toolbars = {}; this.toolbarPlaceholders = {}; this.Too...
from time import sleep import re from model.contact import Contact class ContactHelper: def __init__(self, app): self.app = app def __repr__(self): return("%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s:%s" % (self.app.id, self.app.fname, self.app.mname, self.app.lna...
const BINARYEN_VERSION = "100.0.0-nightly.20210413"; const LONG_VERSION = "4.0.0"; const ASSEMBLYSCRIPT_VERSION = "0.18.27"; // AMD/require.js (browser) if (typeof define === "function" && define.amd) { const paths = { "binaryen": "https://cdn.jsdelivr.net/npm/binaryen@" + BINARYEN_VERSION + "/index", "long"...
import {Component, PropTypes} from 'react'; import {numberProp} from '../lib/props'; class Stop extends Component{ static displayName = 'Stop'; static propTypes = { stopColor: PropTypes.string, stopOpacity: numberProp }; static defaultProps = { stopColor: '#000', stopOp...
//Switch light/dark $(".switch").on('click', function () { if ($("body").hasClass("light")) { $("body").removeClass("light"); $(".switch").removeClass("switched"); } else { $("body").addClass("light"); $(".switch").addClass("switched"); } });
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import cx from 'classnames'; import AnimationComponent from '../Animation'; export default class Frame extends Component { static propTypes = { Animation: PropTypes.any.isRequired, theme: PropTypes.any.isRequired, classes: P...
import _ from 'lodash'; import React from 'react'; import { Sparklines, SparklinesLine, SparklinesReferenceLine } from 'react-sparklines'; function average (data) { return _.round(_.sum(data)/data.length); } export default (props) => { return ( <div> <Sparklines height={120} width={180} data={props.dat...
/** * @fileoverview added by tsickle * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc */ import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewChild } from "@angular/core"; import { FormGroup } from "@angular/forms"; import { MultiSelectComponent } from "@progress/kendo-angula...
import React from 'react'; import styled from 'styled-components'; import noop from 'lodash/noop'; import theme from 'styles/theme'; const StyledToggle = styled.label` position: relative; width: 60px; cursor: pointer; .Toggle__checkbox { display: none; } .Toggle__track { display: flex; heigh...
/* global describe,it */ 'use strict' import { Bip32 } from '../lib/bip-32' import { Ecies } from '../lib/ecies' import { Hash } from '../lib/hash' import { PrivKey } from '../lib/priv-key' import { PubKey } from '../lib/pub-key' import { KeyPair } from '../lib/key-pair' import { Workers } from '../lib/workers' import ...
import React from 'react'; import { styled } from '@mui/material/styles'; import Typography from '@material-ui/core/Typography'; import Container from 'modules/components/Container'; import Button from 'modules/components/Button'; import Link from 'modules/components/Link'; const PREFIX = 'SellHero'; const classes = ...
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.Popper = require("popper.js").default; wind...
'use strict'; // @@match logic require('../internals/fix-regexp-well-known-symbol-logic')('match', 1, function (defined, MATCH, nativeMatch) { // `String.prototype.match` method // https://tc39.github.io/ecma262/#sec-string.prototype.match return [function match(regexp) { var O = defined(this); var matche...
from discord import Guild, Message, NotFound from discord.ext.commands import EmojiConverter import re async def find_message(guild: Guild, message_id: int) -> Message: # Returns the message, or None if there is no message for channel in guild.text_channels: try: return await channel.fetch_mes...
/** * https://www.joshwcomeau.com/snippets/react-hooks/use-prefers-reduced-motion/ */ import { useState, useEffect } from 'react'; const QUERY = '(prefers-reduced-motion: no-preference)'; const isRenderingOnServer = typeof window === 'undefined'; const getInitialState = () => // For our initial server re...
# coding=utf-8 # from src.testcase.suite.DiffImg import * from src.utils.ReadConf import * class AppInitAndroid(object): def __init__(self, device_info, k): self.d = device_info self.k = k app = conf["phone_name"][k]["app"].upper() app_list = {"GN_APP": "GN_Android", ...
const config = require('config') const connectionString = config.get('db.connectionString') + config.get('db.database'); module.exports = { "undefined": connectionString, "dev": connectionString, "prod": connectionString }
import { mainTestFn, test } from "@compas/cli"; import { newLogger } from "../index.js"; import { eventRename, eventStart, eventStop, newEvent, newEventFromEvent, newTestEvent, } from "./events.js"; mainTestFn(import.meta); test("insight/events", (t) => { const log = newLogger(); t.test("create root ...
# mysql/base.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: mysql :name: MySQL Supported Versions and Features ------------...
/* Show and hide menu */ $(document).ready(function(){ 'use strict'; $(window).scroll(function() { 'use strict'; if($(window).scrollTop() < 80 ) { $('.navbar').css ({ 'margin-top': '-100px', 'opacity': '0' ...
import sift from 'sift'; import dot from 'dot-object'; function extractIdsFromArray(array, field) { return (array || []).map(obj => _.isObject(obj) ? dot.pick(field, obj) : undefined).filter(v => !!v); } /** * Its purpose is to create filters to get the related data in one request. */ export default class Aggre...
/** * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ /* globals console:false, document, window */ import ClassicEditor from '../../src/classiceditor'; import Enter from '@ckeditor/ckeditor5-...
/* eslint-disable react-hooks/exhaustive-deps */ import React, { useContext, useEffect, useState } from 'react' import { useParams } from 'react-router-dom' import { HicetnuncContext } from '../../context/HicetnuncContext' import { getWalletBlockList } from '../../constants' import { Loading } from '../../components/lo...
"use strict"; // Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT license. // See LICENSE in the project root for license information. Object.defineProperty(exports, "__esModule", { value: true }); const colors = require("colors"); const path = require("path"); const node_core_libr...
from django.core.management.base import NoArgsCommand from django.utils.six.moves import input from cms.management.commands.subcommands.list import plugin_report class DeleteOrphanedPluginsCommand(NoArgsCommand): help = "Delete plugins from the CMSPlugins table that should have instances but don't, and ones for ...
var settings = {} settings.web = {} settings.web.http_port = process.env.HTTP_PORT || 8080 settings.web.https_port = process.env.HTTPS_PORT || 8081 settings.db = { host : "", user : '', password : '', database : '', } settings.CAPTCHA_SECRET = "" settings.PRIVATE_KEY = "privkey.pem" settings...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RichTextEditorSelection = void 0; var _litElement = require("lit"); var _utils = require("@lrnwebcomponents/utils/utils.js"); function _typeof(obj) { if (typeof Symbol === "function" && babelHelpers.typeof(Symbol.iterator) === ...
############################################ # Copyright (c) 2012 Microsoft Corporation # # Z3 Python interface # # Author: Leonardo de Moura (leonardo) ############################################ """Z3 is a high performance theorem prover developed at Microsoft Research. Z3 is used in many applications such as: sof...
var config = { type: Phaser.WEBGL, parent: 'phaser-example', width: 1024, height: 768, backgroundColor: '#000000', scene: { preload: preload, create: create } }; var game = new Phaser.Game(config); function preload () { this.load.image('eye', 'assets/pics/lance-overdose...
const b64 = require('base-64') const XLSX = require('xlsx') module.exports._afterSerialization = function (opt) { // opt = cipherHelper(ID_KEY,opt); // console.log('_afterSerialization', opt); opt = Buffer.from(opt).toString('base64') // encode // opt = b64.encode(opt); // console.log('_afterSerialization ...
module.exports = { connectionString: "mongodb+srv://SirSjolin:ImNot007NO@sundilund-bxmer.mongodb.net/test?retryWrites=true&w=majority" };
const CACHE_NAME = 'version 0.0.01'; const cacheURL = [ 'index.html', 'offline.html']; const self = this; // Install ServiceWorker self.addEventListener('install', (event) => { event.waitUntil( caches.open(CACHE_NAME) .then((cache) => { console.log('Opened cache'); ...
import React from "react"; import { withRouter } from "react-router-dom"; import styled from "styled-components"; import { theme, mq } from "../../constants/theme"; import GTM from "constants/gtm-tags"; import { setQueryKeysValue } from "components/Feed/utils"; import qs from "query-string"; const { colors } = theme; ...
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModu...
/** * @name string-split-by-whitespace * @fileoverview Split string into array by chunks of whitespace * @version 3.0.2 * @author Roy Revelt, Codsen Ltd * @license MIT * {@link https://codsen.com/os/string-split-by-whitespace/} */ import { isIndexWithin } from 'ranges-is-index-within'; var version$1 = "3.0.2";...
var resolution = new unResolution.Resolution(); var readDomainData = function(domain, type, data, data2) { return new Promise(function(resolve, reject) { // UD if (domains.unstoppabledomains.find(domainName => domain.endsWith(domainName))) { if (type === 'ipfsHash') { r...
const { DataTypes } = require("sequelize"); module.exports = sequelize => { sequelize.define( "automod", { enabled: { type: DataTypes.BOOLEAN, defaultValue: false, }, websiteWhitelist: { type: DataTypes.ARRAY(DataTypes.STRING), defaultValue: [], }, punishmentWebsite: { type: Dat...
# Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: ...
import React, {useState, useEffect} from 'react'; import { useField } from 'formik'; import { ImWarning } from 'react-icons/im'; export const TextInput = ({ label, errorClass, labelClassName, ...props }) => { const [field, meta] = useField(props); return ( <> <div className={labelClassName}...
(function ($) { "use strict"; document.f1.submit(); })(jQuery);
Bebella.controller('RecipeListCtrl', ['$scope', 'RecipeRepository', function ($scope, RecipeRepository) { RecipeRepository.all().then( function onSuccess (list) { $scope.recipes = list; }, function onError (res) { alert("Erro ao ca...
#coding=utf-8 from bs4 import BeautifulSoup import requests PREFIX = "https://rpmfind.net" packages = [['xfsprogs','5.10.0-2.fc34'],['inih','49-3.fc34'],['libedit','3.1-37.20210522cvs.fc34']] for p in packages: software = p[0] version = p[1] html = requests.get('https://rpmfind.net/linux/rpm2htm...
/** * @param {number[]} digits * @return {number[]} */ var plusOne = function (digits) { for (let i = digits.length - 1; i >= 0; i--) { if (digits[i] !== 9) { digits[i] += 1; return digits; } else { digits[i] = 0; } } digits.unshift(1); ...
/* @flow */ import { Transformer, BaseNode, SelectExpression, TextElement, Variant, } from '@fluent/syntax'; import flattenMessage from './flattenMessage'; import isPluralExpression from './isPluralExpression'; import { CLDR_PLURALS } from 'core/plural'; import type { Entry } from '@fluent/synta...
export default ({ dispatch }) => (next) => (action) => { // check if payload is a promise if (!action.payload || !action.payload.then) { // if not return action to next middleware return next(action); } // wait for the promise to resolve action.payload.then((response) => { // create new action wi...
var m = require('mithril'); module.exports = m.trust('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M12 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 7h-6v13h-2v-6h-2v6H9V9H3V7h18v2z"/></svg>');
/* * @Author: MaxST * @Date: 2019-12-04 16:33:59 * @Last Modified by: MaxST * @Last Modified time: 2019-12-15 17:00:55 */ (function ($) { "use strict"; $(document).ready(function () { var fld = $(".field-field .admin-autocomplete").not("[name*=__prefix__]"); fld.attr("readonly", true); fld.on("selec...
const mongoose = require("mongoose"); const db = require("./config/keys.js").mongoURI; // ENG: Async database connection & TR: Asenkron database bağlantısı async function main() { await mongoose .connect( process.env.MONGODB_CONNECTION_STRING || db, { useUnifiedTopology: true, useNewUrlPar...
#!/usr/bin/env python """ # ***************************************************************** # (C) Copyright IBM Corp. 2020, 2021. 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 L...
import sympy as sm x, y, z = sm.symbols('x y z') all_bfs = { 2 : { 1 : [ [ x*(y - 1.0) - y + 1.0 , x*(1.0 - y) , x*y , -x*y + y , ], [ [y - 1.0, x - 1.0] , ...
import nltk import pickle import argparse from collections import Counter from pycocotools.coco import COCO from utils.vocabulary import Vocabulary ''' class Vocabulary(object): """Simple vocabulary wrapper.""" def __init__(self): self.word2idx = {} self.idx2word = {} self.idx = 0 ...
import { getRoot, types } from "mobx-state-tree"; import { TabColumn } from "./tab_column"; const ColumnsList = types.maybeNull( types.array(types.late(() => types.reference(TabColumn))) ); export const TabHiddenColumns = types .model("TabHiddenColumns", { explore: types.optional(ColumnsList, []), labelin...
/** * Copyright 2004-present Facebook. 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. * * @flow strict-local * @format */ import BaseIcon from '../BaseIcon'; import React from 'react'; type Props = $ReadO...
var x = x |= Symbol . iterator ;
var mongoose = require('mongoose') var Schema = mongoose.Schema const Player = new Schema({ name: { type: String, default: '', }, gamingId: { type: String, default: '', }, emailId: { type: String, default: '', }, dept: { type: String, ...
var searchData= [ ['personmodel_86',['PersonModel',['../classverificaC19Sdk_1_1PersonModel.html',1,'verificaC19Sdk']]] ];
import test from 'ava'; import diffSteer from '../index'; import INPUTS from './inputs'; test('Full forward', t => { t.plan(2); const motorSpeeds = diffSteer(...INPUTS.FULL_FWD); t.is(motorSpeeds[0], 255); t.is(motorSpeeds[1], 255); }); test('Full reverse', t => { t.plan(2); const motorSpeeds = diffSteer(...
import React from 'react'; const styles = { height: '100vh', lineHeight: '100vh', textAlign: 'center', fontSize: 20 }; const App = () => <div style={styles}>WE CAN CHANGE THIS MESSAGE IN src/App.js</div>; export default App;
//= link_tree ../images //= link_directory ../stylesheets .css //= link adminterface_manifest.js
import getWeb3 from "./getWeb3"; import SimpleStorageContract from "../contracts/SimpleStorage.json"; import VotingContract from "../contracts/Voting.json"; const initSimpleStorageContract = async () => { try { // Get network provider and web3 instance. const web3 = await getWeb3(); // Use web3 to get t...
/*global jasmine, spyOn */ describe('Service: shorty', function() { 'use strict'; var shorty , trap , scope; var makeMockTrap = function() { var t = {}; t.bind = jasmine.createSpy('bind'); t.unbind = jasmine.createSpy('unbind'); return t; }; beforeEach(module('shorty', function(sho...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const SearchDashboard_1 = require("./lib/SearchDashboard"); const searchDashboard = new SearchDashboard_1.SearchDashboard(); searchDashboard.startServer(); //# sourceMappingURL=UDPSonar.js.map
# -*-coding:utf-8-*- """ 程序启动入口 @author Myles Yang """ import os import platform import sys import win32con import args_definition as argsdef import configurator as configr import const_config as const import utils import webapp from component import CustomLogger, SimpleMmapActuator from get_background import GetBa...
""" Converts async functions to sync functions for use in an interactive REPL. """ import asyncio __all__ = ["run_sync", "make_sync"] def run_sync(coro): loop = asyncio.get_event_loop() return loop.run_until_complete(coro) def make_sync(func, instance=None): def inner(*args, **kwargs): return ...
/* eslint-disable no-undef */ const path = require('path'); const webpack = require('webpack'); const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const GitRevisionPlugin = require('git-revision-webpack-plugin'); const gitRevisionPlugin = new GitRevisionPlugin(); module.exports = { mode: 'production...
var grades = [[89, 77],[76, 82, 81],[91, 94, 89, 99]]; var total = 0; var average = 0.0; for (var row = 0; row < grades.length; ++row) { for (var col = 0; col < grades[row].length; ++col) { total += grades[row][col]; } average = total / grades[row].length; print("Student " + parseInt(row+1) + ...
import React from 'react'; import renderer from 'react-test-renderer'; import { mount } from 'enzyme'; import RevealSkyline, { Counter, dataReducer } from '../Components/RevealSkyline'; describe('RevealSkyline', () => { test('snapshot renders', () => { const component = renderer.create(<RevealSkyline />); ...
import json from django.contrib.admin.sites import AdminSite from django.utils.html import format_html from olympia import amo from olympia.amo.tests import (TestCase, addon_factory, user_factory, version_factory) from olympia.amo.urlresolvers import reverse from olympia.yara.admin impo...
// GENERATE BY ./scripts/generate.ts // DON NOT EDIT IT MANUALLY import * as React from 'react'; import CopyTwoToneSvg from "@ant-design/icons-svg/es/asn/CopyTwoTone"; import AntdIcon from '../components/AntdIcon'; var CopyTwoTone = function CopyTwoTone(props, ref) { return React.createElement(AntdIcon, Object.assig...
const { default: api } = require('../js/api'); it('Return score', async () => { fetch.mockResponseOnce(JSON.stringify({ result: [ { user: 'Jebitok', score: 20000, }], })); const res = await api.ScoreList(); expect(res).toEqual({ result: [{ score: 20000, user: 'Jebitok' }] }); ...
import functools, time, logging, sys from flask import ( Blueprint, flash, g, redirect, render_template, request, session, url_for ) from werkzeug.security import check_password_hash, generate_password_hash from werkzeug.exceptions import abort from inspect import getmembers from pprint import pprint from quiz....
// The order of the code in this file is relevant, because a lot of things // require('npm.js'), but also we need to use some of those modules. So, // we define and instantiate the singleton ahead of loading any modules // required for its methods. // these are all dependencies used in the ctor const EventEmitter = r...
import {Router} from 'express'; import * as database from '../database'; import * as views from '../views'; const app = Router(); app.get('/login', async (req, res, next) => { try { res.send(views.login({username: req.session.username})); } catch (ex) { next(ex); } }); app.post('/login', async (req, re...
export default { name: 'about', type: 'view' };
const SOURCE = ` 'use strict'; /** * Extract red color out of a color integer: * * 0x00DEAD -> 0x00 * * @param {Number} color * @return {Number} */ function red( color ) { let foo = 3.14; return color >> 16; } /** * Extract green out of a color integer: * * 0x00DEAD -> 0xDE * * @param {Number} c...
/*! Built with http://stenciljs.com */ App.loadStyles("my-dropdown","\nmy-dropdown.hydrated{visibility:inherit}"); App.loadComponents( /**** module id (dev mode) ****/ "my-dropdown", /**** component modules ****/ function importComponent(exports, h, Context, publicPath) { "use strict"; // @stencil/core var Dropdown...
(window.webpackJsonp=window.webpackJsonp||[]).push([[53],{192:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return l})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return s})),n.d(t,"default",(function(){return o}));var a=n(1),r=n(9),b=(n(0),n(224)),l={title:"REST API",id...
import React from 'react' import {Grid, Row, Col} from 'react-bootstrap' import {Route} from 'react-router-dom' class Layout extends React.Component { render() { return ( <Grid> <Row> <Col xs={12}> <h1 className="text-center">Edit Trending Photos in DesignWizard</h1> ...
const assert = require('assert'); const { Color, ColorImmutable } = require('../../dist/frost-color.min'); describe('ColorImmutable Static', function() { describe('#contrast', function() { it('returns the contrast between two colors', function() { assert.strictEqual( Co...
import React, { memo, forwardRef } from 'react' import PropTypes from 'prop-types' import Option from '../../select-menu/src/Option' const AutocompleteItem = memo( forwardRef(function AutocompleteItem(props, ref) { const { isHighlighted, isSelected, style, children, ...restProps } = props return ( <Op...
webpackJsonp([1],{"+3/4":function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n("TToO"),o=function(e){function t(t){e.call(this),this.scheduler=t}return Object(r.b)(t,e),t.create=function(e){return new t(e)},t.dispatch=function(e){e.subscriber.complete()},t.prototype._subscribe=function(e){var n=this.sche...
const Discord = require('discord.js'); const moment = require('moment'); const chalk = require('chalk'); const { prefix } = require('../ayarlar.json') module.exports = client => { var durumyazı = [ "CodeFun", ".yardım | CodeFun", "V12 Doğruluk Cesaret Altyapısı", "https://discord.gg/mJ35rmwNuS" ] ...
# -*- coding: utf-8 -*- """ Created on Wed Aug 11 17:09:03 2021 @author: zongsing.huang """ # ============================================================================= # 最佳解的適應值為0.7071(MAX)/-0.7017(MIN) # 將PSO轉為求解最大化問題的快速方法有:[a] 1/(1+F), [b] -1*F。前者因為適應值經過轉換所以不直觀,故建議採後者 # 方法[a]的分母有+1,是因為要防止分母變成0 # ================...
var expect = require("chai").expect; var hooks = require("./hooks"); module.exports = function(helpers) { var component = helpers.mount(require.resolve("./index"), { name: "Frank" }); expect(component.el.querySelector(".foo .name").innerHTML).to.equal( "Frank" ); expect(hooks.getHo...
import React, { Component } from 'react' import { TouchableOpacity, Text, View } from 'react-native'; import styles from './styles'; export default class DashboardNavButton extends Component { constructor(props) { super(props) } render() { const { hideUndersore, noUndersco...
exports.handler = async function http(req) { let jsonString = {1: "Bad peloton experience", 2: "Peloton quality"} return { headers: { 'content-type': 'application/json; charset=utf8' }, statusCode: 200, body: JSON.stringify(jsonString) } }
# -*- coding: utf-8 -*- """ Created on Thu Jul 29 13:49:20 2021 @author: alber """ import re import os import pandas as pd import numpy as np # import spacy import pickle import lightgbm as lgb import imblearn from sklearn import preprocessing from sklearn.semi_supervised import ( LabelPropagation, LabelSpre...
function panelInit(evt) { } function Track1Path() { executePathArray(["TO393.R", "TO394.N", "TO396.R", "TO399.N", "TO375.R"]); } function Track2Path() { executePathArray(["TO393.N", "TO394.N", "TO396.R", "TO399.N", "TO375.R"]); } function Track3Path() { executePathArray(["TO394.R", "TO396.R", "TO399.N", "TO375.R"...
# 023 # Ask the user to type in the first line of a nursery rhyme and display # the length of the string. Ask for a starting number and an # ending number and then display just that section of the text # (remember Python starts counting from 0 and not 1). rhyme = list() while True: try: if not rhyme: ...
import { messages } from '../store/initialState'; import CacheManager from './CacheManager'; const cache = new CacheManager(); const getPendingActions = state => state.get('pendingActions'); const addOrReplace = (array, item) => { const i = array.findIndex(_item => _item.id === item.id); if (i > -1) array[i] = i...
#!/usr/bin/env python3 n1 = int(input("Enter 1st subject degree: ")) n2 = int(input("Enter 2nd subject degree: ")) n3 = int(input("Enter 3rd subject degree: ")) if n1 >= 50 and n2 >= 50 and n3 >= 50: print("Pass") else: print("Fail")
class Solution: def XXX(self, prices): maxP = 0 minPrices = float("INF") # 记录遍历过的最小价格 for each in prices: if each - minPrices > maxP: maxP = each - minPrices if each < minPrices: minPrices = each return maxP
export Header from './Header'; export Footer from './Footer'; export Root from './Root';
const test = require('tape') const WebTorrent = require('../../index.js') const img = Buffer.from('R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7', 'base64') img.name = 'img.png' function verifyImage (t, err, elem) { t.error(err) t.ok(typeof elem.src === 'string') t.ok(elem.src.includes('blob')) t.e...
/** * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ import ModelTestEditor from '@ckeditor/ckeditor5-core/tests/_utils/modeltesteditor'; import Paragraph from '@ckeditor/ckeditor5-paragraph/s...
import React ,{Component} from 'react'; import { Alert, Col as bCol, Row } from 'reactstrap'; import styled from 'styled-components'; const Col = styled(bCol)` margin-top:20px; `; const AlertSend = styled(Alert)` background: #BEBEBE; border: 0.5px solid #333333; box-sizing: border-box; border-radius: 5px 5px 5px 0px;...
from django.urls import path, include from rest_framework.routers import DefaultRouter from recipe import views router = DefaultRouter() router.register('tags', views.TagViewSet) router.register('recipes', views.RecipeViewSet) app_name = 'recipe' urlpatterns = [ path('', include(router.urls)) ]