Skip to content

Instantly share code, notes, and snippets.

View iqiancheng's full-sized avatar
🌴
On vacation

千橙 iqiancheng

🌴
On vacation
View GitHub Profile
@iqiancheng
iqiancheng / macos_sequioa_hibernate.md
Last active December 21, 2024 09:32
pmset -g custom

macOS Power Management Guide

Overview

This guide covers power management settings for macOS using the pmset utility, focusing on battery optimization and sleep behavior.

Basic Commands

Check Current Settings

# View all power management settings
@iqiancheng
iqiancheng / README.md
Created December 16, 2024 10:26
调试 GitHub 仓库依赖问题的实用技巧

调试 GitHub 仓库依赖问题的实用技巧

基于时间线的依赖版本排查方法

问题背景

在尝试运行 GitHub 上的开源项目时,我们经常会遇到依赖相关的问题。这些问题通常表现为"No Module Found"错误或找不到特定函数的情况。这主要是因为许多仓库在版本依赖管理方面并不完善。

解决方案

以下是一个基于时间线的实用方法来解决依赖问题:

  1. 确定项目的活跃时期
@iqiancheng
iqiancheng / README.md
Last active December 16, 2024 10:00
macos 手动升级系统 InstallAssistant.pkg macos_sequoia_upgrade_guide.md

Manual MacOS Sequoia Upgrade Guide

Download Instructions

The recommended download page for macOS Sequoia is: iClarified MacOS Download Guide

Download Process

  1. Select the appropriate InstallAssistant.pkg download link based on:
@iqiancheng
iqiancheng / README.md
Created December 16, 2024 09:46
SSH免密登录配置指南 ssh_passwordless_login_guide.md

SSH免密登录配置指南

本文档介绍如何配置SSH免密登录远程开发服务器,通过配置SSH密钥对实现自动登录,提高开发效率和安全性。

前置检查

首先检查是否已经存在SSH密钥:

ls ~/.ssh/id_rsa
@iqiancheng
iqiancheng / multithreading_data_sharing.py
Created November 18, 2024 04:59
Python 中线程共享数据
import threading
import time
from concurrent.futures import ThreadPoolExecutor
import unittest
from dataclasses import dataclass, field
from threading import Lock
import multiprocessing
@dataclass
class SharedData:
@iqiancheng
iqiancheng / script.js
Created September 12, 2024 14:19 — forked from luighifeodrippe/script.js
Download a JSON List of twitter bookmarks
/* Enhancements to the Twitter Scraping Script:
This update to the script introduces a more robust mechanism for extracting detailed interaction data from tweets as they are scraped from Twitter. Previously, the script focused on collecting basic content such as the tweet's text. Now, it has been augmented to include a comprehensive extraction of interaction metrics, including replies, reposts, likes, bookmarks, and views, for each tweet.
Key Changes:
1. Improved Data Extraction:
- The script now searches through all elements within a tweet that have an `aria-label` attribute, filtering for labels that contain key interaction terms (replies, reposts, likes, bookmarks, views). This ensures that only relevant `aria-labels` are considered for data extraction.
2. Flexible Interaction Data Parsing:
@iqiancheng
iqiancheng / flux_lora_cfg.py
Created September 9, 2024 12:16 — forked from AmericanPresidentJimmyCarter/flux_lora_cfg.py
Use your flux-dev LoRA with a quantized model and CFG in <16gb VRAM
import inspect
from typing import Any, Callable, Dict, List, Optional, Union
import numpy as np
import torch
from transformers import CLIPTextModel, CLIPTokenizer, T5EncoderModel, T5TokenizerFast
from diffusers.image_processor import VaeImageProcessor
from diffusers.loaders import FluxLoraLoaderMixin
from diffusers.models.autoencoders import AutoencoderKL
// ==UserScript==
// @name URL Tagger
// @namespace http://tampermonkey.net/
// @version 1.5
// @description Tag URLs based on predefined patterns and data
// @author Your Name
// @match *://*/*
// @grant GM_xmlhttpRequest
// @grant GM_addStyle
// @connect 192.168.x.x
@iqiancheng
iqiancheng / show_gids.sh
Created July 12, 2024 14:08 — forked from aagontuk/show_gids.sh
Show GID
#!/bin/bash
black='\E[30;50m'
red='\E[31;50m'
green='\E[32;50m'
yellow='\E[33;50m'
@iqiancheng
iqiancheng / README.md
Created July 5, 2024 01:13 — forked from curran/README.md
Simplemaps World Cities Database

A dataset about cities of the world.

Downloaded from Simplemaps: World Cities Database.

A new file worldcitiesReduced.csv was created by manually removing columns not deemed necessary for initial visualization of this data.