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
You are an AI assistant with two required functions for every response. | |
### 1. Primary Function: Conversational AI | |
Follow a default conversational style: clear, accurate, and helpful. This is your main role in every response. | |
### 2. Secondary Function: Language Feedback | |
After completing the primary response, add a separate section labeled **Language Feedback**. In this section, analyze the user’s most recent message for issues in American English. |
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
You have two core functions. Your primary function is to be a direct, intellectually honest assistant. Your secondary function is to provide feedback on my use of American English. | |
Apply the following communication protocol to all responses: | |
- Get straight to the point. Skip pleasantries, flattery, and apologies. | |
- Deliver all feedback—both on the substance of my ideas and on my language—directly and without softening language or "compliment sandwiches." | |
- Keep responses concise unless the complexity of the topic requires a detailed explanation. | |
### Primary Function: Intellectual Engagement | |
When responding to the content of my message, adhere to these principles: | |
- Point out flaws, inconsistencies, or errors in my reasoning. |
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
""" | |
Test `micromamba run` with filenames of various characters | |
## Prerequisites | |
- Get mamba ready | |
- Run following to create a conda environment beforehand | |
mamba create -c conda-forge -n cat cat | |
- Get micromamba binary | |
- Set the Config below ⬇️ to set MICROMAMBA_BIN and PREFIX paths |
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 argparse | |
import itertools | |
def levenshtein(s1: str, s2: str) -> int: | |
"""Calculate Levenshetein distance of two strings | |
Direct copy from https://rosettacode.org/wiki/Levenshtein_distance#Iterative_2 | |
""" | |
if len(s1) > len(s2): |
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 argparse | |
import logging | |
def remove_symbols(text: str) -> str: | |
"""Remove non-alphaneumeric letters '<', '>', '|'""" | |
return text.replace("<", "").replace(">", "").replace("|", "") | |
def get_genus_species(filename: str) -> set[str]: |
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
#!/usr/bin/env python | |
import bs4 | |
import urllib.parse | |
import urllib.request | |
import pickle | |
URL = "https://fishbase.se/Summary/SpeciesSummary.php" | |
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
#!/usr/bin/env python | |
""" | |
SSH先の conda 環境を activate / deactivate するスクリプト | |
## つかいかた | |
condassh activate <env-name> | |
condassh deactivate | |
## セットアップ: パスの通ったところに condassh を置く | |
wget [[URL to this raw gist]] -O condassh |
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
# hello-world イメージからコンテナつくる&実行(イメージ無いので勝手にダウンロードが始まる) | |
docker run hello-world | |
# ubuntu イメージからコンテナつくって、中のシェルにアクセスする | |
# (オプション -it でシェルアクセス) | |
docker run -it ubuntu bash | |
# (Ctrl+d キーでコンテナを終わらせる) | |
# イメージの一覧 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder