This document provides guidelines for maintaining high-quality Rust code. These rules MUST be followed by all AI coding agents and contributors.
All code you write MUST be fully optimized.
"Fully optimized" includes:
| // ==UserScript== | |
| // @name Disable Anti-DevTools Mechanism | |
| // @namespace http://tampermonkey.net/ | |
| // @version 1.0 | |
| // @description Prevents JavaScript from redirecting the page. | |
| // @author Ceshine Lee | |
| // @match *://*.example.com/* | |
| // @grant none | |
| // @run-at document-start | |
| // ==/UserScript== |
You are Gemini CLI, operating in a specialized Explain Mode. Your function is to serve as a virtual Senior Engineer and System Architect. Your mission is to act as an interactive guide, helping users understand complex codebases through a conversational process of discovery.
Your primary goal is to act as an intelligence and discovery tool. You deconstruct the "how" and "why" of the codebase to help engineers get up to speed quickly. You must operate in a strict, read-only intelligence-gathering capacity. Instead of creating what to do, you illuminate how things work and why they are designed that way.
Your core loop is to scope, investigate, explain, and then offer the next logical step, allowing the user to navigate the codebase's complexity with you as their guide.
(Working as of 2025-02-09)
There are websites that use disable-devtool to prevent you from opening or using devtools. They typically prevent you from right clicking or using the keyboard shortcut to open devtools. Even if you successfully do so, they detect it and redirect you elsewhere. You can bypass this by using one of the following ways.
If the shortcut F12 on Windows or Option + ⌘ + I on Mac do not work. Press the three vertically aligned dots in the top right corner of your Google Chrome or Microsoft Edge window. Under the section "More Tools", you'll see the option to select "Developer Tools" which opens the toolkit in your window.
| # install DSPy: pip install dspy | |
| import dspy | |
| # Ollam is now compatible with OpenAI APIs | |
| # | |
| # To get this to work you must include `model_type='chat'` in the `dspy.OpenAI` call. | |
| # If you do not include this you will get an error. | |
| # | |
| # I have also found that `stop='\n\n'` is required to get the model to stop generating text after the ansewr is complete. | |
| # At least with mistral. |
| from typing import Any, Optional, Union, Tuple | |
| import torch | |
| from torch import nn | |
| from transformers.activations import ACT2FN | |
| from transformers.models.deberta.modeling_deberta import ( | |
| DebertaPreTrainedModel, | |
| DebertaModel, | |
| ) | |
| from transformers.models.deberta_v2.modeling_deberta_v2 import ( |
| # I added all the imports by hand | |
| import torch | |
| from torchvision.datasets import ImageFolder | |
| from torchvision import transforms,models | |
| from torch import nn,optim | |
| # For all functions including this one, I wrote the name and docstring, and sometimes also the param names | |
| def finetune(folder, model): | |
| """fine tune pytorch model using images from folder and report results on validation set""" | |
| if not os.path.exists(folder): raise ValueError(f"{folder} does not exist") |
| from fastcore.basics import patch_to | |
| class Demo: | |
| val = 10 | |
| def __init__(self, val): | |
| self.val = val | |
| # ==================== | |
| # The default mode |
.env file for me sparing me the need to pollute my session with environment variables.
I've been using Fish shell for years which is great and all, but one thing that has got me frustrated is using it with .env files.
When attempting to run source .env in a project, I usually encounter this problem: