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
pants --level=error list | fzf |
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 python:3.11-slim | |
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv | |
ENV UV_SYSTEM_PYTHON=1 | |
WORKDIR /app | |
RUN uv venv /opt/venv && \ | |
touch README.md | |
ENV VIRTUAL_ENV=/opt/venv | |
ENV PATH="/opt/venv/bin:$PATH" |
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
{ | |
search( | |
query: "location:Japan type:organization language:rust language:python" | |
type: USER | |
first: 30 | |
) { | |
edges { | |
node { | |
... on Organization { | |
name |
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 os | |
def on_pants() -> bool: | |
# .pants.bootrap | |
return os.getenv("ON_PANTS") == "true" | |
def on_pants_test() -> bool: | |
# pants.toml [test] section | |
return os.getenv("ON_TEST") == "true" |
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
DIR=$( | |
cd $(dirname $0) | |
pwd | |
) | |
echo $DIR | |
dirs=$(rg --files-with-matches tool.poetry | xargs -I{} dirname {}) | |
for dir in $dirs; do | |
echo $dir |
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
gh copilot suggest "I want to commit changes. Please read current change and suggest the message with changed file and changed motivation: $(git diff --staged)" |
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
[GLOBAL] | |
print_stacktrace = true | |
remote_cache_read = true | |
remote_cache_write = true | |
remote_store_address = "grpc://localhost:9092" | |
remote_instance_name = "main" | |
colors = true | |
backend_packages.add = [ | |
"pants.backend.shell.lint.shfmt", | |
"pants.backend.shell.lint.shellcheck", |
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 collections import defaultdict | |
def set_value_nested_dict(keys, value): | |
dct = defaultdict(dict) | |
if len(keys) == 1: | |
return {keys[0]: value} | |
dct[keys[0]] |= set_value_nested_dict(keys[1:], value) | |
return dict(dct) | |
"""example |
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
biosで起動優先順位を変更して、fastbootみたいなのを無効にする | |
https://curio-shiki.com/blog/support/clone-hdd-ssd-fixed |
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
#include<bits/stdc++.h> | |
using namespace std; | |
#define rep(i,n) repi(i,0,n) | |
#define repi(i,a,b) for(int i=int(a);i<int(b);++i) | |
#define INF (1e9) | |
int n; | |
string t; | |
void solve( ) { |
NewerOlder