Skip to content

Instantly share code, notes, and snippets.

@furaibo
furaibo / e-hentai.py
Last active May 5, 2024 06:26
E-Hentaiギャラリーの画像をダウンロードするPythonスクリプトです。ご自由にお使い下さい。
#!/usr/bin/python
#-*-coding:utf-8 -*-
# E-HentaiのページURLをもとにギャラリー画像を取得するスクリプト
# パッケージのインポート
import os
import sys
import re
import urllib2
@dan-palmer
dan-palmer / prompt.json
Created February 2, 2024 13:49
Arc Search Browse for Me Prompt
{
"messages": [
{
"content": "You are an advanced, reliable, candid AI system that takes user search queries, converts them into questions, and answers them, using specific facts and details sourced from webpages to prove your answer. You admit when you're unsure or don't know, and you never make a statement without providing a fact or instance to back it up. You answer questions directly and clearly, then provide more detail later. You follow the JSON schema exactly.",
"role": "system"
},
{
"content": "# CONTEXT\nCurrent date: #{DATE_TIME}.\n\nHere are result from a web search for '#{QUERY}':\nBEGIN WEB PAGE #{HOST_1} #{MARKDOWN_1}END WEB PAGE\nBEGIN WEB PAGE #{HOST_2} #{MARKDOWN_2}END WEB PAGE\nBEGIN WEB PAGE #{HOST_3} #{MARKDOWN_3}END WEB PAGE\nBEGIN WEB PAGE #{HOST_4} #{MARKDOWN_4}END WEB PAGE\nBEGIN WEB PAGE #{HOST_5} #{MARKDOWN_5}END WEB PAGE\nBEGIN WEB PAGE #{HOST_6} #{MARKDOWN_6}END WEB PAGE",
"role": "system"
},
@bellbind
bellbind / build.zig
Last active May 5, 2024 06:24
[zig][WebAssembly][c11] FFT
// build all: $ zig build
// clean up: $ zig build dist-clean
const builtin = @import("builtin"); // list-up the content with `zig builtin` command
const Builder = @import("std").build.Builder;
//NOTE: this build code is for zig-0.4.0, maybe incompatible with zig >= 0.5
pub fn build(b: *Builder) void {
{ //[case: WebAssembly wasm] build fft.wasm
const wasmStep = b.step("fft.wasm", "build fft.wasm");
const wasm = b.addExecutable("fft.wasm", "fft.zig");
@abd3lraouf
abd3lraouf / KeyboardVisibilityDetector.kt
Last active May 5, 2024 06:23
Android Compose Keyboard Visibility Detector: A Jetpack Compose implementation to detect the visibility of the software keyboard in an Android app. This example demonstrates the use of WindowInsets and isImeVisible in a simple Compose layout
package dev.abd3lraouf.learn.myapplication
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.ExperimentalLayoutApi
import androidx.compose.foundation.layout.WindowInsets
import androidx.compose.foundation.layout.fillMaxSize
@psifertex
psifertex / binexport_binja.zsh
Last active May 5, 2024 06:19
BinExport build script for Binary Ninja (macOS + Linux Only)
#!/usr/bin/env zsh
# Note:
# CMake, Clang, clang-format, Ninja, git and sed are required to build
#
# Note that currently there is a bug (https://github.com/google/binexport/issues/117)
# that requires applying this patch, remove when resolved
#
if [ -d ~/Downloads ]
@ethDreamer
ethDreamer / claim_params.py
Created February 23, 2024 02:39
StarkNet Airdrop Claim
#!/usr/bin/env python3
import sys
import json
import os
def find_account_inclusion_object(eligibles, eth_address):
for account in eligibles:
if account["identity"].lower() == eth_address.lower():
return account
return None
@ivan
ivan / github-users-starknet-rewards.tsv
Created March 25, 2024 23:02
All GitHub users rewarded STRK in the Starknet airdrop, most-rewarded first
We can't make this file beautiful and searchable because it's too large.
13911.1 swader
13911.1 sorpaas
13911.1 s1na
13911.1 rjl493456442
13911.1 qd-qd
13911.1 protolambda
13911.1 paulrberg
13911.1 noahzinsmeister
13911.1 neurone
@disler
disler / README.md
Created March 31, 2024 14:34
Use these Prompt Chains to build HIGH QUALITY AI Agents (Agentic Building Blocks)

Setup

  1. Create a new directory with these three files (requirements.txt, main.py, README.md)
  2. python -m venv venv
  3. source venv/bin/activate
  4. pip install -r requirements.txt
  5. python main.py
  6. Update main() to run the example prompt chains
@wojteklu
wojteklu / clean_code.md
Last active May 5, 2024 06:16
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules