# step 0 - cleanup your existing drivers
sudo apt-get --purge remove "*nvidia*"
sudo apt-get --purge remove "*cuda*" "*cudnn*" "*cublas*" "*cufft*" "*cufile*" "*curand*" "*cusolver*" "*cusparse*" "*gds-tools*" "*npp*" "*nvjpeg*" "nsight*" "*nvvm*" "*libnccl*"
# step 0.1 - disable iommu
ll /sys/class/iommu/
# if this folder is empty, continue
# if the folder is not empty, see https://docs.dolphinics.com/latest/guides/iommu.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class PromiseCacher<T extends (...args: any[]) => Promise<any>> { | |
private cache: Map<string, Promise<any>> = new Map(); | |
private fn: T; | |
constructor(fn: T) { | |
this.fn = fn; | |
} | |
execute(...args: Parameters<T>): ReturnType<T> { | |
const key = JSON.stringify(args); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In addition to a significant decrease in hepatic lipid accumulation in the IOE group, which inhibited energy intake by propionate enrichment, hepatic lipids were also significantly reduced in the mice in the IOP group, which was largely enriched with butyrate. Compared with the IOE group, IOP had a stronger regulatory effect on hepatic metabolism and triglyceride metabolism and higher levels of TCA cycle in the host. In addition, butyrate has the ability to promote browning of white adipose tissue (WAT) to brown adipose tissue (BAT).^[@ref39],[@ref40]^ WAT stores energy, whereas BAT uses energy for heating and consequently host energy expenditure increases.^[@ref41],[@ref42]^ However, adipose tissue weight does not change after WAT browning.^[@ref43]^ Therefore, the weight of adipose tissue of mice in the IOP group dominated by butyrate was greater than that of the mice in the IOE group dominated by propionate. | |
In conclusion ([Figure [7](#fig7){ref-type="fig"}](#fig7){ref-type="fig"}C), the improvement of ob |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {action, makeObservable, observable} from "mobx"; | |
export type DataFrameOptions = { | |
autoFetch?: boolean | |
} | |
export abstract class DataFrame<T, FetchT = any> { | |
@observable | |
fetching: boolean = false; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useEffect, useRef, useState} from 'react' | |
const resetSymbol = Symbol('reset'); | |
type ProviderChildren<Store extends new (...args: any[]) => InstanceType<Store>> = | |
| { children: React.ReactNode } | |
| { children: React.ReactNode, staticStore: InstanceType<Store> } | |
| { children: React.ReactNode, arguments: ConstructorParameters<Store> } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function find(hayStack: any, magnifier: (path: string[], key: string, value: any) => boolean) { | |
const foundPaths: { path: string[], key: string, value: unknown }[] = []; | |
function walk(obj: any, path: string[]) { | |
// console.log(path.join('.'), obj) | |
if (magnifier(path, path[path.length - 1], obj)) { | |
foundPaths.push({ | |
path: path.slice(0, path.length - 1), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bc = require('beamcoder'); | |
bc.demuxer('rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov').then(dm => console.log(dm.duration)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { app, BrowserWindow, dialog} = require('electron'); | |
app.on('ready', async () => { | |
const mainWindow = new BrowserWindow({ | |
center: true, | |
autoHideMenuBar: true, | |
webPreferences: { | |
nodeIntegration: true, | |
contextIsolation: false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// C:\Users\Stefan\AppData\Local\Packages\Microsoft.Lovika_8wekyb3d8bbwe\LocalCache\Local\Dungeons | |
const fs = require('fs'); | |
const path = require('path'); | |
const assert = require('assert'); | |
const [toWatch, toBackup] = process.argv.slice(2); | |
assert(fs.existsSync(toWatch), `cannot find dir ${toWatch}`); | |
assert(fs.existsSync(toBackup), `cannot find backup dir ${toBackup}`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | |
[Reflection.Assembly]::LoadWithPartialName("System.Drawing.Bitmap") | |
[Reflection.Assembly]::LoadWithPartialName("System.Drawing.Graphics") | |
[Reflection.Assembly]::LoadWithPartialName("System.Drawing.Imaging") | |
[Reflection.Assembly]::LoadWithPartialName("System.Drawing.Icon") | |
[Reflection.Assembly]::LoadWithPartialName("System.IO") | |
function Img2Icon{ | |
param ($image) | |
NewerOlder