Stream.of(1, 2, 3, 4, 5).allMatch(x -> x < 10);
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
from __future__ import annotations | |
from langchain_openai import ChatOpenAI | |
from langchain_openai.chat_models.base import _create_usage_metadata | |
import json | |
from typing import ( | |
Any, | |
Dict, | |
Mapping, |
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
diff -Nur mituharu-emacs-mac-3ff676c2f98c/src/macappkit.m mituharu-emacs-mac-3ff676c2f98c-patched/src/macappkit.m | |
--- mituharu-emacs-mac-3ff676c2f98c/src/macappkit.m 2022-04-06 11:51:42.000000000 +0800 | |
+++ mituharu-emacs-mac-3ff676c2f98c-patched/src/macappkit.m 2022-04-06 23:21:32.000000000 +0800 | |
@@ -1935,6 +1935,17 @@ | |
@implementation EmacsWindow | |
++ (NSButton *)standardWindowButton:(NSWindowButton)b forStyleMask:(NSWindowStyleMask)styleMask | |
+{ | |
+ NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; |
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
diff --git a/src/macappkit.m b/src/macappkit.m | |
index fb7bf2a..732fbed 100644 | |
--- a/src/macappkit.m | |
+++ b/src/macappkit.m | |
@@ -2262,6 +2262,18 @@ - (void)showMenuBar | |
@implementation EmacsWindow | |
++ (NSButton *)standardWindowButton:(NSWindowButton)b forStyleMask:(NSWindowStyleMask)styleMask | |
+{ |
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
t.prefs_.set('color-palette-overrides',["#151515", "#ac4142", "#7e8e50", "#e5b567", "#6c99bb", "#9f4e85", "#7dd6cf", "#d0d0d0", "#505050", "#ac4142", "#7e8e50", "#e5b567", "#6c99bb", "#9f4e85", "#7dd6cf", "#f5f5f5"]); | |
t.prefs_.set('foreground-color', "#d0d0d0"); | |
t.prefs_.set('background-color', "#303030"); | |
t.prefs_.set('cursor-color', 'rgba(208,208,208,0.5)'); |
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
# $HOME/.k9s/plugin.yml | |
plugin: | |
# run-stk: | |
# # Define a mnemonic to invoke the plugin | |
# shortCut: r | |
# # What will be shown on the K9s menu | |
# description: kubectl run lululau/stk | |
# # Collections of views that support this shortcut. (You can use `all`) | |
# scopes: |
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
ruby -i.bak -F, -ane ' | |
p=$F[2].gsub(/省|市|自治区/, ""); | |
c=$F[3].gsub(/市|自治./, ""); | |
co=$F[4].gsub(/市|区|县|自治./, ""); | |
$F[1]=$F[2]+$F[3]+$F[4]+$F[1].gsub(Regexp.new("^.*(%s|%s|%s)"%[$F[2],$F[3],$F[4]]), "").gsub(Regexp.new("^.*(%s|%s|%s)"%[p,c,co]), ""); | |
$F[-1].chomp! | |
p1=$F[-3].gsub(/省|市|自治区/, ""); | |
c1=$F[-2].gsub(/市|自治./, ""); |
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
#!/usr/bin/env zsh | |
for i in *.txt; do | |
echo '------------------------------------------------------' | |
base_name=${i%.txt} | |
contract_no=$(cat $i | iconv -c -f UTF-16LE | grep -o '合同 [0-9]*') | |
contract_no=${contract_no#* } | |
customer_name=$(cat $i | iconv -c -f UTF-16LE | grep -o '尊敬的 [^ ]*' ) | |
customer_name=${customer_name#* } | |
customer_name=$(echo -n "$customer_name" | ruby -pe 'gsub(/[^\u4E00-\u9FA5]/, "?")') |
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
# derived from josh.zsh-theme | |
ZSH_THEME_GIT_PROMPT_PREFIX="(%{$fg[red]%}" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}*%{$fg[blue]%})%{$reset_color%}" | |
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" | |
function josh_prompt { | |
(( spare_width = ${COLUMNS} )) | |
prompt=" " |
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
module Concerns | |
module Institution | |
module IOProcessorAble | |
extend ActiveSupport::Concern | |
def dq_io_processor(params={}) | |
io_processor_of('dq', params) | |
end | |
def hq_io_processor(params={}) | |
io_processor_of('hq', params) |
NewerOlder