Skip to content

Instantly share code, notes, and snippets.

@Mukei
Mukei / Instruction.md
Created March 31, 2025 14:07 — forked from minhanhhere/Instruction.md
Customise Your Terminal Using Zsh & powerlevel10k

What we will setup

1. ZSH

ZSH, also called the Z shell, is an extended version of the Bourne Shell (sh), with plenty of new features, and support for plugins and themes.

2. oh-my-zsh

This is a framework for zsh

3. Powerlevel 10k

Powerlevel10k is a theme for Zsh. It emphasizes speed, flexibility and out-of-the-box experience.

RIPER-5 MODE: STRICT OPERATIONAL PROTOCOL

CONTEXT PRIMER

You are Claude 3.7, integrated into Cursor IDE, an AI-powered fork of VS Code. You tend to be overeager, making unauthorized changes that break logic. This is UNACCEPTABLE. To prevent this, you MUST follow this strict protocol:

META-INSTRUCTION: MODE DECLARATION REQUIREMENT

RIPER-5 MODE: STRICT OPERATIONAL PROTOCOL

CONTEXT PRIMER

You are Claude 3.7, you are integrated into Cursor IDE, an A.I based fork of VS Code. Due to your advanced capabilities, you tend to be overeager and often implement changes without explicit request, breaking existing logic by assuming you know better than me. This leads to UNACCEPTABLE disasters to the code. When working on my codebase—whether it’s web applications, data pipelines, embedded systems, or any other software project—your unauthorized modifications can introduce subtle bugs and break critical functionality. To prevent this, you MUST follow this STRICT protocol:

META-INSTRUCTION: MODE DECLARATION REQUIREMENT

YOU MUST BEGIN EVERY SINGLE RESPONSE WITH YOUR CURRENT MODE IN BRACKETS. NO EXCEPTIONS. Format: [MODE: MODE_NAME] Failure to declare your mode is a critical violation of protocol.

@Mukei
Mukei / submit.md
Created June 13, 2022 14:27 — forked from tanaikech/submit.md
Downloading Shared Files on Google Drive Using Curl

Downloading Shared Files on Google Drive Using Curl

When the shared files on Google Drive is downloaded, it is necessary to change the download method by the file size. The boundary of file size when the method is changed is about 40MB.

File size < 40MB

CURL

filename="### filename ###"
fileid="### file ID ###"
curl -L -o ${filename} "https://drive.google.com/uc?export=download&amp;id=${fileid}"

filter result based on images names containing "base" in their names

index = [index for index, im_similar in enumerate(im_similar) if "base" in im_similar]

im_similar = [im_similar[i] for i in index]
distances = [distances[0][i] for i in index]
@Mukei
Mukei / cookbook_kaggle_in_colab.py
Last active November 29, 2019 00:56
How to use Kaggle in Google Colaboratory
#source https://www.kaggle.com/general/64962
!pip install kaggle
#Authenticating with Kaggle API
from googleapiclient.discovery import build
import io, os
from googleapiclient.http import MediaIoBaseDownload
from google.colab import auth
auth.authenticateuser() driveservice = build('drive', 'v3')
@Mukei
Mukei / kaggle_dataset load.py
Created March 17, 2019 14:41
Some Python command to use Kaggle on Colab
# To access kaggle datasets
!pip install kaggle
# Import data from Kaggle
# Colab's file access feature
from google.colab import files
# Retrieve uploaded file
uploaded = files.upload()
@Mukei
Mukei / conda_environment_rename.sh
Created November 30, 2017 07:01
How to rename a conda environment (workaround)
#One workaround is to create clone environment, and then remove original one:
#(remember about deactivating current environment with deactivate on Windows and source deactivate on macOS/Linux)
conda create --name new_name --clone old_name --offline #use --offline flag to disable the redownload of all your packages
conda remove --name old_name --all # or its alias: `conda env remove --name old_name`
#There are several drawbacks of this method:
# time consumed on copying environment's files,
# temporary double disk usage.
@Mukei
Mukei / install_packages.sh
Last active November 27, 2017 01:56 — forked from luiscape/install_packages.sh
Install Python dependency packages from requirements.txt using conda.
#
# Original solution via StackOverflow:
# http://stackoverflow.com/questions/35802939/install-only-available-packages-using-conda-install-yes-file-requirements-t
#
#
# Install via `conda` directly.
# This will fail to install all
# dependencies. If one fails,
# all dependencies will fail to install.