text
stringlengths
184
4.48M
function uniquePaths(m: number, n: number): number { // 定义 dp[i][j] 是 i,j 位置时的路径总数 let dp: number[][] = new Array(m + 1).fill(0); for (let i = 0; i < dp.length; i++) { dp[i] = new Array(n + 1).fill(0); } // base case for (let i = 0; i < m; i++) { dp[i][0] = 1; } for (let j = 0; j < n; j++) { ...
process.stdin.setEncoding('utf8'); process.stdin.on('data', (data) => { // 입력받은 숫자를 data에 받는다. const n = data.split(' '); //data(입력받은 숫자)를 배열로 변경 const a = Number(n[0]), b = Number(n[1]); //a는 한줄에 대한 별의 갯수, b는 몇줄 출력 for (let i = 0; i < b; i++) { //i선언 몇줄(b)만큼 반복 let str = ''; // 출력할 변수 선언 for (l...
import os import os.path as osp import torch import cv2 import json import time import numpy as np from torch.autograd import Variable import torch.nn.functional as F from torch import nn import mmcv from mmcv.runner import get_dist_info from mmcv.engine import collect_results_cpu import tqdm from mmseg.datasets.tools...
// Licensed under the Open Software License version 3.0 use super::config::PassiveEndpointConfig; use crate::{nut::sender::UninterruptiblePowerSupplyData, one_wire::sender::MeasuredTemperature}; use rocket::{get, http::Status, routes, serde::json::Json, Build, Rocket, State}; use serde::{Deserialize, Serialize}; use st...
<h3 id="handouts-of-workflow-charts-are-available-for-the-qiime-workflow-discussed-in-these-tutorials">Handouts of workflow charts are available for the QIIME workflow discussed in these tutorials:</h3> <ul> <li><a href="https://github.com/edamame-course/docs/tree/gh-pages/extra/Handouts/QIIMEFlowChart_IlluminaPaired...
# Example with Spring Creating a RESTful API with Spring is a common task for many developers. Here's a step-by-step guide on how to create a simple API using Spring Boot, one of the most popular frameworks for building Java applications. ## Step 1: Set Up Your Development Environment Before you start, make sure you ...
import { createBrowserRouter } from 'react-router-dom'; import App from '../App.jsx'; import ErrorPage from '../components/ErrorPage.jsx'; import RestaurantList from '../components/RestaurantList.jsx'; import RestaurantMenu from '../components/RestaurantMenu.jsx'; import Checkout from '../components/Checkout.jsx'; impo...
# Implement Anything-as-a-Source with SmartHR and Okta Workflows ## Overview This template demonstrates how to use Anything-as-a-Source (XaaS) to import records from SmartHR. The workflow requests records from SmartHR using the **SmartHR - Search Employees** card and stores the resulting list of records in a temporar...
#pragma once #include "Player.h" #include "Boss.h" #include "Bullet.h" #include "Script.h" #include "PauseMenu.h" #include "GameOverMenu.h" #include <SFML/Graphics.hpp> #include <memory> #include <random> class Stage { public: constexpr static int playAreaW = 384; constexpr static int playAreaH = 448; constexpr ...
Input: arr[] = {22, 14, 8, 17, 35, 3} Output: Minimum element is: 3 Maximum element is: 35 We have to find the maximum and minimum element. Brute Force Approach: 1.Sorting the Array 2.returning first and last element Arrays.sort(arr); min = arr[0]; max = arr[n - 1]; But the Time complexit...
import { memo, useState, useEffect } from 'react'; import './comment.scss'; import defaultAvatar from '../../../assets/defaultAvatar.png'; import { Spin } from 'react-cssfx-loading/lib'; import { Gif } from '@giphy/react-components'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faThumbsUp,...
package com.example.mybatis.configuration; import org.apache.ibatis.session.SqlSessionFactory; import org.mybatis.spring.SqlSessionFactoryBean; import org.springframework.boot.jdbc.DataSourceBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; impor...
/* * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2014 CERN * @author Maciej Suminski <maciej.suminski@cern.ch> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the F...
package com.example.web.model; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import javax.persistence.*; import java.util.Collection; import java.util.HashSet; import java.util.Set; @Entity @Table public class User implements UserDetails ...
package core; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import java.time.LocalDate; import java.time.format.DateTimeFormatter; import java.util.Objects; import org.junit.jupite...
import React, { useState, useEffect } from 'react' import { useContext } from 'react'; import { useParams } from 'react-router-dom' import JokeService from '../services/JokeService' import AuthContext from './Auth/Auth-context'; function ViewComments(props) { const [comments,setComments] = useState([]) const...
library center_body; import 'package:flutter/material.dart'; class CenterBody extends StatelessWidget { final String message; final IconData icon; const CenterBody({super.key, required this.message, required this.icon}); @override Widget build(BuildContext context) => Center( child: Column( ...
"""This test checks that AxSearch is functional. It also checks that it is usable with a separate scheduler. """ import numpy as np import ray from ray.tune import run from ray.tune.schedulers import AsyncHyperBandScheduler from ray.tune.suggest.ax import AxSearch def hartmann6(x): alpha = np.array([1.0, 1.2, 3...
import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import '../Cubit_login_signup_se/Cubit_login_sigunp_se.dart'; import '../Cubit_login_signup_se/State_login_sigunp_se.dart'; import '../pages/Bottom_navigation_seller/mainofseller.dart'; import '../signup_se/singup_with_email_shap...
import { Environment, useChainInfo, ZERO_ADDRESS } from '@0xflair/react-common'; import { NftToken, TokenBalance, useNftTokensByWallet, useTokenBalances, } from '@0xflair/react-data-query'; import { useERC721Symbol } from '@0xflair/react-openzeppelin'; import { BigNumber, BigNumberish, BytesLike } from 'ethers'...
import 'package:cloud_firestore/cloud_firestore.dart'; import 'package:filmarsivim/CustomNavBar.dart'; import 'package:flutter/material.dart'; import 'package:youtube_player_flutter/youtube_player_flutter.dart'; class detaySayfasi extends StatefulWidget { final DocumentSnapshot product; const detaySayfasi({Key? k...
/** * @file game.h * @brief Basic Game Functions. * @author Vincent Penelle <vincent.penelle@u-bordeaux.fr> * @details Freely inspired from Course of projet technologiques 2, 2021. * @copyright University of Bordeaux. All rights reserved, 2022. **/ #ifndef __GAME_H__ #define __GAME_H__ #include <stdbool.h> /** ...
import { GetQuery, parseQuery, SetQuery } from "./parseQuery"; import { InvalidCommandError, InvalidNumberOfArgumentsError, NoCommandError } from "./errors"; import { Command } from "./Command"; describe("parseQuery", () => { it("throws NoCommandError if query is an empty string", () => { expect(() => parseQuery...
from fastapi import WebSocket, WebSocketDisconnect, Depends, HTTPException from fastapi.routing import APIRouter from typing import List from collections import deque import json import os router = APIRouter() class WaitingListManager: def __init__(self, volume_path: str): self.volume_path = volume_path ...
import 'package:flutter/material.dart'; import 'package:toonflix/widgets/custom_button.dart'; import 'package:toonflix/widgets/money_card.dart'; void main() { runApp(const App()); } class App extends StatefulWidget { const App({super.key}); @override State<App> createState() => _AppState(); } class _AppStat...
class FeedingsController < ApplicationController before_action :set_feeding, only: %i[show edit update destroy] def index @q = Feeding.ransack(params[:q]) @feedings = @q.result(distinct: true).includes(:dog).page(params[:page]).per(10) end def show; end def new @feeding = Feeding.new end d...
const express = require('express'); const router = express.Router(); const uuid = require('uuid'); const sampleJson = require('../../public/sample_json'); router.get('/', (req, res) => { res.json(sampleJson); }); router.get('/:id', (req, res) => { if (found) { res.json(sampleJson.filter((entry) => entry.Id === pa...
/* * Copyright 2022 AppDynamics 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 required by applicable law or agree...
from .database import db from flask_login import UserMixin class Users(UserMixin, db.Model): __tablename__ = "users" user_id = db.Column(db.Integer, primary_key=True, autoincrement=True) user_name = db.Column(db.String(200), unique=True, nullable=False) password = db.Column(db.String(200), nullable=Fal...
import React, { useEffect } from 'react'; import { Typography, Table, TableBody, TableCell, TableContainer, TableHead, TableRow, Paper } from '@mui/material'; import { useTheme } from '@mui/material/styles'; import Chart from 'chart.js/auto'; import { Line } from 'react-chartjs-2'; const groups = [ { id: 1, name: '1...
#!/usr/bin/env python3.10 # pylint: disable=invalid-name # pylint: disable=missing-module-docstring # pylint: disable=missing-class-docstring # pylint: disable=missing-function-docstring import argparse import sys from argparse import Namespace from lib import run_with_state # type: ignore CHECKS = ( ("format p...
// create a type name with a string type Data = {name: string} let student: Data = { name: "Rehan" } // create a type age with a number type Data1 = {age:number} let person: Data1 = { age: 42 } // create a type isFetching with boolean type Data2 = {isFetching: boolean} let person2: Data2 = { isFetch...
// Copyright Marina Oprea 313CAb 2022-2023 #include <stdio.h> #include <string.h> #include <stdlib.h> #include <math.h> #include "op_on_color.h" #include "struct.h" #include "auxiliars.h" #include "commands.h" // function allocates color matrix // and returns pointer to its address colored_image **alloc_matrix_color(...
// // CoreDataManager.swift // 12Zapisok // // Created by Anton Makarov on 13.09.2021. // Copyright © 2021 A.Makarov. All rights reserved. // import CoreData final class CoreDataManager: NSObject { var managedObjectContext: NSManagedObjectContext? var storeName = "CoreDataStore" static let shared = C...
# Chapter 2.01 - Enabling the SAP Fiori Elements Flexible Programming Model The following series of chapters (part 2 - starting with this chapter 2.01) introduces the **SAP Fiori elements flexible programming model**, which bridges the gap between freestyle UI5 development and [SAP Fiori elements](https://ui5.sap.com/...
<template> <chart /> </template> <script lang="ts"> import { defineComponent, onMounted, onUnmounted, reactive } from "vue"; import Chart from "./chart/draw"; export default defineComponent({ components: { Chart, }, setup() { // 下层数据 const dataArr = [ { number: 150, text: "今日构...
# See: https://adventofcode.com/2022/day/1 :use 'Range' :use 'Record' :use 'String' :use 'Number' def partition = do (array, low, high) # choose the rightmost element as pivot pivot = array[high] # pointer for greater element i = low - 1 # traverse through all elements # compare each element with pivot for j...
#!/bin/env python3 # -*- coding: utf-8 -*- """ @summary: A module for all result classesin this package @author: Frank Brehm @contact: frank@brehm-online.com @copyright: © 2023 by Frank Brehm, Berlin """ from __future__ import absolute_import import logging from .stats import HourlyStats, MessageStatsTotals, HourlyS...
'use client'; import React, { memo } from 'react'; import Checkbox from '@mui/material/Checkbox'; import Autocomplete from '@mui/material/Autocomplete'; import TextField from '@mui/material/TextField'; import CircularProgress from '@mui/material/CircularProgress'; import CheckBoxOutlineBlankIcon from '@mui/icons-mater...
@extends('backend.layouts.master') @section('content') <div class="content-wrapper"> <!-- Content Header (Page header) --> @include('backend.layouts.ba') <!-- Main content --> <section class="content"> <div class="container-fluid"> <div class="row"> <!-- left column --> ...
mod buffer; mod pass; mod geometry; use geometry::*; mod text; use text::*; mod selection_box; use selection_box::*; use super::circuit::*; use crate::app::math::Vec2f; use eframe::egui_wgpu::RenderState; use egui::TextureId; use vello::kurbo::*; use vello::peniko::*; use wgpu::{FilterMode, Texture, TextureView}; ...
1a. Display the first and last names of all actors from the table actor. Ans:select first_name, last_name from actor; 1b. Display the first and last name of each actor in a single column in upper case letters. Name the column Actor Name. Ans: SELECT UPPER(CONCAT(firstName, ' ', last_name)) AS `Actor Name` FROM a...
<template> <b-navbar class="header" :class="{ lightMode: lightMode }" toggleable="md"> <b-navbar-brand class="brand" to="/"> <img v-if="lightMode" class="brand__logo" src="../assets/icons/logoOrange.png" alt="Gazu" /> <img v-else class="brand__logo...
#lang simply-scheme ; Write a procedure fringe that takes as argument a tree (represented as a list) and returns a list whose ; elements are all the leaves of the tree arranged in left-toright order. For example, ; (define x (list (list 1 2) (list 3 4))) ; (fringe x) ; (1 2 3 4) ; (fringe (list x x)) ; (1 2 3 4 1 2 3 ...
/* eslint-disable react-hooks/exhaustive-deps */ /* eslint-disable jsx-a11y/img-redundant-alt */ import React, { useState, useEffect } from "react"; import { useDispatch, useSelector } from "react-redux"; import { useNavigate } from "react-router-dom"; import { usersAction } from "../redux/slice/users"; import { setLog...
using System.Collections; using System.Collections.Generic; using UnityEngine; /* * Author: [Dorey, Dylan] * Last Updated: [04/23/2024] * [The fuel pump of a bike engine that burns fuel at different rates] */ public class FuelPump : MonoBehaviour { //reference to our facade (bike engine) public BikeEngine...
import Debug "mo:base/Debug"; import Time "mo:base/Time"; import Float "mo:base/Float"; actor DBank { stable var currentValue: Float = 300; // currentValue := 300; stable var startTime = Time.now(); //nanoseconds since 1970-01-01. // startTime := Time.now(); Debug.print(debug_show(startTime)); public f...
require('dotenv').config(); const puppeteer = require('puppeteer'); describe("Jakob's Law Usability Test", () => { let browser; let page; beforeAll(async () => { browser = await puppeteer.launch({ headless: true, // executablePath: 'C:/path/to/your/chromium' // Optional: us...
import React, { useState } from "react"; function Login() { // State to store each input field value const [username, setUsername] = useState(""); const [password, setPassword] = useState(""); //State to manage the loading screen and it's visibility const [loading, setLoading] = useState(false); //Functi...
# rockycao # coding: UTF-8 import numpy as np import glob import tensorflow as tf from tensorflow.python.ops import control_flow_ops from tqdm import tqdm import matplotlib.pyplot as plt from os import getcwd from sklearn.preprocessing import OneHotEncoder ################################################### # In ord...
using System.Collections; using System.Collections.Generic; using System.Linq; using UnityEngine; using UnityEngine.Events; using PaperSouls.Runtime.Items; using PaperSouls.Runtime.Data; namespace PaperSouls.Runtime.Inventory { [System.Serializable] internal class InventoryManger { public List<Inve...
<!DOCTYPE html> <html> <head> <title>TechEd+ Backend разработка</title> <style> {% if u_theme == "theme1"%} body { font-family: Arial, sans-serif; background-color: #0970ff; color: #ffffff; margin: 0; padding: 0; } button{ border-radius: 10px; transition: ba...
package BT2_phamvitruycap.person; import java.util.Stack; public class Person { //Tạo class "Person" với các thông tin: name, age, gender, address, phone private String name; private int age; private String gender; private String address; private String phone; //Hàm xây dựng không có tha...
# views.py from flask import render_template, request, redirect, url_for, session, Blueprint, flash, jsonify from models import User from extensions import db, bcrypt from flask_bcrypt import Bcrypt views = Blueprint("views", __name__) bcrypt = Bcrypt() @views.route("/signup", methods=["GET", "POST"]) def signup(): ...
import uuid from django.contrib.auth.models import User, Permission, Group from django.contrib.contenttypes.models import ContentType from django.contrib.messages.middleware import MessageMiddleware from django.contrib.sessions.middleware import SessionMiddleware from django.db.models import Model from django.test impo...
package main import ( "errors" "net/http" "github.com/Joanoni/inutil" ) type ExecuteInput struct { Method string `json:"method"` Url string `json:"url"` Header []Header `json:"header"` Payload any `json:"payload"` } type Header struct { Name string `json:"name"` Value string `json:"value"` ...
import { Component, ViewEncapsulation, OnInit, Inject } from '@angular/core'; import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { IUser } from '@appCore/models/User'; import { ClientService } from '@appCore/services/client.service'; import { StoreServices } from '@appCore/services/store.s...
package model; import repository.AccRepository; import repository.EmpRepository; import Util.Validate; import java.util.Scanner; import java.util.regex.Pattern; public class AccountModel { public static final String RED = "\u001B[31m"; public static final String RESET = "\u001B[0m"; public static final S...
<!DOCTYPE html> <html> <head> <title>First Non-Repeating Character</title> <style> body { font-family: Arial, sans-serif; margin: 0; padding: 0; } h1 { text-align: center; margin-top: 20px; } label { display: block; ...
import 'package:flutter/material.dart'; import 'package:flutter_ahlul_quran_app/common/contants.dart'; import 'package:flutter_ahlul_quran_app/cubit/surah/surah_cubit.dart'; import 'package:flutter_ahlul_quran_app/ui/ayat.page.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; class SurahPage extends StatefulWidg...
## 롤(ROLE) --- - 사용자에게 허가할 수 있는 **권한들의 집합** - 롤을 이용하면 권한 부여와 회수를 쉽게 가능 - 롤은 CREATE ROLE 권한을 가진 USER에 의해서 생성됨 - 한 사용자가 여러 개의 ROLE을 ACCESS 할 수 있고, 여러 사용자에게 ROLE을 부여 가능 - 시스템 권한을 부여 & 취소할 때와 동일한 명령을 사용하여 사용자에게 부여하고 취소함 - 사용자는 ROLE에 ROLE을 부여할 수 있음 - Orable DB를 설치하면 기본적으로 CONNECT, RESOURCE, DBA ROLE이 제공됨 ![](./im...
#pragma once #ifndef HGUARD__UTIL__FORMATTERS_HH_ #define HGUARD__UTIL__FORMATTERS_HH_ #include "Common.hh" /****************************************************************************************/ namespace fmt { inline namespace v8 { template <> struct formatter<::timespec> { private: static constexpr d...
from contextlib import asynccontextmanager from fastapi import FastAPI, Request, status from fastapi.middleware.cors import CORSMiddleware from fastapi.responses import JSONResponse from src.controllers import account, auth, transaction from src.database import database from src.exceptions import AccountNotFoundError...
<?php declare(strict_types=1); /* * This file is part of CycloneDX PHP Library. * * 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 * *...
<%@ page trimDirectiveWhitespaces="true" %> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <!doctype html> <html lang="en"> <head> <!-- Required meta tags --> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <!-- Bootstrap CSS --> <l...
--- title: "You'll Never Believe the Surprising Trick to Spelling 'Batteries' Correctly!" ShowToc: true date: "2023-03-31" author: "Earle Natalie" tags: ["Spelling Tips","Educational Content"] --- # You'll Never Believe the Surprising Trick to Spelling 'Batteries' Correctly! Spelling can be a tricky business, especi...
/* * FreeRTOS Kernel V10.2.0 * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * 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, includ...
using Core.Constants; using Core.Interfaces.Service; using Core.Models.DTO; using Core.Models.Param; using Core.Models.ServerObject; using Core.Utils; using Microsoft.AspNetCore.Mvc; using OfficeOpenXml; using System; using System.IO; using System.Net; using System.Threading.Tasks; using System.Threading; namespace A...
package com.suslanium.wordsfactory.presentation.ui.common import androidx.compose.material3.AlertDialog import androidx.compose.material3.Button import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.graphics.Color i...
(ns shopping-cart.resource-test (:require [clojure.test :refer [deftest is testing use-fixtures]] [shopping-cart.event-store :as events] [shopping-cart.system :as system] [donut.system :as ds] [jsonista.core :as j] [shopping-cart.shopping-cart :as shopping-cart] [shopping-cart.product-catalog :as...
import java.io.IOException; import java.sql.SQLException; import java.util.List; import entrada.Teclado; public class Actividad_2x01 { public static void main(String[] args) { try { int opcion = -1; do { imprimirMenu(); opcion = Teclado.leerEntero("Opcion: "); menu(opcion); }while(opcion != 0...
package common import ( "context" "encoding/json" "fmt" red "github.com/go-redis/redis" "github.com/zeromicro/go-zero/core/logx" "minicode.com/sirius/go-back-server/config/cfgredis" "minicode.com/sirius/go-back-server/service/userbehavior/model/usermgo" "minicode.com/sirius/go-back-serv...
public class JniTest { private static void Test( String name, Object actual, Object expected, String actualAsString, String expectedAsString) { if (!actual.equals(expected)) { System.out.println(String.format( "Test: %s failed\nExpected: \"%s\", Actual: \"%s\"", name, expected, actual...
// Copyright (c) 2020-2023 Träger // 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, publish, dis...
setwd('C:/Users/Praahas/Projects/R-Lab/Movie-Ratings') # Grammar of Graphics #Data #Aesthetics - things we see axes,color, size #Geometries - square, dot, circle, triangle #Statistics #Facets #Co-Ordinates #Theme movies<-read.csv('movie1.csv') movies colnames(movies) colnames(movies)<-c("Film","Genre","CriticRating...
package br.ufc.quixada.blog.models; import java.sql.Timestamp; // import com.fasterxml.jackson.annotation.JsonBackReference; // import com.fasterxml.jackson.annotation.JsonIdentityInfo; import com.fasterxml.jackson.annotation.JsonIgnore; // import com.fasterxml.jackson.annotation.ObjectIdGenerators; import jakarta....
import datetime import errno import os import time from collections import defaultdict, deque import torch import torch.distributed as dist class SmoothedValue: """ 跟踪一系列数值,通过一个窗口计算得到窗口均值 Track a series of values and provide access to smoothed values over a window or the global series average. ""...
import React, { useState } from 'react'; import { Progress, Box, ButtonGroup, Button, Heading, Flex, FormControl, GridItem, FormLabel, Input, Select, SimpleGrid, InputLeftAddon, InputGroup, Textarea, FormHelperText, InputRightElement, } from '@chakra-u...
import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { LoginComponent } from './login/login.component'; import { RegistrationComponent } from './registration/registration.component'; import { StudentListComponent } from './student-list/student-list.component'; const ...
/* Gtk+ User Interface Builder * Copyright (C) 1998 Damon Chaplin * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later ...
"use strict"; var _legacy = require("./legacy"); var _styledSystem = require("../../styled-system"); var width = (0, _legacy.style)({ prop: 'width' }); var color = (0, _legacy.style)({ prop: 'color', key: 'colors' }); var backgroundColor = (0, _legacy.style)({ prop: 'backgroundColor', alias: 'bg', key: '...
# Import necessary libraries from flask import Flask, request, jsonify from flask_cors import CORS from analysis_model import perform_analysis import subprocess import numpy as np app = Flask(__name__) CORS(app) # Function to run the analysis and predictor scripts def run_analysis_and_predictor(): try: # ...
import { Box, CircularProgress, IconButton, List, ListItem, ListItemButton, ListItemIcon, ListItemText, Skeleton, Typography, } from "@mui/material"; import { produce } from "immer"; import { ReactNode, useMemo, useReducer, useState } from "react"; import { useTranslation } from "react-i18next"; imp...
// // The MIT License (MIT) // // Copyright (c) 2024 Advanced Micro Devices, Inc., // Fatalist Development AB (Avalanche Studio Group), // and Miguel Petersen. // // All Rights Reserved. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documenta...
import React, { useState } from "react"; import { Box, Paper, Card, CardContent, TextField, Typography, Button , CircularProgress} from "@mui/material"; import NavBar from "./NavBar"; import Resume from "./Resume"; import ProfileResume from "./ProfileResume"; import axios from 'axios'; import { responsiveProperty } fro...
import os, shutil, logging, argparse, subprocess from pydub_0_25_1.pydub import AudioSegment as audio from random import choice from mutagen.easyid3 import EasyID3 from simple_image_download import simple_image_download as simp #Configures subprocess to not open terminal window si = subprocess.STARTUPINFO() si.dwFlags...
import clsx from 'clsx'; import * as React from 'react'; import { RegisterOptions, useFormContext } from 'react-hook-form'; import Typography, { TypographyColor, } from '@/components/typography/Typography'; import clsxm from '@/lib/clsxm'; enum CheckboxSize { 'sm', 'base', } export type CheckboxProps = { lab...
# models.py - is created for table database model # every model represents a table in database from sqlalchemy import ( TIMESTAMP, Boolean, Column, Integer, String, text, ForeignKey, ) from .database import Base from sqlalchemy.orm import relationship class Post(Base): __tablename__ = ...
import { PersonAddOutlined, PersonRemoveOutlined } from "@mui/icons-material"; import { Box, IconButton, Typography, useTheme } from "@mui/material"; import { useDispatch, useSelector } from "react-redux"; import { useNavigate } from "react-router-dom"; import { setFriends } from "../state"; import FlexBetween from "./...
import { ApiProperty } from '@nestjs/swagger'; import { IsNotEmpty, IsUUID } from 'class-validator'; export class HorseNameAliasDto { @ApiProperty({ example: 'Derbi king' }) @IsNotEmpty() horseName: string; @ApiProperty() @IsNotEmpty() @IsUUID() horseId: string; createdBy?: number | null; isDefault...
import { useStateProvider } from "../context/StateContext"; import { reducerCases } from "../context/constants"; import { HOST, IMAGES_URL, SET_USER_IMAGE, SET_USER_INFO, } from "../utils/constants"; import axios from "axios"; import Image from "next/image"; import { useRouter } from "next/router"; import React...
import React from 'react'; import { Modal, ModalOverlay, ModalContent, ModalHeader, ModalBody, ModalCloseButton, Text, } from '@chakra-ui/react'; import { PropTypes } from 'prop-types'; const TermsConditionModal = ({ onClose, isOpen }) => { return ( <Modal isOpen={isOpen} onClose={onClose} size={{...
import { join, resolve } from 'node:path'; import { build, gotoPage } from '@e2e/helper'; import { expect, test } from '@playwright/test'; import { pluginReact } from '@rsbuild/plugin-react'; const fixtures = resolve(__dirname, '../'); test('externals', async ({ page }) => { const rsbuild = await build({ cwd: f...
package com.amadeus.controller; import com.amadeus.dto.request.CreateFlightRequestDto; import com.amadeus.dto.request.DeleteFlightRequestDto; import com.amadeus.dto.request.FlightSearchRequestDto; import com.amadeus.dto.request.UpdateFlightRequestDto; import com.amadeus.dto.response.FlightResponseDto; import com.amade...
// nanorange/algorithm/all_of.hpp // // Copyright (c) 2018 Tristan Brindle (tcbrindle at gmail dot com) // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #ifndef NANORANGE_ALGORITHM_ALL_OF_HPP_INCLUDED #define NANORA...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Project</title> <!-- main css file --> <link rel="stylesheet" href="css/main.css"> <!-- normalize...
#ifndef TYPES_H #define TYPES_H #include <stdio.h> #include <stdlib.h> #include <math.h> #include <time.h> #include <cstdint> #include <format> #include <string> #include <iostream> #define NSPEEDS 9 #define NUM_THREADS 28 typedef struct { int nx; /* no. of cells in x-direction */ int ...
package com.example.controller; import cn.hutool.core.collection.CollUtil; import com.common.Result; import com.example.controller.request.CategoryPageRequest; import com.example.entity.Category; import com.example.service.ICategoryService; import org.springframework.beans.factory.annotation.Autowired; import org.spr...
# 大模型(LLMs)参数高效微调(PEFT) 面 - 微调方法是啥?如何微调? <aside> 💡 微调(Fine-tuning)是一种迁移学习的技术,用于在一个已经预训练好的模型基础上,通过进一步训练来适应特定的任务或数据集。微调可以在具有相似特征的任务之间共享知识,从而加快训练速度并提高模型性能。 以下是一般的微调步骤: 1. 选择预训练模型:选择一个在大规模数据集上预训练好的模型,如ImageNet上的预训练的卷积神经网络(如ResNet、VGG等)。这些模型通常具有良好的特征提取能力。 2. 冻结底层权重:将预训练模型的底层权重(...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> *{ padding: 0px; margin: 0px; } ul{ list-style: none; } .menu...