Discover gists
This file contains 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
WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? | |
#37: | |
new file mode 100644 | |
CHECK: Lines should not end with a '(' | |
#77: FILE: arch/riscv/kernel/usercfi.c:36: | |
+ asm goto( | |
CHECK: spaces preferred around that '%' (ctx:WxV) | |
#81: FILE: arch/riscv/kernel/usercfi.c:40: |
This file contains 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
/* | |
Now that the initial version is done, it’s time to start extending it. | |
Product has determined that that our customers want to be able to bucket events together by time. | |
After filtering the events, we would like you to aggregate events that occur in the same timespan. | |
For the purposes of this interview our timestamps will be at day granularity and we will always bucket by day. | |
Types: | |
type Alert struct { | |
alertType string | |
date string | |
totalValue int64 |
This file contains 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
# This module demonstrates that it's possible to leverage WebAI to host an LLM chatbot, | |
# interacting with it via APIs. The code sends a prompt to the LLM and streams back its response. | |
# In theory, this approach can be extended to programmatically interact with the LLM, | |
# while using WebAI to orchestrate running the LLM across a cluster of local hardware. | |
# Demo: https://i.ibb.co/jkNF488Z/Feb-11-2025-12-17-22.gif | |
import json | |
import requests | |
import time | |
def get_endpoints(): |
This file contains 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 io.micrometer.core.instrument.MeterRegistry | |
import io.micrometer.core.instrument.Timer | |
import org.aspectj.lang.ProceedingJoinPoint | |
import org.aspectj.lang.annotation.Around | |
import org.aspectj.lang.annotation.Aspect | |
import org.springframework.stereotype.Component | |
import kotlin.coroutines.Continuation | |
import kotlin.coroutines.intrinsics.startCoroutineUninterceptedOrReturn | |
import kotlin.coroutines.intrinsics.suspendCoroutineUninterceptedOrReturn |
This file contains 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
using Random | |
using CairoMakie | |
using QuadGK | |
using Distributions | |
function CI(x, p, ci_size) | |
"""Computes the minimum length confidence interval for a single-peaked posterior distribution""" | |
dx = x[2] - x[1] | |
median_loc = argmax(p) | |
median = x[median_loc] # compute the mode of the distribution - this point will be in the confidence interval |
This file contains 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
{ | |
"url": "https://google.com", | |
"name": "ReferrToEarn", | |
"iconUrl": "https://files.softicons.com/download/animal-icons/cat-force-icons-by-iconka/ico/cat_upsidedown.ico" | |
} |
This file contains 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
if ('speechSynthesis' in window) { | |
let utterance = new SpeechSynthesisUtterance(texto); | |
utterance.lang = 'pt-BR'; | |
utterance.rate = 1.2; | |
window.speechSynthesis.speak(utterance); | |
} else { | |
console.log("Web Speech API não suportada neste navegador."); | |
} |
This file contains 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
Log uploaded on Wednesday, February 12, 2025, 2:25:09 AM | |
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.4]: 0Harmony(av:2.3.3,fv:1.2.0.1), HugsLib(av:1.0.0,fv:11.0.4) | |
AAAA(Allowed Area Automatic Adapter)(seekiworksmod.no17): AAAA(3.1.0) |
This file contains 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
pts1 = np.float32([[56,65],[368,52],[28,387],[389,390]]) | |
pts2 = np.float32([[0,0],[300,0],[0,300],[300,300]]) | |
M = cv2.getPerspectiveTransform(pts1, pts2) | |
perspective_transformed = cv2.warpPerspective(image, M, (300, 300)) |