Skip to content

Instantly share code, notes, and snippets.

INSERT INTO MY__DWH.l_groups_dialogs(hk_l_groups_dialogs, hk_message_id,hk_group_id,load_dt,load_src)
select
hash(hd.hk_message_id,hg.hk_group_id),
hd.hk_message_id,
hg.hk_group_id,
now() as load_dt,
's3' as load_src
from MY__STAGING.dialogs as d
@klofberg
klofberg / Page.fs
Created March 13, 2025 11:49
Page file for AI Chat App
module ChatElmish.Pages.Page
open System.Text
open Fable.Core
open Fetch
open Feliz
open Thoth.Json
open ElmishLand
open ChatElmish.Shared
open ChatElmish.Pages
@nishad
nishad / README.md
Created March 13, 2025 11:49 — forked from dvcrn/README.md
DEVONthink 3 automatic filenames with ChatGPT

To install, make sure you install the openai CLI:

  1. pip3 install openai
  2. Run which openai to get the full path of where the executable is
  3. Copy the path and replace /opt/homebrew/bin/openai in the script with your path if it's different
  4. Update set OPENAI_API_KEY to "xxx" to use your OpenAI key

To use GPT3.5-turbo instead of gpt-4, change /opt/homebrew/bin/openai api chat_completions.create -m gpt-4 to -m gpt-3.5-turbo or other model with larger context window.

@pafernandez-oesia
pafernandez-oesia / blue-owl-2.omp.json
Created March 13, 2025 11:48
Oh My Posh - Blue Owl Theme mod
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#a313a8",
"foreground": "#FFEB3B",
"style": "plain",
@lvanasse
lvanasse / ci-sim-02.log
Created March 13, 2025 11:48
[sim-02] CI Log for nuttx @ e0b02314e6e28b10ee84837bfe62b1e48700f85a / nuttx-apps @ 3b03636e95f6202b512d8af32629da4c0dc4af2c
Script started on 2025-03-13 11:26:02+00:00 [COMMAND="/home/ludovic/nuttx-release/run-job.sh sim-02" <not executed on terminal>]
Now running https://github.com/lupyuen/nuttx-release/blob/main/run-job.sh
Called by https://github.com/lupyuen/nuttx-release/blob/main/run-ci.sh
+ job=sim-02
+ neofetch
.-/+oossssoo+/-.
`:+ssssssssssssssssss+:`
-+ssssssssssssssssssyyssss+-
.ossssssssssssssssssdMMMNysssso.
/ssssssssssshdmmNNmmyNMMMMhssssss/
@eval7524
eval7524 / NonDuplicatedContact.java
Last active March 13, 2025 12:06
Auto-uploaded file: /Users/eval7524/IdeaProjects/learn-java/src/Test/NonDuplicatedContact.java
package Test;
import java.util.*;
public class NonDuplicatedContact {
private static Scanner scanner = new Scanner(System.in);
private static Set<String> memberId = new HashSet<>();
private static void addContact() {
System.out.print("추가할 회원 ID : ");
String id = scanner.nextLine().trim();
@paulsmal
paulsmal / archlinuxzbm.md
Created March 13, 2025 11:48 — forked from Adito5393/archlinuxzbm.md
Arch Linux with ZFS root, zfs-dkms, ZFSBootMenu, and Secure Boot enabled (nothing changed compared to the upstream - last merged upstream revision 2024-02-22)

Install Arch Linux with ZFS root filesystem, zfs-dkms, ZFSBootMenu, Pacman Auto-snapshots, Secure Boot enabled

Configure system BIOS

Disable Secure Boot. ZFS modules can not be loaded if Secure Boot is enabled.

ZFS automated install script

Before moving on I need to point out that there exists a script that can automate the configuration and install of a ZFS root system. However as convenient as it sounds the script is limited in flexibility and scope. These limitation cannot be overcome unless one has the time and compacity to edit the script to their liking. If you want to install a ZFS root system as quickly as possible and don't care about any particulars than take a good look at this github page.

@davidespihernandez
davidespihernandez / agents.json
Created March 13, 2025 11:47
Postman API test agents.json
{
"agentsJson": "1.0.0",
"info": {
"title": "Postman API Agent",
"version": "1.0.0",
"description": "Postman API Agent"
},
"sources": [
{
"id": "postmanAPI",
@howardrotterdam
howardrotterdam / python_time_usage.md
Created March 13, 2025 11:47
How to get user and system time usage of a shell command in Python code?

How to get user and system time usage of a shell command in Python code?

Grok3 (DeepSearch On)

Key Points

  • It seems likely that to measure user and system time for a shell command in Python, you can use the psutil library, which tracks CPU usage across processes.
  • Research suggests that for shell commands with features like pipes, run the command with shell=True and sum the CPU times of the parent shell process and its children using psutil.
  • The evidence leans toward needing to install psutil via pip install psutil if not already available, as it's not part of Python's standard library.

What Are User and System Time?

User time is the CPU time spent executing user-level code, while system time is the CPU time spent on kernel operations. Together, they show how much CPU a command used, excluding idle or wait times.