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 / 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.

@iqiancheng
iqiancheng / arxiv_latex_zapper.user.js
Last active July 1, 2024 13:10
LaTeX Cleanup UserScript for arXiv
// ==UserScript==
// @name arXiv LaTeX Zapper.user.js
// @namespace https://gist.github.com/iqiancheng
// @author qian.cheng
// @version 0.3
// @description Zap those pesky LaTeX elements that snuck into the HTML on arXiv
// @downloadURL https://gist.githubusercontent.com/iqiancheng/9945010cc85209185618c964bdd84fd1/raw/969a26e502d4487569a561013612eb6b019bfb1b/arxiv_latex_zapper.user.js
// @updateURL https://gist.githubusercontent.com/iqiancheng/9945010cc85209185618c964bdd84fd1/raw/969a26e502d4487569a561013612eb6b019bfb1b/arxiv_latex_zapper.user.js
// @match *://ar5iv.labs.arxiv.org/html/*
// @match *://arxiv.org/html/*
@iqiancheng
iqiancheng / hatenalet-indicator-reviver.user.js
Created July 1, 2024 11:54 — forked from noromanba/hatenalet-indicator-reviver.user.js
revive "[saving...]" indicator on Hatena::Let for UserScript
// ==UserScript==
// @name Hatena::Let indicator reviver
// @namespace https://noromanba.github.com
// @description revive "[saving...]" indicator on Hatena::Let for UserScript
// @include *://let.hatelabo.jp/l
// @grant none
// @noframes
// @run-at document-end
// @version 2018.5.14.1
// @homepage https://gist.github.com/noromanba/ceaf1067aea7c3855ce7b57fe5ae1887
@iqiancheng
iqiancheng / 404ToArchive.user.js
Created July 1, 2024 11:54 — forked from wolf20482/404ToArchive.js
A Tampermonkey userscript that automatically redirects 404 pages to the latest archived version in Internet Archive.
// ==UserScript==
// @name 404ToArchive
// @namespace wolf20482
// @version 1.0.0
// @description Automatically redirects 404 pages to the latest archive in Internet Archive.
// @author wolf20482
// @license MIT
// @match http://*
// @match https://*
// @match http://*/*
// ==UserScript==
// @name GitHub Artifacts login bypass
// @description Allows you to download an artifact from GitHub or web archive using nightly.link
// @author DelofJ
// @version 1.0
// @namespace https://gist.github.com/DelofJ/a81c27f473045bb01b50c3dc6ca51a2f
// @icon https://github.githubassets.com/favicons/favicon.png
// @downloadURL https://gist.githubusercontent.com/DelofJ/a81c27f473045bb01b50c3dc6ca51a2f/raw/e59e6323aef2072b8a24839dc2dcc04f80b3c109/github-artifact-redirect.user.json
// @updateURL https://gist.githubusercontent.com/DelofJ/a81c27f473045bb01b50c3dc6ca51a2f/raw/e59e6323aef2072b8a24839dc2dcc04f80b3c109/github-artifact-redirect.user.json
// @grant none
@iqiancheng
iqiancheng / AutoWB.user.js
Created July 1, 2024 11:52 — forked from ATRescue/AutoWB.js
UserScript to automatically save visited pages into the Wayback Machine.
/* This Userscript helps you preserving websites by automatically saving pages you visit, including their linked subpages and other linked URLs, into Internet Archive's Wayback Machine.
Run this UserScript using the following tools:
Desktop browsers:
* GreaseMonkey for Mozilla Firefox: https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/
* TamperMonkey for Google Chrome: https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo
* TamperMonkey for Chromium-Opera Browser: https://addons.opera.com/en/extensions/details/tampermonkey-beta/