Skip to content

Instantly share code, notes, and snippets.

@JunJaBoy
JunJaBoy / JesseAndCookies2.kt
Created April 29, 2024 07:31
HackerRank/Algorithm/JesseAndCookies kotlin2
import java.util.*
import kotlin.*
import kotlin.collections.*
private fun List<Int>.sweetenCookies(targetSweetness: Int): Int {
val heap = PriorityQueue(this)
var count = 0
while (heap.size > 1 && heap.peek() <= targetSweetness) {
val first = heap.poll()
Maintainers:
hrdinka: nsd, nsd, nsd, nsd
x86_64-linux nsd
aarch64-darwin nsd
aarch64-linux nsd
x86_64-darwin nsd
@niranjanaryan
niranjanaryan / neural_ode_benchmarks.md
Created April 29, 2024 07:30 — forked from ChrisRackauckas/neural_ode_benchmarks.md
torchdiffeq vs Julia DiffEqflux Neural ODE Training Benchmark

torchdiffeq vs Julia DiffEqFlux Neural ODE Training Benchmark

The spiral neural ODE was used as the training benchmark for both torchdiffeq (Python) and DiffEqFlux (Julia) which utilized the same architecture and 500 steps of ADAM. Both achived similar objective values at the end. Results:

  • DiffEqFlux defaults: 7.4 seconds
  • DiffEqFlux optimized: 2.7 seconds
  • torchdiffeq: 288.965871299999 seconds
@followdeKlerk
followdeKlerk / index.html
Created April 29, 2024 07:30
React Smooth Section Navigator
<div id="root"></div>
Pipeline still running ...
PipelineRun is still running: Tasks Completed: 41 (Failed: 1, Cancelled 0), Incomplete: 1, Skipped: 8
[get-pr-number : parse-pr-url] + echo -n 326
[get-pr-number : parse-pr-url] + tee /tekton/results/git_pr_number
[get-pr-number : parse-pr-url] 326
[acquire-lease : create-lease] Attempting to create lease operator-hosted-pipeline-pr-326
[acquire-lease : create-lease] lease.coordination.k8s.io/operator-hosted-pipeline-pr-326 created
[acquire-lease : create-lease] Acquired lease operator-hosted-pipeline-pr-326
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created April 29, 2024 07:29
Rimworld output log published using HugsLib
Log uploaded on Monday, April 29, 2024, 3:29:38 PM
Loaded mods:
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1)
Core(Ludeon.RimWorld): (no assemblies)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
Biotech(Ludeon.RimWorld.Biotech): (no assemblies)
Anomaly(Ludeon.RimWorld.Anomaly): (no assemblies)
HugsLib(UnlimitedHugs.HugsLib)[ov:11.0.3]: 0Harmony(av:2.3.3,fv:1.2.0.1), HugsLib(av:1.0.0,fv:11.0.3)
Humanoid Alien Races(erdelf.HumanoidAlienRaces): 0Harmony(2.3.3), AlienRace(1.0.0)
@hicallmeal
hicallmeal / instagram-api_direct_messages_backup.js
Created April 29, 2024 07:29 — forked from baptx/instagram-api_direct_messages_backup.js
Instagram API: view and backup direct messages from a web browser
/*
Instagram API: view and backup direct messages from a web browser
Since April 2020, Instagram has a web version to send and read direct messages so my Instagram scripts are not longer needed and I would not recommend using them unless you really need it, to avoid being banned
(never happened to me with Instagram but WhatsApp is owned by Facebook also and they did it to users registering from an unofficial app like yowsup: https://github.com/tgalal/yowsup/commit/88b8ad9581fa22dac330ee3a05fec4e485dfa634#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5)
1) Log in on Instagram web version and go to your profile page
(the home page will not work because it loads data when scrolling down and the direct messages will be displayed at the bottom of the page)
2) Modify HTTP headers with a browser addon like Header Editor (https://addons.mozilla.org/en-US/firefox/addon/header-editor/)
@wojtekmaj
wojtekmaj / test.sh
Created April 29, 2024 07:29
React 19 compatibility quick test
git switch -c react-19
yarn up react@beta react-dom@beta
npm pkg set resolutions.'@types/react'='npm:types-react@beta'
npm pkg set resolutions.'@types/react-dom'='npm:types-react-dom@beta'
yarn
yarn tsc
yarn unit
@ashutoshsr7
ashutoshsr7 / main.dart
Created April 29, 2024 07:29
Tabs - Navigation
import 'package:flutter/material.dart';
void main() {
runApp(const TabBarDemo());
}
class TabBarDemo extends StatelessWidget {
const TabBarDemo({Key? key}) : super(key: key);
@override