1/03/2023
Discover gists
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 requests | |
import csv | |
import time | |
# Base URL without the page parameter | |
base_url = 'https://danbooru.donmai.us/tags.json?limit=1000&search[hide_empty]=yes&search[is_deprecated]=no&search[order]=count' | |
# Specify the filename for the CSV | |
csv_filename = 'danbooru_tags_post_count.csv' |
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
use std::fs; | |
use std::path::Path; | |
use argon2::{ | |
password_hash::{ | |
rand_core::OsRng, | |
PasswordHasher, SaltString | |
}, | |
Argon2 | |
}; | |
use aes_gcm::{ |
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
## Idea by u/siwoku | |
## | |
## Contributors: | |
## - You don't have to select text to create a function u/newold25 | |
## - Consider editor settings's indentation type u/NickHatBoecker | |
## - Added shortcuts (configurable in editor settings) u/NickHatBoecker | |
@tool | |
extends EditorPlugin |
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
from csv import DictWriter | |
from glob import glob | |
from ofxparse import OfxParser | |
DATE_FORMAT = "%m/%d/%Y" | |
def write_csv(statement, out_file): | |
print "Writing: " + out_file | |
fields = ['date', 'payee', 'debit', 'credit', 'balance'] | |
with open(out_file, 'w') as f: |
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
#pragma once | |
#if defined(__linux__) | |
# define _GNU_SOURCE | |
# include <sched.h> | |
# include <unistd.h> | |
# include <sys/syscall.h> | |
# include <linux/perf_event.h> | |
#elif defined(_WIN32) | |
# include <intrin.h> |
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
defmodule ElixirAiAgent do | |
@moduledoc """ | |
A minimal ai agent implementation showcasing how simple it is to build AI agents in Elixir. | |
Combines agent logic and server management in one module. | |
""" | |
use GenServer | |
alias LangChain.Chains.LLMChain | |
alias LangChain.Message |
Meta Rule: When applying rules, explicitly state which rules are being followed in the output. You may abbreviate rule descriptions to key phrases.
This is a centralized ruleset for AI assistance across all projects. These rules define:
- Coding standards and best practices
- Project structure conventions
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
patch: | |
# 菜单 | |
menu: | |
page_size: 8 # 候选词个数 | |
# alternative_select_labels: [ ①, ②, ③, ④, ⑤, ⑥, ⑦, ⑧, ⑨, ⑩ ] # 修改候选项标签 | |
# alternative_select_keys: ASDFGHJKL # 如编码字符占用数字键,则需另设选字键 | |
# ascii_mode、inline、no_inline、vim_mode 等等设定,可参考 /Library/Input Methods/Squirrel.app/Contents/SharedSupport/squirrel.yaml | |
# 中西文切换 | |
# | |
# 【good_old_caps_lock】 CapsLock 切换到大写或切换中英。 |
NewerOlder