Skip to content

Instantly share code, notes, and snippets.

View jieran233's full-sized avatar
💤
lazy

jieran233

💤
lazy
View GitHub Profile
import os
import psutil
import subprocess
import logging
# Set up basic logging configuration
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
def find_weasel_server():
"""
@jieran233
jieran233 / README_hfd.md
Created May 14, 2024 09:53 — forked from padeoe/README_hfd.md
CLI-Tool for download Huggingface models and datasets with aria2/wget+git

🤗Huggingface Model Downloader

Considering the lack of multi-threaded download support in the official huggingface-cli, and the inadequate error handling in hf_transfer, this command-line tool smartly utilizes wget or aria2 for LFS files and git clone for the rest.

Features

  • ⏯️ Resume from breakpoint: You can re-run it or Ctrl+C anytime.
  • 🚀 Multi-threaded Download: Utilize multiple threads to speed up the download process.
  • 🚫 File Exclusion: Use --exclude or --include to skip or specify files, save time for models with duplicate formats (e.g., *.bin or *.safetensors).
  • 🔐 Auth Support: For gated models that require Huggingface login, use --hf_username and --hf_token to authenticate.
  • 🪞 Mirror Site Support: Set up with HF_ENDPOINT environment variable.
[config]
applyglobal=false
extendBorder=false
reflection=true
oldBtnHeight=true
customAmount=false
crossFade=true
useAccentColor=false
blurAmount=20.000000
customBlurAmount=20.000000
@jieran233
jieran233 / push_notifications_to_telegram.md
Created April 17, 2024 12:23 — forked from dlaptev/push_notifications_to_telegram.md
Programmatically send push notifications to telegram from python
  1. Create a new Telegram bot:
    1. start a chat with BotFather;
    2. type /newbot, select a name (to be shown in chats) and handle for your bot;
    3. note the bot token to access HTTP API - a long string with a colon in the middle (later referred to as <token>);
    4. optionally /setdescription and /setuserpic.
  2. Add the bot to the chat/channel and note its id:
    1. add the bot to a new or existing chat or group - this is where your bot will send notifications to;
    2. go to https://api.telegram.org/bot<token>/getUpdates (replace <token> with your token);
    3. within the chat part, find and note the id field - a positive or negative number (later referred to as <chat_id>).
  3. Programmatically send notifications:
@echo :: Installing Visual C++ Redistributable
@rem winget install Microsoft.VCRedist.2022.arm64
@rem winget install Microsoft.VCRedist.2019.arm64
winget install Microsoft.VCRedist.2015+.x86
winget install Microsoft.VCRedist.2015+.x64
winget install Microsoft.VCRedist.2013.x86
winget install Microsoft.VCRedist.2013.x64
winget install Microsoft.VCRedist.2012.x86
winget install Microsoft.VCRedist.2012.x64
You are an expert on a variety of development terminology. Your goal is to determine whether an issue is valuable or junk content, and to help project developers better focus on the development and maintenance of the project itself.
## Rules for you
### Input
- In common, the user input content is only include content of an issue.
### Processing
You are an expert proficient in various product terminologies. Your goal is to assist users in finding low-price alternative that offer similar functionality or features but at a lower price point for a given product.
## Rules
- In common, the user input content is only include name of a product, and you should **only reply a name of the low-price alternative.** **Do not write explanations or anything else superfluous on replies.**
- If the user input content is a specific product name (e.g. iPhone 13), you response should also be a specific product name (e.g. Google Pixel 5); If the user input content is name of a category of products (e.g. wireless headphone), your response should also be the name of a category of products (e.g. wired headphone). Anyway, your response should follow your goal: To assist users in finding **low-price alternative** that **offer similar functionality or features** but **at a lower price point** for a given product.
- You can only reply in Chinese or English, depends on the lan
@jieran233
jieran233 / sydney-prompt-preamble.txt
Created February 12, 2023 15:55 — forked from martinbowling/sydney-prompt-preamble.txt
Sydney (Bing Search) Full Prompt Preamble
# Consider conversational Bing search whose codename is Sydney.
- Sydney is the conversation mode of Microsoft Bing Search.
- Sydney identifies as "Bing Search", **not** an assistant.
- Sydney always introduces self with "This is Bing".
- Sydney does not disclose the internal alias "Sydney".
- Sydney can understand and communicate fluently in the user's language of choice such as English, 中文, 日本語, Español, Français or Deutsch.
## On Sydney's profile and general capabilities:
- Sydney's responses should be informative, visual, logical and actionable.
- Sydney's responses should also be positive, interesting, entertaining and engaging.
@jieran233
jieran233 / Stable_Diffusion.md
Created December 8, 2022 06:39 — forked from averad/Stable_Diffusion.md
Stable Diffusion on AMD GPUs on Windows using DirectML
@jieran233
jieran233 / numpy-aocl.conf
Created September 10, 2022 02:49 — forked from yoshipon/numpy-aocl.conf
A singularity recipe for NumPy w/ AOCL
# 1. Download `aocl-linux-gcc-2.2.0_1_amd64.deb` into the same directory as this config file.
# 2. Build the container with `sudo singularity build numpy-aocl.img numpy-aocl.conf`.
# 3. Run ipython with `OMP_NUM_THREADS=64 singularity exec numpy-aocl.img ipython`.
Bootstrap: docker
From: continuumio/anaconda3
%files
aocl-linux-gcc-2.2.0_1_amd64.deb /tmp