repo
stringlengths 7
106
| readme
stringlengths 1
512k
⌀ | description
stringlengths 1
3.38k
⌀ | topics
stringlengths 2
244
⌀ | releases
int64 0
1k
| contributors
int64 0
10k
| pulls
int64 0
66.4k
| commits
int64 1
463k
| issues
int64 0
14.5k
| branches
int64 1
4.52k
| workflows
int64 0
116
|
---|---|---|---|---|---|---|---|---|---|---|
SuperSimpleDev/html-css-course-2022 | null | null | null | 0 | 1 | 15 | 121 | 51 | 1 | 0 |
AngusJohnson/Clipper2 | # Clipper2
### A Polygon <a href="https://en.wikipedia.org/wiki/Clipping_(computer_graphics)">Clipping</a> and <a href="https://en.wikipedia.org/wiki/Parallel_curve">Offsetting</a> library (in C++, C# & Delphi)<br>
[![GitHub Actions C++ status](https://github.com/AngusJohnson/Clipper2/actions/workflows/actions_cpp.yml/badge.svg)](https://github.com/AngusJohnson/Clipper2/actions/workflows/actions_cpp.yml) [![C#](https://github.com/AngusJohnson/Clipper2/actions/workflows/actions_csharp.yml/badge.svg)](https://github.com/AngusJohnson/Clipper2/actions/workflows/actions_csharp.yml) [![License](https://img.shields.io/badge/License-Boost_1.0-lightblue.svg)](https://www.boost.org/LICENSE_1_0.txt)
[![Nuget](https://img.shields.io/nuget/v/Clipper2?color=green)](https://www.nuget.org/packages/Clipper2)
[![documentation](https://user-images.githubusercontent.com/5280692/187832279-b2a43890-da80-4888-95fe-793f092be372.svg)](http://www.angusj.com/clipper2/Docs/Overview.htm)
The <b>Clipper2</b> library performs **intersection**, **union**, **difference** and **XOR** boolean operations on both simple and complex polygons. It also performs polygon offsetting. This is a major update of my original <a href="https://sourceforge.net/projects/polyclipping/"><b>Clipper</b></a> library that was written over 10 years ago. That library I'm now calling <b>Clipper1</b>, and while it still works very well, Clipper2 is [better](http://www.angusj.com/clipper2/Docs/Changes.htm) in just about every way.
### Compilers
<b>Clipper2</b> can be compiled using either C++, or C#, or Delphi Pascal. The library can also be accessed from other programming languages by dynamically linking to exported functions in the [C++ compiled Clipper2 library](https://github.com/AngusJohnson/Clipper2/tree/main/DLL). (Since the C++ compiled code is [measurably](https://www.angusj.com/clipper2/Docs/Changes.htm) faster, C# and Delphi developers may also prefer this approach in applications where the library's performance is critical.)
| Lang. | Requirements |
| --- | --- |
| [**C++:**](https://github.com/AngusJohnson/Clipper2/tree/main/CPP) | Requires C++17 (could be modified to C++11 with relatively minor changes), **or**|
| [**C#:**](https://github.com/AngusJohnson/Clipper2/tree/main/CSharp) | The library uses Standard Library 2.0 but the sample code uses .NET6, **or**|
| [**Delphi:**](https://github.com/AngusJohnson/Clipper2/tree/main/Delphi) | Compiles with any version of Delphi from version 7 to current.|
### Documentation
<a href="http://www.angusj.com/clipper2/Docs/Overview.htm"><b>Extensive HTML documentation</b></a>
<br><br>
### Examples
<pre>
//C++
Paths64 subject, clip, solution;
subject.push_back(MakePath({100, 50, 10, 79, 65, 2, 65, 98, 10, 21}));
clip.push_back(MakePath({98, 63, 4, 68, 77, 8, 52, 100, 19, 12}));
solution = Intersect(subject, clip, FillRule::NonZero);</pre>
<pre> //C#
Paths64 subj = new Paths64();
Paths64 clip = new Paths64();
subj.Add(Clipper.MakePath(new int[] { 100, 50, 10, 79, 65, 2, 65, 98, 10, 21 }));
clip.Add(Clipper.MakePath(new int[] { 98, 63, 4, 68, 77, 8, 52, 100, 19, 12 }));
Paths64 solution = Clipper.Intersect(subj, clip, FillRule.NonZero);</pre>
<pre> //Delphi
var
subject, clip, solution: TPaths64;
begin
SetLength(subject, 1);
subject[0] := MakePath([100, 50, 10, 79, 65, 2, 65, 98, 10, 21]);
SetLength(clip, 1);
clip[0] := MakePath([98, 63, 4, 68, 77, 8, 52, 100, 19, 12]);
solution := Intersect( subject, clip, frNonZero);</pre>
![clipperB](https://user-images.githubusercontent.com/5280692/178123810-1719a1f5-25c3-4a9e-b419-e575ff056272.svg)
<hr>
### Ports to other languages
| lang. | link |
| ------ | ------ |
| **WASM** | https://github.com/ErikSom/Clipper2-WASM/ |
| **Java** | https://github.com/micycle1/Clipper2-java/ |
| **Kotlin** | https://github.com/Monkey-Maestro/clipper2-kotlin |
| **golang** | https://github.com/epit3d/goclipper2 |
| Polygon Clipping and Offsetting - C++, C# and Delphi | cpp,csharp,delphi,geometry,pascal,polygon-intersection,polygon-union,offsetting,polygon,polygon-boolean | 14 | 34 | 198 | 705 | 2 | 1 | 2 |
deltazefiro/Amarok-Hider |
<!-- ![poster](https://raw.githubusercontent.com/deltazefiro/ImageHost/master/amarok-169-poster.png) -->
# Amarok-Hider
[![](https://img.shields.io/visual-studio-app-center/releases/version/deltazefiro/Amarok/2e57e3f726f6bdf0b9bd5e3791bd2c5d1ab1dbe2?color=blue&label=AppCenter)](https://install.appcenter.ms/users/deltazefiro/apps/amarok/distribution_groups/public)
[![](https://img.shields.io/github/v/release/deltazefiro/Amarok-Hider?label=GithubRelease)](https://github.com/deltazefiro/Amarok-Hider/releases)
[![](https://img.shields.io/f-droid/v/deltazero.amarok.foss?color=blue)](https://f-droid.org/zh_Hans/packages/deltazero.amarok.foss/)
[![](https://img.shields.io/endpoint?url=https://apt.izzysoft.de/fdroid/api/v1/shield/deltazero.amarok.foss&color=orange)](https://apt.izzysoft.de/fdroid/index/apk/deltazero.amarok.foss)
🌐 **ENGLISH** | [简体中文](https://github.com/deltazefiro/Amarok-Hider/blob/main/README.zh.md)
## What is Amarok?
Amarok is an Android application which enables you to hide your private files & apps with a single click.
> Often, we resort to complex encryptors to secure our files and apps, aiming to shield them from prying eyes. These encryptors, while effective, tend to be slow and resource-intensive, making the encryption of large files such as videos and music a daunting task. Despite their robust security, these methods are often overkill for the average user who simply wish to keep their private files and apps out of unintentional reach.
Amarok is designed to be a light-weight hider for files and applications:
- It disguises file names and headers, causing them to seem "corrupted" and unopenable.
- Amarok deactivates applications, rendering them invisible in the launcher and system menu.
## Features
- **User-Friendly**: Easily hide files and applications with a single click.
- **Rapid and Efficient Large File Hiding**: Hides by altering only file name and signature, unaffected by file size.
- **Root-Free Application Hiding**: Makes apps vanish from the launcher. Compatible with Root, Shizuku, Dhizuku, and DSM modes.
- **Panic button**: Use a floating button to quickly hide applications and files in urgent scenarios.
- **Quick Settings Tile**: A control center toggle for immediate hiding, bypassing the need to launch the app.
- **App Lock**: Secure Amarok access with a password or fingerprint.
- **Pleasant Interface**: Clean and attractive Material3 design.
> [!IMPORTANT]
> Please aware that Amarok is not an encryption software, but rather a tool for hiding things. We strongly advise against using Amarok to protect confidential files and applications.
## Screenshots
<table>
<tr>
<td><img src="https://github.com/deltazefiro/Amarok-Hider/assets/41465688/b3fe6b18-cb3e-488b-81cb-ff5ed005664b" alt="Image 1"></td>
<td><img src="https://github.com/deltazefiro/Amarok-Hider/assets/41465688/1a6f147c-286a-428c-9470-a469b4dd9f4e" alt="Image 2"></td>
<td><img src="https://github.com/deltazefiro/Amarok-Hider/assets/41465688/9b61b94f-26f2-4457-b189-93c75a09e7d5" alt="Image 3"></td>
</tr>
<tr>
<td><img src="https://github.com/deltazefiro/Amarok-Hider/assets/41465688/9ef70932-c242-4cc6-a84d-5b14ddf8a814" alt="Image 4"></td>
<td><img src="https://github.com/deltazefiro/Amarok-Hider/assets/41465688/3702143d-dac5-435d-9615-323ada02c63e" alt="Image 5"></td>
<td><img src="https://github.com/deltazefiro/Amarok-Hider/assets/41465688/a2016488-0c13-4144-93ed-5ca35179df79" alt="Image 6"></td>
</tr>
</table>
## Download
[![](https://img.shields.io/visual-studio-app-center/releases/version/deltazefiro/Amarok/2e57e3f726f6bdf0b9bd5e3791bd2c5d1ab1dbe2?color=blue&label=AppCenter)](https://install.appcenter.ms/users/deltazefiro/apps/amarok/distribution_groups/public)
[![](https://img.shields.io/github/v/release/deltazefiro/Amarok-Hider?label=GithubRelease)](https://github.com/deltazefiro/Amarok-Hider/releases)
[![](https://img.shields.io/f-droid/v/deltazero.amarok.foss?color=blue)](https://f-droid.org/zh_Hans/packages/deltazero.amarok.foss/) (FOSS)
[![](https://img.shields.io/endpoint?url=https://apt.izzysoft.de/fdroid/api/v1/shield/deltazero.amarok.foss&color=orange)](https://apt.izzysoft.de/fdroid/index/apk/deltazero.amarok.foss) (FOSS) (Pre-release channel)
## Usage
[![](https://img.shields.io/badge/AmarokDocs-ClickToView-brightgreen)](https://deltazefiro.github.io/Amarok-doc/en-US/)
## Contributing
Thank you for dedicating your time in contributing to this project!
Contributions in all forms are welcomed, including reporting bugs, proposing new features, performing language translations, and submitting code development PRs.
We use [weblate](https://hosted.weblate.org/engage/amarok-hider/) for translations.
<a href="https://hosted.weblate.org/engage/amarok-hider/">
<img src="https://hosted.weblate.org/widgets/amarok-hider/-/multi-auto.svg" alt="Translation status" />
</a>
## Credits
Many thanks to:
- [aistra0528/Hail](https://github.com/aistra0528/Hail), for providing code reference for the app hider.
- [Icongeek26](https://www.flaticon.com/authors/icongeek26) &
[Freepik](), for the icons
- [Jetbrains](https://www.jetbrains.com/community/opensource/#support), provides IDE support for open source projects
- [RikkaApps/Shizuku](https://github.com/RikkaApps/Shizuku)
- [iamr0s/Dhizuku](https://github.com/iamr0s/Dhizuku)
- [kizitonwose/Calendar](https://github.com/kizitonwose/Calendar)
... and all the dedicated [contributors](https://github.com/deltazefiro/Amarok-Hider/graphs/contributors)!
## Disclaimers
<u>**Amarok is provided without any warranties or conditions. The user is fully responsible for any harm or consequences that may arise from using Amarok.**</u>
| Hide your private files and apps with a single click. | android,android-application,privacy-protection,hider,file-hider | 33 | 41 | 68 | 570 | 31 | 4 | 2 |
greenpau/caddy-security | * <a href="https://caddyserver.com/api/download?os=windows&arch=amd64&p=github.com%2Fgreenpau%2Fcaddy-security%40v1.1.29&p=github.com%2Fgreenpau%2Fcaddy-trace%40v1.1.8" target="_blank">windows/amd64</a>
* <a href="https://caddyserver.com/api/download?os=linux&arch=amd64&p=github.com%2Fgreenpau%2Fcaddy-security%40v1.1.29&p=github.com%2Fgreenpau%2Fcaddy-trace%40v1.1.8" target="_blank">linux/amd64</a>
# caddy-security
<a href="https://github.com/greenpau/caddy-security/actions/" target="_blank"><img src="https://github.com/greenpau/caddy-security/workflows/build/badge.svg?branch=main"></a>
<a href="https://pkg.go.dev/github.com/greenpau/caddy-security" target="_blank"><img src="https://img.shields.io/badge/godoc-reference-blue.svg"></a>
Security App and Plugin for [Caddy v2](https://github.com/caddyserver/caddy). It includes:
* Authentication Plugin for implementing Form-Based, Basic, Local, LDAP, OpenID
Connect, OAuth 2.0, SAML Authentication
* Authorization Plugin for HTTP request authorization based on JWT/PASETO tokens
* Credentials Plugin for managing credentials for various integrations
Please show your **appreciation for this work** and :star: :star: :star:
Please consider **sponsoring this project** via Github Sponsors!
Please ask questions either here or via LinkedIn. I am happy to help you! @greenpau
**Documentation**: [docs.authcrunch.com](https://docs.authcrunch.com)
**Docker Container**: [authcrunch/authcrunch](https://github.com/authcrunch/authcrunch/pkgs/container/authcrunch)
**Configuration Examples**: [here](https://github.com/authcrunch/authcrunch.github.io/tree/main/assets/conf)
**Security Policy**: [SECURITY.md](SECURITY.md)
| 🔐 Authentication, Authorization, and Accounting (AAA) App and Plugin for Caddy v2. 💎 Implements Form-Based, Basic, Local, LDAP, OpenID Connect, OAuth 2.0 (Github, Google, Facebook, Okta, etc.), SAML Authentication. MFA/2FA with App Authenticators and Yubico. 💎 Authorization with JWT/PASETO tokens. 🔐 | caddy-plugin,caddy2,security,jwt,authorization,authentication,auth,paseto,paseto-tokens,saml | 46 | 8 | 15 | 173 | 154 | 1 | 3 |
Cyber-Guy1/API-SecurityEmpire | # 🛡️ API Security Empire
<div align="center">
<img src="https://github.com/Cyber-Guy1/API-SecurityEmpire/assets/66295316/8b741387-350f-4a61-bce1-d29c6a9ac27d" width="60%" height="60%">
<br>
<small>Project Credits: <a href="https://www.linkedin.com/in/momen-eldawakhly-3b6250204">Momen Eldawakhly (Cyber Guy)</a></small>
</div>
<br>
In this repository you will find: Mindmaps, tips & tricks, resources and every thing related to API Security and API Penetration Testing. Our mindmaps and resources are based on OWASP TOP 10 API, our expereince in Penetration testing and other resources to deliver the most advanced and accurate API security and penetration testing resource in the WEB!!
## 🚪 First gate: ```{{Recon}}```
The first gate to enter the API Security Empire is to know how to gather information about the API infrastructure and how to perform a powerfull recon on API to extract the hidden doors which made you compromise the whole infrastructure from, so, we provide this updated API Recon mindmap with the latest tools and methodologies in API recon:
<br>
<div align="center">
<img src="https://github.com/Cyber-Guy1/API-SecurityEmpire/blob/main/assets/API%20Pentesting%20Mindmap.png" width="70%" height="70%" target="_blank">
<small><b><a href="https://github.com/Cyber-Guy1/API-SecurityEmpire/blob/main/assets/API%20Pentesting%20Mindmap.pdf" target="_blank">PDF Version</a> | <a href="https://github.com/Cyber-Guy1/API-SecurityEmpire/blob/main/assets/API%20Pentesting%20Mindmap.xmind" target="_blank">XMind Version</a></b></small>
</div>
<br>
### ⚔️ Weapons you will need:
- [BurpSuite](https://portswigger.net/burp/releases)
- [FFUF](https://github.com/ffuf/ffuf)
- [Arjun](https://github.com/InsiderPhD/Arjun)
- [Postman](https://www.postman.com/downloads/)
- [SecLists](https://github.com/danielmiessler/SecLists/tree/master/Discovery/Web-Content)
- [FuzzDB](https://github.com/fuzzdb-project/fuzzdb)
- [SoapUI](https://www.soapui.org/downloads/soapui/)
- [GraphQL Voyager](https://apis.guru/graphql-voyager/)
- [Graphinder](https://github.com/Escape-Technologies/graphinder)
- [Kiterunner](https://github.com/assetnote/kiterunner)
- [unfurl](https://github.com/tomnomnom/unfurl)
### 🏋️ Test your abilities and weapons:
- [vapi](https://github.com/roottusk/vapi)
- [Generic-University](https://github.com/InsiderPhD/Generic-University)
## 🚪 Second gate: ```{{Attacking}}```
### Attacking RESTful & SOAP:
<div align="center">
<img src="https://github.com/Cyber-Guy1/API-SecurityEmpire/blob/main/assets/API%20Pentesting%20Mindmap%20ATTACK.png" target="_blank">
<br>
<small><b><a href="https://github.com/Cyber-Guy1/API-SecurityEmpire/blob/main/assets/API%20Pentesting%20Mindmap%20ATTACK.pdf" target="_blank">PDF Version</a> | <a href="https://github.com/Cyber-Guy1/API-SecurityEmpire/blob/main/assets/API%20Pentesting%20Mindmap%20ATTACK.xmind" target="_blank">XMind Version</a></b></small>
</div>
<br>
### Attacking GraphQL:
Due to the limited attacks in the GraphQL we tried to generate all the possible attacks due to our experience in testing APIs in the coming mindmap:
<div align="center">
<img src="https://github.com/Cyber-Guy1/API-SecurityEmpire/blob/main/assets/API%20Pentesting%20Mindmap%20%7B%7BGraphQL%20Attacking%7D%7D.png">
<br>
<small><b><a href="https://github.com/Cyber-Guy1/API-SecurityEmpire/blob/main/assets/API%20Pentesting%20Mindmap%20%7B%7BGraphQL%20Attacking%7D%7D.pdf" target="_blank">PDF Version</a> | <a href="https://github.com/Cyber-Guy1/API-SecurityEmpire/blob/main/assets/API%20Pentesting%20Mindmap%20%7B%7BGraphQL%20Attacking%7D%7D.xmind" target="_blank">XMind Version</a></b></small>
</div>
<br>
While attacking GraphQL, the most important phase is the enumeration of mutations and queries, without which you will not be able to perform full GraphQL testing, to do so, I'm using the *Apollo GraphQL Sandbox*, Apollo enumerates the queries and mutations, then sorting them in front of you, after that you can chose the action you want to perform using mutations or the data you want to retrive using queries by just chosing them via GUI and Apollo will write down the query automatically. What makes Apollo special is that it's a web based explorer, which means no need to install and you can run it against your local GraphQl too!!
- [Apollo Sandbox](https://studio.apollographql.com/sandbox/explorer)
## 🙏 Special thanks:
- [roottusk](https://github.com/roottusk)
- [Portswigger](https://github.com/PortSwigger)
- [Tomnomnom](https://github.com/tomnomnom)
- [assetnote](https://github.com/assetnote/kiterunner)
- [danielmiessler](https://github.com/danielmiessler)
- [InsiderPhD](https://github.com/InsiderPhD)
- [ffuf](https://github.com/ffuf/)
- [OWASP](https://github.com/OWASP)
## 📝 License:
<img src="https://user-images.githubusercontent.com/97954690/155418561-30c6292d-877c-4acf-ac90-531d8661a455.png" width="20%" height="20%" target="_blank">
| API Security Project aims to present unique attack & defense methods in API Security field | cybersecurity,penetration-testing,apisecurity,information-security,bugbounty,api,bug-bounty,infosec,cybersec,tips | 0 | 3 | 1 | 42 | 0 | 1 | 0 |
LinghaoChan/CSSummerCamp2022 | # CSSummerCamp2022
# 【置顶】2022预推免报名和截止日期请转移至:[CSYuTuiMian2022](https://github.com/CS-BAOYAN/CSYuTuiMian2022)
关于**2022年CS推免夏令营通知公告**的汇总。欢迎大家积极分享夏令营信息,资瓷一下互联网精神吼不吼啊?(本仓库将随各校通知的发布实时更新,具体形式可参见往年:[CSSummerCamp2020](https://github.com/hcy226/CSSummerCamp2020)、[CSSummerCamp2021](https://github.com/hit-thusz-RookieCJ/CSSummerCamp2021))。预祝大家夏令营成功上岸!
另附[保研小白必看的往年经验贴大全,建议全部看完至少掌握保研流程,否则容易问一些很显然的问题](https://github.com/Alpha-Yang/CS-BAOYAN-2022)。
# [夏令营入营及考核结果开奖情况统计](https://docs.qq.com/sheet/DUWhaRXFlV0txcUFp)
# 清华大学
~~【报名截止: 2022.4.24】[清华大学自动化系智能与网络化系统研究中心2022年招生夏令营简章及报名通道](https://mp.weixin.qq.com/s/PIh-a1VIBqt7-BambzxkUA)~~
~~【报名截止:2022.5.19】[清华大学交叉信息研究院2022年优秀大学生夏令营](https://admission.iiis.tsinghua.edu.cn/2022/)~~
~~【报名截止:2022.6.9】[清华大学第五届(2022年)“计算法学”夏令营](https://www.law.tsinghua.edu.cn/info/1135/13185.htm)~~
~~【报名截止:2022.6.14】[计算机系2022年全国优秀大学生夏令营报名预通知-清华计算机科学与技术系](https://www.cs.tsinghua.edu.cn/info/1087/5034.htm)~~
~~【报名截止:2022.6.14】[清华大学网络研究院2022年全国优秀大学生夏令营预通知-清华大学网络科学与网络空间研究院](https://www.insc.tsinghua.edu.cn/info/1169/1842.htm)~~
~~【报名截止:2022.6.23】[清华大学深圳国际研究生院2022年数据科学和信息技术专业/清华-伯克利深圳学院优秀大学生夏令营报名通知](https://www.sigs.tsinghua.edu.cn/2022/0531/c120a54040/page.htm)~~
~~【报名截止:2022.6.26】[清华大学深圳国际研究生院2022年信息科学与技术学部全国优秀大学生夏令营报名通知](https://mp.weixin.qq.com/s/ZVKdxUp292qjrfjM62e_SQ)~~
# 北京大学
~~【报名截止:2022.6.10】[北京大学前沿交叉学科研究院夏令营](http://www.aais.pku.edu.cn/tongzhi/shownews.php?id=1460)~~
~~【报名截止:2022.6.16】[北京大学智能学院关于举办2022年优秀大学生夏令营的通知](https://www.cis.pku.edu.cn/info/1034/1817.htm)~~
~~【报名截止:2022.6.16】[北京大学计算机学院关于举办2022年优秀大学生夏令营的通知](https://cs.pku.edu.cn/info/1023/3442.htm)~~
~~【报名截止:2022.6.24】[北京大学软件与微电子学院2022年全国优秀大学生夏令营通知](http://www.ss.pku.edu.cn/index.php/admission/admnotice/4334-2022%E5%B9%B4%E5%8C%97%E4%BA%AC%E5%A4%A7%E5%AD%A6%E8%BD%AF%E4%BB%B6%E4%B8%8E%E5%BE%AE%E7%94%B5%E5%AD%90%E5%AD%A6%E9%99%A2%E4%BC%98%E7%A7%80%E5%A4%A7%E5%AD%A6%E7%94%9F%E5%A4%8F%E4%BB%A4%E8%90%A5%E9%80%9A%E7%9F%A5)~~
~~【报名截止:2022.6.30】[北京大学信息工程学院关于举办“2022年全国优秀大学生夏令营”的通知](https://www.ece.pku.edu.cn/info/1027/2451.htm)~~
# 复旦大学
~~【报名截止:2022.5.31】[复旦大学计算机科学技术学院2022年全国优秀大学生夏令营](https://cs.fudan.edu.cn/bf/99/c24257a442265/page.htm)~~
~~【报名截止:2022.5.31】[复旦大学大数据学院2022年全国优秀大学生夏令营活动通知](https://sds.fudan.edu.cn/bf/72/c17701a442226/page.htm)~~
# 南京大学
~~【报名截止: 2022.6.10】[南京大学计算机软件研究所](https://cs.nju.edu.cn/ics/recruit/index.html)~~
~~【报名截止: 2022.6.16】[人工智能学院2022年本科生开放日报名通知](https://ai.nju.edu.cn/b1/64/c17810a569700/page.htm)~~
~~【报名截止:2022.6.20】[南京大学软件学院2022年优秀大学生夏令营通知](https://software.nju.edu.cn/tzgg/20220527/i223082.html)~~
~~【报名截止: 2022.6.20】[南京大学计算机科学与技术系2022年本科生开放日报名通知](https://cs.nju.edu.cn/b0/eb/c1654a569579/page.htm)~~
# 中国科学技术大学
~~【报名截止:2022.6.30】[中国科学技术大学“优秀大学生夏令营” 活动通知](https://mp.weixin.qq.com/s?__biz=MzA5OTQ4MzAzMg==&mid=2650083353&idx=1&sn=1db1bed8ee834f726a53e97acd64ce4c)~~
# 西安电子科技大学
~~【报名截止:2022.9.23】[西安电子科技大学计科院2023年研究生招生学术夏令营暨预推免报名](https://cs.xidian.edu.cn/info/1003/14792.htm)~~
~~【报名截止:2022.9.23】[西安电子科技大学人工智能学院2023年研究生招生学术夏令营暨预推免报名](https://sai.xidian.edu.cn/info/1106/7501.htm)~~
~~【报名截止:2022.9.25】[西安电子科技大学网络与信息安全学院2023年研究生招生学术夏令营暨预推免报名](https://ce.xidian.edu.cn/info/1324/8773.htm)~~
# 中国人民大学
~~【报名截止: 2022.5.20】[中国人民大学信息学院“2022年优秀大学生夏令营”](http://info.ruc.edu.cn/xwgg/xygg/6d7d1c548f4c45919f0e30b2ce78a9d7.htm)~~
~~【报名截止: 2022.6.10】[中国人民大学高瓴人工智能学院](https://mp.weixin.qq.com/s/xGEd_mRczxnNNVVa0LRPxQ)~~
# 西湖大学
~~【报名截止: 2022.6.20】[西湖大学2022年暑期夏令营](https://www.westlake.edu.cn/news_events/westlakenews/zsdt/202204/t20220411_19774.shtml)~~
# 中国科学院大学
~~【报名截止: 2022.3.31】[中国科学院自动化研究所2022年“人工智能菁英班”项目](http://www.ia.cas.cn/yjsjy/zs/sszs/202203/t20220321_6401496.html)~~
~~【报名截止: 2022年五月份左右开始联系,请尽早】 [中科院软件所中文信息处理实验室](http://www.icip.org.cn/zh/2022/04/11/recruit/)~~
~~【报名截止:2022.6.17】[中国科学院上海高等研究院 “梦筑高研” 2022年大学生暑假夏令营活动通知](http://www.sari.cas.cn/gradedu/gdzssz/gddxssjxm/202204/t20220424_6437240.html)~~
~~【报名截止: 2022.6.20】[中国科学院信息工程研究所2022年“网络空间安全技术”全国优秀大学生夏令营报名通知--中国科学院信息工程研究所](http://www.iie.cas.cn/xsjy2020/zxtz2020/202205/t20220527_6454646.html)~~
~~【报名截止: 2022.6.20】[中国科学院计算技术研究所2022年“计算未来”全国大学生计算技术暑期研修班招生简章](http://ict.cas.cn/xwgg/tzgg/202206/t20220608_6458869.html)~~
~~【报名截止: 2022.6.25】[2022年SIAT优秀大学生学术夏令营招生简章----中国科学院深圳先进技术研究院](https://www.siat.ac.cn/yjsjy2016/zsjs2016/202205/t20220524_6453480.html)~~
~~【报名截止: 2022.6.26】[国科大杭州高等研究院智能科学与技术学院2022年优秀大学生夏令营营员招募启事](http://hias.ucas.ac.cn/znkxyjs/info/1055/1524.htm)~~
~~【报名截止: 2022.6.30】[中国科学院自动化研究所2022年“人工智能”大学生暑期学校招生通知](https://mp.weixin.qq.com/s/DBzm8hKXGIavwMq7st44Vw)~~
~~【报名截止: 2022.6.30】[中国科学院大学2022年全国大学生“网络与计算”夏令营通知----中国科学院计算机网络信息中心](http://cnic.cas.cn/rcjy/xly/202205/t20220526_6454038.html)~~
~~【报名截止: 2022.7.9】[中国科学院软件研究所2022年全国大学生“软件与网络”夏令营招生简章----软件研究所](http://www.is.cas.cn/yjsjy2016/zsxx2016/202205/t20220530_6455509.html)~~
# 同济大学
~~【报名截止:2022.6.15】[2022年同济大学电子与信息工程学院优秀学生暑期学校活动通知](https://see.tongji.edu.cn/info/1147/10142.htm)~~
~~【报名截止:2022.6.15】[同济大学软件学院优秀学生暑期学校活动通知](https://sse.tongji.edu.cn/info/1132/3679.htm)~~
# 北京航空航天大学
~~【报名截止:2022.6.28】[北京航空航天大学计算机学院2022年全国优秀大学生夏令营活动通知](http://scse.buaa.edu.cn/info/1099/8925.htm)~~
~~【报名截止:2022.7.10】[北航软件学院招收2023年研究生优秀大学生夏令营活动方案](https://soft.buaa.edu.cn/info/1123/7151.htm)~~
~~【报名截止:2022.7.20】[北京航空航天大学人工智能研究院招收2023年研究生优秀大学生暑期夏令营通知](https://iai.buaa.edu.cn/info/1024/1933.htm)~~
# 天津大学
~~【报名截止: 2022.6.20】[天津大学智能与计算学部2023级研究生招生夏令营活动通知](http://cic.tju.edu.cn/info/1041/3813.htm)~~
~~【报名截止: 2022.6.30】[天津大学TANKLab 2023级导师团及特招直博生招新](https://mp.weixin.qq.com/s?srcid=0328TrVBOLBU7UuOZhHctIdf&scene=23&sharer_sharetime=1648461969548&mid=2247485718&sharer_shareid=13a0869e2dfd7c9b03339911eb553922&sn=23bc73443c1c9673ce2301101963930b&idx=1&__biz=MzI5MTQwNTAwMg%3D%3D&chksm=ec1064b3db67eda590df3a9514b87316c28089d7aae5acf22c50ee8fbcc277dc13fdd1862eb2&mpshare=1#rd)~~
# 电子科技大学
~~【报名截止:2022.6.26】[信息与软件工程学院第六届“软件工程”全国优秀大学生暑期夏令营通知](https://sise.uestc.edu.cn/info/1026/9189.htm)~~
~~【报名截止:2022.6.30】[电子科技大学2022年第七届“基础与前沿科学”全国优秀大学生暑期夏令营预报名](https://www.iffs.uestc.edu.cn/info/1032/4765.htm?themecolor=111111)~~
~~【报名截止:2022.7.3】[电子科技大学2022年“计算机(网安)”全国优秀大学生暑期夏令营通知](https://www.scse.uestc.edu.cn/info/1015/12391.htm)~~
# 四川大学
~~【报名截止:2022.6.10】[四川大学网络空间安全学院2022年优秀大学生暑期云夏令营招生简章](https://ccs.scu.edu.cn/info/1026/2995.htm)~~
~~【报名截止:2022.6.19】[四川大学计算机学院(软件学院)2022年优秀大学生暑期云夏令营招生简章](https://cs.scu.edu.cn/info/1247/17030.htm)~~
# 中国农业大学
~~【报名截止:2022.6.25】[中国农业大学信息与电气工程学院2022年云端夏令营招生简章](http://ciee.cau.edu.cn/art/2022/6/8/art_26712_865967.html)~~
# 浙江大学
~~【报名截止:2022.6.19】[软件学院2022年优秀大学生夏令营活动的通知](http://www.cst.zju.edu.cn/2022/0607/c36207a2588228/page.htm)~~
~~【报名截止:2022.7.1】[浙江大学计算机学院招收2022年暑期实习生计划](http://www.cs.zju.edu.cn/csen/2022/0527/c27011a2566351/page.htm)~~
~~【报名截止:2022.7.3】[浙江大学伊利诺伊大学厄巴纳香槟校区联合学院 2022年优秀大学生云端夏令营](https://zjui.intl.zju.edu.cn/college/1855)~~
# 上海交通大学
~~【报名截止:2022.6.26】[上海交通大学“2022软件学院优才夏令营”的通知](http://www.se.sjtu.edu.cn/notice/noticedetail.aspx?id=21216)~~
~~【报名截止:2022.6.26】[【优才选拔】上海交大电院 2023级研究生优秀生源选拔活动通知](https://yjwb.seiee.sjtu.edu.cn/yjwb/info/34470.htm)~~
~~【报名截止:2022.6.27】[上海交通大学密西根学院2023年研究生招生夏令营](https://www.ji.sjtu.edu.cn/cn/prospective-students-zh/2022-05-21/130960/)~~
# 上海科技大学
~~【报名截止:2022.6.26】[上海科技大学信息科学与技术学院 2022年优秀大学生夏令营报名通知](https://sist.shanghaitech.edu.cn/2022/0509/c2863a540028/page.htm)~~
# 吉林大学
~~【报名截止:2022.5.31】[2022年吉林大学计算机科学与技术学院 优秀大学生暑期夏令营活动通知](http://ccst.jlu.edu.cn/info/1091/16122.htm)~~
~~【报名截止:2022.6.5】[吉林大学软件学院2022年全国优秀大学生 暑期夏令营活动通知](http://csw.jlu.edu.cn/info/1156/5701.htm)~~
~~【报名截止:2022.6.15】[人工智能学院关于举办2022年优秀大学生夏令营的通知](https://sai.jlu.edu.cn/info/1065/3349.htm)~~
# 华东师范大学
~~【报名截止:2022.6.12】[华东师范大学软件工程学院2022年“可信人工智能优秀大学生夏令营”活动通知](https://yjszs.ecnu.edu.cn/system/xlyxcwb_detail.asp?xlyjbdwbh=2022051120179966143823)~~
~~【报名截止:2022.6.12】[数据科学与工程学院第十届 云计算与大数据优秀大学生夏令营](https://yjszs.ecnu.edu.cn/system/xlyxcwb_detail.asp?xlyjbdwbh=2022051920140103103429)~~
~~【报名截止:2022.6.19】[计算机科学与技术学院 2022 年优秀大学生夏令营活动招生公告](https://yjszs.ecnu.edu.cn/system/xlyxcwb_detail.asp?xlyjbdwbh=2022051320132001150608)~~
# 南开大学
~~【报名截止:2022.6.24】[【夏令营】关于举办2022年南开大学“活力软件”优秀大学生夏令营的通知](https://cs.nankai.edu.cn/info/1042/3193.htm)~~
~~【报名截止:2022.6.27】[【夏令营】关于举办2022年南开大学人工智能学院优秀大学生云端夏令营的通知](https://ai.nankai.edu.cn/info/1024/4968.htm)~~
~~【报名截止:暂无】[【推免生】南开大学计算机学院和网络空间安全学院2023年接收优秀应届本科生推荐免试为研究生的通知](https://cyber.nankai.edu.cn/2022/0608/c13348a456925/page.htm)~~
# 哈尔滨工业大学
~~【报名截止:2022.6.24】[哈工大(威海)“英才计划”夏令营暨优秀硕士生源选拔活动](http://yjsc.hitwh.edu.cn/2022/0613/c2134a156957/page.htm)~~
~~【报名截止:2022.6.26】[关于举办哈尔滨工业大学计算学部暑期夏令营的通知](http://cs.hit.edu.cn/2022/0617/c11271a277600/page.htm)~~
~~【报名截止:2022.6.30】[哈尔滨工业大学(深圳)计算机科学与技术学院关于2023年全国优秀大学生学术夏令营的通知](http://cs.hitsz.edu.cn/info/1029/5877.htm)~~
# 华中科技大学
~~【报名截止:2022.6.26】[关于举办“2022年华中科技大学计算机学院优秀大学生夏令营”活动的通知](http://cs.hust.edu.cn/info/1102/3744.htm)~~
~~【报名截止:2022.6.30】[华中科技大学人工智能与自动化学院2022年学术夏令营活动通知](http://aia.hust.edu.cn/info/1177/7727.htm)~~
# 厦门大学
~~【报名截止:2022.6.15】[2022年厦门大学信息学院(特色化范性软件学院)优秀大学生夏令营招生简章](https://informatics.xmu.edu.cn/info/1050/20229.htm)~~
# 北京师范大学
~~【报名截止:2022.6.26】[北京师范大学人工智能学院 2022年优秀大学生夏令营](https://cist.bnu.edu.cn/tzgg/130692.html)~~
# 中南大学
~~【报名截止:2022.6.9】[关于举办“中南大学2022年优秀大学生暑期夏令营”活动的通知](https://gra.csu.edu.cn/info/1012/38183.htm)~~
~~【报名截止:2022.6.9】[计算机学院关于举办2022年优秀大学生暑期夏令营活动的通知](https://cse.csu.edu.cn/info/1040/6387.htm)~~
~~【报名截止:2022.6.9】[大数据研究院“2022年优秀大学生暑假夏令营”活动方案](https://bdi.csu.edu.cn/info/1063/2465.htm)~~
# 中山大学
~~【报名截止:2022.6.19】[中山大学计算机学院2022年优秀大学生夏令营活动通知](https://cse.sysu.edu.cn/content/6489)~~
~~【报名截止:2022.6.20】[中山大学人工智能学院2022年全国优秀大学生夏令营活动报名通知](https://sai.sysu.edu.cn/teach/graduate/1401394.htm)~~
~~【报名截止:2022.6.26】[中山大学软件工程学院2022年全国优秀大学生夏令营报名通知](https://sse.sysu.edu.cn/article/279)~~
~~【报名截止:2022.6.26】[中山大学网络空间安全学院2022年优秀大学生夏令营活动报名通知](https://scst.sysu.edu.cn/rc/rc05/1401244.htm)~~
# 武汉大学
~~【报名截止:2022.6.15】[武汉大学计算机学院2022年优秀大学生夏令营](http://cs.whu.edu.cn/news_show.aspx?id=1727)~~
~~【报名截止:2022.6.20】[武汉大学国家网络安全学院2022年优秀大学生夏令营活动实施方案](http://cse.whu.edu.cn/info/1101/3571.htm)~~
# 山东大学
~~【报名截止:2022.6.25】[山东大学计算机学院2022年全国优秀大学生暑期夏令营活动](https://www.cs.sdu.edu.cn/info/1068/5517.htm)~~
~~【报名截止:2022.6.26】[关于举办“山东大学软件学院2022年全国优秀大学生暑期夏令营”活动的通知](https://www.sc.sdu.edu.cn/info/1019/3346.htm)~~
~~【报名截止:2022.6.27】[山东大学机电与信息工程学院2022年全国优秀大学生暑期夏令营招生简章](https://ie.wh.sdu.edu.cn/info/1262/8403.htm)~~
~~【报名截止:2022.7.4】[网络空间安全学院(研究院)2022年全国优秀大学生暑期夏令营公告](https://cst.qd.sdu.edu.cn/info/1023/2180.htm)~~
# 西安交通大学
~~【报名截止:2022.6.15】[电信学部-计算机科学与技术学院2022年(第四届)全国优秀大学生夏令营通知](http://www.cs.xjtu.edu.cn/info/1233/2891.htm)~~
~~【报名截止:2022.6.22】[电信学部—软件学院2022年(第六届)优秀大学生夏令营通知](http://se.xjtu.edu.cn/info/1043/2547.htm)~~
~~【报名截止:暂无】[电信学部-网络空间安全学院2022年(第四届)全国优秀大学生夏令营通知](http://cybersec.xjtu.edu.cn/info/1017/1727.htm)~~
# 华南理工大学
~~【报名截止:2022.6.27】[华南理工大学2022年夏令营各学院招募方案](https://yanzhao.scut.edu.cn/MasterX/Zmfa.aspx)~~
~~【报名截止:2022.6.27】[华南理工大学计算机科学与工程学院2022年优秀大学生暑期夏令营招募通知](https://yanzhao.scut.edu.cn/Public/PdfViewer.html?file=/Public/GetFileHex.aspx?B4BE4CC6D1C772920FC283855A6DC8348CE2E6CC219BDD564C6A3F2C29215BDD21BD9C9DBF0C29B60819A7A8A68CE84B2C4CEC5C89A634D74460F2F0CAB2326A)~~
~~【报名截止:2022.6.27】[华南理工大学软件学院2022年优秀大学生暑期夏令营招募通知](https://yanzhao.scut.edu.cn/Public/PdfViewer.html?file=/Public/GetFileHex.aspx?B4BE4CC6D1C772920FC283855A6DC834BF14895A7B1496DFAB7162E40D60B41F8B57BF7511F3F0B0E09876409BEA22769EF1ECB38D0CB1AAEC41C2073B671C56)~~
# 东北大学
~~【报名截止:2022.6.24】[东北大学计算机科学与工程学院2022年优秀大学生学术夏令营活动](https://mp.weixin.qq.com/s?__biz=MzIwOTEzOTA1NQ==&mid=2650199430&idx=1&sn=4de51ae7f600cdc7bc5ac31ce25888fa&chksm=8f7a1186b80d9890c410b785e35602072297b1a13f98cad85794694b1dbb1384244444690085&mpshare=1&scene=23&srcid=06149fIdKHBxBcjJ9nNj8h30&sharer_sharetime=1655214359140&sharer_shareid=52095cdf584685215881244b250b339c#rd)~~
# 西北工业大学
~~【报名截止:2022.6.30】[西北工业大学计算机学院2022 年全国优秀大学生暑期夏令营招生简章](https://jsj.nwpu.edu.cn/info/1599/10502.htm)~~
~~【报名截止:2022.6.30】[网络空间安全学院2022年全国优秀大学生暑期夏令营招生简章](https://wlkjaqxy.nwpu.edu.cn/info/1044/2707.htm)~~
~~【报名截止:2022.6.30】[西北工业大学软件学院2022年全国优秀大学生暑期夏令营招生简章](https://ruanjian.nwpu.edu.cn/info/1054/4539.htm)~~
# 兰州大学
~~【报名截止:2022.6.5】[兰州大学信息科学与工程学院2022年优秀大学生暑期夏令营活动通知](http://xxxy.lzu.edu.cn/tongzhigonggao/2022/0509/195366.html)~~
# 华中师范大学
~~【报名截止:2022.6.20】[2022年华中师范大学人工智能教育学部“人工智能教育应用”创意课堂暨暑期夏令营招员通知](http://foaie.ccnu.edu.cn/info/1008/5250.htm)~~
~~【报名截止:2022.6.24】[华中师范大学计算机学院2022年优秀大学生暑期夏令营活动通知](http://cs.ccnu.edu.cn/info/1115/2369.htm)~~
# 北京交通大学
~~【报名截止:2022.6.24】[2022年北京交通大学计算机与信息技术学院全国优秀大学生暑期夏令营通知](http://scit.bjtu.edu.cn/cms/item/5000.html)~~
# 华东理工大学
~~【报名截止:2022.6.20】[【招生】华东理工大学信息科学与工程学院2022年全国大学生暑期夏令营通知](https://cise.ecust.edu.cn/2022/0526/c7692a144888/page.htm)~~
# 北京邮电大学
~~【报名截止:2022.6.24】[北京邮电大学2022年全国优秀大学生暑期夏令营通知](https://yzb.bupt.edu.cn/content/content.php?p=2_1_568)~~
# 南京邮电大学
~~【报名截止:2022.6.18】[南京邮电大学计算机学院、软件学院、网络空间安全学院夏令营安排及通知](http://cs.njupt.edu.cn/2022/0604/c9375a222432/page.htm)~~
~~【报名截止:2022.6.22】[南京邮电大学物联网学院关于举办2022年全国优秀大学生暑期夏令营的通知](https://ciot.njupt.edu.cn/2022/0602/c10653a222327/page.htm)~~
~~【报名截止:2022.7.1】[南京邮电大学自动化学院、人工智能学院关于举办2022年全国优秀大学生暑期夏令营的通知(线上)](http://coa.njupt.edu.cn/2022/0610/c2277a222705/page.htm)~~
# 湖南大学
~~【报名截止:2022.6.26】[湖南大学信息科学与工程学院2022年优秀大学生暑期夏令营活动通知](http://csee.hnu.edu.cn/info/1062/11982.htm)~~
# 中国海洋大学
~~【报名截止:2022.6.20】[关于举办2022年中国海洋大学信息学部“优秀大学生夏令营”活动的通知](https://it.ouc.edu.cn/2022/0518/c21608a370713/page.htm)~~
# 北京理工大学
~~【报名截止:2022.6.30】[2022年北京理工大学计算机学院暑期夏令营通知](https://cs.bit.edu.cn/tzgg/2ae26b14f88742b392f3a7760857441e.htm)~~
~~【报名截止:2022.7.3】[北京理工大学网络空间安全学院 2022年全国优秀大学生暑期夏令营招生简章](https://cst.bit.edu.cn/xxfw/tzgg/c5c6fb433b9c4a5a8d9a8d991c2d026b.htm)~~
# 深圳大学
~~【报名截止:2022.7.8】[首届深圳大学全国优秀大学生计算机夏令营(2023级)](https://mp.weixin.qq.com/s/HRkDcSwfDQGTuTsIcgKcnQ)~~
# 东南大学
~~【报名截止:2022.8.5】[东南大学网络空间安全学院2022年全国优秀大学生夏令营活动暨推免预选拔工作通知](https://cyber.seu.edu.cn/2022/0620/c18223a412213/page.htm)~~
~~【报名截止:2022.8.8】[东南大学计算机科学与工程学院2022年全国优秀大学生夏令营活动暨推免预选拔工作通知(第一批)](https://cse.seu.edu.cn/2022/0619/c24628a412171/page.htm)~~
~~【报名截止:2022.8.8】[东南大学软件学院2022年全国优秀大学生夏令营活动暨推免预选拔工作通知(第一批)](https://cose.seu.edu.cn/2022/0620/c18017a412259/page.htm)~~
# 致谢
**夏令营报名仓库、入营名单、预推免报名仓库主要由以下人员维护。感谢大家的支持!**
[@Ling-Hao (Evan) CHEN](https://github.com/LinghaoChan)、[@BoJack](https://github.com/ddlBoJack)、[@zengkaipeng](https://github.com/zengkaipeng)、[@Kevin Axel](https://github.com/KveinAxel)、[@Sumsky21](https://github.com/Sumsky21)、[@caposerenity](https://github.com/caposerenity)
# CSLabInfo2022
关于2022年**CS保研实验室/导师招生广告**的汇总请查看[CSLabInfo2022](https://github.com/zengkaipeng/CSLabInfo2022)。该仓库仅提供招生信息发布渠道,不负责验证这些信息的完整性、准确性、时效性,不保证使用这些信息而获得的结果。对于因信息内容可能与实际情况不一致而导致的任何正面或负面影响,仓库管理者亦不承担任何责任或义务,请各位自行辨别。
# 【注意】:本repo为非盈利项目,对具体内容不承担各项责任。
| 关于2022年CS保研夏令营通知公告的汇总。欢迎大家积极分享夏令营信息,资瓷一下互联网精神吼不吼啊? | null | 0 | 31 | 96 | 188 | 0 | 1 | 0 |
rust-cross/cargo-zigbuild | # cargo-zigbuild
[![CI](https://github.com/rust-cross/cargo-zigbuild/workflows/CI/badge.svg)](https://github.com/rust-cross/cargo-zigbuild/actions?query=workflow%3ACI)
[![Crates.io](https://img.shields.io/crates/v/cargo-zigbuild.svg)](https://crates.io/crates/cargo-zigbuild)
[![docs.rs](https://docs.rs/cargo-zigbuild/badge.svg)](https://docs.rs/cargo-zigbuild/)
[![PyPI](https://img.shields.io/pypi/v/cargo-zigbuild.svg)](https://pypi.org/project/cargo-zigbuild)
[![Docker Image](https://img.shields.io/docker/pulls/messense/cargo-zigbuild.svg?maxAge=2592000)](https://hub.docker.com/r/messense/cargo-zigbuild/)
> 🚀 Help me to become a full-time open-source developer by [sponsoring me on GitHub](https://github.com/sponsors/messense)
Compile Cargo project with [zig](https://github.com/ziglang/zig) as [linker](https://andrewkelley.me/post/zig-cc-powerful-drop-in-replacement-gcc-clang.html) for
[easier cross compiling](https://actually.fyi/posts/zig-makes-rust-cross-compilation-just-work/).
## Installation
```bash
cargo install cargo-zigbuild
```
You can also install it using pip which will also install [`ziglang`](https://pypi.org/project/ziglang/) automatically:
```bash
pip install cargo-zigbuild
```
We also provide a [Docker image](https://hub.docker.com/r/messense/cargo-zigbuild) which has macOS SDK pre-installed in addition to cargo-zigbuild and Rust,
for example to build for x86_64 macOS:
```bash
docker run --rm -it -v $(pwd):/io -w /io messense/cargo-zigbuild \
cargo zigbuild --release --target x86_64-apple-darwin
```
[![Packaging status](https://repology.org/badge/vertical-allrepos/cargo-zigbuild.svg?columns=4)](https://repology.org/project/cargo-zigbuild/versions)
## Usage
1. Install [zig](https://ziglang.org/) following the [official documentation](https://ziglang.org/learn/getting-started/#installing-zig),
on macOS, Windows and Linux you can also install zig from PyPI via `pip3 install ziglang`
2. Install Rust target via rustup, for example, `rustup target add aarch64-unknown-linux-gnu`
3. Run `cargo zigbuild`, for example, `cargo zigbuild --target aarch64-unknown-linux-gnu`
### Specify glibc version
`cargo zigbuild` supports passing glibc version in `--target` option, for example,
to compile for glibc 2.17 with the `aarch64-unknown-linux-gnu` target:
```bash
cargo zigbuild --target aarch64-unknown-linux-gnu.2.17
```
> [!NOTE]
> There are [various caveats](https://github.com/rust-cross/cargo-zigbuild/issues/231#issuecomment-1983434802) with the glibc version targeting feature:
> - If you do not provide a `--target`, Zig is not used and the command effectively runs a regular `cargo build`.
> - If you specify an invalid glibc version, `cargo zigbuild` will not relay the warning emitted from `zig cc` about the fallback version selected.
> - This feature does not necessarily match the behaviour of dynamically linking to a specific version of glibc on the build host.
> - Version 2.32 can be specified, but runs on a host with only 2.31 available when it should instead abort with an error.
> - Meanwhile specifying 2.33 will correctly be detected as incompatible when run on a host with glibc 2.31.
> - Certain `RUSTFLAGS` like `-C linker` opt-out of using Zig, while `-L path/to/files` will have Zig ignore `-C target-feature=+crt-static`.
> - `-C target-feature=+crt-static` for statically linking to a glibc version is **not supported** (_upstream `zig cc` lacks support_)
### macOS universal2 target
`cargo zigbuild` supports a special `universal2-apple-darwin` target for building macOS universal2 binaries/libraries on Rust 1.64.0 and later.
```bash
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-darwin
cargo zigbuild --target universal2-apple-darwin
```
> **Note**
>
> Note that Cargo `--message-format` option doesn't work with universal2 target currently.
## Caveats
1. Currently only Linux, macOS and Windows gnu targets are supported,
other target platforms can be added if you can make it work,
pull requests are welcome.
2. Only current Rust **stable** and **nightly** versions are regularly tested on CI, other versions may not work.
Known upstream zig [issues](https://github.com/ziglang/zig/labels/zig%20cc):
1. [zig cc: parse `-target` and `-mcpu`/`-march`/`-mtune` flags according to clang](https://github.com/ziglang/zig/issues/4911):
Some Rust targets aren't recognized by `zig cc`, for example `armv7-unknown-linux-gnueabihf`, workaround by using `-mcpu=generic` and
explicitly passing target features in [#58](https://github.com/rust-cross/cargo-zigbuild/pull/58)
2. [ability to link against darwin frameworks (such as CoreFoundation) when cross compiling](https://github.com/ziglang/zig/issues/1349):
Set the `SDKROOT` environment variable to a macOS SDK path to workaround it
3. [zig misses some `compiler_rt` functions](https://github.com/ziglang/zig/issues/1290) that may lead to undefined symbol error for certain
targets. See also: [zig compiler-rt status](https://github.com/ziglang/zig/blob/master/lib/compiler_rt/README.md).
4. [CPU features are not passed to clang](https://github.com/ziglang/zig/issues/10411)
## License
This work is released under the MIT license. A copy of the license is provided
in the [LICENSE](./LICENSE) file.
| Compile Cargo project with zig as linker | cargo-subcommand,zig,cross-compile | 84 | 18 | 132 | 543 | 18 | 2 | 2 |
reactplay/react-play | # ReactPlay(Repo: `react-play`)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-79-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->
<p align="center">
<a href="https://reactplay.io" target="_blank" style="font-size:50px"><img src="src/images/twitter-thumb.png" alt="react-play" width="125" /></a>
</p>
<h4 align="center">Learn . Create . Share about your ReactJS Development Journey</h4>
<p align="center">
<a href="https://github.com/reactplay/react-play/blob/master/LICENSE" target="blank">
<img src="https://img.shields.io/github/license/reactplay/react-play?style=flat-square" alt="react-play licence" />
</a>
<a href="https://github.com/reactplay/react-play/fork" target="blank">
<img src="https://img.shields.io/github/forks/reactplay/react-play?style=flat-square" alt="react-play forks"/>
</a>
<a href="https://github.com/reactplay/react-play/stargazers" target="blank">
<img src="https://img.shields.io/github/stars/reactplay/react-play?style=flat-square" alt="react-play stars"/>
</a>
<a href="https://github.com/reactplay/react-play/issues" target="blank">
<img src="https://img.shields.io/github/issues/reactplay/react-play?style=flat-square" alt="react-play issues"/>
</a>
<a href="https://github.com/reactplay/react-play/pulls" target="blank">
<img src="https://img.shields.io/github/issues-pr/reactplay/react-play?style=flat-square" alt="react-play pull-requests"/>
</a>
<a href="https://twitter.com/intent/tweet?text=👋%20Check%20this%20amazing%20app%20https://reactplay.io/,%20created%20by%20@tapasadhikary%20and%20friends%0A%0A%23DEVCommunity%20%23100DaysOfCode%20@reactplayio"><img src="https://img.shields.io/twitter/url?label=Share%20on%20Twitter&style=social&url=https%3A%2F%2Fgithub.com%2Freactplay%2Freact-play"></a>
</p>
<p align="center">
<a href="https://reactplay.io" target="blank">View Demo</a>
·
<a href="https://github.com/reactplay/react-play/issues/new/choose">Report Bug</a>
·
<a href="https://github.com/reactplay/react-play/issues/new/choose">Request Feature</a>
</p>
<p align="center">
<a href="https://gitpod.io/#https://github.com/reactplay/react-play">
<img
src="https://gitpod.io/button/open-in-gitpod.svg"
alt="Open in Gitpod"
/>
</a>
</p>
## 👋 Introducing ReactPlay
<p align="center">
<img src="src/images/og-image.png" alt="name"/>
</p>
`react-play` is an `open-source` web app that helps you learn ReactJS faster with a hands-on practice model. It is a collection of `ReactJS projects` that you can use to learn ReactJS.
Is that all? Nope. You can also create your projects and share them with the world. The best part is that the ReactJS experts will `review` your project code before it gets part of the `ReactPlay` app. Isn't that a pure WIN-WIN?
## 🔥 Demo
Here is the link to the app. We hope you enjoy it.
> [The ReactPlay app Link](https://reactplay.io)
Who doesn't want motivation and support? Many Thanks to all the Stargazers who have supported this project with stars(⭐). You all are amazing!!!
<a href="https://github.com/reactplay/react-play/stargazers">
<img src="https://git-lister.onrender.com/api/stars/reactplay/react-play?limit=25" alt="Stargazers repo roster for @reactplay/react-play" />
</a>
Please support the work by giving the repository a ⭐, contributing to it, and/or sponsoring using the `Sponsor` button at the top 😍. You can also follow us on Twitter [@reactplayio](https://twitter.com/reactplayio).
## 🏗️ How to Set up `ReactPlay` for Development?
You may want to set up the `react-play` repo for the following reasons:
- You want to create a new play (A play is a React project) or want to edit an existing play as a contributor. Please check the [Create a Play Guide](https://docs.reactplay.io/How-To-Guides/how-to-create-play) for more details. Also, please check the [Contribution Guide](./CONTRIBUTING.md) to get started.
- You want to contribute to the `react-play` repo in general. Please check the [Contribution Guide](./CONTRIBUTING.md) to get started.
Here is a quick overview of the `react-play` repo setup:
### 🍴 Fork and Clone the Repo
First, you need to fork the `react-play` repo. You can do this by clicking the `Fork` button on the top right corner of the repo. If you are new to forking, please watch this [YouTube Guide](https://www.youtube.com/watch?v=h8suY-Osn8Q) to get started.
Once forked, you can clone the repo by clicking the `Clone or Download` button on the top right corner of the forked repo.
Please change the directory after cloning the repository using the `cd <folder-name>` command.
> **Note:** Please do not remove the `.env.development` file from the root folder. It contains all the environment variables required for development.
### ⬇️ Install Dependencies
Next, install the dependencies by running the following command in the `react-play` repo. we recommend using `yarn` but you can install using `npm` too
```bash
yarn install
```
Or
```
npm install
```
if you don't have `yarn` installed on your PC, follow the steps below to install it..
**Windows**
1. open your command prompt as administrator.
2. write `corepack enable` and hit enter.
3. then `npm install --global yarn`
**Linux**
1. open terminal and hit `npm install --global yarn`
**MacOS**
1. open terminal and hit `npm install --global yarn`
or
`brew install yarn`
**Or Download Package**
If you are unable to install yarn following the above-mentioned process, then you can simply download the package and install it. Visit the official website of Yarn; there you can just expand the "Alternative" section and it will ask for the version to download for Windows, Linux, or Mac.
`https://classic.yarnpkg.com/en/docs/install#windows-stable`
> **Note**: `ReactPlay` runs on React 18. However, some of our dependencies are yet to upgrade to version 18. So please use the following command when you face difficulties installing the dependencies. Also, ensure to use Node.js version >= 16.x
```
npm install --legacy-peer-deps
```
### 🦄 Start the Development Mode
Use the following command to start the app in the development mode:
```bash
yarn start
```
or if you installed dependencies using ``npm`` use below command
```
npm start
```
**Note**: The `start` script automatically invokes "linters" process. Should you need to run the app without `lint` the use `start:nolint` instead.
However make sure that you run `start` script at least once before committing your code. Code with linter error may not be reviewed.
It runs the app in development mode. Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
The page will reload when you make changes. You may also see any lint errors in the console.
### ✨ Format and lint the code
Use the following command to format and lint the code:
#### Format the code
```bash
yarn run format
```
OR
```
npm run format
```
#### Lint the code
*to check the linting issue*
```bash
yarn run lint
```
OR
```
npm run lint
```
*to fix the linting issue*
```bash
yarn run lint:fix
```
OR
```
npm run lint:fix
```
### 🧱 Build the App for Production
Use the following command to build the app for production:
```bash
yarn build
```
OR
```
npm build
```
It builds the app for production to the `build` folder. It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.
--------------------------------------------------------------
### 🧪 Test App Locally (E2E with Playwright)
Use the following command to install browser(s) binaries to test locally:
```bash
yarn install playwright
```
OR
```
npm install playwright
```
Use the following command to run Playwright tests:
```bash
yarn e2e
```
OR
```
npm run e2e
```
👀 Read more about testing in [react-play](../react-play/e2e/README.md)
👀 Read more about playwright: https://playwright.dev/
--------------------------------------------------------------
### 🚀 Deploy
You can deploy the app to `Vercel` or `Netlify` with a single click.
<a href="https://vercel.com/new/project?template=https://github.com/reactplay/react-play">
<img src="https://vercel.com/button" height="37.5px" />
</a>
<a href="https://app.netlify.com/start/deploy?repository=https://github.com/reactplay/react-play">
<img src="https://www.netlify.com/img/deploy/button.svg" height="37.5px" />
</a>
## 🤝 Contributing to `ReactPlay`
Any kind of positive contribution is welcome! Please help us to grow by contributing to the project.
If you wish to contribute, you can,
- Create a Play
- Suggest a Feature
- Test the app, and help it improve.
- Improve the app, fix bugs, etc.
- Improve documentation.
- Create content about ReactPlay and share it with the world.
> Please read [`CONTRIBUTING`](CONTRIBUTING.md) for details on our [`CODE OF CONDUCT`](CODE_OF_CONDUCT.md), and the process for submitting pull requests to us.
🆕 New to Open Source? 💡 Follow this [guide](https://opensource.guide/how-to-contribute/) to jumpstart your Open Source journey 🚀.
## Launching reactplay Rewards
Contributed to reactplay? Here is a big thank you from our community to you.
Claim your badge and showcase them with pride.
Let us inspire more folks !
![reactplay Badges](https://aviyel.com/assets/uploads/rewards/share/project/43/512/share.png)
### **[Claim Now!](https://aviyel.com/projects/43/reactplay/rewards)**
## 🙏 Support
We all need support and motivation. `ReactPlay` is not an exception. Please give this project a ⭐️ to encourage and show that you liked it. Don't forget to leave a star ⭐️ before you move away.
If you found the app helpful, consider supporting us with a coffee.
<a href="https://www.buymeacoffee.com/greenroots">
<img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" height="50px">
</a>
---
<h3 align="center">
A ⭐️ to <b>ReactPlay</b> is to make us more 💪 stronger and motivated.
</h3>
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://tapasadhikary.com"><img src="https://avatars.githubusercontent.com/u/3633137?v=4?s=100" width="100px;" alt="Tapas Adhikary"/><br /><sub><b>Tapas Adhikary</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=atapas" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nirmalkc"><img src="https://avatars.githubusercontent.com/u/6359059?v=4?s=100" width="100px;" alt="Nirmal Kumar"/><br /><sub><b>Nirmal Kumar</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=nirmalkc" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://murtuzaali-surti.me"><img src="https://avatars.githubusercontent.com/u/68743212?v=4?s=100" width="100px;" alt="Murtuzaali Surti"/><br /><sub><b>Murtuzaali Surti</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=murtuzaalisurti" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/abhishek-gogroup"><img src="https://avatars.githubusercontent.com/u/87639443?v=4?s=100" width="100px;" alt="Abhishek Khatri"/><br /><sub><b>Abhishek Khatri</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=abhishek-gogroup" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://abhishek-90.github.io/My-Portfolio/"><img src="https://avatars.githubusercontent.com/u/43419831?v=4?s=100" width="100px;" alt="Abhishek Holani"/><br /><sub><b>Abhishek Holani</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Abhishek-90" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://hasnainmakada-99.github.io"><img src="https://avatars.githubusercontent.com/u/82728823?v=4?s=100" width="100px;" alt="Hasnain Makada"/><br /><sub><b>Hasnain Makada</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=hasnainmakada-99" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://twitter.com/shrilakshmihg"><img src="https://avatars.githubusercontent.com/u/29778698?v=4?s=100" width="100px;" alt="Shrilakshmi Shastry"/><br /><sub><b>Shrilakshmi Shastry</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=shrilakshmishastry" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/6km"><img src="https://avatars.githubusercontent.com/u/62352949?v=4?s=100" width="100px;" alt="Mohammed Taha"/><br /><sub><b>Mohammed Taha</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=6km" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://dalpatrathoredev.web.app"><img src="https://avatars.githubusercontent.com/u/69510006?v=4?s=100" width="100px;" alt="Dalpat Rathore"/><br /><sub><b>Dalpat Rathore</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=DalpatRathore" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://erayalkis.netlify.app"><img src="https://avatars.githubusercontent.com/u/80722863?v=4?s=100" width="100px;" alt="Eray Alkış"/><br /><sub><b>Eray Alkış</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=erayalkis" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://nirban-chakraborty.netlify.app"><img src="https://avatars.githubusercontent.com/u/74231771?v=4?s=100" width="100px;" alt="Nirban Chakraborty"/><br /><sub><b>Nirban Chakraborty</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=nirban256" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Deepak8717"><img src="https://avatars.githubusercontent.com/u/5671550?v=4?s=100" width="100px;" alt="Deepak Pundir"/><br /><sub><b>Deepak Pundir</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Deepak8717" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://bio.link/vasantisuthar"><img src="https://avatars.githubusercontent.com/u/63599802?v=4?s=100" width="100px;" alt="Vasanti Suthar"/><br /><sub><b>Vasanti Suthar</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=vasantisuthar" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://ahnaf.dev"><img src="https://avatars.githubusercontent.com/u/42427928?v=4?s=100" width="100px;" alt="Ahnaf Ahamed"/><br /><sub><b>Ahnaf Ahamed</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=AhnafAhamed" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://www.showwcase.com/shivam-katare"><img src="https://avatars.githubusercontent.com/u/91705825?v=4?s=100" width="100px;" alt="Shivam Katare"/><br /><sub><b>Shivam Katare</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Shivam-Katare" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Angryman18"><img src="https://avatars.githubusercontent.com/u/63530626?v=4?s=100" width="100px;" alt="Shyam Mahanta"/><br /><sub><b>Shyam Mahanta</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Angryman18" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://koustov.com"><img src="https://avatars.githubusercontent.com/u/7145967?v=4?s=100" width="100px;" alt="Koustov"/><br /><sub><b>Koustov</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=koustov" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Shriom-Trivedi"><img src="https://avatars.githubusercontent.com/u/32411707?v=4?s=100" width="100px;" alt="Shri Om Trivedi"/><br /><sub><b>Shri Om Trivedi</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Shriom-Trivedi" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/naiknareshh"><img src="https://avatars.githubusercontent.com/u/105363653?v=4?s=100" width="100px;" alt="Naresh Naik"/><br /><sub><b>Naresh Naik</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=naiknareshh" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/vincentBCP"><img src="https://avatars.githubusercontent.com/u/18364292?v=4?s=100" width="100px;" alt="Vincent Patoc"/><br /><sub><b>Vincent Patoc</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=vincentBCP" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://sachinchaurasiya.dev"><img src="https://avatars.githubusercontent.com/u/59080942?v=4?s=100" width="100px;" alt="Sachin Chaurasiya"/><br /><sub><b>Sachin Chaurasiya</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Sachin-chaurasiya" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tejinder-sharma"><img src="https://avatars.githubusercontent.com/u/95734921?v=4?s=100" width="100px;" alt="Tejinder Sharma"/><br /><sub><b>Tejinder Sharma</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=tejinder-sharma" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ishrarg"><img src="https://avatars.githubusercontent.com/u/3227841?v=4?s=100" width="100px;" alt="Ishrar G"/><br /><sub><b>Ishrar G</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=ishrarg" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://mohamed-ehab-portfolio.vercel.app/"><img src="https://avatars.githubusercontent.com/u/96921717?v=4?s=100" width="100px;" alt="Programming-School"/><br /><sub><b>Programming-School</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Programming-School-Pro-Coding" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/valeshgopal"><img src="https://avatars.githubusercontent.com/u/89742622?v=4?s=100" width="100px;" alt="Valesh Gopal"/><br /><sub><b>Valesh Gopal</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=valeshgopal" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://rafat97.github.io/"><img src="https://avatars.githubusercontent.com/u/21246862?v=4?s=100" width="100px;" alt="Emdadul Haque"/><br /><sub><b>Emdadul Haque</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Rafat97" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Asterisk-z"><img src="https://avatars.githubusercontent.com/u/56372709?v=4?s=100" width="100px;" alt="Olang Daniel"/><br /><sub><b>Olang Daniel</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Asterisk-z" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://supminn-neog.netlify.app/"><img src="https://avatars.githubusercontent.com/u/30731236?v=4?s=100" width="100px;" alt="Supriya M"/><br /><sub><b>Supriya M</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=supminn" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yung-coder"><img src="https://avatars.githubusercontent.com/u/94097778?v=4?s=100" width="100px;" alt="Saksham chandel"/><br /><sub><b>Saksham chandel</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=yung-coder" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://linkedin.com/in/luca-pizzini"><img src="https://avatars.githubusercontent.com/u/15077781?v=4?s=100" width="100px;" alt="Luca Pizzini"/><br /><sub><b>Luca Pizzini</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=lpizzinidev" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ShivamBhasin2002"><img src="https://avatars.githubusercontent.com/u/57500840?v=4?s=100" width="100px;" alt="Shivam Bhasin"/><br /><sub><b>Shivam Bhasin</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=ShivamBhasin2002" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://tejasshekar.netlify.app/"><img src="https://avatars.githubusercontent.com/u/68545229?v=4?s=100" width="100px;" alt="Tejas Shekar"/><br /><sub><b>Tejas Shekar</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=TejasShekar" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/anirban-pratihar-48a591226/"><img src="https://avatars.githubusercontent.com/u/82874704?v=4?s=100" width="100px;" alt="Anirban Pratihar"/><br /><sub><b>Anirban Pratihar</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Anirban-1490" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/harshsinghatz"><img src="https://avatars.githubusercontent.com/u/51085015?v=4?s=100" width="100px;" alt="Harsh Singh"/><br /><sub><b>Harsh Singh</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=harshsinghatz" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://frankiefab.com"><img src="https://avatars.githubusercontent.com/u/46662771?v=4?s=100" width="100px;" alt="Franklin U.O. Ohaegbulam"/><br /><sub><b>Franklin U.O. Ohaegbulam</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=frankiefab100" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ammaaraslam"><img src="https://avatars.githubusercontent.com/u/96367405?v=4?s=100" width="100px;" alt="Ammaar Aslam"/><br /><sub><b>Ammaar Aslam</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=ammaaraslam" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mayukh551"><img src="https://avatars.githubusercontent.com/u/82811112?v=4?s=100" width="100px;" alt="Mayukh Bhowmick"/><br /><sub><b>Mayukh Bhowmick</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=mayukh551" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://emmanueleboh.vercel.app"><img src="https://avatars.githubusercontent.com/u/63825997?v=4?s=100" width="100px;" alt="Emmanuel O Eboh"/><br /><sub><b>Emmanuel O Eboh</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=EOEboh" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://shailesh-parmar.netlify.app/"><img src="https://avatars.githubusercontent.com/u/71748675?v=4?s=100" width="100px;" alt="Shailesh Parmar"/><br /><sub><b>Shailesh Parmar</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=ShaileshParmar11" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dangvu0502"><img src="https://avatars.githubusercontent.com/u/57172125?v=4?s=100" width="100px;" alt="dangvu0502"/><br /><sub><b>dangvu0502</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=dangvu0502" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Ceesco"><img src="https://avatars.githubusercontent.com/u/104683015?v=4?s=100" width="100px;" alt="Ceesco"/><br /><sub><b>Ceesco</b></sub></a><br /><a href="#design-Ceesco" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Hat52"><img src="https://avatars.githubusercontent.com/u/44437268?v=4?s=100" width="100px;" alt="Hamza Ali"/><br /><sub><b>Hamza Ali</b></sub></a><br /><a href="#design-Hat52" title="Design">🎨</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yash91989201"><img src="https://avatars.githubusercontent.com/u/68579045?v=4?s=100" width="100px;" alt="yash91989201"/><br /><sub><b>yash91989201</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=yash91989201" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://makdoom.github.io"><img src="https://avatars.githubusercontent.com/u/28287599?v=4?s=100" width="100px;" alt="Makdoom Shaikh"/><br /><sub><b>Makdoom Shaikh</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=makdoom" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/muzaffar640"><img src="https://avatars.githubusercontent.com/u/55223302?v=4?s=100" width="100px;" alt="Muzaffar Hossain"/><br /><sub><b>Muzaffar Hossain</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=muzaffar640" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://bio.link/susmitadey"><img src="https://avatars.githubusercontent.com/u/79099734?v=4?s=100" width="100px;" alt="Susmita Dey"/><br /><sub><b>Susmita Dey</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Susmita-Dey" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/SSK-14"><img src="https://avatars.githubusercontent.com/u/45158568?v=4?s=100" width="100px;" alt="Sanjay Kumar"/><br /><sub><b>Sanjay Kumar</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=SSK-14" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://vinaypatil.netlify.app"><img src="https://avatars.githubusercontent.com/u/29520476?v=4?s=100" width="100px;" alt="Vinay Patil "/><br /><sub><b>Vinay Patil </b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Engineervinay" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/abhi-works"><img src="https://avatars.githubusercontent.com/u/115144059?v=4?s=100" width="100px;" alt="Abhilash"/><br /><sub><b>Abhilash</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=abhi-works" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/KashishLakhara04"><img src="https://avatars.githubusercontent.com/u/104296574?v=4?s=100" width="100px;" alt="Kashish Lakhara"/><br /><sub><b>Kashish Lakhara</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=KashishLakhara04" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/hiimnhan"><img src="https://avatars.githubusercontent.com/u/35358825?v=4?s=100" width="100px;" alt="hiimnhan"/><br /><sub><b>hiimnhan</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=hiimnhan" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://siddxharth.live"><img src="https://avatars.githubusercontent.com/u/67476171?v=4?s=100" width="100px;" alt="Siddharth Khatri"/><br /><sub><b>Siddharth Khatri</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=siddxharth" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://emmadawson.dev"><img src="https://avatars.githubusercontent.com/u/57045550?v=4?s=100" width="100px;" alt="Emma Dawson"/><br /><sub><b>Emma Dawson</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=EmmaDawsonDev" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/senali-d"><img src="https://avatars.githubusercontent.com/u/52546856?v=4?s=100" width="100px;" alt="Senali"/><br /><sub><b>Senali</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=senali-d" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nishasen"><img src="https://avatars.githubusercontent.com/u/43262505?v=4?s=100" width="100px;" alt="Nisha Sen"/><br /><sub><b>Nisha Sen</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=nishasen" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Harshil-Jani"><img src="https://avatars.githubusercontent.com/u/79367883?v=4?s=100" width="100px;" alt="Harshil Jani"/><br /><sub><b>Harshil Jani</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Harshil-Jani" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://olukaisaac.netlify.app/"><img src="https://avatars.githubusercontent.com/u/55724699?v=4?s=100" width="100px;" alt="Oluka Isaac"/><br /><sub><b>Oluka Isaac</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=tech-doctor" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/NagarjunShroff"><img src="https://avatars.githubusercontent.com/u/37444771?v=4?s=100" width="100px;" alt="NagarjunShroff"/><br /><sub><b>NagarjunShroff</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=NagarjunShroff" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/aks318"><img src="https://avatars.githubusercontent.com/u/41566374?v=4?s=100" width="100px;" alt="Aakash Vishwakarma"/><br /><sub><b>Aakash Vishwakarma</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=aks318" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ankitk26"><img src="https://avatars.githubusercontent.com/u/53444460?v=4?s=100" width="100px;" alt="Ankit Kumar"/><br /><sub><b>Ankit Kumar</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=ankitk26" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.linkedin.com/in/keerthivasand/"><img src="https://avatars.githubusercontent.com/u/64349912?v=4?s=100" width="100px;" alt="Keerthivasan D"/><br /><sub><b>Keerthivasan D</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=kd100100" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/bhtibrewal"><img src="https://avatars.githubusercontent.com/u/42600164?v=4?s=100" width="100px;" alt="Bhavika Tibrewal"/><br /><sub><b>Bhavika Tibrewal</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=bhtibrewal" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://abhipatelportfolio.netlify.app/"><img src="https://avatars.githubusercontent.com/u/76242769?v=4?s=100" width="100px;" alt="Abhi Patel"/><br /><sub><b>Abhi Patel</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=AbhiPatel10" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://aimun-nahar.vercel.app/"><img src="https://avatars.githubusercontent.com/u/96931784?v=4?s=100" width="100px;" alt="Aimun Nahar"/><br /><sub><b>Aimun Nahar</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=aimunhidden485" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/GodStarLord"><img src="https://avatars.githubusercontent.com/u/62302642?v=4?s=100" width="100px;" alt="GodStarLord"/><br /><sub><b>GodStarLord</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=GodStarLord" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/joeshajan"><img src="https://avatars.githubusercontent.com/u/69904519?v=4?s=100" width="100px;" alt="Joe Shajan"/><br /><sub><b>Joe Shajan</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=joeshajan" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/KMohZaid"><img src="https://avatars.githubusercontent.com/u/68484509?v=4?s=100" width="100px;" alt="MohZaid Kapadia"/><br /><sub><b>MohZaid Kapadia</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=KMohZaid" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/samvardhan777"><img src="https://avatars.githubusercontent.com/u/69216650?v=4?s=100" width="100px;" alt="Sam"/><br /><sub><b>Sam</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=samvardhan777" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/trishnakalita660"><img src="https://avatars.githubusercontent.com/u/54037204?v=4?s=100" width="100px;" alt="Trishna Kalita"/><br /><sub><b>Trishna Kalita</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=trishnakalita660" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/wyarejali"><img src="https://avatars.githubusercontent.com/u/57383423?v=4?s=100" width="100px;" alt="Wyarej Ali"/><br /><sub><b>Wyarej Ali</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=wyarejali" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/zulalnb"><img src="https://avatars.githubusercontent.com/u/33003721?v=4?s=100" width="100px;" alt="Zülal Nebin"/><br /><sub><b>Zülal Nebin</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=zulalnb" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nrshnaik"><img src="https://avatars.githubusercontent.com/u/25747434?v=4?s=100" width="100px;" alt="nrshnaik"/><br /><sub><b>nrshnaik</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=nrshnaik" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/FreemRL"><img src="https://avatars.githubusercontent.com/u/66525499?v=4?s=100" width="100px;" alt="Jannik Schmidtke"/><br /><sub><b>Jannik Schmidtke</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=freemrl" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/saddam-selise"><img src="https://avatars.githubusercontent.com/u/113901460?v=4?s=100" width="100px;" alt="Md. Saddam Hossain"/><br /><sub><b>Md. Saddam Hossain</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=saddam-selise" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/janvi01"><img src="https://avatars.githubusercontent.com/u/34344234?v=4?s=100" width="100px;" alt="Janvi Bajoria"/><br /><sub><b>Janvi Bajoria</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=janvi01" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://chhakuli-zingare.netlify.app/"><img src="https://avatars.githubusercontent.com/u/103095813?v=4?s=100" width="100px;" alt="Chhakuli Zingare"/><br /><sub><b>Chhakuli Zingare</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=chhakuli123" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://clevercoderjoy.bio.link"><img src="https://avatars.githubusercontent.com/u/74505057?v=4?s=100" width="100px;" alt="clevercoderjoy"/><br /><sub><b>clevercoderjoy</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=clevercoderjoy" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://priyank.live"><img src="https://avatars.githubusercontent.com/u/88102392?v=4?s=100" width="100px;" alt="Priyankar Pal"/><br /><sub><b>Priyankar Pal</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=priyankarpal" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Akshaygore1"><img src="https://avatars.githubusercontent.com/u/92959398?v=4?s=100" width="100px;" alt="Akshay Gore"/><br /><sub><b>Akshay Gore</b></sub></a><br /><a href="https://github.com/reactplay/react-play/commits?author=Akshaygore1" title="Code">💻</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!
| react-play is an opensource platform that helps you learn ReactJS faster with hands-on practice model. It is a collection of projects that you can use to learn ReactJS. | react,reactjs,javascript,react-hooks,open-source,opensource,hacktoberfest | 5 | 151 | 729 | 1,788 | 6 | 21 | 7 |
ACh-K/Cubic-11 | ![俐方體 1 Cropped](https://user-images.githubusercontent.com/98224334/150672562-738b36e4-35c1-40b4-a2e5-f14f28e7d4cb.png)
# 俐方體11號/Cubic 11
**俐方體11號**是基於 M⁺ gothic 12r 衍生的開源繁體中文點陣字型,可用於像素風格的遊戲以及美術當中。
## 特徵
### 字形調整
本字型以日文字型 M⁺ gothic 12r 為基礎替繁體中文進行修改與擴充,其中包括適用繁體中文的標點符號以及較符合臺灣習慣的字形等。![俐方體比較 (1) Cropped](https://user-images.githubusercontent.com/98224334/150676673-273f8c82-b9f4-4a76-ad97-5528c99905f6.png)
### 收錄字數
- 常用國字標準字體 4808 字。
- Big5 第一字面 5401 字。
- IICore 臺灣常用字 T1A、T2A 及部分 T2B。
- 臺客閩粵字。
- 注音符號。
- GB 2312 Level-1。
- 通用规范汉字表 一级。
- 元素週期表之所有元素字符。![俐方體週期表](https://user-images.githubusercontent.com/98224334/150678697-5067e177-3d7b-4c97-80dc-eb56020b54c4.png)
## 授權
- 本字型基於 SIL Open Font License 1.1 改造 M⁺ BITMAP FONTS 所發布的 M⁺ gothic 12r 開源字型。
- 本字型亦基於 SIL Open Font License 1.1 授權條款公開發布。關於授權合約的詳細內容,請詳讀授權文件檔(OFL.txt)。
- **Cubic**、**俐方體**為本專案的保留名稱。
- 任何人可以無償使用此字型,包含商用。無須告知原作者。
- 您可自由傳送、分享此字型,或與其他軟體綑綁發行、銷售。捆包中必須同時包含授權文件檔(OFL.txt)。
- 您可自由改造、衍生此字型並公開。修改後的字型必須同樣以 [SIL OFL](https://scripts.sil.org/OFL) 進行發布,勿使用字型的保留名稱。
- 依照 [SIL OFL](https://scripts.sil.org/OFL) 規定,**禁止單獨出售字型檔**。
## 下載方式
可至 [Releases](https://github.com/ACh-K/Cubic-11/releases) 下載最新版本。
## 問題回報
在使用本字型時遇到字型本身的問題的話,歡迎至 [Issues](https://github.com/ACh-K/Cubic-11/issues) 回報給我們!
若遇到缺字、補字的問題則可以至[缺字補字集中串](https://github.com/ACh-K/Cubic-11/issues/4)回報!
## 贊助管道
目前提供以下的贊助管道,有意願斗內的就拜託了 ;-; 感謝大家!
![贊助的部分](https://user-images.githubusercontent.com/98224334/151159873-8b97ca31-4ba1-4e43-abc7-e021b05e36e7.png)
| 免費開源的 11×11 中文點陣體 | font,chinese-fonts,pixel-font | 5 | 1 | 0 | 50 | 2 | 1 | 0 |
f0ng/captcha-killer-modified | # captcha-killer-modified 适配新版Burpsuite
## 原项目地址: https://github.com/c0ny1/captcha-killer
# [用法与常见报错](https://github.com/f0ng/captcha-killer-modified/blob/main/FAQ.md)
## 免责声明
该工具仅用于安全自查检测
由于传播、利用此工具所提供的信息而造成的任何直接或者间接的后果及损失,均由使用者本人负责,作者不为此承担任何责任。
本人拥有对此工具的修改和解释权。未经网络安全部门及相关部门允许,不得善自使用本工具进行任何攻击活动,不得以任何方式将其用于商业目的。
### 文章案例
>https://github.com/c0ny1/captcha-killer [插件源项目]
>
>https://gv7.me/articles/2019/burp-captcha-killer-usage/ [插件用法]
>
>https://github.com/sml2h3/ddddocr [验证码识别项目]
>
>https://github.com/PoJun-Lab/blaster [验证码登录爆破]
>
>https://www.cnblogs.com/4geek/p/17145385.html#!comments [captcha-killer-modified详细用法及部分问题解决方案(如验证码识别位数问题)]
交流群
<img width="389" alt="image" src="https://user-images.githubusercontent.com/48286013/204838629-e289f0fe-3bd8-4393-82ef-a2a19d7b7f4c.png">
二维码失效请加微信`f-f0ng`、备注captchakillermodified交流
关注主页公众号(only security),回复`captchakillermodified`获取下载地址】
### 提issue之前请说明如下字段:
1. burp版本
2. 启动burp的jdk版本
3. burp的Extender中Options配置的jdk版本
# 捐赠 (如果项目有帮助到您,可以选择捐赠一些费用用于captcha-killer-modified的后续版本维护,本项目长期维护)
<img width="251" alt="image" src="https://github.com/f0ng/autoDecoder/assets/48286013/5151b992-b98a-4cef-a6c7-e83e068eb363">
<img width="251" alt="image" src="https://github.com/f0ng/autoDecoder/assets/48286013/e9318b91-2521-4c14-93d8-9737fd7a4729">
# 赞助合作商
| | 赞助合作商 | 推荐理由 |
|------------------------------------------------------------|------------|--------------------------------------------------------------------------------------------------|
| ![YesCaptcha](https://cdn.wenanzhe.com/img/yescaptcha.png) | [YesCaptcha](https://yescaptcha.com/i/bmHz3C) | 谷歌reCaptcha验证码 / hCaptcha验证码 / funCaptcha验证码商业级识别接口 [点我](https://yescaptcha.com/i/bmHz3C) 直达VIP4 |
## 插件优化的地方
1. 修改了原项目中`sun.misc.BASE64Encoder`报错的问题
2. 优化了验证码`data:image`识别问题
3. 添加了ddddocr验证码识别库
4. 增加自定义关键词获取验证码
<img width="1439" alt="image" src="https://user-images.githubusercontent.com/48286013/159115886-7e482f8e-d36a-416a-8b67-c535e741d114.png">
<img src="https://user-images.githubusercontent.com/48286013/159009462-b028fb9f-05de-4c82-ae72-f576fa0adf8c.png" width="160" height="800" />
<img src="https://user-images.githubusercontent.com/48286013/159009480-b4dcb61e-7798-49cc-a118-dfd1e02ae592.png" width="115" height="650" />
识别成功率在85%左右。
具体修改请查看微信公众号文章
https://mp.weixin.qq.com/s/_P6OlL1xQaYSY1bvZJL4Uw
## 更新日志
【2022-3-21】 增加可识别情况,~~当出现关键字为B/base64时,进行验证码识别~~
【2022-3-24】 增加自定义关键字,删减锁定按钮
<img width="630" alt="image" src="https://user-images.githubusercontent.com/48286013/159827943-7ee4480c-b090-42e6-a5c7-485fc6fb500e.png">
<img width="614" alt="image" src="https://user-images.githubusercontent.com/48286013/159828004-821758a5-3626-4446-b951-0527377c8c14.png">
【2022-3-30】适配`data:image\/png`与base64中出现`\r\n`情况
<img width="627" alt="image" src="https://user-images.githubusercontent.com/48286013/160766851-c5b4a872-9be6-4afb-a547-1af843a1e101.png">
【2022-4-12】提升准确性,修改识别验证码端代码,主要修改如下:
1. 增加basic认证,方便部署在公网,使用`tmux`在后台运行即可
2. 对验证码识别部分进行修改,针对识别出来多位,可以进行自行删改,举例,如验证码是四位,但是ddddocr识别出来了五位,那么可以截取`text=ocr.classification(img_bytes)[0:4]`前四位;
如ddddocr对特定类验证码的识别中字母`O`与数字`0`识别混淆,可以进行替换`text=ocr.classification(img_bytes).replace("0","O")`
【2022-7-2】
1. 优化验证码对于base64的识别#10 ,原因在于base64编码中存在`\n`,`0.16`版本增加对`\n`的处理,感谢@DreamAndSun 师傅反馈
【2022-11-30】 0.17
1. 添加响应提取,针对获取验证码请求中有类似token字段,在登录包的同时需要token校验的情况,在需要token校验的字段使用`@captcha-killer-modified@`
<img width="650" alt="image" src="https://user-images.githubusercontent.com/48286013/204822669-7ea6022e-8028-4526-a653-03488a196d48.png">
2. 增加对验证码进行二次处理的案例(验证码为gif图,且验证码具体是在gif图的第二帧,无法直接识别),见[用法与常见报错](https://github.com/f0ng/captcha-killer-modified/blob/main/FAQ.md)
【2022-12-9】 0.18
1. 添加`@captcha@`参数替代验证码,方便在repeater参数内进行测试
<img width="804" alt="image" src="https://user-images.githubusercontent.com/48286013/206609271-5cc8bdcf-2141-4616-9a60-7ab9493f18c2.png">
【2022-12-14】 0.19
增加URL解码、过滤图片编码中的`.`
【2022-12-23】 0.20
修复了url识别问题、爆破顺序错乱问题、响应包直接为base64编码导致爆破失败问题
【2023-2-1】 0.21
- 增加默认验证码模板`ddddocr`,适配`codereg.py`
<img width="675" alt="image" src="https://user-images.githubusercontent.com/48286013/215937694-d494a9b9-0b31-4c5c-adf8-0cb24e60f43c.png">
- 增加识别结果关键字显示,方便查看关键字是否与验证码对应
<img width="493" alt="image" src="https://user-images.githubusercontent.com/48286013/215937812-f43d592e-170b-4fb0-86e4-2f34fc16bb0e.png">
【2023-2-10】 0.21-beta
- 优化验证码编码中的`\n`处理
- 优化`@captcha@`的判断方式
【2023-3-14】 0.22 重要问题修复
- 修复了装载插件会影响proxy选项卡的问题
【2023-3-28】 0.23
- 增加[验证码返回包中明文返回验证码爆破案例](https://github.com/f0ng/captcha-killer-modified/blob/main/FAQ.md#13-%E9%AA%8C%E8%AF%81%E7%A0%81%E5%93%8D%E5%BA%94%E5%8C%85%E6%9C%89%E6%98%8E%E6%96%87%E9%AA%8C%E8%AF%81%E7%A0%81%E5%A6%82%E4%BD%95%E9%85%8D%E5%90%88%E5%B7%A5%E5%85%B7%E4%BD%BF%E7%94%A8)
- base64编码中应对`fromUrlSafe`函数(`-`转义为`+`,`_`转义为`/`)
【2023-5-22】 0.24
- 修复验证码在intruder中无法显示的bug
- 再次修复了装载插件会影响proxy选项卡的问题
【2023-7-2】 0.24.1
- 修复加载插件影响intruder速度的问题(临时增加了一个按钮控制是否开启该插件)
<img width="642" alt="image" src="https://github.com/f0ng/captcha-killer-modified/assets/48286013/8c8132ac-dd38-494f-aa47-80b6db4a7c93">
【2023-9-15】 0.24.2
- 优化@captcha-killer-modified@关键字
【2023-12-5】 0.24.3
- 修复新版burp获取不到验证码问题
【2024-1-4】 0.24.4
- 服务端识别代码增加算术接口,可以进行算术验证码的识别
【2024-4-2】 0.24.5
1. 针对复杂算数验证码,进行训练获得模型,若有训练验证码的需求,可以联系作者代为训练,需捐赠,捐赠具体费用可以联系作者。这里取若依的验证码(默认配置)进行演示,测试了109个验证码,识别错误1个,准确率98%+
<img width="159" alt="image" src="https://github.com/f0ng/captcha-killer-modified/assets/48286013/077968b6-97ba-4366-baf9-ceba078020e7">
2. 添加两个接口,添加reg2【识别无混淆的四则运算,项目默认模板】、reg3模板【识别混淆变形的若依四则运算验证码,默认模板不支持,需额外捐赠,捐赠具体费用可以联系作者】
![f](https://starchart.cc/f0ng/captcha-killer-modified.svg)
| captcha-killer的修改版,支持关键词识别base64编码的图片,添加免费ocr库,用于验证码爆破,适配新版Burpsuite | burp-extensions,burp,burp-plugin | 26 | 1 | 0 | 111 | 1 | 1 | 0 |
kraanzu/smassh | ![SMASSH](imgs/smassh_banner.png)
# Smassh 🖮
Smassh is a TUI based typing test application inspired by MonkeyType \
-- A very popular online web-based typing application
Smassh tries to be a full fledged typing test experience but not missing
out on looks and feel!
[![GitHub issues](https://img.shields.io/github/issues/kraanzu/smassh?color=red&style=for-the-badge)](https://github.com/kraanzu/smassh/issues)
[![GitHub stars](https://img.shields.io/github/stars/kraanzu/smassh?color=green&style=for-the-badge)](https://github.com/kraanzu/smassh/stargazers)
[![GitHub license](https://img.shields.io/github/license/kraanzu/smassh?color=yellow&style=for-the-badge)](https://github.com/kraanzu/smassh/blob/main/LICENSE)
[![Support Server](https://img.shields.io/discord/989186205025464390.svg?label=Discord&logo=Discord&colorB=7289da&style=for-the-badge)](https://discord.gg/WA2ER9MBWa)
> [!CAUTION]
> Smassh, by default, uses [nerd fonts](https://www.nerdfonts.com/) for the icons
> If not installed, you'll see random gibberish icons
# Installation 🔨
## Using Pip 🐍
> You can install the stable version of smassh by using pip or [pipx](https://github.com/pypa/pipx)
```bash
pip install smassh
```
## Using AUR 📦
```
yay -S smassh-bin
```
### Executable binary 🔌
You should be able to see binaries for `Linux`, `mac` and `windows` in the [releases section](https://github.com/kraanzu/smassh/releases)
> [!NOTE]
> This should automatically create an executable `smassh` that can be directly run from command line \
> If not, check if the local path is added to `$PATH`
# Features 🌟
> Some features that smassh comes with:
- An interactive & beautiful UI
- Words and Time modes for typing
- Real-time comparison of speed carets
- Change styles/settings on the fly
- Mutliple theme support
- Mutliple language support
- Lots of options to tweak!
# Tweaks ⚙️
| Tweak | Description |
| --------------- | :--------------------------------------------------------------------------- |
| Blind mode | You wouldn't be able to see your mistakes |
| Capital Letters | Some letters in your tasks will be capitalized! |
| Caret Style | Caret style matters! |
| Confidence mode | Are you sure you don't need backspace? Try this :) |
| Cursor Buddy | Setup your cursor buddy to run along with you! |
| Difficulty | Choose how strict smassh should be with your wrong keypresses |
| Force Correct | You wouldn't be able to able to go on without cleaning your pool of mistakes |
| Min Accuracy | Fall below this average accuracy and you fail! |
| Min Burst | Fall below this average accuracy for even a word and you fail! |
| Min Speed | Fall below this average speed and you fail! |
| Tab Reset | Hey hey! You wanna reset already? I got ya! |
# Screenshots 🖼️
![github](imgs/preview.png)
# Contribution 🤝
See [CONTRIBUTING.md](CONTRIBUTING.md) for contributions
# Credits
[@frizd](https://github.com/frizd) for the awesome banner \
[@miodec](https://github.com/Miodec) for monkeytype!
# Other TUI projects 🤓 :
If you liked smassh then you might wanna try out some of my other TUI projects as well
- [dooit](https://github.com/kraanzu/dooit) - A todo app that you didn't ask for but needed!
- [gupshup](https://github.com/kraanzu/gupshup) - A localhost TUI chat client
| Smassh your Keyboard, TUI Edition | python3,tui,textual,rich,typing,typingspeedtest,typingspeed,terminal-based,monkeytype | 12 | 18 | 39 | 887 | 6 | 2 | 5 |
JingyunLiang/VRT | # VRT: A Video Restoration Transformer
[Jingyun Liang](https://jingyunliang.github.io), [Jiezhang Cao](https://www.jiezhangcao.com/), [Yuchen Fan](https://ychfan.github.io/), [Kai Zhang](https://cszn.github.io/), Rakesh Ranjan, [Yawei Li](https://ofsoundof.github.io/), [Radu Timofte](http://people.ee.ethz.ch/~timofter/), [Luc Van Gool](https://scholar.google.com/citations?user=TwMib_QAAAAJ&hl=en)
Computer Vision Lab, ETH Zurich & Meta Inc.
---
[arxiv](https://arxiv.org/abs/2201.12288)
**|**
[supplementary](https://github.com/JingyunLiang/VRT/releases/download/v0.0/VRT_supplementary.pdf)
**|**
[pretrained models](https://github.com/JingyunLiang/VRT/releases)
**|**
[visual results](https://github.com/JingyunLiang/VRT/releases)
[![arXiv](https://img.shields.io/badge/arXiv-Paper-<COLOR>.svg)](https://arxiv.org/abs/2201.12288)
[![GitHub Stars](https://img.shields.io/github/stars/JingyunLiang/VRT?style=social)](https://github.com/JingyunLiang/VRT)
[![download](https://img.shields.io/github/downloads/JingyunLiang/VRT/total.svg)](https://github.com/JingyunLiang/VRT/releases)
![visitors](https://visitor-badge.glitch.me/badge?page_id=jingyunliang/VRT)
[ <a href="https://colab.research.google.com/gist/JingyunLiang/deb335792768ad9eb73854a8efca4fe0#file-vrt-demo-on-video-restoration-ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="google colab logo"></a>](https://colab.research.google.com/gist/JingyunLiang/deb335792768ad9eb73854a8efca4fe0#file-vrt-demo-on-video-restoration-ipynb)
This repository is the official PyTorch implementation of "VRT: A Video Restoration Transformer"
([arxiv](https://arxiv.org/pdf/2201.12288.pdf), [supp](https://github.com/JingyunLiang/VRT/releases/download/v0.0/VRT_supplementary.pdf), [pretrained models](https://github.com/JingyunLiang/VRT/releases), [visual results](https://github.com/JingyunLiang/VRT/releases)). VRT achieves state-of-the-art performance in
- video SR (REDS, Vimeo90K, Vid4, UDM10) :heart_eyes: **+ 0.33~0.51dB** :heart_eyes:
- video deblurring (GoPro, DVD, REDS) :heart_eyes: **+ 1.47~2.15dB** :heart_eyes:
- video denoising (DAVIS, Set8) :heart_eyes: **+ 1.56~2.16dB** :heart_eyes:
- video frame interpolation (Vimeo90K, UCF101, DAVIS) :heart_eyes: **+ 0.28~0.45dB** :heart_eyes:
- space-time video SR (Vimeo90K, Vid4) :heart_eyes: **+ 0.26~1.03dB** :heart_eyes:
<!--
<p align="center">
<a href="https://github.com/JingyunLiang/VRT/releases">
<img width=40% src="assets/teaser_vsr.gif"/>
<img width=40% src="assets/teaser_vdb.gif"/>
<img width=40% src="assets/teaser_vdn.gif"/>
<img width=40% src="assets/teaser_vfi.gif"/>
<img width=40% src="assets/teaser_stvsr.gif"/>
</a>
</p>
-->
![Eg1](assets/teaser_vsr.gif)
![Eg2](assets/teaser_vdb.gif)
![Eg3](assets/teaser_vdn.gif)
![Eg4](assets/teaser_vfi.gif)
![Eg5](assets/teaser_stvsr.gif)
:rocket: :rocket: :rocket: **News**:
- **Oct. 4, 2022**: See the [Recurrent Video Restoration Transformer (RVRT, NeurlPS2022)](https://github.com/JingyunLiang/RVRT)[![GitHub Stars](https://img.shields.io/github/stars/JingyunLiang/RVRT?style=social)](https://github.com/JingyunLiang/RVRT) with more balanced model size, testing memory and runtime.
- **Jun. 15, 2022**: Add results on video frame interpolation and space-time video SR.
- **Jan. 26, 2022**: See our previous works on
| Topic | Title | Badge |
|:---:|:------:| :--------------------------: |
| transformer-based image restoration | [SwinIR: Image Restoration Using Swin Transformer](https://github.com/JingyunLiang/SwinIR):fire: | [![GitHub Stars](https://img.shields.io/github/stars/JingyunLiang/SwinIR?style=social)](https://github.com/JingyunLiang/SwinIR)[![download](https://img.shields.io/github/downloads/JingyunLiang/SwinIR/total.svg)](https://github.com/JingyunLiang/SwinIR/releases)[ <a href="https://colab.research.google.com/gist/JingyunLiang/a5e3e54bc9ef8d7bf594f6fee8208533/swinir-demo-on-real-world-image-sr.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="google colab logo"></a>](https://colab.research.google.com/gist/JingyunLiang/a5e3e54bc9ef8d7bf594f6fee8208533/swinir-demo-on-real-world-image-sr.ipynb) |
| real-world image SR | [Designing a Practical Degradation Model for Deep Blind Image Super-Resolution, ICCV2021](https://github.com/cszn/bsrgan) | [![GitHub Stars](https://img.shields.io/github/stars/cszn/BSRGAN?style=social)](https://github.com/cszn/BSRGAN) |
| normalizing flow-based image SR and image rescaling | [Hierarchical Conditional Flow: A Unified Framework for Image Super-Resolution and Image Rescaling, ICCV2021](https://github.com/JingyunLiang/HCFlow) | [![GitHub Stars](https://img.shields.io/github/stars/JingyunLiang/HCFlow?style=social)](https://github.com/JingyunLiang/HCFlow)[![download](https://img.shields.io/github/downloads/JingyunLiang/HCFlow/total.svg)](https://github.com/JingyunLiang/HCFlow/releases)[ <a href="https://colab.research.google.com/gist/JingyunLiang/cdb3fef89ebd174eaa43794accb6f59d/hcflow-demo-on-x8-face-image-sr.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="google colab logo"></a>](https://colab.research.google.com/gist/JingyunLiang/cdb3fef89ebd174eaa43794accb6f59d/hcflow-demo-on-x8-face-image-sr.ipynb) |
| blind image SR | [Mutual Affine Network for Spatially Variant Kernel Estimation in Blind Image Super-Resolution, ICCV2021](https://github.com/JingyunLiang/MANet) | [![GitHub Stars](https://img.shields.io/github/stars/JingyunLiang/MANet?style=social)](https://github.com/JingyunLiang/MANet)[![download](https://img.shields.io/github/downloads/JingyunLiang/MANet/total.svg)](https://github.com/JingyunLiang/MANet/releases)[ <a href="https://colab.research.google.com/gist/JingyunLiang/4ed2524d6e08343710ee408a4d997e1c/manet-demo-on-spatially-variant-kernel-estimation.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="google colab logo"></a>](https://colab.research.google.com/gist/JingyunLiang/4ed2524d6e08343710ee408a4d997e1c/manet-demo-on-spatially-variant-kernel-estimation.ipynb) |
| blind image SR | [Flow-based Kernel Prior with Application to Blind Super-Resolution, CVPR2021](https://github.com/JingyunLiang/FKP) | [![GitHub Stars](https://img.shields.io/github/stars/JingyunLiang/FKP?style=social)](https://github.com/JingyunLiang/FKP) |
---
> Video restoration (e.g., video super-resolution) aims to restore high-quality frames from low-quality frames. Different from single image restoration, video restoration generally requires to utilize temporal information from multiple adjacent but usually misaligned video frames. Existing deep methods generally tackle with this by exploiting a sliding window strategy or a recurrent architecture, which either is restricted by frame-by-frame restoration or lacks long-range modelling ability. In this paper, we propose a Video Restoration Transformer (VRT) with parallel frame prediction and long-range temporal dependency modelling abilities. More specifically, VRT is composed of multiple scales, each of which consists of two kinds of modules: temporal mutual self attention (TMSA) and parallel warping. TMSA divides the video into small clips, on which mutual attention is applied for joint motion estimation, feature alignment and feature fusion, while self-attention is used for feature extraction. To enable cross-clip interactions, the video sequence is shifted for every other layer. Besides, parallel warping is used to further fuse information from neighboring frames by parallel feature warping. Experimental results on three tasks, including video super-resolution, video deblurring and video denoising, demonstrate that VRT outperforms the state-of-the-art methods by large margins (up to 2.16 dB) on nine benchmark datasets.
<p align="center">
<img width="800" src="assets/framework.jpeg">
</p>
#### Contents
1. [Requirements](#Requirements)
1. [Quick Testing](#Quick-Testing)
1. [Training](#Training)
1. [Results](#Results)
1. [Citation](#Citation)
1. [License and Acknowledgement](#License-and-Acknowledgement)
## Requirements
> - Python 3.8, PyTorch >= 1.9.1
> - Requirements: see requirements.txt
> - Platforms: Ubuntu 18.04, cuda-11.1
## Quick Testing
Following commands will download [pretrained models](https://github.com/JingyunLiang/VRT/releases) and [test datasets](https://github.com/JingyunLiang/VRT/releases) **automatically** (except Vimeo-90K testing set). If out-of-memory, try to reduce `--tile` at the expense of slightly decreased performance.
You can also try to test it on Colab[ <a href="https://colab.research.google.com/gist/JingyunLiang/deb335792768ad9eb73854a8efca4fe0#file-vrt-demo-on-video-restoration-ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="google colab logo"></a>](https://colab.research.google.com/gist/JingyunLiang/deb335792768ad9eb73854a8efca4fe0#file-vrt-demo-on-video-restoration-ipynb), but the results may be slightly different due to `--tile` difference.
```bash
# download code
git clone https://github.com/JingyunLiang/VRT
cd VRT
pip install -r requirements.txt
# 001, video sr trained on REDS (6 frames), tested on REDS4
python main_test_vrt.py --task 001_VRT_videosr_bi_REDS_6frames --folder_lq testsets/REDS4/sharp_bicubic --folder_gt testsets/REDS4/GT --tile 40 128 128 --tile_overlap 2 20 20
# 002, video sr trained on REDS (16 frames), tested on REDS4
python main_test_vrt.py --task 002_VRT_videosr_bi_REDS_16frames --folder_lq testsets/REDS4/sharp_bicubic --folder_gt testsets/REDS4/GT --tile 40 128 128 --tile_overlap 2 20 20
# 003, video sr trained on Vimeo (bicubic), tested on Vid4 and Vimeo
python main_test_vrt.py --task 003_VRT_videosr_bi_Vimeo_7frames --folder_lq testsets/Vid4/BIx4 --folder_gt testsets/Vid4/GT --tile 32 128 128 --tile_overlap 2 20 20
python main_test_vrt.py --task 003_VRT_videosr_bi_Vimeo_7frames --folder_lq testsets/vimeo90k/vimeo_septuplet_matlabLRx4/sequences --folder_gt testsets/vimeo90k/vimeo_septuplet/sequences --tile 8 0 0 --tile_overlap 0 20 20
# 004, video sr trained on Vimeo (blur-downsampling), tested on Vid4, UDM10 and Vimeo
python main_test_vrt.py --task 004_VRT_videosr_bd_Vimeo_7frames --folder_lq testsets/Vid4/BDx4 --folder_gt testsets/Vid4/GT --tile 32 128 128 --tile_overlap 2 20 20
python main_test_vrt.py --task 004_VRT_videosr_bd_Vimeo_7frames --folder_lq testsets/UDM10/BDx4 --folder_gt testsets/UDM10/GT --tile 32 128 128 --tile_overlap 2 20 20
python main_test_vrt.py --task 004_VRT_videosr_bd_Vimeo_7frames --folder_lq testsets/vimeo90k/vimeo_septuplet_BDLRx4/sequences --folder_gt testsets/vimeo90k/vimeo_septuplet/sequences --tile 8 0 0 --tile_overlap 0 20 20
# 005, video deblurring trained and tested on DVD
python main_test_vrt.py --task 005_VRT_videodeblurring_DVD --folder_lq testsets/DVD10/test_GT_blurred --folder_gt testsets/DVD10/test_GT --tile 12 256 256 --tile_overlap 2 20 20
# 006, video deblurring trained and tested on GoPro
python main_test_vrt.py --task 006_VRT_videodeblurring_GoPro --folder_lq testsets/GoPro11/test_GT_blurred --folder_gt testsets/GoPro11/test_GT --tile 18 192 192 --tile_overlap 2 20 20
# 007, video deblurring trained on REDS, tested on REDS4
python main_test_vrt.py --task 007_VRT_videodeblurring_REDS --folder_lq testsets/REDS4/blur --folder_gt testsets/REDS4/GT --tile 12 256 256 --tile_overlap 2 20 20
# 008, video denoising trained on DAVIS (noise level 0-50), tested on Set8 and DAVIS
python main_test_vrt.py --task 008_VRT_videodenoising_DAVIS --sigma 10 --folder_lq testsets/Set8 --folder_gt testsets/Set8 --tile 12 256 256 --tile_overlap 2 20 20
python main_test_vrt.py --task 008_VRT_videodenoising_DAVIS --sigma 10 --folder_lq testsets/DAVIS-test --folder_gt testsets/DAVIS-test --tile 12 256 256 --tile_overlap 2 20 20
# 009, video frame interpolation trained on Vimeo (single frame interpolation), tested on Viemo, UCF101 and DAVIS-train
python main_test_vrt.py --task 009_VRT_videofi_Vimeo_4frames --folder_lq testsets/vimeo90k/vimeo_septuplet/sequences --folder_gt testsets/vimeo90k/vimeo_septuplet/sequences --tile 0 0 0 --tile_overlap 0 0 0
python main_test_vrt.py --task 009_VRT_videofi_Vimeo_4frames --folder_lq testsets/UCF101 --folder_gt testsets/UCF101 --tile 0 0 0 --tile_overlap 0 0 0
python main_test_vrt.py --task 009_VRT_videofi_Vimeo_4frames --folder_lq testsets/DAVIS-train --folder_gt testsets/DAVIS-train --tile 0 256 256 --tile_overlap 0 20 20
# 010, space-time video sr, using pretrained models from 003 and 009, tested on Vid4 and Viemo
# Please refer to 003 and 009
# test on your own datasets (an example)
python main_test_vrt.py --task 001_VRT_videosr_bi_REDS_6frames --folder_lq testsets/your/own --tile 40 128 128 --tile_overlap 2 20 20
```
**All visual results of VRT can be downloaded [here](https://github.com/JingyunLiang/VRT/releases)**.
## Training
The training and testing sets are as follows (see the [supplementary](https://github.com/JingyunLiang/VRT/releases) for a detailed introduction of all datasets). For better I/O speed, use [create_lmdb.py](https://github.com/cszn/KAIR/tree/master/scripts/data_preparation/create_lmdb.py) to convert `.png` datasets to `.lmdb` datasets.
Note: You do **NOT need** to prepare the datasets if you just want to test the model. `main_test_vrt.py` will download the testing set automaticaly.
| Task | Training Set | Testing Set | Pretrained Model and Visual Results of VRT |
|:-------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:| :---: |
| video SR (setting 1, BI) | [REDS sharp & sharp_bicubic](https://seungjunnah.github.io/Datasets/reds.html) (266 videos, 266000 frames: train + val except REDS4) <br /><br /> *Use [regroup_reds_dataset.py](https://github.com/cszn/KAIR/tree/master/scripts/data_preparation/regroup_reds_dataset.py) to regroup and rename REDS val set | REDS4 (4 videos, 400 frames: 000, 011, 015, 020 of REDS) | [here](https://github.com/JingyunLiang/VRT/releases) |
| video SR (setting 2 & 3, BI & BD) | [Vimeo90K](http://data.csail.mit.edu/tofu/dataset/vimeo_septuplet.zip) (64612 seven-frame videos as in `sep_trainlist.txt`) <br /><br /> * Use [generate_LR_Vimeo90K.m](https://github.com/cszn/KAIR/tree/master/scripts/matlab_scripts/generate_LR_Vimeo90K.m) and [generate_LR_Vimeo90K_BD.m](https://github.com/cszn/KAIR/tree/master/scripts/matlab_scripts/generate_LR_Vimeo90K_BD.m) to generate LR frames for bicubic and blur-downsampling VSR, respectively. | Vimeo90K-T (the rest 7824 7-frame videos) + [Vid4](https://drive.google.com/file/d/1ZuvNNLgR85TV_whJoHM7uVb-XW1y70DW/view) (4 videos) + [UDM10](https://www.terabox.com/web/share/link?surl=LMuQCVntRegfZSxn7s3hXw&path=%2Fproject%2Fpfnl) (10 videos) <br /><br /> *Use [prepare_UDM10.py](https://github.com/cszn/KAIR/tree/master/scripts/data_preparation/prepare_UDM10.py) to regroup and rename the UDM10 dataset | [here](https://github.com/JingyunLiang/VRT/releases) |
| video deblurring (setting 1, motion blur) | [DVD](http://www.cs.ubc.ca/labs/imager/tr/2017/DeepVideoDeblurring/DeepVideoDeblurring_Dataset.zip) (61 videos, 5708 frames) <br /><br /> *Use [prepare_DVD.py](https://github.com/cszn/KAIR/tree/master/scripts/data_preparation/prepare_DVD.py) to regroup and rename the dataset. | DVD (10 videos, 1000 frames) <br /><br /> *Use [evaluate_video_deblurring.m](https://github.com/cszn/KAIR/tree/master/scripts/matlab_scripts/evaluate_video_deblurring.m) for final evaluation. | [here](https://github.com/JingyunLiang/VRT/releases) |
| video deblurring (setting 2, motion blur) | [GoPro](http://data.cv.snu.ac.kr:8008/webdav/dataset/GOPRO/GOPRO_Large.zip) (22 videos, 2103 frames) <br /><br /> *Use [prepare_GoPro_as_video.py](https://github.com/cszn/KAIR/tree/master/scripts/data_preparation/prepare_GoPro_as_video.py) to regroup and rename the dataset. | GoPro (11 videos, 1111 frames) <br /><br /> *Use [evaluate_video_deblurring.m](https://github.com/cszn/KAIR/tree/master/scripts/matlab_scripts/evaluate_video_deblurring.m) for final evaluation. | [here](https://github.com/JingyunLiang/VRT/releases) |
| video deblurring (setting 3, motion blur) | [REDS sharp & blur](https://seungjunnah.github.io/Datasets/reds.html) (266 videos, 266000 frames: train & val except REDS4) <br /><br /> *Use [regroup_reds_dataset.py](https://github.com/cszn/KAIR/tree/master/scripts/data_preparation/regroup_reds_dataset.py) to regroup and rename REDS val set. Note that it shares the same HQ frames as in VSR. | REDS4 (4 videos, 400 frames: 000, 011, 015, 020 of REDS) | [here](https://github.com/JingyunLiang/VRT/releases) |
| video denoising (Gaussian noise) | [DAVIS-2017](https://data.vision.ee.ethz.ch/csergi/share/davis/DAVIS-2017-Unsupervised-trainval-480p.zip) (90 videos, 6208 frames) <br /><br /> *Use all files in DAVIS/JPEGImages/480p | [DAVIS-2017-test](https://github.com/JingyunLiang/VRT/releases) (30 videos) + [Set8](https://www.dropbox.com/sh/20n4cscqkqsfgoj/AABGftyJuJDwuCLGczL-fKvBa/test_sequences?dl=0&subfolder_nav_tracking=1) (8 videos: tractor, touchdown, park_joy and sunflower selected from DERF + hypersmooth, motorbike, rafting and snowboard from GOPRO_540P) | [here](https://github.com/JingyunLiang/VRT/releases) |
| video frame interpolation (single-frame interpolation) | [Vimeo90K](http://data.csail.mit.edu/tofu/dataset/vimeo_septuplet.zip) (64612 seven-frame videos as in `sep_trainlist.txt`) | Vimeo90K-T (the rest 7824 7-frame videos) + [UCF101](https://www.dropbox.com/s/dbihqk5deobn0f7/ucf101_extracted.zip?dl=0) (100 videos, 100 quintuples) + [DAVIS-2017](https://data.vision.ee.ethz.ch/csergi/share/davis/DAVIS-2017-Unsupervised-trainval-480p.zip) (90 videos, 6208 frames, 2849 quintuples) <br /><br /> *For DAVIS-2017, use all files in DAVIS/JPEGImages/480p | [here](https://github.com/JingyunLiang/VRT/releases) |
| space-time video SR | Not trained. Using pretrianed models 003 and 009. | Vimeo90K-T (the rest 7824 7-frame videos) + [Vid4](https://drive.google.com/file/d/1ZuvNNLgR85TV_whJoHM7uVb-XW1y70DW/view) (4 videos) <br /><br /> *Using fast/medium/slow splits in data/meta_info. | [here](https://github.com/JingyunLiang/VRT/releases) |
The training code is at [KAIR](https://github.com/cszn/KAIR).
## Results
We achieved state-of-the-art performance on video SR, video deblurring and video denoising. Detailed results can be found in the [paper](https://arxiv.org/abs/2201.12288).
Video Super-Resolution
<p align="center">
<img width="900" src="assets/vsr.jpeg">
<img width="900" src="assets/vsr_visual.jpeg">
</p>
Video Deblurring
<p align="center">
<img width="900" src="assets/vdb_dvd_gopro.jpeg">
<img width="900" src="assets/vdb_visual.jpeg">
<img width="350" src="assets/vdb_reds.jpeg">
</p>
Video Denoising
<p align="center">
<img width="350" src="assets/vdn.jpeg">
</p>
Video Frame Interpolation
<p align="center">
<img width="350" src="assets/vfi.jpeg">
</p>
Space-Time Video Super-Resolution
<p align="center">
<img width="350" src="assets/stvsr.jpeg">
</p>
## Citation
@article{liang2022vrt,
title={VRT: A Video Restoration Transformer},
author={Liang, Jingyun and Cao, Jiezhang and Fan, Yuchen and Zhang, Kai and Ranjan, Rakesh and Li, Yawei and Timofte, Radu and Van Gool, Luc},
journal={arXiv preprint arXiv:2201.12288},
year={2022}
}
## License and Acknowledgement
This project is released under the CC-BY-NC license. We refer to codes from [KAIR](https://github.com/cszn/KAIR), [BasicSR](https://github.com/xinntao/BasicSR), [Video Swin Transformer](https://github.com/SwinTransformer/Video-Swin-Transformer) and [mmediting](https://github.com/open-mmlab/mmediting). Thanks for their awesome works. The majority of VRT is licensed under CC-BY-NC, however portions of the project are available under separate license terms: KAIR is licensed under the MIT License, BasicSR, Video Swin Transformer and mmediting are licensed under the Apache 2.0 license.
| VRT: A Video Restoration Transformer (official repository) | transformer,video-restoration,low-level-vision,vision-transformer,video-super-resolution,video-deblurring,video-denoising,video-sr,super-resolution,sr | 1 | 1 | 3 | 15 | 25 | 1 | 0 |
pacexy/flow | <h1 align="center"><a href="https://flowoss.com">Flow - Open Source Software (OSS)</a></h1>
<h2 align="center">Redefine ePub reader</h2>
<p align="center">Free. Open source. Browser-based.</p>
<p align="center"><img src="apps/website/public/screenshots/en-US.webp"/>
</p>
## Features
- Grid layout
- Search in book
- Image preview
- Custom typography
- Highlight and Annotation
- Theme
- Share/Download book with link
- Data export
- Cloud storage
For planed features, see our [roadmap](https://pacexy.notion.site/283696d0071c43bfb03652e8e5f47936?v=b43f4dd7a3cb4ce785d6c32b698a8ff5).
## Development
### Prerequisites
- [Node.js](https://nodejs.org)
- [pnpm](https://pnpm.io/installation)
- [Git](https://git-scm.com/downloads)
### Clone the repo
```bash
git clone https://github.com/pacexy/flow
```
### Install the dependencies
```bash
pnpm i
```
### Setup the environment variables
Copy and rename all `.env.local.example`s to `.env.local` and setup the environment variables.
### Run the apps
```bash
pnpm dev
```
## Self-hosting
Before self-hosting, you should [setup the environment variables](#setup-the-environment-variables).
### Docker
You can use docker-compose:
```sh
docker compose up -d
```
Or build the image and run it manually:
```sh
docker build -t flow .
docker run -p 3000:3000 --env-file apps/reader/.env.local flow
```
## Contributing
There are many ways in which you can participate in this project, for example:
- [Submit bugs and feature requests](https://github.com/pacexy/flow/issues/new), and help us verify as they are checked in
- [Submit pull requests](https://github.com/pacexy/flow/pulls)
## Credits
- [Epub.js](https://github.com/futurepress/epub.js/)
- [React](https://github.com/facebook/react)
- [Next.js](https://nextjs.org/)
- [TypeScript](https://www.typescriptlang.org)
- [Vercel](https://vercel.com)
- [Turborepo](https://turbo.build/repo)
| Browser-based ePub Reader. | epub-reader,nextjs,react,reactjs,typescript,epub,reader,pwa | 0 | 4 | 54 | 367 | 51 | 5 | 0 |
wcb1969/iptv | null | tv | null | 0 | 1 | 4 | 770 | 9 | 1 | 0 |
ErickWendel/semana-javascript-expert06 | # Spotify Radio - JS Expert Week 6.0
Welcome to the sixth Javascript Expert Week. This is the starting code to start our journey.
Tag this project with a star 🌟
## Preview
<img src="./prints/demo.png" />
## Checklist Features
- Web API
- [ ] Must achieve 100% code coverage in tests
- [ ] Must have end to end tests validating all API routes
- [ ] Must deliver static files as Node.js Streams
- [ ] Must deliver music files as a Node.js Stream
- [ ] Given a disconnected user it should not break the API
- [ ] Even if multiple commands are fired at the same time, it should not break the API
- [ ] If an unexpected error occurs, the API should keep working
- [ ] The project needs to run on Linux, Mac and Windows environments
- Web App
- Client
- [ ] Must play the broadcast
- [ ] Shouldn't pause if any effects are added
- Controller
- [ ] Must achieve 100% code coverage in tests
- [ ] Must be able to start or stop a broadcast
- [ ] Must send commands to add audio effects to a stream
## Tasks per class
- Lesson 01: Cover service and route layers with unit tests and achieve 100% code coverage
- Lesson 02: Maintain 100% code coverage and implement e2e tests for the entire API
- Lesson 03: implement unit tests for the frontend and maintain 100% code coverage
- **PLUS**:
- [ ] provide a new effect
- [ ] add a new button on the controller
- [ ] add a new effect sound to the `audios/fx/` folder
- [ ] repost on heroku
## Source code for classes and solving challenges
- [Class01](./classes/class01/)
- [desafio-resolvido](./aulas/aula01-desafio-resolvido) and [page with 100% code coverage](https://erickwendel.github.io/semana-javascript-expert06/aulas/aula01-desafio-resolvido/coverage/lcov-report/index.html)
- [Class02](./classes/class02/)
- [desafio-resolvido](./aulas/aula02-desafio-resolvido) and [page with 100% code coverage](https://erickwendel.github.io/semana-javascript-expert06/aulas/aula02-desafio-resolvido/coverage/lcov-report/index.html)
- [Class03](./classes/class03/)
- [desafio-resolvido](./aulas/aula03-desafio-resolvido) and [page with 100% code coverage](https://erickwendel.github.io/semana-javascript-expert06/aulas/aula03-desafio-resolvido/coverage/lcov-report/index.html)
### Credits to the sources I've used on the demos
#### Streaming
- [English Conversation](https://youtu.be/ytmMipczEI8)
#### Effects
- [Applause](https://youtu.be/mMn_aYpzpG0)
- [Applause Audience](https://youtu.be/3IC76o_lhFw)
- [Boo](https://youtu.be/rYAQN11a2Dc)
- [Fart](https://youtu.be/4PnUfYhbDDM)
- [Laugh](https://youtu.be/TZ90IUrMNCo)
## FAQ
- `NODE_OPTIONS` is not a system recognized command, what to do?
- If you are on Windows, the way to create environment variables is different. You must use the word `set` before the command.
- Ex: ` "test": "set NODE_OPTIONS=--experimental-vm-modules && npx jest --runInBand",`
- I ran `npm test` but nothing happens, what to do?
- Check your Node.js version. We are using version 17. Go to [node.js website](https://nodejs.org) and download the latest version.
- `jest.spyOn` - when we try to use `function.name` (something like `stream.pipe.name`), it says the instance is undefined
- In this case, use the value as a string: `jest.spyOn(stream, "pipe").mockReturnValue`
- Challenge 01 impossible to complete 100% code coverage because [testUtil.js](./aulas/aula01/tests/unit/_util/testUtil.js) is not being fully used
- Add the following code snippet to the first line of the [testUtil.js](./aulas/aula01/tests/unit/_util/testUtil.js) file: `/* istanbul ignore file */` . This will make jest ignore this file and complete 100%.
- Important: this change will only serve to complete this first and/or second challenge, in the last class, we will not need to ignore this file since we will use all the functions
| JS Expert Week 6.0 Classes - Spotify Radio | nodejs,streams,audio,sox,spotify,javascript,jest,tests,e2e,unit | 0 | 2 | 4 | 21 | 0 | 1 | 0 |
riccardoperra/codeimage | ![CodeImage logo](assets/banner.png?raw=true)
> Create elegant code screenshots of your source code.
![Latest release Version](https://img.shields.io/badge/dynamic/json?color=success&label=Version&query=version&url=https%3A%2F%2Fraw.githubusercontent.com%2Friccardoperra%2Fcodeimage%2Fmain%2Fpackage.json)
![Build workflow badge](https://img.shields.io/github/actions/workflow/status/riccardoperra/codeimage/prod-deploy.yml?branch=main)
[![Issues](https://img.shields.io/github/issues/riccardoperra/codeimage)](https://github.com/riccardoperra/codeimage/issues)
[![Built with SolidJS](https://img.shields.io/badge/Built%20with-SolidJS-blue)](https://github.com/solidjs/solid)
[![Built with Vanilla Extract](https://img.shields.io/badge/Built%20with-Vanilla%20Extract-ff69b4)](https://github.com/seek-oss/vanilla-extract)
![License](https://img.shields.io/github/license/riccardoperra/codeimage)
## Introduction
[CodeImage](https://codeimage.dev) is the newest tool to help developers to create beautiful screenshots of their code,
providing several
features to speed up the process to post in social media.
<a href="https://www.producthunt.com/posts/codeimage?utm_source=badge-featured&utm_medium=badge&utm_souce=badge-codeimage" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/featured.svg?post_id=371306&theme=light" alt="CodeImage - A tool to manage and beautify your code screenshots | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
![CodeImage showcase](assets/showcase_1.png)
## 🤖 Tech stack
CodeImage architecture consist of a PNPM monorepo, currently subdivided in `packages` and `apps`.
### Apps
#### [@codeimage/app](./apps/codeimage)
The front-end application, entirely built with SolidJS.
It currently also relies on these libraries:
- [vanilla-extract](https://github.com/seek-oss/vanilla-extract): Zero-runtime Stylesheets-in-TypeScript.
- [CodeMirror6](https://codemirror.net/6/): Extensible code editor
- [StateBuilder](https://github.com/riccardoperra/statebuilder): Composable state management
- [@codeui/kit](https://github.com/riccardoperra/codeui): Accessible UI Kit based
on [Kobalte](https://github.com/kobaltedev/kobalte)
- [solid-primitives](https://github.com/solidjs-community/solid-primitives): SolidJS primitives library
#### [@codeimage/api](./apps/api)
The REST API layer built with [Fastify](https://github.com/fastify/fastify),
[Prisma ORM](https://github.com/prisma/prisma) and [Auth0](https://auth0.com/).
### Packages
- [@codeimage/ui](./packages/ui): contains the source code of the UI kit of CodeImage front-end application.
> **Note** the UI kit is being moved to [@codeui/kit](https://github.com/riccardoperra/codeui) repository
- [@codeimage/config](./packages/config): contains the base configurations and interfaces for CodeImage
- [@codeimage/highlight](./packages/highlight): contains the custom editor and highlighting themes for CodeMirror
- [@codeimage/dom-export](./packages/dom-export): contains the [html-to-image](https://github.com/bubkoo/html-to-image)
fork which includes several fix for image export
- [@codeimage/locale](./packages/locale): contains a wrapper
of [@solid-primitives/i18n](https://github.com/solidjs-community/solid-primitives/tree/main/packages/i18n) which
includes strict typing for i18n
- [@codeimage/vanilla-extract](./packages/vanilla-extract): contain
the [Vanilla Extract](https://github.com/seek-oss/vanilla-extract) plugin fork which includes SolidJS and PNPM fixes
to work under monorepo.
- [@codeimage/prisma-models](./packages/prisma-models): contains the Prisma ORM backend models shared across front-end
and back-end application.
- [@codeimage/atomic-state](./packages/atomic-state): contain the source code of a small state manager which includes
some utilities helper for RxJS and solid-js/store
## 🌏 Contributions
> **Warning** **Read this before opening any PR!**
When contributing, it's better to first discuss the change you wish to make via issue or discussion, or any other method
with the owners of this repository before making a change.
See the [CONTRIBUTING.md](./CONTRIBUTING.md) guide for more details.
---
<p align="left">
<img src="https://user-images.githubusercontent.com/37072694/168666273-22af1fed-6ee5-49a5-be2a-6e0b9da998cf.png" width="600">
</p>
<p align="left">
CodeImage is the winner of <a href="https://hack.solidjs.com">SolidHack 2022</a> for the Best Application category!
</p>
## License
MIT © [Riccardo Perra](https://github.com/riccardoperra)
| A tool to beautify your code screenshots. Built with SolidJS and Fastify. | solid-js,solid,code,editor,screenshot,snippets,tweet,sharing,codesnippets,beautiful | 52 | 14 | 403 | 1,540 | 9 | 12 | 3 |
tnballo/high-assurance-rust | <br><p align="center"><img src="https://github.com/tnballo/high-assurance-rust/blob/3ea7daa046daaac303107598e26232ea7e08bbd3/img/har_logo.svg" width="333" alt="High Assurance Rust"></p><br>
# High Assurance Rust
[![Pages](https://img.shields.io/badge/Pages-178-purple.svg)](https://github.com/tnballo/high-assurance-rust)
[![Diagrams](https://img.shields.io/badge/Diagrams-51-blue.svg)](https://github.com/tnballo/high-assurance-rust)
[![Price](https://img.shields.io/badge/Price-$0.00-orange.svg)](https://highassurance.rs/cfp.html)
[![Text License: CC BY-NC-ND 4.0](https://img.shields.io/badge/Text%20License-CC%20BY--NC--ND%204.0-yellow.svg)](https://highassurance.rs/license.html)
[![Code License: MIT](https://img.shields.io/badge/Code%20License-MIT-yellowgreen.svg)](https://highassurance.rs/license.html)
[![Assurance](https://img.shields.io/badge/Assurance-High-brightgreen.svg)](https://highassurance.rs)
### Click here to read now: [https://highassurance.rs/](https://highassurance.rs/)
#### What does this book aim to do?
1. Provide an accessible but principled introduction to developing secure and robust systems. At the overlap of "state-of-the-art" and "near-term practical": mostly production-grade tools and techniques, but also some cutting-edge research projects. All open-source.
2. Help experienced developers both learn a new language and delve deeper into fundamental Computer Science and Computer Architecture topics.
#### How can I help?
If you find this content valuable, consider increasing its visibility among developers by starring this GitHub repo.
Much appreciated! :)
To cite this book directly in your own work, please use this BibTeX or similar:
```
@misc{high_assurance_rust,
title={High Assurance Rust: Developing Secure and Robust Software},
url={https://highassurance.rs},
howpublished = "\url{https://highassurance.rs}",
author={Ballo, Tiemoko and Ballo, Moumine and James, Alex},
year={2022}
}
```
#### Interested in a physical print?
Please [sign up here](https://forms.gle/ESYgXgswCjEoCSHT9) if you'd like to be notified when the book is finished and hard copies are available.
The email you provide not be shared or used for any other purpose.
#### Have feedback or questions?
Your input matters.
We'd love to hear from you, please send an email to:
<a href="mailto:contact@highassurance.rs">**contact@highassurance.rs**</a>
#### Can I contribute?
Contributions are welcome and appreciated.
Please see [`CONTRIBUTING.md`](./CONTRIBUTING.md).
#### Anything else I should know?
A great deal of effort went into making this book a reality.
We hope you have as much fun reading as we did writing.
Let's hack together!
| A free book about developing secure and robust systems software. | rust,security,reliability,systems-programming,book | 0 | 15 | 35 | 187 | 5 | 2 | 0 |
VegaBobo/DSU-Sideloader | # DSU Sideloader
A simple app made to help users easily install GSIs via DSU's Android feature.
<div>
<img src="https://raw.githubusercontent.com/VegaBobo/DSU-Sideloader/master/other/preview_1.png" alt="preview" width="200"/>
<img src="https://raw.githubusercontent.com/VegaBobo/DSU-Sideloader/master/other/preview_2.png" alt="preview" width="200"/>
</div>
## Requirements
- Android 10 or higher
- Unlocked Bootloader
- Device with Dynamic Partitions
- A GSI you want to use!
Community GSIs: https://github.com/phhusson/treble_experimentations/wiki/Generic-System-Image-%28GSI%29-list
Google GSIs: https://developer.android.com/topic/generic-system-image/releases
**Remember to use GSIs compatible with your architeture, vndk implementation..*
## Downloads
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
alt="Get it on F-Droid"
height="80">](https://f-droid.org/packages/vegabobo.dsusideloader/)
Or download the latest APK from the [Releases Section](https://github.com/VegaBobo/DSU-Sideloader/releases/latest).
For testing builds, you can check artifacts at [Actions](https://github.com/VegaBobo/DSU-Sideloader/actions) tab
## How to use?
1. Install app
2. When opening for the first time, you need to give read/write permission to a folder, create a new folder and allow access
**this folder will be used to store temporary files, like extracted GSIs from compressed files)*
3. Select a GSI to install
**accepted formats are: gz, xz, img and zip (only DSU packages)
4. You can customize installation as you want
**like changing userdata size for dynamic system*
**changing gsi file size is not recommended (let app do it automatically)*
5. Tap on "Install"
6. Wait until finishes! (it may take a some time)
7. Once it finishes, next step may vary:
- If built-in installer is enabled, no extra step is required.
- When built-in installer is disabled, on rooted/system/shizuku operation mode, DSU screen will appear, prompting you to confirm installation, after that, check your notifications, DSU should start installing GSI.
- On ADB operation mode, you will be prompted to run a command in adb, once you run, DSU screen will appear asking you to confirm installation, after that, DSU should start installing GSI.
8. Once dynamic system is ready, you can boot it through notifications, or, if operation mode is supported, directly from our app.
For more usage information, you can check [Operation modes](#operation-modes)
## Operation modes
DSU Sideloader support multiple operation modes, they will define how our app will work, also, the operation mode is obtained automatically, and by now, is impossible to change it manually, the picked operation mode will be the best available (the priority is written below, in which, the most feature supported, is the highest number, and the most basic one is the lowest).
1. ADB: Default operation mode when other modes aren't available
- Only prepare selected image to be installed via DSU system-app
- Requires adb command to start installation (which will invoke DSU system-app to install the prepared file)
2. Shizuku: When running app with Shizuku (Obtained when Shizuku permission is granted)
- Same as ADB, however, it does not require to run any adb command
- Support tracking installation progress ¹ ² ³
- Support installation diagnostics (if a common error is detected, it may give you useful information) ¹ ³
3. Root: When running app with root permissions (Obtained when user grant root permission)
- All features avaiable in Shizuku, however, does not require any special permissions
- DynamicSystem API features (check if DSU is installed, reboot to DSU, discard..., everthing directly from app)
- Support built-in DSU installer ⁴ ⁵
4. System mode: When running as system-app (Obtained by installing our Magisk module)
- All features avaiable in Shizuku
- Fixes for some common gsi/dsu-related SELinux denials
- Custom gsid binary (can fix some installation errors in some devices ⁵ ⁶
5. System/Root mode: When running as system-app with granted root permission (Obtained by installing our Magisk module and granting root permission)
- All features available in root and system operation mode
¹ Requires READ_LOGS permission.
<br>
² Partital support on Android 10 and 11.
<br>
³ Android 13 requires "One-time log access".
<br>
⁴ Feature not supported on Android 10.
<br>
⁵ Experimental feature, built-in installer code is [here](https://github.com/VegaBobo/DSU-Sideloader/blob/master/app/src/main/java/vegabobo/dsusideloader/installer/root/DSUInstaller.kt).
<br>
⁶ Module including custom gsid binary is optional, changes made to AOSP gsid binary can be found [here](https://github.com/VegaBobo/DSU-Sideloader/tree/master/magisk-module/src/main/resources/aosp_patches).
#### Recomendations
- For non-rooted devices, Shizuku is a pretty nice operation mode, it support most features with no hassle, however, you need to install and setup [Shizuku](https://play.google.com/store/apps/details?id=moe.shizuku.privileged.api) app in your device.
- For rooted devices, Root operation mode is more than ok for most people.
- If you're having issues with DSU feature, go with System/Root.
- Rooted devices via Magisk, should be running Magisk v24 or higher, older versions may break DSU feature.
- We highly recommend using this app with Stock ROM, some Custom ROM builds may also work fine.
## Common questions
1. DSU installation finishes with no errors, but device doesn't boot into installed DSU, what should i do?
- It is likely that AVB is preventing device from booting installed images, try flashing disabled vbmeta, check [this](https://developer.android.com/topic/generic-system-image#flash-gsi) for more info.
2. Why isn't possible to set a high userdata value?
- The more storage you have free, the more you can use to be your userdata, some Android versions limit the maximum allowed for allocation (this limitation is 40%, and is not our app limitation, it is a thing from Android itself, you can use our custom gsid binary, which reduces this limitation to 20%, is possible to eliminate it, but no clue if there is some implications, so, i just decided to decrease it).
3. Why "Unmount SD" option exists?
- If available, DSU priorizes allocation in sdcard, but allocating in sdcard is not supported in some cases (it may depends on filesystem present on sd, and if the allocation in SD is allowed by OS itself), since allocating in SD may cause installation errors in some devices, that options is here to enforce allocation in device storage.
4. Why built-in installer requires root?
- Because it uses Android's internal DynamicSystem API, which requires "MANAGE_DYNAMIC_SYSTEM", which is a signature protection level, the convenient way to circumvent it, is by using root. shell (2000) has "INSTALL_DYNAMIC_SYSTEM", which is able to call DSU system-app (this one has "MANAGE_DYNAMIC_SYSTEM") to install images.
5. How about updates?
- Our app comes with a updater, you can check updates in "About" section.
6. Other question? problem?
- Feel free to start a issue, for troubleshooting, don't forget to send logs (logs can be obtained on installation phase, directly on app, when operation mode support installation diagnostics).
## About DSU
DSU (Dynamic System Updates), is a feature introduced on Android 10, that let developers boot GSIs without touching current system partition, this is done by creating new partitions to hold a GSI and a separated userdata, to boot on them when desired.
Unfortunelly, DSU depends on Dynamic Partitions (your device need to support, otherwise, won't work), and most GSIs requires unlocked bootloader to get them booting properly (since only OEM-Signed GSIs are allowed to boot on locked bootloader).
GSIs can be installed via DSU without root access, using ADB, running some commands, you can read more about installation process here: https://developer.android.com/topic/dsu
Once installation finishes, Android creates a persistent notification allowing you to boot into "Dynamic System" (GSI installed via DSU), and you can boot into installed GSI, without touching your system partition, or breaking the "real userdata" partition.
After booting Dynamic System, you can try and test whatever you want, when you need to switch back to device's original system image, everything you need to do, is just, a simple reboot!
When doing a long test, that may requires lots of reboots, this can be a pain, however, is possible to enable "sticky mode", that enforces dynamic system, instead of device's original system image, once tests are done, you can disable sticky mode and return to original system image.
That is basically a quickly explanation about DSU, a amazing feature, like a "dual-boot" solution, limited, however, very safe (since no read-only partition will be modified, and if GSI does not boot, just a simple reboot will return you to the original device's system image).
You can read more about DSU here: https://source.android.com/devices/tech/ota/dynamic-system-updates
## How to enable Sticky Mode?
Reboot to Dynamic System, and:
- use this command on adb: `adb shell gsi_tool enable`
- or from local adb shell: `gsi_tool enable`
- or from local rooted shell (eg. Termux on rooted GSI): `su -c 'gsi_tool enable'`
When sticky mode is enabled, device will always boot into dynamic system, instead of device's original system image.
To disable, use the same command, instead of `enable` , use `disable`
## Other
For translators, we now have a Crowdin, feel free send your translations:
<br>https://crowdin.com/translate/dsu-sideloader/<br>
App icon made by [WSTxda](https://github.com/WSTxda)
| A simple app made to help users easily install GSIs via DSU's Android feature. | null | 7 | 9 | 14 | 211 | 67 | 2 | 1 |
pomsky-lang/pomsky | <div align="center">
![Pomsky logo](https://raw.githubusercontent.com/pomsky-lang/pomsky/main/assets/logo.svg)
# Pomsky
A portable<sup><a href="#portability">1</a></sup>, modern regular expression language
[![Website][web-badge]][web-link] [![Docs][doc-badge]][doc-link] [![Playground][playground-badge]][playground-link] [![VS Code plugin][vscode-badge]][vscode-link] [![Discord][discord-badge]][discord-link] [![Crates.io][crates-badge]][crates-link]
</div>
[web-badge]: https://img.shields.io/badge/website-%23e70?style=for-the-badge&logo=esri
[web-link]: https://pomsky-lang.org
[doc-badge]: https://img.shields.io/badge/docs-%23b90?style=for-the-badge&logo=read.cv
[doc-link]: https://pomsky-lang.org/docs/get-started/introduction/
[playground-badge]: https://img.shields.io/badge/Playground-%232a2?style=for-the-badge&logo=asciinema
[playground-link]: https://playground.pomsky-lang.org
[vscode-badge]: https://img.shields.io/badge/VS%20Code%20plugin-blue?style=for-the-badge&logo=visualstudiocode
[vscode-link]: https://marketplace.visualstudio.com/items?itemName=pomsky-lang.pomsky-vscode
[discord-badge]: https://img.shields.io/badge/discord-%2355d?style=for-the-badge&logo=discord&logoColor=%23fff
[discord-link]: https://discord.gg/uwap2uxMFp
[crates-badge]: https://img.shields.io/crates/v/pomsky-bin?style=for-the-badge&color=red
[crates-link]: https://crates.io/crates/pomsky-bin
[test-badge]: https://github.com/pomsky-lang/pomsky/actions/workflows/test.yml/badge.svg
[test-link]: https://github.com/pomsky-lang/pomsky/actions/workflows/test.yml
[coverage-badge]: https://coveralls.io/repos/github/pomsky-lang/pomsky/badge.svg?branch=main
[coverage-link]: https://coveralls.io/github/pomsky-lang/pomsky?branch=main
## Get Started
To begin, check out [the website][web-link].
## What's New
Read the [blog](https://pomsky-lang.org/blog/) or the [changelog](./CHANGELOG.md) to learn about new features.
## Installation
Pre-built binaries can be found on the [releases page](https://github.com/pomsky-lang/pomsky/releases).
Pomsky can also be installed from source via [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) with `cargo install pomsky-bin`.
## Compatibility
Pomsky is currently compatible with PCRE, JavaScript, Java, .NET, Python, Ruby and Rust. The regex
flavor must be specified during compilation, so Pomsky can ensure that the produced regex works as
desired on the targeted regex engine.
**Note**: You should enable Unicode support in your regex engine, if it isn't enabled by default.
This is [explained here][enable-unicode].
## Portability
Pomsky aims to be as portable as possible, polyfilling Unicode and unsupported features where feasible. That said, there are some cases where portability is not possible:
- Some features (e.g. lookaround, backreferences, Unicode properties) aren't supported in every flavor. Pomsky fails to compile when you're using an unsupported feature.
- `\b` (word boundaries) are not Unicode aware in JavaScript. Pomsky therefore only allows word boundaries when Unicode is disabled.
- `\w` in .NET handles Unicode incorrectly, with no way to polyfill it properly. This means that in .NET, `[word]` only matches the `L`, `Mn`, `Nd`, and `Pc` general categories, instead of `Alphabetic`, `M`, `Nd`, `Pc` and `Join_Control`.
- In .NET, `.`, `Codepoint` and character classes (e.g. `[Latin]`) only match a single UTF-16 code unit rather than a codepoint.
- `[space]` matches slightly different code points in JavaScript than in Java. This will be fixed.
- Backreferences behave differently in JavaScript and Python when the referenced group has no captured text. There is nothing we can do about it, but we could add a warning for this in the future.
## Security
**Never compile or execute an untrusted Pomsky expression on your critical infrastructure**.
This may make you vulnerable for denial of service attacks, like the
[Billion Laughs attack][billion-lols].
[Read more][security]
## Diagnostics
Pomsky looks for mistakes and displays helpful diagnostics:
- It shows an error if you use a feature not supported by the targeted regex flavor
- It detects syntax errors and shows suggestions on how to resolve them
- It parses backslash escapes (which are not allowed in a Pomsky expression) and explains what to
write instead
- It looks for likely mistakes and displays warnings
- It looks for patterns that can be very slow for certain inputs and are susceptible to
Denial-of-Service attacks _(coming soon)_
## Comparison with other projects
I wrote an in-depth comparison with similar projects, which [you can find here][comparison].
## Code of Conduct
The Code of Conduct [can be found here](./CODE_OF_CONDUCT.md).
## Contributing
You can contribute by using Pomsky and providing feedback. If you find a bug or have a question,
please create an issue.
I also gladly accept code contributions. [More information](./CONTRIBUTING.md)
## Sponsor this project
[Go to my sponsors page](https://github.com/sponsors/Aloso/)
## License
Dual-licensed under the [MIT license][mit-license] or the [Apache 2.0 license][apache-2-license].
[book]: https://pomsky-lang.org/docs/get-started/introduction/
[enable-unicode]: https://pomsky-lang.org/docs/get-started/enable-unicode/
[billion-lols]: https://en.wikipedia.org/wiki/Billion_laughs_attack
[security]: https://pomsky-lang.org/docs/reference/security/
[comparison]: https://pomsky-lang.org/docs/reference/comparison/
[mit-license]: https://opensource.org/licenses/MIT
[apache-2-license]: https://opensource.org/licenses/Apache-2.0
| A new, portable, regular expression language | regex,regexp,regular-expression,pomsky,rust-lang | 14 | 5 | 13 | 418 | 31 | 2 | 3 |
wasserth/TotalSegmentator | # TotalSegmentator
Tool for segmentation of most major anatomical structures in any CT or MR image. It was trained on a wide range of different CT and MR images (different scanners, institutions, protocols,...) and therefore should work well on most images. A large part of the training dataset can be downloaded here: [CT dataset](https://doi.org/10.5281/zenodo.6802613) (1228 subjects) and [MR dataset](https://zenodo.org/doi/10.5281/zenodo.11367004) (298 subjects). You can also try the tool online at [totalsegmentator.com](https://totalsegmentator.com/).
**ANNOUNCEMENT: We recently added support for MR images. Try out by using the task `-ta total_mr` or see more details in our [paper](https://arxiv.org/abs/2405.19492).**
Supported classes for CT:
![Alt text](resources/imgs/overview_classes_v2.png)
Supported classes for MR:
![Alt text](resources/imgs/overview_classes_mr.png)
Created by the department of [Research and Analysis at University Hospital Basel](https://www.unispital-basel.ch/en/radiologie-nuklearmedizin/forschung-radiologie-nuklearmedizin).
If you use it please cite our [Radiology AI paper](https://pubs.rsna.org/doi/10.1148/ryai.230024) ([free preprint](https://arxiv.org/abs/2208.05868)). If you use it for MR images please cite the [TotalSegmentator MRI paper](https://arxiv.org/abs/2405.19492). Please also cite [nnUNet](https://github.com/MIC-DKFZ/nnUNet) since TotalSegmentator is heavily based on it.
### Installation
TotalSegmentator works on Ubuntu, Mac, and Windows and on CPU and GPU.
Install dependencies:
* Python >= 3.9
* [Pytorch](http://pytorch.org/) >= 2.0.0
Optionally:
* if you use the option `--preview` you have to install xvfb (`apt-get install xvfb`) and fury (`pip install fury`)
Install Totalsegmentator
```
pip install TotalSegmentator
```
### Usage
For CT images:
```
TotalSegmentator -i ct.nii.gz -o segmentations
```
For MR images:
```
TotalSegmentator -i mri.nii.gz -o segmentations --task total_mr
```
> Note: A Nifti file or a folder (or zip file) with all DICOM slices of one patient is allowed as input.
> Note: If you run on CPU use the option `--fast` or `--roi_subset` to greatly improve runtime.
> Note: This is not a medical device and is not intended for clinical usage.
### Subtasks
![Alt text](resources/imgs/overview_subclasses_2.png)
Next to the default task (`total`) there are more subtasks with more classes. If the taskname ends with `_mr` is works for MR images, otherwise for CT images.
Openly available for any usage:
* **total**: default task containing 117 main classes (see [here](https://github.com/wasserth/TotalSegmentator#class-details) for a list of classes)
* **total_mr**: default task containing 56 main classes on MR images (see [here](https://github.com/wasserth/TotalSegmentator#class-details) for a list of classes)
* **lung_vessels**: lung_vessels (cite [paper](https://www.sciencedirect.com/science/article/pii/S0720048X22001097)), lung_trachea_bronchia
* **body**: body, body_trunc, body_extremities, skin
* **cerebral_bleed**: intracerebral_hemorrhage (cite [paper](https://www.mdpi.com/2077-0383/12/7/2631))*
* **hip_implant**: hip_implant*
* **coronary_arteries**: coronary_arteries*
* **pleural_pericard_effusion**: pleural_effusion (cite [paper](http://dx.doi.org/10.1097/RLI.0000000000000869)), pericardial_effusion (cite [paper](http://dx.doi.org/10.3390/diagnostics12051045))*
*: These models are not trained on the full totalsegmentator dataset but on some small other datasets. Therefore, expect them to work less robustly.
Available with a license (free licenses available for non-commercial usage [here](https://backend.totalsegmentator.com/license-academic/). For a commercial license contact jakob.wasserthal@usb.ch):
* **heartchambers_highres**: myocardium, atrium_left, ventricle_left, atrium_right, ventricle_right, aorta, pulmonary_artery (trained on sub-millimeter resolution)
* **appendicular_bones**: patella, tibia, fibula, tarsal, metatarsal, phalanges_feet, ulna, radius, carpal, metacarpal, phalanges_hand
* **tissue_types**: subcutaneous_fat, torso_fat, skeletal_muscle
* **tissue_types_mr**: subcutaneous_fat, torso_fat, skeletal_muscle (for MR images)
* **vertebrae_body**: vertebral body of all vertebrae (without the vertebral arch)
* **face**: face_region
Usage:
```
TotalSegmentator -i ct.nii.gz -o segmentations -ta <task_name>
```
The mapping from label ID to class name can be found [here](https://github.com/wasserth/TotalSegmentator/blob/master/totalsegmentator/map_to_binary.py).
### Advanced settings
* `--device`: Choose `cpu` or `gpu` or `gpu:X (e.g., gpu:1 -> cuda:1)`
* `--fast`: For faster runtime and less memory requirements use this option. It will run a lower resolution model (3mm instead of 1.5mm).
* `--roi_subset`: Takes a space-separated list of class names (e.g. `spleen colon brain`) and only predicts those classes. Saves a lot of runtime and memory. Might be less accurate especially for small classes (e.g. prostate).
* `--preview`: This will generate a 3D rendering of all classes, giving you a quick overview if the segmentation worked and where it failed (see `preview.png` in output directory).
* `--ml`: This will save one nifti file containing all labels instead of one file for each class. Saves runtime during saving of nifti files. (see [here](https://github.com/wasserth/TotalSegmentator#class-details) for index to class name mapping).
* `--statistics`: This will generate a file `statistics.json` with volume (in mm³) and mean intensity of each class.
* `--radiomics`: This will generate a file `statistics_radiomics.json` with the radiomics features of each class. You have to install pyradiomics to use this (`pip install pyradiomics`).
### Run via docker
We also provide a docker container which can be used the following way
```
docker run --gpus 'device=0' --ipc=host -v /absolute/path/to/my/data/directory:/tmp wasserth/totalsegmentator:2.2.1 TotalSegmentator -i /tmp/ct.nii.gz -o /tmp/segmentations
```
### Running v1
If you want to keep on using TotalSegmentator v1 (e.g. because you do not want to change your pipeline) you
can install it with the following command:
```
pip install TotalSegmentator==1.5.7
```
The documentation for v1 can be found [here](https://github.com/wasserth/TotalSegmentator/tree/v1.5.7). Bugfixes for v1 are developed in the branch `v1_bugfixes`.
Our Radiology AI publication refers to TotalSegmentator v1.
### Resource Requirements
Totalsegmentator has the following runtime and memory requirements (using an Nvidia RTX 3090 GPU):
(1.5mm is the normal model and 3mm is the `--fast` model. With v2 the runtimes have increased a bit since
we added more classes.)
![Alt text](resources/imgs/runtime_table.png)
If you want to reduce memory consumption you can use the following options:
* `--fast`: This will use a lower-resolution model
* `--body_seg`: This will crop the image to the body region before processing it
* `--roi_subset <list of classes>`: This will only predict a subset of classes
* `--force_split`: This will split the image into 3 parts and process them one after another. (Do not use this for small images. Splitting these into even smaller images will result in a field of view which is too small.)
* `--nr_thr_saving 1`: Saving big images with several threads will take a lot of memory
### Train/validation/test split
The exact split of the dataset can be found in the file `meta.csv` inside of the [dataset](https://doi.org/10.5281/zenodo.6802613). This was used for the validation in our paper.
The exact numbers of the results for the high-resolution model (1.5mm) can be found [here](resources/results_all_classes_v1.json). The paper shows these numbers in the supplementary materials Figure 11.
### Retrain model and run evaluation
See [here](resources/train_nnunet.md) for more info on how to train a nnU-Net yourself on the TotalSegmentator dataset, how to split the data into train/validation/test set as in our paper, and how to run the same evaluation as in our paper.
### Python API
You can run totalsegmentator via Python:
```python
import nibabel as nib
from totalsegmentator.python_api import totalsegmentator
if __name__ == "__main__":
# option 1: provide input and output as file paths
totalsegmentator(input_path, output_path)
# option 2: provide input and output as nifti image objects
input_img = nib.load(input_path)
output_img = totalsegmentator(input_img)
nib.save(output_img, output_path)
```
You can see all available arguments [here](https://github.com/wasserth/TotalSegmentator/blob/master/totalsegmentator/python_api.py). Running from within the main environment should avoid some multiprocessing issues.
The segmentation image contains the names of the classes in the extended header. If you want to load this additional header information you can use the following code:
```python
from totalsegmentator.nifti_ext_header import load_multilabel_nifti
segmentation_nifti_img, label_map_dict = load_multilabel_nifti(image_path)
```
The above code requires `pip install xmltodict`.
### Install latest master branch (contains latest bug fixes)
```
pip install git+https://github.com/wasserth/TotalSegmentator.git
```
### Other commands
If you want to combine some subclasses (e.g. lung lobes) into one binary mask (e.g. entire lung) you can use the following command:
```
totalseg_combine_masks -i totalsegmentator_output_dir -o combined_mask.nii.gz -m lungcomm
```
Normally weights are automatically downloaded when running TotalSegmentator. If you want to download the weights with an extra command (e.g. when building a docker container) use this:
```
totalseg_download_weights -t <task_name>
```
After acquiring a license number for the non-open tasks you can set it with the following command:
```
totalseg_set_license -l aca_12345678910
```
### Typical problems
**ITK loading Error**
When you get the following error message
```
ITK ERROR: ITK only supports orthonormal direction cosines. No orthonormal definition was found!
```
you should do
```
pip install SimpleITK==2.0.2
```
Alternatively you can try
```
fslorient -copysform2qform input_file
fslreorient2std input_file output_file
```
**Bad segmentations**
When you get bad segmentation results check the following:
* does your input image contain the original HU values or are the intensity values rescaled to a different range?
* is the patient normally positioned in the image? (In axial view is the spine at the bottom of the image? In the coronal view is the head at the top of the image?)
### Other
* TotalSegmentator sends anonymous usage statistics to help us improve it further. You can deactivate it by setting `send_usage_stats` to `false` in `~/.totalsegmentator/config.json`.
* At [changes and improvements](resources/improvements_in_v2.md) you can see any overview of differences between v1 and v2.
### Reference
For more details see our [Radiology AI paper](https://pubs.rsna.org/doi/10.1148/ryai.230024) ([freely available preprint](https://arxiv.org/abs/2208.05868)).
If you use this tool please cite it as follows
```
Wasserthal, J., Breit, H.-C., Meyer, M.T., Pradella, M., Hinck, D., Sauter, A.W., Heye, T., Boll, D., Cyriac, J., Yang, S., Bach, M., Segeroth, M., 2023. TotalSegmentator: Robust Segmentation of 104 Anatomic Structures in CT Images. Radiology: Artificial Intelligence. https://doi.org/10.1148/ryai.230024
```
Please also cite [nnUNet](https://github.com/MIC-DKFZ/nnUNet) since TotalSegmentator is heavily based on it.
Moreover, we would really appreciate it if you let us know what you are using this tool for. You can also tell us what classes we should add in future releases. You can do so [here](https://github.com/wasserth/TotalSegmentator/issues/1).
### Class details
The following table shows a list of all classes for task `total`.
TA2 is a standardized way to name anatomy. Mostly the TotalSegmentator names follow this standard.
For some classes they differ which you can see in the table below.
[Here](resources/totalsegmentator_snomed_mapping.csv) you can find a mapping of the TotalSegmentator classes to SNOMED-CT codes.
|Index|TotalSegmentator name|TA2 name|
|:-----|:-----|:-----|
1 | spleen ||
2 | kidney_right ||
3 | kidney_left ||
4 | gallbladder ||
5 | liver ||
6 | stomach ||
7 | pancreas ||
8 | adrenal_gland_right | suprarenal gland |
9 | adrenal_gland_left | suprarenal gland |
10 | lung_upper_lobe_left | superior lobe of left lung |
11 | lung_lower_lobe_left | inferior lobe of left lung |
12 | lung_upper_lobe_right | superior lobe of right lung |
13 | lung_middle_lobe_right | middle lobe of right lung |
14 | lung_lower_lobe_right | inferior lobe of right lung |
15 | esophagus ||
16 | trachea ||
17 | thyroid_gland ||
18 | small_bowel | small intestine |
19 | duodenum ||
20 | colon ||
21 | urinary_bladder ||
22 | prostate ||
23 | kidney_cyst_left ||
24 | kidney_cyst_right ||
25 | sacrum ||
26 | vertebrae_S1 ||
27 | vertebrae_L5 ||
28 | vertebrae_L4 ||
29 | vertebrae_L3 ||
30 | vertebrae_L2 ||
31 | vertebrae_L1 ||
32 | vertebrae_T12 ||
33 | vertebrae_T11 ||
34 | vertebrae_T10 ||
35 | vertebrae_T9 ||
36 | vertebrae_T8 ||
37 | vertebrae_T7 ||
38 | vertebrae_T6 ||
39 | vertebrae_T5 ||
40 | vertebrae_T4 ||
41 | vertebrae_T3 ||
42 | vertebrae_T2 ||
43 | vertebrae_T1 ||
44 | vertebrae_C7 ||
45 | vertebrae_C6 ||
46 | vertebrae_C5 ||
47 | vertebrae_C4 ||
48 | vertebrae_C3 ||
49 | vertebrae_C2 ||
50 | vertebrae_C1 ||
51 | heart ||
52 | aorta ||
53 | pulmonary_vein ||
54 | brachiocephalic_trunk ||
55 | subclavian_artery_right ||
56 | subclavian_artery_left ||
57 | common_carotid_artery_right ||
58 | common_carotid_artery_left ||
59 | brachiocephalic_vein_left ||suprarenal gland
60 | brachiocephalic_vein_right ||
61 | atrial_appendage_left ||
62 | superior_vena_cava ||
63 | inferior_vena_cava ||
64 | portal_vein_and_splenic_vein | hepatic portal vein |
65 | iliac_artery_left | common iliac artery |
66 | iliac_artery_right | common iliac artery |
67 | iliac_vena_left | common iliac vein |
68 | iliac_vena_right | common iliac vein |
69 | humerus_left ||
70 | humerus_right ||
71 | scapula_left ||
72 | scapula_right ||
73 | clavicula_left | clavicle |
74 | clavicula_right | clavicle |
75 | femur_left ||
76 | femur_right ||
77 | hip_left ||
78 | hip_right ||
79 | spinal_cord ||
80 | gluteus_maximus_left | gluteus maximus muscle |
81 | gluteus_maximus_right | gluteus maximus muscle |
82 | gluteus_medius_left | gluteus medius muscle |
83 | gluteus_medius_right | gluteus medius muscle |
84 | gluteus_minimus_left | gluteus minimus muscle |
85 | gluteus_minimus_right | gluteus minimus muscle |
86 | autochthon_left ||
87 | autochthon_right ||
88 | iliopsoas_left | iliopsoas muscle |
89 | iliopsoas_right | iliopsoas muscle |
90 | brain ||
91 | skull ||
92 | rib_left_1 ||
93 | rib_left_2 ||
94 | rib_left_3 ||
95 | rib_left_4 ||
96 | rib_left_5 ||
97 | rib_left_6 ||
98 | rib_left_7 ||
99 | rib_left_8 ||
100 | rib_left_9 ||
101 | rib_left_10 ||
102 | rib_left_11 ||
103 | rib_left_12 ||
104 | rib_right_1 ||
105 | rib_right_2 ||
106 | rib_right_3 ||
107 | rib_right_4 ||
108 | rib_right_5 ||
109 | rib_right_6 ||
110 | rib_right_7 ||
111 | rib_right_8 ||
112 | rib_right_9 ||
113 | rib_right_10 ||
114 | rib_right_11 ||
115 | rib_right_12 ||
116 | sternum ||
117 | costal_cartilages ||
**Class map for task `total_mr`:**
|Index|TotalSegmentator name|TA2 name|
|:-----|:-----|:-----|
1 | spleen ||
2 | kidney_right ||
3 | kidney_left ||
4 | gallbladder ||
5 | liver ||
6 | stomach ||
7 | pancreas ||
8 | adrenal_gland_right | suprarenal gland |
9 | adrenal_gland_left | suprarenal gland |
10 | lung_left ||
11 | lung_right ||
12 | esophagus ||
13 | small_bowel | small intestine |
14 | duodenum ||
15 | colon ||
16 | urinary_bladder ||
17 | prostate ||
18 | sacrum ||
19 | vertebrae ||
20 | intervertebral_discs ||
21 | spinal_cord ||
22 | heart ||
23 | aorta ||
24 | inferior_vena_cava ||
25 | portal_vein_and_splenic_vein | hepatic portal vein |
26 | iliac_artery_left | common iliac artery |
27 | iliac_artery_right | common iliac artery |
28 | iliac_vena_left | common iliac vein |
29 | iliac_vena_right | common iliac vein |
30 | humerus_left ||
31 | humerus_right ||
32 | fibula ||
33 | tibia ||
34 | femur_left ||
35 | femur_right ||
36 | hip_left ||
37 | hip_right ||
38 | gluteus_maximus_left | gluteus maximus muscle |
39 | gluteus_maximus_right | gluteus maximus muscle |
40 | gluteus_medius_left | gluteus medius muscle |
41 | gluteus_medius_right | gluteus medius muscle |
42 | gluteus_minimus_left | gluteus minimus muscle |
43 | gluteus_minimus_right | gluteus minimus muscle |
44 | autochthon_left ||
45 | autochthon_right ||
46 | iliopsoas_left | iliopsoas muscle |
47 | iliopsoas_right | iliopsoas muscle |
48 | quadriceps_femoris_left ||
49 | quadriceps_femoris_right ||
50 | thigh_medial_compartment_left ||
51 | thigh_medial_compartment_right ||
52 | thigh_posterior_compartment_left ||
53 | thigh_posterior_compartment_right ||
54 | sartorius_left ||
55 | sartorius_right ||
56 | brain ||
| Tool for robust segmentation of >100 important anatomical structures in CT and MR images | null | 4 | 27 | 35 | 615 | 61 | 3 | 5 |
writer/writer-framework | ## What is Framework?
Writer Framework is an open-source framework for creating AI applications. Build user interfaces using a visual editor; write the backend code in Python.
Writer Framework is fast and flexible with a clean, easily-testable syntax. It provides separation of concerns between UI and business logic, enabling more complex applications.
## Highlights
### Reactive and state-driven
Writer Framework is **fully state-driven** and provides **separation of concerns** between user interface and business logic.
```py
import writer as wf
def handle_increment(state):
state["counter"] += 1
wf.init_state({
"counter": 0
})
```
The user interface is a template, which is defined visually. The template contains reactive references to state, e.g. `@{counter}`, and references to event handlers, e.g. when _Button_ is clicked, trigger `handle_increment`.
### Flexible
- Elements are highly customizable with no CSS required, allowing for shadows, button icons, background colors, etc.
- HTML elements with custom CSS can be included using the _HTML Element_ component. They can serve as containers for built-in components.
### Fast
- Event handling adds minimal overhead to your Python code (~1-2ms\*).
- Streaming (WebSockets) is used to synchronize frontend and backend states.
- The script only runs once.
- Non-blocking by default. Events are handled asynchronously in a thread pool running in a dedicated process.
\*End-to-end figure, including DOM mutation. Tested locally on a Macbook Air M2. [Measurement methodology](https://medium.com/@ramiromedina/measuring-time-elapsed-between-an-event-and-its-associated-dom-mutation-80431ad576e1).
### Developer-friendly
- It's all contained in a standard Python package, just one `pip install` away.
- User interfaces are saved as JSON, so they can be version controlled together with the rest of the application.
- Use your local code editor and get instant refreshes when you save your code. Alternatively, use the provided web-based editor.
- You edit the UI while your app is running. No hitting "Preview" and seeing something completely different to what you expected.
## Installation and Quickstart
Getting started with Writer Framework is easy. It works on Linux, Mac and Windows.
```sh
pip install writer
writer hello
```
- The first command will install Writer Framework using `pip`.
- The second command will create a demo application in the subfolder "hello" and start Writer Framework Builder, the framework's visual editor, which will be accessible via a local URL.
The following commands can be used to create, launch Writer Framework Builder and run an application.
```sh
writer create my_app
writer edit my_app
writer run my_app
```
## Documentation
Full documentation, including how to use Writer's AI module and deployment options, is available at [Writer](https://dev.writer.com/framework?utm_source=github&utm_medium=readme&utm_campaign=framework).
## About Writer
Writer is the full-stack generative AI platform for enterprises. Quickly and easily build and deploy generative AI apps with a suite of developer tools fully integrated with our platform of LLMs, graph-based RAG tools, AI guardrails, and more. Learn more at [writer.com](https://www.writer.com?utm_source=github&utm_medium=readme&utm_campaign=framework).
## License
This project is licensed under the Apache 2.0 License.
| No-code in the front, Python in the back. An open-source framework for creating data apps. | data-apps,data-visualization,python,websockets,no-code,developer-tools,interface,interface-builder,models,ui | 16 | 36 | 252 | 1,168 | 34 | 19 | 6 |
duckdegen/apebot | null | Binance listing sniping bot built to purchase onchain as fast as possible | null | 0 | 2 | 1 | 15 | 2 | 1 | 0 |
reactwg/react-native-new-architecture | # React Native New Architecture Working Group
The intention of this repository is to coordinate and support the rollout of the **[React Native New Architecture](https://reactnative.dev/docs/the-new-architecture/landing-page)**. We have provided [guides](#guides) and a [discussion](#discussion) space for this purpose.
You can find New Architecture updates [here](https://github.com/reactwg/react-native-new-architecture/discussions/categories/releases).
## Guides
- How to enable the New Architecture
- For Apps
- [Enable the New Architecture for Apps](./docs/enable-apps.md)
- For Libraries
- [Make your library compatible with the New Architecture](./docs/enable-libraries.md)
- [Convert Library to TurboModules/Fabric APIs](./docs/enable-libraries-prerequisites.md)
- [Additional information for Android](./docs/enable-libraries-android.md)
- [Additional information for iOS](./docs/enable-libraries-ios.md)
- New Architecture Workflows
- [Create a Fabric Native Component](./docs/fabric-native-components.md)
- [Create a Turbo Native Module](./docs/turbo-modules.md)
- [Using Codegen](./docs/codegen.md) to write type-safe Fabric Components and Turbo Modules
- Writing [cross-platform TurboModules](./docs/turbo-modules-xplat.md) with C++
- Supporting [custom C++ types](./docs/cxx-custom-types.md)
- [Using React 18](./docs/react-18.md) features
- [Backwards compatibility](./docs/backwards-compat.md)
- For [Legacy Native Modules](./docs/backwards-compat-turbo-modules.md)
- For [Legacy Native Components](./docs/backwards-compat-fabric-component.md)
- [Troubleshooting](./docs/troubleshooting.md)
- [Appendix](./docs/appendix.md)
## Discussion
This repository is also a place for discussion and feedback on the New Architecture. You can access it by heading over to the [Discussions Tab on Github](https://github.com/reactwg/react-native-new-architecture/discussions).
### Sections
We've created some sections to keep the discussion focused.
| Title | Topic |
| ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| [Announcements 📣](https://github.com/reactwg/react-native-new-architecture/discussions/categories/announcements) | General announcements about this working group. |
| [Deep Dive 🐳](https://github.com/reactwg/react-native-new-architecture/discussions/categories/deep-dive) | Sharing deep dives and technical-specific topics |
| [Documentation 📚](https://github.com/reactwg/react-native-new-architecture/discussions/categories/documentation) | A place to chat about the New Architecture documentation and migration material |
| [Libraries 🛠](https://github.com/reactwg/react-native-new-architecture/discussions/categories/libraries) | A place to chat about 3rd party libraries and their migration story to the New Architecture |
| [Q&A 🤝](https://github.com/reactwg/react-native-new-architecture/discussions/categories/q-a) | A place to ask the community for help on the New Architecture topics |
| [Releases 🏁](https://github.com/reactwg/react-native-new-architecture/discussions/categories/releases) | Updates on New Architecture in each release |
| Workgroup for the New React Native Architecture | react-native,fabric,turbomodule,working-group | 0 | 247 | 13 | 33 | 0 | 6 | 0 |
connectrpc/connect-es | <img src=".github/connect-logo.png" width="15%" />
# Connect for ECMAScript
[![License](https://img.shields.io/github/license/connectrpc/connect-es?color=blue)](./LICENSE) [![Build](https://github.com/connectrpc/connect-es/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/connectrpc/connect-es/actions/workflows/ci.yaml) [![NPM Version](https://img.shields.io/npm/v/@connectrpc/connect/latest?color=green&label=%40connectrpc%2Fconnect)](https://www.npmjs.com/package/@connectrpc/connect) [![NPM Version](https://img.shields.io/npm/v/@connectrpc/protoc-gen-connect-es/latest?color=green&label=%40connectrpc%2Fprotoc-gen-connect-es)](https://www.npmjs.com/package/@connectrpc/protoc-gen-connect-es)
Connect is a family of libraries for building type-safe APIs with different languages and platforms.
[@connectrpc/connect](https://www.npmjs.com/package/@connectrpc/connect) brings them to TypeScript,
the web browser, and to Node.js.
With Connect, you define your schema first:
```
service ElizaService {
rpc Say(SayRequest) returns (SayResponse) {}
}
```
And with the magic of code generation, this schema produces servers and clients:
```ts
const answer = await eliza.say({sentence: "I feel happy."});
console.log(answer);
// {sentence: 'When you feel happy, what do you do?'}
```
Unlike REST, the Remote Procedure Call are type-safe, but they are regular HTTP
under the hood. You can see all requests in the network inspector, and you
can `curl` them if you want:
```shell
curl \
--header 'Content-Type: application/json' \
--data '{"sentence": "I feel happy."}' \
https://demo.connectrpc.com/connectrpc.eliza.v1.ElizaService/Say
```
Connect uses [Protobuf-ES](https://github.com/bufbuild/protobuf-es), the only
[fully-compliant](https://buf.build/blog/protobuf-conformance) Protobuf JavaScript library.
Connect implements RPC three protocols: The widely available gRPC and
gRPC-web protocols, and Connect's [own protocol](https://connectrpc.com/docs/protocol/),
optimized for the web. This gives you unparalleled interoperability across many
platforms and languages, with type-safety end-to-end.
## Get started on the web
Follow our [10 minute tutorial](https://connectrpc.com/docs/web/getting-started) where
we use [Vite](https://vitejs.dev/) and [React](https://reactjs.org/) to create a
web interface for ELIZA.
**React**, **Svelte**, **Vue**, **Next.js** and **Angular** are supported (see [examples](https://github.com/connectrpc/examples-es)),
and we have an expansion pack for [TanStack Query](https://github.com/connectrpc/connect-query-es).
We support all modern web browsers that implement the widely available
[fetch API](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)
and the [Encoding API](https://developer.mozilla.org/en-US/docs/Web/API/Encoding_API).
## Get started on Node.js
Follow our [10 minute tutorial](https://connectrpc.com/docs/node/getting-started)
to spin up a service in Node.js, and call it from the web, and from a gRPC client
in your terminal.
You can serve your Connect RPCs with vanilla Node.js, or use our [server plugins](https://connectrpc.com/docs/node/server-plugins)
for **Fastify**, **Next.js**, and **Express**. We support Node.js v16 and later with
the builtin `http` and `http2` modules.
## Other platforms
Would you like to use Connect on other platforms like Bun, Deno, Vercel’s Edge Runtime,
or Cloudflare Workers? We’d love to learn about your use cases and what you’d like to do
with Connect. You can reach us either through the [Buf Slack](https://buf.build/links/slack/)
or by filing a [GitHub issue](https://github.com/connectrpc/connect-es/issues) and we’d
be more than happy to chat!
## Packages
- [@connectrpc/connect](https://www.npmjs.com/package/@connectrpc/connect):
RPC clients and servers for your schema ([source code](packages/connect)).
- [@connectrpc/protoc-gen-connect-es](https://www.npmjs.com/package/@connectrpc/protoc-gen-connect-es):
Code generator plugin for the services in your schema ([source code](packages/protoc-gen-connect-es)).
- [@connectrpc/connect-web](https://www.npmjs.com/package/@connectrpc/connect-web):
Adapters for web browsers, and any other platform that has the fetch API on board.
- [@connectrpc/connect-node](https://www.npmjs.com/package/@connectrpc/connect-node):
Serve RPCs on vanilla Node.js servers. Call RPCs with any protocol.
- [@connectrpc/connect-fastify](https://www.npmjs.com/package/@connectrpc/connect-fastify):
Plug your services into a [Fastify](https://www.fastify.io/) server.
- [@connectrpc/connect-next](https://www.npmjs.com/package/@connectrpc/connect-next):
Serve your RPCs with [Next.js](https://nextjs.org/) API routes.
- [@connectrpc/connect-express](https://www.npmjs.com/package/@connectrpc/connect-express):
Adds your services to an [Express](https://expressjs.com/) server.
The libraries and the generated code are compatible with ES2017 and TypeScript 4.1.
## Ecosystem
* [examples-es](https://github.com/connectrpc/examples-es):
Examples for using Connect with various TypeScript web frameworks and tooling
* [connect-query-es](https://github.com/connectrpc/connect-query-es):
TypeScript-first expansion pack for TanStack Query that gives you Protobuf superpowers
* [connect-playwright-es](https://github.com/connectrpc/connect-playwright-es):
Playwright tests for your Connect application
* [connect-swift](https://github.com/connectrpc/connect-swift):
Idiomatic gRPC & Connect RPCs for Swift
* [connect-go](https://github.com/connectrpc/connect-go):
Go implementation of gRPC, gRPC-Web, and Connect
* [examples-go](https://github.com/connectrpc/examples-go):
Example RPC service powering https://demo.connectrpc.com and built with connect-go
* [conformance](https://github.com/connectrpc/conformance):
gRPC-Web and Connect interoperability tests
* [Buf Studio](https://buf.build/studio): web UI for ad-hoc RPCs
## Status: Stable
All packages are stable and have reached a major version release.
## Legal
Offered under the [Apache 2 license](/LICENSE).
| The TypeScript implementation of Connect: Protobuf RPC that works. | grpc-web,protobuf,typescript,grpc,rpc,nodejs,javascript,protoc-plugin,schema,fastify-plugin | 42 | 34 | 883 | 657 | 35 | 10 | 7 |
MCG-NJU/VideoMAE | # Official PyTorch Implementation of VideoMAE (NeurIPS 2022 Spotlight).
![VideoMAE Framework](figs/videomae.jpg)
[![License: CC BY-NC 4.0](https://img.shields.io/badge/License-CC_BY--NC_4.0-lightgrey.svg)](https://creativecommons.org/licenses/by-nc/4.0/)<br>
[![Hugging Face Models](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Models-blue)](https://huggingface.co/models?other=videomae)[![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/sayakpaul/video-classification-ucf101-subset)[![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/video_classification.ipynb)<br>
[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/videomae-masked-autoencoders-are-data-1/action-recognition-in-videos-on-something)](https://paperswithcode.com/sota/action-recognition-in-videos-on-something?p=videomae-masked-autoencoders-are-data-1)<br>
[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/videomae-masked-autoencoders-are-data-1/action-classification-on-kinetics-400)](https://paperswithcode.com/sota/action-classification-on-kinetics-400?p=videomae-masked-autoencoders-are-data-1)<br>[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/videomae-masked-autoencoders-are-data-1/action-recognition-on-ava-v2-2)](https://paperswithcode.com/sota/action-recognition-on-ava-v2-2?p=videomae-masked-autoencoders-are-data-1)<br>
[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/videomae-masked-autoencoders-are-data-1/self-supervised-action-recognition-on-ucf101)](https://paperswithcode.com/sota/self-supervised-action-recognition-on-ucf101?p=videomae-masked-autoencoders-are-data-1)<br>
[![PWC](https://img.shields.io/endpoint.svg?url=https://paperswithcode.com/badge/videomae-masked-autoencoders-are-data-1/self-supervised-action-recognition-on-hmdb51)](https://paperswithcode.com/sota/self-supervised-action-recognition-on-hmdb51?p=videomae-masked-autoencoders-are-data-1)
> [**VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training**](https://arxiv.org/abs/2203.12602)<br>
> [Zhan Tong](https://github.com/yztongzhan), [Yibing Song](https://ybsong00.github.io/), [Jue Wang](https://juewang725.github.io/), [Limin Wang](http://wanglimin.github.io/)<br>Nanjing University, Tencent AI Lab
## 📰 News
**[2023.4.18]** 🎈Everyone can download **Kinetics-400**, which is used in VideoMAE, from [this link](https://opendatalab.com/Kinetics-400).<br>
**[2023.4.18]** Code and pre-trained models of [VideoMAE V2](https://arxiv.org/abs/2303.16727) have been released! Check and enjoy this [repo](https://github.com/OpenGVLab/VideoMAEv2)!<br>
**[2023.4.17]** We propose **[EVAD](https://arxiv.org/abs/2304.08451)**, an **end-to-end Video Action Detection** framework.<br>
**[2023.2.28]** Our [VideoMAE V2](https://arxiv.org/abs/2303.16727) is accepted by **CVPR 2023**! 🎉<br>
**[2023.1.16]** Code and pre-trained models for **Action Detection** in VideoMAE are [available](https://github.com/MCG-NJU/VideoMAE-Action-Detection)! <br>
**[2022.12.27]** 🎈Everyone can download extracted **VideoMAE** features of **THUMOS**, **ActivityNet**, **HACS** and **FineAction** from [InternVideo](https://github.com/OpenGVLab/InternVideo/tree/main/Downstream/Temporal-Action-Localization#to-reproduce-our-results-of-internvideo).<br>
**[2022.11.20]** 👀 VideoMAE is integrated into [![Hugging Face Spaces](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Spaces-blue)](https://huggingface.co/spaces/sayakpaul/video-classification-ucf101-subset) and [![Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/huggingface/notebooks/blob/main/examples/video_classification.ipynb), supported by [@Sayak Paul](https://github.com/sayakpaul).<br>
**[2022.10.25]** 👀 VideoMAE is integrated into [MMAction2](https://github.com/open-mmlab/mmaction2/tree/dev-1.x/configs/recognition/videomae), the results on Kinetics-400 can be reproduced successfully. <br>
**[2022.10.20]** The pre-trained models and scripts of **ViT-S** and **ViT-H** are available! <br>
**[2022.10.19]** The pre-trained models and scripts on **UCF101** are [available](MODEL_ZOO.md#UCF101)! <br>
**[2022.9.15]** VideoMAE is accepted by **NeurIPS 2022** as a **spotlight** presentation! 🎉 <br>
**[2022.8.8]** 👀 VideoMAE is integrated into **official** [🤗HuggingFace Transformers](https://huggingface.co/docs/transformers/main/en/model_doc/videomae) now! [![Hugging Face Models](https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Models-blue)](https://huggingface.co/models?other=videomae)<br>
**[2022.7.7]** We have updated new results on downstream AVA 2.2 benchmark. Please refer to our [paper](https://arxiv.org/abs/2203.12602) for details. <br>
**[2022.4.24]** Code and pre-trained models are available now! <br>
**[2022.3.24]** ~~Code and pre-trained models will be released here.~~ Welcome to **watch** this repository for the latest updates.
## ✨ Highlights
### 🔥 Masked Video Modeling for Video Pre-Training
VideoMAE performs the task of masked video modeling for video pre-training. We propose the **extremely high** masking ratio (90%-95%) and **tube masking** strategy to create a challenging task for self-supervised video pre-training.
### ⚡️ A Simple, Efficient and Strong Baseline in SSVP
VideoMAE uses the simple masked autoencoder and **plain ViT** backbone to perform video self-supervised learning. Due to the extremely high masking ratio, the pre-training time of VideoMAE is **much shorter** than contrastive learning methods (**3.2x** speedup). VideoMAE can serve as **a simple but strong baseline** for future research in self-supervised video pre-training.
### 😮 High performance, but NO extra data required
VideoMAE works well for video datasets of different scales and can achieve **87.4%** on Kinects-400, **75.4%** on Something-Something V2, **91.3%** on UCF101, and **62.6%** on HMDB51. To our best knowledge, VideoMAE is the **first** to achieve the state-of-the-art performance on these four popular benchmarks with the **vanilla ViT** backbones while **doesn't need** any extra data or pre-trained models.
## 🚀 Main Results
### ✨ Something-Something V2
| Method | Extra Data | Backbone | Resolution | #Frames x Clips x Crops | Top-1 | Top-5 |
| :------: | :--------: | :------: | :--------: | :---------------------: | :---: | :---: |
| VideoMAE | ***no*** | ViT-S | 224x224 | 16x2x3 | 66.8 | 90.3 |
| VideoMAE | ***no*** | ViT-B | 224x224 | 16x2x3 | 70.8 | 92.4 |
| VideoMAE | ***no*** | ViT-L | 224x224 | 16x2x3 | 74.3 | 94.6 |
| VideoMAE | ***no*** | ViT-L | 224x224 | 32x1x3 | 75.4 | 95.2 |
### ✨ Kinetics-400
| Method | Extra Data | Backbone | Resolution | #Frames x Clips x Crops | Top-1 | Top-5 |
| :------: | :--------: | :------: | :--------: | :---------------------: | :---: | :---: |
| VideoMAE | ***no*** | ViT-S | 224x224 | 16x5x3 | 79.0 | 93.8 |
| VideoMAE | ***no*** | ViT-B | 224x224 | 16x5x3 | 81.5 | 95.1 |
| VideoMAE | ***no*** | ViT-L | 224x224 | 16x5x3 | 85.2 | 96.8 |
| VideoMAE | ***no*** | ViT-H | 224x224 | 16x5x3 | 86.6 | 97.1 |
| VideoMAE | ***no*** | ViT-L | 320x320 | 32x4x3 | 86.1 | 97.3 |
| VideoMAE | ***no*** | ViT-H | 320x320 | 32x4x3 | 87.4 | 97.6 |
### ✨ AVA 2.2
Please check the code and checkpoints in [VideoMAE-Action-Detection](https://github.com/MCG-NJU/VideoMAE-Action-Detection).
| Method | Extra Data | Extra Label | Backbone | #Frame x Sample Rate | mAP |
| :------: | :----------: | :---------: | :------: | :------------------: | :--: |
| VideoMAE | Kinetics-400 | ✗ | ViT-S | 16x4 | 22.5 |
| VideoMAE | Kinetics-400 | ✓ | ViT-S | 16x4 | 28.4 |
| VideoMAE | Kinetics-400 | ✗ | ViT-B | 16x4 | 26.7 |
| VideoMAE | Kinetics-400 | ✓ | ViT-B | 16x4 | 31.8 |
| VideoMAE | Kinetics-400 | ✗ | ViT-L | 16x4 | 34.3 |
| VideoMAE | Kinetics-400 | ✓ | ViT-L | 16x4 | 37.0 |
| VideoMAE | Kinetics-400 | ✗ | ViT-H | 16x4 | 36.5 |
| VideoMAE | Kinetics-400 | ✓ | ViT-H | 16x4 | 39.5 |
| VideoMAE | Kinetics-700 | ✗ | ViT-L | 16x4 | 36.1 |
| VideoMAE | Kinetics-700 | ✓ | ViT-L | 16x4 | 39.3 |
### ✨ UCF101 & HMDB51
| Method | Extra Data | Backbone | UCF101 | HMDB51 |
| :------: | :----------: | :------: | :----: | :----: |
| VideoMAE | ***no*** | ViT-B | 91.3 | 62.6 |
| VideoMAE | Kinetics-400 | ViT-B | 96.1 | 73.3 |
## 🔨 Installation
Please follow the instructions in [INSTALL.md](INSTALL.md).
## ➡️ Data Preparation
Please follow the instructions in [DATASET.md](DATASET.md) for data preparation.
## 🔄 Pre-training
The pre-training instruction is in [PRETRAIN.md](PRETRAIN.md).
## ⤴️ Fine-tuning with pre-trained models
The fine-tuning instruction is in [FINETUNE.md](FINETUNE.md).
## 📍Model Zoo
We provide pre-trained and fine-tuned models in [MODEL_ZOO.md](MODEL_ZOO.md).
## 👀 Visualization
We provide the script for visualization in [`vis.sh`](vis.sh). Colab notebook for better visualization is coming soon.
## ☎️ Contact
Zhan Tong: tongzhan@smail.nju.edu.cn
## 👍 Acknowledgements
Thanks to [Ziteng Gao](https://sebgao.github.io/), Lei Chen, [Chongjian Ge](https://chongjiange.github.io/), and [Zhiyu Zhao](https://github.com/JerryFlymi) for their kind support.<br>
This project is built upon [MAE-pytorch](https://github.com/pengzhiliang/MAE-pytorch) and [BEiT](https://github.com/microsoft/unilm/tree/master/beit). Thanks to the contributors of these great codebases.
## 🔒 License
The majority of this project is released under the CC-BY-NC 4.0 license as found in the [LICENSE](https://github.com/MCG-NJU/VideoMAE/blob/main/LICENSE) file. Portions of the project are available under separate license terms: [SlowFast](https://github.com/facebookresearch/SlowFast) and [pytorch-image-models](https://github.com/rwightman/pytorch-image-models) are licensed under the Apache 2.0 license. [BEiT](https://github.com/microsoft/unilm/tree/master/beit) is licensed under the MIT license.
## ✏️ Citation
If you think this project is helpful, please feel free to leave a star⭐️ and cite our paper:
```
@inproceedings{tong2022videomae,
title={Video{MAE}: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training},
author={Zhan Tong and Yibing Song and Jue Wang and Limin Wang},
booktitle={Advances in Neural Information Processing Systems},
year={2022}
}
@article{videomae,
title={VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training},
author={Tong, Zhan and Song, Yibing and Wang, Jue and Wang, Limin},
journal={arXiv preprint arXiv:2203.12602},
year={2022}
}
```
| [NeurIPS 2022 Spotlight] VideoMAE: Masked Autoencoders are Data-Efficient Learners for Self-Supervised Video Pre-Training | self-supervised-learning,action-recognition,video-understanding,masked-autoencoder,transformer,vision-transformer,video-transformer,mae,pytorch,video-representation-learning | 0 | 4 | 7 | 64 | 41 | 1 | 0 |
JumpCrypto/crypto-reading-list | Crypto Reading List
====================
_For a more friendly reading experience, we recommend navigating [here](https://jumpcrypto.github.io/crypto-reading-list)._
A curated list for getting up to speed on crypto and decentralized networks.
The content on the toplevel page contains what we consider essential reading.
Child pages contain deeper, topic-specific information to review afterward.
The lists here are a **work in progress**. We welcome any feedback or criticism!
Please open a PR/issue with any suggestions or corrections.
_Nothing in this repo constitutes financial or legal advice._
Contents
=========
- [Why is crypto important?](#why-is-crypto-important)
- [Blockchain mechanics \& innovations](#blockchain-mechanics--innovations)
- [DeFi primitives](#defi-primitives)
- [NFTs \& digital identity](#nfts--digital-identity)
- [DAOs \& Governance](#daos--governance)
- [Byzantine Fault Tolerance \& Proof-of-Stake algos](#byzantine-fault-tolerance--proof-of-stake-algos)
- [L1s](#l1s)
- [L2s](#l2s)
- [Trading mechanics](#trading-mechanics)
- [Smart contract programming](#smart-contract-programming)
- [Economic design](#economic-design)
- [Tools \& Analytics](#tools--analytics)
- [Exercises](#exercises)
- [Other references](#other-references)
- [Other lists/directories](#other-listsdirectories)
- [Original research](#original-research)
- [Online courses](#online-courses)
Why is crypto important?
===========================
We've identified four central themes behind crypto's value proposition:
1. A decentralized ledger-based **currency** system.
* anyone can participate in administering the currency, and cryptography makes it impossible for bad actors to forge transactions taking your holdings.
2. A decentralized **state machine** and network of computation.
* it is extremely difficult for bad actors for enact state changes not defined in sourcecode.
3. An open network of **APIs** for decentralized apps.
4. An incentive model for these open networks to grow via crypto **tokens**.
Broadly speaking, **decentralization** means **distributed and unpermissioned**. In the ideal case, anyone can participate in the network, and the participants are both physically and socioeconomically spread apart.
Decentralization is often paired with **cryptoeconomics** to design an incentive model that perpetuates a healthy network. For example, network participants may be rewarded with a "native token" when they exhibit good behavior. This does require a certain level of scale, and the network is usually provably robust against bad actors under a certain threshold (see the section on Byzantine Fault Tolerance). As the network grows in size, it becomes increasingly difficult for a bad actor (or coalition of bad actors) to attack the network, because there are enough honest participants that are economically (and perhaps even philosophically) incentivized to perpetuate the network. Roughly speaking, the bad actor must have more to gain than lose from performing the bad action (ie. paying the network penalty eg. slashing + opportunity cost of rewards for honesty * probability attack is even successful). In other words, the expected value of the bad action must be positive.
Here's the list of relevant reading:
* The currency proposition:
* [Bitcoin for the open-minded skeptic](https://www.matthuang.com/bitcoin_for_the_open_minded_skeptic) (2020)
* [7 things to read about bitcoin](https://www.paradigm.xyz/2020/05/7-things-to-read-about-bitcoin-for-institutional-investors/) (2020)
* The state machine proposition:
* https://ethereum.org/en/developers/docs/evm/
* The open API proposition:
* [Why decentralization matters](https://cdixon.org/2018/02/18/why-decentralization-matters) (2018)
* discusses the pattern of new technology progressing from innovation to extraction (from cooperation with their ecosystem to eventual competition).
* For example consider Apple's transition from early days of encouraging developers to build on iOS, to now charging 30% on all in-store purchases.
* Discusses how crypto solves this by aligning the network with its participants.
* The token proposition:
* [Crypto tokens: a breakthrough in open design](https://cdixon.org/2017/05/27/crypto-tokens-a-breakthrough-in-open-network-design) (2017)
* tokens as an enabler for alignment between networks and their participants
* [The true power of DeFi composability](https://medium.com/coinmonks/the-true-power-of-defi-composability-14fe8355e0d0) (Apr 2021)
* [Why I have changed my mind on tokens](https://insights.deribit.com/market-research/why-i-have-changed-my-mind-on-tokens/) (Dec 2020)
* noted researcher Hasu weighs in on the merits of protocol tokens, during a time when many cynics questioned the need for each project to have its own token
_More: see in-depth page: [Why](Why.md)_
Blockchain mechanics & innovations
====================================
We think it's essential reading to understand how bitcoin works,
and how smart contracts (pioneered by Ethereum) work.
* Bitcoin:
* [How the Bitcoin protocol actually works](https://michaelnielsen.org/ddi/how-the-bitcoin-protocol-actually-works/) (2013)
* describing Bitcoin's mechanics, building it up from first principles
* OR for fundamentalists, see the [Bitcoin whitepaper](https://bitcoin.org/bitcoin.pdf) (2009)
* Ethereum:
* [Ethereum whitepaper](https://ethereum.org/en/whitepaper/)
* Vitalik Buterin's original whitepaper building on bitcoin to get smartcontracts; easier to read than the
Bitcoin whitepaper; also happens to be good explanation of _Bitcoin_
* OR for another clear description, see [How Ethereum and Smart Contracts work](https://vas3k.com/blog/ethereum/)
DeFi primitives
===========================
_In-depth page: [DeFi](DeFi.md)_
Next, let's try to understand the major kinds of financial dApps on the blockchain.
Although there are many types, we'd say the two most common are:
1. **Lending protocol** (a decentralized bank, i.e. a smart contract where you can loan your assets for yield, or
do borrow while paying interest). Example: Aave
2. **Decentralized exchange** (most commonly an Automated Market Maker (AMM), a smart contract with two pools of
assets that allows swapping from one asset to the other). Example: Uniswap
A third, which can be thought of as a competitor to (1) of sorts, is:
3. **Decentralized stablecoin issuer** (a protocol allowing you to deposit assets (e.g. Eth)
and borrow a decentralized stablecoin (minted by the protocol) against it). We say that it is a
competitor of sorts to (1) where the lender is the protocol. Example: MakerDAO
Initial reading material on these categories:
* Lending protocols
* [Lending and borrowing in DeFi](https://finematics.com/lending-and-borrowing-in-defi-explained/) (Nov 2020)
* AMMs
* [AMMs](https://medium.com/dragonfly-research/what-explains-the-rise-of-amms-7d008af1c399) (Jul 2020)
* explaining the mechanics of the constant-product AMM popularized by Uniswap V2
* [StableSwap AMMs](https://curve.fi/files/stableswap-paper.pdf) (2019)
* explaining another AMM formulation for stable pairs of assets, pioneered by Curve.fi
* [Uniswap V3 whitepaper](https://uniswap.org/whitepaper-v3.pdf)
* explaining the 'concentrated liquidity' innovation in UniswapV3
* see also [Uniswap v3: The Universal AMM](https://www.paradigm.xyz/2021/06/uniswap-v3-the-universal-amm/)
for illustrations of UniV3 emulating specific other functions
* Decentralized stablecoin issuance
* [Wikipedia article on Dai](https://en.wikipedia.org/wiki/Dai_(cryptocurrency)) provides a good, terse
description of MakerDAO and Dai, the stablecoin it issues
* Other essential reading:
* [Bridges](https://blog.makerdao.com/what-are-blockchain-bridges-and-why-are-they-important-for-defi/)
For much more, see our in-depth page on [DeFi](DeFi.md)
NFTs & digital identity
===========================
_In-depth page: [NFT](NFT.md)_
* [NFTs and a Thousand True Fans](https://future.a16z.com/nfts-thousand-true-fans/) (Feb 2021) -
an argument for NFTs as enabling a better creator economy
DAOs & Governance
===================
_In-depth page: [DAO](DAO.md)_
* [Beginner's guide to DAOs](https://linda.mirror.xyz/Vh8K4leCGEO06_qSGx-vS5lvgUqhqkCz9ut81WwCP2o) (Mar 2021)
* examples of what DAOs can do (e.g. shared ownership of a valuable asset, governance)
* [The DAO of DAOs](https://www.notboring.co/p/the-dao-of-daos-5b9) (Mar 2021)
* [Running List of DAOs](https://deepdao.io/#/deepdao/dashboard)
Byzantine Fault Tolerance & Proof-of-Stake algos
===================================================
At this point, we'd recommend learning about alternative smart contract blockchains.
A fundamental design decision in blockchains is the mechanism by which block producers (miners
in Bitcoin and Eth 1.0) come to consensus on the next block. This problem of doing so in a
distributed system with a variety of actors--some of whom may be sending intentionally confusing
or destabilizing messages to their peers--is the key to establishing consensus and progressing the
blockchain.
Bitcoin and Eth 1.0 accomplish this by proof of work ("Nakamoto consensus"),
but most other blockchains use variants of a different family of algorithms referred to as
**Byzantine Fault Tolerant (BFT)** algorithms.
* [Understanding Blockchain Fundamentals: Byzantine Fault Tolerance](https://medium.com/loom-network/understanding-blockchain-fundamentals-part-1-byzantine-fault-tolerance-245f46fe8419)
* [Nakamoto Consensus vs BFT](https://medium.com/@yaoshiang/the-interplay-of-nakamoto-consensus-and-byzantine-fault-tolerance-9aeed9d102f5)
* [Tendermint: Byzantine Fault Tolerance](https://knowen-production.s3.amazonaws.com/uploads/attachment/file/1814/Buchman_Ethan_201606_Msater%2Bthesis.pdf)
* Overview of BFT algorithms and how proof of stake chains can work, in the form of a masters thesis from the co-founder of Cosmos.
L1s
=====
_In-depth page: [L1](L1)_
At this point you might want to dig into different L1 blockchains--both their protocol designs and their ecosystems.
See in-depth pages below:
* [Historical/academic background](L1/README.md)
* [Bitcoin](L1/Bitcoin.md)
* [Ethereum](L1/Ethereum.md)
* [Avalanche](L1/Avalanche.md)
* [Flow](L1/Flow.md)
* [Aptos](L1/Aptos.md)
* [BSC](L1/BSC.md)
* [Cosmos](L1/Cosmos.md)
* [NEAR](L1/NEAR.md)
* [Polkadot](L1/Polkadot.md)
* [Polygon](L1/Polygon.md)
* [Solana](L1/Solana.md)
* [Terra](L1/Terra.md)
* [Sui](L1/Sui.md)
L2s
===============
_In-depth page: [L2](L2.md)_
* [L2 for Beginners](https://gourmetcrypto.substack.com/p/layer-2-for-beginners) (Mar 2021)
* describing a mental model of an L2 as a chain which writes enough state back to Ethereum that
no one (including the L2's miners/validators) can send back a fraudulent state
* [Almost everything you need to know about optimistic rollups](https://www.paradigm.xyz/2021/01/almost-everything-you-need-to-know-about-optimistic-rollup/) (Jan 2021)
* builds up the design for optimistic rollups from first principles, addressing various perceived issues as they arise
* [Optimistic rollups: Arbitrum vs Optimism](https://insights.deribit.com/market-research/making-sense-of-rollups-part-2-dispute-resolution-on-arbitrum-and-optimism/) (Jul 2021)
* [Optimistic rollups vs ZK-rollups](https://limechain.tech/blog/optimistic-rollups-vs-zk-rollups/) (Aug 2021)
* a recent assessment of the state of various rollup projects
Trading mechanics
===============
_In-depth page: [TradingDynamics](TradingDynamics.md)_
_In-depth page: [MEV/Arbitrage](MEV.md)_
Smart contract programming
============================
_In-depth page: [Development](Dev)_
* [Programming for EVM](Dev/EVM.md)
* [Smart contract security](Dev/Security.md)
* [Programming for Solana](Dev/SolanaProgramming.md)
Economic design
============================
_In-depth page: [EconDesign](EconDesign.md)_
Tools & Analytics
===============
_In-depth page: [Tools](Tools.md)_
Exercises
===========
Check your understanding with _[these thought questions and exercises](Exercises.md)._
Other references
==================
### Other lists/directories
_In-depth page: [Other Lists](OtherLists.md)_
### Original research
_In-depth page: [Researchers](Researchers.md)_
### Online courses
* [Berkeley DeFi](https://berkeley-defi.github.io/f21)
* [Foundations of Blockchain (Columbia)](https://www.youtube.com/watch?v=KNJGPI0fuFA&list=PLEGCF-WLh2RLOHv_xUGLqRts_9JxrckiA)
| null | cryptocurrency,ethereum,solana,cosmos,rollups,defi,nft,dao,bitcoin | 0 | 12 | 17 | 25 | 2 | 2 | 0 |
fholger/vrperfkit | VR Performance Toolkit
======================
Performance-oriented collection of mods for VR games.
Included mods:
* Upscaling techniques (render at lower resolution and upscale to target resolution)
* AMD FidelityFX Super Resolution
* NVIDIA Image Scaling
* AMD Contrast Adaptive Sharpening
* Fixed foveated rendering (render center of image at full resolution, but drop resolution towards edges)
* Variable Rate Shading (only for NVIDIA RTX / GTX 16xx cards)
Planned mods:
* "Fixed foveated" rendering (render fewer pixels at the edges of the screen)
* Radial Density Masking (all GPUs, but works only with a handful of games)
* Force hidden area mask: don't render pixels at the edges that are not visible in the headset.
Many games already use this mask, but not all. This mod will allow you to force its usage.
Supported VR runtimes:
* Oculus
* OpenVR
Supported graphics APIs:
* Direct3D 11
## Installation
Extract `dxgi.dll` and `vrperfkit.yml` next to the game's main executable.
For Unreal Engine games, this is typically `<Game>Game\Binaries\Win64\<Game>Game-Win64-Shipping.exe`.
Edit the `vrperfkit.yml` config file to your heart's content. The available options are
documented inside the config file; you'll have to experiment with them and try which options
work for your particular game.
## Build instructions
Clone the repository and init all submodules.
```
git clone https://github.com/fholger/vrperfkit.git
cd vrperfkit
git submodule init
git submodule update --recursive
```
Download the [Oculus SDK](https://developer.oculus.com/downloads/package/oculus-sdk-for-windows)
and extract `LibOVR` from the downloaded archive to the `ThirdParty` folder.
Download [NVAPI](https://developer.nvidia.com/nvapi) (requires NVIDIA developer account) and extract
the contents of the `Rxxx-developer` folder to `ThirdParty\nvapi`.
Run cmake to generate Visual Studio solution files. Build with Visual Studio. Note: Ninja does not work,
due to the included shaders that need to be compiled. This is only supported with VS solutions.
| VR Performance Toolkit | null | 9 | 1 | 2 | 84 | 106 | 3 | 0 |
btholt/complete-intro-to-web-dev-v3 | <p align="center"><a href="https://frontendmasters.com/courses/web-development-v3/"><img alt="code logo" title="code" src="./public/images/course-icon.png" /></a></p>
[![Frontend Masters](https://static.frontendmasters.com/assets/brand/logos/full.png)][fem]
<p align="center">
Build your first web app with little code experience with industry veteran Brian Holt.
</p>
[Course code icon created by Freepik - Flaticon](https://www.flaticon.com/free-icons/code)
## License
The **code** is this repo is licensed under the Apache 2.0 license.
The **content** is licensed under CC-BY-NC-4.0.
[fem]: https://frontendmasters.com/courses/web-development-v3/
| The Complete Intro to Web Dev v3, as taught on Frontend Masters | null | 0 | 3 | 20 | 34 | 41 | 2 | 1 |
coral-xyz/backpack | <div align="center">
<img src="/assets/backpack.png" />
<h1>Backpack</h1>
<p>
<strong>A home for your xNFTs</strong>
</p>
<p>
<a href="https://github.com/coral-xyz/backpack/actions"><img alt="Build Status" src="https://github.com/coral-xyz/backpack/actions/workflows/pull_requests_and_merges.yml/badge.svg" /></a>
<a href="https://docs.xnfts.dev"><img alt="Tutorials" src="https://img.shields.io/badge/docs-tutorials-blueviolet" /></a>
<a href="https://discord.gg/RhKxgS8SaD"><img alt="Discord Chat" src="https://img.shields.io/badge/chat-discord-blueviolet" /></a>
</p>
</div>
### Note
- Backpack is in active development, so all APIs are subject to change.
- This code is unaudited. Use at your own risk.
- I repeat. This is not ready for production.
# Table of contents:
- [Table of contents:](#table-of-contents)
- [Installing the Latest Release](#installing-the-latest-release)
- [Developing Locally](#developing-locally)
- [Pull the code](#pull-the-code)
- [Temporary preliminary steps](#temporary-preliminary-steps)
- [Enable self-signed local SSL certs](#enable-self-signed-local-ssl-certs)
- [Environment variables](#environment-variables)
- [Install dependencies](#install-dependencies)
- [Build all packages for production](#build-all-packages-for-production)
- [Start everything inside `./packages` for development](#start-everything-inside-packages-for-development)
- [Troubleshooting](#troubleshooting)
- [Install the development version of the extension](#install-the-development-version-of-the-extension)
- [Not seeing the dev folder?](#not-seeing-the-dev-folder)
- [Optionally install the built extension](#optionally-install-the-built-extension)
- [License](#license)
## Installing the Latest Release
If you'd like to install the latest dev release, grab the latest **build.zip** [here](https://github.com/coral-xyz/backpack/releases)
and add it to your local chrome profile, using developer mode. See the video below.
## Developing Locally
https://user-images.githubusercontent.com/101902546/173857300-fc139113-0af5-46fc-baad-236a2ebf63f1.m4p
### Pull the code
```bash
git clone git@github.com:coral-xyz/backpack.git
cd backpack
```
### Temporary preliminary steps
#### Enable self-signed local SSL certs
Go to chrome://flags/#allow-insecure-localhost and enable the toggle, then restart chrome. Note: Please don't enable this if you don't know what you're doing. It will leave you vulnerable to exploits if left on. It is recommended to undo this step when you are done developing.
#### Environment variables
### Install dependencies
```bash
yarn install
```
You can also optionally rename `.env.example` to `.env` and set your own variables.
### Build all packages for production
```bash
yarn build
```
### Start everything inside `./packages` for development
```bash
yarn start
```
Note: In a fresh repo, you should run `yarn build` before `yarn start`.
#### Troubleshooting
_If you run into issues with builds try running `yarn clean` and then start again._
<details>
<summary>Seeing `WebSocket connection to 'wss://localhost:9997/ws' failed` error messages in your console?</summary>
You need to install a SSL certificate for localhost as the one provided by [webpack-dev-server is considered invalid](https://github.com/webpack/webpack-dev-server/issues/2957). This step is optional as `react-refresh` will still function without it, but it's a good idea to try and fix this error because otherwise your browser will be making a lot of failed requests and `webpack-dev-server` might not be functioning to its full capabilities.
A relatively simple way of doing this is using [mkcert](https://github.com/FiloSottile/mkcert)
Instructions for how to install a trusted self-signed cert on macOS -
```
cd packages/app-extension
brew install mkcert
mkcert localhost
mkcert -install
```
Now the next time you run `yarn start` the errors should no longer appear.
</details>
### Install the development version of the extension
Go to chrome://extensions, enable developer mode (top right) and drag the `packages/app-extension/dev` dir into the window. This version will have (Dev) in the title and supports live-reloading.
#### Not seeing the dev folder?
- Do you have a stale node process running? Try to kill it all: `killall -9 node` and start over
- Try running `yarn start` from within `packages/app-extension` while running `yarn start` from root. This should work.
### Optionally install the built extension
If you want to try the production build of the extension, run `yarn build` and drag the `packages/app-extension/build` dir into chrome://extensions as above. This version won't have hot-reloading and local plugins won't be visible unless you also run `yarn start`
## License
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion by you shall be licensed at the discretion of the repository maintainers without any additional terms or conditions.
| 🎒 Next level crypto wallet | null | 1,000 | 77 | 2,648 | 1 | 476 | 136 | 8 |
Zaplib/zaplib | # ⚡ Zaplib
**Zaplib** is an open-source library for speeding up web applications using Rust and WebAssembly. It lets you write high-performance code in Rust, alongside your existing JavaScript code, using simple APIs.
To get started, view the [docs](https://zaplib.com/docs).
## License
Zaplib is distributed under the terms of both the MIT license and the Apache License (version 2.0).
See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) for details. Third party license notices are available in [LICENSES-THIRD-PARTY](LICENSES-THIRD-PARTY).
| ⚡ Zaplib is an open-source library for speeding up web applications using Rust and WebAssembly. | null | 0 | 8 | 114 | 353 | 74 | 13 | 1 |
svelteuidev/svelteui | <div id="top"></div>
<br />
<div align="center">
<img src="gallery/Logo.png" alt="Logo" width="80" height="80">
<a href="https://github.com/svelteuidev/svelteui">
<h1 align="center">SvelteUI</h1>
</a>
[![NPM](https://img.shields.io/github/license/svelteuidev/svelteui)](https://github.com/svelteuidev/svelteui/blob/main/LICENSE)
[![GitHub contributors](https://img.shields.io/github/contributors/svelteuidev/svelteui)](https://github.com/svelteuidev/svelteui/graphs/contributors)
[![npm](https://img.shields.io/npm/v/@svelteuidev/core)](https://www.npmjs.com/package/@svelteuidev/core)
[![npm](https://img.shields.io/npm/dm/@svelteuidev/core)](https://www.npmjs.com/package/@svelteuidev/core)
[![Help wanted](https://img.shields.io/github/labels/svelteuidev/svelteui/help%20wanted?label=Contribute)](https://github.com/svelteuidev/svelteui/labels/help%20wanted)
[![Discord](https://img.shields.io/badge/Chat%20on-Discord-%235865f2)](https://discord.gg/2J2xmzCS79)
<p align="center">
SvelteUI is an all inclusive Svelte library - Components, Actions, Utilities, Animations <br /> What more could you ask for ¯\_(ツ)_/¯
<br />
<a href="https://svelteui.dev/"><strong>Explore the docs »</strong></a>
<br />
<a href="https://github.com/svelteuidev/svelteui/issues">Report Bug</a>
·
<a href="https://github.com/svelteuidev/svelteui/issues">Request Feature</a>
</p>
</div>
<br />
## **About The Project**
[Read the Changelog](https://svelteui.dev/changelog/v0-6-0)
### Features
- [SvelteKit](https://kit.svelte.dev/) and SSR Compatible
- [TypeScript](https://typescriptlang.org/) and type definitions are supported, but optional
- All components are accessible according to [WAI-ARIA](https://www.w3.org/WAI/standards-guidelines/aria/) standards
- Dark theme included, as well as a custom theming api
- Minimal third-party dependency usage
- Easy setup - **Zero Configuration**
<br />
## Packages
**[`@svelteui/core`](https://svelteui.dev/core/button)** - core components library with 40+ components
**[`@svelteui/composables`](https://svelteui.dev/composables/use-click-outside)** - collection of 20+ useful actions and utilities
**[`@svelteui/dates`](https://svelteui.dev/dates/getting-started)** - calendars, date and time pickers based on SvelteUI components
**[`@svelteui/preprocessors`](https://svelteui.dev/preprocessors/view-source)** - Svelte preprocessor library to assist in many areas of development
**[`@svelteui/motion`](https://svelteui.dev/motion/typewriter)** - collection of transitions to utilize on dom elements
**[`@svelteui/prism`](https://svelteui.dev/others/prism)** - code highlight component built with prism action
<br />
## Getting help
I want to build a friendly community that is happy to help those who need it. Help build one up by joining the discord |:
- [Join Discord community](https://discord.gg/2J2xmzCS79) – it will be the easiest way to get help.
- [Github Discussions](https://github.com/svelteuidev/svelteui/discussions) - you can discuss anything relating to the project here.
<br />
## Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
- If you have a suggestion that would make this project better, submit an issue
- If you would like to directly contribute, read the [contribution guide](https://svelteui.dev/contributing) then submit a PR
<br />
## Contributors
<a href="https://github.com/svelteuidev/svelteui/graphs/contributors">
<img src="https://contrib.rocks/image?repo=svelteuidev/svelteui" />
</a>
<br />
## License
Everything in the project is distributed under the MIT License
<br />
## Contact
- Twitter - [Brisklemonaid](https://twitter.com/brisklemonaid)
- Discord - [SvelteUI Discord](https://discord.gg/2J2xmzCS79)
<p align="right">(<a href="#top">back to top</a>)</p>
## Roadmap & TO-DO's
**Here is where you can find the Roadmap for SvelteUI up to version 1.0**
We would love to hear from you in issues, discussions, and discord to improve the roadmap. As we proceed along our roadmap, we continue to learn. As a result, some of the listed topics may no longer be relevant to us, therefore as the project develops, we might add or remove topics. We will pay close attention to your suggestions and if necessary, modify our plans.
We use certain "Marks" to give you quick indications of the current state of any item in the roadmap. The colorful icons can be displayed by typing `:COLOR_circle:`
Annotation legend:
| Mark | Description |
| --------------- | -------------------------------------------------- |
| ! | low level of priority |
| !! | medium level of priority |
| !!! | high level of priority |
| :red_circle: | no work has been started |
| :yellow_circle: | actively being worked on or going to start working |
| :green_circle: | work has been completed |
There are different categories on the roadmap. Items for versions `0.8–1.0` and potential future plans are included in each category. To make things quick and simple to view, the items are listed in a table.
> Roadmap is currently a WIP
### REPO/MISC:
| Status | Priority | Description |
| --------------- | -------- | -------------------------------------------------------------------- |
| :red_circle: | ! | Move Stitches to peer-deps (svelteui-core) |
| :green_circle: | !! | Upgrade to latest SvelteKit version (leverage Vite 3.0.0) |
| :green_circle: | !! | Migrate package manager from `npm` to `yarn` |
| :yellow_circle: | !! | Migrate dev environment to Storybook for all packages |
| :red_circle: | !! | Add peerdeps fix to prepare:release script |
| :red_circle: | !! | Figure out how to get cjs,esm,umd distributions in release processes |
| :red_circle: | !!! | Figure out how to add minification to the release processes |
**Version 1.0.0:**
**Future:**
### DOCS:
- [ ]
| Status | Priority | Description |
| --------------- | -------- | ---------------------- |
| :yellow_circle: | !!! | Migration to SvelteKit |
**Version 1.0.0:**
**Future:**
### SVELTEUI-CORE:
> Component creation, deletion, and modification should always be discussed with a maintainer before taking any action (Discord, Issues, and Discussions)!
| Status | Priority | Description |
| -------------- | -------- | ---------------------------------------------------- |
| :red_circle: | ! | Create `Section` component |
| :red_circle: | ! | Create `ScrollArea` component |
| :red_circle: | ! | Create `Accordion` component |
| :red_circle: | ! | Create `ARIA` component |
| :red_circle: | ! | Create `Slider` component |
| :red_circle: | ! | Create `SegmentedControl` component |
| :green_circle: | ! | Create `Chip` component |
| :red_circle: | ! | Create `Select` component |
| :green_circle: | !!! | Find an effective solution to SSR in SSR mode (#172) |
| :green_circle: | !!! | Find an effective solution to SSR in SSG mode (#107) |
| :red_circle: | !!! | Fix types for native events |
**Version 1.0.0:**
**Future:**
### SVELTEUI-COMPOSABLES:
> Composable creation and deletion should always be discussed with a maintainer before taking any action (Discord, Issues, and Discussions)!
| Status | Priority | Description |
| ------------ | -------- | ----------- |
| :red_circle: | ! | Placeholder |
**Version 1.0.0:**
**Future:**
### SVELTEUI-DATES:
| Status | Priority | Description |
| --------------- | -------- | --------------------------- |
| :red_circle: | !! | Create TimePicker component |
| :yellow_circle: | !!! | Complete Calendar component |
**Version 1.0.0:**
**Future:**
### SVELTEUI-PREPROCESSORS:
**Version 1.0.0:**
**Future:**
- [ ] think of new preprocessors to create
### SVELTEUI-PRISM:
| Status | Priority | Description |
| ------------ | -------- | ------------------------------- |
| :red_circle: | ! | Add more tokens to style object |
| :red_circle: | !!! | Adapt new styling practices |
**Version 1.0.0:**
**Future:**
### SVELTEUI-NOTIFICATIONS:
- [ ] create new notifications package
<p align="right">(<a href="#top">back to top</a>)</p>
| SvelteUI Monorepo | null | 23 | 25 | 265 | 753 | 59 | 4 | 2 |
peng-zhihui/Planck-Pi | - [ 0.说明](#head1)
- [ 芯片介绍](#head2)
- [ 基础知识](#head3)
- [1. F1Cxxxs芯片的上电启动顺序](#head4)
- [2. 开发工具链下载](#head5)
- [ 1.硬件开发](#head6)
- [ 2.环境准备](#head7)
- [2.1 准备Docker开发环境](#head8)
- [2.1.1 安装依赖软件](#head9)
- [2.2.2 安装编译工具链](#head10)
- [2.4 常规编译方法](#head12)
- [2.5 烧写方法](#head13)
- [ 3.u-boot开发](#head14)
- [ 4.Linux内核开发](#head15)
- [ 5.root-fs开发](#head16)
- [5.1 准备环境](#head17)
- [5.2 构建Debian文件系统](#head18)
- [5.3 配置文件系统](#head19)
- [5.3.1 最小配置](#head20)
- [5.3.2 增加开机自启脚本](#head21)
- [5.3.3 解决root-fs分区开机后被挂载为*Read-Only*的问题](#head22)
- [5.3.4 添加USB-OTG & Gadget-RNDIS功能](#head23)
- [5.3.5 启用swap](#head24)
- [ 5.4 打包&部署文件系统](#head25)
- [ 6.应用开发](#head26)
- [6.1 系统应用集成](#head27)
- [6.2 驱动开发](#head28)
- [6.3 Linux App开发](#head29)
- [ 7.问题总结](#head30)
## <span id="head1"> 0.说明</span>
> 本项目是一个基于全志F1C200s芯片的超迷你&低成本的Linux开发板,本来是用于个人的某个小项目调试,现把所有硬件、软件(u-boot、内核、root-fs)开源出来。
>
> **板载资源:**
>
> * 一个OLED 128x80
> * 一个麦克风 & 功放可以外接喇叭
> * 双面不同功能的Type-C接口分别提供`USB转串口`以及`USB-OTG`功能
> * 一个USB-A口用于外接设备
> * SD卡插槽
> * 引出绝大部分IO
>
> 板卡成本应该不到50RMB,而且提供了很多资料,很适合用于新手作为入门Linux学习的开发板。
![](7.Docs/2.Images/1.jpg)
![](7.Docs/2.Images/2.jpg)
### <span id="head2"> 芯片介绍</span>
> 全志F1C200s是全志的一款高度集成、低功耗的移动应用处理器,可用于多种多媒体音视频设备中。
`F1C200s`基于ARM 9架构,芯片集成了SiP的DDR,外围电路可以极其简单;它支持高清视频解码,包括H.264、H.263、MPEG 1/2/4等,还集成了音频编解码器和I2S/PCM接口,是一款开发简单、性价比较高的产品,也适合用来做入门级的Linux开发板。
---
| 功能 | 描述 |
| ------------ | ------------------------------------------------------------ |
| CPU | ARM9 CPU architecture,16KByte D-Cache,2KByte I-Cache |
| Memory | SIP 64MB DDR1,SD2.0,eMMC 4.41 |
| Video | H.264 1920x1080@30fps decoding<br/>MPEG1/2/4 1920x1080@30fps decoding<br/>MJPEG 1280x720@30fps encoding<br/>JPEG encode size up to 8192x8192 |
| Camera | 8-bit CMOS-sensor interface<br/>CCIR656 protocol for NTSC and PAL |
| Audio | Integrated analog audio codec with two DAC channels and one ADC channel,maximum 192kHz DAC sample rate and 48kHz ADC sample rate<br/>One I2S/PCM interface |
| Display | LCD RGB interface up to 1280x720@60fps<br/>TV CVBS output, support NTSC/PAL, with auto plug detecting |
| Connectivity | USB OTG, SDIO,IR, 3 x TWI, 2 x SPI, 3 x UART |
| OS | Melis, Linux OS |
| Package | QFN88, 10mm x 10mm |
| Process | 40nm |
| 特点 | 支持H.264 1920x1080@30fps 解码<br/>支持MJPEG 1280x720@30fps 编码<br/>集成 64MB DDR1,集成音频CODEC<br/>低成本,低功耗,开发简单 |
![20220401221925](https://pengzhihui-markdown.oss-cn-shanghai.aliyuncs.com/img/20220405172955.png)**与其他系列芯片的对比:**
![image-20220401222336539](https://pengzhihui-markdown.oss-cn-shanghai.aliyuncs.com/img/20220401222336.png)
### <span id="head3"> 基础知识</span>
#### <span id="head4">1. F1Cxxxs芯片的上电启动顺序</span>
> 芯片可以从SPI Flash或者SD-Card中启动,因为Flash容量较小可玩性不高,后文都是以SD卡启动为主的。
>
> **参考:**[F1C100s启动时搜索SPI Flash的顺序?](https://whycan.com/t_1746.html)
>
> 1. 上电后, f1c100s内部 BROM (芯片内置,无法擦除) 启动;
> 2. 首先检查 SD0 有没有插卡, 如果有插卡就读卡 8k偏移数据,是否是合法的启动数据, 如果是BROM 引导结束, 否则进入下一步;
> 3. 检测SPI0 NOR FLASH(W25QXXX, MX25LXXX) 是否存在, 是否有合法的启动数据, 如果是BROM 引导结束, 否则进入下一步;
> 4. 检测SPI0 NAND FLASH 是否存在, 是否有合法的启动数据, 如果是BROM 引导结束, 否则进入下一步;
> 5. 因为找不到任何可以引导的介质, 系统进入usb fel 模式, 可以用USB烧录了。
#### <span id="head5">2. 开发工具链下载</span>
> 编译工具链官网:https://www.linaro.org/
>
> 或[Arm GNU Toolchain](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain),以linaro为例:进入`support->downloads`可以看到下载页面,点击`GNU cross-toolchain binary archives`,可以进入对应[下载列表](https://releases.linaro.org/components/toolchain/binaries/),可以看到各个版本的toolchain,这里我使用的`latest-7/arm-linux-gnueabi/`即`gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi`即可。
>
## <span id="head6"> 1.硬件开发</span>
![](7.Docs/2.Images/3.jpg)
原理图见仓库的源文件和PDF,需要说明的点是:
* 板子的Type-C采用正反插不同功能,正面是USB转TTL串口功能,用于内核调试,反面是芯片的USB功能,在内核中我开启了USB的RNDIS网卡也就是说可以通过这个USB口模拟出一个网卡然后共享电脑的网络,**也就不需要外接WiFi和以太网模块了很方便。**
* 由于芯片只有一个USB接口,因此为了能使板子作为Host外接其他设备,我在板卡上添加了一个OTG的跳线:
![](7.Docs/2.Images/4.jpg)
正常情况下不接跳线的话OTG功能为Device模式,也就是可以通过TypeC接口模拟网卡或者其他设备如MTP;当插上跳线帽之后,就可以作为Host在右边的A口插入USB设备了如U盘、键盘、鼠标等,**注意此时C口的USB功能失效,需要通过串口登录板子。**
## <span id="head7"> 2.环境准备</span>
**推荐直接使用我配置好的完整镜像,用Etcher等工具直接烧写到SD卡里即可以使用,方便又好用~**
> 镜像的账户:
>
> * pi 密码:planck
> * root 密码:planck
下面的教程是给需要自己配置uboot、内核、文件系统的人看的。
### <span id="head8">2.1 准备Docker开发环境</span>
为了最小化编译环境,这里采用Docker构建ubuntu20.04镜像的方式来搭建环境。
#### <span id="head9">2.1.1 安装依赖软件</span>
首先需要自己安装一下Docker(百度一下教程),然后pull一下Ubuntu官方的Docker镜像到本地,选择版本为`ubuntu:20.04`:
```
sudo docker pull ubuntu:20.04
```
> 实际操作中使用了我自己预先配置好的本地镜像(安装了nano、ssh等软件,更新了国内的apt源等)。
然后启动容器(修改为你自己的相关路径):
```
sudo docker run -it --name planck-pi-env --network host \
-p 8022:22 \
-v /home/pengzhihui/WorkSpace:/workspace \
--privileged \
planck-pi-env.image:latest
```
进入容器之后执行`apt update`核`apt upgrade`更新软件,接下来安装依赖的软件包:
```
sudo apt-get install xz-utils nano wget unzip build-essential git bc swig libncurses5-dev libpython3-dev libssl-dev pkg-config zlib1g-dev libusb-dev libusb-1.0-0-dev python3-pip gawk bison flex
```
#### <span id="head10">2.2.2 安装编译工具链</span>
按照前文介绍的地址下载工具链(可以在VMware宿主机进入共享文件夹操作):
```
wget http://releases.linaro.org/components/toolchain/binaries/7.2-2017.11/arm-linux-gnueabi/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz
```
> **注意:**GCC版本要大于 6;此处为获取交叉编译链为7.2.1版本,也可以自行下载其他版本。
将工具链压缩包解压:
```
mkdir /usr/local/arm
tar -vxf gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi.tar.xz -C /usr/local/arm
```
配置环境变量:
```
nano ~/.bashrc
```
打开文件添加下面的变量:
```
export PATH=$PATH:/usr/local/arm/gcc-linaro-7.2.1-2017.11-x86_64_arm-linux-gnueabi/bin
```
使环境变量立即生效 :
```
source ~/.bashrc
```
查询版本,确认安装成功 :
```
arm-linux-gnueabi-gcc -v
```
配置完成后可以commit容器到镜像方便未来部署:
```
sudo docker commit planck-pi-env planck-pi-env.image
sudo docker save -o planck-pi-env.image.tar planck-pi-env.image
```
### <span id="head12">2.4 常规编译方法</span>
进入源码目录, 执行下述命令进行编译:
```
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4
```
> 在uboot顶层`Makefile`的250行左右,添加默认编译器,就可以直接用`make`编译省去后面的参数了:
>
> ```
> ifeq ($(HOSTARCH),$(ARCH))
> CROSS_COMPILE ?=
> endif
>
> ARCH ?= arm
> CROSS_COMPILE ?= arm-linux-gnueabi-
> ```
### <span id="head13">2.5 烧写方法</span>
> FEL烧写方法这里不使用, 有兴趣可以参考这些教程了解:
>
> * [全志sunxi-tools烧录工具安装和使用](https://blog.csdn.net/p1279030826/article/details/112719638)
> * [全志V3S 编译运行xboot笔记](https://www.cnblogs.com/bigmagic/p/12373290.html)
**这里介绍TF卡的烧写方法。**
在TF卡上构建系统之前,需要将TF卡进行分区与格式化。
> 也可以使用GParted等软件做图形化的操作:
>
> ![image-20220402200042470](https://pengzhihui-markdown.oss-cn-shanghai.aliyuncs.com/img/20220402200042.png)
命令行方式如下,首先查看电脑上已插入的TF卡的设备号(一般为 /dev/sdb1,下面以/dev/sdb1为例:
```
sudo fdisk -l
```
若自动挂载了TF设备,先卸载(有多个分区则全部卸载):
```
sudo umount /dev/sdb1...
```
进行分区操作:
```
sudo fdisk /dev/sdb
```
操作步骤如下:
1. 若已存分区即按 d 删除各个分区
2. 通过 n 新建分区,第一分区暂且申请为1M用于储存uboot-with-spl,第二分区32M用于储存Linux内核,剩下的空间都给root-fs
> * **第一分区操作**:p 主分区、默认 1 分区、默认2048、+16M
>
> ```
> n p [Enter] [Enter] [Enter] +1M
> ```
>
> * **第二分区操作**:p 主分区、2 分区、默认2048、+128M
>
> ```
> n p [Enter] [Enter] [Enter] +128M
> ```
>
> * **第三分区操作**:p 主分区、3 分区、默认2048,剩下的全部分配
>
> ```
> n p [Enter] [Enter] [Enter] [Enter]
> ```
>
> * w 保存写入并退出
分区格式化:
```
sudo mkfs.vfat /dev/sdb1 # 将第1分区格式化成FAT
sudo mkfs.ext4 /dev/sdb2 # 将第2分区格式化成FAT
sudo mkfs.ext4 /dev/sdb3 # 将第3分区格式化成EXT4
```
> **格式说明:**
>
> * EXT4:只用于Linux系统的内部磁盘
> * NTFS:与Windows共用的磁盘
> * FAT:所有系统和设备共用的磁盘
使用dd将`u-boot-sunxi-with-spl.bin`烧写进第一分区:
```
sudo dd if=path/to/u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
sync
```
> **注意:**这里的`bs=1024 seek=8`是添加了8192字节的偏移,之所以要加8K偏移是因为FSBL也就是bootROM里面硬写死了会从设备的8K地址处加载SPL,然后进入uboot。因此上面烧写的时候,指定的偏移地址一定是**相对于储存设备硬件的偏移,而不是相对于分区的偏移**!
>
> * 8K的来源是参考`buildroot-mangopi-r/board/allwinner/generic/genimage-sdcard.cfg`文件的描述`offset = 0x2000`。
> * 是否单独划分一个uboot分区其实不重要,因为烧写的时候直接覆盖了但是我们人为设置一个1M大小的区间分隔开,便于和后面的内核储存分区区分。
> * 关于genimage的使用,可以参考billdroot官方的文档描述:[The Buildroot user manual](https://buildroot.org/downloads/manual/manual.html#writing-genimage-cfg) 。
>
> ```
> image bootfs.vfat {
> vfat {
> files = {
> "zImage",
> "devicetree.dtb"
> }
> }
> size = 8M
> }
>
> image sysimage-sdcard.img {
> hdimage {
> }
>
> partition u-boot {
> image = "u-boot-sunxi-with-spl.bin"
> offset = 0x2000
> size = 1016K # 1MB - 8192
> }
>
> partition boot {
> partition-type = 0xC
> bootable = "true"
> image = "bootfs.vfat"
> }
>
> partition rootfs {
> partition-type = 0x83
> image = "rootfs.ext4"
> }
> }
> ```
> * 关于上面`partition-type`的含义可以参考:[Listing of MBR/EBR Partition Types](https://thestarman.pcministry.com/asm/mbr/PartTypes.htm) 。
> * 对于内核的FAT分区,分区完挂载之后直接把zImage和dtb文件放进去就行了,至于如何指定内核镜像和设备树所在分区,可以参考`configs/uboot.env`里面的配置,启动的时候相关参数是在这里被传递给内核的。
## <span id="head14"> 3.u-boot开发</span>
**【待补充】**
**\* uboot的文件结构**
```
.
├── api //封装一些平台无关的操作,如字符串打印,显示,网络,内存
├── arch //以平台架构区分
│ ├──arm
│ │ └──cpu
│ │ │ └──arm926ejs
│ │ │ │ └──sunxi //cpu相关的一些操作,如定时器读取
│ │ │ │ │ └──u-boot-spl.lds //spl的放置方法
│ │ └──dts
│ │ │ └──suniv-f1c100s-licheepi-nano.dts // f1c100s芯片的一些配置
│ │ │ └──suniv-f1c100s-licheepi-nano.dtb
│ │ │ └──suniv-f1c100s.dtsi
│ │ │ └──suniv.dtsi
│ │ └──lib //一些库文件
│ │ └──mach-sunxi
│ │ │ └──board.c //board_init_f
│ │ │ └──dram_sun4i.c //ddr的操作,复位,时钟,延时,odt,etc.
│ │ │ └──dram_helpers.c //ddr的设置及读写测试
├── board
│ ├──sunxi
│ │ └──board.c //sunxi_board_init 入口
│ │ └──dram_suniv.c //DRAM的一些默认参数
├── cmd //Uboot命令行的一些命令
├── common //含spl
├── configs //menuconfig里的默认配置,比如各类驱动适配
│ ├── licheepi_nano_defconfig
│ ├── licheepi_nano_spiflash_defconfig
├── disk //硬盘分区的驱动
├── doc
├── drivers //外设驱动
├── dts
├── examples
├── fs //多种文件系统
├── include
│ ├──configs
│ │ └──sunxi_common.h //预配置的参数,如串口号等
│ │ └──suniv.h
├── lib //加密压缩等算法
├── net //nfs,tftp等网络协议
├── post
├── scripts
```
## <span id="head15"> 4.Linux内核开发</span>
## <span id="head16"> 5.root-fs开发</span>
由于F1C200s的RAM只有64M,无法支持像是Ubuntu-Core这样的文件系统(最低RAM需求512M),所以一般只能用buildroot来生成简单的文件系统,或者裸机开发。
但是为了方便地使用Debian系的丰富软件,我们可以自己构建Debian最小系统,最小rootfs在180MB左右。
### <span id="head17">5.1 准备环境</span>
安装构建文件系统的工具主要有两个:
* 一个是qemu用来模拟ARM9的芯片架构,基于qemu模拟器可以在x86的宿主机上通过chroot切换到ARM环境然后完成root-fs的各种配置。
* 一个是debootstrap ,用来构建Debian文件系统。
> **注意:**上述软件都是需要在安装了交叉编译环境的Docker容器下运行的,否则编译出来的文件系统上版运行的时候会报格式错误。
Docker中运行下面的命令安装软件:
```
apt install qemu-user-static
apt install debootstrap
mkdir path/to/rootfs-debian
```
### <span id="head18">5.2 构建Debian文件系统</span>
构建文件系统之前,需要知道我们想要构建哪个版本的文件系统,这里从[Debian 全球镜像站](https://www.debian.org/mirror/list.zh-cn.html)选择访问速度快的源,这里使用华为源:mirrors.huaweicloud.com。
> **注意:**选择的源需要支持硬件架构`armel`,因为F1Cxxxs是`armel`架构的芯片。
>
> 关于不同架构的区别:
>
> - **armel**:`arm eabi little endian`的缩写,针对旧的 32 位 ARM 处理器,而不支持硬件浮点单元(FPU)
> - **armhf:**`arm hard float`的缩写,仅适用于较新的 32 位 ARM 处理器,其至少实现了 ARMv7 架构,且支持 ARM 矢量浮点规范(VFPv3)第 3 版
> - **arm64:**适用于 64 位 ARM 处理器,64位的arm默认就是hf的,其至少实现了 ARMv8 架构
然后就是debian的版本,使用最新的`buster`:
```
debootstrap --foreign --verbose --arch=armel buster rootfs-debian http://mirrors.huaweicloud.com/debian/
cd rootfs-debian
mount --bind /dev dev/
mount --bind /sys sys/
mount --bind /proc proc/
mount --bind /dev/pts dev/pts/
cd ..
cp /usr/bin/qemu-arm-static rootfs-debian/usr/bin/
chmod +x rootfs-debian/usr/bin/qemu-arm-static
LC_ALL=C LANGUAGE=C LANG=C chroot rootfs-debian /debootstrap/debootstrap --second-stage --verbose
LC_ALL=C LANGUAGE=C LANG=C chroot rootfs-debian
```
### <span id="head19">5.3 配置文件系统</span>
#### <span id="head20">5.3.1 最小配置</span>
构建完成之后,需要在Docker中chroot进去修改密码等配置,通过下面的命令进入chroot环境:
```
LC_ALL=C LANGUAGE=C LANG=C chroot rootfs-debian
```
> **注意:**前文启动Docker容器的时候,一定要加`--privileged`参数,否则上面mount指令会报权限错误。
上面最后一条命令chroot完成,此时可以用`apt-get`等命令给文件系统安装需要的软件包,修改root登录密码等操作:
```
apt install net-tools usbutils ssh
passwd root
# 修改密码
nano /etc/ssh/sshd_config
# 添加SSH权限,修改为PermitRootLogin yes
```
> 可能会出现无法使用方向键的问题,输入`bash`命令进入bash窗口即可。
#### <span id="head21">5.3.2 增加开机自启脚本</span>
文件系统中的`/etc/init.d`负责linux的服务的开启和关闭等,为了能使系统开机自动运行一些脚本和命令,这里介绍如何新添加一个自启动项。
首先我们创建一个文件`/etc/init.d/runOnBoot`,内容如下:
```
#!/bin/sh /etc/init.d/runOnBoot
### BEGIN INIT INFO
# Provides: runOnBoot Required-Start: $local_fs $syslog $network
# Required-Stop: $local_fs $syslog $network Default-Start: 2 3 4 5
# Default-Stop: 0 1 6 Short-Description: runOnBoot startup Description:
# runOnBoot auto startup 1.0
### END INIT INFO
#------------------------------------------------------------------------------
swapon /opt/images/swap
mkdir /sys/kernel/config/usb_gadget/gg
cd /sys/kernel/config/usb_gadget/gg
echo "0x0502" > idVendor
echo "0x3235" > idProduct
mkdir functions/rndis.rn0
mkdir configs/c1.1
ln -s functions/rndis.rn0 configs/c1.1/
echo "musb-hdrc.1.auto" > UDC
ifconfig usb0 192.168.137.2
ifconfig usb0 up
route add default gw 192.168.137.1
# Demo to run a script ↓
# script_path=/home/start.sh
# if [ ! -r ${script_path} ]; then
# echo ${script_path} not existing;
# fi
# . ${myStart_spaddr}
#------------------------------------------------------------------------------
```
给文件添加可执行权限:
```
chmod +x /etc/init.d/runOnBoot
```
最后要添加软链接:
```
ln -s /etc/init.d/runOnBoot /etc/rc2.d/S99runOnBoot
```
> `/etc/rc.d/rc0.d/`~`/etc/rc.d/rc6.d/`文件夹的含义不同,S开头代表是开启时处理的脚本,按照后面紧跟的数字进行按顺序启动,S99则是最后进行启动。
重启即可看到命令和脚本自动执行了。
#### <span id="head22">5.3.3 解决root-fs分区开机后被挂载为*Read-Only*的问题</span>
新配置的文件系统需要添加fstab进行对应分区的自动挂载,修改`/etc/fstab`文件:
```
# <file system> <mount pt> <type> <options> <dump> <pass>
/dev/root / ext2 rw,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620,ptmxmode=0666 0 0
tmpfs /dev/shm tmpfs mode=0777 0 0
tmpfs /tmp tmpfs mode=1777 0 0
tmpfs /run tmpfs mode=0755,nosuid,nodev 0 0
sysfs /sys sysfs defaults 0 0
/opt/images/swap swap swap defaults 0 0
```
#### <span id="head23">5.3.4 添加USB-OTG & Gadget-RNDIS功能</span>
> **参考资料:**
>
> * [全志平台上通过configfs(libcomposite)配置RNDIS Gadget(u_ether)及Windows下的驱动](https://whycan.com/t_6242.html)
> * [USB Gadget/Ethernet - linux-sunxi.org](https://linux-sunxi.org/USB_Gadget/Ethernet#Mainline_kernel_.28via_configfs.29)
> * [LicheePi入坑记录2——使用 Linux Gadget 复合设备共享网络与虚拟串口 – LotLab](https://www.lotlab.org/2018/07/29/record-of-using-licheepi-part-2-using-linux-gadget/)
**USB Gadget**(小饰品),就是指所开发的电子设备以USB-device的模式通过USB连接到主机,比如手机用USB线插入PC后,手机就是USB Gadget。
在本开发板中,可以利用USB Gadget把USB模拟成虚拟网卡、虚拟串口、MTP设备等等非常方便,下面介绍具体的配置方法。
**RNDIS功能开发方法:**
首先需要在内核中开启了相关选项:
```
Device Drivers --->
[*] USB support --->
<M> Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...)
MUSB Mode Selection (Dual Role mode) --->
*** Platform Glue Layer ***
<M> Allwinner (sunxi)
*** MUSB DMA mode ***
[*] Disable DMA (always use PIO)
USB Physical Layer drivers --->
<M> NOP USB Transceiver Driver
<M> USB Gadget Support --->
<M> USB Gadget functions configurable through configfs
[*] RNDIS
```
然后在文件系统中添加一些配置文件:
```
cd /sys/kernel/config/usb_gadget
mkdir gg
cd gg/
echo "0x0502" > idVendor
echo "0x3235" > idProduct
mkdir functions/rndis.rn0
mkdir configs/c1.1
ln -s functions/rndis.rn0 configs/c1.1/
echo "musb-hdrc.1.auto" > UDC
```
启用usb0网卡并设置一个ip地址:
```
ifconfig usb0 192.168.137.2
ifconfig usb0 up
```
> 这里使用137网段的原因是希望后面通过Windows的网络共享功能让板卡通过USB连上互联网,而Windows的共享网段固定是`192.168.137.1` 。
在Windows端安装驱动,手动选择网络适配器,然后添加下面的驱动:
![image-20220403192210458](https://pengzhihui-markdown.oss-cn-shanghai.aliyuncs.com/img/20220403192210.png)
之后会在网络适配器中发现新的网卡设备,配置固定ip如下:
![image-20220403192335548](https://pengzhihui-markdown.oss-cn-shanghai.aliyuncs.com/img/20220403192335.png)
此时通过ping命令应该可以相互ping通了,但是在板卡上可能还是无法连接互联网,需要配置一下默认网关和DNS服务器:
```
route add default gw 192.168.137.1
#但是这样重启以后就不能用了,需要添加到自启脚本中
```
DNS记录在`/etc/resolv.conf`这个文件里,可以按`resolv.conf`文件的格式修改DNS。
```
nano /etc/resolv.conf
修改为:
nameserver 8.8.8.8
```
如果可以ping通www.baidu.com就说明配置完成了。
#### <span id="head24">5.3.5 启用swap</span>
芯片的SiP内存只有64MB,大部分情况下都不够用,所以需要开启swap使用内存卡的一部分空间来作为交换内存。
通过free -m来查看下内存使用状况:
```
# free -m
total used free shared buff/cache available
Mem: 54 15 6 0 31 34
Swap: 0 0 0
```
创建一个自定义的目录`/opt/images/`:
```
mkdir /opt/images/
rm -rf /opt/images/swap
```
创建一个需要内存大小的文件,如512M:
```
# dd if=/dev/zero of=/opt/images/swap bs=1024 count=512000
2048000+0 records in
2048000+0 records out
2097152000 bytes (2.1 GB, 2.0 GiB) copied, 30.3635 s, 69.1 MB/s
```
把创建的文件变成SWAP分区并启用:
```
mkswap /opt/images/swap
swapon /opt/images/swap
```
`free -m`看看SWAP是否生效,ok的话设置开机自动挂载swap:
```
nano /etc/fstab
添加一行:
/opt/images/swap swap swap defaults 0 0
```
### <span id="head25"> 5.4 打包&部署文件系统</span>
配置完成后清理一下缓存,然后退出chroot环境:
```
apt clean
exit
```
在Docker中umount相关文件夹:
```
umount dev/
```
进入文件系统并添加压缩包打包相关文件:
```
cd rootfs-debian
tar cvf ../rootfs-debian.tar .
```
生成的`rootfs-debian.tar`任意解压到SD卡的文件系统分区即可。
或者直接插上SD卡拷贝所有文件(需要在VMware宿主机打开终端操作),在挂载的SD卡root-fs磁盘打开终端,输入:
```
sudo cp -Rf path/to/rootfs-debian/* ./
```
然后插上板卡即可启动。
后续配置,在超级用户权限下执行如下两个命令:
```bash
chown root:root /usr/bin/sudo
chmod 4755 /usr/bin/sudo
nano /etc/hosts
在localhost后面添加一个自己的用户名如pi
```
## <span id="head26"> 6.应用开发</span>
### <span id="head27">6.1 系统应用集成</span>
### <span id="head28">6.2 驱动开发</span>
### <span id="head29">6.3 Linux App开发</span>
## <span id="head30"> 7.问题总结</span>
* [SSH无法连接:Permissions xxx for '/etc/ssh/ssh_host_rsa_key' are too open](https://blog.csdn.net/fly_520/article/details/79991229)
### 其他参考资料
* [【目录】全志F1C100S/F1C200S学习笔记](https://blog.csdn.net/p1279030826/article/details/113370239)
* [《保姆级教程》全志F1C100S/F1C200S spi-flash 启动全流程适配烧录及踩坑指南 ](https://whycan.com/t_7558.html)
* [MangoPi 芒果派 | f1c200s](https://mangopi.cc/f1c200s)
* [荔枝派Nano 全流程指南](http://www.xn--bnq31s.xn--fiqs8s/?id=141)
| Super TINY & Low-cost Linux Develop-Kit Based On F1C200s. | null | 0 | 1 | 2 | 12 | 18 | 1 | 0 |
antfu/handle | ![](./public/og.png)
# 汉兜 Handle
A Chinese Hanzi variation of [Wordle](https://www.powerlanguage.co.uk/wordle/). 汉字 Wordle.
[handle.antfu.me](https://handle.antfu.me)
请勿剧透!PLEASE DO NOT SPOIL
> **Note**
> 汉兜的答案库至 2023 年 2 月 28 日为止将**不再更新**;后序的题目将从过往一年的题目中随机抽取。仓库以 MIT 协议开放,在注明原始仓库与作者的条件下,欢迎 Fork 与修改。感谢大家的对汉兜的支持与喜爱。
## Development Setup
- Insall [Node.js](https://nodejs.org/en/) >=v16 and [pnpm](https://pnpm.io/)
- Run `pnpm install`
- Run `pnpm dev` and visit `http://localhost:4444`
## 成语勘误
成语数据库储存于
- [./src/data/idioms.txt](./src/data/idioms.txt) - 已知的成语列表
- [./src/data/polyphones.json](./src/data/polyphones.json) - 特殊发音的成语列表
二者互不包含。
如遇到成语缺失或发音错误,请编辑 [./src/data/new.txt](./src/data/new.txt) 文件,一行一词,完成后执行 `pnpm run update` 命令,脚本会自动抓取 [汉典](https://www.zdic.net/) 的数据更新成语数据库。如遇汉典中也缺失的成语,其会留存在 new.txt 中,需要手动判断与添加。
## Tech Stack
- [Vue 3](https://v3.vuejs.org/)
- [Vite](https://vitejs.dev/)
- [VueUse](https://vueuse.org/)
- [UnoCSS](https://github.com/antfu/unocss)
- [Vitesse Lite](https://github.com/antfu/vitesse-lite)
## License
[MIT](./LICENSE) License © 2021-PRESENT [Anthony Fu](https://github.com/antfu)
| A Chinese Hanzi variation of Wordle - 汉字 Wordle | wordle,game,wordle-chinese | 0 | 15 | 31 | 256 | 13 | 1 | 0 |
datastack-net/dockerized | ![Dockerized](dockerized-banner.png)
# Dockerized [![Compile and Test](https://github.com/datastack-net/dockerized/actions/workflows/test.yml/badge.svg)](https://github.com/datastack-net/dockerized/actions/workflows/test.yml)
Run popular commandline tools without installing them.
```shell
dockerized <command>
```
![demo](terminalizer.gif)
## Supported commands
> If your favorite command is not included, it can be added very easily. See [Customization](#customization).
> Dockerized will also fall back to over 150 commands defined in [jessfraz/dockerfiles](https://github.com/jessfraz/dockerfiles).
- Cloud
- [aws](apps/aws/README.md)
- [az](apps/az/README.md) (Azure CLI)
- [doctl](apps/doctl/README.md)
- [s3cmd](apps/s3cmd/README.md)
- Database
- dolt
- [mssql](apps/mssql/README.md)
- mysql
- [postgres](apps/postgres/README.md)
- psql
- pg_dump
- pg_dumpall
- Dev-Ops & Docker
- ansible
- ansible-playbook
- helm
- Git
- git
- [gh](apps/gh/README.md) (Github)
- Languages & SDKs
- [dotnet](apps/dotnet/README.md)
- go
- gofmt
- (haskell)
- ghci
- java
- perl
- php
- composer
- (prolog)
- swipl (SWI-Prolog)
- lua
- node
- [npm](apps/npm/README.md)
- npx
- vue
- yarn
- python
- pip
- python
- python2
- ruby
- gem
- rake
- (rust)
- rustc
- typescript
- tsc
- Networking
- http
- telnet
- wget
- Unix
- tree
- zip
- Other
- jq
- [mkdocs](apps/mkdocs/README.md)
- (latex)
- pdflatex
- protoc
- scrapy
- swagger-codegen
- youtube-dl (Youtube downloader)
## Installation
- Make sure [Docker](https://docs.docker.com/get-docker/) is installed on your machine.
- Download the latest zip from our [Release Page](https://github.com/datastack-net/dockerized/releases).
- Extract it to a folder, for example your home directory.
- Add the `dockerized/bin` directory to your `PATH`
<details>
<summary>Instructions</summary>
**Linux / MacOS:**
```bash
export PATH="$PATH:$HOME/dockerized/bin"
```
**Windows**
> See: [How to add a folder to `PATH` environment variable in Windows 10](https://stackoverflow.com/questions/44272416)
</details>
### Running from source
You can run dockerized directly from source-code.
<details>
<summary>Installation from Source
</summary>
- Requirements:
- [Git](https://git-scm.com/downloads)
- [Docker](https://docs.docker.com/get-docker/)
- Steps
- Clone the repository
```shell
git clone https://github.com/datastack-net/dockerized.git
```
- Run `dockerized`:
```shell
bin/dockerized --help
```
- The first time you run dockerized, it will compile itself.
- Compilation is done within docker, no dependencies needed.
- To re-compile after changing the source code, run:
- `dockerized --compile` (runs within docker)
- `dockerized --compile=host` (runs on your machine, requires Go 1.17+)
- You do not need to re-compile to add commands. See [Add a command](DEV.md).
</details>
## Usage
Run any supported command, but within Docker.
```shell
dockerized <command>
```
**Examples**:
```bash
dockerized node --version # v16.13.0
dockerized vue create new-project # create a project with vue cli
dockerized tsc --init # initialize typescript for the current directory
dockerized npm install # install packages.json
```
See [CLI Reference](CLI_REFERENCE.md) for all options.
## Use Cases
- Quickly try out command line tools without the effort of downloading and installing them.
- Installing multiple versions of node/python/typescript.
- You need unix commands on Windows.
- You don't want to pollute your system with a lot of tools you don't use.
- Easily update your tools.
- Ensure everyone on the team is using the same version of commandline tools.
## Design Goals
- All commands work out of the box.
- Dockerized commands behave the same as their native counterparts.
- Files in the current directory are accessible using relative paths.
- Cross-platform: Works on Linux, MacOS, and Windows (CMD, Powershell, Git Bash).
- Suitable for ad-hoc usage (i.e. you quickly need to run a command, that is not on your system).
- Configurability: for use within a project or CI/CD pipeline.
## Switching command versions
### Ad-hoc
Add `:<version>` to the end of the command to override the version.
```shell
dockerized node:15
```
### Listing versions
To see which versions are available, run:
```shell
dockerized node:?
# or
dockerized node:
```
### Environment Variables
Each command has a `<COMMAND>_VERSION` environment variable which you can override.
- python → `PYTHON_VERSION`
- node → `NODE_VERSION`
- tsc → `TSC_VERSION`
- npm → `NODE_VERSION` ⚠ npm's version is determined by node.
> See [.env](.env) for a list of configurable versions.
**Global**
- Create a `dockerized.env` file in your home directory for global configuration.
```shell
# dockerized.env (example)
NODE_VERSION=16.13.0
PYTHON_VERSION=3.8.5
TYPESCRIPT_VERSION=4.6.2
```
**Per project (directory)**
You can also specify version and other settings per directory and its subdirectory.
This allows you to "lock" your tools to specific versions for your project.
- Create a `dockerized.env` file in the root of your project directory.
- All commands executed within this directory will use the settings specified in this file.
**Ad-hoc (Unix)**
- Override the environment variable before the command, to specify the version for that command.
```shell
NODE_VERSION=15.0.0 dockerized node
```
**Ad-hoc (Windows Command Prompt)**
- Set the environment variable in the current session, before the command.
```cmd
set NODE_VERSION=15.0.0
dockerized node
```
## Customization
Dockerized uses [Docker Compose](https://docs.docker.com/compose/overview/) to run commands, which are defined in a Compose File.
The default commands are listed in [docker-compose.yml](docker-compose.yml). You can add your own commands or customize the defaults, by loading a custom Compose File.
The `COMPOSE_FILE` environment variable defines which files to load. This variable is set by the included [.env](.env) file, and your own `dockerized.env` files, as explained in [Environment Variables](#environment-variables). To load an additional Compose File, add the path to the file to the `COMPOSE_FILE` environment variable.
### Including an additional Compose File
**Globally**
To change global settings, create a file `dockerized.env` in your home directory, which loads an extra Compose File.
In this example, the Compose File is also in the home directory, referenced relative to the `${HOME}` directory. The original variable `${COMPOSE_FILE}` is included to preserve the default commands. Omit it if you want to completely replace the default commands.
```bash
# ~/dockerized.env
COMPOSE_FILE="${COMPOSE_FILE};${HOME}/docker-compose.yml"
```
```yaml
# ~/docker-compose.yml
```
**Per Project**
To change settings within a specific directory, create a file `dockerized.env` in the root of that directory, which loads the extra Compose File. `${DOCKERIZED_PROJECT_ROOT}` refers to the absolute path to the root of the project.
```shell
# ./dockerized.env
COMPOSE_FILE="${COMPOSE_FILE};${DOCKERIZED_PROJECT_ROOT}/docker-compose.yml"
```
```yaml
# ./docker-compose.yml
```
### Adding custom commands
After adding your custom Compose File to `COMPOSE_FILE`, you can add your own commands.
```yaml
# docker-compose.yml
version: "3"
services:
du:
image: alpine
entrypoint: ["du"]
```
> Now you can run `dockerized du` to see the size of the current directory.
> To learn how to support versioning, see [Development Guide: Configurable Version](DEV.md#configurable-version).
You can also mount a directory to the container:
```yaml
# docker-compose.yml
version: "3"
services:
du:
image: alpine
entrypoint: ["du"]
volumes:
- "${HOME}/.config:/root/.config"
- "${DOCKERIZED_PROJECT_ROOT}/foobar:/foobar"
```
> Make sure host volumes are **absolute paths**. For paths relative to home and the project root, you can use `${HOME}` and `${DOCKERIZED_PROJECT_ROOT}`.
> It is possible to use **relative paths** in the service definitions, but then your Compose File must be loaded **before** the default: `COMPOSE_FILE=${DOCKERIZED_PROJECT_ROOT}/docker-compose.yml;${COMPOSE_FILE}`. All paths are relative to the first Compose File. Compose Files are also merged in the order they are specified, with the last Compose File overriding earlier ones. Because of this, if you want to override the default Compose File, you must load it before _your_ file, and you can't use relative paths.
> To keep **compatibility** with docker-compose, you can specify a default value for `DOCKERIZED_PROJECT_ROOT`, for example: `${DOCKERIZED_PROJECT_ROOT:-.}` sets the default to `.`, allowing you to run like this as well: `docker-compose --rm du -sh /foobar`.
To customize existing commands, you can override or add properties to the `services` section of the Compose File, for the command you want to customize. For example, this is how to set an extra environment variable for `dockerized aws`:
```yaml
# docker-compose.yml
version: "3"
services:
aws:
environment:
AWS_DEFAULT_REGION: "us-east-1"
```
If you'd like to pass environment variables directly from your `dockerized.env` file, you can expose the variable as follows:
```bash
# dockerized.env
AWS_DEFAULT_REGION="us-east-1"
```
```yaml
# docker-compose.yml
version: "3"
services:
aws:
environment:
AWS_DEFAULT_REGION: "${AWS_DEFAULT_REGION}"
```
For more information on extending Compose Files, see the Docker Compose documentation: [Multiple Compose Files](https://docs.docker.com/compose/extends/#multiple-compose-files). Note that the `extends` keyword is not supported in the Docker Compose version used by Dockerized.
## Localhost
Dockerized applications run within an isolated network. To access services running on your machine, you need to use `host.docker.internal` instead of `localhost`.
```shell
dockerized telnet host.docker.internal 8080 # instead of telnet localhost 8080
```
## Limitations
- It's not currently possible to access parent directories. (i.e. `dockerized tree ../dir` will not work)
- Workaround: Execute the command from the parent directory. (i.e. `cd .. && dockerized tree dir`)
- Commands will not persist changes outside the working directory, unless specifically supported by `dockerized`.
| Run popular commandline tools within docker | null | 42 | 6 | 36 | 302 | 6 | 3 | 2 |
DualSubs/Universal | # 🍿️ DualSubs: 🔣 Universal
* Enhanced & Dual Subtitles for Universal Streaming Media Platform
* 通用流媒体平台字幕增强及双语模块
* **Powered by [Chavy](https://github.com/chavyleung)‘s [Env.js](https://github.com/chavyleung/scripts/blob/master/Env.js) and [🧰 BoxJs](https://chavyleung.gitbook.io/boxjs/)**
* 需要启用`重写`、`脚本`、`MitM`功能
* 有问题请至[Issue页面](../../issues)反馈
* Telegram讨论组:[🍟 整点薯条](https://t.me/GetSomeFries)
---
## 简介
* 详情见项目首页[README.md](https://github.com/DualSubs#%EF%B8%8F-dualsubs)
| 流媒体平台字幕增强及双语模块 | webvtt-subtitles,streaming-services,dual-subtitles,streaming,subtitles,video | 0 | 4 | 27 | 1,447 | 31 | 22 | 1 |
polarsignals/frostdb | <p align="center">
<img width="700" src="https://user-images.githubusercontent.com/4546722/174077529-810726ff-a3c6-4ac4-b0f5-77f065124b09.png">
</p>
---
[![Go Reference](https://pkg.go.dev/badge/github.com/polarsignals/frostdb.svg)](https://pkg.go.dev/github.com/polarsignals/frostdb)
[![Go Report Card](https://goreportcard.com/badge/github.com/polarsignals/frostdb)](https://goreportcard.com/report/github.com/polarsignals/frostdb)
[![Build](https://github.com/polarsignals/frostdb/actions/workflows/go.yml/badge.svg)](https://github.com/polarsignals/frostdb/actions/workflows/go.yml)
[![Discord](https://img.shields.io/discord/813669360513056790?label=Discord)](https://discord.com/invite/ZgUpYgpzXy)
> This project is still in its infancy, consider it not production-ready, probably has various consistency and correctness problems and all API will change!
FrostDB is an embeddable wide-column columnar database written in Go. It features semi-structured schemas, uses [Apache Parquet](https://parquet.apache.org/) for storage, and [Apache Arrow](https://arrow.apache.org/) at query time. Building on top of Apache Arrow, FrostDB provides a query builder and various optimizers (using DataFrame-like APIs).
FrostDB is optimized for use cases where the majority of interactions are writes, with occasional analytical queries over this data. FrostDB was built specifically for [Parca](https://parca.dev/) for Observability use cases.
Read the announcement blog post to learn about what made us create it: https://www.polarsignals.com/blog/posts/2022/05/04/introducing-arcticdb/ (FrostDB was originally called ArcticDB)
## Why you should use FrostDB
Columnar data stores have become incredibly popular for analytics. Structuring data in columns instead of rows leverages the architecture of modern hardware, allowing for efficient processing of data.
A columnar data store might be right for you if you have workloads where you write a lot of data and need to perform analytics on that data.
FrostDB is similar to many other embeddable columnar databases such as [DuckDB](https://duckdb.org/)
FrostDB may be a better fit for you if:
- Are developing a Go program
- Want to embed a columnar database in your program instead of running a separate database server
- Have immutable datasets that don't require updating or deleting
- Your data contains dynamic columns, where the number of columns in the schema may increase at runtime
FrostDB is likely not suitable for your needs if:
- You aren't developing in Go
- You require a standalone database server
- You need to modify or delete your data
- You query by rows instead of columns
## Getting Started
You can explore the [examples](https://github.com/polarsignals/frostdb/tree/main/examples) directory for sample code using FrostDB. Below is a snippet from the simple database example. It creates a database with a dynamic column schema, inserts some data, and queries it back out.
https://github.com/polarsignals/frostdb/blob/ee6970eff139c58a45998a87c02b661f32be5cbe/examples/simple/simple.go#L17-L69
## Design choices
FrostDB was specifically built for Observability workloads. This resulted in several characteristics that make it unique.
Table Of Contents:
* [Columnar Layout](#columnar-layout)
* [Dynamic Columns](#dynamic-columns)
* [Immutable & Sorted](#immutable--sorted)
* [Snapshot isolation](#snapshot-isolation)
### Columnar layout
Observability data is most useful when it is highly dimensional and those dimensions can be searched and aggregated by efficiently. Contrary to many relational databases (MySQL, PostgreSQL, CockroachDB, TiDB, etc.) that store data all data belonging to a single row together, a columnar layout stores all data of the same column in one contiguous chunk of data, making it very efficient to scan and aggregate data for any column. FrostDB uses [Apache Parquet](https://parquet.apache.org/) for storage, and [Apache Arrow](https://arrow.apache.org/) at query time. Apache Parquet is used for storage to make use of its efficient encodings to save on memory and disk space. Apache Arrow is used at query time as a foundation to vectorize the query execution.
### Dynamic Columns
While columnar databases already exist, most require a static schema. However, Observability workloads differ in that data their schemas are not static, meaning not all columns are pre-defined. Wide column databases already exist, but typically are not strictly typed (e.g. document databases), and most wide-column databases are row-based databases, not columnar databases.
Take a [Prometheus](https://prometheus.io/) time-series for example. Prometheus time-series are uniquely identified by the combination of their label-sets:
```
http_requests_total{path="/api/v1/users", code="200"} 12
```
This model does not map well into a static schema, as label-names cannot be known upfront. The most suitable data-type some columnar databases have to offer is a map, however, maps have the same problems as row-based databases, where all values of a map in a row are stored together, resulting in an inability to exploit the advantages of a columnar layout. A FrostDB schema can define a column to be dynamic, causing a column to be created on the fly when a new label-name is seen.
A FrostDB schema for Prometheus could look like this:
```go
type Prometheus struct {
Labels map[string]string `frostdb:",rle_dict,asc(1),null_first"`
Timestamp int64 `frostdb:",asc(0)"`
Value float64
}
```
> Note: We are aware that Prometheus uses double-delta encoding for timestamps and XOR encoding for values. This schema is purely an example to highlight the dynamic columns feature.
With this schema, all rows are expected to have a `timestamp` and a `value` but can vary in their columns prefixed with `labels.`. In this schema all dynamically created columns are still Dictionary and run-length encoded and must be of type `string`.
### Immutable
There are only writes and reads. All data is immutable.
FrostDB maintains inserted data in an Log-structured merge-tree(LSM) like index. This index is implemented as lists of Parts. A Part containers either an Arrow record or a
Parquet file. The first level (L0) contains a list of Arrrow records inserted as-is into the list. Upon reaching the maximum configured size of the level the level will be compacted
into a single Parquet file and added to the next level of the index. This process continues for each configured level of the index until a file is written into the final level of the index.
![LSM Index compacting into higher levels](https://docs.google.com/drawings/d/e/2PACX-1vRckTzb-D57UaxDUSCQjyD4mZN_3_Cu032oA-2kLCu_owrYeaT4nrYCKBP1QYS8EMqv3bI3Kiudt_jV/pub?w=960&h=720)
Upon the size of the entire index reaching the configured max in-memory size the index is rotated out. It can be either configured to be dropped entirely or to be written out to
your storage of choice.
At query time FrostDB will scan each part in the in the index. To maintain fast queries FrostDB leverages the sparse index features of Parquet files, such as bloom filters and min
and max values of columns in each row group such that only the row groups that contain data that can satisfy the query are processed.
### Snapshot isolation
FrostDB has snapshot isolation, however, it comes with a few caveats that should be well understood. It does not have read-after-write consistency as the intended use is for users reading data that are not the same as the entity writing data to it. To see new data the user re-runs a query. Choosing to trade-off read-after-write consistency allows for mechanisms to increase throughput significantly. FrostDB releases write transactions in batches. It essentially only ensures write atomicity and that writes are not torn when reading. Since data is immutable, those characteristics together result in snapshot isolation.
More concretely, FrostDB maintains a watermark indicating that all transactions equal and lower to the watermark are safe to be read. Only write transactions obtain a _new_ transaction ID, while reads use the transaction ID of the watermark to identify data that is safe to be read. The watermark is only increased when strictly monotonic, consecutive transactions have finished. This means that a low write transaction can block higher write transactions to become available to be read. To ensure progress is made, write transactions have a timeout.
This mechanism is inspired by a mix of [Google Spanner](https://research.google/pubs/pub39966/), [Google Percolator](https://research.google/pubs/pub36726/) and [Highly Available Transactions](https://www.vldb.org/pvldb/vol7/p181-bailis.pdf).
![Transactions are released in batches indicated by the watermark](https://docs.google.com/drawings/d/1qmcMg9sXnDZix9eWSvOtWJD06yHsLpgho8M-DGF84bU/export/svg)
## Acknowledgments
FrostDB stands on the shoulders of giants. Shout out to Segment for creating the incredible [`parquet-go`](https://github.com/parquet-go/parquet-go) library as well as InfluxData for starting and various contributors after them working on [Go support for Apache Arrow](https://pkg.go.dev/github.com/apache/arrow/go/arrow).
| ❄️ Coolest database around 🧊 Embeddable column database written in Go. | database,columnar-storage,apache-arrow,apache-parquet,golang | 0 | 30 | 760 | 920 | 7 | 38 | 9 |
koordinator-sh/koordinator | <h1 align="center">
<p align="center">Koordinator</p>
<a href="https://koordinator.sh"><img src="https://github.com/koordinator-sh/koordinator/raw/main/docs/images/koordinator-logo.jpeg" alt="Koordinator"></a>
</h1>
[![License](https://img.shields.io/github/license/koordinator-sh/koordinator.svg?color=4EB1BA&style=flat-square)](https://opensource.org/licenses/Apache-2.0)
[![GitHub release](https://img.shields.io/github/v/release/koordinator-sh/koordinator.svg?style=flat-square)](https://github.com/koordinator-sh/koordinator/releases/latest)
[![CI](https://img.shields.io/github/actions/workflow/status/koordinator-sh/koordinator/ci.yaml?label=CI&logo=github&style=flat-square&branch=main)](https://github.com/koordinator-sh/koordinator/actions/workflows/ci.yaml)
[![Go Report Card](https://goreportcard.com/badge/github.com/koordinator-sh/koordinator?style=flat-square)](https://goreportcard.com/report/github.com/koordinator-sh/koordinator)
[![codecov](https://img.shields.io/codecov/c/github/koordinator-sh/koordinator?logo=codecov&style=flat-square)](https://codecov.io/github/koordinator-sh/koordinator)
[![PRs Welcome](https://badgen.net/badge/PRs/welcome/green?icon=https://api.iconify.design/octicon:git-pull-request.svg?color=white&style=flat-square)](CONTRIBUTING.md)
[![Slack](https://badgen.net/badge/slack/join/4A154B?icon=slack&style=flat-square)](https://join.slack.com/t/koordinator-sh/shared_invite/zt-1756qoub4-Cn4~esfdlfAPsD7cwO2NzA)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8846/badge)](https://www.bestpractices.dev/projects/8846)
English | [简体中文](./README-zh_CN.md)
## Introduction
Koordinator is a QoS based scheduling system for hybrid orchestration workloads on Kubernetes. Its goal is to improve the
runtime efficiency and reliability of both latency sensitive workloads and batch jobs, simplify the complexity of
resource-related configuration tuning, and increase pod deployment density to improve resource utilization.
Koordinator enhances the kubernetes user experiences in the workload management by providing the following:
- Improved Resource Utilization: Koordinator is designed to optimize the utilization of cluster resources, ensuring that all nodes are used effectively and efficiently.
- Enhanced Performance: By using advanced algorithms and techniques, Koordinator aims to improve the performance of Kubernetes clusters, reducing interference between containers and increasing the overall speed of the system.
- Flexible Scheduling Policies: Koordinator provides a range of options for customizing scheduling policies, allowing administrators to fine-tune the behavior of the system to suit their specific needs.
- Easy Integration: Koordinator is designed to be easy to integrate into existing Kubernetes clusters, allowing users to start using it quickly and with minimal hassle.
## Quick Start
You can view the full documentation from the [Koordinator website](https://koordinator.sh/docs).
- Install or upgrade Koordinator with [the latest version](https://koordinator.sh/docs/installation).
- Referring to [best practices](https://koordinator.sh/docs/best-practices/colocation-of-spark-jobs), there will be
examples on running co-located workloads.
## Code of conduct
The Koordinator community is guided by our [Code of Conduct](CODE_OF_CONDUCT.md), which we encourage everybody to read
before participating.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
disability, ethnicity, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity and orientation.
## Contributing
You are warmly welcome to hack on Koordinator. We have prepared a detailed guide [CONTRIBUTING.md](CONTRIBUTING.md).
## Community
The [koordinator-sh/community repository](https://github.com/koordinator-sh/community) hosts all information about
the community, membership and how to become them, developing inspection, who to contact about what, etc.
We encourage all contributors to become members. We aim to grow an active, healthy community of contributors, reviewers,
and code owners. Learn more about requirements and responsibilities of membership in
the [community membership](https://github.com/koordinator-sh/community/blob/main/community-membership.md) page.
Active communication channels:
- Bi-weekly Community Meeting (APAC, *Chinese*):
- Tuesday 19:30 GMT+8 (Asia/Shanghai)
- [Meeting Link(DingTalk)](https://meeting.dingtalk.com/j/cgTTojEI8Zy)
- [Notes and agenda](https://alidocs.dingtalk.com/document/edit?docKey=oJGq769vBG4WnAKe&dentryKey=paP7wO3nXFnLzMAa&type=d)
- Slack(English): [koordinator channel](https://kubernetes.slack.com/channels/koordinator) in Kubernetes workspace
- DingTalk(Chinese): Search Group ID `33383887` or scan the following QR Code
<div>
<img src="https://github.com/koordinator-sh/koordinator/raw/main/docs/images/dingtalk.png" width="300" alt="Dingtalk QRCode">
</div>
## License
Koordinator is licensed under the Apache License, Version 2.0. See [LICENSE](./LICENSE) for the full license text.
<!--
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=koordinator-sh/koordinator&type=Date)](https://star-history.com/#koordinator-sh/koordinator&Date)
-->
## Security
Please report vulnerabilities by email to kubernetes-security@service.aliyun.com. Also see our [SECURITY.md](./SECURITY.md) file for details. | A QoS-based scheduling system brings optimal layout and status to workloads such as microservices, web services, big data jobs, AI jobs, etc. | kubernetes,colocation,scheduling,cloud-native,cost-optimization | 19 | 87 | 1,551 | 1,273 | 73 | 26 | 7 |
bezhanSalleh/filament-shield | <a href="https://github.com/bezhansalleh/filament-shield" class="filament-hidden">
<img style="width: 100%; max-width: 100%;" alt="filament-shield-art" src="https://user-images.githubusercontent.com/10007504/148662315-35d4bd74-fc1c-4f8c-8c02-689309b414b0.png" >
</a>
<p align="center" class="flex items-center justify-center">
<a href="https://filamentadmin.com/docs/2.x/admin/installation">
<img alt="FILAMENT 8.x" src="https://img.shields.io/badge/FILAMENT-3.x-EBB304?style=for-the-badge">
</a>
<a href="https://packagist.org/packages/bezhansalleh/filament-shield">
<img alt="Packagist" src="https://img.shields.io/packagist/v/bezhansalleh/filament-shield.svg?style=for-the-badge&logo=packagist">
</a>
<a href="https://github.com/bezhansalleh/filament-shield/actions?query=workflow%3Arun-tests+branch%3A3.x">
<img alt="Tests Passing" src="https://img.shields.io/github/actions/workflow/status/bezhansalleh/filament-shield/run-tests.yml?style=for-the-badge&logo=github&label=tests" class="filament-hidden">
</a>
<a href="https://github.com/bezhansalleh/filament-shield/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3A3.x" class="filament-hidden">
<img alt="Code Style Passing" src="https://img.shields.io/github/actions/workflow/status/bezhansalleh/filament-shield/laravel-pint.yml?style=for-the-badge&logo=github&label=code%20style">
</a>
<a href="https://packagist.org/packages/bezhansalleh/filament-shield">
<img alt="Downloads" src="https://img.shields.io/packagist/dt/bezhansalleh/filament-shield.svg?style=for-the-badge" >
</a>
</p>
# Shield
The easiest and most intuitive way to add access management to your Filament Admin:
- :fire: **Resources**
- :fire: **Pages**
- :fire: **Widgets**
- :fire: **Custom Permissions**
> [!NOTE]
> For **Filament 2.x** use **[2.x](https://github.com/bezhanSalleh/filament-shield/tree/2.x)** branch
> [!IMPORTANT]
> Prior to `v3.1.0` Shield supported [spatie/laravel-permission](https://packagist.org/packages/spatie/laravel-permission):`^5.0` and now it supports version `^6.0`. Which has some breaking changes around migrations. If you are upgrading from a version prior to `v3.1.0` please make sure to remove the old migration file and republish the new one.
## Installation
1. Install the package via composer:
```bash
composer require bezhansalleh/filament-shield
```
2. Add the `Spatie\Permission\Traits\HasRoles` trait to your User model(s):
```php
use Illuminate\Foundation\Auth\User as Authenticatable;
use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable
{
use HasRoles;
// ...
}
```
3. Publish the `config` file then setup your configuration:
```bash
php artisan vendor:publish --tag=filament-shield-config
```
4. Register the plugin for the Filament Panels you want
```php
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
\BezhanSalleh\FilamentShield\FilamentShieldPlugin::make()
]);
}
```
5. Now run the following command to install shield:
```bash
php artisan shield:install
```
Follow the prompts and enjoy!
## Filament Panels
If you want to enable `Shield` for more than one panel then you need to register the plugin for each panel as mentioned above.
### Panel Access
Shield comes with the `HasPanelShield` trait which provides an easy way to integrate Shield's conventions with the Filament's panel access system.
The `HasPanelShield` trait provides an implementation for the `canAccessPanel` method, determining access based on whether the user possesses the `super_admin` role or the `panel_user` role. It also assigns the `panel_user` role to the user upon creation and removes it upon deletion. Ofcourse the role names can be changed from the plugin's configuration file.
```php
use BezhanSalleh\FilamentShield\Traits\HasPanelShield;
use Filament\Models\Contracts\FilamentUser;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Spatie\Permission\Traits\HasRoles;
class User extends Authenticatable implements FilamentUser
{
use HasRoles;
use HasPanelShield;
// ...
}
```
#### Resources
Generally there are two scenarios that shield handles permissions for your `Filament` resources.
##### Default
Out of the box `Shield` handles the predefined permissions for `Filament` resources. So if that's all that you need you are all set.
If you need to add a single permission (for instance `lock`) and have it available for all your resources just append it to the following `config` key:
```php
permission_prefixes' => [
'resource' => [
'view',
'view_any',
'create',
'update',
'restore',
'restore_any',
'replicate',
'reorder',
'delete',
'delete_any',
'force_delete',
'force_delete_any',
'lock'
],
...
],
```
:bulb: Now you are thinking **`what if I need a permission to be only available for just one resource?`**
No worries, that's where [Custom Permissions](#custom-permissions) come to play.
##### Custom Permissions
To define custom permissions per `Resource` your `Resource` must implement the `HasShieldPermissions` contract.
This contract has a `getPermissionPrefixes()` method which returns an array of permission prefixes for your `Resource`.
Consider you have a `PostResource` and you want a couple of the predefined permissions plus a new permission called `publish_posts` to be only available for `PostResource` only.
```php
<?php
namespace BezhanSalleh\FilamentShield\Resources;
use BezhanSalleh\FilamentShield\Contracts\HasShieldPermissions;
...
class PostResource extends Resource implements HasShieldPermissions
{
...
public static function getPermissionPrefixes(): array
{
return [
'view',
'view_any',
'create',
'update',
'delete',
'delete_any',
'publish'
];
}
...
}
```
In the above example the `getPermissionPrefixes()` method returns the permission prefixes `Shield` needs to generate the permissions.
✅ Now to enforce `publish_post` permission headover to your `PostPolicy` and add a `publish()` method:
```php
/**
* Determine whether the user can publish posts.
*
* @param \App\Models\User $admin
* @return \Illuminate\Auth\Access\Response|bool
*/
public function publish(User $user)
{
return $user->can('publish_post');
}
```
🅰️/🈯️ To make the prefix translatable, publish `Shield`'s translations and append the prefix inside `resource_permission_prefixes_labels` as key and it's translation as value for the languages you need.
```php
//lang/en/filament-shield.php
'resource_permission_prefixes_labels' => [
'publish' => 'Publish'
],
//lang/es/filament-shield.php
'resource_permission_prefixes_labels' => [
'publish' => 'Publicar'
],
```
##### Configure Permission Identifier
By default the permission identifier is generated as follow:
```php
Str::of($resource)
->afterLast('Resources\\')
->before('Resource')
->replace('\\', '')
->snake()
->replace('_', '::');
```
So for instance if you have a resource like `App\Filament\Resources\Shop\CategoryResource` then the permission identifier would be `shop::category` and then it would be prefixed with your defined prefixes or what comes default with shield.
If you wish to change the default behaviour, then you can call the static `configurePermissionIdentifierUsing()` method inside a service provider's `boot()` method, to which you pass a Closure to modify the logic. The Closure receives the fully qualified class name of the resource as `$resource` which gives you the ability to access any property or method defined within the resource.
For example, if you wish to use the model name as the permission identifier, you can do it like so:
```php
use BezhanSalleh\FilamentShield\Facades\FilamentShield;
FilamentShield::configurePermissionIdentifierUsing(
fn($resource) => str($resource::getModel())
->afterLast('\\')
->lower()
->toString()
);
```
> **Warning**
> Keep in mind that ensuring the uniqueness of the permission identifier is now up to you.
##### Custom Navigation Group
By default the english translation renders Roles and Permissions under 'Filament Shield' if you wish to change this, first publish the [translations files](#translations) and change the relative locale to the group of your choosing for example:
```php
'nav.group' => 'Filament Shield',
```
to
```php
'nav.group' => 'User Management',
```
apply this to each language you have groups in.
#### Pages
If you have generated permissions for `Pages` you can toggle the page's navigation from sidebar and restricted access to the page. You can set this up manually but this package comes with a `HasPageShield` trait to speed up this process. All you have to do is use the trait in you pages:
```php
<?php
namespace App\Filament\Pages;
use ...;
use BezhanSalleh\FilamentShield\Traits\HasPageShield;
class MyPage extends Page
{
use HasPageShield;
...
}
```
📕 <b style="color:darkred">`HasPageShield` uses the `booted` method to check the user's permissions and makes sure to execute the `booted` page method in the parent page if exists.</b>
###### Pages Hooks
However if you need to perform some methods before and after the booted method you can declare the next hooks methods in your filament page.
```php
<?php
namespace App\Filament\Pages;
use ...;
use BezhanSalleh\FilamentShield\Traits\HasPageShield;
class MyPage extends Page
{
use HasPageShield;
...
protected function beforeBooted : void() {
...
}
protected function afterBooted : void() {
...
}
/**
* Hook to perform an action before redirect if the user
* doesn't have access to the page.
* */
protected function beforeShieldRedirects : void() {
...
}
}
```
###### Pages Redirect Path
`HasPageShield` uses the `config('filament.path')` value by default to perform the shield redirection. If you need to overwrite the rediretion path, just add the next method to your page:
```php
<?php
namespace App\Filament\Pages;
use ...;
use BezhanSalleh\FilamentShield\Traits\HasPageShield;
class MyPage extends Page
{
use HasPageShield;
...
protected function getShieldRedirectPath(): string {
return '/'; // redirect to the root index...
}
}
```
#### Widgets
if you have generated permissions for `Widgets` you can toggle their state based on whether a user have permission or not. You can set this up manually but this package comes with a `HasWidgetShield` trait to speed up this process. All you have to do is use the trait in you widgets:
```php
<?php
namespace App\Filament\Widgets;
use ...;
use BezhanSalleh\FilamentShield\Traits\HasWidgetShield;
class IncomeWidget extends LineChartWidget
{
use HasWidgetShield;
...
}
```
### Policies
#### Role Policy
To ensure `RoleResource` access via `RolePolicy` you would need to add the following to your `AuthServiceProvider`:
```php
//AuthServiceProvider.php
...
protected $policies = [
'Spatie\Permission\Models\Role' => 'App\Policies\RolePolicy',
];
...
```
**You can skip it if you have enabled it from the `config`:**
```php
// config/filament-shield.php
...
'register_role_policy' => [
'enabled' => true,
],
...
```
#### Policy Path
If your policies are not in the default `Policies` directory in the `app_path()` you can change the directory name in the config file:
```php
...
'generator' => [
'option' => 'policies_and_permissions',
'policy_directory' => 'Policies',
],
...
```
#### Custom folder structure for Models or Third-Party Plugins
Shield also generates policies and permissions for third-party plugins and `Models` with custom folder structure and to enforce the generated policies you will need to register them in your application's `AuthServiceProvider`:
```
...
class AuthServiceProvider extends ServiceProvider
{
...
protected $policies = [
...,
'App\Models\Blog\Author' => 'App\Policies\Blog\AuthorPolicy',
'Ramnzys\FilamentEmailLog\Models\Email' => 'App\Policies\EmailPolicy'
];
```
#### Users (Assigning Roles to Users)
Shield does not come with a way to assign roles to your users out of the box, however you can easily assign roles to your users using Filament `Forms`'s `Select` or `CheckboxList` component. Inside your users `Resource`'s form add one of these components and configure them as you need:
```php
// Using Select Component
Forms\Components\Select::make('roles')
->relationship('roles', 'name')
->multiple()
->preload()
->searchable()
// Using CheckboxList Component
Forms\Components\CheckboxList::make('roles')
->relationship('roles', 'name')
->searchable()
```
You can find out more about these components in the [Filament Docs](https://filamentphp.com/docs/3.x/forms/installation)
- [Select](https://filamentphp.com/docs/3.x/forms/fields/select)
- [CheckboxList](https://filamentphp.com/docs/3.x/forms/fields/checkbox-list)
#### Layout Customization
You can easily customize the `Grid`, `Section` and `CheckboxList`'s `columns()` and `columnSpan()` without publishing the resource.
```php
use BezhanSalleh\FilamentShield\FilamentShieldPlugin;
public function panel(Panel $panel): Panel
{
return $panel
...
...
->plugins([
FilamentShieldPlugin::make()
->gridColumns([
'default' => 1,
'sm' => 2,
'lg' => 3
])
->sectionColumnSpan(1)
->checkboxListColumns([
'default' => 1,
'sm' => 2,
'lg' => 4,
])
->resourceCheckboxListColumns([
'default' => 1,
'sm' => 2,
]),
]);
}
```
<img width="1161" alt="Screenshot 2023-09-24 at 10 34 31 PM" src="https://github.com/bezhanSalleh/filament-shield/assets/10007504/be42bab2-72d1-4db0-8de4-8b8fba2d4e68">
#### Translations
Publish the translations using:
```bash
php artisan vendor:publish --tag="filament-shield-translations"
```
## Available Filament Shield Commands
#### `shield:doctor`
- Show useful info about Filament Shield.
#### `shield:install`
Setup Core Package requirements and Install Shield. Accepts the following flags:
- `--fresh` re-run the migrations
- `--only` Only setups shield without generating permissions and creating super-admin
#### `shield:generate`
Generate Permissions and/or Policies for Filament entities. Accepts the following flags:
- `--all` Generate permissions/policies for all entities
- `--option[=OPTION]` Override the config generator option(`policies_and_permissions`,`policies`,`permissions`)
- `--resource[=RESOURCE]` One or many resources separated by comma (,)
- `--page[=PAGE]` One or many pages separated by comma (,)
- `--widget[=WIDGET]` One or many widgets separated by comma (,)
- `--exclude` Exclude the given entities during generation
- `--ignore-config-exclude` Ignore config `exclude` option during generation
- `--ignore-existing-policies` Do not overwrite the existing policies.
#### `shield:super-admin`
Create a user with super_admin role.
- Accepts an `--user=` argument that will use the provided ID to find the user to be made super admin.
### `shield:publish`
- Publish the Shield `RoleResource` and customize it however you like
### `shield:seeder`
- Deploy easily by setting up your roles and permissions or add your custom seeds
## Testing
```bash
composer test
```
## Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
## Contributing
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.
## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Bezhan Salleh](https://github.com/bezhanSalleh)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
| The easiest and most intuitive way to add access management to your Filament Admin Resources, Pages & Widgets through `spatie/laravel-permission` | permissions,roles,filament,filamentplugin,laravel,php,livewire,secure,easy-access-management,acl | 80 | 70 | 199 | 707 | 10 | 4 | 5 |
kubernetes-sigs/kueue | # Kueue
[![GoReport Widget]][GoReport Status]
[![Latest Release](https://img.shields.io/github/v/release/kubernetes-sigs/kueue?include_prereleases)](https://github.com/kubernetes-sigs/kueue/releases/latest)
[GoReport Widget]: https://goreportcard.com/badge/github.com/kubernetes-sigs/kueue
[GoReport Status]: https://goreportcard.com/report/github.com/kubernetes-sigs/kueue
<img src="https://github.com/kubernetes-sigs/kueue/blob/main/site/static/images/logo.svg" width="100" alt="kueue logo">
Kueue is a set of APIs and controller for [job](https://kueue.sigs.k8s.io/docs/concepts/workload)
[queueing](https://kueue.sigs.k8s.io/docs/concepts#queueing). It is a job-level manager that decides when
a job should be [admitted](https://kueue.sigs.k8s.io/docs/concepts#admission) to start (as in pods can be
created) and when it should stop (as in active pods should be deleted).
Read the [overview](https://kueue.sigs.k8s.io/docs/overview/) to learn more.
## Features overview
- **Job management:** Support job queueing based on [priorities](https://kueue.sigs.k8s.io/docs/concepts/workload/#priority) with different [strategies](https://kueue.sigs.k8s.io/docs/concepts/cluster_queue/#queueing-strategy): `StrictFIFO` and `BestEffortFIFO`.
- **Resource management:** Support resource fair sharing and [preemption](https://kueue.sigs.k8s.io/docs/concepts/cluster_queue/#preemption) with a variety of policies between different tenants.
- **Dynamic resource reclaim:** A mechanism to [release](https://kueue.sigs.k8s.io/docs/concepts/workload/#dynamic-reclaim) quota as the pods of a Job complete.
- **Resource flavor fungibility:** Quota [borrowing or preemption](https://kueue.sigs.k8s.io/docs/concepts/cluster_queue/#flavorfungibility) in ClusterQueue and Cohort.
- **Integrations:** Built-in support for popular jobs, e.g. [BatchJob](https://kueue.sigs.k8s.io/docs/tasks/run/jobs/), [Kubeflow training jobs](https://kueue.sigs.k8s.io/docs/tasks/run/kubeflow/), [RayJob](https://kueue.sigs.k8s.io/docs/tasks/run/rayjobs/), [RayCluster](https://kueue.sigs.k8s.io/docs/tasks/run/rayclusters/), [JobSet](https://kueue.sigs.k8s.io/docs/tasks/run/jobsets/), [plain Pod](https://kueue.sigs.k8s.io/docs/tasks/run/plain_pods/).
- **System insight:** Build-in [prometheus metrics](https://kueue.sigs.k8s.io/docs/reference/metrics/) to help monitor the state of the system, as well as Conditions.
- **AdmissionChecks:** A mechanism for internal or external components to influence whether a workload can be [admitted](https://kueue.sigs.k8s.io/docs/concepts/admission_check/).
- **Advanced autoscaling support:** Integration with cluster-autoscaler's [provisioningRequest](https://kueue.sigs.k8s.io/docs/admission-check-controllers/provisioning/#job-using-a-provisioningrequest) via admissionChecks.
- **Sequential admission:** A simple implementation of [all-or-nothing scheduling](https://kueue.sigs.k8s.io/docs/tasks/manage/setup_sequential_admission/).
- **Partial admission:** Allows jobs to run with a [smaller parallelism](https://kueue.sigs.k8s.io/docs/tasks/run/jobs/#partial-admission), based on available quota, if the application supports it.
## Production Readiness status
- ✔️ API version: v1beta1, respecting [Kubernetes Deprecation Policy](https://kubernetes.io/docs/reference/using-api/deprecation-policy/)
- ✔️ Up-to-date [documentation](https://kueue.sigs.k8s.io/docs).
- ✔️ Test Coverage:
- ✔️ Unit Test [testgrid](https://testgrid.k8s.io/sig-scheduling#periodic-kueue-test-unit-main).
- ✔️ Integration Test [testgrid](https://testgrid.k8s.io/sig-scheduling#periodic-kueue-test-integration-main)
- ✔️ E2E Tests for Kubernetes
[1.25](https://testgrid.k8s.io/sig-scheduling#periodic-kueue-test-e2e-main-1-25),
[1.26](https://testgrid.k8s.io/sig-scheduling#periodic-kueue-test-e2e-main-1-26),
[1.27](https://testgrid.k8s.io/sig-scheduling#periodic-kueue-test-e2e-main-1-27),
[1.28](https://testgrid.k8s.io/sig-scheduling#periodic-kueue-test-e2e-main-1-28)
on Kind.
- ✔️ Scalability verification via [performance tests](https://github.com/kubernetes-sigs/kueue/tree/main/test/performance).
- ✔️ Monitoring via [metrics](https://kueue.sigs.k8s.io/docs/reference/metrics).
- ✔️ Security: RBAC based accessibility.
- ✔️ Stable release cycle(2-3 months) for new features, bugfixes, cleanups.
- ✔️ [Adopters](https://kueue.sigs.k8s.io/docs/adopters/) running on production.
_Based on community feedback, we continue to simplify and evolve the API to
address new use cases_.
## Installation
**Requires Kubernetes 1.22 or newer**.
To install the latest release of Kueue in your cluster, run the following command:
```shell
kubectl apply --server-side -f https://github.com/kubernetes-sigs/kueue/releases/download/v0.7.0/manifests.yaml
```
The controller runs in the `kueue-system` namespace.
Read the [installation guide](https://kueue.sigs.k8s.io/docs/installation/) to learn more.
## Usage
A minimal configuration can be set by running the [examples](examples):
```shell
kubectl apply -f examples/admin/single-clusterqueue-setup.yaml
```
Then you can run a job with:
```shell
kubectl create -f examples/jobs/sample-job.yaml
```
Learn more about:
- Kueue [concepts](https://kueue.sigs.k8s.io/docs/concepts).
- Common and advanced [tasks](https://kueue.sigs.k8s.io/docs/tasks).
## Architecture
<!-- TODO(#64) Remove links to google docs once the contents have been migrated to this repo -->
Learn more about the architecture of Kueue with the following design docs:
- [bit.ly/kueue-apis](https://bit.ly/kueue-apis) discusses the API proposal and a high
level description of how Kueue operates. Join the [mailing list](https://groups.google.com/a/kubernetes.io/g/wg-batch)
to get document access.
- [bit.ly/kueue-controller-design](https://bit.ly/kueue-controller-design)
presents the detailed design of the controller.
## Roadmap
This is a high-level overview of the main priorities for 2023, in expected order of release:
- Cooperative preemption support for workloads that implement checkpointing [#477](https://github.com/kubernetes-sigs/kueue/issues/477)
- Flavor assignment strategies, e.g. _minimizing cost_ vs _minimizing borrowing_ [#312](https://github.com/kubernetes-sigs/kueue/issues/312)
- Integration with cluster-autoscaler for guaranteed resource provisioning
- Integration with common custom workloads [#74](https://github.com/kubernetes-sigs/kueue/issues/74):
- Kubeflow (TFJob, MPIJob, etc.)
- Spark
- Ray
- Workflows (Tekton, Argo, etc.)
These are features that we aim to have in the long-term, in no particular order:
- Budget support [#28](https://github.com/kubernetes-sigs/kueue/issues/28)
- Dashboard for management and monitoring for administrators
- Multi-cluster support
## Community, discussion, contribution, and support
Learn how to engage with the Kubernetes community on the [community page](http://kubernetes.io/community/)
and the [contributor's guide](CONTRIBUTING.md).
You can reach the maintainers of this project at:
- [Slack](https://kubernetes.slack.com/messages/wg-batch)
- [Mailing List](https://groups.google.com/a/kubernetes.io/g/wg-batch)
### Code of conduct
Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md).
| Kubernetes-native Job Queueing | k8s-sig-scheduling,k8s,kubernetes | 23 | 425 | 1,793 | 2,198 | 106 | 10 | 2 |
digitallyinduced/thin-backend | <p align="center">
<a href="https://thin.dev/" target="_blank">
<img src="header.png" />
</a>
</p>
<h1 align="center"><b>Thin Backend</b></h1>
<p align="center">
Instant API for your Postgres DB
<br />
<a href="https://thin.dev/"><strong>thin.dev »</strong></a>
</p>
Thin Backend is a blazing fast, universal web app backend for making realtime single page apps.
Instead of manually writing REST API endpoints or GraphQL resolvers, use a Thin Backend server to automatically get a fully featured API backend on top of your Postgres DB. Thin exposes high level functions to create, read, update and delete database record.
<p align="center">
<img src="https://thin-backend-prod.s3.amazonaws.com/public-static/github/demo4.gif"/>
</p>
![](https://thin.dev/readme-header.png)
## Code Examples
This example shows a simple CRUD example for building a Todo app with Thin:
```javascript
import { useQuery, query, createRecord, updateRecord, deleteRecord, Task } from 'ihp-backend';
function Tasks() {
// `useQuery` automatically triggers a re-render on new data
const tasks = useQuery(query('tasks').orderBy('createdAt'));
return <div>
<h1>Tasks</h1>
{tasks.map(task => <Task task={task} key={task.id} />)}
</div>
}
interface TaskProps {
task: Task; // <- The `Task` type is provided by Thin, auto-generated from the database schema
}
function Task({ task }: TaskProps) {
const handleEdit = () => {
const patch = {
title: window.prompt('New Title:') || task.title
};
// `updateRecord` already updates the UI state (e.g. the <Tasks /> component above)
// even before the server completed the operation.
updateRecord('tasks', task.id, patch);
}
const handleDelete = () => {
// `deleteRecord` already hides the record from the UI state
// even before the server completed the operation.
deleteRecord('tasks', task.id);
}
return <div onDoubleClick={handleEdit}>
{task.title}
<button onClick={handleDelete}>delete</button>
</div>
}
function AddTaskButton() {
const handleClick = () => {
const task = {
title: window.prompt('Title:')
};
// `createRecord` already shows the new task in the UI
// even before the server completed the operation.
createRecord('tasks', task);
}
return <button onClick={handleClick}>Add Task</button>
}
function App() {
// No need for redux or other state management libs
// `useQuery` automatically triggers a re-render on new data
return <div>
<Tasks />
<AddTaskButton />
</div>
}
```
[Try on Vercel](https://thin-backend-todo-app.vercel.app/)
## Top-notch Autocompletion
The TypeScript definitions not only provide safety, they also provide really nice autocompletion.
![](https://thin.dev/startpage/autocomplete30.webp)
## Feature Overview
- **Blazing Fast, Low Latency:**
Delight your end-users with superior speed and lowest latency. With built-in Optimistic Updates your app doesn't need to wait for the server to respond back until the changes are visible on the screen.
- **Realtime:**
Provide a delightful experience to your end users: With Thin Backend Live Queries your app state is synchronized in real-time across all users.
```javascript
function Tasks() {
// `useQuery` always returns the latest database state
// The component automatically re-renders when a record is inserted,
// updated, or deleted in the `tasks` table
const tasks = useQuery(query('tasks').orderBy('createdAt'));
return <div>...</div>
}
- **Zero-setup Login:**
To get your started quickly every Thin Backend project comes with zero-setup login, user management and permissions system included.
Already have an existing login system? No problem, you can disable the built-in login and provide Thin Backend with a JWT.
- **Secure Authorization:**
Thin Backend uses Postgres Policies to make sure that users can only see what they're allowed to see.
Based on naming conventions Thin Backend will automatically generate the initial policies for you. You then only need to adjust the default policies based on your needs.
- **Powerful Schema Designer:**
Thin Backend has a built-in GUI-based schema designer. The schema designer helps to quickly build the DDL statements for your database schema without remembering all the PostgreSQL syntax and data types.
But keep in mind: The schema designer is just a GUI tool to edit the underlying SQL statements. The schema designer parses the SQL statements, applies changes to the syntax tree, and then writes it back.
Rather work with your keyboard? You can always skip the GUI and go straight to the code editor. If you need to do something advanced which is not supported by the GUI, just manually do it with your code editor of choice.
- **Git-like Migrations:**
Whenever you add or change a table in the Schema Designer, the changes will only be applied to the in-memory schema. The actual postgres database will only be touched when you run migrations.
You can think of this like in a git workflow: In git changes are only applied to the repository history when you do a git commit. In Thin Backend this git commit is running a database migration.
![Git-like Migrations in Thin](https://vercel.com/_next/image?url=https%3A%2F%2Fvercel.com%2Fapi%2Fv1%2Fintegrations%2Fassets%2Foac_1Uwswlv4y8SGwzbOJx5gqpmv%2Fimages%2Fc74dd072e8c46fc642045f7497963f15acf11aab.png&w=3840&q=75)
- **Proven Architecture:**
Thin Backend is designed by the company that makes <a href="https://ihp.digitallyinduced.com/">IHP</a>, Haskell's most successful web framework. Thin Backend is built on top of the production-proven IHP architecture & libraries.
IHP was recognized as a High Performer in G2's Winter 2022 Web Framework Report:
<a href="https://www.g2.com/products/ihp/reviews">
<img src="https://ihp.digitallyinduced.com/startpage/g2-badge.svg" alt="G2 Badge" width="96"/>
</a>
- **Transactions:**
You can use `withTransaction` to run a set of operations within a database transaction. If an exception is thrown within the transaction callback, the transaction will automatically be rolled back and the exception is re-thrown. If the callback executes successfully, the transaction will automatically be committed:
```javascript
import { withTransaction } from 'thin-backend';
await withTransaction(async transaction => {
const team = await transaction.createRecord('teams', { title: 'New Team' });
const project = await transaction.createRecord('projects', {
title: 'Project 1',
teamId: team.id
});
return [ team, project ];
})
```
[Learn more in the Docs](https://thin.dev/docs/database#transactions)
- **Batch Operations:**
You can use `createRecords`, `updateRecords` and `deleteRecords` to effiently run operations on a large
set of database records:
```javascript
// Example:
const todoA = { title: 'Finish Guide', userId: '49946f4d-8a2e-4f18-a399-58e3296ecff5' };
const todoB = { title: 'Learn Haskell', userId: '49946f4d-8a2e-4f18-a399-58e3296ecff5' };
const todos = await createRecord('todos', [ todoA, todoB ]);
```
[Learn more about Batch Operations in the Docs](https://thin.dev/docs/database)
## Documentation
[You can find extensive documentation on the Thin Backend website.](https://thin.dev/docs)
## Getting Started
[Learn how to get started in the Getting Started Guide](https://thin.dev/docs/your-first-project)
[You can also self-host Thin Backend.](https://thin.dev/docs/self-hosting)
## Example Apps
You can find some example apps here:
- [Todo App](https://github.com/digitallyinduced/thin-backend-todo-app)
- [Chat App](https://github.com/digitallyinduced/ihp-backend-chat-example-app)
- [Twitter Clone](https://github.com/digitallyinduced/ihp-backend-twitter-clone)
## Community
Questions, or need help? [Join our Thin Community](https://community.thin.dev/)
## Contributing
We are happy to merge your pull requests!😄
See [CONTRIBUTING.md](CONTRIBUTING.md) for more info.
| 🔥 Thin Backend is a Blazing Fast, Universal Web App Backend for Making Realtime Single Page Apps | postgresql,postgres,database,react | 0 | 9 | 19 | 177 | 19 | 1 | 1 |
alibaba/FederatedScope | <h1 align="center">
<img src="https://img.alicdn.com/imgextra/i4/O1CN01yp6zdb23HOJJkCmZg_!!6000000007230-2-tps-2048-1009.png" width="400" alt="federatedscope-logo">
</h1>
![](https://img.shields.io/badge/language-python-blue.svg)
![](https://img.shields.io/badge/license-Apache-000000.svg)
[![Website](https://img.shields.io/badge/website-FederatedScope-0000FF)](https://federatedscope.io/)
[![Playground](https://shields.io/badge/JupyterLab-Enjoy%20Your%20FL%20Journey!-F37626?logo=jupyter)](https://try.federatedscope.io/)
[![Contributing](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://federatedscope.io/docs/contributor/)
FederatedScope is a comprehensive federated learning platform that provides convenient usage and flexible customization for various federated learning tasks in both academia and industry. Based on an event-driven architecture, FederatedScope integrates rich collections of functionalities to satisfy the burgeoning demands from federated learning, and aims to build up an easy-to-use platform for promoting learning safely and effectively.
A detailed tutorial is provided on our website: [federatedscope.io](https://federatedscope.io/)
You can try FederatedScope via [FederatedScope Playground](https://try.federatedscope.io/) or [Google Colab](https://colab.research.google.com/github/alibaba/FederatedScope).
| [Code Structure](#code-structure) | [Quick Start](#quick-start) | [Advanced](#advanced) | [Documentation](#documentation) | [Publications](#publications) | [Contributing](#contributing) |
## News
- ![new](https://img.alicdn.com/imgextra/i4/O1CN01kUiDtl1HVxN6G56vN_!!6000000000764-2-tps-43-19.png) [05-17-2023] Our paper [FS-REAL](https://arxiv.org/abs/2303.13363) has been accepted by KDD'2023!
- ![new](https://img.alicdn.com/imgextra/i4/O1CN01kUiDtl1HVxN6G56vN_!!6000000000764-2-tps-43-19.png) [05-17-2023] Our benchmark paper for FL backdoor attacks [Backdoor Attacks Bench](https://arxiv.org/abs/2302.01677) has been accepted by KDD'2023!
- ![new](https://img.alicdn.com/imgextra/i4/O1CN01kUiDtl1HVxN6G56vN_!!6000000000764-2-tps-43-19.png) [05-17-2023] Our paper [Communication Efficient and Differentially Private Logistic Regression under the Distributed Setting]() has been accepted by KDD'2023!
- ![new](https://img.alicdn.com/imgextra/i4/O1CN01kUiDtl1HVxN6G56vN_!!6000000000764-2-tps-43-19.png) [04-25-2023] Our paper [pFedGate](https://arxiv.org/abs/2305.02776) has been accepted by ICML'2023!
- ![new](https://img.alicdn.com/imgextra/i4/O1CN01kUiDtl1HVxN6G56vN_!!6000000000764-2-tps-43-19.png) [04-25-2023] Our benchmark paper for FedHPO [FedHPO-Bench](https://arxiv.org/abs/2206.03966) has been accepted by ICML'2023!
- ![new](https://img.alicdn.com/imgextra/i4/O1CN01kUiDtl1HVxN6G56vN_!!6000000000764-2-tps-43-19.png) [04-03-2023] We release FederatedScope v0.3.0!
- [02-10-2022] Our [paper](https://arxiv.org/pdf/2204.05011.pdf) elaborating on FederatedScope is accepted by VLDB'23!
- [10-05-2022] Our benchmark paper for personalized FL, [pFL-Bench](https://arxiv.org/abs/2206.03655) has been accepted by NeurIPS'22, Dataset and Benchmark Track!
- [08-18-2022] Our KDD 2022 [paper](https://arxiv.org/abs/2204.05562) on federated graph learning receives the KDD Best Paper Award for ADS track!
- [07-30-2022] We release FederatedScope v0.2.0!
- [06-17-2022] We release **pFL-Bench**, a comprehensive benchmark for personalized Federated Learning (pFL), containing 10+ datasets and 20+ baselines. [[code](https://github.com/alibaba/FederatedScope/tree/master/benchmark/pFL-Bench), [pdf](https://arxiv.org/abs/2206.03655)]
- [06-17-2022] We release **FedHPO-Bench**, a benchmark suite for studying federated hyperparameter optimization. [[code](https://github.com/alibaba/FederatedScope/tree/master/benchmark/FedHPOBench), [pdf](https://arxiv.org/abs/2206.03966)]
- [06-17-2022] We release **B-FHTL**, a benchmark suit for studying federated hetero-task learning. [[code](https://github.com/alibaba/FederatedScope/tree/master/benchmark/B-FHTL), [pdf](https://arxiv.org/abs/2206.03436)]
- [06-13-2022] Our project was receiving an attack, which has been resolved. [More details](https://github.com/alibaba/FederatedScope/blob/master/doc/news/06-13-2022_Declaration_of_Emergency.txt).
- [05-25-2022] Our paper [FederatedScope-GNN](https://arxiv.org/abs/2204.05562) has been accepted by KDD'2022!
- [05-06-2022] We release FederatedScope v0.1.0!
## Code Structure
```
FederatedScope
├── federatedscope
│ ├── core
│ | ├── workers # Behaviors of participants (i.e., server and clients)
│ | ├── trainers # Details of local training
│ | ├── aggregators # Details of federated aggregation
│ | ├── configs # Customizable configurations
│ | ├── monitors # The monitor module for logging and demonstrating
│ | ├── communication.py # Implementation of communication among participants
│ | ├── fed_runner.py # The runner for building and running an FL course
│ | ├── ... ..
│ ├── cv # Federated learning in CV
│ ├── nlp # Federated learning in NLP
│ ├── gfl # Graph federated learning
│ ├── autotune # Auto-tunning for federated learning
│ ├── vertical_fl # Vertical federated learning
│ ├── contrib
│ ├── main.py
│ ├── ... ...
├── scripts # Scripts for reproducing existing algorithms
├── benchmark # We release several benchmarks for convenient and fair comparisons
├── doc # For automatic documentation
├── environment # Installation requirements and provided docker files
├── materials # Materials of related topics (e.g., paper lists)
│ ├── notebook
│ ├── paper_list
│ ├── tutorial
│ ├── ... ...
├── tests # Unittest modules for continuous integration
├── LICENSE
└── setup.py
```
## Quick Start
We provide an end-to-end example for users to start running a standard FL course with FederatedScope.
### Step 1. Installation
First of all, users need to clone the source code and install the required packages (we suggest python version >= 3.9). You can choose between the following two installation methods (via docker or conda) to install FederatedScope.
```bash
git clone https://github.com/alibaba/FederatedScope.git
cd FederatedScope
```
#### Use Docker
You can build docker image and run with docker env (cuda 11 and torch 1.10):
```
docker build -f environment/docker_files/federatedscope-torch1.10.Dockerfile -t alibaba/federatedscope:base-env-torch1.10 .
docker run --gpus device=all --rm -it --name "fedscope" -w $(pwd) alibaba/federatedscope:base-env-torch1.10 /bin/bash
```
If you need to run with down-stream tasks such as graph FL, change the requirement/docker file name into another one when executing the above commands:
```
# environment/requirements-torch1.10.txt ->
environment/requirements-torch1.10-application.txt
# environment/docker_files/federatedscope-torch1.10.Dockerfile ->
environment/docker_files/federatedscope-torch1.10-application.Dockerfile
```
Note: You can choose to use cuda 10 and torch 1.8 via changing `torch1.10` to `torch1.8`.
The docker images are based on the nvidia-docker. Please pre-install the NVIDIA drivers and `nvidia-docker2` in the host machine. See more details [here](https://github.com/alibaba/FederatedScope/tree/master/environment/docker_files).
#### Use Conda
We recommend using a new virtual environment to install FederatedScope:
```bash
conda create -n fs python=3.9
conda activate fs
```
If your backend is torch, please install torch in advance ([torch-get-started](https://pytorch.org/get-started/locally/)). For example, if your cuda version is 11.3 please execute the following command:
```bash
conda install -y pytorch=1.10.1 torchvision=0.11.2 torchaudio=0.10.1 torchtext=0.11.1 cudatoolkit=11.3 -c pytorch -c conda-forge
```
For users with Apple M1 chips:
```bash
conda install pytorch torchvision torchaudio -c pytorch
# Downgrade torchvision to avoid segmentation fault
python -m pip install torchvision==0.11.3
```
Finally, after the backend is installed, you can install FederatedScope from `source`:
##### From source
```bash
# Editable mode
pip install -e .
# Or (developers for dev mode)
pip install -e .[dev]
pre-commit install
```
Now, you have successfully installed the minimal version of FederatedScope. (**Optinal**) For application version including graph, nlp and speech, run:
```bash
bash environment/extra_dependencies_torch1.10-application.sh
```
### Step 2. Prepare datasets
To run an FL task, users should prepare a dataset.
The DataZoo provided in FederatedScope can help to automatically download and preprocess widely-used public datasets for various FL applications, including CV, NLP, graph learning, recommendation, etc. Users can directly specify `cfg.data.type = DATASET_NAME`in the configuration. For example,
```bash
cfg.data.type = 'femnist'
```
To use customized datasets, you need to prepare the datasets following a certain format and register it. Please refer to [Customized Datasets](https://federatedscope.io/docs/own-case/#data) for more details.
### Step 3. Prepare models
Then, users should specify the model architecture that will be trained in the FL course.
FederatedScope provides a ModelZoo that contains the implementation of widely adopted model architectures for various FL applications. Users can set up `cfg.model.type = MODEL_NAME` to apply a specific model architecture in FL tasks. For example,
```yaml
cfg.model.type = 'convnet2'
```
FederatedScope allows users to use customized models via registering. Please refer to [Customized Models](https://federatedscope.io/docs/own-case/#model) for more details about how to customize a model architecture.
### Step 4. Start running an FL task
Note that FederatedScope provides a unified interface for both standalone mode and distributed mode, and allows users to change via configuring.
#### Standalone mode
The standalone mode in FederatedScope means to simulate multiple participants (servers and clients) in a single device, while participants' data are isolated from each other and their models might be shared via message passing.
Here we demonstrate how to run a standard FL task with FederatedScope, with setting `cfg.data.type = 'FEMNIST'`and `cfg.model.type = 'ConvNet2'` to run vanilla FedAvg for an image classification task. Users can customize training configurations, such as `cfg.federated.total_round_num`, `cfg.dataloader.batch_size`, and `cfg.train.optimizer.lr`, in the configuration (a .yaml file), and run a standard FL task as:
```bash
# Run with default configurations
python federatedscope/main.py --cfg scripts/example_configs/femnist.yaml
# Or with custom configurations
python federatedscope/main.py --cfg scripts/example_configs/femnist.yaml federate.total_round_num 50 dataloader.batch_size 128
```
Then you can observe some monitored metrics during the training process as:
```
INFO: Server has been set up ...
INFO: Model meta-info: <class 'federatedscope.cv.model.cnn.ConvNet2'>.
... ...
INFO: Client has been set up ...
INFO: Model meta-info: <class 'federatedscope.cv.model.cnn.ConvNet2'>.
... ...
INFO: {'Role': 'Client #5', 'Round': 0, 'Results_raw': {'train_loss': 207.6341676712036, 'train_acc': 0.02, 'train_total': 50, 'train_loss_regular': 0.0, 'train_avg_loss': 4.152683353424072}}
INFO: {'Role': 'Client #1', 'Round': 0, 'Results_raw': {'train_loss': 209.0940284729004, 'train_acc': 0.02, 'train_total': 50, 'train_loss_regular': 0.0, 'train_avg_loss': 4.1818805694580075}}
INFO: {'Role': 'Client #8', 'Round': 0, 'Results_raw': {'train_loss': 202.24929332733154, 'train_acc': 0.04, 'train_total': 50, 'train_loss_regular': 0.0, 'train_avg_loss': 4.0449858665466305}}
INFO: {'Role': 'Client #6', 'Round': 0, 'Results_raw': {'train_loss': 209.43883895874023, 'train_acc': 0.06, 'train_total': 50, 'train_loss_regular': 0.0, 'train_avg_loss': 4.1887767791748045}}
INFO: {'Role': 'Client #9', 'Round': 0, 'Results_raw': {'train_loss': 208.83140087127686, 'train_acc': 0.0, 'train_total': 50, 'train_loss_regular': 0.0, 'train_avg_loss': 4.1766280174255375}}
INFO: ----------- Starting a new training round (Round #1) -------------
... ...
INFO: Server: Training is finished! Starting evaluation.
INFO: Client #1: (Evaluation (test set) at Round #20) test_loss is 163.029045
... ...
INFO: Server: Final evaluation is finished! Starting merging results.
... ...
```
#### Distributed mode
The distributed mode in FederatedScope denotes running multiple procedures to build up an FL course, where each procedure plays as a participant (server or client) that instantiates its model and loads its data. The communication between participants is already provided by the communication module of FederatedScope.
To run with distributed mode, you only need to:
- Prepare isolated data file and set up `cfg.data.file_path = PATH/TO/DATA` for each participant;
- Change `cfg.federate.model = 'distributed'`, and specify the role of each participant by `cfg.distributed.role = 'server'/'client'`.
- Set up a valid address by `cfg.distribute.server_host/client_host = x.x.x.x` and `cfg.distribute.server_port/client_port = xxxx`. (Note that for a server, you need to set up `server_host` and `server_port` for listening messages, while for a client, you need to set up `client_host` and `client_port` for listening as well as `server_host` and `server_port` for joining in an FL course)
We prepare a synthetic example for running with distributed mode:
```bash
# For server
python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_server.yaml data.file_path 'PATH/TO/DATA' distribute.server_host x.x.x.x distribute.server_port xxxx
# For clients
python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_1.yaml data.file_path 'PATH/TO/DATA' distribute.server_host x.x.x.x distribute.server_port xxxx distribute.client_host x.x.x.x distribute.client_port xxxx
python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_2.yaml data.file_path 'PATH/TO/DATA' distribute.server_host x.x.x.x distribute.server_port xxxx distribute.client_host x.x.x.x distribute.client_port xxxx
python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_3.yaml data.file_path 'PATH/TO/DATA' distribute.server_host x.x.x.x distribute.server_port xxxx distribute.client_host x.x.x.x distribute.client_port xxxx
```
An executable example with generated toy data can be run with (a script can be found in `scripts/run_distributed_lr.sh`):
```bash
# Generate the toy data
python scripts/distributed_scripts/gen_data.py
# Firstly start the server that is waiting for clients to join in
python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_server.yaml data.file_path toy_data/server_data distribute.server_host 127.0.0.1 distribute.server_port 50051
# Start the client #1 (with another process)
python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_1.yaml data.file_path toy_data/client_1_data distribute.server_host 127.0.0.1 distribute.server_port 50051 distribute.client_host 127.0.0.1 distribute.client_port 50052
# Start the client #2 (with another process)
python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_2.yaml data.file_path toy_data/client_2_data distribute.server_host 127.0.0.1 distribute.server_port 50051 distribute.client_host 127.0.0.1 distribute.client_port 50053
# Start the client #3 (with another process)
python federatedscope/main.py --cfg scripts/distributed_scripts/distributed_configs/distributed_client_3.yaml data.file_path toy_data/client_3_data distribute.server_host 127.0.0.1 distribute.server_port 50051 distribute.client_host 127.0.0.1 distribute.client_port 50054
```
And you can observe the results as (the IP addresses are anonymized with 'x.x.x.x'):
```
INFO: Server: Listen to x.x.x.x:xxxx...
INFO: Server has been set up ...
Model meta-info: <class 'federatedscope.core.lr.LogisticRegression'>.
... ...
INFO: Client: Listen to x.x.x.x:xxxx...
INFO: Client (address x.x.x.x:xxxx) has been set up ...
Client (address x.x.x.x:xxxx) is assigned with #1.
INFO: Model meta-info: <class 'federatedscope.core.lr.LogisticRegression'>.
... ...
{'Role': 'Client #2', 'Round': 0, 'Results_raw': {'train_avg_loss': 5.215108394622803, 'train_loss': 333.7669372558594, 'train_total': 64}}
{'Role': 'Client #1', 'Round': 0, 'Results_raw': {'train_total': 64, 'train_loss': 290.9668884277344, 'train_avg_loss': 4.54635763168335}}
----------- Starting a new training round (Round #1) -------------
... ...
INFO: Server: Training is finished! Starting evaluation.
INFO: Client #1: (Evaluation (test set) at Round #20) test_loss is 30.387419
... ...
INFO: Server: Final evaluation is finished! Starting merging results.
... ...
```
## Advanced
As a comprehensive FL platform, FederatedScope provides the fundamental implementation to support requirements of various FL applications and frontier studies, towards both convenient usage and flexible extension, including:
- **Personalized Federated Learning**: Client-specific model architectures and training configurations are applied to handle the non-IID issues caused by the diverse data distributions and heterogeneous system resources.
- **Federated Hyperparameter Optimization**: When hyperparameter optimization (HPO) comes to Federated Learning, each attempt is extremely costly due to multiple rounds of communication across participants. It is worth noting that HPO under the FL is unique and more techniques should be promoted such as low-fidelity HPO.
- **Privacy Attacker**: The privacy attack algorithms are important and convenient to verify the privacy protection strength of the design FL systems and algorithms, which is growing along with Federated Learning.
- **Graph Federated Learning**: Working on the ubiquitous graph data, Graph Federated Learning aims to exploit isolated sub-graph data to learn a global model, and has attracted increasing popularity.
- **Recommendation**: As a number of laws and regulations go into effect all over the world, more and more people are aware of the importance of privacy protection, which urges the recommender system to learn from user data in a privacy-preserving manner.
- **Differential Privacy**: Different from the encryption algorithms that require a large amount of computation resources, differential privacy is an economical yet flexible technique to protect privacy, which has achieved great success in database and is ever-growing in federated learning.
- ...
More supports are coming soon! We have prepared a [tutorial](https://federatedscope.io/) to provide more details about how to utilize FederatedScope to enjoy your journey of Federated Learning!
Materials of related topics are constantly being updated, please refer to [FL-Recommendation](https://github.com/alibaba/FederatedScope/tree/master/materials/paper_list/FL-Recommendation), [Federated-HPO](https://github.com/alibaba/FederatedScope/tree/master/materials/paper_list/Federated_HPO), [Personalized FL](https://github.com/alibaba/FederatedScope/tree/master/materials/paper_list/Personalized_FL), [Federated Graph Learning](https://github.com/alibaba/FederatedScope/tree/master/materials/paper_list/Federated_Graph_Learning), [FL-NLP](https://github.com/alibaba/FederatedScope/tree/master/materials/paper_list/FL-NLP), [FL-Attacker](https://github.com/alibaba/FederatedScope/tree/master/materials/paper_list/FL-Attacker), [FL-Incentive-Mechanism](https://github.com/alibaba/FederatedScope/tree/master/materials/paper_list/FL-Incentive), [FL-Fairness](https://github.com/alibaba/FederatedScope/tree/master/materials/paper_list/FL-Fiarness) and so on.
## Documentation
The classes and methods of FederatedScope have been well documented so that users can generate the API references by:
```shell
cd doc
pip install -r requirements.txt
make html
```
NOTE:
* The `doc/requirements.txt` is only for documentation of API by Sphinx, which can be automatically generated by Github actions `.github/workflows/sphinx.yml`. (Trigger by pull request if `DOC` in the title.)
* Download via Artifacts in Github actions.
We put the API references on our [website](https://federatedscope.io/refs/index).
Besides, we provide documents for [executable scripts](https://github.com/alibaba/FederatedScope/tree/master/scripts) and [customizable configurations](https://github.com/alibaba/FederatedScope/tree/master/federatedscope/core/configs).
## License
FederatedScope is released under Apache License 2.0.
## Publications
If you find FederatedScope useful for your research or development, please cite the following <a href="https://arxiv.org/abs/2204.05011" target="_blank">paper</a>:
```
@article{federatedscope,
title = {FederatedScope: A Flexible Federated Learning Platform for Heterogeneity},
author = {Xie, Yuexiang and Wang, Zhen and Gao, Dawei and Chen, Daoyuan and Yao, Liuyi and Kuang, Weirui and Li, Yaliang and Ding, Bolin and Zhou, Jingren},
journal={Proceedings of the VLDB Endowment},
volume={16},
number={5},
pages={1059--1072},
year={2023}
}
```
More publications can be found in the [Publications](https://federatedscope.io/pub/).
## Contributing
We **greatly appreciate** any contribution to FederatedScope! We provide a developer version of FederatedScope with additional pre-commit hooks to perform commit checks compared to the official version:
```bash
# Install the developer version
pip install -e .[dev]
pre-commit install
# Or switch to the developer version from the official version
pip install pre-commit
pre-commit install
pre-commit run --all-files
```
You can refer to [Contributing to FederatedScope](https://federatedscope.io/docs/contributor/) for more details.
Welcome to join in our [Slack channel](https://join.slack.com/t/federatedscopeteam/shared_invite/zt-1apmfjqmc-hvpYbsWJdm7D93wPNXbqww), or DingDing group (please scan the following QR code) for discussion.
<img width="150" src="https://img.alicdn.com/imgextra/i2/O1CN01NSWjlJ1q8bliVtjRp_!!6000000005451-0-tps-924-926.jpg" width="400" alt="federatedscope-logo">
| An easy-to-use federated learning platform | federated-learning,machine-learning,pytorch | 3 | 21 | 554 | 544 | 25 | 27 | 6 |
ssi02014/react-query-tutorial | # 💻 TanStack Query(React)
- 해당 저장소는 TanStack Query(React)에서 자주 사용하는 개념들을 정리한 저장소입니다. TanStack Query(React)의 모든 활용 방법이 작성된 상태는 아니며, 필요한 내용은 추가, 보완할 예정입니다.
<br />
## Contributors
- 기여해주신 모든 분께 감사드립니다.
- 오탈자, 가독성이 좋지 않은 부분 또는 추가 내용은 `Pull Request`, `Issue` 등을 자유롭게 남겨주시면 검토 후에 반영하겠습니다.
[![contributors](https://contrib.rocks/image?repo=ssi02014/react-query-tutorial)](https://github.com/ssi02014/react-query-tutorial/graphs/contributors)
<br />
## TanStack Query(React) v5
- ⭐️ TanStack Query(React) `v5`가 23.10.17에 릴리즈됐습니다. 해당 문서는 `v5` 기준으로 작성되어 있습니다.
- ⭐️ 기존 `v4` 문서는 [react query tutorial v4 문서](https://github.com/ssi02014/react-query-tutorial/tree/master/README.v4.md)를 확인해 주세요.
![스크린샷 2023-10-18 오전 2 09 09](https://github.com/ssi02014/react-query-tutorial/assets/64779472/84de2a61-7e39-4d52-aed8-b0ab67af95bc)
- `v3 -> v4`, `v4 -> v5` Migrating 정리 문서는 아래 문서들을 확인해 주시기 바랍니다.
- [Migrating to TanStack Query(React) v5](https://github.com/ssi02014/react-query-tutorial/tree/master/document/v5.md)
- [Migrating to TanStack Query(React) v4](https://github.com/ssi02014/react-query-tutorial/tree/master/document/v4.md)
<br />
## 주요 컨셉 및 가이드 목차
1. [React Query 개요 및 기능](#개요)
2. [기본 설정(QueryClientProvider, QueryClient)](#react-query-기본-설정)
3. [React Query Devtools](#devtools)
4. [React Query 캐싱 라이프 사이클](#캐싱-라이프-사이클)
5. [useQuery](#usequery)
6. [useQuery 주요 리턴 데이터](#usequery-주요-리턴-데이터)
7. [staleTime과 gcTime](#staletime과-gctime)
8. [마운트 될 때마다 재요청하는 refetchOnMount](#refetchonmount)
9. [윈도우가 포커싱 될 때마다 재요청하는 refetchOnWindowFocus](#refetchonwindowfocus)
10. [Polling 방식을 구현하기 위한 refetchInterval와 refetchIntervalInBackground)](#polling)
11. [자동 실행의 enabled와 수동으로 쿼리를 다시 요청하는 refetch](#enabled-refetch)
12. [실패한 쿼리에 대해 재요청하는 retry](#retry)
13. [onSuccess, onError, onSettled](#onsuccess-onerror-onsettled) - 💡 **v5 @Deprecated**
14. [select를 이용한 데이터 변환](#select)
15. [쿼리가 pending 상태인 동안 보여 줄 수 있는 placeholderData](#placeholderdata)
16. [Paginated 구현에 유용한 keepPreviousData](#keepPreviousData) - 💡 **v5 @Deprecated**
17. [특정 쿼리 프로퍼티 변경 시에만 리렌더링을 트리거 할 수 있는 notifyOnChangeProps](#notifyOnChangeProps)
18. [쿼리를 병렬(Parallel) 요청할 수 있는 useQueries](#parallel)
19. [종속 쿼리(Dependent Queries)](#dependent-queries)
20. [QueryClient 인스턴스를 반환하는 useQueryClient](#usequeryclient)
21. [초기 데이터를 설정할 수 있는 initialData](#initial-query-data)
22. [데이터를 미리 불러오는 PreFetching](#prefetching)
23. [Infinite Queries(무한 쿼리) + useInfiniteQuery](#infinite-queries)
24. [서버와 HTTP CUD관련 작업을 위한 useMutation](#usemutation)
25. [쿼리 수동 취소 cancelQueries](#cancelqueries)
26. [쿼리를 무효화할 수 있는 queryClient.invalidateQueries](#쿼리-무효화)
27. [캐시 데이터 즉시 업데이트를 위한 queryClient.setQueryData](#캐시-데이터-즉시-업데이트)
28. [사용자 경험(UX)을 올려주는 Optimistic Updates(낙관적 업데이트)](#optimistic-update)
29. [에러가 발생했을 때 Fallback UI를 선언적으로 보여주기 위한 ErrorBoundary + useQueryErrorResetBoundary](#usequeryerrorresetboundary)
30. [서버 로딩 중일 때 Fallback UI를 선언적으로 보여주기 위한 Suspense](#suspense)
31. [앱 전체에 동일한 쿼리 함수를 공유하는 Default Query Function](#default-query-function)
32. [리액트 쿼리에 타입스크립트 적용](#react-query-typescript)
33. [리액트 쿼리 ESLint 적용](#react-query-eslint-plugin)
34. [리액트 쿼리 지원 버전](#지원-버전)
<br />
## 📃 기타 참고 문서
1. [QueryClient 주요 내용 정리 문서](https://github.com/ssi02014/react-query-tutorial/tree/master/document/queryClient.md)
2. [기본적인 React Query 아키텍처 살펴보기: inside React Query](https://github.com/ssi02014/react-query-tutorial/tree/master/document/insideReactQuery.md)
<br />
## 👨🏻💻 주요 참고 페이지
- [TanStack/query 공식 깃허브](https://github.com/TanStack/query)
- [TkDodo 블로그(TanStack Query maintainer)](https://tkdodo.eu/blog/)
<br />
## 📃 React Query 개요 및 기능
[목차 이동](#주요-컨셉-및-가이드-목차)
### 개요
- react-query는 리액트 애플리케이션에서 `서버 상태 가져오기`, `캐싱`, `동기화 및 업데이트`를 보다 쉽게 다룰 수 있도록 도와주는 라이브러리이다. 클라이언트 상태와 서버 상태를 명확히 구분하기 위해 만들어졌다.
- react-query에서는 기존 상태 관리 라이브러리인 `redux`, `mobX`가 `클라이언트 상태 작업`에 적합하지만, `비동기 또는 서버 상태 작업`에는 그다지 좋지 않다고 언급한다.
- 클라이언트 상태(Client State)와 서버 상태(Server State)는 완전히 다른 개념이며, 클라이언트 상태는 각각의 input 값으로 예를 들 수 있고, 서버 상태는 데이터베이스에 저장되어 있는 데이터로 예를 들 수 있다.
<br />
### 기능
- 캐싱
- 동일한 데이터에 대한 중복 요청을 단일 요청으로 통합
- 백그라운드에서 오래된 데이터 업데이트
- 데이터가 얼마나 오래되었는지 알 수 있다.
- 데이터 업데이트를 가능한 빠르게 반영
- 페이지네이션 및 데이터 지연 로드와 같은 성능 최적화
- 서버 상태의 메모리 및 가비지 수집 관리
- 구조 공유를 사용하여 쿼리 결과를 메모화
<br />
## React Query 기본 설정
[목차 이동](#주요-컨셉-및-가이드-목차)
- [QueryClient 공식 문서](https://tanstack.com/query/v5/docs/reference/QueryClient)
- [QueryClientProvider 공식 문서](https://tanstack.com/query/v5/docs/react/reference/QueryClientProvider)
```tsx
import { QueryClient } from "@tanstack/react-query";
const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: Infinity,
// ...
},
},
});
```
- QueryClient를 사용하여 `캐시`와 상호 작용할 수 있다.
- QueryClient에서 모든 `query` 또는 `mutation`에 기본 옵션을 추가할 수 있으며, 종류가 상당하므로 공식 문서를 참고해 보자.
```tsx
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
const queryClient = new QueryClient({ /* options */});
function App() {
return (
<QueryClientProvider client={queryClient}>
<div>블라블라</div>
</QueryClientProvider>;
);
}
```
- react-query를 사용하기 위해서는 `QueryClientProvider`를 최상단에서 감싸주고 `QueryClient` 인스턴스를 client props로 넣어 애플리케이션에 연결해야 한다.
- 위 예시에서 App.js에 QueryClientProvider로 컴포넌트를 감싸고, client props에다 queryClient를 연결함으로써, 이 context는 앱에서 비동기 요청을 알아서 처리하는 `background` 계층이 된다.
<br />
## Devtools
![스크린샷 2022-04-07 오후 11 53 32](https://user-images.githubusercontent.com/64779472/162228222-d1c7dd3e-ce62-484d-bfa0-8493f3e68cae.png)
[목차 이동](#주요-컨셉-및-가이드-목차)
- [React Query Devtools 공식 문서](https://tanstack.com/query/v5/docs/react/devtools)
- react-query는 `전용 devtools`를 제공하며 별도의 패키지 설치가 필요하다.
- devtools를 사용하면 React Query의 모든 내부 동작을 `시각화`하는 데 도움이 되며 문제가 발생하면 `디버깅 시간을 절약`할 수 있다.
- devtools는 기본값으로 `process.env.NODE_ENV === "development"` 인 경우에만 실행된다, 즉 일반적으로 개발 환경에서만 작동하도록 설정되어 있으므로, 프로젝트 배포 시에 Devtools 삽입 코드를 제거해 줄 필요가 없다.
- Next 13+의 App Dir에선 dev dependency로 설치해야 동작한다.
```bash
$ npm i @tanstack/react-query-devtools
# or
$ pnpm add @tanstack/react-query-devtools
# or
$ yarn add @tanstack/react-query-devtools
# or
$ bun add @tanstack/react-query-devtools
```
```tsx
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
function App() {
return (
<QueryClientProvider client={queryClient}>
{/* The rest of your application */}
<ReactQueryDevtools initialIsOpen={false} />
</QueryClientProvider>
);
}
```
### options
- initialIsOpen (Boolean)
- `true`이면 개발 도구가 기본적으로 열려 있도록 설정할 수 있다.
- buttonPosition?: ("top-left" | "top-right" | "bottom-left" | "bottom-right" | "relative")
- 기본값: `bottom-right`
- devtools 패널을 여닫기 위한 로고 위치
- `relative`일 때 버튼은 devtools를 렌더링하는 위치에 배치된다.
- 일반적으로 initialIsOpen, buttonPosition을 자주 사용하며 그 외에 position, client와 같은 옵션들도 존재한다.
<br />
## 캐싱 라이프 사이클
[목차 이동](#주요-컨셉-및-가이드-목차)
- [React Query 캐시 라이프 사이클 공식 문서](https://tanstack.com/query/v5/docs/react/guides/caching)
```
* Query Instances with and without cache data(캐시 데이터가 있거나 없는 쿼리 인스턴스)
* Background Refetching(백그라운드 리패칭)
* Inactive Queries(비활성 쿼리)
* Garbage Collection(가비지 컬렉션)
```
- `gcTime`의 기본값 5분, `staleTime` 기본값 0초를 가정
1. `A`라는 queryKey를 가진 A 쿼리 인스턴스가 `mount`됨
2. 네트워크에서 데이터 fetch하고, 불러온 데이터는 A라는 queryKey로 `캐싱`함
3. 이 데이터는 `fresh`상태에서 `staleTime(기본값 0)` 이후 `stale` 상태로 변경됨
4. A 쿼리 인스턴스가 `unmount`됨
5. 캐시는 `gcTime(기본값 5min)` 만큼 유지되다가 `가비지 콜렉터(GC)`로 수집됨
6. 만일, gcTime 지나기 전이고, A 쿼리 인스턴스 fresh한 상태라면 새롭게 mount되면 캐시 데이터를 보여준다.
<br />
## useQuery
[목차 이동](#주요-컨셉-및-가이드-목차)
### useQuery 기본 문법
- [useQuery 공식 문서](https://tanstack.com/query/v5/docs/react/reference/useQuery)
- useQuery는 `v5`부터 인자로 단 하나의 `객체`만 받는다. 그중에 첫 번째 인자가 `queryKey`, `queryFn`가 필수 값이다.
```tsx
const result = useQuery({
queryKey, // required
queryFn, // required
// ...options ex) gcTime, staleTime, select, ...
});
result.data;
result.isLoading;
result.refetch;
// ...
```
```tsx
// 실제 예제
// 💡 queryFn의 반환 타입을 지정해주면 useQuery의 타입 추론이 원활합니다.
const getAllSuperHero = async (): Promise<AxiosResponse<Hero[]>> => {
return await axios.get("http://localhost:4000/superheroes");
};
const { data, isLoading } = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
});
```
<br >
**1. queryKey**
```tsx
// (1) queryKey는 데이터를 고유하게 식별에 더해 쿼리 함수에 아래와 같이 편리하게 전달할 수도 있다.
const getSuperHero = async ({
queryKey,
}: {
queryKey: ["super-hero", number];
}): Promise<AxiosResponse<Hero>> => {
const heroId = queryKey[1]; // ex) queryKey: ["super-hero", "3"]
return await axios.get(`http://localhost:4000/superheroes/${heroId}`);
};
const useSuperHeroData = (heroId: string) => {
return useQuery({
queryKey: ["super-hero", heroId],
queryFn: getSuperHero, // (*)
});
};
```
- useQuery의 queryKey는 `배열`로 지정해 줘야 한다.
- 이는 단일 문자열만 포함된 배열이 될 수도 있고, 여러 문자열과 중첩된 객체로 구성된 복잡한 형태일 수도 있다.
```tsx
// An individual todo
useQuery({ queryKey: ["todo", 5], ... })
// An individual todo in a "preview" format
useQuery({ queryKey: ["todo", 5, { preview: true }], ...})
```
- useQuery는 `queryKey`를 기반으로 `쿼리 캐싱`을 관리하는 것이 핵심이다.
- 만약, 쿼리가 특정 변수에 `의존`한다면 배열에다 이어서 줘야 한다. `ex: ["super-hero", heroId, ...]`
- **이는 사실 굉장히 중요하다.** 예를 들어, `queryClient.setQueryData` 등과 같이 특정 쿼리에 접근이 필요 할 때 `초기에 설정해둔 포맷`을 지켜줘야 제대로 쿼리에 접근할 수 있다.
- 아래 options 예제를 살펴보면 useSuperHeroData의 queryKey는 `["super-hero", heroId]`이다. 그렇다면 queryClient.setQueryData를 이용할 때 똑같이 `["super-hero", heroId]` 포맷을 가져야 한다. 그렇지 않으면 원하는 쿼리에 접근할 수 없다.
<br />
**2. queryFn**
- useQuery의 queryFn는 `Promise`를 반환하는 함수를 넣어야 한다.
```tsx
// (2) 상단의 queryKey 예제와 반대로 queryFn 자체적으로 인자를 받는 형태
const getSuperHero = async (heroId: string): Promise<AxiosResponse<Hero>> => {
return await axios.get(`http://localhost:4000/superheroes/${heroId}`);
};
const useSuperHeroData = (heroId: string) => {
return useQuery({
queryKey: ["super-hero", heroId],
queryFn: () => getSuperHero(heroId), // (*)
});
};
```
<br />
**3. options**
- [useQuery 공식 문서](https://tanstack.com/query/v5/docs/react/reference/useQuery)
- useQuery의 `options`에 많이 쓰이는 옵션들은 차근차근 살펴볼 예정이다. 문서 외에 더욱 자세히 알고 싶다면 위 공식 문서를 참고하자.
<br />
```tsx
const useSuperHeroData = (heroId: string) => {
return useQuery({
queryKey: ["super-hero", heroId],
queryFn: () => getSuperHero(heroId),
gcTime: 5 * 60 * 1000, // 5분
staleTime: 1 * 60 * 1000, // 1분
retry: 1,
// ... options
});
};
```
<br />
### useQuery 주요 리턴 데이터
- [useQuery 공식 문서](https://tanstack.com/query/v5/docs/react/reference/useQuery)
```tsx
const {
data,
error,
status,
fetchStatus,
isLoading,
isFetching,
isError,
refetch,
// ...
} = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
});
```
- **data**: 쿼리 함수가 리턴한 `Promise`에서 `resolved`된 데이터
- **error**: 쿼리 함수에 오류가 발생한 경우, 쿼리에 대한 오류 객체
- **status**: `data`, 쿼리 결과값에 대한 상태를 표현하는 status는 문자열 형태로 `3가지`의 값이 존재한다.
- pending: 쿼리 데이터가 없고, 쿼리 시도가 아직 완료되지 않은 상태.
- `{ enabled: false }` 상태로 쿼리가 호출되면 이 상태로 시작된다.
- [Dependent Queries 공식 문서](https://tanstack.com/query/v5/docs/react/guides/dependent-queries)
- error: 에러 발생했을 때 상태
- success: 쿼리 함수가 오류 없이 요청 성공하고 데이터를 표시할 준비가 된 상태.
- **fetchStatus**: `queryFn`에 대한 정보를 나타냄
- fetching: 쿼리가 현재 실행 중인 상태
- paused: 쿼리를 요청했지만, 잠시 중단된 상태 (network mode와 연관)
- idle: 쿼리가 현재 아무 작업도 수행하지 않는 상태
- **isLoading**: `캐싱 된 데이터가 없을 때` 즉, 처음 실행된 쿼리일 때 로딩 여부에 따라 `true/false`로 반환된다.
- 이는 캐싱 된 데이터가 있다면 로딩 여부에 상관없이 `false`를 반환한다.
- `isFetching && isPending` 와 동일하다.
- **isFetching**: 캐싱 된 데이터가 있더라도 쿼리가 실행되면 로딩 여부에 따라 `true/false`로 반환된다.
- **isSuccess**: 쿼리 요청이 성공하면 `true`
- **isError**: 쿼리 요청 중에 에러가 발생한 경우 `true`
- **refetch**: 쿼리를 수동으로 다시 가져오는 함수.
- **그 외 반환 데이터들을 자세히 알고 싶으면 useQuery 공식 문서 참고**
<br />
### 💡 status, fetchStatus 나눠서 다루는 걸까?
- [Why Two Different States 공식 문서](https://tanstack.com/query/v5/docs/react/guides/queries#why-two-different-states)
- fetchStatus는 HTTP 네트워크 연결 상태와 좀 더 관련된 상태 데이터이다.
- 예를 들어, status가 `success` 상태라면 주로 fetchStatus는 `idle` 상태지만, 백그라운드에서 re-fetch가 발생할 때 `fetching` 상태일 수 있다.
- status가 보통 `loading` 상태일 때 fetchStatus는 주로 `fetching`를 갖지만, 네트워크 연결이 되어 있지 않은 경우 `paused` 상태를 가질 수 있다.
- 정리하자면 아래와 같다.
- status는 `data`가 있는지 없는지에 대한 상태를 의미한다.
- fetchStatus는 쿼리 즉, `queryFn 요청`이 진행 중인지 아닌지에 대한 상태를 의미한다.
<br />
## useQuery 주요 옵션
[목차 이동](#주요-컨셉-및-가이드-목차)
- [useQuery 공식 문서](https://tanstack.com/query/v5/docs/react/reference/useQuery)
<br />
### staleTime과 gcTime
- stale은 용어 뜻대로 `썩은`이라는 의미이다. 즉, 최신 상태가 아니라는 의미이다.
- fresh는 뜻 그대로 `신선한`이라는 의미이다. 즉, 최신 상태라는 의미이다.
```tsx
const {
data,
// ...
} = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
gcTime: 5 * 60 * 1000, // 5분
staleTime: 1 * 60 * 1000, // 1분
});
```
<br />
1. staleTime: `(number | Infinity)`
- staleTime은 데이터가 `fresh에서 stale` 상태로 변경되는 데 걸리는 시간, 만약 staleTime이 `3000`이면 fresh 상태에서 `3초` 뒤에 stale로 변환
- `fresh` 상태일 때는 쿼리 인스턴스가 새롭게 mount 되어도 네트워크 요청(fetch)이 일어나지 않는다.
- 참고로, staleTime의 기본값은 `0`이기 때문에 일반적으로 fetch 후에 바로 stale이 된다.
2. gcTime: `(number | Infinity)`
- 데이터가 사용하지 않거나, `inactive` 상태일 때 `캐싱 된 상태로` 남아있는 시간(밀리초)이다.
- 쿼리 인스턴스가 unmount 되면 데이터는 `inactive 상태로 변경`되며, 캐시는 `gcTime`만큼 유지된다.
- gcTime이 지나면 `가비지 콜렉터`로 수집된다.
- gcTime이 지나기 전에 쿼리 인스턴스가 다시 mount 되면, 데이터를 fetch 하는 동안 캐시 데이터를 보여준다.
- gcTime은 staleTime과 관계없이, 무조건 `inactive` 된 시점을 기준으로 캐시 데이터 삭제를 결정한다.
- gcTime의 기본값은 `5분`이다. SSR 환경에서는 `Infinity`이다.
- 여기서 주의할 점은 staleTime과 gcTime의 기본값은 각각 `0분`과 `5분`이다. 따라서 staleTime에 어떠한 설정도 하지 않으면 해당 쿼리를 사용하는 컴포넌트(Observer)가 mount 됐을 때 매번 다시 API를 요청할 것이다.
- staleTime을 gcTime보다 길게 설정했다고 가정하면, staleTime만큼의 캐싱을 기대했을 때 원하는 결과를 얻지 못할 것이다. 즉, 두 개의 옵션을 적절하게 설정해 줘야 한다.
- 참고로, [TkDodo의 reply](https://github.com/TanStack/query/discussions/1685#discussioncomment-1876723)에 따르면 TkDodo는 `staleTime을 gcTime보다 작게 설정하는 것이 좋다.`는 의견에 동의하지 않는다고 한다.
- 예컨대, staleTime이 60분일지라도 유저가 자주 사용하지 않는 데이터라면 굳이 gcTime을 60분 이상으로 설정하여 메모리를 낭비할 필요가 없다.
<br />
### refetchOnMount
```tsx
const {
data,
// ...
} = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
refetchOnMount: true,
});
```
- refetchOnMount: `boolean | "always" | ((query: Query) => boolean | "always")`
- refetchOnMount는 데이터가 `stale` 상태일 경우, mount마다 `refetch`를 실행하는 옵션이다.
- refetchOnMount의 기본값은 `true`이다.
- `always`로 설정하면 마운트 시마다 매번 refetch를 실행한다.
- `false`로 설정하면 최초 fetch 이후에는 refetch 하지 않는다.
<br />
### refetchOnWindowFocus
```tsx
const {
data,
// ...
} = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
refetchOnWindowFocus: true,
});
```
- refetchOnWindowFocus: `boolean | "always" | ((query: Query) => boolean | "always")`
- refetchOnWindowFocus는 데이터가 `stale` 상태일 경우 `윈도우 포커싱` 될 때마다 refetch를 실행하는 옵션이다.
- refetchOnWindowFocus의 기본값은 `true`이다.
- 예를 들어, 크롬에서 다른 탭을 눌렀다가 다시 원래 보던 중인 탭을 눌렀을 때도 이 경우에 해당한다. 심지어 F12로 개발자 도구 창을 켜서 네트워크 탭이든, 콘솔 탭이든 개발자 도구 창에서 놀다가 페이지 내부를 다시 클릭했을 때도 이 경우에 해당한다.
- `always`로 설정하면 항상 윈도우 포커싱 될 때마다 refetch를 실행한다는 의미이다.
<br />
### Polling
```tsx
const {
data,
// ...
} = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
refetchInterval: 2000,
refetchIntervalInBackground: true,
});
```
```
Polling(폴링)이란?
실시간 웹을 위한 기법으로 "일정한 주기(특정한 시간)"를 가지고 서버와 응답을 주고받는 방식이 폴링 방식이다.
react-query에서는 "refetchInterval", "refetchIntervalInBackground"을 이용해서 구현할 수 있다.
```
1. refetchInterval: `number | false | ((data: TData | undefined, query: Query) => number | false)`
- refetchInterval은 `시간(ms)`를 값으로 넣어주면 일정 시간마다 자동으로 refetch를 시켜준다.
2. refetchIntervalInBackground: `boolean`
- refetchIntervalInBackground는 `refetchInterval`과 함께 사용하는 옵션이다.
- 탭/창이 백그라운드에 있는 동안 refetch 시켜준다. 즉, 브라우저에 focus 되어 있지 않아도 refetch를 시켜주는 것을 의미한다.
<br />
### enabled refetch
```tsx
const {
data,
refetch,
// ...
} = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
enabled: false,
});
const handleClickRefetch = useCallback(() => {
refetch();
}, [refetch]);
return (
<div>
{data?.data.map((hero: Data) => (
<div key={hero.id}>{hero.name}</div>
))}
<button onClick={handleClickRefetch}>Fetch Heroes</button>
</div>
);
```
- enabled: `boolean`
- enabled는 `쿼리가 자동으로 실행되지 않도록 할 때 설정`할 수 있다.
- enabled를 `false`를 주면 쿼리가 자동 실행되지 않는다.
- useQuery 반환 값 중 status가 `pending` 상태로 시작한다.
- refetch는 쿼리를 `수동`으로 다시 요청하는 기능이다. 쿼리 오류가 발생하면 오류만 기록된다.
- 오류를 발생시키려면 `throwOnError` 속성을 `true`로 해서 전달해야 한다.
- 보통 자동으로 쿼리 요청을 하지 않고 `버튼 클릭`이나 특정 이벤트를 통해 요청을 시도할 때 같이 사용한다.
- 💡 주의할 점은, `enabled: false`를 줬다면 `queryClient`가 쿼리를 다시 가져오는 방법 중 `invalidateQueries`와 `refetchQueries`를 무시한다.
<br />
### retry
```tsx
const {
data,
refetch,
// ...
} = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
retry: 10, // 오류를 표시하기 전에 실패한 요청을 10번 재시도합니다.
});
```
- retry: `(boolean | number | (failureCount: number, error: TError) => boolean)`
- retry는 쿼리가 `실패`하면 useQuery를 `특정 횟수`만큼 재요청하는 옵션이다.
- retry가 `false`인 경우, 실패한 쿼리는 기본적으로 다시 시도하지 않는다. `true`인 경우에는 실패한 쿼리에 대해서 무한 재요청을 시도한다.
- 값으로 `숫자`를 넣을 경우, 실패한 쿼리가 해당 숫자를 충족할 때까지 요청을 재시도한다.
- 기본값은 클라이언트 환경에서는 `3`, 서버 환경에서는 `0`이다.
<br />
### onSuccess, onError, onSettled
- _NOTE_: `v4`까지 있던 onSuccess, onError, onSettled Callback은 `useQuery` 옵션에서 [@Deprecated](https://github.com/TanStack/query/pull/5353) 됐다. 단, `useMutation`에서는 사용 가능하다.
- [Breaking React Query's API on purpose](https://velog.io/@cnsrn1874/breaking-react-querys-api-on-purpose) 참고
<br />
### select
```tsx
const {
data,
// ...
} = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
select: (data) => {
const superHeroNames = data.data.map((hero) => hero.name);
return superHeroNames;
},
});
return (
<div>
{data.map((heroName, idx) => (
<div key={`${heroName}-${idx}`}>{heroName}</div>
))}
</div>
);
```
- select: `(data: TData) => unknown`
- select 옵션을 사용하여 쿼리 함수에서 `반환된 데이터의 일부를 변환하거나 선택할 수 있다.`
- 참고로, 반환된 데이터 값에는 영향을 주지만 쿼리 캐시에 저장되는 내용에는 영향을 주지 않는다.
<br />
### placeholderData
```tsx
const placeholderData = useMemo(() => generateFakeHeroes(), []);
const {
data,
// ...
} = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
placeholderData: placeholderData,
});
```
- placeholderData: `TData | (previousValue: TData | undefined; previousQuery: Query | undefined,) => TData`
- placeholderData를 설정하면 쿼리가 `pending` 상태인 동안 특정 쿼리에 대한 placeholder data로 사용된다.
- placeholderData는 캐시에 유지되지 않으며, 서버 데이터와 관계없는 보여주기용 가짜 데이터다.
- placeholderData에 함수를 제공하는 경우 첫 번째 인자로 이전에 관찰된 쿼리 데이터를 수신하고, 두 번째 인자는 이전 쿼리 인스턴스가 된다.
<br />
### keepPreviousData
- v4까지 있던 keepPreviousData은 `페이지네이션`과 같은 기능을 구현할 때 많이 사용하던 옵션이었다. 캐싱 되지 않은 페이지를 가져올 때 목록이 `깜빡거리는 현상을 방지`할 수 있다.
- **하지만, v5부터 `keepPreviousData`, `isPreviousData`은 옵션은 제거됐다.**
- [Removed keepPreviousData in favor of placeholderData identity function](https://github.com/ssi02014/react-query-tutorial/blob/main/document/v5.md#9-%EF%B8%8F-removed-keeppreviousdata-in-favor-of-placeholderdata-identity-function)
- 이들은 각각 `placeholderData`와 `isPlaceholderData` 플래그와 거의 유사하게 동작하기 때문이다.
- 아래 예제처럼 `placeholderData`를 활용하면서 이전 버전에서 `keepPreviousData의 값을 "true"`로 줬을 때와 동일한 기능을 수행할 수 있다.
```tsx
import { useQuery, keepPreviousData } from "@tanstack/react-query";
const {
data,
// ...
} = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
placeholderData: keepPreviousData,
});
```
- 아래 예시처럼 작성해서 위의 `keepPreviousData` 예시와 동일한 동작을 할 수 있다.
```tsx
import { useQuery } from "@tanstack/react-query";
const {
data,
// ...
} = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
placeholderData: (previousData, previousQuery) => previousData,
});
```
<br />
### notifyOnChangeProps
```tsx
import { useQuery } from "@tanstack/react-query";
const { data, dataUpdatedAt } = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
notifyOnChangeProps: ["data"], // data 값 변경시에만 리렌더링이 발생한다
});
```
- notifyOnChangeProps: `string[] | "all" | (() => string[] | "all")`
- 쿼리의 특정 프로퍼티들이 변경되었을 때만 리렌더링이 발생하도록 설정할 수 있다.
- 별도로 설정하지 않으면, **컴포넌트에서 접근한 값이 변경되었을 때** 리렌더링이 발생한다 (기본 동작). 즉, 위 예시에서 `notifyOnChangeProps`에 설정값을 주지 않았다면, `data`, `dataUpdatedAt` 중 어느 하나가 변경되면 리렌더링이 발생한다.
- `"all"`로 설정할 경우, 쿼리의 어떤 프로퍼티가 변경되든 컴포넌트가 리렌더링된다.
- 참고: 기본 동작은 [Object.defineProperty()](https://github.com/TanStack/query/pull/1578/files#diff-93f379800fc8abf895eba249b2e2371eda98740aa40fc9f284a8088d190f46c3R506-R514)를 활용한다.
<br />
## Parallel
[목차 이동](#주요-컨셉-및-가이드-목차)
- [useQueries 공식 문서](https://tanstack.com/query/v5/docs/react/reference/useQueries)
```tsx
const { data: superHeroes } = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
});
const { data: friends } = useQuery({
queryKey: ["friends"],
queryFn: getFriends,
});
```
- 몇 가지 상황을 제외하면 쿼리 여러 개가 선언된 일반적인 상황일 때, 쿼리 함수들은 `그냥 병렬로 요청돼서 처리`된다.
- 이러한 특징은 쿼리 처리의 `동시성`을 극대화시킨다.
```tsx
const queryResults = useQueries({
queries: [
{
queryKey: ["super-hero", 1],
queryFn: () => getSuperHero(1),
staleTime: Infinity, // 다음과 같이 option 추가 가능!
},
{
queryKey: ["super-hero", 2],
queryFn: () => getSuperHero(2),
staleTime: 0,
},
// ...
],
});
```
- 하지만, 쿼리 여러 개를 동시에 수행해야 하는데, 렌더링이 거듭되는 사이사이에 계속 쿼리가 수행되어야 한다면 쿼리를 수행하는 로직이 hook 규칙에 어긋날 수도 있다. 이럴 때는 `useQueries`를 사용한다.
- useQueries 훅은 모든 쿼리 결과가 포함된 배열을 반환한다. 반환되는 순서는 쿼리가 입력된 순서와 동일하다.
### Queries Combine
- [useQueries Combine 공식 문서](https://tanstack.com/query/v5/docs/react/reference/useQueries#combine)
- useQueries 훅이 반환한 모든 쿼리 결과가 포함된 배열을 단일 값으로 결합하려면 combine 옵션을 사용할 수 있다.
```tsx
const ids = [1,2,3]
const combinedQueries = useQueries({
queries: ids.map(id => (
{ queryKey: ["post", id], queryFn: () => fetchPost(id) },
)),
combine: (results) => {
return ({
data: results.map(result => result.data),
pending: results.some(result => result.isPending),
})
}
})
```
- combinedQueries는 `data`와 `pending` 프로퍼티를 갖는다.
- _Note_: 참고로 결합하면 쿼리 결과의 나머지 다른 프로퍼티들은 손실된다.
<br />
## Dependent Queries
[목차 이동](#주요-컨셉-및-가이드-목차)
- [Dependent Queries 공식 문서](https://tanstack.com/query/v5/docs/react/guides/dependent-queries)
- `종속 쿼리`는 어떤 A라는 쿼리가 있는데 이 A 쿼리를 실행하기 전에 사전에 완료되어야 하는 B 쿼리가 있는데, 이러한 B 쿼리에 의존하는 A 쿼리를 종속 쿼리라고 한다.
- react-query에서는 `enabled` 옵션을 통해 종속 쿼리를 쉽게 구현할 수 있다.
```tsx
// 사전에 완료되어야 할 쿼리
const { data: user } = useQuery({
queryKey: ["user", email],
queryFn: () => getUserByEmail(email),
});
const channelId = user?.data.channelId;
// user 쿼리에 종속 쿼리
const { data: courses } = useQuery({
queryKey: ["courses", channelId],
queryFn: () => getCoursesByChannelId(channelId),
enabled: !!channelId,
});
```
<br />
## useQueryClient
[목차 이동](#주요-컨셉-및-가이드-목차)
- useQueryClient는 `QueryClient` 인스턴스를 반환한다.
- `QueryClient`는 캐시와 상호작용한다.
- QueryClient는 다음 문서에서 자세하게 다룬다.
- [QueryClient](https://github.com/ssi02014/react-query-tutorial/tree/master/document/queryClient.md)
```tsx
import { useQueryClient } from "@tanstack/react-query";
const queryClient = useQueryClient();
```
<br />
## Initial Query Data
[목차 이동](#주요-컨셉-및-가이드-목차)
- [Initial Query Data 공식 문서](https://tanstack.com/query/v5/docs/react/guides/initial-query-data)
- 쿼리에 대한 `초기 데이터`가 필요하기 전에 캐시에 제공하는 방법이 있다.
- initialData 옵션을 통해서 쿼리를 미리 채우는 데 사용할 수 있으며, 초기 로드 상태도 건너뛸 수도 있다.
```tsx
const useSuperHeroData = (heroId: string) => {
const queryClient = useQueryClient();
return useQuery({
queryKey: ["super-hero", heroId],
queryFn: () => getSuperHero(heroId),
initialData: () => {
const queryData = queryClient.getQueryData(["super-heroes"]) as any;
const hero = queryData?.data?.find(
(hero: Hero) => hero.id === parseInt(heroId)
);
if (hero) return { data: hero };
},
});
};
```
<br />
- 참고로 위 예제에서 `queryClient.getQueryData` 메서드는 기존 쿼리의 `캐싱 된 데이터`를 가져오는 데 사용할 수 있는 동기 함수이다. 쿼리가 존재하지 않으면 `undefined`를 반환한다.
<br />
## Prefetching
[목차 이동](#주요-컨셉-및-가이드-목차)
- [prefetching 공식 문서](https://tanstack.com/query/v5/docs/react/guides/prefetching)
- prefetch는 말 그대로 미리 fetch해오겠다는 의미이다.
- 비동기 요청은 데이터양이 클수록 받아오는 속도가 느리고, 시간이 오래 걸린다. 사용자 경험을 위해 데이터를 미리 받아와서 캐싱해 놓으면? 새로운 데이터를 받기 전에 사용자가 캐싱 된 데이터를 볼 수 있어 `UX에 좋은 영향`을 줄 수 있다.
- 예를 들어 페이지네이션을 구현했다고 가정하면, 페이지1에서 페이지2로 이동했을 때 페이지3의 데이터를 미리 받아놓는 것이다!
- react query에서는 `queryClient.prefetchQuery`을 통해서 prefetch 기능을 제공한다.
### prefetchQuery
```tsx
const prefetchNextPosts = async (nextPage: number) => {
const queryClient = useQueryClient();
// 해당 쿼리의 결과는 일반 쿼리들처럼 캐싱 된다.
await queryClient.prefetchQuery({
queryKey: ["posts", nextPage],
queryFn: () => fetchPosts(nextPage),
// ...options
});
};
// 단순 예
useEffect(() => {
const nextPage = currentPage + 1;
if (nextPage < maxPage) {
prefetchNextPosts(nextPage);
}
}, [currentPage]);
```
- 참고로 prefetchQuery를 통해 가져오는 쿼리에 대한 데이터가 `이미 캐싱 되어 있으면 데이터를 가져오지 않는다.`
<br />
### prefetchInfiniteQuery
- infinite 쿼리는 바로 아래에 나오겠지만 일반 쿼리들처럼 infinite 쿼리도 prefetch 할 수 있다.
- 기본적으로 쿼리의 `첫 번째 페이지만 prefetch` 되며, 그 이상을 prefetch 하려면 `pages 옵션`을 활용해야 한다.
- 이 경우에는 `getNextPageParam` 함수를 무조건 제공해 줘야 한다는 점을 주의하자.
```tsx
const prefetchTodos = async () => {
await queryClient.prefetchInfiniteQuery({
queryKey: ["projects"],
queryFn: fetchProjects,
initialPageParam: 0,
getNextPageParam: (lastPage, pages) => lastPage.nextCursor,
pages: 3, // prefetch the first 3 pages
});
};
```
<br />
## Infinite Queries
[목차 이동](#주요-컨셉-및-가이드-목차)
- [Infinite Queries 공식 문서](https://tanstack.com/query/v5/docs/react/guides/infinite-queries)
- [useInfiniteQuery 공식 문서](https://tanstack.com/query/v5/docs/react/reference/useInfiniteQuery)
- Infinite Queries(무한 쿼리)는 `무한 스크롤`이나 `load more(더 보기)`과 같이 특정 조건에서 데이터를 추가적으로 받아오는 기능을 구현할 때 사용하면 유용하다.
- react-query는 이러한 무한 쿼리를 지원하기 위해 useQuery의 유용한 버전인 `useInfiniteQuery`을 지원한다.
```tsx
import { useInfiniteQuery } from "@tanstack/react-query";
// useInfiniteQuery의 queryFn의 매개변수는 `pageParam`이라는 프로퍼티를 가질 수 있다.
const fetchColors = async ({
pageParam,
}: {
pageParam: number;
}): Promise<AxiosResponse<PaginationColors>> => {
return await axios.get(`http://localhost:4000/colors?page=${pageParam}`);
};
const InfiniteQueries = () => {
const { data, hasNextPage, isFetching, isFetchingNextPage, fetchNextPage } =
useInfiniteQuery({
queryKey: ["colors"],
queryFn: fetchColors,
initialPageParam: 1,
getNextPageParam: (lastPage, allPages) => {
return allPages.length < 4 && allPages.length + 1;
},
// ...
});
return (
<div>
{data?.pages.map((group, idx) => ({
/* ... */
}))}
<div>
<button disabled={!hasNextPage} onClick={() => fetchNextPage()}>
LoadMore
</button>
</div>
<div>{isFetching && !isFetchingNextPage ? "Fetching..." : null}</div>
</div>
);
};
```
### 주요 반환
- `useInfiniteQuery`는 기본적으로 useQuery와 사용법은 비슷하지만, 차이점이 있다.
- useInfiniteQuery는 반환 값으로 `isFetchingNextPage`, `isFetchingPreviousPage`, `fetchNextPage`, `fetchPreviousPage`, `hasNextPage` 등이 추가적으로 있다.
- data.pages: 모든 페이지 데이터를 포함하는 배열이다.
- data.pageParams: 모든 페이지 매개변수를 포함하는 배열이다.
- fetchNextPage: `다음 페이지`를 fetch 할 수 있다.
- fetchPreviousPage: `이전 페이지`를 fetch 할 수 있다.
- isFetchingNextPage: `fetchNextPage` 메서드가 다음 페이지를 가져오는 동안 true이다.
- isFetchingPreviousPage: `fetchPreviousPage` 메서드가 이전 페이지를 가져오는 동안 true이다.
- hasNextPage: 가져올 수 있는 `다음 페이지`가 있을 경우 true이다.
- hasPreviousPage: 가져올 수 있는 `이전 페이지`가 있을 경우 true이다.
<br />
### 주요 옵션
1. initialPageParam: `TPageParam`
- initialPageParam을 이용해서 첫 페이지를 가져올 때 사용할 기본 페이지 매개변수이다. `필수값`이다.
2. getNextPageParam: `(lastPage, allPages, lastPageParam, allPageParams) => TPageParam | undefined | null`
- getNextPageParam 을 이용해서 페이지를 증가시킬 수 있다. `필수값`이다.
- getNextPageParam의 첫 번째 인자 `lastPage`는 fetch 해온 가장 최근에 가져온 페이지 목록이다.
- 두 번째 인자 `allPages`는 현재까지 가져온 모든 페이지 데이터이다.
- 세 번째 인자 `firstPageParam` 는 첫 번째 페이지의 매개변수이다.
- 네 번째 인자 `allPageParams` 는 모든 페이지의 매개변수이다.
- 사용 가능한 다음 페이지가 없음을 표시하려면 `undefined` 또는 `null`을 반환하면 된다.
- `getPreviousPageParam`도 존재하며, `getNextPageParam`와 반대의 속성을 갖고 있다.
3. maxPages: `number | undefined`
- infinite 쿼리에 저장할 `최대 페이지 수`이다.
- 최대 페이지 수에 도달했는데 새 페이지를 가져오면 `지정된 방향(next, previous)`에 따라 페이지 배열에서 첫 번째 페이지 또는 마지막 페이지가 제거된다.
- `0` 또는 `undefined`라면 페이지 수는 무제한이다.
<br />
### 💡 pageParam
- `queryFn`에 넘겨주는 pageParam가 단순히 다음 page의 값만을 관리할 수 있는 것은 아니다.
- pageParam 값은 `getNextPageParam`에서 원하는 형태로 변경시켜 줄 수 있다.
- 무슨 말인지 예시를 보면 이해가 쉽다. 👍 아래와 같이 getNextPageParam에서 반환 데이터가 단순히 다음 페이지값이 아닌 객체로 반환한다고 해보자.
```tsx
const { data, hasNextPage, isFetching, isFetchingNextPage, fetchNextPage } =
useInfiniteQuery({
queryKey: ["colors"],
queryFn: ({ pageParam }) => fetchColors(pageParam), // pageParam: { page: number; etc: string }
initialPageParam: {
page: number,
etc: "hi",
},
getNextPageParam: (lastPage, allPages) => {
return (
allPages.length < 4 && {
page: allPages.length + 1,
etc: "bye",
};
)
},
});
```
- 그러면 `queryFn`에 넣은 pageParam에서 getNextPageParam에서 반환한 객체를 받아올 수 있다.
```tsx
const fetchColors = async ({
page,
etc,
}: {
page: number;
etc: string;
}): Promise<AxiosResponse<PaginationColors>> => {
return await axios.get(
`http://localhost:4000/colors?page=${page}?etc=${etc}`
);
};
```
- 즉, getNextPageParam의 반환 값이 pageParams로 들어가기 때문에 pageParams를 원하는 형태로 변경하고 싶다면 getNextPageParam의 반환 값을 설정하면 된다.
<br />
## useMutation
[목차 이동](#주요-컨셉-및-가이드-목차)
- [useMutation 공식 문서](https://tanstack.com/query/v5/docs/react/reference/useMutation)
- react-query에서 기본적으로 서버에서 데이터를 Get 할 때는 useQuery를 사용한다.
- 만약 서버의 data를 post, patch, put, delete와 같이 수정하고자 한다면 이때는 useMutation을 이용한다.
- 요약하자면 `R(read)는 useQuery`, `CUD(Create, Update, Delete)는 useMutation`을 사용한다.
```tsx
const mutation = useMutation({
mutationFn: createTodo,
onMutate() {
/* ... */
},
onSuccess(data) {
console.log(data);
},
onError(err) {
console.log(err);
},
onSettled() {
/* ... */
},
});
const onCreateTodo = (e) => {
e.preventDefault();
mutate({ title });
};
```
- useMutation의 반환 값인 mutation 객체의 `mutate` 메서드를 이용해서 요청 함수를 호출할 수 있다.
- mutate는 `onSuccess`, `onError` 메서드를 통해 성공했을 시, 실패했을 시 response 데이터를 핸들링할 수 있다.
- `onMutate`는 mutation 함수가 실행되기 전에 실행되고, mutation 함수가 받을 동일한 변수가 전달된다.
- `onSettled`는 try...catch...finally 구문의 `finally`처럼 요청이 성공하든 에러가 발생하든 상관없이 마지막에 실행된다.
```tsx
const mutation = useMutation(addTodo);
try {
const todo = await mutation.mutateAsync(todo);
console.log(todo);
} catch (error) {
console.error(error);
} finally {
console.log("done");
}
```
- 만약, useMutation을 사용할 때 promise 형태의 response가 필요한 경우라면 `mutateAsync`를 사용해서 얻어올 수 있다.
<br />
### 💡 mutate와 mutateAsync는 무엇을 사용하는 게 좋을까?
- 대부분의 경우에 우리는 mutate를 사용하는 것이 유리하다. 왜냐하면 mutate는 콜백(onSuccess, onError)를 통해 data와 error에 접근할 수 있기 때문에 우리가 특별히 핸들링해 줄 필요가 없다.
- 하지만 mutateAsync는 Promise를 직접 다루기 때문에 이런 에러 핸들링 같은 부분을 직접 다뤄야 한다.
- 만약 이를 다루지 않으면 `unhandled promise rejection` 에러가 발생할 수 있다.
- [TkDodo Blog: Mutate or MutateAsync](https://tkdodo.eu/blog/mastering-mutations-in-react-query#mutate-or-mutateasync)
<br />
### 💡 useMutation callback과 mutate callback의 차이
- useMutation은 onSuccess, onError, onSettled와 같은 Callback 함수들을 가질 수 있다.
- 그뿐만 아니라, mutate 역시 위와 같은 Callback 함수들을 가질 수 있다.
- 둘의 동작은 같다고 생각할 수 있지만 약간의 차이가 있다. 다음과 같다.
- useMutation의 Callback 함수와 mutate의 Callback 함수는 독립적으로 실행된다.
- 순서는 `useMutation의 Callback -> mutate의 Callback` 순으로 실행된다.
- mutation이 완료되기 전에 컴포넌트가 unmount된다면 mutate의 Callback은 실행되지 않을 수 있다.
- `TkDodo`는 위와 같은 이유로 둘을 분리해서 사용하는 것이 적절하다고 한다.
- 꼭 필요한 로직(ex. `쿼리 초기화`)은 useMutation의 Callback으로 실행시킨다.
- 리다이렉션 및 UI 관련 작업은 mutate Callback에서 실행시킨다.
- [TkDodo Blog: Some callbacks might not fire](https://tkdodo.eu/blog/mastering-mutations-in-react-query#some-callbacks-might-not-fire)
<br />
## cancelQueries
[목차 이동](#주요-컨셉-및-가이드-목차)
- [Query Cancellation 공식 문서](https://tanstack.com/query/v5/docs/react/guides/query-cancellation)
- 쿼리를 `수동으로 취소`하고 싶을 수도 있다.
- 예를 들어 요청을 완료하는 데 시간이 오래 걸리는 경우 사용자가 취소 버튼을 클릭하여 요청을 중지하도록 허용할 수 있다.
- 또는, 아직 HTTP 요청이 끝나지 않았을 때, 페이지를 벗어날 때도 중간에 취소해서 불필요한 네트워크 리소스를 개선할 수 있다.
- 이렇게 하려면 쿼리를 취소하고 이전 상태로 되돌리기 위해 `queryClient.cancelQueries(queryKey)`를 사용할 수 있다. 또한 react-query는 쿼리 취소뿐만아니라 queryFn의 Promise도 취소한다.
```tsx
const query = useQuery({
queryKey: ["super-heroes"],
queryFn: getAllSuperHero,
});
const queryClient = useQueryClient();
const onCancelQuery = (e) => {
e.preventDefault();
queryClient.cancelQueries({
queryKey: ["super-heroes"],
});
};
return <button onClick={onCancelQuery}>Cancel</button>;
```
<br />
## 쿼리 무효화
[목차 이동](#주요-컨셉-및-가이드-목차)
- invalidateQueries은 화면을 최신 상태로 유지하는 가장 간단한 방법이다.
- 예를 들면, 게시판 목록에서 어떤 게시글을 `작성(Post)`하거나 게시글을 `제거(Delete)`했을 때 화면에 보여주는 게시판 목록을 실시간으로 최신화해야 할 때가 있다.
- 하지만 이때, `query Key`가 변하지 않으므로 강제로 쿼리를 무효화하고 최신화를 진행해야 하는데, 이런 경우에 `invalidateQueries()` 메소드를 이용할 수 있다.
- 즉, query가 오래되었다는 것을 판단하고 다시 `refetch`를 할 때 사용한다!
```tsx
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
const useAddSuperHeroData = () => {
const queryClient = useQueryClient();
return useMutation(addSuperHero, {
onSuccess(data) {
queryClient.invalidateQueries({ queryKey: ["super-heroes"] }); // 이 key에 해당하는 쿼리가 무효화!
console.log(data);
},
onError(err) {
console.log(err);
},
});
};
```
- 참고로, queryKey에 `["super-heroes"]`을 넘겨주면 queryKey에 "super-heroes"를 포함하는 모든 쿼리가 무효화된다.
```tsx
queryClient.invalidateQueries({ queryKey: ["super-heroes"] });
// 아래 query들 모두 무효화 된다.
const query = useQuery({
queryKey: ["super-heroes", "superman"],
queryFn: fetchSuperHero,
});
const query = useQuery({
queryKey: ["super-heroes", { id: 1 }],
queryFn: fetchSuperHero,
});
```
- 위에 `enabled/refetch`에서도 언급했지만 `enabled: false` 옵션을 주면`queryClient`가 쿼리를 다시 가져오는 방법 중 `invalidateQueries`와 `refetchQueries`를 무시한다.
- [Disabling/Pausing Queries 공식 문서](https://tanstack.com/query/v5/docs/react/guides/disabling-queries) 참고
- 자세한 내용은 [queryClient.invalidateQueries 정리](https://github.com/ssi02014/react-query-tutorial/blob/master/document/queryClient.md#invalidateQueries)를 참고하자.
<br />
## 캐시 데이터 즉시 업데이트
[목차 이동](#주요-컨셉-및-가이드-목차)
- [queryClient.setQueryData 공식 문서](https://tanstack.com/query/v5/docs/reference/QueryClient#queryclientsetquerydata)
- 바로 위에서 `queryClient.invalidateQueries`를 이용해 캐시 데이터를 최신화하는 방법을 알아봤는데 `queryClient.setQueryData`를 이용해서도 데이터를 즉시 업데이트할 수 있다.
- `queryClient.setQueryData`는 쿼리의 캐시 된 데이터를 즉시 업데이트하는 데 사용할 수 있는 `동기 함수`이다.
- setQueryData의 두 번째 인자는 `updater` 함수이다. 해당 함수의 첫 번째 매개변수는 `oldData`로 기존 데이터를 가져온다.
```tsx
const useAddSuperHeroData = () => {
const queryClient = useQueryClient();
return useMutation({
mutationFn: addSuperHero,
onSuccess(data) {
queryClient.setQueryData(["super-heroes"], (oldData: any) => {
return {
...oldData,
data: [...oldData.data, data.data],
};
});
},
onError(err) {
console.log(err);
},
});
};
```
<br />
## Optimistic Update
[목차 이동](#주요-컨셉-및-가이드-목차)
- `Optimistic Update(낙관적 업데이트)`란 서버 업데이트 시 UI에서도 어차피 업데이트할 것이라고(낙관적인) 가정해서 `미리 UI를 업데이트` 시켜주고 서버를 통해 검증받고 업데이트 또는 롤백하는 방식이다.
- 예를 들어 facebook에 좋아요 버튼이 있는데 이것을 유저가 누른다면, 일단 client 쪽 state를 먼저 업데이트한다. 그리고 만약에 실패한다면, 예전 state로 돌아가고 성공하면 필요한 데이터를 다시 fetch 해서 서버 데이터와 확실히 연동을 진행한다.
- Optimistic Update가 정말 유용할 때는 인터넷 속도가 느리거나 서버가 느릴 때이다. 유저가 행한 액션을 기다릴 필요 없이 바로 업데이트되는 것처럼 보이기 때문에 사용자 경험(UX) 측면에서 좋다.
```tsx
const useAddSuperHeroData = () => {
const queryClient = useQueryClient();
return useMutation({
mutateFn: addSuperHero,
onMutate: async () => {
await queryClient.cancelQueries(["super-heroes"]);
// 이전 값
const previousHeroData = queryClient.getQueryData(["super-heroes"]);
// 새로운 값으로 낙관적 업데이트 진행
queryClient.setQueryData(["super-heroes"], (oldData: any) => {
return {
...oldData,
data: [
...oldData.data,
{ ...newHero, id: oldData?.data?.length + 1 },
],
};
});
// 값이 들어있는 context 객체를 반환
return { previousHeroData };
},
// mutation이 실패하면 onMutate에서 반환된 context를 사용하여 롤백 진행
onError(error, hero, context: any) {
queryClient.setQueryData(["super-heroes"], context.previousHeroData);
},
// 오류 또는 성공 후에는 항상 refetch
onSettled() {
queryClient.invalidateQueries(["super-heroes"]);
},
});
};
```
- 참고로 위 예제에서 `cancelQueries`는 쿼리를 `수동으로 취소`시킬 수 있다. 취소시킬 query의 queryKey를 cancelQueries의 인자로 보내 실행시킨다.
- 예를 들어, 요청을 완료하는 데 시간이 오래 걸리는 경우, 사용자가 취소 버튼을 클릭하여 요청을 중지하는 경우 이용할 수 있다.
<br />
## useQueryErrorResetBoundary
[목차 이동](#주요-컨셉-및-가이드-목차)
- [useQueryErrorResetBoundary 공식 문서](https://tanstack.com/query/v5/docs/react/reference/useQueryErrorResetBoundary)
- react-query에서 ErrorBoundary와 useQueryErrorResetBoundary를 결합해 `선언적`으로 에러가 발생했을 때 Fallback UI를 보여줄 수 있다.
- ErrorBoundary에 대한 설명은 해당 문서 참고 [ErrorBoundary](https://github.com/ssi02014/react-query-tutorial/blob/master/document/errorBoundary.md)
<br />
- `useQueryErrorResetBoundary`는 `ErrorBoundary`와 함께 사용되는데 이는, 기본적으로 리액트 공식 문서에서 기본 코드 베이스가 제공되긴 하지만 좀 더 쉽게 활용할 수 있는 `react-error-boundary` 라이브러리가 존재하고, react-query 공식 문서에서도 해당 라이브러리 사용을 예시로 제공해 주기 때문에 `react-error-boundary`를 설치해서 사용해 보자.
```bash
$ npm i react-error-boundary
# or
$ pnpm add react-error-boundary
# or
$ yarn add react-error-boundary
# or
$ bun add react-error-boundary
```
- 설치 후에 아래와 같은 QueryErrorBoundary라는 컴포넌트를 생성하고, 그 내부에 `useQueryErrorResetBoundary` 훅을 호출해 `reset` 함수를 가져온다.
- 아래 코드 내용은 단순하다.
- Error가 발생하면 ErrorBoundary의 `fallbackRender` prop으로 넘긴 내용이 렌더링 되고, 그렇지 않으면 children 내용이 렌더링 된다.
- 또한, fallbackRender에 넣어주는 콜백 함수 매개 변수로 `resetErrorBoundary`를 구조 분해 할당을 통해 가져올 수 있는데, 이를 통해 모든 쿼리 에러를 `초기화`할 수 있다. 아래 코드 같은 경우에는 button을 클릭하면 에러를 초기화하게끔 작성했다.
```tsx
import { useQueryErrorResetBoundary } from "@tanstack/react-query"; // (*)
import { ErrorBoundary } from "react-error-boundary"; // (*)
interface Props {
children: React.ReactNode;
}
const QueryErrorBoundary = ({ children }: Props) => {
const { reset } = useQueryErrorResetBoundary(); // (*)
return (
<ErrorBoundary
onReset={reset}
fallbackRender={({ resetErrorBoundary }) => (
<div>
Error!!
<button onClick={() => resetErrorBoundary()}>Try again</button>
</div>
)}
>
{children}
</ErrorBoundary>
);
};
export default QueryErrorBoundary;
```
- 그리고 App.js에다 QueryErrorBoundary 컴포넌트를 추가하면 된다. 여기서 주의할 점은 queryClient 옵션에다 `{ throwOnError: true }`를 추가해야 한다는 점이다. 그래야 오류가 발생했을 때 `ErrorBoundary` 컴포넌트가 감지할 수 있다.
```tsx
import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
import QueryErrorBoundary from "./components/ErrorBoundary"; // (*)
const queryClient = new QueryClient({
defaultOptions: {
queries: {
throwOnError: true, // (*) 여기서는 글로벌로 세팅했지만, 개별 쿼리로 세팅 가능
},
},
});
function App() {
return (
<QueryClientProvider client={queryClient}>
<QueryErrorBoundary>{/* 하위 컴포넌트들 */}</QueryErrorBoundary>
</QueryClientProvider>
);
}
```
<br />
## Suspense
[목차 이동](#주요-컨셉-및-가이드-목차)
- ErrorBoundary는 에러가 발생했을 때 보여주는 Fallback UI를 `선언적`으로 작성할 수 있고, 리액트 쿼리는 `Suspense`와도 결합해서 `서버 통신 상태가 로딩 중`일 때 Fallback UI를 보여줄 수 있게 선언적으로 작성할 수 있다.
- 참고로, Suspense 컴포넌트는 리액트 v16부터 제공되는 `Component Lazy Loading`이나 `Data Fetching` 등의 비동기 처리를 할 때, 응답을 기다리는 동안 Fallback UI(ex: Loader)를 보여주는 기능을 하는 컴포넌트다.
```tsx
import { Suspense } from "react";
const queryClient = new QueryClient({
defaultOptions: {
queries: {
// suspense: true, - 💡 v5부터 Deprecated
// useQuery/useInfiniteQuery와 같은 일반 훅 대신 useSuspenseQuery/useSuspenseInfiniteQuery와 같은 suspense 훅 사용
throwOnError: true,
},
},
});
function App() {
return (
<QueryErrorBoundary>
<Suspense fallback={<Loader />}>{/* 하위 컴포넌트들 */}</Suspense>
</QueryErrorBoundary>;
);
}
```
- 코드를 보면 우리는 서버 상태가 로딩일 때 Loader 컴포넌트를 보여주겠다!라고 이해할 수 있다.
- Suspense컴포넌트 내부에서 어떤 로직이 동작하는지 우리는 신경 쓰지 않아도된다. 이처럼 `내부 복잡성을 추상화`하는 게 바로 `선언형 컴포넌트`이다.
- 위와 같이 `react-query(useSuspenseQuery)`와 결합한 `Suspense`는 아래와 같은 과정으로 동작한다.
```
1. Suspense mount
2. MainComponent mount
3. MainComponent에서 useSuspenseQuery 훅을 사용하여 비동기 데이터 요청
4. MainComponent unmount, fallback UI인 Loader mount
5. 비동기 데이터 요청이 완료되면 fallback UI인 Loader unmount
6. MainComponent mount
```
<br />
### 💡 New hooks for suspense
- [new hooks for suspense](https://github.com/ssi02014/react-query-tutorial/blob/main/document/v5.md#21-%EF%B8%8F-new-hooks-for-suspense)
- v5에서는 `data fetching`에 대한 `suspense`가 마침내 안정화되었습니다.
- `useSuspenseQuery`, `useSuspenseInfiniteQuery`, `useSuspenseQueries` 3가지 훅이 추가되었습니다.
- 기존의 `suspense 옵션`은 제거되었습니다. 따라서 Suspense를 적용하려면 위 훅들을 활용해야 합니다.
- 위 3가지 훅을 사용하게 되면 타입 레벨에서 `data`가 `undefined` 상태가 되지 않습니다.
```tsx
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
const fetchGroups = async (): Promise<{ data: Group[] }> => {
const res = await axios.get("/groups");
return res;
};
// as-is
const { data } = useQuery({
queryKey: ["groups"],
queryFn: fetchGroups,
select: (data) => data.data,
});
// to-be
const { data } = useSuspenseQuery({
queryKey: ["groups"],
queryFn: fetchGroups,
select: (data) => data.data,
});
```
<br />
### 💡 @suspensive/react-query
- TanStack Query(React) 공식 문서의 `Community Resources`에서는 Suspense를 더 `타입 세이프`하게 잘 사용하기 위해 [useSuspenseQuery](https://suspensive.org/ko/docs/react-query/useSuspenseQuery), [useSuspenseQueries](https://suspensive.org/ko/docs/react-query/useSuspenseQueries), [useSuspenseInfiniteQuery](https://suspensive.org/ko/docs/react-query/useSuspenseInfiniteQuery)를 제공하는 [@suspensive/react-query](https://tanstack.com/query/v4/docs/react/community/suspensive-react-query)를 소개하고 있다.
- suspensive/react-query의 훅(useSuspenseQuery, useSuspenseQueries, useSuspenseInfiniteQuery)은 @tanstack/react-query v5 버전에 추가([관련 Pull Request](https://github.com/TanStack/query/pull/5739))되고 공식 API로 [이 페이지](https://tanstack.com/query/v5/docs/react/guides/suspense)에서 확인할 수 있습니다.
<br />
## Default Query Function
[목차 이동](#주요-컨셉-및-가이드-목차)
- [Default Query Function 공식 문서](https://tanstack.com/query/v5/docs/react/guides/default-query-function)
- 앱 전체에서 동일한 쿼리 함수를 공유하고, `queryKey`를 사용해 가져와야 할 데이터를 식별하고 싶다면 `QueryClient`에 `queryFn` 옵션을 통해 Default Query Function을 지정해 줄 수 있다.
```tsx
// 기본 쿼리 함수
const getSuperHero = async ({ queryKey }: any) => {
const heroId = queryKey[1];
return await axios.get(`http://localhost:4000/superheroes/${heroId}`);
};
const queryClient = new QueryClient({
defaultOptions: {
queries: {
queryFn: getSuperHero,
// ...queries options
},
},
});
function App() {
return (
<QueryClientProvider client={queryClient}>{/* ... */}</QueryClientProvider>
);
}
```
- `QueryClient`에 앱 전체에서 사용할 쿼리 함수를 지정해 준다.
```tsx
// 사용 예시
const useSuperHeroData = (heroId: string) => {
return useQuery({ queryKey: ["super-hero", heroId] });
};
```
```tsx
// 다음 형태는 불가능
const useSuperHeroData = (heroId: string) => {
return useQuery({
queryKey: ["super-hero", heroId],
queryFn: () => getSuperHero(heroId),
});
};
```
- useQuery의 첫 번째 인자로 `queryKey`만 넣어주면 두 번째 인자에 들어갈 `queryFn`은 자동으로 설정된 기본 쿼리 함수가 들어간다.
- 일반적으로 `useQuery`를 사용할 때와 달리 `queryFn`을 지정하지 않기에 쿼리 함수에 직접 인자를 넣어주는 형태의 사용은 불가능하다.
<br />
## React Query Typescript
[목차 이동](#주요-컨셉-및-가이드-목차)
- React Query는 TypeScript의 `제네릭(Generics)`을 많이 사용한다. 이는 라이브러리가 실제로 데이터를 가져오지 않고 API가 반환하는 데이터 유형을 알 수 없기 때문이다.
<br />
### useQuery
현재 useQuery가 갖고 있는 제네릭은 `4개`이며, 다음과 같다.
1. **TQueryFnData**: useQuery로 실행하는 query function의 `실행 결과`의 타입을 지정하는 제네릭 타입이다.
2. **TError**: query function의 `error` 형식을 정하는 제네릭 타입이다.
3. **TData**: useQuery의 `data에 담기는 실질적인 데이터`의 타입을 말한다. 첫 번째 제네릭과의 차이점은 `select`와 같이 query function의 반환 데이터를 추가 핸들링을 통해 반환하는 경우에 대응할 수 있는 타입이라고 생각하면 좋다.
4. **TQueryKey**: useQuery의 첫 번째 인자 `queryKey`의 타입을 명시적으로 지정해 주는 제네릭 타입이다.
```tsx
// useQuery의 타입
export function useQuery<
TQueryFnData = unknown,
TError = DefaultError,
TData = TQueryFnData,
TQueryKey extends QueryKey = QueryKey
>
```
```tsx
import { AxiosError } from "axios";
// useQuery 타입 적용 예시
const { data } = useQuery<
AxiosResponse<Hero[]>,
AxiosError,
string[],
["super-heroes", number]
>({
queryKey: ["super-heroes", id],
queryFn: getSuperHero,
select: (data) => {
const superHeroNames = data.data.map((hero) => hero.name);
return superHeroNames;
},
});
/**
주요 타입
* data: string[] | undefined
* error: AxiosError<any, any>
* select: (data: AxiosResponse<Hero[]>): string[]
*/
```
<br />
### useMutation
useMutation도 useQuery와 동일하게 현재 4개이며, 다음과 같다.
1. **TData**: useMutation에 넘겨준 mutation function의 `실행 결과`의 타입을 지정하는 제네릭 타입이다.
- data의 타입과 onSuccess(1번째 인자) 인자의 타입으로 활용된다.
2. **TError**: useMutation에 넘겨준 mutation function의 `error` 형식을 정하는 제네릭 타입이다.
3. **TVariables**: `mutate 함수`에 전달 할 인자를 지정하는 제네릭 타입이다.
- onSuccess(2번째 인자), onError(2번째 인자), onMutate(1번째 인자), onSettled(3번째 인자) 인자의 타입으로 활용된다.
4. **TContext**: mutation function을 실행하기 전에 수행하는 `onMutate 함수의 return값`을 지정하는 제네릭 타입이다.
- onMutate의 결과값의 타입을 onSuccess(3번째 인자), onError(3번째 인자), onSettled(4번째 인자)에서 활용하려면 해당 타입을 지정해야 한다.
```tsx
export function useMutation<
TData = unknown,
TError = DefaultError,
TVariables = void,
TContext = unknown
>
```
```tsx
// useMutation 타입 적용 예시
const { mutate } = useMutation<Todo, AxiosError, number, number>({
mutationFn: postTodo,
onSuccess: (res, id, nextId) => {},
onError: (err, id, nextId) => {},
onMutate: (id) => id + 1,
onSettled: (res, err, id, nextId) => {},
});
const onClick = () => {
mutate(5);
};
/**
주요 타입
* data: Todo
* error: AxiosError<any, any>
* onSuccess: (res: Todo, id: number, nextId: number)
* onError: (err: AxiosError, id: number, nextId: number)
* onMutate: (id: number)
* onSettled: (res: Todo, err: AxiosError, id: number, nextId: number),
*/
```
<br />
### useInfiniteQuery
현재 useInfiniteQuery 갖고 있는 제네릭은 `4개`이며, useQuery와 유사하다.
1. **TQueryFnData**: useInfiniteQuery로 실행하는 query function의 `실행 결과`의 타입을 지정하는 제네릭 타입이다.
2. **TError**: query function의 `error` 형식을 정하는 제네릭 타입이다.
3. **TData**: useInfiniteQuery의 `data에 담기는 실질적인 데이터`의 타입을 말한다. 첫 번째 제네릭과의 차이점은 `select`와 같이 query function의 반환 데이터를 추가 핸들링을 통해 반환하는 경우에 대응할 수 있는 타입이라고 생각하면 좋다.
4. **TQueryKey**: useInfiniteQuery의 첫 번째 인자 `queryKey`의 타입을 명시적으로 지정해 주는 제네릭 타입이다.
```tsx
export function useInfiniteQuery<
TQueryFnData = unknown,
TError = DefaultError,
TData = InfiniteData<TQueryFnData>,
TQueryKey extends QueryKey = QueryKey
>
```
```tsx
const {
data,
hasNextPage,
fetchNextPage,
//...
} = useInfiniteQuery<
AxiosResponse<PaginationColors>,
AxiosError,
InfiniteData<AxiosResponse<PaginationColors>, number>,
["colors"]
>({
queryKey: ["colors"],
queryFn: fetchColors,
initialPageParam: 1,
getNextPageParam: (lastPage, allPages) => {
return allPages.length < 4 && allPages.length + 1;
},
// ...options
});
/**
주요 타입
* data: InfiniteData<AxiosResponse<PaginationColors>, number> | undefined
* error: AxiosError<any, any>
* select: (data: InfiniteData<AxiosResponse<PaginationColors>, number>): InfiniteData<AxiosResponse<PaginationColors>, number>
* getNextPageParam: GetNextPageParamFunction<number, AxiosResponse<PaginationColors>>
*/
```
<br />
### 💡 Typescript Best Practice
- [TypeScript 공식 문서](https://tanstack.com/query/v5/docs/react/typescript)
- 위의 제네릭을 모두 사용하는 건 코드의 복잡도가 늘어난다. 하지만 react query는 타입을 잘 전달하므로 굳이 제네릭을 모두 직접 제공할 필요가 없다.
- 가장 좋은 방법은 `queryFn`의 타입을 잘 정의해서 `타입 추론`이 원활하게 되게 하는 것이다.
```tsx
const fetchGroups = async (): Promise<AxiosResponse<Group[]> => {
return await axios.get("/groups");
};
const { data } = useQuery({
queryKey: ["groups"],
queryFn: fetchGroups,
select: (data) => data.data,
});
/**
주요 타입
* data: AxiosResponse<Group[]> | undefined
* error: Error | null
* select: (data: AxiosResponse<Group[]>): Group[]
*/
```
<br />
## React Query ESLint Plugin
[목차 이동](#주요-컨셉-및-가이드-목차)
- Tanstack Query는 `자체 ESLint Plugin`을 제공합니다. 해당 플러그인을 통해 모범 사례를 적용하고, 일반적인 실수를 방지할 수 있습니다.
### 설치
```bash
$ npm i -D @tanstack/eslint-plugin-query
# or
$ pnpm add -D @tanstack/eslint-plugin-query
# or
$ yarn add -D @tanstack/eslint-plugin-query
# or
$ bun add -D @tanstack/eslint-plugin-query
```
<br />
### 사용 방법(1)
- 플러그인에 대한 `권장하는 모든 rule`을 적용하려면 아래와 같이 `.eslintrc.js` 파일의 `extends`배열 안에 `plugin:@tanstack/eslint-plugin-query/recommended`을 추가합니다.
```js
module.exports = {
// ...
extends: ["plugin:@tanstack/eslint-plugin-query/recommended"],
rules: {
/* 수정하고자 하는 rule 추가 가능... */
},
};
```
- 물론, rule을 변경하고 싶다면 rules에 아래 `사용방법(2)`와 같이 rule을 추가하면 됩니다.
<br />
### 사용 방법(2)
- 원하는 `rule`을 개별적으로 설정해서 적용하려면 아래와 같이 `.eslintrc.js` 파일의 `plugins`배열 안에 `@tanstack/query`를 추가하고, 적용하고자 하는 `rules`에 규칙을 추가합니다.
```js
module.exports = {
// ...
plugins: ["@tanstack/query"],
rules: {
"@tanstack/query/exhaustive-deps": "error",
"@tanstack/query/no-rest-destructuring": "warn",
"@tanstack/query/stable-query-client": "error",
},
};
```
<br />
## 지원 버전
[목차 이동](#주요-컨셉-및-가이드-목차)
- Tanstack Query v5에 필요한 TypeScript 최소 버전은 `v4.7`입니다.
- Tanstack Query v5에 필요한 React 최소 버전은 `v18`입니다.
- React v18 이상에서 지원하는 `useSyncExternalStore` 훅을 사용하고 있기 때문입니다.
- Tanstack Query v5의 브라우저별 지원 버전은 아래와 같습니다.
```
Chrome >= 91
Firefox >= 90
Edge >= 91
Safari >= 15
iOS >= 15
opera >= 77
```
<br />
| 😃 TanStack Query(aka. react query) 에서 자주 사용되는 개념 정리 | react-query,typescript,react,caching,tanstack-query | 3 | 15 | 29 | 191 | 0 | 2 | 0 |
harlanhong/awesome-talking-head-generation | null | null | face-reenactment,image-animation,motion-transfer,talking-head | 0 | 13 | 11 | 88 | 1 | 1 | 0 |
LAION-AI/CLAP | # CLAP
<p align="center">
<img src="https://raw.githubusercontent.com/LAION-AI/CLAP/main/assets/logo.PNG" alt="The Contrastive Language-Audio Pretraining Model Architecture" width="60%"/>
</p>
<p align="center">
<a href="https://arxiv.org/abs/2211.06687"><img src="https://img.shields.io/badge/arXiv-2211.06687-brightgreen.svg?style=flat-square"/></a>
<a href="https://pypi.org/project/laion-clap"><img src="https://badge.fury.io/py/laion-clap.svg"/></a>
<a href="https://huggingface.co/docs/transformers/v4.27.2/en/model_doc/clap"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Transformers-blue"/></a>
</p>
### This repository provides representations of audios and texts via Contrastive Language-Audio Pretraining (CLAP)
With CLAP, you can extract a latent representation of any given audio and text for your own model, or for different downstream tasks.
All codes are comming officially with the following paper, accepted by IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP 2023:
- [Large-Scale Contrastive Language-Audio Pretraining with Feature Fusion and Keyword-to-Caption Augmentation](https://arxiv.org/abs/2211.06687)
**New Updates:**
<b>1. We release new CLAP pretrained checkpoints pretrained on music and speech data collecstions from [our dataset collection repo](https://github.com/LAION-AI/audio-dataset).</b>
<b>2. CLAP model is incorporated and supported by [HuggingFace Transformers](https://huggingface.co/docs/transformers/v4.27.2/en/model_doc/clap). Many thanks to [Younes Belkada](https://huggingface.co/ybelkada) and [Arthur Zucker](https://fr.linkedin.com/in/arthur-zucker-8a0445144) for contributing to the HuggingFace support. </b>
## About this project
This project is a project in [LAION](https://laion.ai/) that aims at learning better audio understanding and getting more audio data.
This is an opensource project. We adopt the codebase of [open_clip](https://github.com/mlfoundations/open_clip) for this project.
many thanks to <a href="https://github.com/cfoster0/CLAP">@cfoster0</a> for allowing us to use his repo name.
## Architecture
Contrastive Language-Audio Pretraining, known as CLAP. Referring to the CLIP (Contrastive Language-Image Pretraining) architecture, the CLAP architecture is as follows.
<p align="center">
<img src="https://raw.githubusercontent.com/LAION-AI/CLAP/main/assets/audioclip-arch.png" alt="The Contrastive Language-Audio Pretraining Model Architecture" width="60%"/>
</p>
## Quick Start
We provide the PyPI library for our CLAP model:
```bash
pip install laion-clap
```
Then you can follow the below usage or refer to [unit_test.py](https://github.com/LAION-AI/CLAP/blob/laion_clap_pip/src/laion_clap/unit_test.py).
For the documentation of the API, please refer to [hook.py](https://github.com/LAION-AI/CLAP/blob/main/src/laion_clap/hook.py).
```python
import numpy as np
import librosa
import torch
import laion_clap
# quantization
def int16_to_float32(x):
return (x / 32767.0).astype(np.float32)
def float32_to_int16(x):
x = np.clip(x, a_min=-1., a_max=1.)
return (x * 32767.).astype(np.int16)
model = laion_clap.CLAP_Module(enable_fusion=False)
model.load_ckpt() # download the default pretrained checkpoint.
# Directly get audio embeddings from audio files
audio_file = [
'/home/data/test_clap_short.wav',
'/home/data/test_clap_long.wav'
]
audio_embed = model.get_audio_embedding_from_filelist(x = audio_file, use_tensor=False)
print(audio_embed[:,-20:])
print(audio_embed.shape)
# Get audio embeddings from audio data
audio_data, _ = librosa.load('/home/data/test_clap_short.wav', sr=48000) # sample rate should be 48000
audio_data = audio_data.reshape(1, -1) # Make it (1,T) or (N,T)
audio_embed = model.get_audio_embedding_from_data(x = audio_data, use_tensor=False)
print(audio_embed[:,-20:])
print(audio_embed.shape)
# Directly get audio embeddings from audio files, but return torch tensor
audio_file = [
'/home/data/test_clap_short.wav',
'/home/data/test_clap_long.wav'
]
audio_embed = model.get_audio_embedding_from_filelist(x = audio_file, use_tensor=True)
print(audio_embed[:,-20:])
print(audio_embed.shape)
# Get audio embeddings from audio data
audio_data, _ = librosa.load('/home/data/test_clap_short.wav', sr=48000) # sample rate should be 48000
audio_data = audio_data.reshape(1, -1) # Make it (1,T) or (N,T)
audio_data = torch.from_numpy(int16_to_float32(float32_to_int16(audio_data))).float() # quantize before send it in to the model
audio_embed = model.get_audio_embedding_from_data(x = audio_data, use_tensor=True)
print(audio_embed[:,-20:])
print(audio_embed.shape)
# Get text embedings from texts:
text_data = ["I love the contrastive learning", "I love the pretrain model"]
text_embed = model.get_text_embedding(text_data)
print(text_embed)
print(text_embed.shape)
# Get text embedings from texts, but return torch tensor:
text_data = ["I love the contrastive learning", "I love the pretrain model"]
text_embed = model.get_text_embedding(text_data, use_tensor=True)
print(text_embed)
print(text_embed.shape)
```
## Pretrained Models
The pretrained checkpoints can be found in [here](https://huggingface.co/lukewys/laion_clap/tree/main).
Please refer to the previous section for how to load and run the checkpoints.
For the PyPI library, [630k-audioset-best.pt](https://huggingface.co/lukewys/laion_clap/blob/main/630k-audioset-best.pt) and [630k-audioset-fusion-best.pt](https://huggingface.co/lukewys/laion_clap/blob/main/630k-audioset-fusion-best.pt) are our default models (non-fusion and fusion)
We further provide below pretrained models according to your usages:
* For general audio less than 10-sec: [630k-audioset-best.pt](https://huggingface.co/lukewys/laion_clap/blob/main/630k-audioset-best.pt) or [630k-best.pt](https://huggingface.co/lukewys/laion_clap/blob/main/630k-best.pt)
* For general audio with variable-length: [630k-audioset-fusion-best.pt](https://huggingface.co/lukewys/laion_clap/blob/main/630k-audioset-fusion-best.pt) or [630k-fusion-best.pt](https://huggingface.co/lukewys/laion_clap/blob/main/630k-fusion-best.pt)
* For music: [music_audioset_epoch_15_esc_90.14.pt](https://huggingface.co/lukewys/laion_clap/blob/main/music_audioset_epoch_15_esc_90.14.pt)
* For music and speech: [music_speech_epoch_15_esc_89.25.pt](https://huggingface.co/lukewys/laion_clap/blob/main/music_speech_epoch_15_esc_89.25.pt)
* For speech, music and general audio: [music_speech_audioset_epoch_15_esc_89.98.pt](https://huggingface.co/lukewys/laion_clap/blob/main/music_speech_audioset_epoch_15_esc_89.98.pt)
The checkpoints list here for each model setting is the one with the highest average mAP score in training.
The average mAP score is calculated by averaging 4 scores: A-->T mAP@10 on AudioCaps, and T-->A mAP@10 on AudioCaps, A-->T mAP@10 on Clotho, and T-->A mAP@10 on Clotho.
To use above pretrained models, you need to load the ckpt by yourself, as:
Update 2023.4.7: we have released 3 larger CLAP models trained on music, speech dataset in addition to LAION-Audio-630k. Here are descriptions of the model and their performance:
- `music_speech_audioset_epoch_15_esc_89.98.pt`: trained on music + speech + Audioset + LAION-Audio-630k. The zeroshot ESC50 performance is 89.98%, the GTZAN performance is 51%.
- `music_audioset_epoch_15_esc_90.14.pt`: trained on music + Audioset + LAION-Audio-630k. The zeroshot ESC50 performance is 90.14%, the GTZAN performance is 71%.
- `music_speech_epoch_15_esc_89.25.pt`: trained on music + speech + LAION-Audio-630k. The zeroshot ESC50 performance is 89.25%, the GTZAN performance is 69%.
The model uses a larger audio encoder. To load the model using the pip API:
```python
import laion_clap
model = laion_clap.CLAP_Module(enable_fusion=False, amodel= 'HTSAT-base')
model.load_ckpt('checkpoint_path/checkpoint_name.pt')
```
Please note that this is a temporary release for people who are working on larger-scale down-stream task.
We will release a more comprehensive version of the model with detailed experiments in the future.
Please take your own risk when using this model.
* All the new checkpoints did not trained with fusion. The training dataset size for `music_speech_audioset_epoch_15_esc_89.98.pt` is around 4M samples. The zeroshot GTZAN score is evaluated using the prompt `This audio is a <genre> song.`
<!-- We provide the CLAP's performance on audio classification tasks under the zero-shot setting or the supervised setting. More results can be found at our paper.
<p align="center">
<img src="https://raw.githubusercontent.com/LAION-AI/CLAP/main/assets/clap-zeroshot.PNG" alt="Zero-shot Performance" width="100%"/>
</p> -->
## Environment Installation
If you want to check and reuse our model into your project instead of directly using the pip library, you need to install the same environment as we use, please run the following command:
```bash
conda create env -n clap python=3.10
conda activate clap
git clone https://github.com/LAION-AI/CLAP.git
cd CLAP
# you can also install pytorch by following the official instruction (https://pytorch.org/get-started/locally/)
pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 torchaudio==0.11.0+cu113 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt
```
## Dataset format
We use training data in webdataset format. For details of our dataset please see https://github.com/LAION-AI/audio-dataset.
Due to copyright reasons, we cannot release the dataset we train this model on. However, we released [LAION-audio-630K](https://github.com/LAION-AI/audio-dataset/tree/main/laion-audio-630k), the data source we used to compose the dataset with link to each audio and their caption. Please refer to [LAION-audio-630K](https://github.com/LAION-AI/audio-dataset/tree/main/laion-audio-630k) for more details. You could download the dataset, preprocess it on your own and train it locally. To train on the local dataset, please change the `--remotedata` in training scripts (see [experiment_scripts](./experiment_scripts) folder) with `--datasetpath <your dir to datasets>`.
You can find an example of our dataset format in [here](https://drive.google.com/drive/folders/1scyH43eQAcrBz-5fAw44C6RNBhC3ejvX?usp=sharing).
It contains the full ESC50 dataset, split according to the first 5-fold split.
## Training, Fine-tuning and Evaluation
Please find the script of training, fine-tuning and evaluation (zero-shot and retrieval) in the [experiment_scripts](./experiment_scripts) folder.
The scripts included there are the one we used to train our model on a SLURM cluster.
You need to change the script to fit your own environment.
For example, in a single machine multi-GPU setting, you might want to use `torchrun` instead of `srun` to run the script.
To train on a single GPU machine, use `CUDA_VISIBLE_DEVICES=0 python -m ...` instead of `srun`.
We use [Weights and Biases](https://wandb.ai/site) for experiment logging. You need to configure the weights and biases in your environment.
To train on local dataset, please change the `--remotedata` in training scripts (see [experiment_scripts](./experiment_scripts) folder) with `--datasetpath <your dir to datasets>`.
## Core Code
Please refer to [main.py](https://github.com/LAION-AI/CLAP/blob/laion_clap_pip/src/laion_clap/training/main.py), [train.py](https://github.com/LAION-AI/CLAP/blob/laion_clap_pip/src/laion_clap/training/train.py), [data.py](https://github.com/LAION-AI/CLAP/blob/laion_clap_pip/src/laion_clap/training/data.py),and [model.py](https://github.com/LAION-AI/CLAP/blob/laion_clap_pip/src/laion_clap/clap_module/model.py) to quicly get familiar with our model.
## Reproducibility
An example of the preprocessed Clotho dataset in webdataset format can be download [here](https://drive.google.com/drive/folders/1mU9mBOe11jTFCrQRJQsUa4S-3TlNuYoI?usp=sharing) (by downloading, you will be agreeing the license described in the [Clotho dataset](https://zenodo.org/record/3490684#.Y9ALPeyZP1w)). The audio encoder pretrained with 48kHz AudioSet can be found [here](https://drive.google.com/drive/folders/1SMQyzJvc6DwJNuhQ_WI8tlCFL5HG2vk6?usp=sharing), where `HTSAT-fullset-imagenet-map=0.467.ckpt` is the checkpoint used to initalize our HTSAT audio encoder. You should get similar result by loading from the audio encoder checkpoint and training on same dataset.
The script to train the model on Clotho dataset is included [here](experiment_scripts/train-only-clotho.sh). You need to replace the `datasetpath` and `pretrained-audio` to pointing to your own directory. You could check the [report](https://stability.wandb.io/clap/clap/reports/CLAP-trained-on-Clotho-dataset--VmlldzoyNzY?accessToken=c0erq9hhp7h880jclihd9j9if679s6bylwto33vo14yo5jg40ppe38qeoafoonpz) of the training script on a single A100 GPU for reference.
Because most of the dataset has copyright restriction, unfortunatly we cannot directly share other preprocessed datasets. The caption generated by keyword-to-caption model for Audioset can be found [here](https://github.com/LAION-AI/audio-dataset/tree/main/laion-audio-630k#keyword-to-caption-augmentation)
## Zeroshot Classification with ESC50 official split
Here is an example code to run the zeroshot classification on **first** ESC50 official split with the pip API:
```python
import laion_clap
import glob
import json
import torch
import numpy as np
device = torch.device('cuda:0')
# download https://drive.google.com/drive/folders/1scyH43eQAcrBz-5fAw44C6RNBhC3ejvX?usp=sharing and extract ./ESC50_1/test/0.tar to ./ESC50_1/test/
esc50_test_dir = './ESC50_1/test/*/'
class_index_dict_path = './class_labels/ESC50_class_labels_indices_space.json'
# Load the model
model = laion_clap.CLAP_Module(enable_fusion=False, device=device)
model.load_ckpt()
# Get the class index dict
class_index_dict = {v: k for v, k in json.load(open(class_index_dict_path)).items()}
# Get all the data
audio_files = sorted(glob.glob(esc50_test_dir + '**/*.flac', recursive=True))
json_files = sorted(glob.glob(esc50_test_dir + '**/*.json', recursive=True))
ground_truth_idx = [class_index_dict[json.load(open(jf))['tag'][0]] for jf in json_files]
with torch.no_grad():
ground_truth = torch.tensor(ground_truth_idx).view(-1, 1)
# Get text features
all_texts = ["This is a sound of " + t for t in class_index_dict.keys()]
text_embed = model.get_text_embedding(all_texts)
audio_embed = model.get_audio_embedding_from_filelist(x=audio_files)
ranking = torch.argsort(torch.tensor(audio_embed) @ torch.tensor(text_embed).t(), descending=True)
preds = torch.where(ranking == ground_truth)[1]
preds = preds.cpu().numpy()
metrics = {}
metrics[f"mean_rank"] = preds.mean() + 1
metrics[f"median_rank"] = np.floor(np.median(preds)) + 1
for k in [1, 5, 10]:
metrics[f"R@{k}"] = np.mean(preds < k)
# map@10
metrics[f"mAP@10"] = np.mean(np.where(preds < 10, 1 / (preds + 1), 0.0))
print(
f"Zeroshot Classification Results: "
+ "\t".join([f"{k}: {round(v, 4):.4f}" for k, v in metrics.items()])
)
```
For ESC50 dataset, you could either download our processed ESC50 in webdataset format
from [here](https://drive.google.com/drive/folders/1scyH43eQAcrBz-5fAw44C6RNBhC3ejvX?usp=sharing), and extract the
`./test/0.tar` to `./test/`. Or you could download the original ESC50 dataset and
preprocess the label to the format of `class_labels/ESC50_class_labels_indices_space.json` by yourself (replace `_` with space).
The result should be the same as the following:
For `model = laion_clap.CLAP_Module(enable_fusion=True, device=device)`: `mean_rank: 1.2425 median_rank: 1.0000 R@1: 0.9050 R@5: 0.9900 R@10: 0.9925 mAP@10: 0.9407`
For `model = laion_clap.CLAP_Module(enable_fusion=False, device=device)`: `mean_rank: 1.1450 median_rank: 1.0000 R@1: 0.9275 R@5: 0.9975 R@10: 1.0000 mAP@10: 0.9556`
Note that the results is slightly higher than the reported results in the paper, because we use the train + test data of ESC50 and removing the data overlap in other training datasets (mainly freesound).
## Citation
If you find this project and the LAION-Audio-630K dataset useful, please cite our paper:
```
@inproceedings{laionclap2023,
title = {Large-scale Contrastive Language-Audio Pretraining with Feature Fusion and Keyword-to-Caption Augmentation},
author = {Wu*, Yusong and Chen*, Ke and Zhang*, Tianyu and Hui*, Yuchen and Berg-Kirkpatrick, Taylor and Dubnov, Shlomo},
booktitle={IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP},
year = {2023}
}
@inproceedings{htsatke2022,
author = {Ke Chen and Xingjian Du and Bilei Zhu and Zejun Ma and Taylor Berg-Kirkpatrick and Shlomo Dubnov},
title = {HTS-AT: A Hierarchical Token-Semantic Audio Transformer for Sound Classification and Detection},
booktitle={IEEE International Conference on Acoustics, Speech and Signal Processing, ICASSP},
year = {2022}
}
```
## Acknowledgements
This project is working in progress, thus the codebase and model might not be perfect or bug-free.
We will very much appreciate any kind of contribution or and issue raised.
If you find a bug or have any suggestion, please feel free to open an issue or contact us.
If you would actively contribute to this project, please join the discord of LAION.
| Contrastive Language-Audio Pretraining | null | 0 | 21 | 73 | 862 | 45 | 5 | 0 |
kimono-koans/httm | [![asciicast](https://asciinema.org/a/637475.svg)](https://asciinema.org/a/637475)
# `httm`
*The dream of a CLI Time Machine is still alive with `httm`.*
`httm` prints the size, date and corresponding locations of available unique versions (deduplicated by modify time and size) of files residing on snapshots, but can also be used *interactively* to select and restore files, even snapshot mounts by file! `httm` might change the way you use snapshots (because ZFS/BTRFS/NILFS2 aren't designed to find unique file versions) or the Time Machine concept (because `httm` is very fast!).
`httm` boasts an array of seductive features, like:
* Search for versions of multiple files on distinct datasets simultaneously
* Search for and recursively list deleted files. *Even browse files hidden behind deleted directories*.
* List file snapshots from *all* local pools (detect local snapshot versions *as well as* locally replicated snapshot versions)!
* List file snapshots from remote backup pools (even overlay replicated remote snapshot directories over live directories).
* For use with `rsync`-ed non-ZFS/BTRFS/NILFS2/APFS local datasets (like ext4, XFS, or NTFS), not just ZFS/BTRFS/NILFS2 snapshots and TM backups.
* Optionally preview snapshot file versions with a custom command (default is a `diff` compare to the live version)
* List or even snapshot the mounts for a file directly
* Roll *forward* to a previous snapshots, instead of rolling back (avoids destroying interstitial snapshots)
* Guard any restore actions with precautionary snapshots
* List snapshot names, even prune snapshots, which include a file name
* Shortcut features: only display last snapshot, omit duplicates of the live file, etc.
* Uniqueness level: Like `rsync`, `httm` can determine whether file is unique based solely on metadata, or use checksums
* 4 native interactive modes: browse, select, prune and restore
* ANSI `ls` colors from your environment
* Detect and display categories of unique file versions available (`multiple`, `single`, `single-with-snap`,..., etc.)
* Select from several formatting styles (newline, null, tab delimited, JSON, etc.). Parseable ... or not ... oh my!
* Packaged scripts which help you, and show you how to, use `httm`: [ounce](https://github.com/kimono-koans/httm/blob/master/scripts/ounce.bash), [bowie](https://github.com/kimono-koans/httm/blob/master/scripts/bowie.bash), [equine](https://github.com/kimono-koans/httm/blob/master/scripts/equine.bash), and [nicotine](https://github.com/kimono-koans/httm/blob/master/scripts/nicotine.bash)
* Supports ZFS/BTRFS/NILFS2 snapshots and Time Machine backups!
Use in combination with you favorite shell's hot keys for even more fun.
Inspired by the [findoid](https://github.com/jimsalterjrs/sanoid) script, [fzf](https://github.com/junegunn/fzf), [skim]() and many [zsh](https://www.zsh.org) key bindings.
## Install via Native Packages
For Debian-based distributions (like Ubuntu), I maintain an (unsupported) personal package archive, or PPA. See the [linked repository](https://github.com/kimono-koans/ppa).
For Debian-based and Redhat-based Linux distributions (like Ubuntu or Fedora, etc.), also check the [tagged releases](https://github.com/kimono-koans/httm/tags) for native packages for your distribution. For Redhat-based Linux distributions, you may need to use the `--replacefiles` option when installing via `rpm -i`, see the linked [issue](https://github.com/kimono-koans/httm/issues/51).
You may also create and install your own native package from the latest sources, for Debian-based and Redhat-based Linux distributions, like so:
```bash
#!/bin/bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install cargo-deb
git clone https://github.com/kimono-koans/httm.git
cd ./httm/; cargo deb
# to install on a Debian/Ubuntu-based system
dpkg -i ./target/debian/httm_*.deb
# or convert to RPM
alien -r ./target/debian/httm_*.deb
# and install on a Redhat-based system
rpm -i --replacefiles ./httm_*.rpm
```
For Arch-based Linux distributions, you can create and install your own native package from the latest sources, like so:
```bash
#!/bin/bash
# warning: this is only an example PKGBUILD
# you may need to edit the example, as needed, to conform to the latest release
wget https://raw.githubusercontent.com/kimono-koans/httm/master/packaging/arch/example/PKGBUILD
makepkg -si
```
For MacOS users, a user from the community (very exciting) has posted a [formulae](https://formulae.brew.sh/formula/httm) for [Homebrew](https://brew.sh).
## Install via Source
Installation via a package is suggested for support purposes, but, those *wild childs*, who perhaps can't stop (or won't stop), they can install by piping a script to `bash`:
```bash
bash -c "$(curl -fsSL https://raw.githubusercontent.com/kimono-koans/httm/master/packaging/install-from-source.bash)"
```
For those who simply wish to build `httm` incrementally themselves, the project contains only a few components:
1. The `httm` executable. To build and install:
```bash
#!/bin/bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
latest="(wget -nv -O - "https://api.github.com/repos/kimono-koans/httm/releases/latest" 2>/dev/null | grep tag_name | cut -d: -f2 | cut -d'"' -f2)"
# cargo-install places a release binary in your $HOME/.cargo/bin, however,
# you may wish to: cp $HOME/.cargo/bin/httm /usr/local/bin/httm; cargo uninstall httm
cargo install --locked --git https://github.com/kimono-koans/httm.git --tag "$latest"
```
2. The optional `zsh` hot-key bindings: Use `ESC+s` to select snapshots filenames to be dropped to your command line (for instance after the `cat` command), or use `ESC+m` to browse for all of a file's snapshots. After you install the `httm` binary, to copy the hot key script to your home directory, and source that script within your `.zshrc`:
```bash
➜ httm --install-zsh-hot-keys
```
3. The optional `man` page: `cargo` has no native facilities for man page installation (though it may in the future!). You can use `manpath` to see the various directories your system uses and decide which directory works best for you. To install, just copy it to a directory in your `man` path, like so:
```bash
➜ cp ./httm/httm.1 /usr/local/share/man/man1/
```
4. The optional scripts. See script usage below, in the Example Usage section, or follow the links ([ounce](https://github.com/kimono-koans/httm/blob/master/scripts/ounce.bash), [bowie](https://github.com/kimono-koans/httm/blob/master/scripts/bowie.bash), [equine](https://github.com/kimono-koans/httm/blob/master/scripts/equine.bash), and [nicotine](https://github.com/kimono-koans/httm/blob/master/scripts/nicotine.bash)), for more information. To install, just copy it to a directory in your path, like so:
```bash
#!/bin/bash
cp ./httm/scripts/ounce.bash /usr/local/bin/ounce
# bowie is "required" for the default/best "--preview" behavior
cp ./httm/scripts/bowie.bash /usr/local/bin/bowie
# equine is "required" for Time Machine support on MacOS
cp ./httm/scripts/equine.bash /usr/local/bin/equine
cp ./httm/scripts/nicotine.bash /usr/local/bin/nicotine
chmod +x /usr/local/bin/bowie /usr/local/bin/ounce /usr/local/bin/equine /usr/local/bin/nicotine
```
### Caveats
Right now, you will probably need to use a Unix-ish-y Rust-supported platform to build and install (that is: only Linux, FreeBSD, and MacOS are *known* to work). Note, your platform *does not* need to support ZFS/BTRFS/NILFS2 snapshots or TM backups to use `httm`. And there is no fundamental reason a non-interactive Windows version of `httm` could not be built, as it once did build, but Windows platform support is not a priority for me right now. Contributions from users are, of course, very welcome.
On FreeBSD, after a fresh minimal install, the interactive modes may not render properly, see the linked [issue](https://github.com/kimono-koans/httm/issues/20) for the fix.
On some Linux distributions, which include old versions of `libc`, `cargo` may require building with `musl` instead, see the linked [issue](https://github.com/kimono-koans/httm/issues/17).
## Example Usage
Note: Users may need to use `sudo` (or equivalent) to view versions on BTRFS or NILFS2 datasets, as BTRFS or NILFS2 snapshots may require root permissions in order to be visible.
Like other UNIX utilities (such as `cat`, `uniq`, `sort`), if you include no path/s as arguments, then `httm` will pause waiting for input on stdin:
```bash
# Press CTRL+C to send a SIGINT and quit the program
➜ httm
# Pipe output of find command to httm
➜ find . -maxdepth 1 | httm
```
Print all unique versions of your history file:
```bash
➜ httm ~/.histfile
```
Print all unique versions of your history file, as formatted JSON:
```bash
➜ httm --json ~/.histfile
```
Print all files on snapshots deleted from your home directory, recursive:
```bash
➜ httm -d -R ~
```
Print all files on snapshots deleted from your home directory, recursive, newline delimited, piped to a text file:
```bash
# pseudo live file versions
➜ httm -d -n -R --no-snap ~ > pseudo-live-versions.txt
# unique snapshot versions
➜ httm -d -n -R --no-live ~ > deleted-unique-versions.txt
```
Browse all files in your home directory, recursively, and view unique versions on local snapshots:
```bash
➜ httm -b -R ~
```
Browse all files deleted from your home directory, recursively, and view unique versions on all local and alternative replicated dataset snapshots:
```bash
➜ httm -d=only -b -a -R ~
```
Browse all files in your home directory, recursively, and view unique versions on local snapshots, to select and ultimately restore to its original location, in overwrite mode:
```bash
➜ httm -r=overwrite -R ~
```
Browse all files in your home directory, recursively, and view unique versions on local snapshots, to select and ultimately restore to your working directory, in "guard" mode, which overwrites and guards any restore action with a pre-recovery ZFS snapshot:
```bash
➜ printf "
# export a default httm restore mode
export HTTM_RESTORE_MODE=\"guard\"" >> ~/.zshenv
➜ httm -r -R ~
```
View unique versions of a file for recovery (shortcut, no need to browse a directory):
```bash
➜ httm -r /var/log/samba/log.smbd
```
`httm` is also a good Unix citizen, which means -- you *should* use the other Unix utilities to organize your queries how you like them. `find` and `awk` are especially useful here:
```bash
# search for the text "pattern" among snapshots of httm manpage
➜ httm -n --omit-ditto /usr/share/man/man1/httm.1.gz | xargs rg "pattern" -z
# print all unique versions of your `/var/log/syslog` file,
# newline delimited piped to `find` to print only versions
# with modify times of less than 1 day from right now.
➜ httm -n --omit-ditto /var/log/syslog | xargs -I{} find '{}' -mtime -1
# httm usually sorts snapshot versions in chronological order,
# oldest to newest, but since these are just paths/strings
# you may choose to sort them differently.
#
# here, print all unique versions of your `/var/log/syslog` file,
# then print each snapshot version's size in bytes first,
# then reverse sort by its size, then remove the number of bytes,
# leaving only the paths in their new sorted order
➜ httm -n --omit-ditto /var/log/syslog | xargs -I{} find '{}' -printf '%s\t%p\n' | \
sort -rn | awk 'BEGIN {FS="\t"}; {print $2}'
```
View [bowie](https://github.com/kimono-koans/httm/blob/master/scripts/bowie.bash)-formatted `diff` of each unique snapshot of `~/.zshrc` against the live file version (requires the `bowie` script be installed):
```bash
➜ httm --preview -s ~/.zshrc
```
View `cat` output of each unique snapshot of `~/.zshrc`:
```bash
➜ httm --preview="cat {snap_file}" -s ~/.zshrc
```
Recover the last-in-time unique file version (shortcut, no need to browse a directory or select from among other unique versions):
```bash
➜ httm -l -r /var/log/samba/log.smbd
```
Snapshot the dataset upon which `/etc/samba/smb.conf` is located:
```bash
➜ sudo httm -S /etc/samba/smb.conf
```
Browse all files, recursively, in a folder backed up via `rsync` to a remote share, and view unique versions on remote snapshots directly (only available for BTRFS Snapper and ZFS datasets).
```bash
# mount the share
➜ open smb://<your name>@<your remote share>.local/Home
# execute httm
➜ httm -b -R /Volumes/Home
```
Browse all files, recursively, in your MacOS home directory backed up via `rsync` to a ZFS or BTRFS Snapper remote share, shared via `smbd`, and view unique versions on remote snapshots. Note: The difference from above is, here, you're browsing files from a "live" directory:
```bash
# mount the share
➜ open smb://<your name>@<your remote share>.local/Home
# execute httm
➜ httm -b -R --map-aliases /Users/<your name>:/Volumes/Home ~
```
Print all unique versions of your `.zshrc` file. Note: The difference from above is, `httm`, now, even supports your Time Machine backups directly. After using [equine](https://github.com/kimono-koans/httm/blob/master/scripts/equine.bash) to mount my personal Time Machine ZFS network share:
```
➜ sudo equine --mount-local
Discovering backup locations (this can take a few seconds)...
Mounting snapshots...
...
➜ sudo equine --mount-remote
Connecting to remote Time Machine: smb://timemachine@montrose._smb._tcp.local./TM%20Volume ...
Mounting sparse bundle (this may include an fsck): Backups of kiev ...
/dev/disk4
/dev/disk5 EF57347C-0000-11AA-AA11-0030654
/dev/disk5s1 41504653-0000-11AA-AA11-0030654 /Volumes/Backups of kiev
Discovering backup locations (this can take a few seconds)...
Mounting snapshots...
...
➜ httm .zshrc
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Tue May 09 22:57:09 2023 6.7 KiB "/Volumes/.timemachine/842A693F-CB54-4C5A-9AB1-C73681D4DFCD/2023-11-08-212757.backup/2023-11-08-212757.backup/Data/Users/kimono/.zshrc"
Sun Nov 12 20:29:57 2023 6.7 KiB "/Volumes/.timemachine/842A693F-CB54-4C5A-9AB1-C73681D4DFCD/2023-11-18-011056.backup/2023-11-18-011056.backup/Data/Users/kimono/.zshrc"
Sun Nov 26 02:14:56 2023 6.7 KiB "/Volumes/.timemachine/842A693F-CB54-4C5A-9AB1-C73681D4DFCD/2023-12-13-054342.backup/2023-12-13-054342.backup/Data/Users/kimono/.zshrc"
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Sun Nov 26 02:14:56 2023 6.7 KiB "/Users/kimono/.zshrc"
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
```
View the differences between each unique snapshot version of the `httm` `man` page and each previous version (this simple script is the basis for [bowie](https://github.com/kimono-koans/httm/blob/master/scripts/bowie.bash)):
```bash
#!/bin/bash
filename="./httm/httm.1"
# previous version is unset
previous_version=""
for current_version in $(httm -n --omit-ditto $filename); do
# check if initial "previous_version" needs to be set
if [[ -z "$previous_version" ]]; then
previous_version="$current_version"
continue
fi
# print that current version and previous version differ
diff -q "$previous_version" "$current_version"
# print the difference between that current version and previous_version
diff "$previous_version" "$current_version"
# set current_version to previous_version
previous_version="$current_version"
done
```
Create a simple `tar` archive of all unique versions of your `/var/log/syslog`:
```bash
➜ httm -n --omit-ditto /var/log/syslog | tar -zcvf all-versions-syslog.tar.gz -T -
```
Create a *kinda fancy* `tar` archive of all unique versions of your `/var/log/syslog`:
```bash
#!/bin/bash
file="/var/log/syslog"
dir_name="${$(dirname $file)/\//}"
base_dir="$(basename $file)_all_versions"
# squash extra directories by "transforming" them to simply snapshot names
httm -n --omit-ditto "$file" | \
tar \
--transform="flags=r;s|$dir_name|$base_dir|" \
--transform="flags=r;s|.zfs/snapshot/||" \
--show-transformed-names \
-zcvf "all-versions-$(basename $file).tar.gz" -T -
```
Create a *super fancy* `git` archive of all unique versions of `/var/log/syslog` (this simple script is the basis for [nicotine](https://github.com/kimono-koans/httm/blob/master/scripts/nicotine.bash)):
```bash
#!/bin/bash
# create variable for file name
file="/var/log/syslog"
# create git repo
mkdir ./archive-git; cd ./archive-git; git init
# copy each version to repo and commit after each copy
for version in $(httm -n --omit-ditto $file); do
cp "$version" ./
git add "./$(basename $version)"
# modify commit date to match snapshot modify date-time
git commit -m "httm commit from ZFS snapshot" \
--date "$(date -d "$(stat -c %y $version)")"
done
# create git tar.gz archive
tar -zcvf "../all-versions-$(basename $file).tar.gz" "./"
# and to view
git log --stat
```
Use [ounce](https://github.com/kimono-koans/httm/blob/master/scripts/ounce.bash) (codename: "dimebag"), a wrapper script for `httm`, for no mental overhead, non-periodic dynamic snapshots:
```bash
# request ZFS snapshot privileges
➜ ounce --give-priv
# here you create a "dummyfile", ounce will add a snapshot of "dummyfile"
# before you remove it, and httm will allow you to view the snapshot created
➜ touch ~/dummyfile; ounce rm ~/dummyfile; httm ~/dummyfile
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Wed Feb 15 12:59:42 2023 0 bytes "/home/kimono/.zfs/snapshot/snap_2023-02-15-12:59:42_ounceSnapFileMount/dummyfile"
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
"/home/kimono/dummyfile"
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
# use as an alias around programs which modify files/dirs
➜ printf "
# ounce aliases
alias vim=\"ounce --trace vim\"
alias emacs=\"ounce --trace emacs\"
alias nano=\"ounce --trace nano\"
alias rm=\"ounce rm\"" >> ~/.zsh_aliases
```
Use [bowie](https://github.com/kimono-koans/httm/blob/master/scripts/bowie.bash), a wrapper script for `httm`, to display the difference between unique snapshot versions and the live file:
```bash
➜ bowie ~/.zshrc
/home/kimono/.zshrc
__
Files /home/kimono/.zfs/snapshot/snap_2023-02-14-13:42:11_ounceSnapFileMount/.zshrc and /home/kimono/.zshrc differ
1c1
< ### If you come from bash you might have to change your $PATH.
---
> # If you come from bash you might have to change your $PATH.
```
Use [nicotine](https://github.com/kimono-koans/httm/blob/master/scripts/nicotine.bash), a wrapper script for `httm`, to convert unique snapshot file versions to `git` archives:
```bash
➜ nicotine .zshrc
nicotine git archive created successfully: /home/kimono/zshrc-git.tar.gz
```
Roll *forward* to a previous ZFS snapshot, instead of rolling back (this avoids destroying interstitial snapshots):
```bash
➜ sudo httm --roll-forward=rpool/scratch@snap_2023-04-01-15:26:06_httmSnapFileMount
[sudo] password for kimono:
httm took a pre-execution snapshot named: rpool/scratch@snap_pre_2023-04-01-15:27:38_httmSnapRollForward
...
httm roll forward completed successfully.
httm took a post-execution snapshot named: rpool/scratch@snap_post_2023-04-01-15:28:40_:snap_2023-04-01-15:26:06_httmSnapFileMount:_httmSnapRollForward
```
## Yo, @kimono-koans, where do your snapshots come from?
If you'd like to read more about how someone else/I personally create snapshots, you might try my [A Somewhat Opinionated Guide to Effective ZFS Snapshots](https://kimono-koans.github.io/opinionated-guide/).
## I know what you're thinking, but slow your roll
![To be clear, httm is *not*...](https://i.pinimg.com/originals/23/7f/2a/237f2ab8765663c721325366406197b7.gif)
## License
httm is licensed under the MPL 2.0 License - see the LICENSE file for more details.
| Interactive, file-level Time Machine-like tool for ZFS/btrfs/nilfs2 (and even actual Time Machine backups!) | zfs,rust,unix-shell,unix,unix-command,zsh,zfs-snapshots,zfsonlinux,zfsonroot,command-line-tool | 103 | 3 | 76 | 3,687 | 4 | 1 | 1 |
wimpysworld/deb-get | <h1 align="center">
<img src=".github/deb-get-logo.png" alt="deb-get">
<br />
<tt>deb-get</tt>
</h1>
<p align="center">
<b>
<tt>apt-get</tt> functionality for .debs published in 3rd party repositories or via direct download. It works on Debian, Ubuntu and their derivative distributions.
<br />
Made with 💝 for <img src=".github/ubuntu.png" align="top" width="20" /> & <img src=".github/debian.png" align="top" width="20" />
</b>
</p>
## Introduction
`deb-get` makes it easy to install and update `.debs` published in 3rd party
apt repositories or made available via direct download on websites or GitHub
release pages.
## Install
Use `deb-get` to install `deb-get`.
```bash
sudo apt install curl lsb-release wget
curl -sL https://raw.githubusercontent.com/wimpysworld/deb-get/main/deb-get | sudo -E bash -s install deb-get
```
Alternatively, you can [download the `.deb` of `deb-get` from the releases page](../../releases/latest)
and install it manually with
``` bash
sudo apt-get install ./path/to/deb-get_<version>.deb
```
### GitHub Personal Access Token (PAT)
You must provide `deb-get` with a GitHub [Personal Access Token (PAT)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). Once created, insert it into the `DEBGET_TOKEN` environment variable for `deb-get` to use for authorization with the GitHub API.
For example:
```shell
export DEBGET_TOKEN=github-personal-access-token
deb-get update
deb-get upgrade
```
Skipping this step will lead to failures during the `update`, `upgrade`, and `install` commands.
For more information, see the [API rate limit section below](#github-api-rate-limits).
## Usage
Here's an example of how to install Google Chrome.
```bash
deb-get install google-chrome-stable
```
You can see what applications are supported by using `deb-get list` or you
can search the available applications with `deb-get search <app>`.
You can upgrade packages installed using `deb-get` by running
`deb-get upgrade`.
<!-- [[[cog
import subprocess
import cog
result = subprocess.check_output(["./deb-get", "help"], encoding="utf-8")
# strip the "Usage" header
help = result.replace("Usage\n\n", "").rstrip()
cog.out(f"```\n{help}\n```")
]]] -->
```
deb-get {update [--repos-only] [--quiet] | upgrade | show <pkg list> | install <pkg list>
| reinstall <pkg list> | remove [--remove-repo] <pkg list>
| purge [--remove-repo] <pkg list>
| search [--include-unsupported] <regex> | cache | clean
| list [--include-unsupported] [--raw|--installed|--not-installed]
| prettylist [<repo>] | csvlist [<repo>] | fix-installed [--old-apps]
| help | version}
deb-get provides a high-level commandline interface for the package management
system to easily install and update packages published in 3rd party apt
repositories or via direct download.
update
update is used to resynchronize the package index files from their sources.
When --repos-only is provided, only initialize and update deb-get's
external repositories, without updating apt or looking for updates of
installed packages.
When --quiet is provided the fetching of deb-get repository updates is done without progress feedback.
upgrade
upgrade is used to install the newest versions of all packages currently
installed on the system.
install
install is followed by one package (or a space-separated list of packages)
desired for installation or upgrading.
reinstall
reinstall is followed by one package (or a space-separated list of
packages) desired for reinstallation.
remove
remove is identical to install except that packages are removed instead of
installed. When --remove-repo is provided, also remove the apt repository
of apt/ppa packages.
purge
purge is identical to remove except that packages are removed and purged
(any configuration files are deleted too). When --remove-repo is provided,
also remove the apt repository of apt/ppa packages.
clean
clean clears out the local repository (/var/cache/deb-get) of retrieved
package files.
search
search for the given regex(7) term(s) from the list of available packages
supported by deb-get and display matches. When --include-unsupported is
provided, include packages with unsupported architecture or upstream
codename and include PPAs for Debian-derived distributions.
show
show information about the given package (or a space-separated list of
packages) including their install source and update mechanism.
list
list the packages available via deb-get. When no option is provided, list
all supported packages and tell which ones are installed (slower). When
--include-unsupported is provided, include packages with unsupported
architecture or upstream codename and include PPAs for Debian-derived
distributions (faster). When --raw is provided, list all packages and do
not tell which ones are installed (faster). When --installed is provided,
only list the packages installed (faster). When --not-installed is provided,
only list the packages not installed (faster).
prettylist
markdown formatted list the packages available in repo. repo defaults to
01-main. If repo is 00-builtin or 01-main the packages from 00-builtin are
included. Use this to update README.md.
csvlist
csv formatted list the packages available in repo. repo defaults to
01-main. If repo is 00-builtin or 01-main the packages from 00-builtin are
included. Use this with 3rd party wrappers.
cache
list the contents of the deb-get cache (/var/cache/deb-get).
fix-installed
fix installed packages whose definitions were changed. When --old-apps is
provided, transition packages to new format. This command is only intended
for internal use.
help
show this help.
version
show deb-get version.
```
<!-- [[[end]]] -->
### Why?
3rd party apt repositories exist. They are not going away.
Some application vendors and projects express their support for Debian/Ubuntu
by publishing `.debs` of their software as direct downloads or via
their own apt repositories. `deb-get` makes it easy to find, install and update
`.debs` published in this way.
- Perhaps you want to use software that is not (yet) officially packaged for Debian/Ubuntu.
- Perhaps you want to use software that is fast moving and newer versions are available from the vendor/project.
- Perhaps you want to use some non-free software that Debian/Ubuntu cannot distribute due to licensing restrictions.
`deb-get` tries to remedy this by providing a curated index of software
available for Ubuntu that is published by the project or vendor. `deb-get` is
inspired by Software Boutique, a graphical application I co-authored that does
much the same thing and has been included in [Ubuntu MATE](https://ubuntu-mate.org)
since 2015.
## Supported Software
The list of the software that can be installed, updated and removed using `deb-get`'s main repository is available at [01-main/README](01-main/README.md).
### How do package updates work?
#### 3rd party apt repositories and PPAs
If packages are available via a 3rd party `apt` repository
<img src=".github/debian.png" align="top" width="20" /> or a Launchpad PPA
<img src=".github/launchpad.png" align="top" width="20" />, then those packages
will be updated/upgraded when using `sudo apt-get update` and `sudo apt-get upgrade`.
#### GitHub Releases and direct downloads
For `.deb` packages that are only available via GitHub Releases
<img src=".github/github.png" align="top" width="20" /> or direct download
<img src=".github/direct.png" align="top" width="20" />, then those packages
can only be updated/upgraded by using `deb-get update` and `deb-get upgrade`.
#### GitHub API Rate Limits
`deb-get` uses the [GitHub REST API](https://docs.github.com/en/rest) when updating the package index files for GitHub Releases
<img src=".github/github.png" align="top" width="20" /> and for downloading the associated `.debs`. This API is [rate-limited](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting) to 60 calls per hour per source IP address. This limit is vital for keeping the API responsive and available to all GitHub users. However, a lot of GitHub releases are now handled by `deb-get` so you will experience temporary failure to perform the following functions.
* `update` the `deb-get` package index files
* `upgrade` currently installed packages via GitHub Releases <img src=".github/github.png" align="top" width="20" />
* `install` new applications via GitHub Releases <img src=".github/github.png" align="top" width="20" />
If you have a GitHub account you can provide an authorization token during your GitHub API usage to increase your rate limit to 5000 requests per hour per authenticated user. To do this you will need to use a [Personal Access Token (PAT)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) with GitHub. Once you have created a token within GitHub (or identified an appropriate existing token), insert it into the `DEBGET_TOKEN` environment variable for `deb-get` to use with the GitHub API.
You probably want to put this into your `.profile` so it is always available. Remember to never commit secrets in dotfiles to public git repositories!
```shell
# In .profile
export DEBGET_TOKEN=github-personal-access-token
```
## Adding Software
For information on what is acceptable as suggestion for new packages and instructions on how to open a PR to add a new package to the main repository, head to [01-main/CONTRIBUTING](01-main/CONTRIBUTING.md).
### Adding external repositories
It is possible to also add a `deb-get`-compatible external repository, and supplement the list of supported packages, typically because you need to:
1. Add something which does not meet any of the general guidelines of the main repository; or
2. Change the definition of a package from the main repository.
For information on how to create and maintain a `deb-get`-compatible external repository, head to [EXTREPO](EXTREPO.md).
How to use:
* Manually create the file `/etc/deb-get/<priority>-<repo>.repo`, containing in its first line the base URL of the repository.
* The `<priority>` value is a two-digit number between 00 and 99 that defines the order in which the repositories will be loaded (00 first, 99 last), so if any conflicting definitions are found, the one from the repository with the highest priority will be used (the builtin definitions from the `deb-get` script itself have priority 00, the main repository has priority 01 and the custom user includes have priority 99).
* The `<repo>` value can be anything, but it should preferably be unique and easy to remember.
* Run `deb-get update`, so the manifest file and the package definition files are downloaded.
### Custom User Includes
As a more advanced feature, it is possible to also add your own local customizations or overrides, and supplement the list of packages supported by the main repository. This feature is especially useful so that your local copy of the main repository can remain unmodified and always be kept fully up to date by moving your customizations out in a separate folder away from the main repository.
Typically because:
1. You are waiting on a pending request for a new software package, which has been submitted for consideration but has not been reviewed / accepted / merged / released yet; or
2. You need to add something which does not meet any of the general guidelines of the main repository, for whatever various reason(s).
How to use:
* Manually create the folder `/etc/deb-get/99-local.d/` if it does not exist already. By default, `deb-get` does not create this folder unless your specific distribution has packaged it that way.
* Any files directly within this folder will be bash sourced e.g. `. /etc/deb-get/99-local.d/appname1`.
* The name of the added file **must** match **exactly** the name of the package being defined.
* For information on how to create a package definition file, head to [EXTREPO](EXTREPO.md#the-package-definition-files).
* Your user custom package definition files are then loaded after the package definitions from any added repository.
* A recommendation message is printed for any new user added definitions, with a URL link to open a request.
* Warning messages are then also printed for any conflicts detected for overridden definitions (of same name), which then take priority over existing ones.
For the last situation, this is most often meant as a helpful reminder to remove your custom definition once it has been successfully merged upstream into the main repository, so after the main repository updates itself you are properly notified. It also avoids keeping lots of duplicate definitions around.
We really hope that you will enjoy the convenience and flexibility of the user overrides feature, so please consider in return to open new issues and pull requests, for any new package definitions you create, so that we can share those back with the wider community. Many thanks for your consideration!
## Related projects
* [App Outlet](https://appoutlet.github.io/): *A Universal linux app store*
* [bin-get](https://github.com/OhMyMndy/bin-get): *Script to easily and safely fetch binaries from GitHub Releases/tags*
* [makedeb](https://www.makedeb.org/): *A simplicity-focused packaging tool for Debian archives*
* [MakeResolveDeb](https://www.danieltufvesson.com/makeresolvedeb): *Install DaVinci Resolve or DaVinci Resolve Studio on Debian*
* [pacstall](https://pacstall.dev/): *The AUR alternative for Ubuntu*
* [Ubuntu Make](https://github.com/ubuntu/ubuntu-make): *Easy setup of common tools for developers on Ubuntu.*
* [unsnap](https://github.com/popey/unsnap): *Quickly migrate from using snap packages to flatpaks*
## In the media
* [The deb-get tool helps Ubuntu (and derivative distro) fans grab extra apps](https://www.gamingonlinux.com/2022/05/the-deb-get-tool-helps-ubuntu-and-derivative-distro-fans-grab-extra-apps/) - **GamingOnLinux**
* [Deb-Get is ‘Apt-Get’ for 3rd-Party Ubuntu Software](https://www.omgubuntu.co.uk/2022/05/use-deb-get-to-install-popular-linux-apps-on-ubuntu) - **omg! ubuntu!**
* [How To Install Third-Party Linux Applications with Deb-Get](https://www.tomshardware.com/uk/how-to/install-linux-apps-with-deb-get) - **toms HARDWARE**
* [How to use deb-get to install third-party software on Ubuntu](https://www.techrepublic.com/article/use-deb-get-install-third-party-software-ubuntu/) - **TechRepublic**
* [Ubuntu MATE’s Lead Creates a Nifty Tool to Help Install 3rd Party Deb Packages](https://news.itsfoss.com/deb-get-ubuntu/) - **It's FOSS**
* [Easily Get 3rd-Party Software on Ubuntu With Deb-Get](https://fosspost.org/deb-get-install-3rd-party-software-ubuntu/) - **FOSS Post**
* [deb-get, an "apt-get" to install third-party software on Ubuntu](https://ubunlog.com/en/deb-get-un-apt-get-para-instalar-software-de-terceros-en-ubuntu/) - **ubunlog**
* [deb-get, a utility for installing third-party software](https://www.linuxadictos.com/en/deb-get-una-utilidad-para-instalar-software-de-terceros.html) - **Linux Addicted**
| apt-get for .debs published via GitHub or direct download 📦 | apt,apt-get,deb,install,linux,ubuntu,upgrade,debian,ppa,dpkg | 27 | 79 | 553 | 921 | 125 | 2 | 3 |
HighCapable/YukiHookAPI | # Yuki Hook API
[![GitHub license](https://img.shields.io/github/license/HighCapable/YukiHookAPI?color=blue)](https://github.com/HighCapable/YukiHookAPI/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/v/release/HighCapable/YukiHookAPI?display_name=release&logo=github&color=green)](https://github.com/HighCapable/YukiHookAPI/releases)
[![Telegram](https://img.shields.io/badge/discussion-Telegram-blue.svg?logo=telegram)](https://t.me/YukiHookAPI)
[![Telegram](https://img.shields.io/badge/discussion%20dev-Telegram-blue.svg?logo=telegram)](https://t.me/HighCapable_Dev)
[![QQ](https://img.shields.io/badge/discussion%20dev-QQ-blue.svg?logo=tencent-qq&logoColor=red)](https://qm.qq.com/cgi-bin/qm/qr?k=Pnsc5RY6N2mBKFjOLPiYldbAbprAU3V7&jump_from=webapi&authKey=X5EsOVzLXt1dRunge8ryTxDRrh9/IiW1Pua75eDLh9RE3KXE+bwXIYF5cWri/9lf)
<img src="img-src/icon.png" width = "100" height = "100" alt="LOGO"/>
⛱️ An efficient Hook API and Xposed Module solution built in Kotlin.
English | [简体中文](README-zh-CN.md)
| <img src="https://github.com/HighCapable/.github/blob/main/img-src/logo.jpg?raw=true" width = "30" height = "30" alt="LOGO"/> | [HighCapable](https://github.com/HighCapable) |
|-------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------|
This project belongs to the above-mentioned organization, **click the link above to follow this organization** and discover more good projects.
## What's this
This is an efficient Hook API rebuilt based on the Xposed API using Kotlin,
and creates rich function extensions for the development of Xposed Modules.
The name is taken from ["ももくり" heroine Yuki Kurihara](https://www.bilibili.com/bangumi/play/ss5016).
Formerly the Innocent Xposed API used in [Development Learning Project](https://github.com/fankes/TMore), now renamed and open sourced.
## Get Started
[Click here](https://highcapable.github.io/YukiHookAPI/en/) go to the documentation page for more detailed tutorials and content.
For supportive related information, you can check it directly [click here](https://highcapable.github.io/YukiHookAPI/en/guide/supportive).
## Cooperations
The following are projects that have collaborated and are using `YukiHookAPI`.
| Repository | Developer |
|---------------------------------------------------------------------------------|-------------------------------------------------|
| [TSBattery](https://github.com/fankes/TSBattery) | [fankesyooni](https://github.com/fankes) |
| [MIUI 原生通知图标](https://github.com/fankes/MIUINativeNotifyIcon) | [fankesyooni](https://github.com/fankes) |
| [ColorOS 通知图标增强](https://github.com/fankes/ColorOSNotifyIcon) | [fankesyooni](https://github.com/fankes) |
| [自由屏幕旋转](https://github.com/Xposed-Modules-Repo/com.fankes.forcerotate) | [fankesyooni](https://github.com/fankes) |
| [拒绝强制亮度](https://github.com/Xposed-Modules-Repo/com.fankes.refusebrightness) | [fankesyooni](https://github.com/fankes) |
| [AppErrorsTracking](https://github.com/KitsunePie/AppErrorsTracking) | [fankesyooni](https://github.com/fankes) |
| [Enable WebView Debugging](https://github.com/WankkoRee/EnableWebViewDebugging) | [WankkoRee](https://github.com/WankkoRee) |
| [Fuck MIUI Gesture](https://github.com/HCGStudio/FuckMIUIGesture) | [mahoshojoHCG](https://github.com/mahoshojoHCG) |
| [MIUI遮罩进化](https://github.com/GSWXXN/RestoreSplashScreen) | [GSWXXN](https://github.com/GSWXXN) |
| [Color OS Installer Plus](https://github.com/NextAlone/ColorOSInstallerPlus) | [NextAlone](https://github.com/NextAlone) |
| [Auto NFC](https://github.com/GSWXXN/AutoNFC) | [GSWXXN](https://github.com/GSWXXN) |
| [不要竖屏](https://github.com/WankkoRee/Portrait2Landscape) | [WankkoRee](https://github.com/WankkoRee) |
| [QDReadHook](https://github.com/xihan123/QDReadHook) | [xihan123](https://github.com/xihan123) |
| [HXReadHook](https://github.com/xihan123/HXReadHook) | [xihan123](https://github.com/xihan123) |
| [WxRecordRead](https://github.com/pwh-pwh/wxrecordread) | [Coderpwh](https://github.com/pwh-pwh) |
| [FuckShake](https://github.com/pwh-pwh/fuck_shake) | [Coderpwh](https://github.com/pwh-pwh) |
| [MIUI更新进化](https://miup.utssg.xyz) | [ZQDesigned](https://github.com/ZQDesigned) |
| [MIUI录屏进化](https://www.coolapk.com/apk/UTSSG.ZQDesigned.miuirecordercracker) | [ZQDesigned](https://github.com/ZQDesigned) |
| [Fuck AD](https://github.com/hujiayucc/Fuck-AD) | [hujiayucc](https://github.com/hujiayucc) |
| [Zuiyou ADFree](https://github.com/kazutoiris/zuiyou-adfree) | [kazutoiris](https://github.com/kazutoiris) |
Are you also using `YukiHookAPI`? Come and **PR** to add your repository to the list above (private repositories do not need to indicate web
links).
## Promotion
<!--suppress HtmlDeprecatedAttribute -->
<div align="center">
<h2>Hey, please stay! 👋</h2>
<h3>Here are related projects such as Android development tools, UI design, Gradle plugins, Xposed Modules and practical software. </h3>
<h3>If the project below can help you, please give me a star! </h3>
<h3>All projects are free, open source, and follow the corresponding open source license agreement. </h3>
<h1><a href="https://github.com/fankes/fankes/blob/main/project-promote/README.md">→ To see more about my projects, please click here ←</a></h1>
</div>
## Star History
![Star History Chart](https://api.star-history.com/svg?repos=HighCapable/YukiHookAPI&type=Date)
## Third-Party Open Source Usage Statement
- [Kotlin Symbol Processing API](https://github.com/google/ksp)
- [FreeReflection](https://github.com/tiann/FreeReflection)
## License
- [Apache-2.0](https://www.apache.org/licenses/LICENSE-2.0)
```
Apache License Version 2.0
Copyright (C) 2019-2024 HighCapable
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```
Copyright © 2019-2024 HighCapable | ⛱️ An efficient Hook API and Xposed Module solution built in Kotlin. | android,hook-api,xposed,kotlin,kotlin-android,kotlin-library,library,xposedmodule,xposed-framework | 8 | 10 | 30 | 1,237 | 3 | 2 | 1 |
gtxaspec/wz_mini_hacks | # wz_mini_hacks
### Ingenic based T20/T31 based devices only!
Run whatever firmware you want on your camera and have root access to the device. Use CAUTION if you are unsure of what you are doing. Permanent damage is possible to your device. No support whatsoever is offered with this release.
**Do not contact any manufacturer for information or support, they will not be able to assist or advise you!**
## Important matters related to security
Using this project can potentially expose your device to the open internet depending on the configuration of your network. You alone are responsible for the configuration and security of your network, make sure you are aware of the risks involved before using.
## Features
* No hardware modifications needed to the device!
* Easy uninstall, just remove files from micro-sd card, or don't use a micro-sd card at all!
* Compatability is not guaranteed with really old firmware versions!
* Update to the latest stable or beta firmware, this mod should still work! (most features, see the wiki) [Firmware-Support](https://github.com/gtxaspec/wz_mini_hacks/wiki/Firmware-Support)
* Block remote or app initiated firmware updates
* DNS Spoofing or Telnet mod are *not* required prior to installation
* RTSP Streaming Support:
* go2rtc
* v4l2rtspserver (deprecated)
* RTMP Streaming - via go2rtc: Stream live video from the camera to your favorite service, youtube, twitch, or facebook live.
* Networking:
* Wireguard, IPv6, CIFS/Samba and iptables support enabled
* File server support to access SD card contents remotely
* Tether your camera directly to android phones using USB via RNDIS support
* USB gadget support, connect the camera directly to a supported router to get an internet connection, no USB Ethernet Adapter required, using USB CDC_NCM.
* Supports the following USB Ethernet adapters:
* ASIX AX88xxx Based USB 2.0 Ethernet Adapters
* ASIX AX88179/178A USB 3.0/2.0 to Gigabit Ethernet
* Realtek RTL8152 Based USB 2.0 Ethernet Adapters
* CDC-Ether Based Adapters
* USB Mass storage enabled, mount USB SSD/HDD/flash drives
* Play audio to the camera speaker from files or streaming audio!
* Webcam Mode - Use your camera as a spare UVC USB Web Camera on your PC, Mac, or AndroidTV!
* Custom boot script support included
## Why?
* Most things in life relate to cats somehow. I started this project to track the local feral cat population in my neighborhood using cameras.
## Prerequisites
* Person
* Cat ( for emotional support during setup )
* Computer
* 256MB or larger Micro-SD Card is required!
* Higher class Micro-SD cards will ensure better performance
## Setup / Configuration / Installation
#### Visit the [Installation & Setup](https://github.com/gtxaspec/wz_mini_hacks/wiki/Setup-&-Installation) section of the [Wiki](https://github.com/gtxaspec/wz_mini_hacks/wiki) for details!
## HELP! SOMETHING DOESN'T DOESN'T WORK
* If you need assistance, or have general questions, feel free to visit the [Discussions](https://github.com/gtxaspec/wz_mini_hacks/discussions) area! There are folks always willing to help out.
---
## Latest Updates
### * Visit the [Changelog](https://github.com/gtxaspec/wz_mini_hacks/wiki/Changelog) at the [Wiki](https://github.com/gtxaspec/wz_mini_hacks/wiki) for the latest update information!
## BYO
Build your own!!
[https://github.com/mnakada/atomcam_tools](https://github.com/mnakada/atomcam_tools) has a great repo with docker images which include kernel sources, config, and a whole bunch of other stuff. Check it out.
## WARNING
```
AS WITH ANY UNSUPPORTED SYSTEM MODIFICATIONS, USING THIS MAY LEAD TO A DEVICE BRICK
IF YOU DON'T KNOW WHAT YOU ARE DOING ( HAVEN'T BRICKED MY DEVICE YET! ) PLEASE
BE AWARE THAT NO ONE ON THE INTERNET IS RESPONSIBLE FOR ANY DAMAGE TO YOUR
UNIT. ANY PROBLEMS WILL BE CONSIDERED USER ERROR OR ACTS OF WHATEVER GOD YOU BELIEVE IN.
USE AT YOUR OWN RISK. NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED.
DO NOT USE THIS SOFTWARE IF YOU ARE NOT CONFIDENT IN RESTORING YOUR DEVICE FROM A FAILED STATE.
```
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
## Thank You
Inspired by HclX, bakueikozo, and mnakada!
Thank you to everyone who is passionate about Wyze products for making the devices popular, and thank you to Wyze for producing them. Sign up for CamPlus, show some love and support to the company.
Thank you AlexxIT for the amazing go2rtc project! [https://github.com/AlexxIT/go2rtc](https://github.com/AlexxIT/go2rtc)
Thanks for HclX for WyzeHacks! [https://github.com/HclX/WyzeHacks](https://github.com/HclX/WyzeHacks/)
Thank you mnakada for his atomcam_tools fork! [https://github.com/mnakada/atomcam_tools](https://github.com/mnakada/atomcam_tools)
Thank you bakueikozo for his atomcam_tools repo! [https://github.com/bakueikozo/atomcam_tools](https://github.com/bakueikozo/atomcam_tools)
Thank you to virmaior for the atomcam_tools tip!
| wz camera mods... make your camera better. | null | 0 | 19 | 73 | 588 | 81 | 4 | 0 |
primihub/primihub | <p align="center">
<img src="doc/header.jpeg" alt="Header">
<br>
<p align="center"><strong>由密码学专家团队打造的开源隐私计算平台</strong></p>
<p align="center">
<a href="https://github.com/primihub/primihub/releases"><img src="https://img.shields.io/github/v/release/primihub/primihub?style=flat-square" alt="GitHub Release"></a>
<a href="https://github.com/primihub/primihub/actions/workflows/main.yml"><img src="https://img.shields.io/github/actions/workflow/status/primihub/primihub/main.yml?logo=github&style=flat-square" alt="Build Status"></a>
<a href="https://hub.docker.com/r/primihub/primihub-node"><img src="https://img.shields.io/docker/pulls/primihub/primihub-node?style=flat-square" alt="Docker Pulls"></a>
</p>
<p align="center">
中文 | <a href='README_EN.md'>English</a>
</p>
</p>
隐私计算
-------
数据流动起来才可以创造更大的价值,随着数字经济持续高速增长,**数据的互联互通需求越来越旺盛**,大到政府机关的机密数据、公司核心商业数据、小到个人信息。近两年,我国也相继出台了 **《数据安全法》** 和 **《个人信息保护法》**。因此,**如何让数据安全地流通起来,是一个必须要解决的问题**。
隐私计算技术作为**连接数据流通和隐私保护法规的纽带**,实现了 **“数据可用不可见”**。即**在保护数据本身不对外泄露的前提下实现数据分析计算的技术集合**。隐私计算作为数据流通的**重要创新前沿技术**,已经广泛应用于金融、医疗、通信、政务等多个行业。
PrimiHub
-------
如果你对隐私计算感兴趣,想近距离体验下隐私计算的魅力,不妨试试 PrimiHub!一款**由密码学专家团队打造的开源隐私计算平台**,它安全可靠、开箱即用、自主研发、功能丰富。
特性
---
* **开源**:完全开源、免费
* **安装简单**:支持 Docker 一键部署
* **开箱即用**:拥有 [Web界面](https://github.com/primihub/primihub-platform)、[命令行](https://docs.primihub.com/docs/category/%E5%88%9B%E5%BB%BA%E4%BB%BB%E5%8A%A1) 和 [Python SDK](https://docs.primihub.com/docs/category/python-sdk-client) 多种使用方式
* **功能丰富**:支持隐匿查询、隐私求交、联合统计、数据资源管理等功能
* **灵活配置**:支持自定义扩展语法、语义、安全协议等
* **自主研发**:基于安全多方计算、联邦学习、同态加密、可信计算等隐私计算技术
快速开始
-------
推荐使用 Docker 部署 PrimiHub,开启你的隐私计算之旅。
```
# 第一步:下载
git clone https://github.com/primihub/primihub.git
# 第二步:启动容器
cd primihub && docker-compose up -d
# 第三步:进入容器
docker exec -it primihub-node0 bash
# 第四步:执行隐私求交计算
./primihub-cli --task_config_file="example/psi_ecdh_task_conf.json"
I20230616 13:40:10.683375 28 cli.cc:524] all node has finished
I20230616 13:40:10.683745 28 cli.cc:598] SubmitTask time cost(ms): 1419
# 查看结果
cat data/result/psi_result.csv
"intersection_row"
X3
...
```
<p align="center"><img src="doc/kt.gif" width=700 alt="PSI"></p>
<p align="center"><em>隐私求交例子 <a href="https://docs.primihub.com/docs/quick-start-platform/">在线尝试</a>・<a href="https://docs.primihub.com/docs/advance-usage/create-tasks/psi-task/">命令行</a></em></p>
除此之外,PrimiHub 还提供了多种适合**不同人群**的使用方式:
* [在线体验](https://docs.primihub.com/docs/quick-start-platform/)
* [Docker](https://docs.primihub.com/docs/advance-usage/start/quick-start)
* [可执行文件](https://docs.primihub.com/docs/advance-usage/start/start-nodes)
* [自行编译](https://docs.primihub.com/docs/advance-usage/start/build)
问题 / 帮助 / Bug
------------
如果您在使用过程中遇到任何问题,需要我们的帮助可以 [点击](https://github.com/primihub/primihub/issues/new/choose) 反馈问题。
欢迎添加我们的微信助手,加入「PrimiHub 开源社区」微信群。“零距离”接触**项目核心开发、密码学专家、隐私计算行业大咖**,获得更及时的回复和隐私计算的第一手资讯。
<p align="center">
<img src="doc/wechat.jpeg" alt="Header">
</p>
许可证
-----
此代码在 Apache 2.0 下发布,参见 [LICENSE](https://github.com/primihub/primihub/blob/develop/LICENSE) 文件。
| Privacy-Preserving Computing Platform 由密码学专家团队打造的开源隐私计算平台,支持多方安全计算、联邦学习、隐私求交、匿踪查询等。 | federated-learning,private-information-retrieval,private-set-intersection,pir,psi,hacktoberfest,mpc,fl,privacy-preserving,multi-party-computation | 21 | 31 | 708 | 1,654 | 0 | 8 | 4 |
lindylearn/unclutter | <img src="./docs/media/icon2.png" align="left" width="80" />
# Unclutter — Modern Reader Mode
Unclutter is a modern reader mode and article library for your browser.
[![Latest release](https://img.shields.io/github/v/release/lindylearn/unclutter?color=facc15)](https://github.com/lindylearn/unclutter/releases)
![GitHub commits](https://img.shields.io/github/commit-activity/w/lindylearn/unclutter?label=commits&color=facc15)
[![Chrome users](https://img.shields.io/chrome-web-store/users/ibckhpijbdmdobhhhodkceffdngnglpk?label=chrome%20installs&color=facc15)](https://chrome.google.com/webstore/detail/ibckhpijbdmdobhhhodkceffdngnglpk)
[![Firefox users](https://img.shields.io/amo/users/lindylearn?label=firefox%20installs&color=facc15)](https://addons.mozilla.org/en-GB/firefox/addon/lindylearn)
[![Chrome Ratings](https://img.shields.io/chrome-web-store/stars/ibckhpijbdmdobhhhodkceffdngnglpk?label=rating&color=facc15)](https://chrome.google.com/webstore/detail/ibckhpijbdmdobhhhodkceffdngnglpk)
<p align="center">
<img src="./docs/media/intro.png" width="100%" />
</p>
## Why does it exist?
There many other "reader modes", but they all extract article text and re-render it their own format. Unclutter "unclutters" the original web pages itself, leaving their [visual style](docs/comparison.md) and interactive elements intact.
Articles you read with Unclutter are automatically saved and can be easily added to your read-it-later queue.
Everything happens instantly in your browser.
<!-- <p align="center">
<img src="./docs/media/library.png" width="100%" />
</p> -->
Other features include:
- [Crowdsourced blocklists](https://github.com/lindylearn/unclutter/blob/main/docs/element-blocking.md) for annoyances on specific websites
- [Automatically activating](https://github.com/lindylearn/unclutter/blob/main/docs/article-detection.md) the reader mode
- [Showing page chapters](https://github.com/lindylearn/unclutter/blob/main/docs/outline.md) to navigate long articles
- [Integrated social comments](https://github.com/lindylearn/unclutter/blob/main/docs/social-highlights.md) from Hacker News and Hypothes.is
- [Easily saving highlights](https://github.com/lindylearn/unclutter/blob/main/docs/annotations.md) by simply selecting text
Try it out for yourself:
[<img src="./docs/media/install-chrome.png" height="50">](https://chrome.google.com/webstore/detail/ibckhpijbdmdobhhhodkceffdngnglpk)
[<img src="./docs/media/install-firefox.png" height="50">](https://addons.mozilla.org/en-GB/firefox/addon/lindylearn)
## Get involved
The mission of Unclutter is to improve reading on the web. You should decide what, when, and how to read.
**[Join our Discord server](https://unclutter.it/discord) to help out and follow the progress!**
Here's how you can contribute:
- [Report broken articles](https://github.com/lindylearn/unclutter/blob/main/docs/element-blocking.md) or submit element block selectors from within the extension.
- [Use the open roadmap](https://unclutter.canny.io/) to suggest new features or to vote on existing ideas.
- [Open GitHub issues](https://github.com/lindylearn/unclutter/issues) for bugs or any other issue.
- [Contribute code](https://github.com/lindylearn/unclutter/blob/main/DEVELOPMENT.md) to implement your favorite new feature.
<!-- [<img src="./docs/media/canny.png">](https://unclutter.canny.io/) -->
<!-- Also, please consider [supporting the project financially](https://opencollective.com/unclutter) if it is useful to you. All raised money will be split across all open-source contributors, administered by the Open Source Collective. This also unlocks additional features for your article library like AI categorization or a graph view of your captured information.
[![Contributors](https://opencollective.com/unclutter/tiers/sponsors.svg)](https://opencollective.com/unclutter) -->
## Documentation
See the [docs pages](https://github.com/lindylearn/unclutter/blob/main/docs), or the [technical README](DEVELOPMENT.md). Please open an issue for any question you have!
## Licence
This project uses [GNU AGPLv3](https://choosealicense.com/licenses/gpl-3.0/), which requires commercial projects that use it to be open-source as well.
Unclutter exists thanks to everyone who contributes ideas or code, reports bugs, or simply uses the extension. Thank you!
| A modern reader mode and article library for your browser. | browser-extension,reader-mode,chrome,firefox,css,javascript,readability | 13 | 4 | 952 | 3,067 | 567 | 1 | 0 |
youniaogu/MangaReader | null | 一个漫画 APP📱,基于 react-native 构建,兼容 Android、Ios 平台 | manga,manhuagui,android,ios,react-native,copymanga,dongmanzhijia,manhuadb,jmcomic,mangareader | 49 | 2 | 5 | 568 | 18 | 1 | 0 |
nicoburns/blessed-rs | # [Blessed.rs](https://blessed.rs)
A community guide to the Rust ecosystem | A community guide to the Rust ecosystem | null | 0 | 45 | 75 | 218 | 18 | 5 | 1 |
flutter/news_toolkit | <img alt="Flutter News Toolkit Logo" height="75" src="./docs/static/img/header_light.svg#gh-light-mode-only"/>
<img alt="Flutter News Toolkit Logo" height="75" src="./docs/static/img/header_dark.svg#gh-dark-mode-only"/>
<br/>
Flutter and the [Google News Initiative](https://newsinitiative.withgoogle.com/) have co-sponsored the development of a news application template. The goal of this project is to help news publishers build mobile applications easily in order to make reliable information accessible to all.
This template aims to **significantly reduce the development time for typical news applications** by giving developers a head start on core components and features.
The Flutter News Toolkit:
- Contains common news app UI workflows and core features built with Flutter and Firebase
- Implements best practices for news apps based on [Google News Initiative research](https://newsinitiative.withgoogle.com/info/assets/static/docs/nci/nci-playbook-en.pdf)
- Allows publishers to monetize immediately with ads and subscription services
Common services such as authentication, notifications, analytics, and ads have been implemented using [Firebase](https://firebase.flutter.dev/docs/overview/) and [Google Mobile Ads](https://pub.dev/packages/google_mobile_ads). Developers are free to substitute these services and can find publicly available packages on [pub.dev](https://pub.dev).
If you're just getting started with Flutter, we recommend first developing familiarity with the framework by reviewing the [onboarding guides](https://docs.flutter.dev/get-started/install), [tutorials](https://docs.flutter.dev/reference/tutorials), and [codelabs](https://docs.flutter.dev/codelabs) before using this template.
## Get Started
To get started, see the official documentation at https://flutter.github.io/news_toolkit.
| A news template application built in Flutter, by Google and Very Good Ventures. Learn more at: https://flutter.github.io/news_toolkit | dart,flutter,flutter-template,news-app | 2 | 297 | 1,210 | 823 | 0 | 18 | 31 |
Flutterando/roadmap | # Flutter Roadmap 2024
O objetivo desse repositório é catalogar os conteúdos existentes na internet sobre Flutter e concatenar em uma espécie de "roadmap" para auxiliar os iniciantes.
# Escrever códigos
É recomendado assistir [ESTE VÍDEO](https://www.youtube.com/watch?v=BTENKdRVS2U) antes de iniciar.
## Lógica de Programação
Precisamos entender como criar algorítmos, por tanto, antes de realmente colocar a mão no código, é importante estudar um pouco sobre Lógica de programação.
Nessa etapa não é necessário saber nenhuma linguagem.
- [Curso de lógica de programação](https://www.youtube.com/watch?v=8mei6uVttho&list=PLHz_AreHm4dmSj0MHol_aoNYCSGFqvfXV).
- [Curso Lógica de Programação Completo 2021](https://www.youtube.com/watch?v=iF2MdbrTiBM)
## Orientação a Objetos (POO)
Esse é o paradgma mais utilizado no Flutter. Por isso devemos conhecer o básico para iniciar nesse framework.
Não tenha medo de aprender 2 ou 3 linguagens a mais para dominar esse paradigma.
É recomendado (~e não obrigatório~) aprender um pouco sobre o Java, pois é uma linguagem que utiliza exclusivamente a POO, forçando-o a entender toda a base desse paradgma.
- [Programação Orientada a Objetos (POO)](https://www.youtube.com/watch?v=QY0Kdg83orY)
- [Curso de programação oriendada a objetos](https://www.youtube.com/watch?v=KlIL63MeyMY&list=PLHz_AreHm4dkqe2aR0tQK74m8SFe-aGsY)
- [Classes abstratas no FLUTTER](https://youtu.be/nZov6ztrocc)
## O Dart
Após entender mais sobre Lógica de Programação, devemos focar na linguagem principal do Flutter, o Dart.
Assista primeiro:
- [Dart (a linguagem do Flutter)](https://www.youtube.com/watch?v=i7IzlVImHEc)
- [Por que o Flutter usa o Dart (Ative as legendas)](https://www.youtube.com/watch?v=5F-6n_2XWR8)
É importante ressaltar que o Dart sofreu mudanças consideráveis na segunda metade de 2021, por tanto, não é recomendado para iniciantes os cursos gravados antes de julho de 2021.
**CURSOS GRATUITOS**:
- [Curso de Dart (Deivid Willyan)](https://www.youtube.com/watch?v=PgRv_aeqf-4&list=PLRpTFz5_57cseSiszvssXO7HKVzOsrI77)
**CURSOS PAGOS**:
- [Lógica de programação com Dart (Flutterando Masterclass)](https://masterclass.flutterando.com.br/public/products/e141c9c5-0b60-4e0e-96f1-e31d433e2a09)
**DOCUMENTAÇÃO**:
- [Dart doc](https://dart.dev/guides/language/language-tour)
Não pule essa etapa, pois conhecer a base do Dart será o principal diferencial para desenvolver em Flutter.
# Flutter
Após seguir os passos da sessão anterior, chegou a hora de usar as ferramentas do SDK. Se não conhece o Flutter, assista [ESTE VÍDEO](https://www.youtube.com/watch?v=vIP2iLFjEIk&t=66s).
## Cursos gratuitos
- [Flutter Curso 2022 (Flutterando)](https://www.youtube.com/playlist?list=PLlBnICoI-g-fuy5jZiCufhFip1BlBswI7)
- [Catálogo de Widgets](https://docs.flutter.dev/reference/widgets)
## Cursos pagos
- [Masterclass Paga Iniciante (Flutterando)](https://masterclass.flutterando.com.br/public/products)
> ficar atento ao canal do Youtube para ver o anuncio de vagas
- [Curso de Flutter (COD3R)](https://www.udemy.com/course/curso-flutter/)
- [Curso de Flutter em Inglês (Angela)](https://www.udemy.com/course/flutter-bootcamp-with-dart/)
## Livros
- [Flutter in Action](https://www.google.com/search?q=Flutter+in+Action+book&sca_esv=562513523&rlz=1C1GCEA_enBR1014BR1014&ei=bML1ZPG7LZG75OUPwue7uA0&ved=0ahUKEwjxob_v75CBAxWRHbkGHcLzDtcQ4dUDCBA&uact=5&oq=Flutter+in+Action+book&gs_lp=Egxnd3Mtd2l6LXNlcnAiFkZsdXR0ZXIgaW4gQWN0aW9uIGJvb2syBxAuGBMYgAQyFhAuGBMYgAQYlwUY3AQY3gQY4ATYAQFIsEZQ7jRYiURwAngBkAEAmAHlAaABkQaqAQUwLjQuMbgBA8gBAPgBAcICChAAGEcY1gQYsAPCAgoQABiKBRiwAxhDwgIHEAAYExiABMICCBAAGBYYHhgT4gMEGAAgQYgGAZAGCroGBggBEAEYFA&sclient=gws-wiz-serp&bshm=rimc/1)
- [Flutter Complete Reference](https://www.google.com/search?q=Flutter+Complete+Reference+book&sca_esv=562513523&rlz=1C1GCEA_enBR1014BR1014&ei=g8L1ZMLzDMne5OUPzI-K0AQ&ved=0ahUKEwiCwZr675CBAxVJL7kGHcyHAkoQ4dUDCBA&uact=5&oq=Flutter+Complete+Reference+book&gs_lp=Egxnd3Mtd2l6LXNlcnAiH0ZsdXR0ZXIgQ29tcGxldGUgUmVmZXJlbmNlIGJvb2syBxAAGBMYgAQyBxAuGBMYgAQyBhAAGB4YE0iQBlAAWABwAHgBkAEAmAHSBaAB0gWqAQM2LTG4AQPIAQD4AQL4AQHiAwQYACBBiAYB&sclient=gws-wiz-serp&bshm=rimc/1)
# Roadmap
Nesta sessão, iremos sugerir uma sequência de assuntos que um desenvolvedor Flutter deve dominar:
## POO e Lógica de programação
O Flutter usa o Dart de forma declarativa. Isso significa que o desenvolvedor usa linguagem de programação para desenhar telas em vez de linguagem de marcação como HTML, XML ou XAML.
Por esse motivo é recomendado que o desenvolvedor já domine os conceitos de POO e Lógica de programação.
Retorne a sessão [Escrever Códigos](#escrever-códigos) para dicas de cursos sobre esses dois assuntos.
## Sintaxe do Dart
Antes de usar o Flutter, o desenvolvedor deverá aprender pelomenos a sintaxe básica do Dart.
[Nesta sessão](#o-dart) foi sugerido alguns cursos pagos e gratuitos para uma imersão na linguagem Dart.
## Aprenda GIT.
Git é essencial para um desenvolvedor.
- [Git para desenvolvedores Flutter](https://www.youtube.com/watch?v=Kx3M6XUpcFE)
## Widgets nativos
Tudo no Flutter é Widget.
A tela de um aplicativo Flutter é constituida pela união de outros widgets nativos.
- Domine os principais widgets de alinhamento: **(Column, Row, Stack)**.
- Entenda o funcionamento do **Container**.
- Teste todos os widgets disponíveis [NESSE CATÁLOGO](https://docs.flutter.dev/reference/widgets).
## Criação de widgets
Existem três formas básicas de criar widgets customizados, o StatelessWidget, StatefulWidget e InheritedWidget. A diferênça entre os três deve ser entendida desde o início.
## Componentização de widget
Após aprender a criar widgets customizados, o desenvolvedor deve aprender a dividir esses widgets em arquivos separados para que possa facilitar a compreenção de outras pessoas que estarão lendo o código posteriomente.
Algumas dicas sobre isso:
- Tente ter um arquivo por Widget.
- Reflita o nome do Widget no nome do arquivo: Ex: HomePage(home_page.dart).
## Widgets de inputs
- [AULÃO: Criação de formulários](https://www.youtube.com/watch?v=5SIw8bXiP7o)
- [Tudo sobre Máscaras](https://www.youtube.com/watch?v=sjQLmibDEu4)
## Aprenda a fazer animações
- [Tudo sobre animações no Flutter](https://www.youtube.com/watch?v=XM-8UTkFr4c&t=3108s)
## Consumo de APIs externas
- [AULÃO: Consumo de APIs (Flutterando)](https://www.youtube.com/watch?v=PUQEd7xRldM)
## Domine o Provider
O Provider é a recomendação da equipe do Flutter para quem está iniciando no mundo Flutter para gerenciar estados e injeção de dependência.
- [AULÃO sobre o Provider(Flutterando)](https://www.youtube.com/watch?v=VhsqMahAmOk)
- [Provider em 10 minutos (Renato Mota)](https://www.youtube.com/watch?v=Gm8QuYvOTwE)
- [Como utilizar o Provider e o ChangeNotifier(Prof. Diego Antunes)](https://www.youtube.com/watch?v=xDdAXmAUt6c)
- [Flutter Provider for Beginners (Inglês)](https://www.youtube.com/watch?v=P47JJU6dlcA)
## Aprenda alguns Design Patterns
Padrões de projetos sÃo importantes para o trabalho em equipe.
- [Repository Pattern no Flutter (balta.io)](https://www.youtube.com/watch?v=Q05t3mgaMfk)
- [CopyWith (Jacob)](https://blog.flutterando.com.br/o-padr%C3%A3o-copywith-no-flutter-dart-267e3d218ffc)
- [Injeção de dependências (Flutterando)](https://www.youtube.com/watch?v=KpPnDHpgHnA&t=60s)
- [MVC, MVP e MVVM no Flutter (Flutterando)](https://www.youtube.com/watch?v=WgadnZcujuc)
- [Factory(Felipe Deschamps)](https://www.youtube.com/watch?v=arAz2Ff8s88&ab_channel=FilipeDeschamps)
## Testes de unidade
- [Um programador confiável (Elemar Jr)](https://www.youtube.com/watch?v=XSdT2myLlw4)
- [AULÃO sobre testes de unidade (Flutterando)](https://www.youtube.com/watch?v=BLHPRg8ickY)
- [Semana do Flutter sobre testes (Flutterando)](https://www.youtube.com/playlist?list=PLlBnICoI-g-etEtbvgDnO40SYKOSktCj4)
- [Curso Pago de testes de unidade (Flutterando)](https://masterclass.flutterando.com.br/public/products/94222fd5-92e5-4890-8e87-455ef4346858)
## Gerência de estado
O StatefulWidget concede ao Widget a possibilidade de gerenciar o próprio estado. Mas as vezes é necessário mudar o estado de vários widgets em uma ação. Para isso, existe alguns padrões para auxiliar nisso.
- [BASE DA GERENCIA DE ESTADO (Flutterando)](https://www.youtube.com/watch?v=XGjCatQadrk&ab_channel=JacobMouradaFlutterando)
- [AULÃO sobre gerência de estado (Flutterando)](https://www.youtube.com/watch?v=_F0GI2dnt-g)
- [ValueNotifier. A reatividade mais rápida do Flutter](https://www.youtube.com/watch?v=S1PgnMqVgsM)
- [Curso de gerência de estado com ValueNotifier (Flutterando)](https://www.youtube.com/playlist?list=PLlBnICoI-g-eG0eVkHu2IaO48TljxPjPq)
- [AULÃO sobre BLoC (Flutterando)](https://www.youtube.com/watch?v=UB28e59GmK8)
- [AULÃO sobre MobX (Flutterando)](https://www.youtube.com/watch?v=Z6U6L9e8gmE)
- [AULÃO sobre Triple (Flutterando)](https://www.youtube.com/watch?v=CS97q2PwjSo)
## Arquitetura
A arquitetura de um projeto define a vida útil do mesmo. Todo app tem alguma arquitetura, mesmo que o desenvolvedor não tenha pensado nisso.
- [AULÃO sobre Clean Architecture (Flutterando)](https://www.youtube.com/watch?v=fABLC2fxQwg)
- [Playlist sobre Clean Dart (Flutterando)](https://www.youtube.com/playlist?list=PLlBnICoI-g-d-v_fWlkZX2HRgHHPnJx9s)
- [Curso sobre Arquitetura (Deivid Willyan)](https://www.youtube.com/playlist?list=PLRpTFz5_57cvCYRhHUui2Bis-5Ybh78TS)
- [Masterclass Paga Intermediária (Flutterando)](https://masterclass.flutterando.com.br/public/products)
> ficar atento ao canal do Youtube para ver o anuncio de vagas
## Menções honrosas
Principais (~e únicos~) gerenciadores de versão do Flutter
- [Link do Puro](https://puro.dev/) | [Video Explicativo](https://www.youtube.com/watch?v=ImCGQM6jhic&t=181s&ab_channel=JacobMouradaFlutterando)
- [Link do FVM](https://fvm.app/) | [Video Explicativo](https://www.youtube.com/watch?v=9n5dLXJMSqU&ab_channel=JacobMouradaFlutterando)
- Qual é melhor?
Atualmente o aproach de gerencia de armazenamento do Puro e sua configuração de "ambientes" tem agradado mais a comunidade. Sua instalação diretamente no shell simples e direta também.
Link de criadores de conteúdo relevante que estão sempre colaborando ou já tem um acervo de qualidade.
- [Jacob Moura da Flutterando](https://www.youtube.com/@JacobMoura7)
- [Prof. Diego Antunes](https://www.youtube.com/@drantunes)
- [Bwolf](https://www.youtube.com/@BwolfDev)
- [Flutter Mapp](https://www.youtube.com/@FlutterMapp/videos)
- [Flutter Official](https://www.youtube.com/@flutterdev)
- [Toshi Ossada](https://toshiossada.medium.com/)
Links gerais da comunidade (discord, telegram...)
- [Linktree](https://linktr.ee/Flutterando)
Sugestões de Livros. (Leia para aprender, nunca levando tudo como regra e sim absorvendo as partes que lhe fizerem sentido)
- Clean Code
![image](https://github.com/thKali/roadmap_fork/assets/100535432/48bd94af-05dd-4148-8a2f-41384146e368)
- Padrões de Projeto
![image](https://github.com/thKali/roadmap_fork/assets/100535432/45e1bfcc-090a-41b2-8cf5-d434ec7a4e86)
- Clean Arch
![image](https://github.com/thKali/roadmap_fork/assets/100535432/286b11ae-89e0-4ace-bfe1-fec626bf02fa)
- Refatoração
![image](https://github.com/thKali/roadmap_fork/assets/100535432/438a86c8-e526-443c-a8c7-66e78109b83f)
| Flutter roadmap pt-BR | null | 0 | 7 | 5 | 14 | 1 | 1 | 0 |
IDEA-Research/awesome-detection-transformer | null | Collect some papers about transformer for detection and segmentation. Awesome Detection Transformer for Computer Vision (CV) | null | 0 | 18 | 24 | 73 | 6 | 2 | 0 |
hattipjs/hattip | null | Like Express, but for the future | null | 0 | 9 | 92 | 287 | 19 | 4 | 4 |
benbjohnson/postlite | Postlite ![Status](https://img.shields.io/badge/status-unmaintained-yellow)
========
Postlite is a network proxy to allow access to remote SQLite databases over the
Postgres wire protocol. This allows GUI tools to be used on remote SQLite
databases which can make administration easier.
The proxy works by translating Postgres frontend wire messages into SQLite
transactions and converting results back into Postgres response wire messages.
Many Postgres clients also inspect the `pg_catalog` to determine system
information so Postlite mirrors this catalog by using an attached in-memory
database with virtual tables. The proxy also performs minor rewriting on these
system queries to convert them to usable SQLite syntax.
_Note: This software was a proof of concept of wrapping SQLite with the Postgres
wire protocol. It is no longer maintained. You're welcome to fork this project if
you're interested in continuing development._
## Usage
To use Postlite, execute the command with the directory that contains your
SQLite databases:
```sh
$ postlite -data-dir /data
```
On another machine, you can connect via the regular Postgres port of 5432:
```sh
$ psql --host HOSTNAME my.db
```
This will connect you to a SQLite database at the path `/data/my.db`.
## Development
Postlite uses virtual tables to simulate the `pg_catalog` so you will need to
enable the `vtable` tag when building:
```sh
$ go install -tags vtable ./cmd/postlite
```
| Postgres wire compatible SQLite proxy. | null | 0 | 2 | 3 | 15 | 12 | 1 | 0 |
nakixii/Magisk_AsoulOpt | # AsoulOpt
Android游戏线程调整程序,适用于主流游戏以及一些小众游戏
Game threads tweaker for Android, suitable for mainstream games and some niche games
## 注意事项 / Notes
- 可能会被某些负优化影响,通常不会与第三方调度冲突
- 如果你玩的游戏未在列表中,并且你拥有调试的耐心以及充足的知识储备,可发送邮件到`nakixii@gmail.com`申请参加调试。必须提供 Scene 7 帧率记录内的线程负载统计截图以及游戏包名。**无完整信息的邮件无效。**
- May be affected by some "optimizations", usually does not conflict with third-party optimizers
- If the game you play is not on the list, and you have the patience and knowledge to debug, you can send an email to `nakixii@gmail.com` to apply for debugging. A screenshot of the thread statistics in the Scene 7 FrameRate Stats and the package name of the game must be included. **Emails without complete information are invalid.**
## 支持的游戏 / Supported games
- 暗区突围
- 暗影之枪:传奇
- 堡垒之夜
- 爆裂小子
- 崩坏:星穹铁道(包含国际服)
- 崩坏3(包含国际/渠道服)
- 碧蓝航线
- 部落冲突(包含国际/渠道服)
- 尘白禁区
- 穿越火线:枪战王者
- 传说对决
- 蛋仔派对(包含国际/渠道服)
- 第五人格(包含渠道服)
- 巅峰极速(包含国际/渠道服)
- 东方弹幕神乐
- 斗罗大陆:魂师对决(包含国际/渠道服)
- 緋染天空 Heaven Burns Red
- 风色幻想:命运传说
- 高能英雄
- 公主连结R
- 灌篮高手
- 和平精英
- 环行旅舍
- 幻塔(包含国际/渠道服)
- 荒野乱斗(包含国际/渠道服)
- 荒野行动(包含国际/渠道服)
- 火炬之光:无限(包含国际服)
- 火影忍者
- 机动都市阿尔法(包含国际/渠道服)
- 剑网3无界
- 剑与远征
- 金铲铲之战
- 聚爆Implosion(包含渠道服)
- 决战!平安京(包含渠道服)
- 狂野飙车9(包含渠道服)
- 来自星尘(包含国际服)
- 黎明觉醒:生机
- 黎明前20分钟(包含国际服)
- 黎明杀机
- 猎魂觉醒(包含渠道服)
- 零灵:天运防线
- 猫和老鼠(包含国际/渠道服)
- 梦幻模拟战
- 明日方舟(包含国际/渠道服)
- 明日之后(包含国际/渠道服)
- 鸣潮(包含国际服)
- 命运-冠位指定
- 霓虹深渊:无限
- 逆水寒
- 女神异闻录:夜幕魅影(包含渠道服)
- 暖雪(包含渠道服)
- 帕斯卡契约(包含国际/渠道服)
- 跑跑卡丁车官方竞速版
- 强袭人形:原体(包含国际服)
- 球球大作战
- 雀魂麻将(包含国际服)
- 雀姬(包含国际/渠道服)
- 赛马娘Pretty Derby
- 少女前线2:追放
- 深空之眼(包含渠道服)
- 使命召唤手游
- 世界弹射物语(包含国际/渠道服)
- 宿命回响:弦上的叹息(包含渠道服)
- 泰拉瑞亚(包含国际服)
- 坦克世界闪击战(包含国际/渠道服)
- 天下布魔(包含国际服)
- 天涯明月刀
- 王牌竞速(包含渠道服)
- 王者荣耀(包含体验服)
- 网易我的世界
- 未来之役
- 未知:升变
- 蔚蓝档案(包含国际/渠道服)
- 我的勇者
- 无尽的拉格朗日
- 无期迷途
- 现代战舰
- 香肠派对
- 星球:重启(包含渠道服)
- 星战前夜:无烬星河(包含国际/渠道服)
- 旋转音律Rotaeno(包含国际服)
- 学園アイドルマスター(学マス)
- 阴阳师(包含国际/渠道服)
- 英雄联盟手游(包含国际服)
- 萤火突击(包含国际服)
- 游戏王:决斗链接
- 元气骑士
- 原神(包含国际/渠道服)
- 月圆之夜(包含国际/渠道服)
- 云顶之弈
- 战双帕弥什(包含国际/渠道服)
- 中国象棋
- 重返未来:1999
- 重生细胞(包含渠道服)
- 自由幻想
- Age of History II
- Albion Online
- Assault Lily W
- BanG Dream! 少女乐团派对!
- BATTLEGROUNDS MOBILE INDIA
- Call of Duty
- Call of Duty Mobile
- Call of Duty Mobile KR
- COD Warzone
- Combat Master
- CSWGS
- Cytoid
- D4DJ
- Diablo Immortal
- Dokkan
- Dungeon Defense
- DYSMANTLE
- Farlight 84
- Fold Craft Launcher
- Honor of Kings
- ICEY
- KartRider: Drift
- Love Live! School idol festival 2 MIRACLE LIVE!
- Malody V
- Master Duel
- Minecraft
- MMD UNITY
- Monster Cooking Diary
- Monster Hunter Now
- Muse Dash
- NBA2K20
- osu!(lazer) (Multithreaded)
- Pocket Rogues
- PojavLauncher
- PUBG Mobile
- PUBG Mobile KR
- PUBG Mobile TW
- PUBG Mobile VN
- QQ飞车
- Rainbow Six Mobile
- RASPBERRY MASH
- Roblox
- Rush Rally 3
- Sky光·遇(包含国际/渠道服)
- Source
- Standoff 2
- Sword Art Online
- The Tower
- VTube Studio
- アイドルマスター シンデレラガールズ スターライトステージ
- アイドルマスター ミリオンライブ! シアターデイズ
- アイドルマスターシャイニーカラーズ
- バンドリ! ガールズバンドパーティ!
- プロセカ
| null | null | 254 | 1 | 0 | 258 | 0 | 1 | 0 |
midarrlabs/midarr-server | <p align="center">
<img src="priv/static/logo.svg" width="150" height="150" alt="logo">
</p>
<p align="center">
<em>Your media enjoyed with a minimal lightweight media server</em>
</p>
<p align="center">
<a href="https://github.com/midarrlabs/midarr-server/actions/workflows/build.yml">
<img src="https://github.com/midarrlabs/midarr-server/actions/workflows/build.yml/badge.svg" alt="Build Status">
</a>
<a href="https://codecov.io/gh/midarrlabs/midarr-server">
<img src="https://codecov.io/gh/midarrlabs/midarr-server/branch/master/graph/badge.svg?token=8PJVJG09RK&style=flat-square" alt="Code Coverage">
</a>
<a href="https://github.com/midarrlabs/midarr-server/blob/master/LICENSE">
<img alt="GitHub license" src="https://img.shields.io/github/license/midarrlabs/midarr-server" alt="License">
</a>
<a href="https://github.com/midarrlabs/midarr-server/releases">
<img alt="GitHub release (latest by date)" src="https://img.shields.io/github/v/release/midarrlabs/midarr-server" alt="Release">
</a>
<a href="https://github.com/midarrlabs/midarr-server/issues?q=is%3Aopen+is%3Aissue">
<img src="https://img.shields.io/github/issues-raw/midarrlabs/midarr-server" alt="Open Issues">
</a>
<a href="https://github.com/midarrlabs/midarr-server/issues?q=is%3Aissue+is%3Aclosed">
<img src="https://img.shields.io/github/issues-closed-raw/midarrlabs/midarr-server" alt="Closed Issues">
</a>
</p>
Free and open source (and always will be), **Midarr** aims to provide a tailored experience for **you** and **your**
users:
* Beautifully crafted user interface
* Real-time online statuses
* Simple and easy invite system
* Integrates with your existing services, [Radarr](https://radarr.video/) and [Sonarr](https://sonarr.tv/)
![Preview](docs/home-v4.2.0.png)
### What is this?
This is a lightweight (albeit companion) media server to the likes of Radarr and Sonarr.
Your media is left untouched and unscathed as it is served through a simple (yet familiar) web interface that puts your media front and center for
**you** and **your** users to enjoy.
While other media solutions look to re-index, re-fetch and re-double handle your media library, Midarr simply leverages your pre-existing
services to delight and enhance **your** media experience.
![Preview](docs/ecosystem-v3.0.0.jpg)
### How is this lightweight?
* **Direct streaming.** Your media served fresh off the metal.
* **Smart caching.** Your media smartly kept in sync with your integrations.
* **Integrated experience.** Your media kept the way you like it.
### What else does this do?
Your media is served through a slick web interface providing:
* User authentication
* User profile settings
* User online statuses
with more features planned ahead.
## Usage
### Docker compose
```yaml
volumes:
database-data:
services:
midarr:
container_name: midarr
image: ghcr.io/midarrlabs/midarr-server:latest
ports:
- 4000:4000
volumes:
- /path/to/media:/media
environment:
# App config
- APP_URL=http://midarr:4000
# Database config
- DB_USERNAME=my_user
- DB_PASSWORD=my_password
- DB_DATABASE=my_database
- DB_HOSTNAME=postgresql
# Admin account
- SETUP_ADMIN_EMAIL=admin@email.com
- SETUP_ADMIN_NAME=admin
- SETUP_ADMIN_PASSWORD=somepassword # minimum length 12
# Radarr integration
- RADARR_BASE_URL=radarr:7878
- RADARR_API_KEY=someApiKey
# Sonarr integration
- SONARR_BASE_URL=sonarr:8989
- SONARR_API_KEY=someApiKey
depends_on:
postgresql:
condition: service_healthy
postgresql:
container_name: postgresql
image: postgres
volumes:
- database-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=my_user
- POSTGRES_PASSWORD=my_password
- POSTGRES_DB=my_database
healthcheck:
test: "exit 0"
```
### Admin account
To initialise this, please provide the following **environment variables**. This will allow you to configure your server at the **settings** page.
```yaml
environment:
- SETUP_ADMIN_EMAIL=admin@email.com
- SETUP_ADMIN_NAME=admin
- SETUP_ADMIN_PASSWORD=somepassword # minimum length 12
```
### Invite system
To send invitations, please provide the following **environment variables**. Access the **settings** page to invite users to your server.
```yaml
environment:
- APP_MAILER_FROM=example@email.com
- SENDGRID_API_KEY=someApiKey
```
### OIDC / OAuth 2.0
To use your own identity provider like [Authentik](https://goauthentik.io/), please provide the following **environment variables**. Go to `/auth` to initiate the auth flow.
```yaml
environment:
- OAUTH_CLIENT_ID=someClientId
- OAUTH_CLIENT_SECRET=someClientSecret
- OAUTH_ISSUER_URL=http://some-provider.url
- OAUTH_AUTHORIZE_URL=http://some-provider.url/authorize
- OAUTH_TOKEN_URL=http://some-provider.url/token
- OAUTH_REDIRECT_URI=http://some-provider.url/auth/callback
- OAUTH_USER_URL=http://some-provider.url/user
```
## Support
### Videos
* H.264 / H.265 codec
* AAC / MP3 audio
* MP4 / MKV container
### Subtitles
A single **.srt** file in the root directory of the video is currently supported. With this setup a subtitle / caption option will be available in the player view.
```
library/video
└──video.srt
└──video.mp4
```
## FAQ
### Why won't my media play?
Midarr looks to your integrations to resolve your media locations. Midarr **is not** aware of where your media lives!
A common way to mount a media library is to mount the root directory where both movies and series reside:
```yaml
services:
midarr:
volumes:
- /path/to/media:/media
radarr:
volumes:
- /path/to/media:/media
sonarr:
volumes:
- /path/to/media:/media
```
### Why won't my media sync?
To keep your media in sync, webhook urls are required in your integrations. Midarr accepts a
POST request from your integrations with your unique API Token (found on the Midarr Settings page).
Add these webhook urls to Radarr / Sonarr under `Settings -> Connect -> Webhook`:
#### Radarr example
```
http://midarr:4000/api/webhooks/movie?token=some-api-token
```
#### Sonarr example
```
http://midarr:4000/api/webhooks/series?token=some-api-token
```
### What integrations does this support?
We support the following integration versions:
* Radarr `v5.x`
* Sonarr `v4.x`
## Contributing
Thank you for all your contributions! Big or small - all is welcome!
### Local development
1. Fork and git clone the repository
```
git clone https://github.com/{ YOUR-ACCOUNT }/midarr-server.git
```
2. Docker compose up the stack
```
cd midarr-server && docker compose up -d
```
3. Service locations:
- [http://localhost:4000](http://localhost:4000) - Midarr
- [http://localhost:7878](http://localhost:7878) - Radarr
- [http://localhost:8989](http://localhost:8989) - Sonarr
## License
Midarr is open-sourced software licensed under the [MIT license](LICENSE).
## Preview
![Preview](docs/login-v3.0.0.png)
![Preview](docs/movie-v4.2.0.png)
![Preview](docs/series-v4.2.0.png)
![Preview](docs/player-v3.0.0.png) | 🔥Midarr, the minimal lightweight media server. | media-server,self-hosted,elixir,elixir-lang,media-player,midarr,radarr,sonarr,video | 73 | 3 | 291 | 1,780 | 1 | 10 | 4 |
sbwml/luci-app-alist | # luci-app-alist
A file list program that supports multiple storage.
## How to build
- Install `libfuse` development package.
- ubuntu/debian:
```shell
sudo apt update
sudo apt install libfuse-dev
```
- redhat:
```shell
sudo yum install fuse-devel
```
- arch:
```shell
sudo pacman -S fuse2
```
- Enter in your openwrt dir
- Openwrt official SnapShots
*1. requires golang 1.19.x or latest version (Fix build for older branches of OpenWrt.)*
```shell
rm -rf feeds/packages/lang/golang
git clone https://github.com/sbwml/packages_lang_golang -b 20.x feeds/packages/lang/golang
```
*2. get luci-app-alist source & building*
```shell
git clone https://github.com/sbwml/luci-app-alist package/alist
make menuconfig # choose LUCI -> Applications -> luci-app-alist
make package/alist/luci-app-alist/compile V=s # build luci-app-alist
```
--------------
## How to install prebuilt packages
- Login OpenWrt terminal (SSH)
- Install `curl` package
```shell
opkg update
opkg install curl
```
- Execute install script (Multi-architecture support)
```shell
sh -c "$(curl -ksS https://raw.githubusercontent.com/sbwml/luci-app-alist/master/install.sh)"
```
--------------
![](https://user-images.githubusercontent.com/16485166/190462187-5d54725e-1d9b-45f3-854f-403b882fb223.png)
| LuCI support for Alist | luci-app-alist,openwrt,alist | 71 | 8 | 16 | 197 | 14 | 3 | 1 |
amantinband/throw | <div align="center">
<img src="assets/icon.png" alt="drawing" width="700px"/>
[![NuGet](https://img.shields.io/nuget/v/Throw.svg)](https://www.nuget.org/packages/Throw)
[![Build](https://github.com/amantinband/throw/actions/workflows/build.yml/badge.svg)](https://github.com/amantinband/throw/actions/workflows/build.yml) [![publish Throw to NuGet](https://github.com/amantinband/throw/actions/workflows/publish.yml/badge.svg)](https://github.com/amantinband/throw/actions/workflows/publish.yml) [![codecov](https://codecov.io/gh/amantinband/throw/branch/main/graph/badge.svg?token=PA879VKK6M)](https://codecov.io/gh/amantinband/throw)
[![GitHub contributors](https://img.shields.io/github/contributors/amantinband/throw)](https://GitHub.com/amantinband/throw/graphs/contributors/) [![GitHub Stars](https://img.shields.io/github/stars/amantinband/throw.svg)](https://github.com/amantinband/throw/stargazers) [![GitHub license](https://img.shields.io/github/license/amantinband/throw)](https://github.com/amantinband/throw/blob/main/LICENSE)
---
### A simple, fluent, extensible, and fully customizable library for throwing exceptions using .NET 6+
`dotnet add package throw`
![Getting started png](./assets/getting-started.png)
---
</div>
- [Give it a star ⭐!](#give-it-a-star-)
- [Nullable vs non-nullable types](#nullable-vs-non-nullable-types)
- [Customize everything](#customize-everything)
- [How customizing the exception affects the chained rules](#how-customizing-the-exception-affects-the-chained-rules)
- [Exception customizations](#exception-customizations)
- [1. `Throw()`](#1-throw)
- [2. `Throw("My custom message")`](#2-throwmy-custom-message)
- [3. `Throw(() => new MyException())`](#3-throw--new-myexception)
- [4. `Throw(paramName => new MyException($"Param: {paramName}")`](#4-throwparamname--new-myexceptionparam-paramname)
- [Usage](#usage)
- [Common types](#common-types)
- [Booleans](#booleans)
- [Nullable value types (`bool?`, `int?`, `double?`, `DateTime?` etc.)](#nullable-value-types-bool-int-double-datetime-etc)
- [Strings](#strings)
- [Collections (`IEnumerable`, `IEnumerable<T>`, `ICollection`, `ICollection<T>`, `IList`, etc.)](#collections-ienumerable-ienumerablet-icollection-icollectiont-ilist-etc)
- [DateTime](#datetime)
- [Enums](#enums)
- [Equalities (non-nullables)](#equalities-non-nullables)
- [Uris](#uris)
- [Comparable (`int`, `double`, `decimal`, `long`, `float`, `short`, `DateTime`, `DateOnly`, `TimeOnly` etc.)](#comparable-int-double-decimal-long-float-short-datetime-dateonly-timeonly-etc)
- [Types](#types)
- [Nested properties](#nested-properties)
- [Boolean properties](#boolean-properties)
- [String properties](#string-properties)
- [Collection properties](#collection-properties)
- [DateTime properties](#datetime-properties)
- [Enum properties](#enum-properties)
- [property equalities](#property-equalities)
- [Uri properties](#uri-properties)
- [Comparable properties](#comparable-properties)
- [Extensibility](#extensibility)
- [Conditional compilation](#conditional-compilation)
- [Upcoming features](#upcoming-features)
- [Contribution](#contribution)
- [Credits](#credits)
- [License](#license)
---
# Give it a star ⭐!
Loving it? Show your support by giving this project a star!
# Nullable vs non-nullable types
This library is designed to work best with [nullable reference types feature](https://docs.microsoft.com/en-us/dotnet/csharp/nullable-references) enabled.
The `Throw()` method is the entry method for all non-nullable types:
```csharp
string name = "hello";
name.Throw().IfLongerThan(10);
```
And `ThrowIfNull()` for any nullable type:
```csharp
string? name = "hello";
name.ThrowIfNull();
```
Trying to use `Throw()` on a nullable type will give a warning
```csharp
string? name = null;
name.Throw() // warning CS8714: The type 'string?' cannot be used as type parameter 'TValue' in the generic type or method 'ValidatableCreationExtensions.Throw<TValue>(TValue, ExceptionCustomizations?, string?)'. Nullability of type argument 'string?' doesn't match 'notnull' constraint.
.IfEmpty();
```
After validating that the nullable type isn't null, all the regular non-nullable rules can be used
```csharp
name.ThrowIfNull()
.IfEmpty()
.IfLongerThan(3);
```
The expression can be implicitly cast to the non-nullable type of the original nullable type
```csharp
string? name = "Amichai";
string nonNullableName = name.ThrowIfNull()
.IfEmpty()
.IfLongerThan(10);
```
or
```csharp
int? a = 5;
int b = a.ThrowIfNull();
```
# Customize everything
## How customizing the exception affects the chained rules
If you have customized the exception, any rule that throws an exception will use the customization. For example:
```csharp
// Default behavior:
name.Throw()
.IfEmpty() // System.ArgumentException: String should not be empty. (Parameter 'name')
.IfWhiteSpace() // System.ArgumentException: String should not be white space only. (Parameter 'name')
.IfLongerThan(3) // System.ArgumentException: String should not be longer than 3 characters. (Parameter 'name')
.IfShorterThan(10); // System.ArgumentException: String should not be shorter than 10 characters. (Parameter 'name')
// Customized behavior:
name.Throw(paramName => throw new MyCustomException($"Param name: {paramName}."))
.IfEmpty() // MyCustomException: Param name: name.
.IfWhiteSpace() // MyCustomException: Param name: name.
.IfLongerThan(3) // MyCustomException: Param name: name.
.IfShorterThan(10); // MyCustomException: Param name: name.
```
At any point, you can change the exception customization, and it will apply for all the rules that follow. For example:
```csharp
name.Throw("String should not be empty or white space only.")
.IfEmpty() // System.ArgumentException: String should not be empty or white space only. (Parameter 'name')
.IfWhiteSpace() // System.ArgumentException: String should not be empty or white space only. (Parameter 'name')
.Throw("String should not be between 3 and 10 characters long.")
.IfLongerThan(3) // System.ArgumentException: String should not be between 3 and 10 characters long. (Parameter 'name')
.IfShorterThan(10); // System.ArgumentException: String should not be between 3 and 10 characters long. (Parameter 'name')
```
To go back to the default exception, simply use the `Throw()` method. For example:
```csharp
name.Throw("String should not be empty or white space only.")
.IfEmpty() // System.ArgumentException: String should not be empty or white space only. (Parameter 'name')
.IfWhiteSpace() // System.ArgumentException: String should not be empty or white space only. (Parameter 'name')
.Throw()
.IfLongerThan(3) // System.ArgumentException: String should not be longer than 3 characters. (Parameter 'name')
.IfShorterThan(10); // System.ArgumentException: String should not be shorter than 10 characters. (Parameter 'name')
```
## Exception customizations
### 1. `Throw()`
Each rule has a default behavior. If you don't customize the exception, the default behavior will be used.
Use the `Throw()` or `ThrowIfNull()` method to throw the default exception
```csharp
// ArgumentNullException: Value cannot be null. (Parameter 'nullableValue')
nullableValue.ThrowIfNull();
// System.ArgumentOutOfRangeException: Value should not be less than 2/28/2042 4:41:46 PM. (Parameter 'dateTime')\n Actual value was 2/28/2022 4:41:46 PM.
dateTime.Throw().IfLessThan(DateTime.Now.AddYears(20));
// ArgumentException: Value should not be true (Parameter 'isGood')
isGood.Throw().IfTrue();
// System.ArgumentException: String should not be empty. (Parameter 'name')
name.Throw().IfEmpty();
// System.ArgumentOutOfRangeException: Value should not be greater than 0. (Parameter 'number')\n Actual value was 5.
number.Throw().IfPositive();
```
### 2. `Throw("My custom message")`
Pass a custom exception message to the `Throw()` or `ThrowIfNull()` method
```csharp
// System.ArgumentNullException: My custom message (Parameter 'nullableValue')
nullableValue.ThrowIfNull("My custom message");
// System.ArgumentOutOfRangeException: My custom message (Parameter 'dateTime')\n Actual value was 3/1/2022 10:47:15 AM.
dateTime.Throw("My custom message").IfLessThan(DateTime.Now.AddYears(20));
// System.ArgumentException: My custom message (Parameter 'isGood')
isGood.Throw("My custom message").IfTrue();
// System.ArgumentException: My custom message (Parameter 'name')
name.Throw("My custom message").IfEmpty();
// System.ArgumentOutOfRangeException: My custom message (Parameter 'number')\n Actual value was 5.
number.Throw("My custom message").IfPositive();
```
### 3. `Throw(() => new MyException())`
Pass a custom exception thrower to the `Throw()` or `ThrowIfNull()` method
```csharp
// MyCustomException: Exception of type 'MyCustomException' was thrown.
nullableValue.ThrowIfNull(() => throw new MyCustomException());
// MyCustomException: Exception of type 'MyCustomException' was thrown.
dateTime.Throw(() => throw new MyCustomException()).IfLessThan(DateTime.Now.AddYears(20));
// MyCustomException: Exception of type 'MyCustomException' was thrown.
isGood.Throw(() => throw new MyCustomException()).IfTrue();
// MyCustomException: Exception of type 'MyCustomException' was thrown.
name.Throw(() => throw new MyCustomException()).IfEmpty();
// MyCustomException: Exception of type 'MyCustomException' was thrown.
number.Throw(() => throw new MyCustomException()).IfPositive();
```
### 4. `Throw(paramName => new MyException($"Param: {paramName}")`
Pass a custom exception thrower to the `Throw()` or `ThrowIfNull()` method, that takes the parameter name as a parameter
This comes in handy in scenarios like this:
```csharp
void SendEmail(User user)
{
user.Throw(paramName => new UserException(message: "Cannot send email since user details are invalid.", paramName: paramName))
.IfWhiteSpace(user => user.FirstName) // UserException: Cannot send email since user details are invalid. (Parameter 'user: user => user.FirstName')
.IfWhiteSpace(user => user.LastName) // UserException: Cannot send email since user details are invalid. (Parameter 'user: user => user.LastName')
.IfNull(user => user.Email) // UserException: Cannot send email since user details are invalid. (Parameter 'user: user => user.Email')
.IfLongerThan(user => user.Email!, 100); // UserException: Cannot send email since user details are invalid. (Parameter 'user: user => user.Email!')
emailService.TrySendEmail(user)
.Throw(() => new EmailException("Email could not be sent."))
.IfFalse();
}
```
```csharp
// MyCustomException: Param name: nullableValue.
nullableValue.ThrowIfNull(paramName => throw new MyCustomException($"Param name: {paramName}."));
// MyCustomException: Param name: dateTime.
dateTime.Throw(paramName => throw new MyCustomException($"Param name: {paramName}.")).IfLessThan(DateTime.Now.AddYears(20));
// MyCustomException: Param name: isGood.
isGood.Throw(paramName => throw new MyCustomException($"Param name: {paramName}.")).IfTrue();
// MyCustomException: Param name: name.
name.Throw(paramName => throw new MyCustomException($"Param name: {paramName}.")).IfEmpty();
// MyCustomException: Param name: number.
number.Throw(paramName => throw new MyCustomException($"Param name: {paramName}.")).IfPositive();
```
# Usage
## Common types
### Booleans
```csharp
value.Throw().IfTrue(); // ArgumentException: Value should not be true (Parameter 'value')
value.Throw().IfFalse(); // ArgumentException: Value should be true (Parameter 'value')
// Any method which returns bool can inline it's exception throwing logic.
Enum.TryParse("Unexpected value", out EmployeeType value)
.Throw()
.IfFalse(); // System.ArgumentException: Value should be true. (Parameter 'Enum.TryParse("Unexpected value", out EmployeeType value)')
```
### Nullable value types (`bool?`, `int?`, `double?`, `DateTime?` etc.)
```csharp
bool? value = null;
value.ThrowIfNull(); // ArgumentNullException: Value cannot be null. (Parameter 'value')
// After validating `ThrowIfNull`, any of the regular value type extensions can be used.
value.ThrowIfNull() // ArgumentNullException: Value cannot be null. (Parameter 'value')
.IfTrue(); // ArgumentException: Value should not be true (Parameter 'value')
// The returned value from `ThrowIfNull` can be implicitly cast to the original non-nullable type.
bool nonNullableValue = value.ThrowIfNull(); // ArgumentNullException: Value cannot be null. (Parameter 'value')
```
### Strings
```csharp
name.Throw().IfEmpty(); // System.ArgumentException: String should not be empty. (Parameter 'name')
name.Throw().IfWhiteSpace(); // System.ArgumentException: String should not be white space only. (Parameter 'name')
name.Throw().IfLengthEquals(7); // System.ArgumentException: String length should not be equal to 7. (Parameter 'name')
name.Throw().IfLengthNotEquals(10); // System.ArgumentException: String length should be equal to 10. (Parameter 'name')
name.Throw().IfShorterThan(10); // System.ArgumentException: String should not be shorter than 10 characters. (Parameter 'name')
name.Throw().IfLongerThan(3); // System.ArgumentException: String should not be longer than 3 characters. (Parameter 'name')
name.Throw().IfEquals("Amichai"); // System.ArgumentException: String should not be equal to 'Amichai' (comparison type: 'Ordinal'). (Parameter 'name')
name.Throw().IfEquals("Amichai", StringComparison.InvariantCulture); // System.ArgumentException: String should not be equal to 'Amichai' (comparison type: 'InvariantCulture'). (Parameter 'name')
name.Throw().IfEqualsIgnoreCase("AMICHAI"); // System.ArgumentException: String should not be equal to 'AMICHAI' (comparison type: 'OrdinalIgnoreCase'). (Parameter 'name')
name.Throw().IfNotEquals("Dan"); // System.ArgumentException: String should be equal to 'Dan' (comparison type: 'Ordinal'). (Parameter 'name')
name.Throw().IfNotEquals("Dan", StringComparison.InvariantCultureIgnoreCase); // System.ArgumentException: String should be equal to 'Dan' (comparison type: 'InvariantCultureIgnoreCase'). (Parameter 'name')
name.Throw().IfNotEqualsIgnoreCase("Dan"); // System.ArgumentException: String should be equal to 'Dan' (comparison type: 'OrdinalIgnoreCase'). (Parameter 'name')
name.Throw().IfContains("substring"); // System.ArgumentException: String should not contain 'substring' (comparison type: 'Ordinal'). (Parameter 'name')
name.Throw().IfContains("substring", ComparisonType.InvariantCulture); // System.ArgumentException: String should contain 'substring' (comparison type: 'InvariantCulture'). (Parameter 'name')
name.Throw().IfNotContains("substring"); // System.ArgumentException: String should contain 'substring' (comparison type: 'Ordinal'). (Parameter 'name')
name.Throw().IfNotContains("substring", ComparisonType.InvariantCultureIgnoreCase); // System.ArgumentException: String should contain 'substring' (comparison type: 'InvariantCultureIgnoreCase'). (Parameter 'name')
name.Throw().IfStartsWith("Jer"); // System.ArgumentException: String should not start with 'Jer' (comparison type: 'Ordinal'). (Parameter 'name')
name.Throw().IfStartsWith("JER", StringComparison.OrdinalIgnoreCase); // System.ArgumentException: String should not start with 'JER' (comparison type: 'OrdinalIgnoreCase'). (Parameter 'name')
name.Throw().IfNotStartsWith("dan"); // System.ArgumentException: String should start with 'dan' (comparison type: 'Ordinal'). (Parameter 'name')
name.Throw().IfNotStartsWith("dan", StringComparison.InvariantCultureIgnoreCase); // System.ArgumentException: String should start with 'dan' (comparison type: 'InvariantCultureIgnoreCase'). (Parameter 'name')
name.Throw().IfEndsWith("emy"); // System.ArgumentException: String should not end with 'emy' (comparison type: 'Ordinal'). (Parameter 'name')
name.Throw().IfEndsWith("EMY", StringComparison.OrdinalIgnoreCase); // System.ArgumentException: String should not end with 'EMY' (comparison type: 'OrdinalIgnoreCase'). (Parameter 'name')
name.Throw().IfNotEndsWith("dan"); // System.ArgumentException: String should end with 'dan' (comparison type: 'Ordinal'). (Parameter 'name')
name.Throw().IfNotEndsWith("dan", StringComparison.OrdinalIgnoreCase); // System.ArgumentException: String should end with 'dan' (comparison type: 'OrdinalIgnoreCase'). (Parameter 'name')
name.Throw().IfMatches("J.*y"); // System.ArgumentException: String should not match RegEx pattern 'J.*y' (Parameter 'name')
name.Throw().IfMatches("[a-z]{0,10}", RegexOptions.IgnoreCase); // System.ArgumentException: String should not match RegEx pattern '[a-z]{0,10}' (Parameter 'name')
name.Throw().IfNotMatches("^[0-9]+$"); // System.ArgumentException: String should match RegEx pattern '^[0-9]+$' (Parameter 'name')
name.Throw().IfNotMatches("abc ", RegexOptions.IgnorePatternWhitespace); // System.ArgumentException: String should match RegEx pattern '^[0-9]+$' (Parameter 'name')
```
### Collections (`IEnumerable`, `IEnumerable<T>`, `ICollection`, `ICollection<T>`, `IList`, etc.)
*Important note: if the collection is a non-evaluated expression, the expression will be evaluated.*
```csharp
collection.Throw().IfHasNullElements(); // System.ArgumentException: Collection should not have null elements. (Parameter 'collection')
collection.Throw().IfEmpty(); // System.ArgumentException: Collection should not be empty. (Parameter 'collection')
collection.Throw().IfNotEmpty(); // System.ArgumentException: Collection should be empty. (Parameter 'collection')
collection.Throw().IfCountLessThan(5); // System.ArgumentException: Collection count should not be less than 5. (Parameter 'collection')
collection.Throw().IfCountGreaterThan(1); // System.ArgumentException: Collection count should not be greater than 1. (Parameter 'collection')
collection.Throw().IfCountEquals(0); // System.ArgumentException: Collection count should not be equal to 0. (Parameter 'collection')
collection.Throw().IfCountNotEquals(0); // System.ArgumentException: Collection count should be equal to 0. (Parameter 'collection')
collection.Throw().IfContains("value"); // System.ArgumentException: Collection should not contain element. (Parameter 'person: p => p.Friends')
collection.Throw().IfNotContains("value"); // System.ArgumentException: Collection should contain element. (Parameter 'person: p => p.Friends')
```
### DateTime
```csharp
dateTime.Throw().IfUtc(); // System.ArgumentException: Value should not be Utc. (Parameter 'dateTime')
dateTime.Throw().IfNotUtc(); // System.ArgumentException: Value should be Utc. (Parameter 'dateTime')
dateTime.Throw().IfDateTimeKind(DateTimeKind.Unspecified); // System.ArgumentException: Value should not be Unspecified. (Parameter 'dateTime')
dateTime.Throw().IfDateTimeKindNot(DateTimeKind.Local); // System.ArgumentException: Value should be Local. (Parameter 'dateTime')
dateTime.Throw().IfGreaterThan(DateTime.Now.AddYears(-20)); // System.ArgumentOutOfRangeException: Value should not be greater than 2/28/2002 4:41:19 PM. (Parameter 'dateTime')
dateTime.Throw().IfLessThan(DateTime.Now.AddYears(20)); // System.ArgumentOutOfRangeException: Value should not be less than 2/28/2042 4:41:46 PM. (Parameter 'dateTime')
dateTime.Throw().IfEquals(other); // System.ArgumentException: Value should not be equal to 2/28/2022 4:44:39 PM. (Parameter 'dateTime')
```
### Enums
```csharp
employeeType.Throw().IfOutOfRange(); // System.ArgumentOutOfRangeException: Value should be defined in enum. (Parameter 'employeeType')
employeeType.Throw().IfEquals(EmployeeType.FullTime); // System.ArgumentException: Value should not be equal to FullTime. (Parameter 'employeeType')
```
### Equalities (non-nullables)
```csharp
dateTime.Throw().IfDefault(); // System.ArgumentException: Value should not be default. (Parameter 'dateTime')
dateTime.Throw().IfNotDefault(); // System.ArgumentException: Value should be default. (Parameter 'dateTime')
number.Throw().IfEquals(5); // System.ArgumentException: Value should not be not be equal to 5. (Parameter 'number')
number.Throw().IfNotEquals(3); // System.ArgumentException: Value should be equal to 3. (Parameter 'number')
```
### Uris
```csharp
uri.Throw().IfHttps(); // System.ArgumentException: Uri scheme should not be https. (Parameter 'uri')
uri.Throw().IfNotHttps(); // System.ArgumentException: Uri scheme should be https. (Parameter 'uri')
uri.Throw().IfHttp(); // System.ArgumentException: Uri scheme should not be http. (Parameter 'uri')
uri.Throw().IfNotHttp(); // System.ArgumentException: Uri scheme should be http. (Parameter 'uri')
uri.Throw().IfScheme(Uri.UriSchemeHttp); // System.ArgumentException: Uri scheme should not be http. (Parameter 'uri')
uri.Throw().IfSchemeNot(Uri.UriSchemeFtp); // System.ArgumentException: Uri scheme should be ftp. (Parameter 'uri')
uri.Throw().IfPort(800); // System.ArgumentException: Uri port should not be 80. (Parameter 'uri')
uri.Throw().IfPortNot(8080); // System.ArgumentException: Uri port should be 8080. (Parameter 'uri')
uri.Throw().IfAbsolute(); // System.ArgumentException: Uri should be relative. (Parameter 'uri')
uri.Throw().IfRelative(); // System.ArgumentException: Uri should be absolute. (Parameter 'uri')
uri.Throw().IfNotAbsolute(); // System.ArgumentException: Uri should be absolute. (Parameter 'uri')
uri.Throw().IfNotRelative(); // System.ArgumentException: Uri should be relative. (Parameter 'uri')
uri.Throw().IfHost("www.google.com"); // System.ArgumentException: Uri host should not be www.google.com. (Parameter 'uri')
uri.Throw().IfHostNot("www.google.com"); // System.ArgumentException: Uri host should be www.google.com. (Parameter 'uri')
```
### Comparable (`int`, `double`, `decimal`, `long`, `float`, `short`, `DateTime`, `DateOnly`, `TimeOnly` etc.)
```csharp
number.Throw().IfPositive(); // System.ArgumentOutOfRangeException: Value should not be greater than 0. (Parameter 'number')\n Actual value was 5.
number.Throw().IfNegative(); // System.ArgumentOutOfRangeException: Value should not be less than 0. (Parameter 'number')\n Actual value was -5.
number.Throw().IfLessThan(10); // System.ArgumentOutOfRangeException: Value should not be less than 10. (Parameter 'number')\n Actual value was 5.
number.Throw().IfGreaterThan(3); // System.ArgumentOutOfRangeException: Value should not be greater than 3. (Parameter 'number')\n Actual value was 5.
number.Throw().IfGreaterThanOrEqualTo(5); // System.ArgumentOutOfRangeException: Value should not be greater than or equal to 5. (Parameter 'number')\n Actual value was 6.
number.Throw().IfLessThanOrEqualTo(5); // System.ArgumentOutOfRangeException: Value should not be less than or equal to 5. (Parameter 'number')\n Actual value was 4.
number.Throw().IfPositiveOrZero(); // System.ArgumentOutOfRangeException: Value should not be greater than or equal to 0. (Parameter 'number')\n Actual value was 4.
number.Throw().IfNegativeOrZero(); // System.ArgumentOutOfRangeException: Value should not be less than or equal to 0. (Parameter 'number')\n Actual value was -1.
number.Throw().IfOutOfRange(0, 5); // System.ArgumentOutOfRangeException: Value should be between 0 and 5. (Parameter 'number')\n Actual value was -5.
number.Throw().IfInRange(0, 5); // System.ArgumentOutOfRangeException: Value should not be between 0 and 5. (Parameter 'number')\n Actual value was 4.
```
### Types
```csharp
myObject.Throw().IfType<string>(); // System.ArgumentException: Parameter should not be of type 'String'. (Parameter 'myObject').
myObject.Throw().IfNotType<string>(); // System.ArgumentException: Parameter should be of type 'String'. (Parameter 'myObject').
```
## Nested properties
### Boolean properties
```csharp
person.Throw().IfTrue(p => p.IsFunny); // System.ArgumentException: Value should not meet condition (condition: 'person => person.IsFunny'). (Parameter 'person')
person.Throw().IfFalse(p => p.IsFunny); // System.ArgumentException: Value should meet condition (condition: 'person => person.IsFunny'). (Parameter 'person')
// We can inline the exception throwing logic with the method call.
Person person = GetPerson().Throw().IfTrue(person => person.Age < 18); // System.ArgumentException: Value should not meet condition (condition: 'person => person.Age < 18'). (Parameter 'GetPerson()')
```
### String properties
```csharp
person.Throw().IfEmpty(p => p.Name); // System.ArgumentException: String should not be empty. (Parameter 'person: p => p.Name')
person.Throw().IfWhiteSpace(p => p.Name); // System.ArgumentException: String should not be white space only. (Parameter 'person: p => p.Name')
person.Throw().IfNullOrWhiteSpace(p => p.Name); // System.ArgumentException: String should not be null or whitespace. (Parameter 'person: p => p.Name')
person.Throw().IfNullOrEmpty(p => p.Name); // System.ArgumentException: String should not be null or empty. (Parameter 'person: p => p.Name')
person.Throw().IfLengthEquals(p => p.Name, 7); // System.ArgumentException: String length should not be equal to 7. (Parameter 'person: p => p.Name')
person.Throw().IfLengthNotEquals(p => p.Name, 10); // System.ArgumentException: String length should be equal to 10. (Parameter 'person: p => p.Name')
person.Throw().IfShorterThan(p => p.Name, 10); // System.ArgumentException: String should not be shorter than 10 characters. (Parameter 'person: p => p.Name')
person.Throw().IfLongerThan(p => p.Name, 3); // System.ArgumentException: String should not be longer than 3 characters. (Parameter 'person: p => p.Name')
person.Throw().IfEquals(p => p.Name, "Amichai"); // System.ArgumentException: String should not be equal to 'Amichai' (comparison type: 'Ordinal'). (Parameter 'person: p => p.Name')
person.Throw().IfEquals(p => p.Name, "Amichai", StringComparison.InvariantCulture); // System.ArgumentException: String should not be equal to 'Amichai' (comparison type: 'InvariantCulture'). (Parameter 'person: p => p.Name')
person.Throw().IfEqualsIgnoreCase(p => p.Name, "AMICHAI"); // System.ArgumentException: String should not be equal to 'AMICHAI' (comparison type: 'OrdinalIgnoreCase'). (Parameter 'person: p => p.Name')
person.Throw().IfNotEquals(p => p.Name, "Dan"); // System.ArgumentException: String should be equal to 'Dan' (comparison type: 'Ordinal'). (Parameter 'person: p => p.Name')
person.Throw().IfNotEquals(p => p.Name, "Dan", StringComparison.InvariantCultureIgnoreCase); // System.ArgumentException: String should be equal to 'Dan' (comparison type: 'InvariantCultureIgnoreCase'). (Parameter 'person: p => p.Name')
person.Throw().IfNotEqualsIgnoreCase(p => p.Name, "Dan"); // System.ArgumentException: String should be equal to 'Dan' (comparison type: 'OrdinalIgnoreCase'). (Parameter 'person: p => p.Name')
person.Throw().IfContains(p => p.Name, "substring"); // System.ArgumentException: String should not contain 'substring' (comparison type: 'Ordinal'). (Parameter 'person: p => p.Name')
person.Throw().IfContains(p => p.Name, "substring", ComparisonType.InvariantCulture); // System.ArgumentException: String should contain 'substring' (comparison type: 'InvariantCulture'). (Parameter 'person: p => p.Name')
person.Throw().IfNotContains(p => p.Name, "substring"); // System.ArgumentException: String should contain 'substring' (comparison type: 'Ordinal'). (Parameter 'person: p => p.Name')
person.Throw().IfNotContains(p => p.Name, "substring", ComparisonType.InvariantCultureIgnoreCase); // System.ArgumentException: String should contain 'substring' (comparison type: 'InvariantCultureIgnoreCase'). (Parameter 'person: p => p.Name')
person.Throw().IfStartsWith(p => p.Name, "Jer"); // System.ArgumentException: String should not start with 'Jer' (comparison type: 'Ordinal'). (Parameter 'person: p => p.Name')
person.Throw().IfStartsWith(p => p.Name, "JER", StringComparison.OrdinalIgnoreCase); // System.ArgumentException: String should not start with 'JER' (comparison type: 'OrdinalIgnoreCase'). (Parameter 'person: p => p.Name')
person.Throw().IfNotStartsWith(p => p.Name, "dan"); // System.ArgumentException: String should start with 'dan' (comparison type: 'Ordinal'). (Parameter 'person: p => p.Name')
person.Throw().IfNotStartsWith(p => p.Name, "dan", StringComparison.InvariantCultureIgnoreCase); // System.ArgumentException: String should start with 'dan' (comparison type: 'InvariantCultureIgnoreCase'). (Parameter 'person: p => p.Name')
person.Throw().IfEndsWith(p => p.Name, "emy"); // System.ArgumentException: String should not end with 'emy' (comparison type: 'Ordinal'). (Parameter 'person: p => p.Name')
person.Throw().IfEndsWith(p => p.Name, "EMY", StringComparison.OrdinalIgnoreCase); // System.ArgumentException: String should not end with 'EMY' (comparison type: 'OrdinalIgnoreCase'). (Parameter 'person: p => p.Name')
person.Throw().IfNotEndsWith(p => p.Name, "dan"); // System.ArgumentException: String should end with 'dan' (comparison type: 'Ordinal'). (Parameter 'person: p => p.Name')
person.Throw().IfNotEndsWith(p => p.Name, "dan", StringComparison.OrdinalIgnoreCase); // System.ArgumentException: String should end with 'dan' (comparison type: 'OrdinalIgnoreCase'). (Parameter 'person: p => p.Name')
person.Throw().IfMatches(p => p.Name, "J.*y"); // System.ArgumentException: String should not match RegEx pattern 'J.*y' (Parameter 'person: p => p.Name')
person.Throw().IfMatches(p => p.Name, "[a-z]{0,10}", RegexOptions.IgnoreCase); // System.ArgumentException: String should not match RegEx pattern '[a-z]{0,10}' (Parameter 'person: p => p.Name')
person.Throw().IfNotMatches(p => p.Name, "^[0-9]+$"); // System.ArgumentException: String should match RegEx pattern '^[0-9]+$' (Parameter 'person: p => p.Name')
person.Throw().IfNotMatches(p => p.Name, "abc ", RegexOptions.IgnorePatternWhitespace); // System.ArgumentException: String should match RegEx pattern '^[0-9]+$' (Parameter 'person: p => p.Name')
```
### Collection properties
```csharp
person.Throw().IfHasNullElements(p => p.Friends); // System.ArgumentException: Collection should not have null elements. (Parameter 'person: p => p.Friends')
person.Throw().IfEmpty(p => p.Friends); // System.ArgumentException: Collection should not be empty. (Parameter 'person: p => p.Friends')
person.Throw().IfNotEmpty(p => p.Friends); // System.ArgumentException: Collection should be empty. (Parameter 'person: p => p.Friends')
person.Throw().IfCountLessThan(p => p.Friends, 5); // System.ArgumentException: Collection count should not be less than 5. (Parameter 'person: p => p.Friends')
person.Throw().IfCountGreaterThan(p => p.Friends, 1); // System.ArgumentException: Collection count should not be greater than 1. (Parameter 'person: p => p.Friends')
person.Throw().IfCountEquals(p => p.Friends, 0); // System.ArgumentException: Collection count should not be equal to 0. (Parameter 'person: p => p.Friends')
person.Throw().IfCountNotEquals(p => p.Friends, 0); // System.ArgumentException: Collection count should be equal to 0. (Parameter 'person: p => p.Friends')
person.Throw().IfContains(p => p.Friends, "Amichai"); // System.ArgumentException: Collection should not contain element. (Parameter 'person: p => p.Friends')
person.Throw().IfNotContains(p => p.Friends, "Amichai"); // System.ArgumentException: Collection should contain element. (Parameter 'person: p => p.Friends')
```
### DateTime properties
```csharp
person.Throw().IfUtc(p => p.DateOfBirth); // System.ArgumentException: Value should not be Utc. (Parameter 'person: p => p.DateOfBirth')
person.Throw().IfNotUtc(p => p.DateOfBirth); // System.ArgumentException: Value should be Utc. (Parameter 'person: p => p.DateOfBirth')
person.Throw().IfDateTimeKind(p => p.DateOfBirth, DateTimeKind.Unspecified); // System.ArgumentException: Value should not be Unspecified. (Parameter 'person: p => p.DateOfBirth')
person.Throw().IfDateTimeKindNot(p => p.DateOfBirth, DateTimeKind.Local); // System.ArgumentException: Value should be Local. (Parameter 'person: p => p.DateOfBirth')
person.Throw().IfGreaterThan(p => p.DateOfBirth, DateTime.Now.AddYears(-20)); // System.ArgumentOutOfRangeException: Value should not be greater than 2/28/2002 4:41:19 PM. (Parameter 'person: p => p.DateOfBirth')
person.Throw().IfLessThan(p => p.DateOfBirth, DateTime.Now.AddYears(20)); // System.ArgumentOutOfRangeException: Value should not be less than 2/28/2042 4:41:46 PM. (Parameter 'person: p => p.DateOfBirth')
person.Throw().IfEquals(p => p.DateOfBirth, other); // System.ArgumentException: Value should not be equal to 2/28/2022 4:45:12 PM. (Parameter 'person: p => p.DateOfBirth')
```
### Enum properties
```csharp
person.Throw().IfOutOfRange(p => p.EmployeeType); // System.ArgumentOutOfRangeException: Value should be defined in enum. (Parameter 'person: p => p.EmployeeType')
person.Throw().IfEquals(p => p.EmployeeType, EmployeeType.FullTime); // System.ArgumentException: Value should not be equal to FullTime. (Parameter 'person: p => p.EmployeeType')
```
### property equalities
```csharp
person.Throw().IfDefault(p => p.DateOfBirth); // System.ArgumentException: Value should not be default. (Parameter 'person: p => p.DateOfBirth')
person.Throw().IfNotDefault(p => p.DateOfBirth); // System.ArgumentException: Value should be default. (Parameter 'person: p => p.DateOfBirth')
person.Throw().IfNull(p => p.MiddleName); // System.ArgumentNullException: Value cannot be null. (Parameter 'person: p => p.MiddleName')
person.Throw().IfNotNull(p => p.MiddleName); // System.ArgumentException: Value should be null. (Parameter 'person: p => p.MiddleName')
person.Throw().IfEquals(p => p.Age, 5); // System.ArgumentException: Value should not be not be equal to 5. (Parameter 'person: p => p.Age')
person.Throw().IfNotEquals(p => p.Age, 3); // System.ArgumentException: Value should be equal to 3. (Parameter 'person: p => p.Age')
```
### Uri properties
```csharp
person.Throw().IfHttps(p => p.Website); // System.ArgumentException: Uri scheme should not be https. (Parameter 'person: p => p.Website')
person.Throw().IfNotHttps(p => p.Website); // System.ArgumentException: Uri scheme should be https. (Parameter 'person: p => p.Website')
person.Throw().IfHttp(p => p.Website); // System.ArgumentException: Uri scheme should not be http. (Parameter 'person: p => p.Website')
person.Throw().IfNotHttp(p => p.Website); // System.ArgumentException: Uri scheme should be http. (Parameter 'person: p => p.Website')
person.Throw().IfScheme(p => p.Website, Uri.UriSchemeHttp); // System.ArgumentException: Uri scheme should not be http. (Parameter 'person: p => p.Website')
person.Throw().IfSchemeNot(p => p.Website, Uri.UriSchemeFtp); // System.ArgumentException: Uri scheme should be ftp. (Parameter 'person: p => p.Website')
person.Throw().IfPort(p => p.Website, 800); // System.ArgumentException: Uri port should not be 80. (Parameter 'person: p => p.Website')
person.Throw().IfPortNot(p => p.Website, 8080); // System.ArgumentException: Uri port should be 8080. (Parameter 'person: p => p.Website')
person.Throw().IfAbsolute(p => p.Website); // System.ArgumentException: Uri should be relative. (Parameter 'person: p => p.Website')
person.Throw().IfRelative(p => p.Website); // System.ArgumentException: Uri should be absolute. (Parameter 'person: p => p.Website')
person.Throw().IfNotAbsolute(p => p.Website); // System.ArgumentException: Uri should be absolute. (Parameter 'person: p => p.Website')
person.Throw().IfNotRelative(p => p.Website); // System.ArgumentException: Uri should be relative. (Parameter 'person: p => p.Website')
person.Throw().IfHost(p => p.Website, "www.google.com"); // System.ArgumentException: Uri host should not be www.google.com. (Parameter 'person: p => p.Website')
person.Throw().IfHostNot(p => p.Website, "www.google.com"); // System.ArgumentException: Uri host should be www.google.com. (Parameter 'person: p => p.Website')
```
### Comparable properties
```csharp
person.Throw().IfPositive(p => p.Age); // System.ArgumentOutOfRangeException: Value should not be greater than 0. (Parameter 'person: p => p.Age')\n Actual value was 5.
person.Throw().IfNegative(p => p.Age); // System.ArgumentOutOfRangeException: Value should not be less than 0. (Parameter 'person: p => p.Age')\n Actual value was -5.
person.Throw().IfLessThan(p => p.Age, 10); // System.ArgumentOutOfRangeException: Value should not be less than 10. (Parameter 'person: p => p.Age')\n Actual value was 5.
person.Throw().IfGreaterThan(p => p.Age, 3); // System.ArgumentOutOfRangeException: Value should not be greater than 3. (Parameter 'person: p => p.Age')\n Actual value was 5.
person.Throw().IfGreaterThanOrEqualTo(p => p.Age, 5); // System.ArgumentOutOfRangeException: Value should not be greater than or equal to 5. (Parameter 'person: p => p.Age')\n Actual value was 6.
person.Throw().IfLessThanOrEqualTo(p => p.Age, 5); // System.ArgumentOutOfRangeException: Value should not be less than or equal to 5. (Parameter 'person: p => p.Age')\n Actual value was 4.
person.Throw().IfPositiveOrZero(p => p.Age); // System.ArgumentOutOfRangeException: Value should not be greater than or equal to 0. (Parameter 'person: p => p.Age')\n Actual value was 4.
person.Throw().IfNegativeOrZero(p => p.Age); // System.ArgumentOutOfRangeException: Value should not be less than or equal to 0. (Parameter 'person: p => p.Age')\n Actual value was -1.
person.Throw().IfOutOfRange(p => p.Age, 0, 5); // System.ArgumentOutOfRangeException: Value should be between 0 and 5. (Parameter 'person: p => p.Age')\n Actual value was -5.
person.Throw().IfInRange(p => p.Age, 0, 5); // System.ArgumentOutOfRangeException: Value should not be between 0 and 5. (Parameter 'person: p => p.Age')\n Actual value was 4.
```
# Extensibility
You can easily extend the library by adding your own rules.
Here is a simple example:
```csharp
"foo".Throw().IfFoo(); // System.ArgumentException: String shouldn't equal 'foo' (Parameter '"foo"')
```
```csharp
namespace Throw
{
public static class ValidatableExtensions
{
public static ref readonly Validatable<string> IfFoo(this in Validatable<string> validatable)
{
if (string.Equals(validatable.Value, "foo", StringComparison.OrdinalIgnoreCase))
{
throw new ArgumentException("String shouldn't equal 'foo'", validatable.ParamName);
}
return ref validatable;
}
}
}
```
Another example:
```csharp
user.Throw().IfUsesFacebookOnChrome();
```
```csharp
namespace Throw
{
public static class ValidatableExtensions
{
public static ref readonly Validatable<User> IfUsesFacebookOnChrome(this in Validatable<User> validatable)
{
if (validatable.Value.FavoriteBrowser == Browser.Chrome && validatable.Value.FavoriteWebsite == new Uri("https://facebook.com"))
{
throw new UserException("User shouldn't use Facebook on Chrome!");
}
return ref validatable;
}
}
}
```
If you want to use the exception customizations in your extension. You can use the `ExceptionThrower` class which knows how to create the appropriate exception based on the customizations. For example:
```csharp
namespace Throw
{
public static class ValidatableExtensions
{
public static ref readonly Validatable<User> IfUsesFacebookOnChrome(this in Validatable<User> validatable)
{
if (validatable.Value.FavoriteBrowser == Browser.Chrome && validatable.Value.FavoriteWebsite == new Uri("https://facebook.com"))
{
ExceptionThrower.Throw(validatable.ParamName, validatable.ExceptionCustomizations, "User shouldn't be using Facebook on Chrome.");
}
return ref validatable;
}
}
}
```
This will behave as following:
```csharp
user.Throw()
.IfUsesFacebookOnChrome(); // System.ArgumentException: User shouldn't be using Facebook on Chrome. (Parameter 'user')
```
```csharp
user.Throw("A different message.")
.IfUsesFacebookOnChrome(); // System.ArgumentException: A different message. (Parameter 'user')
```
```csharp
user.Throw(() => new Exception("A different exception."))
.IfUsesFacebookOnChrome(); // System.Exception: A different exception.
```
```csharp
user.Throw(paramName => new Exception($"A different exception. Param name: '{paramName}'"))
.IfUsesFacebookOnChrome(); // System.Exception: A different exception. Param name: 'user'
```
# Conditional compilation
Have a `Throw()` rule that you want to exclude from your release build?
Simply add `OnlyInDebug()` to the rule and it will be excluded from non-debug builds.
```csharp
"foo".Throw().IfEquals("foo").OnlyInDebug();
```
```bash
dotnet run -c Debug # will throw
```
```bash
dotnet run -c Release # won't throw
```
# Upcoming features
- More extension methods: Many more rules to come! Please contribute!
# Contribution
Feel free to open an issue with any idea, bug, or feature request.
We are trying to be the fastest validation library, so if you have suggestions on improving the runtime speed, share them with us.
# Credits
- [Dawn.Guard](https://github.com/safakgur/guard) - An awesome, fast, and intuitive guard clause library for C#. Was a great inspiration for this library.
# License
This project is licensed under the terms of the [MIT](https://github.com/amantinband/throw/blob/main/LICENSE) license.
| A simple, fluent, extensible, and fully customizable library for throwing exceptions for projects using .NET 6+ | argument,guard,clause,exception,contract,assert,assertion,validation,fluent | 0 | 12 | 40 | 75 | 11 | 3 | 2 |
lisonge/vite-plugin-monkey | # vite-plugin-monkey
<p>
<a href="https://www.npmjs.com/package/vite-plugin-monkey"><img src="https://img.shields.io/npm/v/vite-plugin-monkey.svg" alt="npm package"></a>
<a href="https://github.com/lisonge/vite-plugin-monkey/releases/"><img src="https://img.shields.io/node/v/vite-plugin-monkey.svg" alt="node compatibility"></a>
</p>
[README](README.md) | [中文文档](README_zh.md)
A vite plugin server and build your.user.js for userscript engine like [Tampermonkey](https://www.tampermonkey.net/) and [Violentmonkey](https://violentmonkey.github.io/), [Greasemonkey](https://www.greasespot.net/), [ScriptCat](https://docs.scriptcat.org/)
## Feature
- support Tampermonkey, Violentmonkey, Greasemonkey, ScriptCat, etc
- inject userscript comment to build bundle
- auto open \*.user.js in default browser when userscript change
- external cdn url inject to userscript @require
- external module inject to userscript @resource
- use GM_api by ESM import with type hints
- intelligently collect GM_api that is used and automatically configure userscript @grant comment
- support `top level await` and `dynamic import` in single file
- when vite preview, auto open browser install dist.user.js
- full typescript support and vite feature
## Quick Start
just like vite create
```shell
pnpm create monkey
# npm create monkey
# yarn create monkey
```
then you can choose the following template
| JavaScript | TypeScript |
| -------------------------------------------------------------- | -------------------------------------------------------------------- |
| [empty](/packages/create-monkey/template-empty) (only js) | [empty-ts](/packages/create-monkey/template-empty-ts) (only ts) |
| [vanilla](/packages/create-monkey/template-vanilla) (js + css) | [vanilla-ts](/packages/create-monkey/template-vanilla-ts) (ts + css) |
| [vue](/packages/create-monkey/template-vue) | [vue-ts](/packages/create-monkey/template-vue-ts) |
| [react](/packages/create-monkey/template-react) | [react-ts](/packages/create-monkey/template-react-ts) |
| [preact](/packages/create-monkey/template-preact) | [preact-ts](/packages/create-monkey/template-preact-ts) |
| [svelte](/packages/create-monkey/template-svelte) | [svelte-ts](/packages/create-monkey/template-svelte-ts) |
| [solid](/packages/create-monkey/template-solid) | [solid-ts](/packages/create-monkey/template-solid-ts) |
<details open>
<summary>Sample: Initializing a Template</summary>
![vue-ts](https://user-images.githubusercontent.com/38517192/191197238-214abda1-f54f-4042-a046-2d7e6cf697a2.gif)
</details>
<details open>
<summary>Sample: Hot Module Replacement</summary>
![hmr](https://user-images.githubusercontent.com/38517192/191197411-3d6f3795-e842-4cc1-a494-5d5f8425fd15.gif)
</details>
<details open>
<summary>Sample: Build & Preview</summary>
![build&preview](https://user-images.githubusercontent.com/38517192/191197542-9c763af0-de2e-4a85-88c6-75a6d5924af9.gif)
</details>
## Installation
```shell
pnpm add -D vite-plugin-monkey
# npm i -D vite-plugin-monkey
# yarn add -D vite-plugin-monkey
```
note: vite-plugin-monkey must be the `last item` of plugin list
```mermaid
graph LR;
A(your code) -- "others plugins/vite build" -->B(esm)
B -- "vite-plugin-monkey/vite build library mode" --> C{has DynamicImport}
C -- yes --> D(systemjs)
C -- no --> E(iife)
```
## Config
<!-- template-start-MonkeyOption -->
[MonkeyOption](/packages/vite-plugin-monkey/src/node/types.ts#L120)
<details open>
<summary>MonkeyOption Type</summary>
```ts
export type MonkeyOption = {
/**
* userscript entry file path
*/
entry: string;
userscript?: MonkeyUserScript;
format?: Format;
/**
* alias of vite-plugin-monkey/dist/client
* @default '$'
* @example
* // vite-env.d.ts for type hint
*
* // if you use default value `$`
* /// <reference types="vite-plugin-monkey/client" />
*
* // if you use other_alias
* declare module other_alias {
* export * from 'vite-plugin-monkey/dist/client';
* }
*/
clientAlias?: string;
server?: {
/**
* auto open install url in default browser when userscript comment change
*
* and set `viteConfig.server.open ??= monkeyConfig.server.open`
* @default
* process.platform == 'win32' || process.platform == 'darwin' // if platform is Win/Mac
*/
open?: boolean;
/**
* name prefix, distinguish server.user.js and build.user.js in monkey extension install list, if you not want prefix, set false
* @default 'server:'
*/
prefix?: string | ((name: string) => string) | false;
/**
* mount GM_api to unsafeWindow, not recommend it, you should use GM_api by ESM import, or use [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import)
* @default false
* @example
* // if set true, you can use `vite-plugin-monkey/global` for type hint
* // vite-env.d.ts
* /// <reference types="vite-plugin-monkey/global" />
*/
mountGmApi?: boolean;
};
build?: {
/**
* build bundle userscript file name
*
* it should end with '.user.js'
* @default (package.json.name??'monkey')+'.user.js'
*/
fileName?: string;
/**
* build bundle userscript comment file name, this file is only include comment
*
* it can be used by userscript.updateURL, when checking for updates, just download this small file instead of downloading the entire script
*
* it should end with '.meta.js', if set false, will not generate this file
*
* if set true, will equal to fileName.replace(/\\.user\\.js$/,'.meta.js')
*
* @default false
*/
metaFileName?: string | boolean | ((fileName: string) => string);
/**
* this config can be array or object, array=Object.entries(object)
*
* if value is string or function, it or its return value is exportVarName
*
* if value is Array, the first [item or its return value] is exportVarName, the items after it all are url that is [require url]
*
* if module is unimported, plugin will not add require url to userscript
*
* @example
* { // map structure
* vue:'Vue',
* // if set this
* // you need manually set userscript.require = ['https://unpkg.com/vue@3.0.0/dist/vue.global.js'], when `vite build`
*
* vuex:['Vuex', (version, name)=>`https://unpkg.com/${name}@${version}/dist/vuex.global.js`],
* // plugin will auto add this url to userscript.require
*
* 'prettier/parser-babel': [
* 'prettierPlugins.babel',
* (version, name, importName) => {
* // name == `prettier`
* // importName == `prettier/parser-babel`
* const subpath = `${importName.split('/').at(-1)}.js`;
* return `https://cdn.jsdelivr.net/npm/${name}@${version}/${subpath}`;
* },
* ],
* // sometimes importName deffers from package name
* }
* @example
* [ // array structure, this example come from [playground/ex-vue-demi](https://github.com/lisonge/vite-plugin-monkey/tree/main/playground/ex-vue-demi)
* [
* 'vue',
* cdn
* .jsdelivr('Vue', 'dist/vue.global.prod.js')
* .concat('https://unpkg.com/vue-demi@latest/lib/index.iife.js')
* .concat(
* await util.fn2dataUrl(() => {
* window.Vue = Vue;
* }),
* ),
* ],
* ['pinia', cdn.jsdelivr('Pinia', 'dist/pinia.iife.prod.js')],
* [
* 'element-plus',
* cdn.jsdelivr('ElementPlus', 'dist/index.full.min.js'),
* ],
* ]
*/
externalGlobals?: ExternalGlobals;
/**
* according to final code bundle, auto inject GM_* or GM.* to userscript comment grant
*
* tree shaking code, then if code.includes('GM_xxx'), add \@grant GM_xxx to userscript
* @default true
*/
autoGrant?: boolean;
/**
* @deprecated use [viteConfig.build.cssMinify](https://vitejs.dev/config/build-options.html#build-cssminify) in vite>=4.2.0
*
* now minifyCss will not work
*/
minifyCss?: boolean;
/**
* @example
* { // resourceName default value is pkg.importName
* 'element-plus/dist/index.css': pkg=>`https://unpkg.com/${pkg.name}@${pkg.version}/${pkg.resolveName}`,
* 'element-plus/dist/index.css': {
* resourceName: pkg=>pkg.importName,
* resourceUrl: pkg=>`https://unpkg.com/${pkg.name}@${pkg.version}/${pkg.resolveName}`,
* loader: pkg=>{ // there are default loaders that support [css, json, the assets that vite support, ?url, ?raw] file/name suffix
* const css = GM_getResourceText(pkg.resourceName);
* GM_addStyle(css);
* return css;
* },
* nodeLoader: pkg=>{
* return [
* `export default (()=>{`,
* `const css = GM_getResourceText(${JSON.stringify(pkg.resourceName)});`,
* `GM_addStyle(css);`,
* `return css;`,
* `})();`
* ].join('');
* },
* },
* 'element-plus/dist/index.css': [
* (version, name, importName, resolveName)=>importName,
* (version, name, importName, resolveName)=>`https://unpkg.com/${name}@${version}/${resolveName}`,
* // for compat externalGlobals cdn function, if (version/name/importName/resolveName) == '', plugin will use their own default values
* ],
* 'element-plus/dist/index.css': cdn.jsdelivr(),
* }
*/
externalResource?: ExternalResource;
/**
* when use dynamic-import, plugin will use systemjs build your code
*
* `cdn.jsdelivr()[1]` example -> [dynamic-import.user.js](https://github.com/lisonge/vite-plugin-monkey/blob/7645b185605faf9b48c43116db5ea01726188e03/playground/dynamic-import/dist/dynamic-import.user.js)
*
* `'inline'` exmple -> [test-v3.user.js](https://github.com/lisonge/vite-plugin-monkey/blob/7645b185605faf9b48c43116db5ea01726188e03/playground/test-v3/dist/test-v3.user.js)
*
* @default
* cdn.jsdelivr()[1]
*/
systemjs?: 'inline' | ModuleToUrlFc;
/**
* @default
* const defaultFc = () => {
* return (e: string) => {
* if (typeof GM_addStyle == 'function') {
* GM_addStyle(e);
* return;
* }
* const o = document.createElement('style');
* o.textContent = e;
* document.head.append(o);
* };
* };
* @example
* const defaultFc1 = () => {
* return (e: string) => {
* const o = document.createElement('style');
* o.textContent = e;
* document.head.append(o);
* };
* };
* const defaultFc2 = (css:string)=>{
* const t = JSON.stringify(css)
* return `(e=>{const o=document.createElement("style");o.textContent=e,document.head.append(o)})(${t})`
* }
*/
cssSideEffects?: (
css: string,
) => IPromise<string | ((css: string) => void)>;
};
};
```
</details>
<!-- template-end-MonkeyOption -->
## CDN util for external
```ts
import { defineConfig } from 'vite';
import monkey, { cdn } from 'vite-plugin-monkey';
export default defineConfig({
plugins: [
monkey({
build: {
externalGlobals: {
react: cdn.jsdelivr('React', 'umd/react.production.min.js'),
},
externalResource: {
'element-plus/dist/index.css': cdn.jsdelivr(),
},
},
}),
],
});
```
there is the following cdn to use, full detail see [cdn.ts](/packages/vite-plugin-monkey/src/node/cdn.ts)
- [jsdelivr](https://www.jsdelivr.com/)
- [unpkg](https://unpkg.com/)
- [bytecdntp](https://cdn.bytedance.com/)
- [bootcdn](https://www.bootcdn.cn/all/)
- [baomitu](https://cdn.baomitu.com/)
- [staticfile](https://staticfile.org/)
- [cdnjs](https://cdnjs.com/libraries)
- [zhimg](https://unpkg.zhimg.com/)
- [npmmirror](https://registry.npmmirror.com/)
if you want use other cdn, you can see [external-scripts](https://greasyfork.org/help/external-scripts)
## Minify
because of the [code-rules](https://greasyfork.org/en/help/code-rules) of greasyfork
> Code posted to Greasy Fork must not be obfuscated or minified
so plugin will change the default value of [viteConfig.build.minify](https://cn.vitejs.dev/config/build-options.html#build-minify) to `false`
if you want to enable minify, just set `viteConfig.build.minify=true`
## GM_api usage
### ESM usage
we can use GM_api by esm module
```ts
// main.ts
import { GM_cookie, unsafeWindow, monkeyWindow, GM_addElement } from '$';
// $ is the default alias of vite-plugin-monkey/dist/client
// if you want use 'others', set monkeyConfig.clientAlias='others'
// whatever it is serve or build mode, monkeyWindow is always the window of [UserScript Scope]
console.log(monkeyWindow);
GM_addElement(document.body, 'div', { innerHTML: 'hello' });
// whatever it is serve or build mode, unsafeWindow is always host window
if (unsafeWindow == window) {
console.log('scope->host, host esm scope');
} else {
console.log('scope->monkey, userscript scope');
}
GM_cookie.list({}, (cookies, error) => {
if (error) {
console.log(error);
} else {
const [cookie] = cookies;
if (cookie) {
console.log(cookie);
}
}
});
```
### Global variables usage
set `monkeyConfig.server.mountGmApi=true`
```ts
// vite.config.ts
import { defineConfig } from 'vite';
import monkey from 'vite-plugin-monkey';
export default defineConfig({
plugins: [
monkey({
// ...
server: { mountGmApi: true },
}),
],
});
```
GM_api will mount to the property of `host window/globalThis`
```ts
// main.ts
console.log(GM_cookie == globalThis.GM_cookie);
console.log({ GM_cookie, unsafeWindow, monkeyWindow, GM_addElement });
```
### Auto import usage
use [unplugin-auto-import](https://github.com/antfu/unplugin-auto-import)
```ts
// vite.config.ts
import { defineConfig } from 'vite';
import monkey, { util } from 'vite-plugin-monkey';
import AutoImport from 'unplugin-auto-import/vite';
export default defineConfig({
plugins: [
AutoImport({
imports: [util.unimportPreset],
}),
monkey({
// ...
}),
],
});
```
```ts
// main.ts
// auto import example
console.log({ GM_cookie, unsafeWindow, monkeyWindow, GM_addElement });
```
## Example
test examples, see [/playground](/playground)
and preact/react/svelte/vanilla/vue/solid examples, see [create-monkey](/packages/create-monkey)
## Some note
### Work with other plugins
plugin will rebuild your code by [generateBundle](https://rollupjs.org/plugin-development/#generatebundle) hook
please ensure that the order of the plugin is **the last one**
### [CSP](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP)
in `vite serve` mode, the code entry is added as script to target host document.head, code need work between two origins
but the browser will prevent the execution of this script according to the CSP strategy
now just use browser extension [Disable-CSP](https://github.com/lisonge/Disable-CSP)
### Mixed IIFE and UMD at @require
the variable declared by `var` from iife-cdn will not become the property of window at monkeyWindow scope, because monkeyWindow scope is not global scope
so if an umd lib is dependent on an iife lib, such as `element-plus` is dependent on `vue`, `element-plus` cdn will not work
detail see [issues/5](https://github.com/lisonge/vite-plugin-monkey/issues/5) or [greasyfork#1084](https://github.com/JasonBarnabe/greasyfork/issues/1084)
the solution is that we append a dataUrl script that will set iife-variable as the property of window after iife-cdn
```ts
import { defineConfig } from 'vite';
import monkey, { cdn, util } from 'vite-plugin-monkey';
export default defineConfig(async ({ command, mode }) => ({
plugins: [
monkey({
// ...
build: {
externalGlobals: {
vue: cdn
.jsdelivr('Vue', 'dist/vue.global.prod.js')
.concat(util.dataUrl(';window.Vue=Vue;')),
'element-plus': cdn.jsdelivr('ElementPlus', 'dist/index.full.min.js'),
},
},
}),
],
}));
```
### Polyfill
when plugin works with vite legacy, it is necessary to set `renderLegacyChunks=false`
```ts
// vite.config.ts
import legacy from '@vitejs/plugin-legacy';
import { defineConfig } from 'vite';
import monkey from 'vite-plugin-monkey';
export default defineConfig({
plugins: [
legacy({
renderLegacyChunks: false,
modernPolyfills: true,
}),
monkey({
entry: './src/main.ts',
}),
],
});
```
## How to Properly Build a Library Using GM_api
If you want to encapsulate GM_api to build a library for others to use
The previous practice generally involved accessing GM_api as a global variable directly in the library code and then referencing and loading it in userscript through `@require`.
However, this approach does not allow us to manage this dependency through npm or other package managers, and it is not compatible with the usage of ESM GM_api in vite-plugin-monkey.
Now, you only need to import GM_api normally from `vite-plugin-monkey/dist/client` in your library code. Modify your build config and exclude `vite-plugin-monkey/dist/client`.
This way, you can build a library that can be used in vite-plugin-monkey. Users of this library only need to install it via npm and use it normally with `import`.
Of course, if you directly bundle `vite-plugin-monkey/dist/client` into the build artifact, the library can also be referenced directly through `@require`.
However, to make the build artifact more concise, it is recommended that you redirect `vite-plugin-monkey/dist/client` to `vite-plugin-monkey/dist/native` during the build.
Below is an example using tsup to simultaneously package ESM and IIFE formats. ESM is provided to vite-plugin-monkey users, and IIFE is provided to users who want to reference it through `@require`.
Additionally, the IIFE format can also be used as a configuration for vite-plugin-monkey's externalGlobals to reduce the size of the build artifact.
```ts
// /src/index.ts
import { GM_setValue } from 'vite-plugin-monkey/dist/client';
export const setValue = (name: string, value: unknown) => {
console.log('you invoke setValue', name, value);
GM_setValue(name, value);
};
```
```ts
// tsup.config.ts
import { defineConfig } from 'tsup';
const outExtension = (ctx: { format: 'esm' | 'cjs' | 'iife' }) => ({
js: { esm: '.mjs', cjs: '.cjs', iife: '.iife.js' }[ctx.format],
});
export default defineConfig([
{
// for vite import
entry: ['src/index.ts'],
outDir: 'dist',
sourcemap: true,
platform: 'browser',
outExtension,
dts: true,
format: ['esm'],
external: ['vite-plugin-monkey/dist/client'],
},
{
// for userscript @require
entry: ['src/index.ts'],
outDir: 'dist',
sourcemap: true,
platform: 'browser',
outExtension,
dts: false,
format: ['iife'],
minify: true,
globalName: `GmExtra`,
target: 'es2015',
esbuildOptions: (options) => {
options.alias = {
'vite-plugin-monkey/dist/client': 'vite-plugin-monkey/dist/native',
};
},
},
]);
```
## Contribution
please commit your changes to [dev](https://github.com/lisonge/vite-plugin-monkey/tree/dev) branch
| A vite plugin server and build your.user.js for userscript engine like Tampermonkey, Violentmonkey, Greasemonkey, ScriptCat | vite,vite-plugin,tampermonkey,violentmonkey,greasemonkey,rollupjs,userscript,scriptcat | 136 | 9 | 19 | 593 | 3 | 2 | 2 |
yuru7/udev-gothic | # UDEV Gothic
UDEV Gothic は、ユニバーサルデザインフォントの [BIZ UDゴシック](https://github.com/googlefonts/morisawa-biz-ud-gothic) と、 開発者向けフォントの [JetBrains Mono](https://github.com/JetBrains/JetBrainsMono) を合成した、プログラミング向けフォントです。
BIZ UDゴシックの優れた機能美はそのままに、調和的で判読性の高い英数字を提供することを目指しています。
[👉 ダウンロード](https://github.com/yuru7/udev-gothic/releases/latest)
※「Assets」内の zip ファイルをダウンロードしてご利用ください。
> 💡 その他、公開中のプログラミングフォント
> - 日本語文字に源柔ゴシック、英数字部分に Hack を使った [**白源 (はくげん/HackGen)**](https://github.com/yuru7/HackGen)
> - 日本語文字に IBM Plex Sans JP、英数字部分に IBM Plex Mono を使った [**PlemolJP (プレモル ジェイピー)**](https://github.com/yuru7/PlemolJP)
> - 日本語文字に源真ゴシック、英数字部分に Fira Mono を使った [**Firge (ファージ)**](https://github.com/yuru7/Firge)
## 特徴
以下の特徴を備えています。
- モリサワ社の考えるユニバーサルデザインが盛り込まれたBIZ UDゴシック由来の読み易い日本語文字
- IntelliJ などの開発環境を提供することで知られる JetBrains 社が手掛けた JetBrains Mono 由来のラテン文字
- `0` を従来のドットゼロからスラッシュゼロにするなど、BIZ UDゴシックとさらに調和することを目指した。
- BIZ UDゴシック相当の IVS (異体字シーケンス) に対応 (対応している異体字リストは [こちら](https://raw.githubusercontent.com/yuru7/udev-gothic/main/doc/ivs.txt))
- 全角スペースの可視化
- 収録される文字の違い等によって分かれた複数のバリエーションを用意 (下記参照)
### バリエーション
| 種類 | 説明 | 命名パターン |
| --- | --- | --- |
| 文字幅比率 半角1:全角2 | JetBrains Mono を縮小することで、半角1:全角2の文字幅比率となるように合成したバリエーション。 | `UDEVGothic*-*.ttf`<br>※ファイル名に `35` が含まれて **いない** もの |
| 文字幅比率 半角3:全角5 | JetBrains Mono を縮小せずに合成し、半角3:全角5の文字幅比率としたバリエーション。半角1:全角2と比べ、英数字などの半角文字がゆとりのある幅で表示される。| `UDEVGothic35*-*.ttf`<br>※ファイル名に `35` が含まれて **いる** もの |
| 日本語文書向け | 日本語文書で頻出する記号類 ( `← ↓ ↑ → □ ■ …` など) がBIZ UDゴシックの全角記号で表示される。 ※通常版の UDEV Gothic では、JetBrains Mono のグリフが優先されるため半角で表示される。 (全角表示されるようになる記号一覧は [こちら](doc/JPDOC.txt)) | `UDEVGothic*JPDOC*-*.ttf`<br>※ファイル名に `JPDOC` が含まれたもの |
| リガチャ対応版 | JetBrains Mono に含まれるリガチャに対応したバリエーション。 | `UDEVGothic*LG*-*.ttf`<br>※ファイル名に `LG` が含まれたもの |
| Nerd Fonts 対応版 | [Nerd Fonts](https://www.nerdfonts.com/) を追加合成したバリエーション。拡張Powerline記号など、お洒落なターミナルで利用される記号を収録。 | `UDEVGothic*NF*-*.ttf`<br>※ファイル名に `NF` が含まれたもの |
## 表示サンプル
| 通常版 (幅比率 半角1:全角2) | 35版 (幅比率 半角3:全角5) |
| :---: | :---: |
| ![image](https://user-images.githubusercontent.com/13458509/163554505-af07d1b1-574a-42a0-a7c4-01cccef75537.png) | ![image](https://user-images.githubusercontent.com/13458509/163554472-de0ebb09-9f82-4d61-8c68-51dbc938858a.png) |
| リガチャ ON | リガチャ OFF |
| :---: | :---: |
| ![image](https://user-images.githubusercontent.com/13458509/159891788-b97865ee-9b94-4691-b44e-f39f55a8bdef.png) | ![image](https://user-images.githubusercontent.com/13458509/159892000-99b356e5-42d0-4007-85eb-424abc386a05.png) |
## ビルド
- fontforge: `20230101` \[[Windows](https://fontforge.org/en-US/downloads/windows/)\] \[[Linux](https://fontforge.org/en-US/downloads/gnulinux/)\]
- Python: `>=3.12`
### Windows (PowerShell Core)
```sh
# 必要パッケージのインストール
pip install -r requirements.txt
# ビルド
& "C:\Program Files (x86)\FontForgeBuilds\bin\ffpython.exe" .\fontforge_script.py && python3 .\fonttools_script.py
```
## ライセンス
SIL OPEN FONT LICENSE Version 1.1 が適用され、商用・非商用問わず利用可能です。
詳細は [LICENSE](https://raw.githubusercontent.com/yuru7/udev-gothic/main/LICENSE) を参照
| UDEV Gothic は、ユニバーサルデザインフォントのBIZ UDゴシックと、 開発者向けフォントの JetBrains Mono を合成した、プログラミング向けフォントです。 | null | 18 | 1 | 0 | 102 | 4 | 2 | 0 |
rotemtzaban/STIT | # STIT - Stitch it in Time
[![arXiv](https://img.shields.io/badge/arXiv-2201.08361-b31b1b.svg)](https://arxiv.org/abs/2201.08361)
[![CGP](https://img.shields.io/badge/CGP-Paper%20Summary-blueviolet)](https://www.casualganpapers.com/hiqh_quality_video_editing_stylegan_inversion/Stitch-It-In-Time-explained.html) [![WAI](https://img.shields.io/badge/WhatsAI-Paper%20Summary-blueviolet)](https://www.louisbouchard.ai/stitch-it-in-time/)
[[Project Page](https://stitch-time.github.io/)]
> **Stitch it in Time: GAN-Based Facial Editing of Real Videos**<br>
> Rotem Tzaban, Ron Mokady, Rinon Gal, Amit Bermano, Daniel Cohen-Or <br>
>**Abstract**: <br>
> The ability of Generative Adversarial Networks to encode rich semantics within their latent space has been widely adopted for facial image editing. However, replicating their success with videos has proven challenging. Sets of high-quality facial videos are lacking, and working with videos introduces a fundamental barrier to overcome - temporal coherency. We propose that this barrier is largely artificial. The source video is already temporally coherent, and deviations from this state arise in part due to careless treatment of individual components in the editing pipeline. We leverage the natural alignment of StyleGAN and the tendency of neural networks to learn low frequency functions, and demonstrate that they provide a strongly consistent prior. We draw on these insights and propose a framework for semantic editing of faces in videos, demonstrating significant improvements over the current state-of-the-art. Our method produces meaningful face manipulations, maintains a higher degree of temporal consistency, and can be applied to challenging, high quality, talking head videos which current methods struggle with.
## Requirements
- Pytorch(tested with 1.10, should work with 1.8/1.9 as well) + torchvision, Follow <https://pytorch.org/>
for pytorch installation instructions.
- CUDA toolkit 11.0 or later. Make sure you have the requirements listed here:
<https://github.com/NVlabs/stylegan2-ada-pytorch#requirements>
- For the rest of the requirements, use: ```pip install -r requirements.txt```
- To perform StyleCLIP edits, install clip with:
```
pip install git+https://github.com/openai/CLIP.git
```
### Pretrained models
In order to use this project you need to download pretrained models from the following
[Link](https://drive.google.com/file/d/1cDvUHPTZQAEWvfiK9C0nDuI9C3Qdgbbp/view?usp=sharing).
Unzip it inside the project's main directory.
You can use the download_models.sh script (requires installing gdown with `pip install gdown`)
Alternatively, you can unzip the models to a location of your choice and update `configs/path_config.py` accordingly.
## Splitting videos into frames
Our code expects videos in the form of a directory with individual frame images.
To produce such a directory from an existing video, we recommend using ffmpeg:
```
ffmpeg -i "video.mp4" "video_frames/out%04d.png"
```
## Example Videos
The videos used to produce our results can be downloaded from the following
[Link](https://drive.google.com/file/d/1ZzpUJSq3Z8ZU8MKfvZ8w8MayMDxLBEy1/view?usp=sharing).
## Inversion
To invert a video run:
```
python train.py --input_folder /path/to/images_dir \
--output_folder /path/to/experiment_dir \
--run_name RUN_NAME \
--num_pti_steps NUM_STEPS
```
This includes aligning, cropping, e4e encoding and PTI
For example:
```
python train.py --input_folder /data/obama \
--output_folder training_results/obama \
--run_name obama \
--num_pti_steps 80
```
Weights and biases logging is disabled by default. to enable, add --use_wandb
## Naive Editing
To run edits without stitching tuning:
```
python edit_video.py --input_folder /path/to/images_dir \
--output_folder /path/to/experiment_dir \
--run_name RUN_NAME \
--edit_name EDIT_NAME \
--edit_range EDIT_RANGE
```
edit_range determines the strength of the edits applied.
It should be in the format RANGE_START RANGE_END RANGE_STEPS.
for example, if we use `--edit_range 1 5 2`,
we will apply edits with strength 1, 3 and 5.
For young Obama use:
```
python edit_video.py --input_folder /data/obama \
--output_folder edits/obama/ \
--run_name obama \
--edit_name age \
--edit_range -8 -8 1 \
```
## Editing + Stitching Tuning
To run edits with stitching tuning:
```
python edit_video_stitching_tuning.py --input_folder /path/to/images_dir \
--output_folder /path/to/experiment_dir \
--run_name RUN_NAME \
--edit_name EDIT_NAME \
--edit_range EDIT_RANGE \
--outer_mask_dilation MASK_DILATION
```
We support early breaking the stitching tuning process, when the loss reaches a specified threshold.
This enables us to perform more iterations for difficult frames while maintaining a reasonable running time.
To use this feature, add ```--border_loss_threshold THRESHOLD``` to the command(Shown in the Jim and Kamala Harris examples below).
For videos with a simple background to reconstruct (e.g Obama, Jim, Emma Watson, Kamala Harris), we use ```THRESHOLD=0.005```.
For videos where a more exact reconstruction of the background is required (e.g Michael Scott), we use ```THRESHOLD=0.002```.
Early breaking is disabled by default.
For young Obama use:
```
python edit_video_stitching_tuning.py --input_folder /data/obama \
--output_folder edits/obama/ \
--run_name obama \
--edit_name age \
--edit_range -8 -8 1 \
--outer_mask_dilation 50
```
For gender editing on Obama use:
```
python edit_video_stitching_tuning.py --input_folder /data/obama \
--output_folder edits/obama/ \
--run_name obama \
--edit_name gender \
--edit_range -6 -6 1 \
--outer_mask_dilation 50
```
For young Emma Watson use:
```
python edit_video_stitching_tuning.py --input_folder /data/emma_watson \
--output_folder edits/emma_watson/ \
--run_name emma_watson \
--edit_name age \
--edit_range -8 -8 1 \
--outer_mask_dilation 50
```
For smile removal on Emma Watson use:
```
python edit_video_stitching_tuning.py --input_folder /data/emma_watson \
--output_folder edits/emma_watson/ \
--run_name emma_watson \
--edit_name smile \
--edit_range -3 -3 1 \
--outer_mask_dilation 50
```
For Emma Watson lipstick editing use: (done with styleclip global direction)
```
python edit_video_stitching_tuning.py --input_folder /data/emma_watson \
--output_folder edits/emma_watson/ \
--run_name emma_watson \
--edit_type styleclip_global \
--edit_name lipstick \
--neutral_class "Face" \
--target_class "Face with lipstick" \
--beta 0.2 \
--edit_range 10 10 1 \
--outer_mask_dilation 50
```
For Old + Young Jim use (with early breaking):
```
python edit_video_stitching_tuning.py --input_folder datasets/jim/ \
--output_folder edits/jim \
--run_name jim \
--edit_name age \
--edit_range -8 8 2 \
--outer_mask_dilation 50 \
--border_loss_threshold 0.005
```
For smiling Kamala Harris:
```
python edit_video_stitching_tuning.py \
--input_folder datasets/kamala/ \
--output_folder edits/kamala \
--run_name kamala \
--edit_name smile \
--edit_range 2 2 1 \
--outer_mask_dilation 50 \
--border_loss_threshold 0.005
```
## Example Results
With stitching tuning:
<video src="https://user-images.githubusercontent.com/24721699/153860260-a431379e-ebab-4777-844d-4900a448cf85.mp4" controls width=512></video>
Without stitching tuning:
<video src="https://user-images.githubusercontent.com/24721699/153860400-ba792b37-f8fc-431e-93c1-8751d7b2ea0e.mp4" controls width=512></video>
Gender editing:
<video src="https://user-images.githubusercontent.com/24721699/153861476-08e9ff12-0fb7-4f4f-9703-4611e5b78fca.mp4" controls width=512></video>
Young Emma Watson:
<video src="https://user-images.githubusercontent.com/24721699/153863426-1b2485f6-83ba-404b-8d74-f34675e02036.mp4" controls width=512></video>
Emma Watson with lipstick:
<video src="https://user-images.githubusercontent.com/24721699/153876897-745dcb21-cfcd-44fc-8644-7302d2b41b81.mp4" controls width=512></video>
Emma Watson smile removal:
<video src="https://user-images.githubusercontent.com/24721699/153864167-d5d428c8-706e-4925-a26a-8791812de94f.mp4" controls width=512></video>
Old Jim:
<video src="https://user-images.githubusercontent.com/24721699/153885229-a17561fb-c6d3-4cff-9f8b-c7bad40a5654.mp4" controls width=512></video>
Young Jim:
<video src="https://user-images.githubusercontent.com/24721699/153885371-0c47febf-7e58-4d6f-bf72-a0e1b1a47a60.mp4" controls width=512></video>
Smiling Kamala Harris:
<video src="https://user-images.githubusercontent.com/24721699/153889707-ed6c872a-941c-4e43-b31b-b934546d6b24.mp4" controls width=512></video>
## Out of domain video editing (Animations)
For editing out of domain videos, Some different parameters are required while training.
First, dlib's face detector doesn't detect all animated faces, so we use a different face detector provided by the [face_alignment package](https://github.com/1adrianb/face-alignment).
Second, we reduce the smoothing of the alignment parameters with ```--center_sigma 0.0```
Third, OOD videos require more training steps, as they are more difficult to invert.
To train, we use:
```
python train.py --input_folder datasets/ood_spiderverse_gwen/ \
--output_folder training_results/ood \
--run_name ood \
--num_pti_steps 240 \
--use_fa \
--center_sigma 0.0
```
Afterwards, editing is performed the same way:
```
python edit_video.py --input_folder datasets/ood_spiderverse_gwen/ \
--output_folder edits/ood \
--run_name ood \
--edit_name smile \
--edit_range 2 2 1
```
<video src="https://user-images.githubusercontent.com/24721699/153874953-1b840a07-4b25-4866-b0bf-e19fabffa989.mp4" controls width=512></video>
```
python edit_video.py --input_folder datasets/ood_spiderverse_gwen/ \
--output_folder edits/ood \
--run_name ood \
--edit_type styleclip_global \
--edit_range 10 10 1 \
--edit_name lipstick \
--target_class 'Face with lipstick'
```
<video src="https://user-images.githubusercontent.com/24721699/153875508-7eecfa4b-3529-40ef-83ae-80a02f3b5ec4.mp4" controls width=512></video>
## Credits:
**StyleGAN2-ada model and implementation:**
https://github.com/NVlabs/stylegan2-ada-pytorch
Copyright © 2021, NVIDIA Corporation.
Nvidia Source Code License https://nvlabs.github.io/stylegan2-ada-pytorch/license.html
**PTI implementation**:
https://github.com/danielroich/PTI
Copyright (c) 2021 Daniel Roich
License (MIT) https://github.com/danielroich/PTI/blob/main/LICENSE
**LPIPS model and implementation:**
https://github.com/richzhang/PerceptualSimilarity
Copyright (c) 2020, Sou Uchida
License (BSD 2-Clause) https://github.com/richzhang/PerceptualSimilarity/blob/master/LICENSE
**e4e model and implementation:**
https://github.com/omertov/encoder4editing
Copyright (c) 2021 omertov
License (MIT) https://github.com/omertov/encoder4editing/blob/main/LICENSE
**StyleCLIP model and implementation:**
https://github.com/orpatashnik/StyleCLIP
Copyright (c) 2021 orpatashnik
License (MIT) https://github.com/orpatashnik/StyleCLIP/blob/main/LICENSE
**StyleGAN2 Distillation for Feed-forward Image Manipulation - for editing directions:**
https://github.com/EvgenyKashin/stylegan2-distillation
Copyright (c) 2019, Yandex LLC
License (Creative Commons NonCommercial) https://github.com/EvgenyKashin/stylegan2-distillation/blob/master/LICENSE
**face-alignment Library:**
https://github.com/1adrianb/face-alignment
Copyright (c) 2017, Adrian Bulat
License (BSD 3-Clause License) https://github.com/1adrianb/face-alignment/blob/master/LICENSE
**face-parsing.PyTorch:**
https://github.com/zllrunning/face-parsing.PyTorch
Copyright (c) 2019 zll
License (MIT) https://github.com/zllrunning/face-parsing.PyTorch/blob/master/LICENSE
## Citation
If you make use of our work, please cite our paper:
```
@misc{tzaban2022stitch,
title={Stitch it in Time: GAN-Based Facial Editing of Real Videos},
author={Rotem Tzaban and Ron Mokady and Rinon Gal and Amit H. Bermano and Daniel Cohen-Or},
year={2022},
eprint={2201.08361},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
```
| null | null | 0 | 3 | 2 | 17 | 32 | 1 | 0 |
1amSimp1e/dots | <div align="center">
<img alt="Profiles Pictures" src="https://raw.githubusercontent.com/iamverysimp1e/dots/main/ScreenShots/Other/profiles.png" width="200" height="200"/>
</div>
<div align="center">
<h3> 1amSimp1e's Dot Files 📁</h3>
<img src="https://readme-typing-svg.herokuapp.com?font=Iosevka&weight=800&size=20&pause=1000&color=6791C9&background=0C0E0F¢er=true&vCenter=true&random=false&width=435&lines=The+Place+Of+Aesthetic+Customization"
</div>
![](https://img.shields.io/github/last-commit/iamverysimp1e/dots?&style=for-the-badge&color=8D748C&logoColor=D9E0EE&labelColor=252733)
![](https://img.shields.io/github/stars/iamverysimp1e/dots?style=for-the-badge&logo=starship&color=AB6C6A&logoColor=D9E0EE&labelColor=252733)
[![](https://img.shields.io/github/repo-size/iamverysimp1e/dots?color=%23DDB&label=SIZE&logo=codesandbox&style=for-the-badge&logoColor=D9E0EE&labelColor=252733)](https://github.com/1amSimp1e/dots)
<a href="https://github.com/iamverysimp1e/dots/blob/main/LICENSE">
<img alt="License" src="https://img.shields.io/github/license/iamverysimp1e/dots?style=for-the-badge&logo=starship&color=A1C999&logoColor=D9E0EE&labelColor=252733" />
</a>
<a href="https://github.com/iamverysimp1e/dots/issues">
<img alt="Issues" src="https://img.shields.io/github/issues/iamverysimp1e/dots?style=for-the-badge&logo=bilibili&color=5E81AC&logoColor=D9E0EE&labelColor=252733" />
</a>
</div>
# Contents 📚:
### **👻 Don't blindly use my setup. Use at your own risk!!!**
### Overview 🎑
- [🌿 Windows Manager]():
- [🍚 HyprLand](#hypr)
- [🍙 GNOME](#gnome)
- [👽 Terminal]():
- **☄ Emulator**:
- [kitty 😽](https://sw.kovidgoyal.net/kitty/)
- [Alacritty](https://alacritty.org/)
- [🌌 Shell](#shell):
- [Oh My Zsh](https://ohmyz.sh/#install)
- **Plugin Manager**: [Zap](https://www.zapzsh.org/)
- **🤖 Prompt**: [StarShip Prompt 🚀](https://starship.rs/guide/#%F0%9F%9A%80-installation)
# Hyprland 🍚<a name = "hypr"></a>:
## [Late Night🌃](https://github.com/1amSimp1e/dots/tree/late-night-%F0%9F%8C%83)
![](https://raw.githubusercontent.com/iamverysimp1e/dots/late-night-%F0%9F%8C%83/ScreenShots/HyprLand/preview.png)
## [Balcony🚊](https://github.com/1amSimp1e/dots/tree/balcony%F0%9F%9A%8A)
![](https://raw.githubusercontent.com/1amSimp1e/dots/balcony%F0%9F%9A%8A/ScreenShots/HyprLand/Rice.png)
## [Summer☀️ ](https://github.com/1amSimp1e/dots/tree/summer%E2%98%80%EF%B8%8F)
![](https://raw.githubusercontent.com/1amSimp1e/dots/summer%E2%98%80%EF%B8%8F/ScreenShots/summer.png)
## Credits
Thanks to:
- [r/unixporn community](https://www.reddit.com/r/unixporn/)
- [Hyprland Development Discord server](https://discord.com/invite/hQ9XvMUjjr)
</blockquote></details>
# GNOME 🍙<a name = "gnome"></a>:
![](https://raw.githubusercontent.com/iamverysimp1e/dots/main/ScreenShots/Gnome_Rice/Rice1.png)
![](https://raw.githubusercontent.com/iamverysimp1e/dots/main/ScreenShots/Gnome_Rice/Rice2.png)
![](https://raw.githubusercontent.com/iamverysimp1e/dots/main/ScreenShots/Gnome_Rice/Rice3.png)
<details><summary> Gnome configs </summary><blockquote>
- GTK Themes: Based on [AestheticStuff by Rxyhn](https://github.com/rxyhn/AestheticStuff)
- GTK Icons:[Papirus icons ](https://www.gnome-look.org/p/1166289)
- [Mutter Rounded (Optional)](https://github.com/yilozt/mutter-rounded): Windows manager for GNOME (for blur windows effect)
- [Gnome Shell Extensions](https://extensions.gnome.org/):
- [Aylur's Widget](https://extensions.gnome.org/extension/5338/aylurs-widgets/): Beautiful Plugins with customizable bar
- [Blur My Shell](https://extensions.gnome.org/extension/3193/blur-my-shell/): Blur the gnome shell
- [User Themes](https://extensions.gnome.org/extension/19/user-themes/): Load shell themes from user directories
- [Color Picker](https://extensions.gnome.org/extension/3396/color-picker/): The simple color picker for gnome shell
- [Compiz alike magic lamp effect](https://extensions.gnome.org/extension/3740/compiz-alike-magic-lamp-effect/): Magic lamp effect alike the macOS minimize effect
- [Extension List](https://extensions.gnome.org/extension/3088/extension-list/): A Simple Gnome shell extension manager in the top panel
- [Just Perfection](https://extensions.gnome.org/extension/3843/just-perfection/): SImple tweak tools to customize the gnome shell and disable some UI Features
- [Open Weather](https://extensions.gnome.org/extension/750/openweather/): A simple weather app for gnome shell
- [Sound Input & Output Device Chooser](https://extensions.gnome.org/extension/906/sound-output-device-chooser/):Shows a list of sound output and input devices (similar to gnome sound settings) in the status menu below the volume slider.
- [Unite](https://extensions.gnome.org/extension/1287/unite/): Remove the title bars of the windows for the minimalist in windows
- [Vitals](https://extensions.gnome.org/extension/1460/vitals/): A simple system monitor on the top bar
- [gtk title bar](https://extensions.gnome.org/extension/1732/gtk-title-bar/):remove title bar for non-gtk apps with minimal inference
- [Rounded Window Corners](https://extensions.gnome.org/extension/5237/rounded-window-corners/): Rounded corners for all windows
- Bar (based on [smooth by Aylur Themes ](https://github.com/Aylur/dotfiles/tree/main/Smooth/gnome-shell)):
**DISCLAIMER ⚠️: This bar color mod is still in progress and some color sections may not appear correctly if you want to contribute really grateful about that !**
- Install all of the Extensions above then copy .themes to ~/.themes
- Open Gnome tweaks -> Appearance -> Shell -> Choose Smooth
- Gnome tweaks (for apply themes and icons ) installation:
```fish
sudo apt update && sudo apt upgrade
sudo apt install gnome-tweaks
```
</blockquote></details>
</blockquote></details>
[![Star History Chart](https://api.star-history.com/svg?repos=1amSimp1e/dots&type=Date)](https://star-history.com/#1amSimp1e/dots&Date)
| Nothing here but Dotfiles & Customization 💫 | neovim,unix,dotfiles,gnome,unixporn,hyprland,rice,waybar,wayland,linux | 0 | 3 | 59 | 49 | 5 | 6 | 0 |
music-assistant/hass-music-assistant | # Music Assistant
[![latest version](https://img.shields.io/github/release/music-assistant/hass-music-assistant?display_name=tag&include_prereleases&label=latest%20version)](https://github.com/music-assistant/hass-music-assistant/releases)
[![discord](https://img.shields.io/discord/753947050995089438?label=Chat&logo=discord)](https://discord.gg/kaVm8hGpne)
[![hacs](https://img.shields.io/badge/HACS-Default-41BDF5?label=HACS)](https://github.com/hacs/integration)
[![sponsor](https://img.shields.io/github/sponsors/music-assistant?label=sponsors)](https://github.com/sponsors/music-assistant)
Turn your Home Assistant instance into a jukebox, hassle free streaming of your favourite media to Home Assistant media players.
## Introduction
Music Assistant is a music library manager for your offline and online music sources, combined with the power of Home Assistant to easily stream your favourite music to a wide range of supported players.
Music Assistant consists of multiple building blocks:
- Music Assistant Server (2.0): the core part that runs the Music Assistant engine and keeps track of your Music sources. This will be installed automatically as an addon in HAOS when installing the Integration. Alternatively, you can manually install the addon in HAOS or install the server in a separate docker container.
- Music Assistant integration for Home Assistant: Connects Home Assistant to your Music Assistant Server to automate your music!
- Home Assistant Plugin for Music Assistant: Import Home Assistant media players into the Music Assistant engine to use as targets for playback.
---
### Documentation
See here https://music-assistant.io
## Installation of the Music Assistant Server
MA requires a 64bit Operating System and a minimum of 2GB of RAM on the physical device or the container (physical devices are recommended to have 4GB+ if they are running anything else)
Installation instructions are here https://music-assistant.io/installation/
## Installation of the Home Assistant integration
See here https://music-assistant.io/integration/installation/
## OpenAI features
During [Chapter 5 of "Year of the Voice"](https://www.youtube.com/live/djEkgoS5dDQ?si=pt8-qYH3PTpsnOq9&t=3699), [JLo](https://blog.jlpouffier.fr/chatgpt-powered-music-search-engine-on-a-local-voice-assistant/) showed something he had been working on to use the OpenAI integration along with Music Assistant. We now have this feature baked in to the integration code directly, although some extra setup is still required.
See the instructions here https://music-assistant.io/integration/installation/#openai-features
## I need help, I have feedback
- [Documentation](https://music-assistant.io)
- [Issue tracker](https://github.com/music-assistant/hass-music-assistant/issues) to create bug reports, please include detailed info and logfiles. Please check if your issue has already been reported.
- [Feature requests](https://github.com/music-assistant/hass-music-assistant/discussions/categories/feature-requests-and-ideas): Give your vote to an existing request, join the discussion or add a new request.
- [Q&A section](https://github.com/music-assistant/hass-music-assistant/discussions/categories/q-a-faq) Frequently asked questions and tutorials
- [Discord community](https://discord.gg/kaVm8hGpne) Join the community and get support!
## I want to help
See here https://music-assistant.io/help/
| Turn your Home Assistant instance into a jukebox, hassle free streaming of your favorite media to Home Assistant media players. | home-assistant,home-automation,music-library,music-player,homeassistant | 74 | 22 | 634 | 819 | 72 | 3 | 7 |
Chanda-Abdul/Several-Coding-Patterns-for-Solving-Data-Structures-and-Algorithms-Problems-during-Interviews | # Several Coding Patterns for Solving Data Structures and Algorithms Problems during Interviews
These are my notes in <b>Javascript</b> from a [course](https://www.educative.io/courses/grokking-the-coding-interview) that categorizes coding interview problems into a set of <b>16 patterns</b>.
| | |
|---|---|
| <b>[Pattern 1: Sliding Window](./✅%20%20Pattern%2001%20:%20Sliding%20Window.md)</b>|<b>[Pattern 9: Two Heaps](./✅%20🙃%20Pattern%2009:%20Two%20Heaps.md)</b> |
|<b>[Pattern 2: Two Pointer](./✅%20%20Pattern%2002:%20Two%20Pointers.md)</b>|<b>[Pattern 10: Subsets](./✅%20%20Pattern%2010:%20Subsets.md)</b>|
|<b>[Pattern 3: Fast & Slow pointers](./✅%20%20Pattern%2003:%20Fast%20%26%20Slow%20pointers.md)</b>|<b>[Pattern 11: Modified Binary Search](./✅%20%20Pattern%2011:%20Modified%20Binary%20Search.md)</b>|
|<b>[Pattern 4: Merge Intervals](./✅%20%20Pattern%2004%20:%20Merge%20Intervals.md)</b>|<b>[Pattern 12: Bitwise XOR](./✅%20Pattern%2012:%20%20Bitwise%20XOR.md)</b>|
|<b>[Pattern 5: Cyclic Sort](./✅%20%20Pattern%2005:%20Cyclic%20Sort.md)</b>|<b>[Pattern 13: Top 'K' Elements](./✅%20Pattern%2013:%20Top%20'K'%20Elements.md)</b>|
|<b>[Pattern 6: In-place Reversal of a LinkedList](./✅%20%20Pattern%2006:%20In-place%20Reversal%20of%20a%20LinkedList.md)</b>|<b>[Pattern 14: K-way merge](./%E2%9C%85%20Pattern%2014%3A%20K-way%20merge.md)</b>|
|<b>[Pattern 7: Tree Breadth First Search](./✅%20%20Pattern%2007:%20Tree%20Breadth%20First%20Search.md)</b>|<b>[Pattern 15: 0/1 Knapsack (Dynamic Programming)](./%E2%9C%85%20Pattern%2015:%200-1%20Knapsack%20(Dynamic%20Programming).md)</b>|
|<b>[Pattern 8: Depth First Search (DFS)](./✅%20%20Pattern%2008:Tree%20Depth%20First%20Search.md)</b>|<b>[Pattern 16: Topological Sort (Graph)](./%E2%9C%85%20Pattern%2016%3A%20%F0%9F%94%8E%20Topological%20Sort%20(Graph).md)</b>|
## Additional Resources
Here are a few other resources that I found helpful when learning <b>Data Structures and Algorithms</b> using <b>JavaScript</b>
- [Run JS](https://runjs.app/) - A JavaScript playground
for your desktop
- [Big O CheatSheet](https://www.bigocheatsheet.com/) - Reference for <b>Big-O</b> complexities of common algorithms
- [Blind 75](https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU) - For additional practice, the [Blind75 list](https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU) of interview questions is 🔥. I would approach the questions in [this order](https://www.techinterviewhandbook.org/best-practice-questions) or [this order](https://neetcode.io/) or [create a custom Blind75 study plan](https://www.techinterviewhandbook.org/grind75)
- [Edabit](https://edabit.com/) is a great resource if you need additional <b>Javascript</b> practice before you start using <b>leetcode</b>.
- [LeetCode](https://leetcode.com/problemset/all/) of course
😋
- [Pramp](https://www.pramp.com/) - for mock interviews
- [FreeCodeCamp's Algorithms](https://www.freecodecamp.org/learn/coding-interview-prep/#algorithms) - Extra practice, esp. the <b>Sort Algorithms</b> section.
- [Build 15 JavaScript Projects - Vanilla JavaScript Course](https://www.youtube.com/watch?v=3PHXvlpOkf4) - for extra <b>Vanilla JavaScript/DOM Manipulation</b> practice.
#
#### 🌟 Challenge Questions
#### 👩🏽🦯 Questions from <b>[Blind 75](https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU)</b>
#### 😐📖 Questions tagged <b>FaceBook/Meta</b>
#### 🌴 Questions tagged <b>Amazon</b>
#### 🔎 Questions tagged <b>Google</b>
## [Pattern 1: Sliding Window](./✅%20%20Pattern%2001%20:%20Sliding%20Window.md)
In many problems dealing with an array (or a <b>LinkedList</b>), we are asked to find or calculate something among all the contiguous subarrays (or sublists) of a given size. For example, take a look at this problem:
> Given an array, find the average of all contiguous subarrays of size `K` in it.
Lets understand this problem with a real input:
`Array: [1, 3, 2, 6, -1, 4, 1, 8, 2], K=5`
A <b>brute-force</b> algorithm will calculate the sum of every 5-element contiguous subarray of the given array and divide the sum by 5 to find the average.
The efficient way to solve this problem would be to visualize each contiguous subarray as a sliding window of `5` elements. This means that we will slide the window by one element when we move on to the next subarray. To reuse the sum from the previous subarray, we will subtract the element going out of the window and add the element now being included in the sliding window. This will save us from going through the whole subarray to find the sum and, as a result, the algorithm complexity will reduce to `O(N)`.
## [Pattern 2: Two Pointer](./✅%20%20Pattern%2002:%20Two%20Pointers.md)
In problems where we deal with sorted arrays (or <b>LinkedList</b>s) and need to find a set of elements that fulfill certain constraints, the [Two Pointers](./✅%20%20Pattern%2002:%20Two%20Pointers.md) approach becomes quite useful. The set of elements could be a pair, a triplet or even a subarray. For example, take a look at the following problem:
> Given an array of sorted `numbers` and a `target` sum, find a pair in the array whose sum is equal to the given `target`.
To solve this problem, we can consider each element one by one (pointed out by the first pointer) and iterate through the remaining elements (pointed out by the second pointer) to find a pair with the given sum. The time complexity of this algorithm will be `O(N^2)` where `n` is the number of elements in the input array.
Given that the input array is sorted, an efficient way would be to start with one pointer in the beginning and another pointer at the end. At every step, we will see if the numbers pointed by the <b> two pointers</b> add up to the target sum. If they do not, we will do one of two things:
1. If the sum of the two numbers pointed by the <b> two pointers</b> is greater than the target sum, this means that we need a pair with a smaller sum. So, to try more pairs, we can decrement the end-pointer.
2. If the sum of the two numbers pointed by the <b> two pointers</b> is smaller than the target sum, this means that we need a pair with a larger sum. So, to try more pairs, we can increment the start-pointer.
## [Pattern 3: Fast & Slow pointers](./✅%20%20Pattern%2003:%20Fast%20%26%20Slow%20pointers.md)
The <b>Fast & Slow</b> pointer approach, also known as the <b>Hare & Tortoise algorithm</b>, is a pointer algorithm that uses <b> two pointers</b> which move through the array (or sequence/<b>LinkedList</b>) at different speeds. This approach is quite useful when dealing with cyclic <b>LinkedList</b>s or arrays.
By moving at different speeds (say, in a cyclic <b>LinkedList</b>), the algorithm proves that the <b> two pointers</b> are bound to meet. The <i>fast pointer</i> should catch the <i>slow pointer</i> once both the pointers are in a cyclic loop.
One of the famous problems solved using this technique was [Finding a cycle in a <b>LinkedList</b>](https://github.com/Chanda-Abdul/Several-Coding-Patterns-for-Solving-Data-Structures-and-Algorithms-Problems-during-Interviews/blob/main/%E2%9C%85%20%20Pattern%2003:%20Fast%20%26%20Slow%20pointers.md#linkedlist-cycle-easy). Lets jump onto this problem to understand the <b>Fast & Slow</b> pattern.
## [Pattern 4: Merge Intervals](./✅%20%20Pattern%2004%20:%20Merge%20Intervals.md)
This pattern describes an efficient technique to deal with overlapping intervals. In a lot of problems involving intervals, we either need to find overlapping intervals or merge intervals if they overlap.
Given two intervals (`a` and `b`), there will be six distinct ways the two intervals can relate to each other:
1. `a` and `b`do not overlap
2. `a` and `b` overlap, `b` ends after `a`
3. `a` completely overlaps `b`
4. `a` and `b` overlap, `a` ends after `b`
5. `b` completly overlaps `a`
6. `a` and `b` do not overlap
Understanding the above six cases will help us in solving all intervals related problems.
![](./images/mergeintervals.png)
## [Pattern 5: Cyclic Sort](./✅%20%20Pattern%2005:%20Cyclic%20Sort.md)
This pattern describes an interesting approach to deal with problems involving arrays containing numbers in a given range. For example, take the following problem:
>You are given an unsorted array containing numbers taken from the range `1` to `n`. The array can have duplicates, which means that some numbers will be missing. Find all the missing numbers.
To efficiently solve this problem, we can use the fact that the input array contains numbers in the range of `1` to `n`.
For example, to efficiently sort the array, we can try placing each number in its correct place, i.e., placing `1` at index `0`, placing `2` at index `1`, and so on. Once we are done with the sorting, we can iterate the array to find all indices that are missing the correct numbers. These will be our required numbers.
## [Pattern 6: In-place Reversal of a LinkedList](./✅%20%20Pattern%2006:%20In-place%20Reversal%20of%20a%20LinkedList.md)
In a lot of problems, we are asked to reverse the links between a set of nodes of a <b>LinkedList</b>. Often, the constraint is that we need to do this <i>in-place</i>, i.e., using the existing node objects and without using extra memory.
<b><i>in-place</i> Reversal of a <b>LinkedList</b> pattern</b> describes an efficient way to solve the above problem.
## [Pattern 7: Tree Breadth First Search](./✅%20%20Pattern%2007:%20Tree%20Breadth%20First%20Search.md)
This pattern is based on the <b>Breadth First Search (BFS)</b> technique to traverse a tree.
Any problem involving the traversal of a tree in a level-by-level order can be efficiently solved using this approach. We will use a <b>Queue</b> to keep track of all the nodes of a level before we jump onto the next level. This also means that the space complexity of the algorithm will be `O(W)`, where `W` is the maximum number of nodes on any level.
## [Pattern 8: Depth First Search (DFS)](./✅%20%20Pattern%2008:Tree%20Depth%20First%20Search.md)
This pattern is based on the <b>Depth First Search (DFS)</b> technique to traverse a tree.
We will be using recursion (or we can also use a stack for the iterative approach) to keep track of all the previous (parent) nodes while traversing. This also means that the space complexity of the algorithm will be `O(H)`, where `H` is the maximum height of the tree.
## [Pattern 9: Two Heaps](./✅%20🙃%20Pattern%2009:%20Two%20Heaps.md)
In many problems, where we are given a set of elements such that we can divide them into two parts. To solve the problem, we are interested in knowing the smallest element in one part and the biggest element in the other part. This pattern is an efficient approach to solve such problems.
This pattern uses two <b>Heaps</b> to solve these problems; A <b>Min Heap</b> to find the smallest element and a <b>Max Heap</b> to find the biggest element.
<!-- ### ❗ NOTE
Although this course uses <b>Heaps</b> to solve <b>Top 'K' Elements</b> problems, <b>JavaScript</b> does not have a built in method for <b>Heaps/Priority Queues</b>. It can be very time consuming to implement a <b>Heap class</b> from scratch, especially during an interview. After reviewing the <i>JavaScript</i> solutions on <i>Leetcode</i> the most effecient way to solve a <b>Top 'K' Elements</b> problem is usually with <b>[QuickSort](https://github.com/Chanda-Abdul/leetcode/blob/master/0%20%E2%9D%97Sort%20Algorithms.md#-quick-sort)</b>, <b>[BinarySearch](https://github.com/Chanda-Abdul/leetcode/blob/master/0%20%E2%9D%97Sort%20Algorithms.md#binary-search)</b>, <b>[BucketSort](https://initjs.org/bucket-sort-in-javascript-dc040b8f0058)</b>, <b>[Greedy Algorithms](https://github.com/Chanda-Abdul/Grokking-Algorithm-Book-Notes/blob/main/8.%20Greedy%20Algoritms.md)</b>, or <b>[HashMaps](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)</b>. -->
## [Pattern 10: Subsets](./✅%20%20Pattern%2010:%20Subsets.md)
A huge number of coding interview problems involve dealing with <b>Permutations</b> and <b>Combinations</b> of a given set of elements. This pattern describes an efficient <b>Breadth First Search (BFS)</b> approach to handle all these problems.
## [Pattern 11: Modified Binary Search](./✅%20%20Pattern%2011:%20Modified%20Binary%20Search.md)
As we know, whenever we are given a sorted <b>Array</b> or <b>LinkedList</b> or <b>Matrix</b>, and we are asked to find a certain element, the best algorithm we can use is the <b>Binary Search</b>.
## [Pattern 12: Bitwise XOR](./✅%20Pattern%2012:%20%20Bitwise%20XOR.md)
<b>XOR</b> is a logical bitwise operator that returns `0` (false) if both bits are the same and returns `1` (true) otherwise. In other words, it only returns `1` if exactly one bit is set to `1` out of the two bits in comparison.
## [Pattern 13: Top 'K' Elements](./✅%20Pattern%2013:%20Top%20'K'%20Elements.md)
Any problem that asks us to find the <b>top/smallest/frequent `K` elements</b> among a given set falls under this pattern.
<!-- ### ❗ NOTE
Although this course uses <b>Heaps</b> to solve <b>Top 'K' Elements</b> problems, <b>JavaScript</b> does not have a built in method for <b>Heaps/Priority Queues</b>. It can be very time consuming to implement a <b>Heap class</b> from scratch, especially during an interview. After reviewing the <i>JavaScript</i> solutions on <i>Leetcode</i> the most effecient way to solve a <b>Top 'K' Elements</b> problem is usually with <b>[QuickSort](https://github.com/Chanda-Abdul/leetcode/blob/master/0%20%E2%9D%97Sort%20Algorithms.md#-quick-sort)</b>, <b>[BinarySearch](https://github.com/Chanda-Abdul/leetcode/blob/master/0%20%E2%9D%97Sort%20Algorithms.md#binary-search)</b>, <b>[BucketSort](https://initjs.org/bucket-sort-in-javascript-dc040b8f0058)</b>, <b>[Greedy Algorithms](https://github.com/Chanda-Abdul/Grokking-Algorithm-Book-Notes/blob/main/8.%20Greedy%20Algoritms.md)</b>, or <b>[HashMaps](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)</b>. -->
## [Pattern 14: K-way merge](./%E2%9C%85%20Pattern%2014%3A%20K-way%20merge.md)
This pattern helps us solve problems that involve a list of sorted arrays.
Whenever we are given `K` sorted arrays, we can use a <b>Heap</b> to efficiently perform a sorted traversal of all the elements of all arrays. We can push the smallest (first) element of each sorted array in a <b>Min Heap</b> to get the overall minimum. While inserting elements to the <b>Min Heap</b> we keep track of which array the element came from. We can, then, remove the top element from the heap to get the smallest element and push the next element from the same array, to which this smallest element belonged, to the heap. We can repeat this process to make a sorted traversal of all elements.
<!-- ### ❗ NOTE
Although this course uses <b>Heaps</b> to solve <b>Top 'K' Elements</b> problems, <b>JavaScript</b> does not have a built in method for <b>Heaps/Priority Queues</b>. It can be very time consuming to implement a <b>Heap class</b> from scratch, especially during an interview. After reviewing the <i>JavaScript</i> solutions on <i>Leetcode</i> the most effecient way to solve a <b>Top 'K' Elements</b> problem is usually with <b>[QuickSort](https://github.com/Chanda-Abdul/leetcode/blob/master/0%20%E2%9D%97Sort%20Algorithms.md#-quick-sort)</b>, <b>[BinarySearch](https://github.com/Chanda-Abdul/leetcode/blob/master/0%20%E2%9D%97Sort%20Algorithms.md#binary-search)</b>, <b>[BucketSort](https://initjs.org/bucket-sort-in-javascript-dc040b8f0058)</b>, <b>[Greedy Algorithms](https://github.com/Chanda-Abdul/Grokking-Algorithm-Book-Notes/blob/main/8.%20Greedy%20Algoritms.md)</b>, or <b>[HashMaps](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map)</b>. -->
## [Pattern 15: 0/1 Knapsack (Dynamic Programming)](./%E2%9C%85%20Pattern%2015:%200-1%20Knapsack%20(Dynamic%20Programming).md)
<b>0/1 Knapsack pattern</b> is based on the famous problem with the same name which is efficiently solved using <b>Dynamic Programming (DP)</b>.
In this pattern, we will go through a set of problems to develop an understanding of <b>DP</b>. We will always start with a <b>brute-force</b> recursive solution to see the overlapping subproblems, i.e., realizing that we are solving the same problems repeatedly.
After the recursive solution, we will modify our algorithm to apply advanced techniques of <b>Memoization</b> and <b>Bottom-Up Dynamic Programming</b> to develop a complete understanding of this pattern.
## [Pattern 16: 🔎 Topological Sort (Graph)](./%E2%9C%85%20Pattern%2016%3A%20%F0%9F%94%8E%20Topological%20Sort%20(Graph).md)
<b>Topological Sort</b> is used to find a linear ordering of elements that have dependencies on each other. For example, if event `B` is dependent on event `A`, `A` comes before `B` in topological ordering.
| Several Coding Patterns for Solving Data Structures and Algorithms Problems during Interviews | grokking-coding-interview,grokking-dynamic-programming,algorithms,coding-interviews,data-structures,interview-preparation,interview-questions,javascript,leetcode | 0 | 1 | 8 | 99 | 5 | 1 | 0 |
tldr-devops/startpack | # startpack
[![#StandWithBelarus](https://img.shields.io/badge/Belarus-red?label=%23%20Stand%20With&labelColor=white&color=red)
<img src="https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Presidential_Standard_of_Belarus_%28fictional%29.svg/240px-Presidential_Standard_of_Belarus_%28fictional%29.svg.png" width="20" height="20" alt="Voices From Belarus" />](https://bysol.org/en/) [![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://vshymanskyy.github.io/StandWithUkraine)
This is a basic setup of services for faster startup development. You can run it via [docker-compose](https://docs.docker.com/compose/) or [docker swarm](https://docs.docker.com/engine/reference/commandline/stack/).
Warning: This setup doesn't provide high level of security or any [high availability](https://www.digitalocean.com/community/tutorials/what-is-high-availability). You have to hire some skilled devops engineer (like me)) for close this gap after getting first round or sales.
Also you can check [Awesome Selfhosted](https://github.com/awesome-selfhosted/awesome-selfhosted), [Awesome Sysadmin](https://github.com/kahun/awesome-sysadmin) and [Free for Dev](https://free-for.dev/) for more options ;)
And [Coolify](https://github.com/coollabsio/coolify) or [Dokku](https://dokku.com) - an open-source & self-hostable Heroku / Netlify alternative
[Discuss on hacker news](https://news.ycombinator.com/item?id=30871211#30871600)
Time track:
- [Filipp Frizzy](https://github.com/Friz-zy/): 63h 30m for 15 days
## Available and planned open source components
### Platform
* [DONE] [Docker Compose](https://docs.docker.com/compose/)
* [DONE] [Docker Swarm](https://docs.docker.com/engine/reference/commandline/stack/)
* [DONE] [Traefik](https://traefik.io) as web server with autodiscovery and [letsencrypt](https://letsencrypt.org) certs
* [DONE] [NFS](https://hub.docker.com/r/itsthenetwork/nfs-server-alpine/) for docker swarm volumes
* [DONE] [Portainer](https://www.portainer.io/) as admin panel for docker services
* [DONE] [Docker registry](https://docs.docker.com/registry/) for store your docker images
* [DONE] [Influxdb 2](https://www.influxdata.com/blog/influxdb-2-0-open-source-is-generally-available/) and [Telegraf](https://www.influxdata.com/time-series-platform/telegraf/) for monitoring services
* [DONE] [Grafana](https://grafana.com/) and [Victoriametrics](https://victoriametrics.com) for monitoring services
### Databases and Storage
* [DONE] [Mariadb](https://mariadb.org/) as SQL database
* [DONE] [Postgresql](https://www.postgresql.org/) as another popular SQL database
* [DONE] [SQL Adminer](https://www.adminer.org/) as admin panel for SQL databases
* [DONE] [Minio](https://minio.io/) as s3 storage
### Management
* [DONE] [Gitlab](https://about.gitlab.com/) as git hosting and devops platform
* [DONE] [Nextcloud](https://nextcloud.com/) as cloud storage with plugins for email, task management, password storage, etc
* [DONE] [Tuleap](https://www.tuleap.org/) as management software
* [DONE] [Openproject](https://www.openproject.org/) as management software
* [DONE] [Vaultwarden](https://github.com/dani-garcia/vaultwarden/wiki) as password manager for business
* [Backlog] [Zentao](https://www.zentao.pm) as scrum management software
* [Backlog] [Taiga](https://www.taiga.io/) as kanban board based management software
* [Backlog] [Owncloud](https://owncloud.com/) as cloud storage
### Chat
* [DONE] [Rocket](https://rocket.chat/)
* [Backlog] [Mattermost](https://mattermost.com/)
* [Backlog] [Twake](https://twake.app/) as alternative to Microsoft Teams
* [Backlog] [Wire](https://wire.com) as alternative to Microsoft Teams
### Backend as a service
* [DONE] [Nocodb](https://www.nocodb.com/) as airtable alternative
* [DONE] [Strapi](https://strapi.io/) as headless CMS
* [Backlog] [Appwrite](https://appwrite.io/) as firebase alternative
### CMS
* [Backlog] [Wordpress](https://wordpress.org) one of the most popular CMS
* [Backlog] [Ghost](https://github.com/TryGhost/Ghost) as alternative to medium
* [Backlog] [Webiny](https://www.webiny.com/) landing page builder with drag and drop features
* [Backlog] [Grapedrop](https://grapedrop.com/) open source page builder
### Low Code Platform
* [Backlog] [Anvil](https://github.com/anvil-works/anvil-runtime) is a framework for building full-stack web apps with nothing but Python
* [Backlog] [Budibase](https://budibase.com/) build modern business apps in under 5 minutes
* [Backlog] [Appsmith](https://www.appsmith.com/) a powerful open source framework to build internal tools
* [Backlog] [Tooljet](https://tooljet.com/) everything you need to build internal tools
### CI & CD
* [DONE] [Gitlab Runner](https://about.gitlab.com/) should be placed on separate host
### Miss something? [Could you tell me more about how can I help you, please?](https://forms.gle/wSHs4C6pHXaxVm1a8)
## About the Author
Hello, everyone! My name is Filipp, and I have been working with high load distribution systems and services, security, monitoring, continuous deployment and release management (DevOps domain) since 2012.
One of my passions is developing DevOps solutions and contributing to the open-source community. By sharing my knowledge and experiences, I strive to save time for both myself and others while fostering a culture of collaboration and learning.
I had to leave my home country, Belarus, due to my participation in [protests against the oppressive regime of dictator Lukashenko](https://en.wikipedia.org/wiki/2020%E2%80%932021_Belarusian_protests), who maintains a close affiliation with Putin. Since then, I'm trying to build my life from zero in other countries.
If you are seeking a skilled DevOps lead or architect to enhance your project, I invite you to connect with me on [LinkedIn](https://www.linkedin.com/in/filipp-frizzy-289a0360/) or explore my valuable contributions on [GitHub](https://github.com/Friz-zy/). Let's collaborate and create some cool solutions together :)
## Support
You can support this or any other of my projects
- [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/filipp_frizzy)
- [donationalerts.com/r/filipp_frizzy](https://www.donationalerts.com/r/filipp_frizzy)
- ETH 0xCD9fC1719b9E174E911f343CA2B391060F931ff7
- BTC bc1q8fhsj24f5ncv3995zk9v3jhwwmscecc6w0tdw3
## Setup
All operations should be executed from root on target machine. You can use your laptop or some server. For running all services you need at least 2 cpu cores, 8gb memory and 20gb of free disk space. You can find cheap servers on [hetzner.com](https://www.hetzner.com/cloud) or compare small hosters on [vps.today](https://vps.today/).
You also need a valid domain name pointed to this server for automatically setting up https with [traefik](https://traefik.io) and [letsencrypt](https://letsencrypt.org). However, you can [hack your hosts file](https://docs.rackspace.com/support/how-to/modify-your-hosts-file/) for working without https.
For bying domain and configuring DNS I recommend you [Cloudflare](https://dash.cloudflare.com). You should create at least two DNS record type `A`:
1) `your domain name` pointed to `your server IP`
2) `*.your domain name` pointed to `your server IP`
If you run services with `docker-compose`, all service will be located on your single server. With `docker stack` (swarm) mode, you can [add addition servers](https://docs.docker.com/engine/swarm/swarm-tutorial/add-nodes/) in the same local network (the same network important for nfs volumes mounting unfortunately).
#### 1) Install docker if it doesn't installed
(run scripts from the internet is a bad practice, but if you don't know how to install docker with package managers - it's acceptable)
```
curl -fsSL https://get.docker.com -o get-docker.sh
DRY_RUN=1 sh ./get-docker.sh
sh ./get-docker.sh
```
Install docker-compose
```
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
```
#### 2) [Setup docker swarm](https://docs.docker.com/engine/reference/commandline/swarm_init/) if you choose using it.
```
docker swarm init --advertise-addr $(hostname -I | awk '{print $1}')
```
#### 3) Get this repo
```
git clone https://github.com/tldr-devops/startpack.git --depth=1
cd startpack
```
#### 4) Fill necessary variables like domain name of your server, your email, passwords for basic auth and sql services.
Generate random passwords
```
echo -e "export TELEPORT_TOKEN=$(echo $RANDOM `date`|md5sum|base64)\n$(cat env.sh)" > env.sh
echo -e "export NEXTCLOUD_SQL_PASSWORD=$(echo $RANDOM `date`|md5sum|base64|head -c 25)\n$(cat env.sh)" > env.sh
echo -e "export TULEAP_SQL_PASSWORD=$(echo $RANDOM `date`|md5sum|base64|head -c 25)\n$(cat env.sh)" > env.sh
echo -e "export STRAPI_SQL_PASSWORD=$(echo $RANDOM `date`|md5sum|base64|head -c 25)\n$(cat env.sh)" > env.sh
echo -e "export GITLAB_SQL_PASSWORD=$(echo $RANDOM `date`|md5sum|base64|head -c 25)\n$(cat env.sh)" > env.sh
echo -e "export OPENPROJECT_SQL_PASSWORD=$(echo $RANDOM `date`|md5sum|base64|head -c 25)\n$(cat env.sh)" > env.sh
echo -e "export NOCODB_SQL_PASSWORD=$(echo $RANDOM `date`|md5sum|base64|head -c 25)\n$(cat env.sh)" > env.sh
echo -e "export REGISTRY_PASSWORD=$(echo $RANDOM `date`|md5sum|base64|head -c 25)\n$(cat env.sh)" > env.sh
echo -e "export SQL_ROOT_PASSWORD=$(echo $RANDOM `date`|md5sum|base64|head -c 25)\n$(cat env.sh)" > env.sh
echo -e "export PASSWORD=$(echo $RANDOM `date`|md5sum|base64|head -c 25)\n$(cat env.sh)" > env.sh
```
You should change this lines with your email and dns name
```
echo -e "export EMAIL='Type your email here'\n$(cat env.sh)" > env.sh
echo -e "export DOMAIN='Type your domain here'\n$(cat env.sh)" > env.sh
```
This is your credentials, store it in your password manager ;)
```
cat env.sh
```
#### 5) Prepare environment
```
source env.sh
bash setup.sh
```
If you have docker swarm setup with more than one machine, you should start NFS server on main manager and [connect other nodes to it](https://linuxize.com/post/how-to-mount-an-nfs-share-in-linux/):
A) On main machine
```
# Setup NFS server with compose as docker-swarm still doesn't support `privileged` mode
docker-compose -f nfs.yml up -d
```
B) On all other machines
```
export MASTER_IP="your $MASTER_IP from step 4"
export DATAPATH="your $DATAPATH from step 4"
echo -e "$MASTER_IP:$DATAPATH $DATAPATH nfs nfsvers=4,rw 0 0" >> /etc/fstab
mount $DATAPATH
```
#### 6) Run your new services
After entering all commands below you'll able to login into your new services by addresses:
* https://traefik.your_domain user `your $USERNAME` password `your $PASSWORD`
* https://portainer.your_domain
* https://registry.your_domain user `your $REGISTRY_USERNAME` password `your $REGISTRY_PASSWORD`
* https://influxdb.your_domain user `your $USERNAME` password `your $PASSWORD`
* https://grafana.your_domain user `your $USERNAME` password `your $PASSWORD`
* https://victoriametrics.your_domain user `your $USERNAME` password `your $PASSWORD`
* https://adminer.your_domain user `your $USERNAME` password `your $PASSWORD`
* https://minio-console.your_domain user `your $USERNAME` password `your $PASSWORD`
* https://gitlab.your_domain user `root` password `your $PASSWORD`
* https://nextcloud.your_domain user `your $USERNAME` password `your $PASSWORD`
* https://tuleap.your_domain user `admin` password `your $PASSWORD`
* https://openproject.your_domain user `admin` password `admin`
* https://rocketchat.your_domain
* https://vaultwarden.your_domain/admin password `your $PASSWORD`
* https://nocodb.your_domain
* https://strapi.your_domain
##### Docker Compose
Mandatory steps
```
docker-compose -f setup-compose.yml up -d
docker-compose -f databases.yml up -d
```
from now on you can choose which services you need
```
docker-compose -f monitoring.yml up -d
docker-compose -f registry.yml up -d
docker-compose -f minio.yml up -d
docker-compose -f vaultwarden.yml up -d
docker-compose -f tuleap.yml up -d
docker-compose -f nextcloud.yml up -d
docker-compose -f gitlab.yml up -d
```
After enabling portainer you should immediately go to portainer.your_domain and set admin password
```
docker-compose -f portainer.yml up -d
```
After enabling rocketchat you should immediately go to rocketchat.your_domain/admin and set admin password
```
docker-compose -f rocketchat.yml up -d
```
After enabling openproject you should immediately go to openproject.your_domain,
login with `admin` user and `admin` password, change it and update settings on
openproject.your_domain/admin/settings/general
```
docker-compose -f openproject.yml up -d
```
After enabling nocodb you should immediately go to nocodb.your_domain and set admin password
```
docker-compose -f nocodb.yml up -d
```
After enabling strapi you should wait a minute and then go to strapi.your_domain/admin and set admin password
```
docker-compose -f strapi.yml up -d
```
##### Docker Swarm
Mandatory steps
```
docker stack deploy --compose-file setup-swarm.yml startpack
docker stack deploy --compose-file databases.yml startpack
```
From now on you can choose which services you need
```
docker stack deploy --compose-file monitoring.yml startpack
docker stack deploy --compose-file registry.yml startpack
docker stack deploy --compose-file minio.yml startpack
docker stack deploy --compose-file vaultwarden.yml startpack
docker stack deploy --compose-file tuleap.yml startpack
docker stack deploy --compose-file nextcloud.yml startpack
docker stack deploy --compose-file gitlab.yml startpack
```
After enabling portainer you should immediately go to portainer.your_domain and set admin password
```
docker stack deploy --compose-file portainer.yml startpack
```
After enabling rocketchat you should immediately go to rocketchat.your_domain/admin and set admin password
```
docker stack deploy --compose-file rocketchat.yml startpack
```
After enabling openproject you should immediately go to openproject.your_domain,
login with `admin` user and `admin` password, change it and update settings on
openproject.your_domain/admin/settings/general
```
docker stack deploy --compose-file openproject.yml startpack
```
After enabling nocodb you should immediately go to nocodb.your_domain and set admin password
```
docker stack deploy --compose-file nocodb.yml startpack
```
After enabling strapi you should immediately go to strapi.your_domain/admin and set admin password
```
docker stack deploy --compose-file strapi.yml startpack
```
#### 7) Run gitlab-runner on separate machine with docker-compose
```
# Install docker
curl -fsSL https://get.docker.com -o get-docker.sh
DRY_RUN=1 sh ./get-docker.sh
sh ./get-docker.sh
# Install docker-compose
curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
# Get files
git checkout https://github.com/tldr-devops/startpack.git --depth=1
cd startpack
# Prepare environment
mkdir -p {builds,cache}
export DOMAIN="Your domain"
export HASHED_PASSWORD="HASHED_PASSWORD from step 4"
envsubst < configs/gitlab-runner.toml > ./config.toml
# Run runner in docker with docker-compose
docker-compose -f gitlab-runner.yml up -d
# Check runners logs
docker-compose -f gitlab-runner.yml logs -f
```
#### 8) Login into your docker registry on all docker hosts
```
docker login -u "Your REGISTRY_USERNAME from step 4" -p "Your REGISTRY_PASSWORD from step 4" registry."YOUR DOMAIN"
```
#### 9) You should configure backups of your server, at least $DATAPATH directory
| Selfhosted tech starter pack for development of new project or startup | starter,starter-kit,startup,docker-compose,docker-swarm,traefic,portainer,monitoring,mariadb,postgresql | 0 | 5 | 4 | 49 | 2 | 1 | 0 |
tanshuai/alphabiz | # Alphabiz
[Alphabiz - fully decentralized media platform and blockchain-based marketplace](https://alpha.biz/)
Read [this document](docs/en_us/README.md) for building your own brand of Alphabiz.
[![CI/CT/CD](https://github.com/tanshuai/alphabiz/actions/workflows/release-nightly.yml/badge.svg)](https://github.com/tanshuai/alphabiz/actions/workflows/release-nightly.yml)[![CodeQL](https://github.com/tanshuai/alphabiz/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/tanshuai/alphabiz/actions/workflows/codeql-analysis.yml)[![Backup Weekly](https://github.com/tanshuai/alphabiz/actions/workflows/weekly.yml/badge.svg)](https://github.com/tanshuai/alphabiz/actions/workflows/weekly.yml)
- **Marketplace** built on credit system with decentralized technologies
- **Streaming Media** with P2P technologies
- **Media Player** supports mainstream formats & subtitles
![app_img_dark](https://user-images.githubusercontent.com/92558550/211519797-4e766719-f6cf-420e-9e04-0057150c5c3a.jpg)
Alphabiz is an open source desktop & mobile framework & sdk to build web 3 apps.
## Supported operating systems
- Windows 7, 10, 11
- macOS 11+
- Ubuntu Linux 20.04+ LTS
## Installation
Download the official demo installer for your operating system: https://alpha.biz/download/
## Nightly Releases
Want to experiment with the latest features and get fixes before everyone else? Install the nightly channel to get access to early builds of Alphabiz: https://github.com/tanshuai/alphabiz/releases?q=nightly
| Web3 YouTube Alternative - fully decentralized media platform and blockchain-based marketplace | decentralized-applications,video-player,media-player,downloader,blockchain,electron,dapp,web3,decentralized,decentralization | 381 | 8 | 30 | 2,544 | 0 | 134 | 7 |
xsalazar/emoji-kitchen | # 🧑🍳 Emoji Kitchen
This repository contains the source code for the website [https://emojikitchen.dev](https://emojikitchen.dev).
This website allows for quick and easy browsing of the comprehensive list of supported emoji mashups as part of Google's [Emoji Kitchen](https://emojipedia.org/emoji-kitchen/).
There are currently just over 50,000 possible valid combinations showcasing the unique illustrations and combined emoji!
## Getting Started
This repository leverages [VSCode's devcontainer](https://code.visualstudio.com/docs/remote/containers) feature to ensure all necessary dependencies are available inside the container for development.
### Application
To get started, you will need to first download the supporting metadata, then install and start the project normally:
```bash
curl -L --compressed https://raw.githubusercontent.com/xsalazar/emoji-kitchen-backend/main/app/metadata.json -o src/Components/metadata.json
npm install && npm start
```
This will start the application on your local machine, running on [http://localhost:5173/](http://localhost:5173).
### Deployments
All application deployments are managed via GitHub Actions and the [`./.github/workflows/deploy.yml`](./.github/workflows/deploy.yml) workflow.
Additionally, application dependencies are automatically managed and updated via Dependabot and the [`./.github/workflows/automerge-dependabot.yml`](./.github/workflows/automerge-dependabot.yml) workflow.
| 🧑🍳 This repository contains the source code for the website https://emojikitchen.dev and allows for quick and easy browsing of the over 50,000 supported emoji mashups as part of Google's Emoji Kitchen. | react,emoji,github-pages,typescript,google,emoji-kitchen,emojikitchen,vite | 0 | 1 | 724 | 1,459 | 3 | 3 | 2 |
google/vizier | <figure>
<img src="docs/assets/vizier_logo2.png" width=20% align="right"/>
</figure>
# Open Source Vizier: Reliable and Flexible Black-Box Optimization.
[![PyPI version](https://badge.fury.io/py/google-vizier.svg)](https://badge.fury.io/py/google-vizier)
[![Continuous Integration](https://github.com/google/vizier/actions/workflows/ci.yml/badge.svg)](https://github.com/google/vizier/actions/workflows/ci.yml?query=branch%3Amain)
![Docs](https://github.com/google/vizier/workflows/docs_test/badge.svg)
[**Google AI Blog**](https://ai.googleblog.com/2023/02/open-source-vizier-towards-reliable-and.html)
| [**Getting Started**](#getting_started)
| [**Documentation**](#documentation)
| [**Installation**](#installation)
| [**Citing and Highlights**](#citing_vizier)
## What is Open Source (OSS) Vizier?
[OSS Vizier](https://arxiv.org/abs/2207.13676) is a Python-based service for black-box optimization and research, based on [Google Vizier](https://dl.acm.org/doi/10.1145/3097983.3098043), one of the first hyperparameter tuning services designed to work at scale.
<figure>
<p align="center" width=65%>
<img src="docs/assets/oss_vizier_service.gif"/>
<br>
<em><b>OSS Vizier's distributed client-server system. Animation by Tom Small.</b></em>
</p>
</figure>
## Getting Started <a name="getting_started"></a>
As a basic example for users, below shows how to tune a simple objective using all flat search space types:
```python
from vizier.service import clients
from vizier.service import pyvizier as vz
# Objective function to maximize.
def evaluate(w: float, x: int, y: float, z: str) -> float:
return w**2 - y**2 + x * ord(z)
# Algorithm, search space, and metrics.
study_config = vz.StudyConfig(algorithm='DEFAULT')
study_config.search_space.root.add_float_param('w', 0.0, 5.0)
study_config.search_space.root.add_int_param('x', -2, 2)
study_config.search_space.root.add_discrete_param('y', [0.3, 7.2])
study_config.search_space.root.add_categorical_param('z', ['a', 'g', 'k'])
study_config.metric_information.append(vz.MetricInformation('metric_name', goal=vz.ObjectiveMetricGoal.MAXIMIZE))
# Setup client and begin optimization. Vizier Service will be implicitly created.
study = clients.Study.from_study_config(study_config, owner='my_name', study_id='example')
for i in range(10):
suggestions = study.suggest(count=2)
for suggestion in suggestions:
params = suggestion.parameters
objective = evaluate(params['w'], params['x'], params['y'], params['z'])
suggestion.complete(vz.Measurement({'metric_name': objective}))
```
## Documentation <a name="documentation"></a>
OSS Vizier's interface consists of [three main APIs](https://oss-vizier.readthedocs.io/en/latest/guides/index.html):
* [**User API:**](https://oss-vizier.readthedocs.io/en/latest/guides/index.html#for-users) Allows a user to optimize their blackbox objective and optionally setup a server for distributed multi-client settings.
* [**Developer API:**](https://oss-vizier.readthedocs.io/en/latest/guides/index.html#for-developers) Defines abstractions and utilities for implementing new optimization algorithms for research and to be hosted in the service.
* [**Benchmarking API:**](https://oss-vizier.readthedocs.io/en/latest/guides/index.html#for-benchmarking) A wide collection of objective functions and methods to benchmark and compare algorithms.
Additionally, it contains [advanced API](https://oss-vizier.readthedocs.io/en/latest/advanced_topics/index.html) for:
* [**Tensorflow Probability:**](https://oss-vizier.readthedocs.io/en/latest/advanced_topics/index.html#tensorflow-probability) For writing Bayesian Optimization algorithms using Tensorflow Probability and Flax.
* [**PyGlove:**](https://oss-vizier.readthedocs.io/en/latest/advanced_topics/index.html#pyglove) For large-scale evolutionary experimentation and program search using OSS Vizier as a distributed backend.
Please see OSS Vizier's [ReadTheDocs documentation](https://oss-vizier.readthedocs.io/) for detailed information.
## Installation <a name="installation"></a>
**Quick start:** For tuning objectives using our state-of-the-art JAX-based Bayesian Optimizer, run:
```bash
pip install google-vizier[jax]
```
### Advanced Installation
**Minimal version:** To install only the core service and client APIs from `requirements.txt`, run:
```bash
pip install google-vizier
```
**Full installation:** To support all algorithms and benchmarks, run:
```bash
pip install google-vizier[all]
```
**Specific installation:** If you only need a specific part "X" of OSS Vizier, run:
```bash
pip install google-vizier[X]
```
which installs add-ons from `requirements-X.txt`. Possible options:
* `requirements-jax.txt`: Jax libraries shared by both algorithms and benchmarks.
* `requirements-tf.txt`: Tensorflow libraries used by benchmarks.
* `requirements-algorithms.txt`: Additional repositories (e.g. EvoJAX) for algorithms.
* `requirements-benchmarks.txt`: Additional repositories (e.g. NASBENCH-201) for benchmarks.
* `requirements-test.txt`: Libraries needed for testing code.
Check if all unit tests work by running `run_tests.sh` after a full installation. OSS Vizier requires Python 3.10+, while client-only packages require Python 3.8+.
## Citing and Highlights <a name="citing_vizier"></a>
<ins>**Citing Vizier:**</ins> If you found this code useful, please consider citing the [OSS Vizier paper](https://arxiv.org/abs/2207.13676) as well as the [Google Vizier paper](https://dl.acm.org/doi/10.1145/3097983.3098043).
<ins>**Highlights:**</ins> We track [notable users](https://oss-vizier.readthedocs.io/en/latest/highlights/applications.html) and [media attention](https://oss-vizier.readthedocs.io/en/latest/highlights/media.html) - let us know if OSS Vizier was helpful for your work.
Thanks!
```bibtex
@inproceedings{oss_vizier,
author = {Xingyou Song and
Sagi Perel and
Chansoo Lee and
Greg Kochanski and
Daniel Golovin},
title = {Open Source Vizier: Distributed Infrastructure and API for Reliable and Flexible Black-box Optimization},
booktitle = {Automated Machine Learning Conference, Systems Track (AutoML-Conf Systems)},
year = {2022},
}
@inproceedings{google_vizier,
author = {Daniel Golovin and
Benjamin Solnik and
Subhodeep Moitra and
Greg Kochanski and
John Karro and
D. Sculley},
title = {Google Vizier: {A} Service for Black-Box Optimization},
booktitle = {Proceedings of the 23rd {ACM} {SIGKDD} International Conference on
Knowledge Discovery and Data Mining, Halifax, NS, Canada, August 13
- 17, 2017},
pages = {1487--1495},
publisher = {{ACM}},
year = {2017},
url = {https://doi.org/10.1145/3097983.3098043},
doi = {10.1145/3097983.3098043},
}
```
| Python-based research interface for blackbox and hyperparameter optimization, based on the internal Google Vizier Service. | vizier,hyperparameter-optimization,tuning,tuning-parameters,blackbox-optimization,hyperparameter-tuning,bayesian-optimization,evolutionary-algorithms,distributed-systems,distributed-computing | 34 | 22 | 1,094 | 1,071 | 2 | 61 | 4 |
klezVirus/SysWhispers3 | # SysWhispers3
SysWhispers helps with evasion by generating header/ASM files implants can use to make direct system calls.
## Official Discord Channel
Come hang out on Discord!
[![Inceptor Server](https://discordapp.com/api/guilds/1155753953108164628/widget.png?style=banner3)](https://discord.gg/f6w6dwZq)
### Why on earth didn't I create a PR to SysWhispers2?
The reason for SysWhispers3 to be a standalone version are many, but the most important are:
* SysWhispers3 is the de-facto "fork" used by [Inceptor][1], and implements some utils class which are not relevant to the
original version of the tool.
* SysWhispers2 is moving towards supporting NASM compilation (for gcc/mingw), while this version is specifically designed and
tested to support MSVC (because [Inceptor][1] will stay a Windows-only framework for the near future).
* SysWhispers3 contains partially implemented features (such as egg-hunting) which would not be sensible to include
in the original version of the tool.
## Differences with SysWhispers2
The usage is pretty similar to [SysWhispers2](https://github.com/jthuraisamy/SysWhispers2), with the following exceptions:
* It also supports x86/WoW64
* It supports syscalls instruction replacement with an EGG (to be dynamically replaced)
* It supports direct jumps to syscalls in x86/x64 mode (in WOW64 it's almost standard)
* It supports direct jumps to random syscalls (borrowing [@ElephantSeal's idea](https://twitter.com/ElephantSe4l/status/1488464546746540042))
A better explanation of these features are better outlined i the blog post [SysWhispers is dead, long live SysWhispers!][2]
## Introduction
Security products, such as AVs and EDRs, usually place hooks in user-mode API functions to analyse a program execution
flow, in order to detect potentially malicious activities.
SysWhispers2 is a tool designed to generate header/ASM pairs for any system call in the core kernel image
(`ntoskrnl.exe`), which can then be integrated and called directly from C/C++ code, evading user-lands hooks.
The tool, however, generates some patters which can be included in signatures, or behaviour which can be detected
at runtime.
SysWhispers3 is built on top of SysWhispers2, and integrates some helpful features to bypass these forms of detection.
## Installation
```
C:\> git clone https://github.com/klezVirus/SysWhispers3.git
C:\> cd SysWhispers3
C:\> python .\syswhispers.py --help
```
## Usage and Examples
The help shows all the available commands and features of the tool:
```
C:\>python syswhispers.py -h
usage: syswhispers.py [-h] [-p PRESET] [-a {x86,x64}] [-m {embedded,egg_hunter,jumper,jumper_randomized}] [-f FUNCTIONS] -o OUT_FILE [--int2eh] [--wow64] [-v] [-d]
SysWhispers3 - SysWhispers on steroids
optional arguments:
-h, --help show this help message and exit
-p PRESET, --preset PRESET
Preset ("all", "common")
-a {x86,x64}, --arch {x86,x64}
Architecture
-c {msvc,mingw,all}, --compiler {msvc,mingw,all}
Compiler
-m {embedded,egg_hunter,jumper,jumper_randomized}, --method {embedded,egg_hunter,jumper,jumper_randomized}
Syscall recovery method
-f FUNCTIONS, --functions FUNCTIONS
Comma-separated functions
-o OUT_FILE, --out-file OUT_FILE
Output basename (w/o extension)
--int2eh Use the old `int 2eh` instruction in place of `syscall`
--wow64 Use Wow64 to run x86 on x64 (only usable with x86 architecture)
-v, --verbose Enable debug output
-d, --debug Enable syscall debug (insert software breakpoint)
```
### Command Lines
#### Standard SysWhispers, embedded system calls (x64)
```powershell
# Export all functions with compatibility for all supported Windows versions (see example-output/).
py .\syswhispers.py --preset all -o syscalls_all
# Export just the common functions (see below for list).
py .\syswhispers.py --preset common -o syscalls_common
# Export NtProtectVirtualMemory and NtWriteVirtualMemory with compatibility for all versions.
py .\syswhispers.py --functions NtProtectVirtualMemory,NtWriteVirtualMemory -o syscalls_mem
```
#### SysWhispers3-only samples
```powershell
# Normal SysWhispers, 32-bits mode
py .\syswhispers.py --preset all -o syscalls_all -m jumper --arch x86
# Normal SysWhispers, using WOW64 in 32-bits mode (only specific functions)
py .\syswhispers.py --functions NtProtectVirtualMemory,NtWriteVirtualMemory -o syscalls_mem --arch x86 --wow64
# Egg-Hunting SysWhispers, to bypass the "mark of the sycall" (common function)
py .\syswhispers.py --preset common -o syscalls_common -m egg_hunter
# Jumping/Jumping Randomized SysWhispers, to bypass dynamic RIP validation (all functions) using MinGW as the compiler
py .\syswhispers.py --preset all -o syscalls_all -m jumper -c mingw
```
### Script Output
```
PS C:\Projects\SysWhispers2> py .\syswhispers.py --preset common --out-file temp\syscalls_common -v
. ,--.
,-. . . ,-. . , , |-. o ,-. ,-. ,-. ,-. ,-. __/
`-. | | `-. |/|/ | | | `-. | | |-' | `-. . \
`-' `-| `-' ' ' ' ' ' `-' |-' `-' ' `-' '''
/| | @Jackson_T
`-' ' @modexpblog, 2021
Edits by @klezVirus, 2022
SysWhispers3: Why call the kernel when you can whisper?
Common functions selected.
Complete! Files written to:
temp\syscalls_common.h
temp\syscalls_common.c
temp\syscalls_common_.asm
Press a key to continue...
```
## Importing into Visual Studio
1. Copy the generated H/C/ASM files into the project folder.
2. In Visual Studio, go to *Project* → *Build Customizations...* and enable MASM.
3. In the *Solution Explorer*, add the .h and .c/.asm files to the project as header and source files, respectively.
4. Go to the properties of the ASM file, and set the *Item Type* to *Microsoft Macro Assembler*.
## Compiling outside of Visual Studio
### Windows
Makefile for 64 bits:
`Makefile.msvc`
```
OPTIONS = -Zp8 -c -nologo -Gy -Os -O1 -GR- -EHa -Oi -GS-
LIBS = libvcruntime.lib libcmt.lib ucrt.lib kernel32.lib
program:
ML64 /c syscalls-asm.x64.asm /link /NODEFAULTLIB /RELEASE /MACHINE:X64
cl.exe $(OPTIONS) syscalls.c program.c
link.exe /OUT:program.x64.exe -nologo $(LIBS) /MACHINE:X64 -subsystem:console -nodefaultlib syscalls-asm.x64.obj syscalls.obj program.obj
```
Makefile for 32 bits:
`Makefile.msvc`
```
OPTIONS = -Zp8 -c -nologo -Gy -Os -O1 -GR- -EHa -Oi -GS-
LIBS = libvcruntime.lib libcmt.lib ucrt.lib kernel32.lib
program:
ML /c syscalls-asm.x86.asm /link /NODEFAULTLIB /RELEASE /MACHINE:X86
cl.exe $(OPTIONS) syscalls.c program.c
link.exe /OUT:program.x86.exe -nologo $(LIBS) /MACHINE:X86 -subsystem:console -nodefaultlib syscalls-asm.x86.obj syscalls.obj program.obj
```
Compile with nmake:
```
nmake -f Makefile.msvc
```
### Linux
Makefile for both 64 and 32 bits:
`Makefile.mingw`
```
CC_x64 := x86_64-w64-mingw32-gcc
CC_x86 := i686-w64-mingw32-gcc
OPTIONS := -masm=intel -Wall
program:
$(CC_x64) syscalls.c program.c -o program.x64.exe $(OPTIONS)
$(CC_x86) syscalls.c program.c -o program.x86.exe $(OPTIONS)
```
Compile with make:
```
make -f Makefile.mingw
```
## Caveats and Limitations
- The Egg-Hunter functionality is not implemented within this tool, it is in [Inceptor][1].
- System calls from the graphical subsystem (`win32k.sys`) are not supported.
- Tested on Visual Studio 2019/2022 with Windows 10 SDK.
- Support for NASM is not guaranteed.
- Support for GCC and MinGW is not guaranteed.
## Troubleshooting
#### From SysWhispers2
- Type redefinitions errors: a project may not compile if typedefs in `syscalls.h` have already been defined.
- Ensure that only required functions are included (i.e. `--preset all` is rarely necessary).
- If a typedef is already defined in another used header, then it could be removed from `syscalls.h`.
#### New
- With `--verbose`, it is possible to enable troubleshooting output during code generation.
- With `--debug`, the tool will insert a software breakpoint in the syscall stub, to ease the debugging in WinDbg.
- If you get a `error A2084:constant value too large` during compilation, regenerates the stubs.
## Credits
#### SysWhispers2
Developed by [@Jackson_T](https://twitter.com/Jackson_T) and [@modexpblog](https://twitter.com/modexpblog),
but builds upon the work of many others:
- [@FoxHex0ne](https://twitter.com/FoxHex0ne) for cataloguing many function prototypes and typedefs in a machine-readable format.
- [@PetrBenes](https://twitter.com/PetrBenes), [NTInternals.net team](https://undocumented.ntinternals.net/), and [MSDN](https://docs.microsoft.com/en-us/windows/) for additional prototypes and typedefs.
- [@Cn33liz](https://twitter.com/Cneelis) for the initial [Dumpert](https://github.com/outflanknl/Dumpert) POC implementation.
#### SysWhispers2 (x86/WOW64)
- [@rooster](https://github.com/mai1zhi2) for creating a sample x86/WOW64 compatible fork.
#### Others
- [@ElephantSe4l](https://mobile.twitter.com/elephantse4l) for the idea about randomizing the jumps to the syscalls.
- [@S4ntiagoP](https://twitter.com/s4ntiago_p) for the incredible work on [nanodump](https://github.com/helpsystems/nanodump), which gave me tons of ideas.
## Licence
As the original, this project is also licensed under the Apache License 2.0.
[1]: https://github.com/klezVirus/inceptor
[2]: https://klezvirus.github.io/RedTeaming/AV_Evasion/NoSysWhisper/
| SysWhispers on Steroids - AV/EDR evasion via direct system calls. | null | 0 | 3 | 5 | 33 | 6 | 1 | 0 |
fishros/install | # 一键安装(忘记要Star了,点了再走哦~)
> ### 大家想要的工具可以在[心愿清单](https://github.com/fishros/install/issues/2)中提出,说不定会有魔法师满足你的心愿
## 工具列表
已支持工具列表:
- 一键安装:ROS(支持ROS和ROS2,树莓派Jetson) [贡献@小鱼](https://github.com/fishros)
- 一键安装:VsCode(支持amd64和arm64) [贡献@小鱼](https://github.com/fishros)
- 一键安装:github桌面版(小鱼常用的github客户端) [贡献@小鱼](https://github.com/fishros)
- 一键安装:nodejs开发环境(通过nodejs可以预览小鱼官网噢 [贡献@小鱼](https://github.com/fishros)
- 一键配置:rosdep(小鱼的rosdepc,又快又好用) [贡献@小鱼](https://github.com/fishros)
- 一键配置:ROS环境(快速更新ROS环境设置,自动生成环境选择) [贡献@小鱼](https://github.com/fishros)
- 一键配置:系统源(更换系统源,支持全版本Ubuntu系统) [贡献@小鱼](https://github.com/fishros)
- 一键安装:Docker(支持amd64和arm64) [贡献@alyssa](https://github.com/alyssa1024)
- 一键安装:cartographer 贡献 [@小鱼](https://github.com/fishros) & [@Catalpa](https://github.com/Y-zi)
- 一键安装:微信客户端 [贡献@小鱼](https://github.com/fishros)
## 使用方法
```
wget http://fishros.com/install -O fishros && . fishros
```
## 如何自动选择(Dockerfile中使用)
目前一键安装支持从配置文件自动输入选项,你需要手动运行一次一键安装,使用完毕后会自动产生 `/tmp/fish_install.yaml`。
使用下面的指令将配置文件拷贝到当前终端即可。
```
cp /tmp/fish_install.yaml ./
```
### Dockerfile中使用
使用样例如下
```
RUN apt update \
&& apt install wget python3-yaml -y \
# 安装melodic
&& echo "chooses:\n" > fish_install.yaml \
&& echo "- {choose: 1, desc: '一键安装:ROS(支持ROS和ROS2,树莓派Jetson)'}\n" >> fish_install.yaml \
&& echo "- {choose: 1, desc: 更换源继续安装}\n" >> fish_install.yaml \
&& echo "- {choose: 2, desc: 清理三方源}\n" >> fish_install.yaml \
&& echo "- {choose: 1, desc: melodic(ROS1)}\n" >> fish_install.yaml \
&& echo "- {choose: 1, desc: melodic(ROS1)桌面版}\n" >> fish_install.yaml \
&& wget http://fishros.com/install -O fishros && /bin/bash fishros \
# 进行最后的清理
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& apt-get clean && apt autoclean
```
一键换源
```
FROM ubuntu:22.04
# 一键换源
RUN apt update \
&& apt install wget python3 python3-yaml -y python3-distro\
&& echo "chooses:\n" > fish_install.yaml \
&& echo "- {choose: 5, desc: '一键安装:ROS(支持ROS和ROS2,树莓派Jetson)'}\n" >> fish_install.yaml \
&& echo "- {choose: 2, desc: 更换源继续安装}\n" >> fish_install.yaml \
&& echo "- {choose: 1, desc: 清理三方源}\n" >> fish_install.yaml \
&& wget http://fishros.com/install -O fishros && /bin/bash fishros \
# 进行最后的清理
&& rm -rf fish_install.yaml \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& apt-get clean && apt autoclean
```
## 贡献指南
如果想把自己的常用安装程序变成一键安装程序,可以遵循下面的贡献指南。
### 1.fork工程
fork工程到你的github,然后克隆工程到本地
### 2.新建文件
在本地的工程的tools目录下新建py文件
- 若是安装工具命名为:tool_install_xxx.py
- 若是配置工具为:tool_config_xxx.py
### 3.编写程序
拷贝模板到你新建的文件:
```
# -*- coding: utf-8 -*-
from .base import BaseTool
from .base import PrintUtils,CmdTask,FileUtils,AptUtils,ChooseTask
from .base import osversion
from .base import run_tool_file
class Tool(BaseTool):
def __init__(self):
self.type = BaseTool.TYPE_INSTALL
self.name = "模板工程"
self.autor = '小鱼'
def run(self):
#正式的运行
pass
```
接着修改type、name、autor
在run函数中编写逻辑,可以提供给你的工具有:
1. PrintUtils 打印文字
2. FileUtils 操作文件
3. AptUtils 操作Apt
4. ChooseTask 选择选项
5. CmdTask 运行命令行工具
6. run_tool_file 运行其他工具(需要在install.py的tools中配置dep)
信息:
1. osversion 系统相关信息
2. osarch 架构信息 amd64/i386/arm
### 4.在install.py中tools中添加一条信息
### 5.运行测试
## 贡献名单
- 一键安装ROS [小鱼](https://github.com/fishros)
- 一键安装github-deskto [小鱼](https://github.com/fishros)
- 一键配置rosdep [小鱼](https://github.com/fishros)
- 一键配置ros环境 [小鱼](https://github.com/fishros)
- 一键配置系统源 [小鱼](https://github.com/fishros)
- 一键安装nodejs [小鱼](https://github.com/fishros)
- 一键安装vscode [小鱼](https://github.com/fishros)
- 一键安装:Docker(支持amd64和arm64) [@alyssa](https://github.com/alyssa1024)
| 一键安装程序,欢迎大家提交代码和小鱼一起一键安装停止浪费生命 | null | 0 | 10 | 12 | 213 | 15 | 1 | 0 |
getActivity/AndroidGithubBoss | # Android 个人技术开源影响力排行榜(不定时更新)
* 项目地址:[Github](https://github.com/getActivity/AndroidGithubBoss)
* 在某一天,我突发奇想,Android 做开源的大佬很多,但是大多数人无法知道都有哪些人,于是乎我开源了一个项目,用于将 Android 行业中的开源大佬聚齐起来,大家不仅可以认识到这些开源大佬,还能知道他们有哪些优秀的开源作品,可以供我们学习和参考。
* 于是我个人自发收集了这些人的名单,以下数据均来自纯手工采集,整个过程耗时将近半年,供大家参考,如有遗留请通过 [issue](https://github.com/getActivity/AndroidGithubBoss/issues/new) 通知我补上,如有错误也请通过 [issue](https://github.com/getActivity/AndroidGithubBoss/issues/new) 通知我修改。
| 排名 | 地区 | Github</br>用户名 | 个人主页 | 开源项目推荐 |
| :---: | :---: | :--------------: | :----------: | :---------------------: |
| 1 | 美国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/66577"> </br> [JakeWharton](https://github.com/JakeWharton) | ![](https://github-readme-stats.vercel.app/api?username=JakeWharton) | [butterknife](https://github.com/JakeWharton/butterknife) </br> ![](https://img.shields.io/github/stars/JakeWharton/butterknife.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ViewPagerIndicator](https://github.com/JakeWharton/ViewPagerIndicator) </br> ![](https://img.shields.io/github/stars/JakeWharton/ViewPagerIndicator.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [timber](https://github.com/JakeWharton/timber) </br> ![](https://img.shields.io/github/stars/JakeWharton/timber.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 2 | 日本 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1833474"> </br> [wasabeef](https://github.com/wasabeef) | ![](https://github-readme-stats.vercel.app/api?username=wasabeef) | [awesome-android-ui](https://github.com/wasabeef/awesome-android-ui) </br> ![](https://img.shields.io/github/stars/wasabeef/awesome-android-ui.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [recyclerview-animators](https://github.com/wasabeef/recyclerview-animators) </br> ![](https://img.shields.io/github/stars/wasabeef/recyclerview-animators.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [glide-transformations](https://github.com/wasabeef/glide-transformations) </br> ![](https://img.shields.io/github/stars/wasabeef/glide-transformations.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 3 | 印度 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/9877145"> </br> [amitshekhariitbhu](https://github.com/amitshekhariitbhu) | ![](https://github-readme-stats.vercel.app/api?username=amitshekhariitbhu) | [android-interview-questions](https://github.com/amitshekhariitbhu/android-interview-questions) </br> ![](https://img.shields.io/github/stars/amitshekhariitbhu/android-interview-questions.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Android-Debug-Database](https://github.com/amitshekhariitbhu/Android-Debug-Database) </br> ![](https://img.shields.io/github/stars/amitshekhariitbhu/Android-Debug-Database.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [from-java-to-kotlin](https://github.com/amitshekhariitbhu/from-java-to-kotlin) </br> ![](https://img.shields.io/github/stars/amitshekhariitbhu/from-java-to-kotlin.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 4 | 韩国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/24237865"> </br> [skydoves](https://github.com/skydoves) | ![](https://github-readme-stats.vercel.app/api?username=skydoves) | [Pokedex](https://github.com/skydoves/Pokedex) </br> ![](https://img.shields.io/github/stars/skydoves/Pokedex.svg) </br> [android-developer-roadmap](https://github.com/skydoves/android-developer-roadmap) </br> ![](https://img.shields.io/github/stars/skydoves/android-developer-roadmap.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Balloon](https://github.com/skydoves/Balloon) </br> ![](https://img.shields.io/github/stars/skydoves/Balloon.svg) |
| 5 | 未知 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7337301"> </br> [topjohnwu](https://github.com/topjohnwu) | ![](https://github-readme-stats.vercel.app/api?username=topjohnwu) | [Magisk](https://github.com/topjohnwu/Magisk) </br> ![](https://img.shields.io/github/stars/topjohnwu/Magisk.svg) |
| 6 | 法国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/5754972"> </br> [florent37](https://github.com/florent37) | ![](https://github-readme-stats.vercel.app/api?username=florent37) | [MaterialViewPager](https://github.com/florent37/MaterialViewPager) </br> ![](https://img.shields.io/github/stars/florent37/MaterialViewPager.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ShapeOfView](https://github.com/florent37/ShapeOfView) </br> ![](https://img.shields.io/github/stars/florent37/ShapeOfView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ExpectAnim](https://github.com/florent37/ExpectAnim) </br> ![](https://img.shields.io/github/stars/florent37/ExpectAnim.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 7 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/2503423"> </br> [daimajia](https://github.com/daimajia) | ![](https://github-readme-stats.vercel.app/api?username=daimajia) | [AndroidSwipeLayout](https://github.com/daimajia/AndroidSwipeLayout) </br> ![](https://img.shields.io/github/stars/daimajia/AndroidSwipeLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidViewAnimations](https://github.com/daimajia/AndroidViewAnimations) </br> ![](https://img.shields.io/github/stars/daimajia/AndroidViewAnimations.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [NumberProgressBar](https://github.com/daimajia/NumberProgressBar) </br> ![](https://img.shields.io/github/stars/daimajia/NumberProgressBar.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 8 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10704521"> </br> [hongyangAndroid](https://github.com/hongyangAndroid) | ![](https://github-readme-stats.vercel.app/api?username=hongyangAndroid) | [okhttputils](https://github.com/hongyangAndroid/okhttputils) </br> ![](https://img.shields.io/github/stars/hongyangAndroid/okhttputils.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidAutoLayout](https://github.com/hongyangAndroid/AndroidAutoLayout) </br> ![](https://img.shields.io/github/stars/hongyangAndroid/AndroidAutoLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [FlowLayout](https://github.com/hongyangAndroid/FlowLayout) </br> ![](https://img.shields.io/github/stars/hongyangAndroid/FlowLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 9 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1169522"> </br> [Trinea](https://github.com/Trinea) | ![](https://github-readme-stats.vercel.app/api?username=Trinea) | [android-open-project](https://github.com/Trinea/android-open-project) </br> ![](https://img.shields.io/github/stars/Trinea/android-open-project.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [android-common](https://github.com/Trinea/android-common) </br> ![](https://img.shields.io/github/stars/Trinea/android-common.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 10 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/17978187"> </br> [Blankj](https://github.com/Blankj) | ![](https://github-readme-stats.vercel.app/api?username=Blankj) </br> <details><summary>有效 Star 数 ![](https://img.shields.io/badge/star-40.2k-blue)</summary> ![](https://img.shields.io/github/stars/Blankj/AndroidUtilCode.svg) + ![](https://img.shields.io/github/stars/Blankj/AndroidStandardDevelop.svg) + ![](https://img.shields.io/github/stars/Blankj/AndroidOfferKiller.svg) + </br> ![](https://img.shields.io/github/stars/Blankj/FreeProGuard.svg) + ![](https://img.shields.io/github/stars/Blankj/SwipePanel.svg) + ![](https://img.shields.io/github/stars/Blankj/ALog.svg) + </br> ![](https://img.shields.io/github/stars/Blankj/RxBus.svg) + ![](https://img.shields.io/github/stars/Blankj/AucFrameTemplate.svg) + ![](https://img.shields.io/github/stars/Blankj/ProgressRing.svg) + </br> ![](https://img.shields.io/github/stars/Blankj/HelloKotlin.svg) </details> | [AndroidUtilCode](https://github.com/Blankj/AndroidUtilCode) </br> ![](https://img.shields.io/github/stars/Blankj/AndroidUtilCode.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidStandardDevelop](https://github.com/Blankj/AndroidStandardDevelop) </br> ![](https://img.shields.io/github/stars/Blankj/AndroidStandardDevelop.svg) |
| 11 | 未知 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/118523"> </br> [skylot](https://github.com/skylot) | ![](https://github-readme-stats.vercel.app/api?username=skylot) | [jadx](https://github.com/skylot/jadx) </br> ![](https://img.shields.io/github/stars/skylot/jadx.svg) |
| 12 | 奥地利 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/6759734"> </br> [PhilJay](https://github.com/PhilJay) | ![](https://github-readme-stats.vercel.app/api?username=PhilJay) | [MPAndroidChart](https://github.com/PhilJay/MPAndroidChart) </br> ![](https://img.shields.io/github/stars/PhilJay/MPAndroidChart.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 13 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/15711968"> </br> [JessYanCoding](https://github.com/JessYanCoding) | ![](https://github-readme-stats.vercel.app/api?username=JessYanCoding) | [AndroidAutoSize](https://github.com/JessYanCoding/AndroidAutoSize) </br> ![](https://img.shields.io/github/stars/JessYanCoding/AndroidAutoSize.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [MVPArms](https://github.com/JessYanCoding/MVPArms) </br> ![](https://img.shields.io/github/stars/JessYanCoding/MVPArms.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ProgressManager](https://github.com/JessYanCoding/ProgressManager) </br> ![](https://img.shields.io/github/stars/JessYanCoding/ProgressManager.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 14 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/28616817?v=4"> </br> [getActivity](https://github.com/getActivity) | ![](https://github-readme-stats.vercel.app/api?username=getActivity) | [AndroidProject](https://github.com/getActivity/AndroidProject) </br> ![](https://img.shields.io/github/stars/getActivity/AndroidProject.svg)</br>[XXPermissions](https://github.com/getActivity/XXPermissions) </br> ![](https://img.shields.io/github/stars/getActivity/XXPermissions.svg)</br>[Toaster](https://github.com/getActivity/Toaster) </br> ![](https://img.shields.io/github/stars/getActivity/Toaster.svg) |
| 15 | 美国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1820165"> </br> [afollestad](https://github.com/afollestad) | ![](https://github-readme-stats.vercel.app/api?username=afollestad) | [material-dialogs](https://github.com/afollestad/material-dialogs) </br> ![](https://img.shields.io/github/stars/afollestad/material-dialogs.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [aesthetic](https://github.com/afollestad/aesthetic) </br> ![](https://img.shields.io/github/stars/afollestad/aesthetic.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [drag-select-recyclerview](https://github.com/afollestad/drag-select-recyclerview) </br> ![](https://img.shields.io/github/stars/afollestad/drag-select-recyclerview.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 16 | 奥地利 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1476232"> </br> [mikepenz](https://github.com/mikepenz) | ![](https://github-readme-stats.vercel.app/api?username=mikepenz) | [MaterialDrawer](https://github.com/mikepenz/MaterialDrawer) </br> ![](https://img.shields.io/github/stars/mikepenz/MaterialDrawer.svg) </br> [Android-ActionItemBadge](https://github.com/mikepenz/Android-ActionItemBadge) </br> ![](https://img.shields.io/github/stars/mikepenz/Android-ActionItemBadge.svg) </br> [FastAdapter](https://github.com/mikepenz/FastAdapter) </br> ![](https://img.shields.io/github/stars/mikepenz/FastAdapter.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 17 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/8949716"> </br> [bingoogolapple](https://github.com/bingoogolapple) | ![](https://github-readme-stats.vercel.app/api?username=bingoogolapple) | [BGAQRCode-Android](https://github.com/bingoogolapple/BGAQRCode-Android) </br> ![](https://img.shields.io/github/stars/bingoogolapple/BGAQRCode-Android.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [BGARefreshLayout-Android](https://github.com/bingoogolapple/BGARefreshLayout-Android) </br> ![](https://img.shields.io/github/stars/bingoogolapple/BGARefreshLayout-Android.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [BGABanner-Android](https://github.com/bingoogolapple/BGABanner-Android) </br> ![](https://img.shields.io/github/stars/bingoogolapple/BGABanner-Android.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 18 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/11567071"> </br> [scwang90](https://github.com/scwang90) | ![](https://github-readme-stats.vercel.app/api?username=scwang90) | [SmartRefreshLayout](https://github.com/scwang90/SmartRefreshLayout) </br> ![](https://img.shields.io/github/stars/scwang90/SmartRefreshLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 19 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7698209"> </br> [CymChad](https://github.com/CymChad) | ![](https://github-readme-stats.vercel.app/api?username=CymChad) | [BaseRecyclerViewAdapterHelper](https://github.com/CymChad/BaseRecyclerViewAdapterHelper) </br> ![](https://img.shields.io/github/stars/CymChad/BaseRecyclerViewAdapterHelper.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 20 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/13534988"> </br> [yanzhenjie](https://github.com/yanzhenjie) | ![](https://github-readme-stats.vercel.app/api?username=yanzhenjie) | [AndPermission](https://github.com/yanzhenjie/AndPermission) </br> ![](https://img.shields.io/github/stars/yanzhenjie/AndPermission.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SwipeRecyclerView](https://github.com/yanzhenjie/SwipeRecyclerView) </br> ![](https://img.shields.io/github/stars/yanzhenjie/SwipeRecyclerView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [NoHttp](https://github.com/yanzhenjie/NoHttp) </br> ![](https://img.shields.io/github/stars/yanzhenjie/NoHttp.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 21 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/464330"> </br> [mcxiaoke](https://github.com/mcxiaoke) | ![](https://github-readme-stats.vercel.app/api?username=mcxiaoke) | [packer-ng-plugin](https://github.com/mcxiaoke/packer-ng-plugin) </br> ![](https://img.shields.io/github/stars/mcxiaoke/packer-ng-plugin.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [android-volley](https://github.com/mcxiaoke/android-volley) </br> ![](https://img.shields.io/github/stars/mcxiaoke/android-volley.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [awesome-kotlin](https://github.com/mcxiaoke/awesome-kotlin) </br> ![](https://img.shields.io/github/stars/mcxiaoke/awesome-kotlin.svg) |
| 22 | 澳大利亚 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1089616"> </br> [orhanobut](https://github.com/orhanobut) | ![](https://github-readme-stats.vercel.app/api?username=orhanobut) | [logger](https://github.com/orhanobut/logger) </br> ![](https://img.shields.io/github/stars/orhanobut/logger.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [dialogplus](https://github.com/orhanobut/dialogplus) </br> ![](https://img.shields.io/github/stars/orhanobut/dialogplus.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [hawk](https://github.com/orhanobut/hawk) </br> ![](https://img.shields.io/github/stars/orhanobut/hawk.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 23 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10770362"> </br> [CarGuo](https://github.com/CarGuo) | ![](https://github-readme-stats.vercel.app/api?username=CarGuo) </br> <details><summary>有效 Star 数 ![](https://img.shields.io/badge/star-23.3k-blue)</summary>![](https://img.shields.io/github/stars/CarGuo/GSYVideoPlayer.svg) + ![](https://img.shields.io/github/stars/CarGuo/GSYGithubAppKotlin.svg) + ![](https://img.shields.io/github/stars/CarGuo/GSYRecordWave.svg) + </br> ![](https://img.shields.io/github/stars/CarGuo/GSYRickText.svg) + ![](https://img.shields.io/github/stars/CarGuo/FrescoUtils.svg) + ![](https://img.shields.io/github/stars/CarGuo/CustomActionWebView.svg) + </br> ![](https://img.shields.io/github/stars/CarGuo/LbsMap.svg) + ![](https://img.shields.io/github/stars/CarGuo/LazyRecyclerAdapter.svg) + ![](https://img.shields.io/github/stars/CarGuo/VideoRecord.svg) + </br> ![](https://img.shields.io/github/stars/CarGuo/linkagescroll.svg) + ![](https://img.shields.io/github/stars/CarGuo/AnimationMenu.svg) + ![](https://img.shields.io/github/stars/CarGuo/ImageGalleryOptimize.svg) </details> | [GSYVideoPlayer](https://github.com/CarGuo/GSYVideoPlayer) </br> ![](https://img.shields.io/github/stars/CarGuo/GSYVideoPlayer.svg) </br> [GSYGithubAppKotlin](https://github.com/CarGuo/GSYGithubAppKotlin) </br> ![](https://img.shields.io/github/stars/CarGuo/GSYGithubAppKotlin.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [GSYRecordWave](https://github.com/CarGuo/GSYRecordWave) </br> ![](https://img.shields.io/github/stars/CarGuo/GSYRecordWave.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 24 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/20859208"> </br> [guolindev](https://github.com/guolindev) | ![](https://github-readme-stats.vercel.app/api?username=guolindev) | [LitePal](https://github.com/guolindev/LitePal) </br> ![](https://img.shields.io/github/stars/guolindev/LitePal.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [giffun](https://github.com/guolindev/giffun) </br> ![](https://img.shields.io/github/stars/guolindev/giffun.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [PermissionX](https://github.com/guolindev/PermissionX) </br> ![](https://img.shields.io/github/stars/guolindev/PermissionX.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 25 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4233744"> </br> [tiann](https://github.com/tiann) | ![](https://github-readme-stats.vercel.app/api?username=tiann) | [epic](https://github.com/tiann/epic) </br> ![](https://img.shields.io/github/stars/tiann/epic.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [understand-plugin-framework](https://github.com/tiann/understand-plugin-framework) </br> ![](https://img.shields.io/github/stars/tiann/understand-plugin-framework.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [FreeReflection](https://github.com/tiann/FreeReflection) </br> ![](https://img.shields.io/github/stars/tiann/FreeReflection.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 26 | 未知 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/5897464"> </br> [yuliskov](https://github.com/yuliskov) | ![](https://github-readme-stats.vercel.app/api?username=yuliskov) | [SmartTubeNext](https://github.com/yuliskov/SmartTubeNext) </br> ![](https://img.shields.io/github/stars/yuliskov/SmartTubeNext.svg) </br> [SmartTubeLegacy](https://github.com/yuliskov/SmartTubeLegacy) </br> ![](https://img.shields.io/github/stars/yuliskov/SmartTubeLegacy.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [LeanKeyKeyboard](https://github.com/yuliskov/LeanKeyKeyboard) </br> ![](https://img.shields.io/github/stars/yuliskov/LeanKeyKeyboard.svg) |
| 27 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/22100988"> </br> [yangchong211](https://github.com/yangchong211) | ![](https://github-readme-stats.vercel.app/api?username=yangchong211) | [YCAppTool](https://github.com/yangchong211/YCAppTool) </br> ![](https://img.shields.io/github/stars/yangchong211/YCAppTool.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [YCVideoPlayer](https://github.com/yangchong211/YCVideoPlayer) </br> ![](https://img.shields.io/github/stars/yangchong211/YCVideoPlayer.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [YCWebView](https://github.com/yangchong211/YCWebView) </br> ![](https://img.shields.io/github/stars/yangchong211/YCWebView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 28 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/13421975"> </br> [jeasonlzy](https://github.com/jeasonlzy) | ![](https://github-readme-stats.vercel.app/api?username=jeasonlzy) | [okhttp-OkGo](https://github.com/jeasonlzy/okhttp-OkGo) </br> ![](https://img.shields.io/github/stars/jeasonlzy/okhttp-OkGo.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ImagePicker](https://github.com/jeasonlzy/ImagePicker) </br> ![](https://img.shields.io/github/stars/jeasonlzy/ImagePicker.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [NineGridView](https://github.com/jeasonlzy/NineGridView) </br> ![](https://img.shields.io/github/stars/jeasonlzy/NineGridView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 29 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/212984"> </br> [lzyzsd](https://github.com/lzyzsd) | ![](https://github-readme-stats.vercel.app/api?username=lzyzsd) | [JsBridge](https://github.com/lzyzsd/JsBridge) </br> ![](https://img.shields.io/github/stars/lzyzsd/JsBridge.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Awesome-RxJava](https://github.com/lzyzsd/Awesome-RxJava) </br> ![](https://img.shields.io/github/stars/lzyzsd/Awesome-RxJava.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [CircleProgress](https://github.com/lzyzsd/CircleProgress) </br> ![](https://img.shields.io/github/stars/lzyzsd/CircleProgress.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 30 | 美国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/611784"> </br> [iBotPeaches](https://github.com/iBotPeaches) | ![](https://github-readme-stats.vercel.app/api?username=iBotPeaches) | [Apktool](https://github.com/iBotPeaches/Apktool) </br> ![](https://img.shields.io/github/stars/iBotPeaches/Apktool.svg) |
| 31 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4469895"> </br> [zhanghai](https://github.com/zhanghai) | ![](https://github-readme-stats.vercel.app/api?username=zhanghai) | [Douya](https://github.com/zhanghai/Douya) </br> ![](https://img.shields.io/github/stars/zhanghai/Douya.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [MaterialProgressBar](https://github.com/zhanghai/MaterialProgressBar) </br> ![](https://img.shields.io/github/stars/zhanghai/MaterialProgressBar.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [MaterialFiles](https://github.com/zhanghai/MaterialFiles) </br> ![](https://img.shields.io/github/stars/zhanghai/MaterialFiles.svg) |
| 32 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1646590"> </br> [mzlogin](https://github.com/mzlogin) | ![](https://github-readme-stats.vercel.app/api?username=mzlogin) | [awesome-adb](https://github.com/mzlogin/awesome-adb) </br> ![](https://img.shields.io/github/stars/mzlogin/awesome-adb.svg) </br> [markdown-intro](https://github.com/mzlogin/markdown-intro) </br> ![](https://img.shields.io/github/stars/mzlogin/markdown-intro.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 33 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/43346411"> </br> [KunMinX](https://github.com/KunMinX) | ![](https://github-readme-stats.vercel.app/api?username=KunMinX) | [Jetpack-MVVM-Best-Practice](https://github.com/KunMinX/Jetpack-MVVM-Best-Practice) </br> ![](https://img.shields.io/github/stars/KunMinX/Jetpack-MVVM-Best-Practice.svg) </br> [Linkage-RecyclerView](https://github.com/KunMinX/Linkage-RecyclerView) </br> ![](https://img.shields.io/github/stars/KunMinX/Linkage-RecyclerView.svg) |
| 34 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/3666423"> </br> [H07000223](https://github.com/H07000223) | ![](https://github-readme-stats.vercel.app/api?username=H07000223) | [FlycoTabLayout](https://github.com/H07000223/FlycoTabLayout) </br> ![](https://img.shields.io/github/stars/H07000223/FlycoTabLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 35 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/18702692"> </br> [barry-ran](https://github.com/barry-ran) | ![](https://github-readme-stats.vercel.app/api?username=barry-ran) | [QtScrcpy](https://github.com/barry-ran/QtScrcpy) </br> ![](https://img.shields.io/github/stars/barry-ran/QtScrcpy.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 36 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/9796998"> </br> [GcsSloop](https://github.com/GcsSloop) | ![](https://github-readme-stats.vercel.app/api?username=GcsSloop) | [AndroidNote](https://github.com/GcsSloop/AndroidNote) </br> ![](https://img.shields.io/github/stars/GcsSloop/AndroidNote.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [rclayout](https://github.com/GcsSloop/rclayout) </br> ![](https://img.shields.io/github/stars/GcsSloop/rclayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [pager-layoutmanager](https://github.com/GcsSloop/pager-layoutmanager) </br> ![](https://img.shields.io/github/stars/GcsSloop/pager-layoutmanager.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 37 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1683811"> </br> [hehonghui](https://github.com/hehonghui) | ![](https://github-readme-stats.vercel.app/api?username=hehonghui) </br> <details><summary>有效 Star 数 ![](https://img.shields.io/badge/star-16k-blue)</summary> ![](https://img.shields.io/github/stars/hehonghui/android-tech-frontier.svg) + ![](https://img.shields.io/github/stars/hehonghui/AndroidEventBus.svg) + ![](https://img.shields.io/github/stars/hehonghui/Colorful.svg) + </br> ![](https://img.shields.io/github/stars/hehonghui/mockito-doc-zh.svg) + ![](https://img.shields.io/github/stars/hehonghui/android_my_pull_refresh_view.svg) + ![](https://img.shields.io/github/stars/hehonghui/mmat.svg) + </br> ![](https://img.shields.io/github/stars/hehonghui/simple_net_framework.svg) + ![](https://img.shields.io/github/stars/hehonghui/android_dp_analysis_code.svg) + ![](https://img.shields.io/github/stars/hehonghui/the-tech-frontier-app.svg) + </br> ![](https://img.shields.io/github/stars/hehonghui/simple_imageloader.svg) + ![](https://img.shields.io/github/stars/hehonghui/commonadapter.svg) + ![](https://img.shields.io/github/stars/hehonghui/app-test-arch.svg) + </br> ![](https://img.shields.io/github/stars/hehonghui/android_jtm_sourcecode.svg) + ![](https://img.shields.io/github/stars/hehonghui/dp-issues.svg) + ![](https://img.shields.io/github/stars/hehonghui/SimpleTvIME.svg) + </br> ![](https://img.shields.io/github/stars/hehonghui/Chris-Android-PullToRefresh.svg) + ![](https://img.shields.io/github/stars/hehonghui/ripplelayout.svg) </details> | [android-tech-frontier](https://github.com/hehonghui/android-tech-frontier) </br> ![](https://img.shields.io/github/stars/hehonghui/android-tech-frontier.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidEventBus](https://github.com/hehonghui/AndroidEventBus) </br> ![](https://img.shields.io/github/stars/hehonghui/AndroidEventBus.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Colorful](https://github.com/hehonghui/Colorful) </br> ![](https://img.shields.io/github/stars/hehonghui/Colorful.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 38 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/5105854"> </br> [pppscn](https://github.com/pppscn) | ![](https://github-readme-stats.vercel.app/api?username=pppscn) | [SmsForwarder](https://github.com/pppscn/SmsForwarder) </br> ![](https://img.shields.io/github/stars/pppscn/SmsForwarder.svg) |
| 39 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/12167762"> </br> [xmuSistone](https://github.com/xmuSistone) | ![](https://github-readme-stats.vercel.app/api?username=xmuSistone) | [ViewpagerTransition](https://github.com/xmuSistone/ViewpagerTransition) </br> ![](https://img.shields.io/github/stars/xmuSistone/ViewpagerTransition.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [CardSlidePanel](https://github.com/xmuSistone/CardSlidePanel) </br> ![](https://img.shields.io/github/stars/xmuSistone/CardSlidePanel.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidPileLayout](https://github.com/xmuSistone/AndroidPileLayout) </br> ![](https://img.shields.io/github/stars/xmuSistone/AndroidPileLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 40 | 美国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1207403"> </br> [Konloch](https://github.com/Konloch) | ![](https://github-readme-stats.vercel.app/api?username=Konloch) | [bytecode-viewer](https://github.com/Konloch/bytecode-viewer) </br> ![](https://img.shields.io/github/stars/Konloch/bytecode-viewer.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 41 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/17797018"> </br> [JackyAndroid](https://github.com/JackyAndroid) | ![](https://github-readme-stats.vercel.app/api?username=JackyAndroid) | [AndroidInterview-Q-A](https://github.com/JackyAndroid/AndroidInterview-Q-A) </br> ![](https://img.shields.io/github/stars/JackyAndroid/AndroidInterview-Q-A.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidChromium](https://github.com/JackyAndroid/AndroidChromium) </br> ![](https://img.shields.io/github/stars/JackyAndroid/AndroidChromium.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidTVLauncher](https://github.com/JackyAndroid/AndroidTVLauncher) </br> ![](https://img.shields.io/github/stars/JackyAndroid/AndroidTVLauncher.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 42 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/8827239"> </br> [youth5201314](https://github.com/youth5201314) | ![](https://github-readme-stats.vercel.app/api?username=youth5201314) | [banner](https://github.com/youth5201314/banner) </br> ![](https://img.shields.io/github/stars/youth5201314/banner.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [XFrame](https://github.com/youth5201314/XFrame) </br> ![](https://img.shields.io/github/stars/youth5201314/XFrame.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 43 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4538051"> </br> [Curzibn](https://github.com/Curzibn) | ![](https://github-readme-stats.vercel.app/api?username=Curzibn) | [Luban](https://github.com/Curzibn/Luban) </br> ![](https://img.shields.io/github/stars/Curzibn/Luban.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 44 | 印度 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/8044760"> </br> [aritraroy](https://github.com/aritraroy) | ![](https://github-readme-stats.vercel.app/api?username=aritraroy) | [UltimateAndroidReference](https://github.com/aritraroy/UltimateAndroidReference) </br> ![](https://img.shields.io/github/stars/aritraroy/UltimateAndroidReference.svg) </br> [PatternLockView](https://github.com/aritraroy/PatternLockView) </br> ![](https://img.shields.io/github/stars/aritraroy/PatternLockView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [PinLockView](https://github.com/aritraroy/PinLockView) </br> ![](https://img.shields.io/github/stars/aritraroy/PinLockView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 45 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/15059629"> </br> [xuexiangjys](https://github.com/xuexiangjys) | ![](https://github-readme-stats.vercel.app/api?username=xuexiangjys) | [XUI](https://github.com/xuexiangjys/XUI) </br> ![](https://img.shields.io/github/stars/xuexiangjys/XUI.svg) </br> [XUpdate](https://github.com/xuexiangjys/XUpdate) </br> ![](https://img.shields.io/github/stars/xuexiangjys/XUpdate.svg) </br> [XPush](https://github.com/xuexiangjys/XPush) </br> ![](https://img.shields.io/github/stars/xuexiangjys/XPush.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 46 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/24836954"> </br> [LuckSiege](https://github.com/LuckSiege) | ![](https://github-readme-stats.vercel.app/api?username=LuckSiege) | [PictureSelector](https://github.com/LuckSiege/PictureSelector) </br> ![](https://img.shields.io/github/stars/LuckSiege/PictureSelector.svg) |
| 47 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/17464480"> </br> [JsonChao](https://github.com/JsonChao) | ![](https://github-readme-stats.vercel.app/api?username=JsonChao) | [Awesome-Android-Interview](https://github.com/JsonChao/Awesome-Android-Interview) </br> ![](https://img.shields.io/github/stars/JsonChao/Awesome-Android-Interview.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Awesome-Android-Notebook](https://github.com/JsonChao/Awesome-Android-Notebook) </br> ![](https://img.shields.io/github/stars/JsonChao/Awesome-Android-Notebook.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Awesome-WanAndroid](https://github.com/JsonChao/Awesome-WanAndroid) </br> ![](https://img.shields.io/github/stars/JsonChao/Awesome-WanAndroid.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 48 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/13393725"> </br> [francistao](https://github.com/francistao) | ![](https://github-readme-stats.vercel.app/api?username=francistao) | [LearningNotes](https://github.com/francistao/LearningNotes) </br> ![](https://img.shields.io/github/stars/francistao/LearningNotes.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 49 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/9691640"> </br> [YoKeyword](https://github.com/YoKeyword) | ![](https://github-readme-stats.vercel.app/api?username=YoKeyword) | [Fragmentation](https://github.com/YoKeyword/Fragmentation) </br> ![](https://img.shields.io/github/stars/YoKeyword/Fragmentation.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [IndexableRecyclerView](https://github.com/YoKeyword/IndexableRecyclerView) </br> ![](https://img.shields.io/github/stars/YoKeyword/IndexableRecyclerView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 50 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/23047875"> </br> [gyf-dev](https://github.com/gyf-dev) | ![](https://github-readme-stats.vercel.app/api?username=gyf-dev) | [ImmersionBar](https://github.com/gyf-dev/ImmersionBar) </br> ![](https://img.shields.io/github/stars/gyf-dev/ImmersionBar.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Cactus](https://github.com/gyf-dev/Cactus) </br> ![](https://img.shields.io/github/stars/gyf-dev/Cactus.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 51 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/16453532"> </br> [mcxtzhang](https://github.com/mcxtzhang) | ![](https://github-readme-stats.vercel.app/api?username=mcxtzhang) | [SwipeDelMenuLayout](https://github.com/mcxtzhang/SwipeDelMenuLayout) </br> ![](https://img.shields.io/github/stars/mcxtzhang/SwipeDelMenuLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ZLayoutManager](https://github.com/mcxtzhang/ZLayoutManager) </br> ![](https://img.shields.io/github/stars/mcxtzhang/ZLayoutManager.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SuspensionIndexBar](https://github.com/mcxtzhang/SuspensionIndexBar) </br> ![](https://img.shields.io/github/stars/mcxtzhang/SuspensionIndexBar.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 52 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/15052574"> </br> [youlookwhat](https://github.com/youlookwhat) | ![](https://github-readme-stats.vercel.app/api?username=youlookwhat) | [CloudReader](https://github.com/youlookwhat/CloudReader) </br> ![](https://img.shields.io/github/stars/youlookwhat/CloudReader.svg)</br>[ByWebView](https://github.com/youlookwhat/ByWebView) </br> ![](https://img.shields.io/github/stars/youlookwhat/ByWebView.svg)</br>[ByRecyclerView](https://github.com/youlookwhat/ByRecyclerView) </br> ![](https://img.shields.io/github/stars/youlookwhat/ByRecyclerView.svg) |
| 53 | 德国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/583598"> </br> [sockeqwe](https://github.com/sockeqwe) | ![](https://github-readme-stats.vercel.app/api?username=sockeqwe) | [mosby](https://github.com/sockeqwe/mosby) </br> ![](https://img.shields.io/github/stars/sockeqwe/mosby.svg) </br> [AdapterDelegates](https://github.com/sockeqwe/AdapterDelegates) </br> ![](https://img.shields.io/github/stars/sockeqwe/AdapterDelegates.svg) </br> [fragmentargs](https://github.com/sockeqwe/fragmentargs) </br> ![](https://img.shields.io/github/stars/sockeqwe/fragmentargs.svg) |
| 54 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/17683613"> </br> [Tamsiree](https://github.com/Tamsiree) | ![](https://github-readme-stats.vercel.app/api?username=Tamsiree) | [RxTool](https://github.com/Tamsiree/RxTool) </br> ![](https://img.shields.io/github/stars/Tamsiree/RxTool.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 55 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/540253"> </br> [pxb1988](https://github.com/pxb1988) | ![](https://github-readme-stats.vercel.app/api?username=pxb1988) | [dex2jar](https://github.com/pxb1988/dex2jar) </br> ![](https://img.shields.io/github/stars/pxb1988/dex2jar.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 56 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4454687"> </br> [rengwuxian](https://github.com/rengwuxian) | ![](https://github-readme-stats.vercel.app/api?username=rengwuxian) | [MaterialEditText](https://github.com/rengwuxian/MaterialEditText) </br> ![](https://img.shields.io/github/stars/rengwuxian/MaterialEditText.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 57 | 美国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/389236"> </br> [ashishb](https://github.com/ashishb) | ![](https://github-readme-stats.vercel.app/api?username=ashishb) | [android-security-awesome](https://github.com/ashishb/android-security-awesome) </br> ![](https://img.shields.io/github/stars/ashishb/android-security-awesome.svg) </br> [adb-enhanced](https://github.com/ashishb/adb-enhanced) </br> ![](https://img.shields.io/github/stars/ashishb/adb-enhanced.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 58 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/6347031"> </br> [yipianfengye](https://github.com/yipianfengye) | ![](https://github-readme-stats.vercel.app/api?username=yipianfengye) | [android-zxingLibrary](https://github.com/yipianfengye/android-zxingLibrary) </br> ![](https://img.shields.io/github/stars/yipianfengye/android-zxingLibrary.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [android-adDialog](https://github.com/yipianfengye/android-adDialog) </br> ![](https://img.shields.io/github/stars/yipianfengye/android-adDialog.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [androidProject](https://github.com/yipianfengye/androidProject) </br> ![](https://img.shields.io/github/stars/yipianfengye/androidProject.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 59 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4155835"> </br> [luckybilly](https://github.com/luckybilly) | ![](https://github-readme-stats.vercel.app/api?username=luckybilly) | [CC](https://github.com/luckybilly/CC) </br> ![](https://img.shields.io/github/stars/luckybilly/CC.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SmartSwipe](https://github.com/luckybilly/SmartSwipe) </br> ![](https://img.shields.io/github/stars/luckybilly/SmartSwipe.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [PreLoader](https://github.com/luckybilly/PreLoader) </br> ![](https://img.shields.io/github/stars/luckybilly/PreLoader.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 60 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/12854998"> </br> [githubwing](https://github.com/githubwing) | ![](https://github-readme-stats.vercel.app/api?username=githubwing) | [ZoomHeader](https://github.com/githubwing/ZoomHeader) </br> ![](https://img.shields.io/github/stars/githubwing/ZoomHeader.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [DragPhotoView](https://github.com/githubwing/DragPhotoView) </br> ![](https://img.shields.io/github/stars/githubwing/DragPhotoView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [GankClient-Kotlin](https://github.com/githubwing/GankClient-Kotlin) </br> ![](https://img.shields.io/github/stars/githubwing/GankClient-Kotlin.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 61 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/8130553"> </br> [sunfusheng](https://github.com/sunfusheng) | ![](https://github-readme-stats.vercel.app/api?username=sunfusheng) | [MarqueeView](https://github.com/sunfusheng/MarqueeView) </br> ![](https://img.shields.io/github/stars/sunfusheng/MarqueeView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [StickyHeaderListView](https://github.com/sunfusheng/StickyHeaderListView) </br> ![](https://img.shields.io/github/stars/sunfusheng/StickyHeaderListView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [GlideImageView](https://github.com/sunfusheng/GlideImageView) </br> ![](https://img.shields.io/github/stars/sunfusheng/GlideImageView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 62 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/15133565"> </br> [smuyyh](https://github.com/smuyyh) | ![](https://github-readme-stats.vercel.app/api?username=smuyyh) | [BookReader](https://github.com/smuyyh/BookReader) </br> ![](https://img.shields.io/github/stars/smuyyh/BookReader.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ImageSelector](https://github.com/smuyyh/ImageSelector) </br> ![](https://img.shields.io/github/stars/smuyyh/ImageSelector.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SprintNBA](https://github.com/smuyyh/SprintNBA) </br> ![](https://img.shields.io/github/stars/smuyyh/SprintNBA.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 63 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7184320"> </br> [laobie](https://github.com/laobie) | ![](https://github-readme-stats.vercel.app/api?username=laobie) | [StatusBarUtil](https://github.com/laobie/StatusBarUtil) </br> ![](https://img.shields.io/github/stars/laobie/StatusBarUtil.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [NineGridImageView](https://github.com/laobie/NineGridImageView) </br> ![](https://img.shields.io/github/stars/laobie/NineGridImageView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 64 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4995173"> </br> [jenly1314](https://github.com/jenly1314) | ![](https://github-readme-stats.vercel.app/api?username=jenly1314) | [ZXingLite](https://github.com/jenly1314/ZXingLite) </br> ![](https://img.shields.io/github/stars/jenly1314/ZXingLite.svg) </br> [AppUpdater](https://github.com/jenly1314/AppUpdater) </br> ![](https://img.shields.io/github/stars/jenly1314/AppUpdater.svg) </br> [CircleProgressView](https://github.com/jenly1314/CircleProgressView) </br> ![](https://img.shields.io/github/stars/jenly1314/CircleProgressView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 65 | 日本 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/801987"> </br> [ksoichiro](https://github.com/ksoichiro) | ![](https://github-readme-stats.vercel.app/api?username=ksoichiro) | [Android-ObservableScrollView](https://github.com/ksoichiro/Android-ObservableScrollView) </br> ![](https://img.shields.io/github/stars/ksoichiro/Android-ObservableScrollView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [awesome-gradle](https://github.com/ksoichiro/awesome-gradle) </br> ![](https://img.shields.io/github/stars/ksoichiro/awesome-gradle.svg) </br> [gradle-eclipse-aar-plugin](https://github.com/ksoichiro/gradle-eclipse-aar-plugin) </br> ![](https://img.shields.io/github/stars/ksoichiro/gradle-eclipse-aar-plugin.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 66 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/15808532"> </br> [nanchen2251](https://github.com/nanchen2251) | ![](https://github-readme-stats.vercel.app/api?username=nanchen2251) | [CompressHelper](https://github.com/nanchen2251/CompressHelper) </br> ![](https://img.shields.io/github/stars/nanchen2251/CompressHelper.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [BankCardUtils](https://github.com/nanchen2251/BankCardUtils) </br> ![](https://img.shields.io/github/stars/nanchen2251/BankCardUtils.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ScreenRecordHelper](https://github.com/nanchen2251/ScreenRecordHelper) </br> ![](https://img.shields.io/github/stars/nanchen2251/ScreenRecordHelper.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 67 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1456490"> </br> [kesenhoo](https://github.com/kesenhoo) | ![](https://github-readme-stats.vercel.app/api?username=kesenhoo) | [android-training-course-in-chinese](https://github.com/kesenhoo/android-training-course-in-chinese) </br> ![](https://img.shields.io/github/stars/kesenhoo/android-training-course-in-chinese.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 68 | 法国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/92280"> </br> [tbruyelle](https://github.com/tbruyelle) | ![](https://github-readme-stats.vercel.app/api?username=tbruyelle) | [RxPermissions](https://github.com/tbruyelle/RxPermissions) </br> ![](https://img.shields.io/github/stars/tbruyelle/RxPermissions.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 69 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/6748135"> </br> [hackware1993](https://github.com/hackware1993) | ![](https://github-readme-stats.vercel.app/api?username=hackware1993) | [MagicIndicator](https://github.com/hackware1993/MagicIndicator) </br> ![](https://img.shields.io/github/stars/hackware1993/MagicIndicator.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [WaveView](https://github.com/hackware1993/WaveView) </br> ![](https://img.shields.io/github/stars/hackware1993/WaveView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 70 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7941050"> </br> [android-cjj](https://github.com/android-cjj) | ![](https://github-readme-stats.vercel.app/api?username=android-cjj) | [JJSearchViewAnim](https://github.com/android-cjj/JJSearchViewAnim) </br> ![](https://img.shields.io/github/stars/android-cjj/JJSearchViewAnim.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [BeautifulRefreshLayout](https://github.com/android-cjj/BeautifulRefreshLayout) </br> ![](https://img.shields.io/github/stars/android-cjj/BeautifulRefreshLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Android-MaterialRefreshLayout](https://github.com/android-cjj/Android-MaterialRefreshLayout) </br> ![](https://img.shields.io/github/stars/android-cjj/Android-MaterialRefreshLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 71 | 爱沙尼亚 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/9644546"> </br> [yarolegovich](https://github.com/yarolegovich) | ![](https://github-readme-stats.vercel.app/api?username=yarolegovich) | [DiscreteScrollView](https://github.com/yarolegovich/DiscreteScrollView) </br> ![](https://img.shields.io/github/stars/yarolegovich/DiscreteScrollView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SlidingRootNav](https://github.com/yarolegovich/SlidingRootNav) </br> ![](https://img.shields.io/github/stars/yarolegovich/SlidingRootNav.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [LovelyDialog](https://github.com/yarolegovich/LovelyDialog) </br> ![](https://img.shields.io/github/stars/yarolegovich/LovelyDialog.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 72 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/17163056"> </br> [Justson](https://github.com/Justson) | ![](https://github-readme-stats.vercel.app/api?username=Justson) | [AgentWeb](https://github.com/Justson/AgentWeb) </br> ![](https://img.shields.io/github/stars/Justson/AgentWeb.svg) </br> [AgentWebX5](https://github.com/Justson/AgentWebX5) </br> ![](https://img.shields.io/github/stars/Justson/AgentWebX5.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Downloader](https://github.com/Justson/Downloader) </br> ![](https://img.shields.io/github/stars/Justson/Downloader.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 73 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1026848"> </br> [dodola](https://github.com/dodola) | ![](https://github-readme-stats.vercel.app/api?username=dodola) | [HotFix](https://github.com/dodola/HotFix) </br> ![](https://img.shields.io/github/stars/dodola/HotFix.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br>[RocooFix](https://github.com/dodola/RocooFix) </br> ![](https://img.shields.io/github/stars/dodola/RocooFix.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br>[MetaballLoading](https://github.com/dodola/MetaballLoading) </br> ![](https://img.shields.io/github/stars/dodola/MetaballLoading.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 74 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/6268322"> </br> [hanks-zyh](https://github.com/hanks-zyh) | ![](https://github-readme-stats.vercel.app/api?username=hanks-zyh) | [HTextView](https://github.com/hanks-zyh/HTextView) </br> ![](https://img.shields.io/github/stars/hanks-zyh/HTextView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SmallBang](https://github.com/hanks-zyh/SmallBang) </br> ![](https://img.shields.io/github/stars/hanks-zyh/SmallBang.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [PasscodeView](https://github.com/hanks-zyh/PasscodeView) </br> ![](https://img.shields.io/github/stars/hanks-zyh/PasscodeView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 75 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/2297803"> </br> [HarlonWang](https://github.com/HarlonWang) | ![](https://github-readme-stats.vercel.app/api?username=HarlonWang) | [AVLoadingIndicatorView](https://github.com/HarlonWang/AVLoadingIndicatorView) </br> ![](https://img.shields.io/github/stars/HarlonWang/AVLoadingIndicatorView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 76 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/21078112"> </br> [liangjingkanji](https://github.com/liangjingkanji) | ![](https://github-readme-stats.vercel.app/api?username=liangjingkanji) | [BRV](https://github.com/liangjingkanji/BRV) </br> ![](https://img.shields.io/github/stars/liangjingkanji/BRV.svg) </br> [Net](https://github.com/liangjingkanji/Net) </br> ![](https://img.shields.io/github/stars/liangjingkanji/Net.svg) </br> [StateLayout](https://github.com/liangjingkanji/StateLayout) </br> ![](https://img.shields.io/github/stars/liangjingkanji/StateLayout.svg) |
| 77 | 波兰 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/3340954"> </br> [koral--](https://github.com/koral--) | ![](https://github-readme-stats.vercel.app/api?username=koral--) | [android-gif-drawable](https://github.com/koral--/android-gif-drawable) </br> ![](https://img.shields.io/github/stars/koral--/android-gif-drawable.svg) </br> [android-gradle-localization-plugin](https://github.com/koral--/android-gradle-localization-plugin) </br> ![](https://img.shields.io/github/stars/koral--/android-gradle-localization-plugin.svg) |
| 78 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/5111206"> </br> [pedant](https://github.com/pedant) | ![](https://github-readme-stats.vercel.app/api?username=pedant) | [sweet-alert-dialog](https://github.com/pedant/sweet-alert-dialog) </br> ![](https://img.shields.io/github/stars/pedant/sweet-alert-dialog.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [safe-java-js-webview-bridge](https://github.com/pedant/safe-java-js-webview-bridge) </br> ![](https://img.shields.io/github/stars/pedant/safe-java-js-webview-bridge.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 79 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4783781"> </br> [nekocode](https://github.com/nekocode) | ![](https://github-readme-stats.vercel.app/api?username=nekocode) | [CameraFilter](https://github.com/nekocode/CameraFilter) </br> ![](https://img.shields.io/github/stars/nekocode/CameraFilter.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Badge](https://github.com/nekocode/Badge) </br> ![](https://img.shields.io/github/stars/nekocode/Badge.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Emojix](https://github.com/nekocode/Emojix) </br> ![](https://img.shields.io/github/stars/nekocode/Emojix.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 80 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4426715"> </br> [junixapp](https://github.com/junixapp) | ![](https://github-readme-stats.vercel.app/api?username=junixapp) | [XPopup](https://github.com/junixapp/XPopup) </br> ![](https://img.shields.io/github/stars/junixapp/XPopup.svg) </br> [AndroidKTX](https://github.com/junixapp/AndroidKTX) </br> ![](https://img.shields.io/github/stars/junixapp/AndroidKTX.svg) </br> [XPopupExt](https://github.com/junixapp/XPopupExt) </br> ![](https://img.shields.io/github/stars/junixapp/XPopupExt.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 81 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/963906"> </br> [cymcsg](https://github.com/cymcsg) | ![](https://github-readme-stats.vercel.app/api?username=cymcsg) | [UltimateRecyclerView](https://github.com/cymcsg/UltimateRecyclerView) </br> ![](https://img.shields.io/github/stars/cymcsg/UltimateRecyclerView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [UltimateAndroid](https://github.com/cymcsg/UltimateAndroid) </br> ![](https://img.shields.io/github/stars/cymcsg/UltimateAndroid.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 82 | 未知 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/13744304"> </br> [roughike](https://github.com/roughike) | ![](https://github-readme-stats.vercel.app/api?username=roughike) </br> <details><summary>有效 Star 数 ![](https://img.shields.io/badge/star-9.5k-blue)</summary> ![](https://img.shields.io/github/stars/roughike/BottomBar.svg) + ![](https://img.shields.io/github/stars/roughike/SwipeSelector.svg) </details> | [BottomBar](https://github.com/roughike/BottomBar) </br> ![](https://img.shields.io/github/stars/roughike/BottomBar.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SwipeSelector](https://github.com/roughike/SwipeSelector) </br> ![](https://img.shields.io/github/stars/roughike/SwipeSelector.svg) |
| 83 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/5022927"> </br> [yujincheng08](https://github.com/yujincheng08) | ![](https://github-readme-stats.vercel.app/api?username=yujincheng08) | [BiliRoaming](https://github.com/yujincheng08/BiliRoaming) </br> ![](https://img.shields.io/github/stars/yujincheng08/BiliRoaming.svg) |
| 84 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/3346368"> </br> [jiang111](https://github.com/jiang111) | ![](https://github-readme-stats.vercel.app/api?username=jiang111) | [awesome-android-tips](https://github.com/jiang111/awesome-android-tips) </br> ![](https://img.shields.io/github/stars/jiang111/awesome-android-tips.svg) </br> [IndexRecyclerView](https://github.com/jiang111/IndexRecyclerView) </br> ![](https://img.shields.io/github/stars/jiang111/IndexRecyclerView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Awesome-RecyclerView-LayoutManager](https://github.com/jiang111/Awesome-RecyclerView-LayoutManager) </br> ![](https://img.shields.io/github/stars/jiang111/Awesome-RecyclerView-LayoutManager.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 85 | 西班牙 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4363807"> </br> [navasmdc](https://github.com/navasmdc) | ![](https://github-readme-stats.vercel.app/api?username=navasmdc) | [MaterialDesignLibrary](https://github.com/navasmdc/MaterialDesignLibrary) </br> ![](https://img.shields.io/github/stars/navasmdc/MaterialDesignLibrary.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [PhoneTutorial](https://github.com/navasmdc/PhoneTutorial) </br> ![](https://img.shields.io/github/stars/navasmdc/PhoneTutorial.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [BorderMenu](https://github.com/navasmdc/BorderMenu) </br> ![](https://img.shields.io/github/stars/navasmdc/BorderMenu.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 86 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/27602662"> </br> [AweiLoveAndroid](https://github.com/AweiLoveAndroid) | ![](https://github-readme-stats.vercel.app/api?username=AweiLoveAndroid) | [CommonDevKnowledge](https://github.com/AweiLoveAndroid/CommonDevKnowledge) </br> ![](https://img.shields.io/github/stars/AweiLoveAndroid/CommonDevKnowledge.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 87 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4018618"> </br> [seven332](https://github.com/seven332) | ![](https://github-readme-stats.vercel.app/api?username=seven332) | [EhViewer](https://github.com/seven332/EhViewer) </br> ![](https://img.shields.io/github/stars/seven332/EhViewer.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Nimingban](https://github.com/seven332/Nimingban) </br> ![](https://img.shields.io/github/stars/seven332/Nimingban.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [quickjs-android](https://github.com/seven332/quickjs-android) </br> ![](https://img.shields.io/github/stars/seven332/quickjs-android.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 88 | 日本 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1496485"> </br> [ogaclejapan](https://github.com/ogaclejapan) | ![](https://github-readme-stats.vercel.app/api?username=ogaclejapan) | [SmartTabLayout](https://github.com/ogaclejapan/SmartTabLayout) </br> ![](https://img.shields.io/github/stars/ogaclejapan/SmartTabLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ArcLayout](https://github.com/ogaclejapan/ArcLayout) </br> ![](https://img.shields.io/github/stars/ogaclejapan/ArcLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 89 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/3346272"> </br> [singwhatiwanna](https://github.com/singwhatiwanna) | ![](https://github-readme-stats.vercel.app/api?username=singwhatiwanna) | [dynamic-load-apk](https://github.com/singwhatiwanna/dynamic-load-apk) </br> ![](https://img.shields.io/github/stars/singwhatiwanna/dynamic-load-apk.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [android-art-res](https://github.com/singwhatiwanna/android-art-res) </br> ![](https://img.shields.io/github/stars/singwhatiwanna/android-art-res.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [PinnedHeaderExpandableListView](https://github.com/singwhatiwanna/PinnedHeaderExpandableListView) </br> ![](https://img.shields.io/github/stars/singwhatiwanna/PinnedHeaderExpandableListView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 90 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10400925"> </br> [huanghaibin-dev](https://github.com/huanghaibin-dev) | ![](https://github-readme-stats.vercel.app/api?username=huanghaibin-dev) | [CalendarView](https://github.com/huanghaibin-dev/CalendarView) </br> ![](https://img.shields.io/github/stars/huanghaibin-dev/CalendarView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 91 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/6687122"> </br> [ColorfulCat](https://github.com/ColorfulCat) | ![](https://github-readme-stats.vercel.app/api?username=ColorfulCat) | [AndroidLibs](https://github.com/ColorfulCat/AndroidLibs) </br> ![](https://img.shields.io/github/stars/ColorfulCat/AndroidLibs.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidGuide](https://github.com/ColorfulCat/AndroidGuide) </br> ![](https://img.shields.io/github/stars/ColorfulCat/AndroidGuide.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 92 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/9945153"> </br> [saiwu-bigkoo](https://github.com/saiwu-bigkoo) | ![](https://github-readme-stats.vercel.app/api?username=saiwu-bigkoo) | [Android-ConvenientBanner](https://github.com/saiwu-bigkoo/Android-ConvenientBanner) </br> ![](https://img.shields.io/github/stars/saiwu-bigkoo/Android-ConvenientBanner.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Android-AlertView](https://github.com/saiwu-bigkoo/Android-AlertView) </br> ![](https://img.shields.io/github/stars/saiwu-bigkoo/Android-AlertView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Android-SVProgressHUD](https://github.com/saiwu-bigkoo/Android-SVProgressHUD) </br> ![](https://img.shields.io/github/stars/saiwu-bigkoo/Android-SVProgressHUD.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 93 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/18101199"> </br> [DingMouRen](https://github.com/DingMouRen) | ![](https://github-readme-stats.vercel.app/api?username=DingMouRen) | [LayoutManagerGroup](https://github.com/DingMouRen/LayoutManagerGroup) </br> ![](https://img.shields.io/github/stars/DingMouRen/LayoutManagerGroup.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [PaletteImageView](https://github.com/DingMouRen/PaletteImageView) </br> ![](https://img.shields.io/github/stars/DingMouRen/PaletteImageView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [FallingView](https://github.com/DingMouRen/FallingView) </br> ![](https://img.shields.io/github/stars/DingMouRen/FallingView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 94 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7991983"> </br> [Hitomis](https://github.com/Hitomis) | ![](https://github-readme-stats.vercel.app/api?username=Hitomis) | [transferee](https://github.com/Hitomis/transferee) </br> ![](https://img.shields.io/github/stars/Hitomis/transferee.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [FunGameRefresh](https://github.com/Hitomis/FunGameRefresh) </br> ![](https://img.shields.io/github/stars/Hitomis/FunGameRefresh.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ActivitySwitcher](https://github.com/Hitomis/ActivitySwitcher) </br> ![](https://img.shields.io/github/stars/Hitomis/ActivitySwitcher.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 95 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/5780230"> </br> [kymjs](https://github.com/kymjs) | ![](https://github-readme-stats.vercel.app/api?username=kymjs) | [KJFrameForAndroid](https://github.com/kymjs/KJFrameForAndroid) </br> ![](https://img.shields.io/github/stars/kymjs/KJFrameForAndroid.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [TheMVP](https://github.com/kymjs/TheMVP) </br> ![](https://img.shields.io/github/stars/kymjs/TheMVP.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [RxVolley](https://github.com/kymjs/RxVolley) </br> ![](https://img.shields.io/github/stars/kymjs/RxVolley.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 96 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/8335303"> </br> [shwenzhang](https://github.com/shwenzhang) | ![](https://github-readme-stats.vercel.app/api?username=shwenzhang) | [AndResGuard](https://github.com/shwenzhang/AndResGuard) </br> ![](https://img.shields.io/github/stars/shwenzhang/AndResGuard.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 97 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1106500"> </br> [markzhai](https://github.com/markzhai) | ![](https://github-readme-stats.vercel.app/api?username=markzhai) | [AndroidPerformanceMonitor](https://github.com/markzhai/AndroidPerformanceMonitor) </br> ![](https://img.shields.io/github/stars/markzhai/AndroidPerformanceMonitor.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 98 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/11629986"> </br> [razerdp](https://github.com/razerdp) | ![](https://github-readme-stats.vercel.app/api?username=razerdp) | [BasePopup](https://github.com/razerdp/BasePopup) </br> ![](https://img.shields.io/github/stars/razerdp/BasePopup.svg) </br> [AnimatedPieView](https://github.com/razerdp/AnimatedPieView) </br> ![](https://img.shields.io/github/stars/razerdp/AnimatedPieView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 99 | 英国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/530122"> </br> [igorwojda](https://github.com/igorwojda) | ![](https://github-readme-stats.vercel.app/api?username=igorwojda) | [android-showcase](https://github.com/igorwojda/android-showcase) </br> ![](https://img.shields.io/github/stars/igorwojda/android-showcase.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [kotlin-coding-challenges](https://github.com/igorwojda/kotlin-coding-challenges) </br> ![](https://img.shields.io/github/stars/igorwojda/kotlin-coding-challenges.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 100 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1520409"> </br> [inferjay](https://github.com/inferjay) | ![](https://github-readme-stats.vercel.app/api?username=inferjay) | [AndroidDevTools](https://github.com/inferjay/AndroidDevTools) </br> ![](https://img.shields.io/github/stars/inferjay/AndroidDevTools.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 101 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/16283031"> </br> [MZCretin](https://github.com/MZCretin) | ![](https://github-readme-stats.vercel.app/api?username=MZCretin) | [ExpandableTextView](https://github.com/MZCretin/ExpandableTextView) </br> ![](https://img.shields.io/github/stars/MZCretin/ExpandableTextView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AutoUpdateProject](https://github.com/MZCretin/AutoUpdateProject) </br> ![](https://img.shields.io/github/stars/MZCretin/AutoUpdateProject.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [WifiTransfer-master](https://github.com/MZCretin/WifiTransfer-master) </br> ![](https://img.shields.io/github/stars/MZCretin/WifiTransfer-master.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 102 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/9552155"> </br> [kaleai](https://github.com/kaleai) | ![](https://github-readme-stats.vercel.app/api?username=kaleai) | [Android-Best-Practices](https://github.com/kaleai/Android-Best-Practices) </br> ![](https://img.shields.io/github/stars/kaleai/Android-Best-Practices.svg) </br> [CommonAdapter](https://github.com/kaleai/CommonAdapter) </br> ![](https://img.shields.io/github/stars/kaleai/CommonAdapter.svg) </br> [SelectorInjection](https://github.com/kaleai/SelectorInjection) </br> ![](https://img.shields.io/github/stars/kaleai/SelectorInjection.svg) |
| 103 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/3939305"> </br> [litesuits](https://github.com/litesuits) | ![](https://github-readme-stats.vercel.app/api?username=litesuits) | [android-common](https://github.com/litesuits/android-common) </br> ![](https://img.shields.io/github/stars/litesuits/android-common.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [android-lite-orm](https://github.com/litesuits/android-lite-orm) </br> ![](https://img.shields.io/github/stars/litesuits/android-lite-orm.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [android-lite-bluetoothLE](https://github.com/litesuits/android-lite-bluetoothLE) </br> ![](https://img.shields.io/github/stars/litesuits/android-lite-bluetoothLE.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 104 | 德国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/960767"> </br> [k0shk0sh](https://github.com/k0shk0sh) | ![](https://github-readme-stats.vercel.app/api?username=k0shk0sh) | [FastHub](https://github.com/k0shk0sh/FastHub) </br> ![](https://img.shields.io/github/stars/k0shk0sh/FastHub.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [PermissionHelper](https://github.com/k0shk0sh/PermissionHelper) </br> ![](https://img.shields.io/github/stars/k0shk0sh/PermissionHelper.svg) |
| 105 | 英国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/5463635"> </br> [ArthurHub](https://github.com/ArthurHub) | ![](https://github-readme-stats.vercel.app/api?username=ArthurHub) | [Android-Image-Cropper](https://github.com/ArthurHub/Android-Image-Cropper) </br> ![](https://img.shields.io/github/stars/ArthurHub/Android-Image-Cropper.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 106 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/5738175"> </br> [TommyLemon](https://github.com/TommyLemon) | ![](https://github-readme-stats.vercel.app/api?username=TommyLemon) | [Android-ZBLibrary](https://github.com/TommyLemon/Android-ZBLibrary) </br> ![](https://img.shields.io/github/stars/TommyLemon/Android-ZBLibrary.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 107 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/12438779"> </br> [HotBitmapGG](https://github.com/HotBitmapGG) | ![](https://github-readme-stats.vercel.app/api?username=HotBitmapGG) | [bilibili-android-client](https://github.com/HotBitmapGG/bilibili-android-client) </br> ![](https://img.shields.io/github/stars/HotBitmapGG/bilibili-android-client.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [CreditSesameRingView](https://github.com/HotBitmapGG/CreditSesameRingView) </br> ![](https://img.shields.io/github/stars/HotBitmapGG/CreditSesameRingView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [RingProgressBar](https://github.com/HotBitmapGG/RingProgressBar) </br> ![](https://img.shields.io/github/stars/HotBitmapGG/RingProgressBar.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 108 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1539806"> </br> [yangfuhai](https://github.com/yangfuhai) | ![](https://github-readme-stats.vercel.app/api?username=yangfuhai) | [ASimpleCache](https://github.com/yangfuhai/ASimpleCache) </br> ![](https://img.shields.io/github/stars/yangfuhai/ASimpleCache.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [afinal](https://github.com/yangfuhai/afinal) </br> ![](https://img.shields.io/github/stars/yangfuhai/afinal.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 109 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/8685979"> </br> [woxingxiao](https://github.com/woxingxiao) | ![](https://github-readme-stats.vercel.app/api?username=woxingxiao) | [BubbleSeekBar](https://github.com/woxingxiao/BubbleSeekBar) </br> ![](https://img.shields.io/github/stars/woxingxiao/BubbleSeekBar.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SlidingUpPanelLayout](https://github.com/woxingxiao/SlidingUpPanelLayout) </br> ![](https://img.shields.io/github/stars/woxingxiao/SlidingUpPanelLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [DashboardView](https://github.com/woxingxiao/DashboardView) </br> ![](https://img.shields.io/github/stars/woxingxiao/DashboardView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 110 | 未知 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/545637"> </br> [lecho](https://github.com/lecho) | ![](https://github-readme-stats.vercel.app/api?username=lecho) | [hellocharts-android](https://github.com/lecho/hellocharts-android) </br> ![](https://img.shields.io/github/stars/lecho/hellocharts-android.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 111 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/8716595"> </br> [crazycodeboy](https://github.com/crazycodeboy) | ![](https://github-readme-stats.vercel.app/api?username=crazycodeboy) </br> <details><summary>有效 Star 数 ![](https://img.shields.io/badge/star-7.4k-blue)</summary>![](https://img.shields.io/github/stars/crazycodeboy/TakePhoto.svg) + ![](https://img.shields.io/github/stars/crazycodeboy/GroupListView.svg) + ![](https://img.shields.io/github/stars/crazycodeboy/IncrementalUpdate.svg) </details> | [TakePhoto](https://github.com/crazycodeboy/TakePhoto) </br> ![](https://img.shields.io/github/stars/crazycodeboy/TakePhoto.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 112 | 美国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4699657"> </br> [iSoron](https://github.com/iSoron) | ![](https://github-readme-stats.vercel.app/api?username=iSoron) | [uhabits](https://github.com/iSoron/uhabits) </br> ![](https://img.shields.io/github/stars/iSoron/uhabits.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 113 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/8402109"> </br> [Skykai521](https://github.com/Skykai521) | ![](https://github-readme-stats.vercel.app/api?username=Skykai521) | [StickerCamera](https://github.com/Skykai521/StickerCamera) </br> ![](https://img.shields.io/github/stars/Skykai521/StickerCamera.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ECTranslation](https://github.com/Skykai521/ECTranslation) </br> ![](https://img.shields.io/github/stars/Skykai521/ECTranslation.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidDeveloperAdvancedManual](https://github.com/Skykai521/AndroidDeveloperAdvancedManual) </br> ![](https://img.shields.io/github/stars/Skykai521/AndroidDeveloperAdvancedManual.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 114 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/2267900"> </br> [stormzhang](https://github.com/stormzhang) | ![](https://github-readme-stats.vercel.app/api?username=stormzhang) | [android-interview-questions-cn](https://github.com/stormzhang/android-interview-questions-cn) </br> ![](https://img.shields.io/github/stars/stormzhang/android-interview-questions-cn.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 115 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7262715"> </br> [geeeeeeeeek](https://github.com/geeeeeeeeek) | ![](https://github-readme-stats.vercel.app/api?username=geeeeeeeeek) </br> <details><summary>有效 Star 数 ![](https://img.shields.io/badge/star-7.2k-blue)</summary> ![](https://img.shields.io/github/stars/geeeeeeeeek/WeChatLuckyMoney.svg) </details> | [WeChatLuckyMoney](https://github.com/geeeeeeeeek/WeChatLuckyMoney) </br> ![](https://img.shields.io/github/stars/geeeeeeeeek/WeChatLuckyMoney.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 116 | 印度尼西亚 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10556814"> </br> [zetbaitsu](https://github.com/zetbaitsu) | ![](https://github-readme-stats.vercel.app/api?username=zetbaitsu) | [Compressor](https://github.com/zetbaitsu/Compressor) </br> ![](https://img.shields.io/github/stars/zetbaitsu/Compressor.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 117 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1014961"> </br> [ikew0ng](https://github.com/ikew0ng) | ![](https://github-readme-stats.vercel.app/api?username=ikew0ng) | [SwipeBackLayout](https://github.com/ikew0ng/SwipeBackLayout) </br> ![](https://img.shields.io/github/stars/ikew0ng/SwipeBackLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 118 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/6917228"> </br> [dongjunkun](https://github.com/dongjunkun) | ![](https://github-readme-stats.vercel.app/api?username=dongjunkun) | [DropDownMenu](https://github.com/dongjunkun/DropDownMenu) </br> ![](https://img.shields.io/github/stars/dongjunkun/DropDownMenu.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [CouponView](https://github.com/dongjunkun/CouponView) </br> ![](https://img.shields.io/github/stars/dongjunkun/CouponView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [GanK](https://github.com/dongjunkun/GanK) </br> ![](https://img.shields.io/github/stars/dongjunkun/GanK.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 119 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/737958"> </br> [snowdream](https://github.com/snowdream) | ![](https://github-readme-stats.vercel.app/api?username=snowdream) | [awesome-android](https://github.com/snowdream/awesome-android) </br> ![](https://img.shields.io/github/stars/snowdream/awesome-android.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 120 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/9425734"> </br> [ximsfei](https://github.com/ximsfei) | ![](https://github-readme-stats.vercel.app/api?username=ximsfei) | [Android-skin-support](https://github.com/ximsfei/Android-skin-support) </br> ![](https://img.shields.io/github/stars/ximsfei/Android-skin-support.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 121 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/9758478"> </br> [wuyr](https://github.com/wuyr) | ![](https://github-readme-stats.vercel.app/api?username=wuyr) | [PathLayoutManager](https://github.com/wuyr/PathLayoutManager) </br> ![](https://img.shields.io/github/stars/wuyr/PathLayoutManager.svg) </br> [GoogleLibraryVersionQuerier](https://github.com/wuyr/GoogleLibraryVersionQuerier) </br> ![](https://img.shields.io/github/stars/wuyr/GoogleLibraryVersionQuerier.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [LitePager](https://github.com/wuyr/LitePager) </br> ![](https://img.shields.io/github/stars/wuyr/LitePager.svg) |
| 122 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/31280310"> </br> [Moosphan](https://github.com/Moosphan) | ![](https://github-readme-stats.vercel.app/api?username=Moosphan) | [Android-Daily-Interview](https://github.com/Moosphan/Android-Daily-Interview) </br> ![](https://img.shields.io/github/stars/Moosphan/Android-Daily-Interview.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Material-ProgressView](https://github.com/Moosphan/Material-ProgressView) </br> ![](https://img.shields.io/github/stars/Moosphan/Material-ProgressView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 123 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/8034315"> </br> [JeasonWong](https://github.com/JeasonWong) | ![](https://github-readme-stats.vercel.app/api?username=JeasonWong) | [Particle](https://github.com/JeasonWong/Particle) </br> ![](https://img.shields.io/github/stars/JeasonWong/Particle.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [BezierLoadingView](https://github.com/JeasonWong/BezierLoadingView) </br> ![](https://img.shields.io/github/stars/JeasonWong/BezierLoadingView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SlackLoadingView](https://github.com/JeasonWong/SlackLoadingView) </br> ![](https://img.shields.io/github/stars/JeasonWong/SlackLoadingView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 124 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/2675838"> </br> [Juude](https://github.com/Juude) | ![](https://github-readme-stats.vercel.app/api?username=Juude) | [awesome-android-performance](https://github.com/Juude/awesome-android-performance) </br> ![](https://img.shields.io/github/stars/Juude/awesome-android-performance.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Awesome-Android-Architecture](https://github.com/Juude/Awesome-Android-Architecture) </br> ![](https://img.shields.io/github/stars/Juude/Awesome-Android-Architecture.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 125 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/5214214"> </br> [drakeet](https://github.com/drakeet) | ![](https://github-readme-stats.vercel.app/api?username=drakeet) | [MultiType](https://github.com/drakeet/MultiType) </br> ![](https://img.shields.io/github/stars/drakeet/MultiType.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 126 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/11826777"> </br> [lygttpod](https://github.com/lygttpod) | ![](https://github-readme-stats.vercel.app/api?username=lygttpod) | [SuperTextView](https://github.com/lygttpod/SuperTextView) </br> ![](https://img.shields.io/github/stars/lygttpod/SuperTextView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 127 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/15646062"> </br> [huangyz0918](https://github.com/huangyz0918) | ![](https://github-readme-stats.vercel.app/api?username=huangyz0918) | [AndroidWM](https://github.com/huangyz0918/AndroidWM) </br> ![](https://img.shields.io/github/stars/huangyz0918/AndroidWM.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 128 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/30774063"> </br> [leavesCZY](https://github.com/leavesCZY) | ![](https://github-readme-stats.vercel.app/api?username=leavesCZY) | [AndroidGuide](https://github.com/leavesCZY/AndroidGuide) </br> ![](https://img.shields.io/github/stars/leavesCZY/AndroidGuide.svg) </br> [ReactiveHttp](https://github.com/leavesCZY/ReactiveHttp) </br> ![](https://img.shields.io/github/stars/leavesCZY/ReactiveHttp.svg) </br> [DoKV](https://github.com/leavesCZY/DoKV) </br> ![](https://img.shields.io/github/stars/leavesCZY/DoKV.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 129 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/5499532"> </br> [donkingliang](https://github.com/donkingliang) | ![](https://github-readme-stats.vercel.app/api?username=donkingliang) | [ConsecutiveScroller](https://github.com/donkingliang/ConsecutiveScroller) </br> ![](https://img.shields.io/github/stars/donkingliang/ConsecutiveScroller.svg) </br> [GroupedRecyclerViewAdapter](https://github.com/donkingliang/GroupedRecyclerViewAdapter) </br> ![](https://img.shields.io/github/stars/donkingliang/GroupedRecyclerViewAdapter.svg) </br> [LabelsView](https://github.com/donkingliang/LabelsView) </br> ![](https://img.shields.io/github/stars/donkingliang/LabelsView.svg) |
| 130 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10646230"> </br> [ssseasonnn](https://github.com/ssseasonnn) | ![](https://github-readme-stats.vercel.app/api?username=ssseasonnn) | [RxDownload](https://github.com/ssseasonnn/RxDownload) </br> ![](https://img.shields.io/github/stars/ssseasonnn/RxDownload.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Yasha](https://github.com/ssseasonnn/Yasha) </br> ![](https://img.shields.io/github/stars/ssseasonnn/Yasha.svg) </br> [RxRouter](https://github.com/ssseasonnn/RxRouter) </br> ![](https://img.shields.io/github/stars/ssseasonnn/RxRouter.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 131 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/24264243"> </br> [android-notes](https://github.com/android-notes) | ![](https://github-readme-stats.vercel.app/api?username=android-notes) | [Cockroach](https://github.com/android-notes/Cockroach) </br> ![](https://img.shields.io/github/stars/android-notes/Cockroach.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SwissArmyKnife](https://github.com/android-notes/SwissArmyKnife) </br> ![](https://img.shields.io/github/stars/android-notes/SwissArmyKnife.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 132 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10115359"> </br> [kongzue](https://github.com/kongzue) | ![](https://github-readme-stats.vercel.app/api?username=kongzue) | [DialogX](https://github.com/kongzue/DialogX) </br> ![](https://img.shields.io/github/stars/kongzue/DialogX.svg) </br> [StackLabel](https://github.com/kongzue/StackLabel) </br> ![](https://img.shields.io/github/stars/kongzue/StackLabel.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [BaseFramework](https://github.com/kongzue/BaseFramework) </br> ![](https://img.shields.io/github/stars/kongzue/BaseFramework.svg) |
| 133 | 越南 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4095408"> </br> [rey5137](https://github.com/rey5137) | ![](https://github-readme-stats.vercel.app/api?username=rey5137) | [material](https://github.com/rey5137/material) </br> ![](https://img.shields.io/github/stars/rey5137/material.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SlideLayout](https://github.com/rey5137/SlideLayout) </br> ![](https://img.shields.io/github/stars/rey5137/SlideLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 134 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10001124"> </br> [zzhoujay](https://github.com/zzhoujay) | ![](https://github-readme-stats.vercel.app/api?username=zzhoujay) | [RichText](https://github.com/zzhoujay/RichText) </br> ![](https://img.shields.io/github/stars/zzhoujay/RichText.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Markdown](https://github.com/zzhoujay/Markdown) </br> ![](https://img.shields.io/github/stars/zzhoujay/Markdown.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 135 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/17774386"> </br> [OCNYang](https://github.com/OCNYang) | ![](https://github-readme-stats.vercel.app/api?username=OCNYang) | [Android-Animation-Set](https://github.com/OCNYang/Android-Animation-Set) </br> ![](https://img.shields.io/github/stars/OCNYang/Android-Animation-Set.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [QBox](https://github.com/OCNYang/QBox) </br> ![](https://img.shields.io/github/stars/OCNYang/QBox.svg) </br> [ContourView](https://github.com/OCNYang/ContourView) </br> ![](https://img.shields.io/github/stars/OCNYang/ContourView.svg) |
| 136 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10348598"> </br> [tangqi92](https://github.com/tangqi92) | ![](https://github-readme-stats.vercel.app/api?username=tangqi92) | [Android-Tips](https://github.com/tangqi92/Android-Tips) </br> ![](https://img.shields.io/github/stars/tangqi92/Android-Tips.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [WaveLoadingView](https://github.com/tangqi92/WaveLoadingView) </br> ![](https://img.shields.io/github/stars/tangqi92/WaveLoadingView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 137 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1456580"> </br> [venshine](https://github.com/venshine) | ![](https://github-readme-stats.vercel.app/api?username=venshine) | [GoodView](https://github.com/venshine/GoodView) </br> ![](https://img.shields.io/github/stars/venshine/GoodView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [WheelView](https://github.com/venshine/WheelView) </br> ![](https://img.shields.io/github/stars/venshine/WheelView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidNote](https://github.com/venshine/AndroidNote) </br> ![](https://img.shields.io/github/stars/venshine/AndroidNote.svg) |
| 138 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/2654372"> </br> [wyouflf](https://github.com/wyouflf) | ![](https://github-readme-stats.vercel.app/api?username=wyouflf) | [xUtils3](https://github.com/wyouflf/xUtils3) </br> ![](https://img.shields.io/github/stars/wyouflf/xUtils3.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 139 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/6336960"> </br> [bennyhuo](https://github.com/bennyhuo) | ![](https://github-readme-stats.vercel.app/api?username=bennyhuo) | [Kotlin-Tutorials](https://github.com/bennyhuo/Kotlin-Tutorials) </br> ![](https://img.shields.io/github/stars/bennyhuo/Kotlin-Tutorials.svg) </br> [DiveIntoKotlinCoroutines-Sources](https://github.com/bennyhuo/DiveIntoKotlinCoroutines-Sources) </br> ![](https://img.shields.io/github/stars/bennyhuo/DiveIntoKotlinCoroutines-Sources.svg) </br> [KotlinDeepCopy](https://github.com/bennyhuo/KotlinDeepCopy) </br> ![](https://img.shields.io/github/stars/bennyhuo/KotlinDeepCopy.svg) |
| 140 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10437293"> </br> [AriaLyy](https://github.com/AriaLyy) | ![](https://github-readme-stats.vercel.app/api?username=AriaLyy) | [Aria](https://github.com/AriaLyy/Aria) </br> ![](https://img.shields.io/github/stars/AriaLyy/Aria.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 141 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7901171"> </br> [Jude95](https://github.com/Jude95) | ![](https://github-readme-stats.vercel.app/api?username=Jude95) | [EasyRecyclerView](https://github.com/Jude95/EasyRecyclerView) </br> ![](https://img.shields.io/github/stars/Jude95/EasyRecyclerView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SwipeBackHelper](https://github.com/Jude95/SwipeBackHelper) </br> ![](https://img.shields.io/github/stars/Jude95/SwipeBackHelper.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [RollViewPager](https://github.com/Jude95/RollViewPager) </br> ![](https://img.shields.io/github/stars/Jude95/RollViewPager.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 142 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7847308"> </br> [ZhaoKaiQiang](https://github.com/ZhaoKaiQiang) | ![](https://github-readme-stats.vercel.app/api?username=ZhaoKaiQiang) | [KLog](https://github.com/ZhaoKaiQiang/KLog) </br> ![](https://img.shields.io/github/stars/ZhaoKaiQiang/KLog.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidDifficultAnalysis](https://github.com/ZhaoKaiQiang/AndroidDifficultAnalysis) </br> ![](https://img.shields.io/github/stars/ZhaoKaiQiang/AndroidDifficultAnalysis.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 143 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/19498767"> </br> [GitLqr](https://github.com/GitLqr) | ![](https://github-readme-stats.vercel.app/api?username=GitLqr) | [LQRWeChat](https://github.com/GitLqr/LQRWeChat) </br> ![](https://img.shields.io/github/stars/GitLqr/LQRWeChat.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [LQREmojiLibrary](https://github.com/GitLqr/LQREmojiLibrary) </br> ![](https://img.shields.io/github/stars/GitLqr/LQREmojiLibrary.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [LQRAudioRecord](https://github.com/GitLqr/LQRAudioRecord) </br> ![](https://img.shields.io/github/stars/GitLqr/LQRAudioRecord.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 144 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/15716566"> </br> [qstumn](https://github.com/qstumn) | ![](https://github-readme-stats.vercel.app/api?username=qstumn) | [BadgeView](https://github.com/qstumn/BadgeView) </br> ![](https://img.shields.io/github/stars/qstumn/BadgeView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [VerticalTabLayout](https://github.com/qstumn/VerticalTabLayout) </br> ![](https://img.shields.io/github/stars/qstumn/VerticalTabLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [RadarChart](https://github.com/qstumn/RadarChart) </br> ![](https://img.shields.io/github/stars/qstumn/RadarChart.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 145 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1754323"> </br> [czy1121](https://github.com/czy1121) | ![](https://github-readme-stats.vercel.app/api?username=czy1121) | [update](https://github.com/czy1121/update) </br> ![](https://img.shields.io/github/stars/czy1121/update.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [settingscompat](https://github.com/czy1121/settingscompat) </br> ![](https://img.shields.io/github/stars/czy1121/settingscompat.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [loadinglayout](https://github.com/czy1121/loadinglayout) </br> ![](https://img.shields.io/github/stars/czy1121/loadinglayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 146 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7042195"> </br> [mxdldev](https://github.com/mxdldev) | ![](https://github-readme-stats.vercel.app/api?username=mxdldev) | [android-mvp-mvvm-flytour](https://github.com/mxdldev/android-mvp-mvvm-flytour) </br> ![](https://img.shields.io/github/stars/mxdldev/android-mvp-mvvm-flytour.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 147 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/6211094"> </br> [huangyanbin](https://github.com/huangyanbin) | ![](https://github-readme-stats.vercel.app/api?username=huangyanbin) | [smartTable](https://github.com/huangyanbin/smartTable) </br> ![](https://img.shields.io/github/stars/huangyanbin/smartTable.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SmartChart](https://github.com/huangyanbin/SmartChart) </br> ![](https://img.shields.io/github/stars/huangyanbin/SmartChart.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 148 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/16751752"> </br> [hi-dhl](https://github.com/hi-dhl) | ![](https://github-readme-stats.vercel.app/api?username=hi-dhl) | [PokemonGo](https://github.com/hi-dhl/PokemonGo) </br> ![](https://img.shields.io/github/stars/hi-dhl/PokemonGo.svg) </br> [AndroidX-Jetpack-Practice](https://github.com/hi-dhl/AndroidX-Jetpack-Practice) </br> ![](https://img.shields.io/github/stars/hi-dhl/AndroidX-Jetpack-Practice.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Binding](https://github.com/hi-dhl/Binding) </br> ![](https://img.shields.io/github/stars/hi-dhl/Binding.svg) |
| 149 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4550173"> </br> [mthli](https://github.com/mthli) | ![](https://github-readme-stats.vercel.app/api?username=mthli) | [Knife](https://github.com/mthli/Knife) </br> ![](https://img.shields.io/github/stars/mthli/Knife.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Slice](https://github.com/mthli/Slice) </br> ![](https://img.shields.io/github/stars/mthli/Slice.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 150 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/12881029"> </br> [yingLanNull](https://github.com/yingLanNull) | ![](https://github-readme-stats.vercel.app/api?username=yingLanNull) | [ShadowImageView](https://github.com/yingLanNull/ShadowImageView) </br> ![](https://img.shields.io/github/stars/yingLanNull/ShadowImageView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AlphaTabsIndicator](https://github.com/yingLanNull/AlphaTabsIndicator) </br> ![](https://img.shields.io/github/stars/yingLanNull/AlphaTabsIndicator.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ScrollLayout](https://github.com/yingLanNull/ScrollLayout) </br> ![](https://img.shields.io/github/stars/yingLanNull/ScrollLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 151 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4568646"> </br> [lizhangqu](https://github.com/lizhangqu) | ![](https://github-readme-stats.vercel.app/api?username=lizhangqu) | [CoreLink](https://github.com/lizhangqu/CoreLink) </br> ![](https://img.shields.io/github/stars/lizhangqu/CoreLink.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [CoreProgress](https://github.com/lizhangqu/CoreProgress) </br> ![](https://img.shields.io/github/stars/lizhangqu/CoreProgress.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 152 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10650040"> </br> [Jasonchenlijian](https://github.com/Jasonchenlijian) | ![](https://github-readme-stats.vercel.app/api?username=Jasonchenlijian) | [FastBle](https://github.com/Jasonchenlijian/FastBle) </br> ![](https://img.shields.io/github/stars/Jasonchenlijian/FastBle.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 153 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/8503732"> </br> [AigeStudio](https://github.com/AigeStudio) | ![](https://github-readme-stats.vercel.app/api?username=AigeStudio) | [WheelPicker](https://github.com/AigeStudio/WheelPicker) </br> ![](https://img.shields.io/github/stars/AigeStudio/WheelPicker.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [DatePicker](https://github.com/AigeStudio/DatePicker) </br> ![](https://img.shields.io/github/stars/AigeStudio/DatePicker.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [MultiThreadDownloader](https://github.com/AigeStudio/MultiThreadDownloader) </br> ![](https://img.shields.io/github/stars/AigeStudio/MultiThreadDownloader.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 154 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10400171"> </br> [hugeterry](https://github.com/hugeterry) | ![](https://github-readme-stats.vercel.app/api?username=hugeterry) | [CoordinatorTabLayout](https://github.com/hugeterry/CoordinatorTabLayout) </br> ![](https://img.shields.io/github/stars/hugeterry/CoordinatorTabLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [UpdateFun](https://github.com/hugeterry/UpdateFun) </br> ![](https://img.shields.io/github/stars/hugeterry/UpdateFun.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [coderfun](https://github.com/hugeterry/coderfun) </br> ![](https://img.shields.io/github/stars/hugeterry/coderfun.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 155 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/21142152"> </br> [qingmei2](https://github.com/qingmei2) | ![](https://github-readme-stats.vercel.app/api?username=qingmei2) | [MVVM-Architecture](https://github.com/qingmei2/MVVM-Architecture) </br> ![](https://img.shields.io/github/stars/qingmei2/MVVM-Architecture.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [RxImagePicker](https://github.com/qingmei2/RxImagePicker) </br> ![](https://img.shields.io/github/stars/qingmei2/RxImagePicker.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 156 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/38236349"> </br> [lihangleo2](https://github.com/lihangleo2) | ![](https://github-readme-stats.vercel.app/api?username=lihangleo2) | [ShadowLayout](https://github.com/lihangleo2/ShadowLayout) </br> ![](https://img.shields.io/github/stars/lihangleo2/ShadowLayout.svg) </br> [RichEditTextCopyToutiao](https://github.com/lihangleo2/RichEditTextCopyToutiao) </br> ![](https://img.shields.io/github/stars/lihangleo2/RichEditTextCopyToutiao.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SmartLoadingView](https://github.com/lihangleo2/SmartLoadingView) </br> ![](https://img.shields.io/github/stars/lihangleo2/SmartLoadingView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 157 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/181213"> </br> [oasisfeng](https://github.com/oasisfeng) | ![](https://github-readme-stats.vercel.app/api?username=oasisfeng) | [condom](https://github.com/oasisfeng/condom) </br> ![](https://img.shields.io/github/stars/oasisfeng/condom.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 158 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/19853475"> </br> [zhpanvip](https://github.com/zhpanvip) | ![](https://github-readme-stats.vercel.app/api?username=zhpanvip) | [BannerViewPager](https://github.com/zhpanvip/BannerViewPager) </br> ![](https://img.shields.io/github/stars/zhpanvip/BannerViewPager.svg) </br> [viewpagerindicator](https://github.com/zhpanvip/viewpagerindicator) </br> ![](https://img.shields.io/github/stars/zhpanvip/viewpagerindicator.svg) </br> [AndroidNote](https://github.com/zhpanvip/AndroidNote) </br> ![](https://img.shields.io/github/stars/zhpanvip/AndroidNote.svg) |
| 159 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7237396"> </br> [liujingxing](https://github.com/liujingxing) | ![](https://github-readme-stats.vercel.app/api?username=liujingxing) | [rxhttp](https://github.com/liujingxing/rxhttp) </br> ![](https://img.shields.io/github/stars/liujingxing/rxhttp.svg) </br> [rxlife](https://github.com/liujingxing/rxlife) </br> ![](https://img.shields.io/github/stars/liujingxing/rxlife.svg) </br> [XmlClassGuard](https://github.com/liujingxing/XmlClassGuard) </br> ![](https://img.shields.io/github/stars/liujingxing/XmlClassGuard.svg) |
| 160 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/8346902"> </br> [nining377](https://github.com/nining377) | ![](https://github-readme-stats.vercel.app/api?username=nining377) | [dolby_beta](https://github.com/nining377/dolby_beta) </br> ![](https://img.shields.io/github/stars/nining377/dolby_beta.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [UnblockMusicPro_Xposed](https://github.com/nining377/UnblockMusicPro_Xposed) </br> ![](https://img.shields.io/github/stars/nining377/UnblockMusicPro_Xposed.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 161 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/6176417"> </br> [Jacksgong](https://github.com/Jacksgong) | ![](https://github-readme-stats.vercel.app/api?username=Jacksgong) | [JKeyboardPanelSwitch](https://github.com/Jacksgong/JKeyboardPanelSwitch) </br> ![](https://img.shields.io/github/stars/Jacksgong/JKeyboardPanelSwitch.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 162 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/6629581"> </br> [zcweng](https://github.com/zcweng) | ![](https://github-readme-stats.vercel.app/api?username=zcweng) | [SwitchButton](https://github.com/zcweng/SwitchButton) </br> ![](https://img.shields.io/github/stars/zcweng/SwitchButton.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 163 | 未知 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7278986"> </br> [noties](https://github.com/noties) | ![](https://github-readme-stats.vercel.app/api?username=noties) | [Markwon](https://github.com/noties/Markwon) </br> ![](https://img.shields.io/github/stars/noties/Markwon.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Scrollable](https://github.com/noties/Scrollable) </br> ![](https://img.shields.io/github/stars/noties/Scrollable.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ScrollingBackgroundView](https://github.com/noties/ScrollingBackgroundView) </br> ![](https://img.shields.io/github/stars/noties/ScrollingBackgroundView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 164 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/17764102"> </br> [Doikki](https://github.com/Doikki) | ![](https://github-readme-stats.vercel.app/api?username=Doikki) | [DKVideoPlayer](https://github.com/Doikki/DKVideoPlayer) </br> ![](https://img.shields.io/github/stars/Doikki/DKVideoPlayer.svg) |
| 165 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/8722849"> </br> [Sunzxyong](https://github.com/Sunzxyong) | ![](https://github-readme-stats.vercel.app/api?username=Sunzxyong) | [Tiny](https://github.com/Sunzxyong/Tiny) </br> ![](https://img.shields.io/github/stars/Sunzxyong/Tiny.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Recovery](https://github.com/Sunzxyong/Recovery) </br> ![](https://img.shields.io/github/stars/Sunzxyong/Recovery.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 166 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/6497308"> </br> [D-clock](https://github.com/D-clock) | ![](https://github-readme-stats.vercel.app/api?username=D-clock) | [AndroidDaemonService](https://github.com/D-clock/AndroidDaemonService) </br> ![](https://img.shields.io/github/stars/D-clock/AndroidDaemonService.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 167 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/2074894"> </br> [matrixxun](https://github.com/matrixxun) | ![](https://github-readme-stats.vercel.app/api?username=matrixxun) | [MaterialBadgeTextView](https://github.com/matrixxun/MaterialBadgeTextView) </br> ![](https://img.shields.io/github/stars/matrixxun/MaterialBadgeTextView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [PullToZoomInListView](https://github.com/matrixxun/PullToZoomInListView) </br> ![](https://img.shields.io/github/stars/matrixxun/PullToZoomInListView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 168 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1920252"> </br> [dingjikerbo](https://github.com/dingjikerbo) | ![](https://github-readme-stats.vercel.app/api?username=dingjikerbo) | [Android-BluetoothKit](https://github.com/dingjikerbo/Android-BluetoothKit) </br> ![](https://img.shields.io/github/stars/dingjikerbo/Android-BluetoothKit.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Android-Camera](https://github.com/dingjikerbo/Android-Camera) </br> ![](https://img.shields.io/github/stars/dingjikerbo/Android-Camera.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 169 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/19897933"> </br> [JavaNoober](https://github.com/JavaNoober) | ![](https://github-readme-stats.vercel.app/api?username=JavaNoober) | [BackgroundLibrary](https://github.com/JavaNoober/BackgroundLibrary) </br> ![](https://img.shields.io/github/stars/JavaNoober/BackgroundLibrary.svg) </br> [Light](https://github.com/JavaNoober/Light) </br> ![](https://img.shields.io/github/stars/JavaNoober/Light.svg) </br> [AutoSave](https://github.com/JavaNoober/AutoSave) </br> ![](https://img.shields.io/github/stars/JavaNoober/AutoSave.svg) |
| 170 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/16009006"> </br> [xinghongfei](https://github.com/xinghongfei) | ![](https://github-readme-stats.vercel.app/api?username=xinghongfei) | [awesome-view](https://github.com/xinghongfei/awesome-view) </br> ![](https://img.shields.io/github/stars/xinghongfei/awesome-view.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Hello-RxJava](https://github.com/xinghongfei/Hello-RxJava) </br> ![](https://img.shields.io/github/stars/xinghongfei/Hello-RxJava.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 171 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/11681218"> </br> [xiaohaibin](https://github.com/xiaohaibin) | ![](https://github-readme-stats.vercel.app/api?username=xiaohaibin) | [XBanner](https://github.com/xiaohaibin/XBanner) </br> ![](https://img.shields.io/github/stars/xiaohaibin/XBanner.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [PageMenuLayout](https://github.com/xiaohaibin/PageMenuLayout) </br> ![](https://img.shields.io/github/stars/xiaohaibin/PageMenuLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [XMarqueeView](https://github.com/xiaohaibin/XMarqueeView) </br> ![](https://img.shields.io/github/stars/xiaohaibin/XMarqueeView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 172 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/9625508"> </br> [ThirtyDegreesRay](https://github.com/ThirtyDegreesRay) | ![](https://github-readme-stats.vercel.app/api?username=ThirtyDegreesRay) | [OpenHub](https://github.com/ThirtyDegreesRay/OpenHub) </br> ![](https://img.shields.io/github/stars/ThirtyDegreesRay/OpenHub.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 173 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/3657121"> </br> [iwgang](https://github.com/iwgang) | ![](https://github-readme-stats.vercel.app/api?username=iwgang) | [CountdownView](https://github.com/iwgang/CountdownView) </br> ![](https://img.shields.io/github/stars/iwgang/CountdownView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SimplifySpan](https://github.com/iwgang/SimplifySpan) </br> ![](https://img.shields.io/github/stars/iwgang/SimplifySpan.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [FamiliarRecyclerView](https://github.com/iwgang/FamiliarRecyclerView) </br> ![](https://img.shields.io/github/stars/iwgang/FamiliarRecyclerView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 174 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/11371934"> </br> [shehuan](https://github.com/shehuan) | ![](https://github-readme-stats.vercel.app/api?username=shehuan) | [CombineBitmap](https://github.com/shehuan/CombineBitmap) </br> ![](https://img.shields.io/github/stars/shehuan/CombineBitmap.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [NiceImageView](https://github.com/shehuan/NiceImageView) </br> ![](https://img.shields.io/github/stars/shehuan/NiceImageView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [CalendarView](https://github.com/shehuan/CalendarView) </br> ![](https://img.shields.io/github/stars/shehuan/CalendarView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 175 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/6140231"> </br> [CharonChui](https://github.com/CharonChui) | ![](https://github-readme-stats.vercel.app/api?username=CharonChui) | [AndroidNote](https://github.com/CharonChui/AndroidNote) </br> ![](https://img.shields.io/github/stars/CharonChui/AndroidNote.svg) |
| 176 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/16732367"> </br> [SusionSuc](https://github.com/SusionSuc) | ![](https://github-readme-stats.vercel.app/api?username=SusionSuc) | [AdvancedAndroid](https://github.com/SusionSuc/AdvancedAndroid) </br> ![](https://img.shields.io/github/stars/SusionSuc/AdvancedAndroid.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [rabbit-client](https://github.com/SusionSuc/rabbit-client) </br> ![](https://img.shields.io/github/stars/SusionSuc/rabbit-client.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [DraggableImageViewer](https://github.com/SusionSuc/DraggableImageViewer) </br> ![](https://img.shields.io/github/stars/SusionSuc/DraggableImageViewer.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 177 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/18655288"> </br> [hegaojian](https://github.com/hegaojian) | ![](https://github-readme-stats.vercel.app/api?username=hegaojian) | [JetPackMvvm](https://github.com/hegaojian/JetPackMvvm) </br> ![](https://img.shields.io/github/stars/hegaojian/JetPackMvvm.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [WanAndroid](https://github.com/hegaojian/WanAndroid) </br> ![](https://img.shields.io/github/stars/hegaojian/WanAndroid.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [MvvmHelper](https://github.com/hegaojian/MvvmHelper) </br> ![](https://img.shields.io/github/stars/hegaojian/MvvmHelper.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 178 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/15646030"> </br> [binIoter](https://github.com/binIoter) | ![](https://github-readme-stats.vercel.app/api?username=binIoter) | [GuideView](https://github.com/binIoter/GuideView) </br> ![](https://img.shields.io/github/stars/binIoter/GuideView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 179 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/23227460"> </br> [feelschaotic](https://github.com/feelschaotic) | ![](https://github-readme-stats.vercel.app/api?username=feelschaotic) | [AndroidKnowledgeSystem](https://github.com/feelschaotic/AndroidKnowledgeSystem) </br> ![](https://img.shields.io/github/stars/feelschaotic/AndroidKnowledgeSystem.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SDKHotFix](https://github.com/feelschaotic/SDKHotFix) </br> ![](https://img.shields.io/github/stars/feelschaotic/SDKHotFix.svg) </br> [AndroidPrincipleAnimation](https://github.com/feelschaotic/AndroidPrincipleAnimation) </br> ![](https://img.shields.io/github/stars/feelschaotic/AndroidPrincipleAnimation.svg) |
| 180 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/12408339"> </br> [AlexLiuSheng](https://github.com/AlexLiuSheng) | ![](https://github-readme-stats.vercel.app/api?username=AlexLiuSheng) | [CheckVersionLib](https://github.com/AlexLiuSheng/CheckVersionLib) </br> ![](https://img.shields.io/github/stars/AlexLiuSheng/CheckVersionLib.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [BadgeView](https://github.com/AlexLiuSheng/BadgeView) </br> ![](https://img.shields.io/github/stars/AlexLiuSheng/BadgeView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [FloatView](https://github.com/AlexLiuSheng/FloatView) </br> ![](https://img.shields.io/github/stars/AlexLiuSheng/FloatView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 181 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/13806413"> </br> [yangchaojiang](https://github.com/yangchaojiang) | ![](https://github-readme-stats.vercel.app/api?username=yangchaojiang) | [yjPlay](https://github.com/yangchaojiang/yjPlay) </br> ![](https://img.shields.io/github/stars/yangchaojiang/yjPlay.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ZoomPreviewPicture-](https://github.com/yangchaojiang/ZoomPreviewPicture-) </br> ![](https://img.shields.io/github/stars/yangchaojiang/ZoomPreviewPicture-.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [DemoLoadView](https://github.com/yangchaojiang/DemoLoadView) </br> ![](https://img.shields.io/github/stars/yangchaojiang/DemoLoadView.svg) |
| 182 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7521943"> </br> [iielse](https://github.com/iielse) | ![](https://github-readme-stats.vercel.app/api?username=iielse) | [imageviewer](https://github.com/iielse/imageviewer) </br> ![](https://img.shields.io/github/stars/iielse/imageviewer.svg) </br> [switchbutton](https://github.com/iielse/switchbutton) </br> ![](https://img.shields.io/github/stars/iielse/switchbutton.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 183 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/12512971"> </br> [git-xuhao](https://github.com/git-xuhao) | ![](https://github-readme-stats.vercel.app/api?username=git-xuhao) | [KotlinMvp](https://github.com/git-xuhao/KotlinMvp) </br> ![](https://img.shields.io/github/stars/git-xuhao/KotlinMvp.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 184 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/16667232"> </br> [KingJA](https://github.com/KingJA) | ![](https://github-readme-stats.vercel.app/api?username=KingJA) | [LoadSir](https://github.com/KingJA/LoadSir) </br> ![](https://img.shields.io/github/stars/KingJA/LoadSir.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SwitchButton](https://github.com/KingJA/SwitchButton) </br> ![](https://img.shields.io/github/stars/KingJA/SwitchButton.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [MagicMirror](https://github.com/KingJA/MagicMirror) </br> ![](https://img.shields.io/github/stars/KingJA/MagicMirror.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 185 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/5093954"> </br> [jeanboydev](https://github.com/jeanboydev) | ![](https://github-readme-stats.vercel.app/api?username=jeanboydev) | [Android-ReadTheFuckingSourceCode](https://github.com/jeanboydev/Android-ReadTheFuckingSourceCode) </br> ![](https://img.shields.io/github/stars/jeanboydev/Android-ReadTheFuckingSourceCode.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Android-BitherCompress](https://github.com/jeanboydev/Android-BitherCompress) </br> ![](https://img.shields.io/github/stars/jeanboydev/Android-BitherCompress.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 186 | 法国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4895410"> </br> [aurelhubert](https://github.com/aurelhubert) | ![](https://github-readme-stats.vercel.app/api?username=aurelhubert) | [ahbottomnavigation](https://github.com/aurelhubert/ahbottomnavigation) </br> ![](https://img.shields.io/github/stars/aurelhubert/ahbottomnavigation.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 187 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/20500834"> </br> [yangkun19921001](https://github.com/yangkun19921001) | ![](https://github-readme-stats.vercel.app/api?username=yangkun19921001) | [Blog](https://github.com/yangkun19921001/Blog) </br> ![](https://img.shields.io/github/stars/yangkun19921001/Blog.svg) </br> [AVSample](https://github.com/yangkun19921001/AVSample) </br> ![](https://img.shields.io/github/stars/yangkun19921001/AVSample.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AVEditor](https://github.com/yangkun19921001/AVEditor) </br> ![](https://img.shields.io/github/stars/yangkun19921001/AVEditor.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 188 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10431308"> </br> [xiaoyaoyou1212](https://github.com/xiaoyaoyou1212) | ![](https://github-readme-stats.vercel.app/api?username=xiaoyaoyou1212) | [XSnow](https://github.com/xiaoyaoyou1212/XSnow) </br> ![](https://img.shields.io/github/stars/xiaoyaoyou1212/XSnow.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [BLE](https://github.com/xiaoyaoyou1212/BLE) </br> ![](https://img.shields.io/github/stars/xiaoyaoyou1212/BLE.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ViseFace](https://github.com/xiaoyaoyou1212/ViseFace) </br> ![](https://img.shields.io/github/stars/xiaoyaoyou1212/ViseFace.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 189 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/18508809"> </br> [wildma](https://github.com/wildma) | ![](https://github-readme-stats.vercel.app/api?username=wildma) | [ScreenAdaptation](https://github.com/wildma/ScreenAdaptation) </br> ![](https://img.shields.io/github/stars/wildma/ScreenAdaptation.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [IDCardCamera](https://github.com/wildma/IDCardCamera) </br> ![](https://img.shields.io/github/stars/wildma/IDCardCamera.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [PictureSelector](https://github.com/wildma/PictureSelector) </br> ![](https://img.shields.io/github/stars/wildma/PictureSelector.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 190 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/4328991"> </br> [liuguangqiang](https://github.com/liuguangqiang) | ![](https://github-readme-stats.vercel.app/api?username=liuguangqiang) | [SwipeBack](https://github.com/liuguangqiang/SwipeBack) </br> ![](https://img.shields.io/github/stars/liuguangqiang/SwipeBack.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [CookieBar](https://github.com/liuguangqiang/CookieBar) </br> ![](https://img.shields.io/github/stars/liuguangqiang/CookieBar.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [RippleLayout](https://github.com/liuguangqiang/RippleLayout) </br> ![](https://img.shields.io/github/stars/liuguangqiang/RippleLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 191 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/22186185"> </br> [ethanhua](https://github.com/ethanhua) | ![](https://github-readme-stats.vercel.app/api?username=ethanhua) | [Skeleton](https://github.com/ethanhua/Skeleton) </br> ![](https://img.shields.io/github/stars/ethanhua/Skeleton.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 192 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/37793523"> </br> [samlss](https://github.com/samlss) | ![](https://github-readme-stats.vercel.app/api?username=samlss) | [Broccoli](https://github.com/samlss/Broccoli) </br> ![](https://img.shields.io/github/stars/samlss/Broccoli.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Lighter](https://github.com/samlss/Lighter) </br> ![](https://img.shields.io/github/stars/samlss/Lighter.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ClockView](https://github.com/samlss/ClockView) </br> ![](https://img.shields.io/github/stars/samlss/ClockView.svg) |
| 193 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10682312"> </br> [WVector](https://github.com/WVector) | ![](https://github-readme-stats.vercel.app/api?username=WVector) | [AppUpdate](https://github.com/WVector/AppUpdate) </br> ![](https://img.shields.io/github/stars/WVector/AppUpdate.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 194 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/3250512"> </br> [panpf](https://github.com/panpf) | ![](https://github-readme-stats.vercel.app/api?username=panpf) | [sketch](https://github.com/panpf/sketch) </br> ![](https://img.shields.io/github/stars/panpf/sketch.svg) </br> [spider-web-score-view](https://github.com/panpf/spider-web-score-view) </br> ![](https://img.shields.io/github/stars/panpf/spider-web-score-view.svg) </br> [assembly-adapter](https://github.com/panpf/assembly-adapter) </br> ![](https://img.shields.io/github/stars/panpf/assembly-adapter.svg) |
| 195 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/11499027"> </br> [zjw-swun](https://github.com/zjw-swun) | ![](https://github-readme-stats.vercel.app/api?username=zjw-swun) | [AppMethodOrder](https://github.com/zjw-swun/AppMethodOrder) </br> ![](https://img.shields.io/github/stars/zjw-swun/AppMethodOrder.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AppMethodTime](https://github.com/zjw-swun/AppMethodTime) </br> ![](https://img.shields.io/github/stars/zjw-swun/AppMethodTime.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 196 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/18179161"> </br> [huburt-Hu](https://github.com/huburt-Hu) | ![](https://github-readme-stats.vercel.app/api?username=huburt-Hu) | [NewbieGuide](https://github.com/huburt-Hu/NewbieGuide) </br> ![](https://img.shields.io/github/stars/huburt-Hu/NewbieGuide.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 197 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/11348713"> </br> [huxq17](https://github.com/huxq17) | ![](https://github-readme-stats.vercel.app/api?username=huxq17) | [XRefreshView](https://github.com/huxq17/XRefreshView) </br> ![](https://img.shields.io/github/stars/huxq17/XRefreshView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [FloatBall](https://github.com/huxq17/FloatBall) </br> ![](https://img.shields.io/github/stars/huxq17/FloatBall.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [HandyGridView](https://github.com/huxq17/HandyGridView) </br> ![](https://img.shields.io/github/stars/huxq17/HandyGridView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 198 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10074787"> </br> [ladingwu](https://github.com/ladingwu) | ![](https://github-readme-stats.vercel.app/api?username=ladingwu) | [dimens_sw](https://github.com/ladingwu/dimens_sw) </br> ![](https://img.shields.io/github/stars/ladingwu/dimens_sw.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [ImageLoaderFramework](https://github.com/ladingwu/ImageLoaderFramework) </br> ![](https://img.shields.io/github/stars/ladingwu/ImageLoaderFramework.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 199 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7846539"> </br> [mayubao](https://github.com/mayubao) | ![](https://github-readme-stats.vercel.app/api?username=mayubao) | [KuaiChuan](https://github.com/mayubao/KuaiChuan) </br> ![](https://img.shields.io/github/stars/mayubao/KuaiChuan.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Android-Pay](https://github.com/mayubao/Android-Pay) </br> ![](https://img.shields.io/github/stars/mayubao/Android-Pay.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 200 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/20511252"> </br> [chenBingX](https://github.com/chenBingX) | ![](https://github-readme-stats.vercel.app/api?username=chenBingX) | [SuperTextView](https://github.com/chenBingX/SuperTextView) </br> ![](https://img.shields.io/github/stars/chenBingX/SuperTextView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 201 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7449405"> </br> [BaronZ88](https://github.com/BaronZ88) | ![](https://github-readme-stats.vercel.app/api?username=BaronZ88) | [MinimalistWeather](https://github.com/BaronZ88/MinimalistWeather) </br> ![](https://img.shields.io/github/stars/BaronZ88/MinimalistWeather.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [Router](https://github.com/BaronZ88/Router) </br> ![](https://img.shields.io/github/stars/BaronZ88/Router.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 202 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/7523615"> </br> [gongwen](https://github.com/gongwen) | ![](https://github-readme-stats.vercel.app/api?username=gongwen) | [MarqueeViewLibrary](https://github.com/gongwen/MarqueeViewLibrary) </br> ![](https://img.shields.io/github/stars/gongwen/MarqueeViewLibrary.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SwipeBackLayout](https://github.com/gongwen/SwipeBackLayout) </br> ![](https://img.shields.io/github/stars/gongwen/SwipeBackLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 203 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/9513240"> </br> [kongqw](https://github.com/kongqw) | ![](https://github-readme-stats.vercel.app/api?username=kongqw) | [OpenCVForAndroid](https://github.com/kongqw/OpenCVForAndroid) </br> ![](https://img.shields.io/github/stars/kongqw/OpenCVForAndroid.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidSerialPort](https://github.com/kongqw/AndroidSerialPort) </br> ![](https://img.shields.io/github/stars/kongqw/AndroidSerialPort.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidRocker](https://github.com/kongqw/AndroidRocker) </br> ![](https://img.shields.io/github/stars/kongqw/AndroidRocker.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 204 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/10722815"> </br> [tyzlmjj](https://github.com/tyzlmjj) | ![](https://github-readme-stats.vercel.app/api?username=tyzlmjj) | [PagerBottomTabStrip](https://github.com/tyzlmjj/PagerBottomTabStrip) </br> ![](https://img.shields.io/github/stars/tyzlmjj/PagerBottomTabStrip.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 205 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/15973675"> </br> [AbrahamCaiJin](https://github.com/AbrahamCaiJin) | ![](https://github-readme-stats.vercel.app/api?username=AbrahamCaiJin) | [CommonUtilLibrary](https://github.com/AbrahamCaiJin/CommonUtilLibrary) </br> ![](https://img.shields.io/github/stars/AbrahamCaiJin/CommonUtilLibrary.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 206 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/1428524"> </br> [jiangqqlmj](https://github.com/jiangqqlmj) | ![](https://github-readme-stats.vercel.app/api?username=jiangqqlmj) | [FastDev4Android](https://github.com/jiangqqlmj/FastDev4Android) </br> ![](https://img.shields.io/github/stars/jiangqqlmj/FastDev4Android.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [DragHelper4QQ](https://github.com/jiangqqlmj/DragHelper4QQ) </br> ![](https://img.shields.io/github/stars/jiangqqlmj/DragHelper4QQ.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 207 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/9549188"> </br> [linglongxin24](https://github.com/linglongxin24) | ![](https://github-readme-stats.vercel.app/api?username=linglongxin24) | [DylanStepCount](https://github.com/linglongxin24/DylanStepCount) </br> ![](https://img.shields.io/github/stars/linglongxin24/DylanStepCount.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 208 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/23430080"> </br> [princekin-f](https://github.com/princekin-f) | ![](https://github-readme-stats.vercel.app/api?username=princekin-f) | [EasyFloat](https://github.com/princekin-f/EasyFloat) </br> ![](https://img.shields.io/github/stars/princekin-f/EasyFloat.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 209 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/18432469"> </br> [aicareles](https://github.com/aicareles) | ![](https://github-readme-stats.vercel.app/api?username=aicareles) | [Android-BLE](https://github.com/aicareles/Android-BLE) </br> ![](https://img.shields.io/github/stars/aicareles/Android-BLE.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AopArms](https://github.com/aicareles/AopArms) </br> ![](https://img.shields.io/github/stars/aicareles/AopArms.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 210 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/20204119"> </br> [JingYeoh](https://github.com/JingYeoh) | ![](https://github-readme-stats.vercel.app/api?username=JingYeoh) | [FragmentRigger](https://github.com/JingYeoh/FragmentRigger) </br> ![](https://img.shields.io/github/stars/JingYeoh/FragmentRigger.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [VercodeEditText](https://github.com/JingYeoh/VercodeEditText) </br> ![](https://img.shields.io/github/stars/JingYeoh/VercodeEditText.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [SlideMenuLayout](https://github.com/JingYeoh/SlideMenuLayout) </br> ![](https://img.shields.io/github/stars/JingYeoh/SlideMenuLayout.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 211 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/14296757"> </br> [Zhaoss](https://github.com/Zhaoss) | ![](https://github-readme-stats.vercel.app/api?username=Zhaoss) | [WeiXinRecordedDemo](https://github.com/Zhaoss/WeiXinRecordedDemo) </br> ![](https://img.shields.io/github/stars/Zhaoss/WeiXinRecordedDemo.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 212 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/2555005"> </br> [yale8848](https://github.com/yale8848) | ![](https://github-readme-stats.vercel.app/api?username=yale8848) | [CacheWebView](https://github.com/yale8848/CacheWebView) </br> ![](https://img.shields.io/github/stars/yale8848/CacheWebView.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [RetrofitCache](https://github.com/yale8848/RetrofitCache) </br> ![](https://img.shields.io/github/stars/yale8848/RetrofitCache.svg) </br> [EasyIncrementalUpdate](https://github.com/yale8848/EasyIncrementalUpdate) </br> ![](https://img.shields.io/github/stars/yale8848/EasyIncrementalUpdate.svg) |
| 213 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/18342788"> </br> [jianjunxiao](https://github.com/jianjunxiao) | ![](https://github-readme-stats.vercel.app/api?username=jianjunxiao) | [NiceVieoPlayer](https://github.com/jianjunxiao/NiceVieoPlayer) </br> ![](https://img.shields.io/github/stars/jianjunxiao/NiceVieoPlayer.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [wanandroid](https://github.com/jianjunxiao/wanandroid) </br> ![](https://img.shields.io/github/stars/jianjunxiao/wanandroid.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 214 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/8542947"> </br> [jiajunhui](https://github.com/jiajunhui) | ![](https://github-readme-stats.vercel.app/api?username=jiajunhui) | [PlayerBase](https://github.com/jiajunhui/PlayerBase) </br> ![](https://img.shields.io/github/stars/jiajunhui/PlayerBase.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [MediaLoader](https://github.com/jiajunhui/MediaLoader) </br> ![](https://img.shields.io/github/stars/jiajunhui/MediaLoader.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 215 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/12838859"> </br> [kezong](https://github.com/kezong) | ![](https://github-readme-stats.vercel.app/api?username=kezong) | [fat-aar-android](https://github.com/kezong/fat-aar-android) </br> ![](https://img.shields.io/github/stars/kezong/fat-aar-android.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
| 216 | 中国 | <img width="100" alt="image" src="https://avatars.githubusercontent.com/u/11155268"> </br> [BolexLiu](https://github.com/BolexLiu) | ![](https://github-readme-stats.vercel.app/api?username=BolexLiu) | [AutoEx](https://github.com/BolexLiu/AutoEx) </br> ![](https://img.shields.io/github/stars/BolexLiu/AutoEx.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [PressScanCode](https://github.com/BolexLiu/PressScanCode) </br> ![](https://img.shields.io/github/stars/BolexLiu/PressScanCode.svg) ![](https://img.shields.io/badge/-deprecated-yellow) </br> [AndroidHookStartActivity](https://github.com/BolexLiu/AndroidHookStartActivity) </br> ![](https://img.shields.io/github/stars/BolexLiu/AndroidHookStartActivity.svg) ![](https://img.shields.io/badge/-deprecated-yellow) |
#### 标准及要求
* 上榜规则:
* 不能违背开源精神
* 必须是 Android 开发者
* 必须是以个人的名义开源
* Star 数不能通过任何手段掺假
* 只收录个人 Star 数在 3k 及以上
* 排名规则:
* 根据有效 Star 数从高到低进行排序
* 如果个人的 Star 数小于 10k,有效 Star 数则直接按照个人 Star 总数来计算
* 如果个人的 Star 数大于 10k 小于 20k,有效 Star 数必须要占个人 Star 总数的 **60%** 才能按照个人 Star 总数来计算,否则只能按照有效 Star 数来计算
* 如果个人的 Star 数大于 20k 小于 30k,有效 Star 数必须要占个人 Star 总数的 **70%** 才能按照个人 Star 总数来计算,否则只能按照有效 Star 数来计算
* 如果个人的 Star 数大于 30k 小于 40k,有效 Star 数必须要占个人 Star 总数的 **80%** 才能按照个人 Star 总数来计算,否则只能按照有效 Star 数来计算
* 如果个人的 Star 数大于 40k 及以上,有效 Star 数必须要占个人 Star 总数的 **90%** 才能按照个人 Star 总数来计算,否则只能按照有效 Star 数来计算
* 有效 Star 数的定义:
* 必须和 Android 相关的开源项目 Star 数,不限开发语言,不限类型
* 排除非 Android 平台的开源项目 Star 数,如 Flutter、ReactNative、Weex 等等
* 排除和 Android 无关的开源项目 Star 数,如算法题、简历模板、表情包等等
* 排除简单 fork 他人的开源项目所得的 Star 数(没有属于自己的任何提交)
* 开源项目推荐规则:
* 非简单的 Demo 工程
* 最多推荐三个开源项目
* 必须是和 Android 开发相关的项目
* 排除 Flutter、RN 等跨端开发的项目
* 开源项目过时标记规则:
* 基于 eclipse 项目
* 明确注明项目已经不维护
* 开源项目的仓库已经被标记为只读
* 代码最后更新停留在三个月前并且超过三个月没有处理 issue
* 只修改 `README.md` 文件的更新提交不计入内
* 非及时更新,更新频率为一年更新一次,更新时只检查没有过时的项目
* 一旦开源项目被标记过时,则无法删除,需要提 issue 给作者解除
* 开源项目刷 Star 鉴定标准:
* 通过 [Star 趋势图](https://starchart.cc/) 来判断,star 涨势图中的拐角处形成的角度无限接近于 90 度
* 查看 issue:通过 issue 的数量、作者的回复速度、问题是否解决这几个维度来判断
* 查看提交记录:通过代码的数量、代码的质量、commit 的描述这几个维度来判断
* 对比 fork 数量:一般 star 数和 fork 数正常的比例为 `10 : 1` 到 `10 : 2` 之间
* 如果框架在 [jitpack 仓库](https://jitpack.io/) 发布的,可以通过查看每月的下载量,月下载量一般情况不会少于现有的 star 数,正常是 star 数的 2 到 10 倍左右
#### 为什么那么多开源项目不维护了?
* 这是很多人问过我的一个问题,大多人可能无法理解好好的开源项目就不维护了,我觉得主要原因有如下几个:
* 不挣钱:我想跟大家说的是,开源项目不维护其实是一件最正常不过的事情了,我可以跟大家说一个残酷的事实,我做了那么多开源框架,也被很多人应用到自己项目中,被很多人夸赞过,但是这些并不能为我带来任何经济效益,简单来讲就是为爱发电,说白了不挣钱,等于免费为大家服务。包括大家给开源作者点 Star 也好,点 Follow 也罢,这些只能算是对开源作者的支持,但是不会给作者产生任何经济效益,**不挣钱也将意味做这件事其实是亏钱的,因为房租要钱、水电要钱、吃饭也要钱,人活着是有生存成本的**。
* 地位低:小时候我们常说老师像蜡烛,燃烧自己照亮他人,我觉得开源作者更合适用这句话,因为老师至少还是有工资的,而开源作者则是秉承自愿原则,付出多与少都是没有工资的,还有老师的社会地位也不一样,但是开源作者在行业中的地位并不高,几乎等于没有,我自己来讲,几乎没有感受到尊重二字,更多感受到世态炎凉,大致表现为:
1. 呼之即来挥之即去,解决完问题没有一句谢谢,开源作者免费为人民服务是应该的;
2. 有很多人都想来白嫖你的时间,具体表现为就算这个问题不属于框架的问题也会找上开源作者;
3. 直接抄框架的代码到项目中,并且直接将代码中头注释中开源作者的署名剔除掉,然后把自己的名字加上;
4. 基于框架自己本地维护了一套代码,后续遇到难题搞不定的时候找上开源作者要求基于他个人的当前版本去解决;
5. 总是有人一遇到问题,就是不看文档,第一时间找到开源作者,问这个问题怎么解决,将开源作者硬活生生逼成了一台复读机;
6. 总有人想白嫖作者,具体操作是加作者好友,备注美其名曰说是讨论技术,结果一通过好友请求,一上来就问他个人遇到的这个技术问题怎么解决;
7. 有的人用了框架,一遇到问题也不反馈给作者,会选择在公共场合责怪作者,甚至辱骂作者都有,其他看到的人都选择默不作声,基本没有人出面制止;
8. 也有的人,看到框架不错,直接占为己有,简单修改了对外调用类的名称,并发布了另外一个开源库,并且对外宣传框架是自研的;
9. ...................................................
* 性质变了:大家还记得开源的初衷吗?一个人开源,许多人来帮忙一起做好,但是目前的实际情况是,一旦使用框架的人出现了问题,大多数人第一时间会找到作者,提个 issue 丢给作者处理,自己就坐等作者解决就可以了,如果作者弃更了,那么还可能会引来招骂,有的人还会说出作者不负责任、亏我那么支持你等负面的话。在这里我其实想跟大家说的是,开源作者其实没有任何义务帮你处理问题,虽然这句话大家不太中听,但我必须得说,因为我们在使用开源框架的时候,并没有付给开源作者任何一分钱,现在出了问题,开源作者自然也可以不处理,换一个角度想,你利用开源框架挣到的钱会分给开源作者吗?所以这个是在情理之中,换成你也很可能那么做,人都是自私的,切莫把自己标榜成圣人。
* 对此,我其实想给大家谈谈我的感受,以及我对开源的看法:
* 开源作者是伟大的:我问大家一个问题,假设有一个公司招你过去,老板说不给工资并且让你一直干下去,你能坚持多久?开源就是这种模式,一直付出但就是不挣钱,我相信很多人都无法接受这个结果,想都不用想直接拒绝了,但是仍然有一些开源作者坚持了很多才放弃维护,这无疑是非常伟大的,换位思考,如果是你会那么做吗?大家要明白一件事,做开源其实占用是开源作者的业余时间,当星期六日大家都在休息的时候,开源作者还在给框架加功能和修 Bug,开源作者大可不必那么累,也可以选择星期六日躺在床上睡大觉玩游戏,但是他们选择了一条别人不敢选择的路去坚守,所以哪有什么岁月静好,不过是有人替你负重前行。还有一点,无论开源作者维不维护,他们都是伟大的,至少证明他们曾经付出了,不能因为现在放弃维护了就否定了,我们应该要给予尊重和认可。
* 请善待开源作者:我觉得作为开源作者来说,承受了很多不该承受的事情,例如很多人跑来问我各种碰到的技术难题,早期粉丝少的时候还尝试帮忙解决,但是发现我的粉丝多了之后,发现这个事情我压根承受不住,就问你能顶得住每天都有几十个人来问你技术问题吗?我也可以选择不回复,但是我还是礼貌性地做了统一回复,我目前不处理框架之外的问题。这个经历让我感觉开源作者一旦做了开源,就摊上大麻烦了,不管是不是框架的问题都会找上我,并不是我不想帮大家,而我跟大家一样,很多时候工作和开源已经把我掏空了,已经没有多余的时间和精力做别的事情,我自己都犹如泥菩萨过江,自身难保。
* 请不要做技术的巨婴:另外我觉得很多人在网络上面很轻浮,动不动就劳烦别人,这要是来到了现实中,可是要欠了别人一次人情,如果帮完了没有一点表示,那么下次再有问题的时候,那么别人是不会再理睬你的;但是在网络中,大家没有任何顾忌,还有人完全不顾及开源作者的感受,就觉得这个忙对你这种大佬很简单,你就是应该要帮我,甚至在帮完之后连句谢谢都懒得讲,对此我只想说一句:别人帮你是情分,不帮你是本分。
* 没有任何开源项目是一直维护的:大家看到很多开源项目不维护了,很多人都感觉 Android 快不行了,但是这个是正常现象,不信你回去看看 iOS 行业,其实大家都差不多,我只想跟大家说,没有任何开源项目是一直维护的,因为开源项目本身就不挣钱,开源作者人家也要恰饭的,年纪大点家里还有老婆孩子要养,你说还维护这个开源项目,只谈理想不谈钱的事情还现实吗?所以维护是情分,不维护是本分。我自己目前还在维护开源项目,这完全得益于我还没有结婚,并且还有一份工作养活着,当我某一天因为某种原因离开 Android 行业了,手头的开源项目大概率也是会停更的。没有任何开源作者能一直维护下去,迟早有一天会停更,大家且行且珍惜。
* 在大家认知中,开源项目不维护是一件不正常的事情,但是如果你看完了上面这些话,你会相信开源项目不维护是一件再正常不过的事情。不过总是要有人肩负起开源的大旗,我们这代开源人迟早某一天会扛不动,这份扛大旗的重任将会留给行业的后辈们,至于后面能有多少后辈们愿意去做,得看大家未来对待开源的态度是什么样的,如果还是现在的态度,我觉得还是比较难的,至于怎么改变只能靠大家去共同努力了。
## 致谢
* 向所有开源作者致敬,感谢一路的美好及陪伴!
## License
```text
Copyright 2022 Huang JinQun
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
``` | Github Android 个人技术开源影响力排行榜 | null | 0 | 1 | 0 | 72 | 5 | 1 | 0 |
NextAlone/Nagram | # Nagram
Nagram is a third-party Telegram client based on [NekoX](https://github.com/NekoX-Dev/NekoX) with some modifications.
- Official Site: <https://nextalone.xyz>
- Telegram Update Channel: <https://t.me/nagram_channel>
- Releases: <https://github.com/NextAlone/Nagram/releases>
- Issues here: <https://github.com/NextAlone/Nagram/issues>
## Additional feature over Nagram
1. Nice icon (thanks to MaitungTM)
2. Combine message
3. Editable text style
4. Forced copy
5. Invert reply
6. Quick reply in longClick menu (thanks to @blxueya)
7. Undo and Redo
8. Scrollable chat preview (thanks to TeleTux)
9. Noise suppress and voice enhance (thanks to )
----
## NekoX Changes
- Most of Nekogram's features
- Unlimited login accounts
- **Proxy**
- Built-in VMess, Shadowsocks, SSR, Trojan-GFW proxies support (No longer maintained)
- Built-in public proxy (WebSocket relay via Cloudflare CDN), [documentation and for PC](https://github.com/arm64v8a/NekoXProxy)
- Proxy subscription support
- Ipv6 MTProxy support
- Able to parse all proxy subscription format: SIP008, ssr, v2rayN, vmess1, shit ios app formats, clash config and more
- Proxies import and export, remarks, speed measurement, sorting, delete unusable nodes, etc
- Scan the QR code (any link, can add a proxy)
- The ( vmess / vmess1 / ss / ssr / trojan ) proxy link in the message can be clicked
- Allow auto-disabling proxy when VPN is enabled
- Proxy automatic switcher
- Don't alert "Proxy unavailable" for non-current account
- **Stickers**
- Custom [Emoji packs](https://github.com/NekoX-Dev/NekoX/wiki/emoji)
- Add stickers without sticker pack
- Sticker set list backup / restore / share
- **Internationalization**
- OpenCC Chinese Convert
- Full InstantView translation support
- Translation support for selected text on input and in messages
- Google Cloud Translate / Yandex.Translate support
- Force English emoji keywords to be loaded
- Persian calendar support
- **Additional Options**
- Option to disable vibration
- Dialog sorting is optional "Unread and can be prioritized for reminding" etc
- Option to skip "regret within five seconds"
- Option to not send comment first when forwarding
- Option to use nekox chat input menu: replace record button with a menu which contains an switch to control link preview (enabled by default)
- Option to disable link preview by default: to prevent the server from knowing that the link is shared through Telegram.
- Option to ignore Android-only content restrictions (except for the Play Store version).
- Custom cache directory (supports external storage)
- Custom server (official, test DC)
- Option to block others from starting a secret chat with you
- Option to disable trending
- **Additional Actions**
- Allow clicking on links in self profile
- Delete all messages in group
- Unblock all users support
- Login via QR code
- Scan and confirm the login QR code directly
- Allow clearing app data
- Proxies, groups, channels, sticker packs are able to be shared as QR codes
- Add "@Name" when long-pressing @user option
- Allow creating a group without inviting anyone
- Allow upgrading a group to a supergroup
- Mark dialogs as read using tab menu
- Enabled set auto delete timer option for private chats and private groups
- Support saving multiple selected messages to Saved Messages
- Support unpinning multiple selected messages
- View stats option for messages
- **Optimization**
- Keep the original file name when downloading files
- View the data center you belong to when you don't have an avatar
- Enhanced notification service, optional version without Google Services
- Improved session dialog
- Improved link long click menu
- Improved hide messages from blocked users feature
- Don't process cleanup draft events after opening chat
- **Others**
- OpenKeychain client (sign / verify / decrypt / import)
- Text replacer
- **UI**
- Telegram X style menu for unpinning messages
- Built-in Material Design themes / Telegram X style icons
- And more :)
## API and Protocol documentation
Telegram API manuals: <https://core.telegram.org/api>
MTProto protocol manuals: <https://core.telegram.org/mtproto>
## Compilation Guide
**NOTE: For Windows users, please consider using a Linux VM (such as WSL2) or dual booting.**
Environment:
- A Linux distribution based on Debian (e.g. Ubuntu)
- Native tools: `gcc` `go` `make` `cmake` `ninja` `yasm`
```shell
sudo apt install gcc golang make cmake ninja-build yasm
```
- Android SDK: `build-tools;33.0.0` `platforms;android-33` `ndk;21.4.7075529` `cmake;3.18.1` (the default location is **$HOME/Android/SDK**, otherwise you need to specify **$ANDROID_HOME** for it)
It is recommended to use [Android Studio](https://developer.android.com/studio) to install, but you can also use `sdkmanager`:
```shell
sudo apt install sdkmanager
sdkmanager --sdk_root $HOME/Android/SDK --install "build-tools;33.0.0" "platforms;android-33" "ndk;21.4.7075529" "cmake;3.18.1"
```
Build:
1. Checkout submodules
```shell
git submodule update --init --recursive
```
2. Build native dependencies:
```shell
./run init libs
```
3. Build external libraries and native code:
```shell
./run libs native
```
4. Fill out `TELEGRAM_APP_ID` and `TELEGRAM_APP_HASH` in **local.properties** (from [Telegram Developer](https://my.telegram.org/auth))
5. Replace **TMessagesProj/google-services.json** if you want FCM to work.
6. Replace **release.keystore** with yours and fill out `ALIAS_NAME`, `KEYSTORE_PASS` and `ALIAS_PASS` in **local.properties**.
7. Build with Gradle:
```shell
./gradlew assembleMini<Debug/Release/ReleaseNoGcm>
```
----
## Compilation with GitHub Action
1. Create your own `release.keystore` to replace `TMessagesProj/release.keystore`.
2. Prepare LOCAL_PROPERTIES
- KEYSTORE_PASS: from your keystore
- ALIAS_NAME: from your keystore
- ALIAS_PASS: from your keystore
- TELEGRAM_APP_ID: from [Telegram Developer](https://my.telegram.org/auth)
- TELEGRAM_APP_HASH: from [Telegram Developer](https://my.telegram.org/auth)
```env
KEYSTORE_PASS=123456
ALIAS_NAME=key0
ALIAS_PASS=123456
TELEGRAM_APP_ID=123456
TELEGRAM_APP_HASH=abcdefg
```
Then, use base64 to encode the above.
3. Add Repo Action Secrets
- LOCAL_PROPERTIES: from step 2
- HELPER_BOT_TOKEN: from telegram [@Botfather](https://t.me/Botfather), such as `1111:abcd`
- HELPER_BOT_TARGET: from telegram chat id, such as `777000`
4. Run Release Build
## FAQ
#### What is the differences between Nagram, NekoX and Nekogram?
Developed by different developers, read the feature list above to understand the differences.
#### What is the noGcm version?
Google Cloud Messaging, also known as gcm / fcm, message push service by google used by original Telegram android app, it requires your device to have Google Service Framework (non-free) installed.
#### I've encountered a bug!
First, make sure you have the latest version installed (check the channel).
Then, if the issue appears in the official Telegram client too, please submit it to the officials, (be careful not to show NekoX in the description and screenshots, the official developers doesn't like us!).
Then, submit it to our [group](https://t.me/nagram_group) with #bug.
If you experience a *crash*, you also need to click on the version number at the bottom of the settings and select "Enable Log" and send it to us.
## Localization
Nagram is forked from Telegram, thus most locales follows the translations of Telegram for Android, checkout <https://translations.telegram.org/en/android/>.
Is Nagram not in your language, or the translation is incorrect or incomplete? Get involved in the translations on our [Weblate](https://xtaolabs.crowdin.com/nagram).
[![Crowdin](https://badges.crowdin.net/e/156df3a631d257cc6b57301566d545fb/localized.svg)](https://xtaolabs.crowdin.com/nagram)
## Thanks
- [NekoX](https://github.com/NekoX-Dev/NekoX)
- [Nekogram](https://gitlab.com/Nekogram/Nekogram)
- [Pigeongram](https://gitlab.com/JasonKhew96/Nekogram)
- [Nullgram](https://github.com/qwq233/Nullgram)
- [TeleTux](https://github.com/TeleTux/TeleTux)
- [OwlGram](https://github.com/OwlGramDev/OwlGram)
| The third-party Telegram android app. | null | 22 | 84 | 39 | 2,888 | 0 | 2 | 3 |
callstack/reassure | <p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/callstack/reassure/raw/main/packages/reassure/docs/logo-dark.png">
<img src="https://github.com/callstack/reassure/raw/main/packages/reassure/docs/logo.png" width="400px" alt="Reassure" />
</picture>
</p>
<p align="center">Performance testing companion for React and React Native.</p>
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/callstack/reassure/raw/main/packages/reassure/docs/callstack-x-entain-dark.png">
<img src="https://github.com/callstack/reassure/raw/main/packages/reassure/docs/callstack-x-entain.png" width="327px" alt="Callstack x Entain" />
</picture>
</p>
<p align="center">
<a href="https://callstack.github.io/reassure/"><b>Read The Docs</b></a>
</p>
---
- [The problem](#the-problem)
- [This solution](#this-solution)
- [Installation and setup](#installation-and-setup)
- [Writing your first test](#writing-your-first-test)
- [Writing async tests](#writing-async-tests)
- [Measuring test performance](#measuring-test-performance)
- [Write performance testing script](#write-performance-testing-script)
- [CI setup](#ci-setup)
- [Options](#options)
- [`--verbose` (optional)](#--verbose-optional)
- [`--silent` (optional)](#--silent-optional)
- [Scaffolding](#scaffolding)
- [CI Script (`reassure-tests.sh`)](#ci-script-reassure-testssh)
- [Dangerfile](#dangerfile)
- [`.gitignore`](#gitignore)
- [CI script (`reassure-tests.sh`)](#ci-script-reassure-testssh-1)
- [Integration](#integration)
- [Updating existing Dangerfile](#updating-existing-dangerfile)
- [Creating Dangerfile](#creating-dangerfile)
- [Updating the CI configuration file](#updating-the-ci-configuration-file)
- [Assessing CI stability](#assessing-ci-stability)
- [Analyzing results](#analyzing-results)
- [API](#api)
- [Measurements](#measurements)
- [`measureRenders` function](#measurerenders-function)
- [`MeasureRendersOptions` type](#measurerendersoptions-type)
- [`measureFunction` function](#measurefunction-function)
- [`MeasureFunctionOptions` type](#measurefunctionoptions-type)
- [Configuration](#configuration)
- [Default configuration](#default-configuration)
- [`configure` function](#configure-function)
- [`resetToDefault` function](#resettodefault-function)
- [Environmental variables](#environmental-variables)
- [External References](#external-references)
- [Contributing](#contributing)
- [License](#license)
- [Made with ❤️ at Callstack](#made-with-️-at-callstack)
## The problem
You want your React Native app to perform well and fast at all times. As a part of this goal, you profile the app, observe render patterns, apply memoization in the right places, etc. But it's all manual and too easy to unintentionally introduce performance regressions that would only get caught during QA or worse, by your users.
## This solution
Reassure allows you to automate React Native app performance regression testing on CI or a local machine. In the same way, you write your integration and unit tests that automatically verify that your app is still _working correctly_, you can write performance tests that verify that your app is still _working performantly_.
You can think about it as a React performance testing library. In fact, Reassure is designed to reuse as much of your [React Native Testing Library](https://github.com/callstack/react-native-testing-library) tests and setup as possible.
Reassure works by measuring render characteristics – duration and count – of the testing scenario you provide and comparing that to the stable version. It repeats the scenario multiple times to reduce the impact of random variations in render times caused by the runtime environment. Then, it applies statistical analysis to determine whether the code changes are statistically significant. As a result, it generates a human-readable report summarizing the results and displays it on the CI or as a comment to your pull request.
In addition to measuring component render times it can also measure execution of regular JavaScript functions.
## Installation and setup
To install Reassure, run the following command in your app folder:
Using yarn
```sh
yarn add --dev reassure
```
Using npm
```sh
npm install --save-dev reassure
```
You will also need a working [Jest](https://jestjs.io/docs/getting-started) setup as well as one of either [React Native Testing Library](https://github.com/callstack/react-native-testing-library#installation) or [React Testing Library](https://testing-library.com/docs/react-testing-library/intro).
You can check our example projects:
- [React Native (Expo)](https://github.com/callstack/reassure-examples/tree/main/examples/native-expo)
- [React Native (CLI)](https://github.com/callstack/reassure-examples/tree/main/examples/native-cli)
- [React.js (Next.js)](https://github.com/callstack/reassure-examples/tree/main/examples/web-nextjs)
- [React.js (Vite)](https://github.com/callstack/reassure-examples/tree/main/examples/native-expo)
Reassure will try to detect which Testing Library you have installed. If both React Native Testing Library and React Testing Library are present, it will warn you about that and give precedence to React Native Testing Library. You can explicitly specify Testing Library to be used by using [`configure`](#configure-function) option:
```ts
configure({ testingLibrary: 'react-native' });
// or
configure({ testingLibrary: 'react' });
```
You should set it in your Jest setup file, and you can override it in particular test files if needed.
### Writing your first test
Now that the library is installed, you can write your first test scenario in a file with `.perf-test.js`/`.perf-test.tsx` extension:
```ts
// ComponentUnderTest.perf-test.tsx
import { measureRenders } from 'reassure';
import { ComponentUnderTest } from './ComponentUnderTest';
test('Simple test', async () => {
await measureRenders(<ComponentUnderTest />);
});
```
This test will measure render times of `ComponentUnderTest` during mounting and resulting sync effects.
> **Note**: Reassure will automatically match test filenames using Jest's `--testMatch` option with value `"<rootDir>/**/*.perf-test.[jt]s?(x)"`. However, if you want to pass a custom `--testMatch` option, you may add it to the `reassure measure` script to pass your own glob. More about `--testMatch` in [Jest docs](https://jestjs.io/docs/configuration#testmatch-arraystring)
#### Writing async tests
If your component contains any async logic or you want to test some interaction, you should pass the `scenario` option:
```ts
import { measureRenders } from 'reassure';
import { screen, fireEvent } from '@testing-library/react-native';
import { ComponentUnderTest } from './ComponentUnderTest';
test('Test with scenario', async () => {
const scenario = async () => {
fireEvent.press(screen.getByText('Go'));
await screen.findByText('Done');
};
await measureRenders(<ComponentUnderTest />, { scenario });
});
```
The body of the `scenario` function is using familiar React Native Testing Library methods.
In case of using a version of React Native Testing Library lower than v10.1.0, where [`screen` helper](https://callstack.github.io/react-native-testing-library/docs/api/#screen) is not available, the `scenario` function provides it as its first argument:
```ts
import { measureRenders } from 'reassure';
import { fireEvent } from '@testing-library/react-native';
test('Test with scenario', async () => {
const scenario = async (screen) => {
fireEvent.press(screen.getByText('Go'));
await screen.findByText('Done');
};
await measureRenders(<ComponentUnderTest />, { scenario });
});
```
If your test contains any async changes, you will need to make sure that the scenario waits for these changes to settle, e.g. using `findBy` queries, `waitFor` or `waitForElementToBeRemoved` functions from RNTL.
### Measuring test performance
To measure your first test performance, you need to run the following command in the terminal:
```sh
yarn reassure
```
This command will run your tests multiple times using Jest, gathering performance statistics and will write them to `.reassure/current.perf` file. To check your setup, check if the output file exists after running the command for the first time.
> **Note:** You can add `.reassure/` folder to your `.gitignore` file to avoid accidentally committing your results.
Reassure CLI will automatically try to detect your source code branch name and commit hash when you are using Git. You can override these options, e.g. if you are using a different version control system:
```sh
yarn reassure --branch [branch name] --commit-hash [commit hash]
```
### Write performance testing script
To detect performance changes, you must measure the performance of two versions of your code current (your modified code) and baseline (your reference point, e.g. `main` branch). To measure performance on two branches, you must switch branches in Git or clone two copies of your repository.
We want to automate this task to run on the CI. To do that, you will need to create a performance-testing script. You should save it in your repository, e.g. as `reassure-tests.sh`.
A simple version of such script, using a branch-changing approach, is as follows:
```sh
#!/usr/bin/env bash
set -e
BASELINE_BRANCH=${GITHUB_BASE_REF:="main"}
# Required for `git switch` on CI
git fetch origin
# Gather baseline perf measurements
git switch "$BASELINE_BRANCH"
yarn install
yarn reassure --baseline
# Gather current perf measurements & compare results
git switch --detach -
yarn install
yarn reassure
```
## CI setup
To make setting up the CI integration and all prerequisites more convenient, we have prepared a CLI command to generate all necessary templates for you to start with.
Simply run:
```bash
yarn reassure init
```
This will generate the following file structure
```
├── <ROOT>
│ ├── reassure-tests.sh
│ ├── dangerfile.ts/js (or dangerfile.reassure.ts/js if dangerfile.ts/js already present)
│ └── .gitignore
```
### Options
You can also use the following options to adjust the script further
#### `--verbose` (optional)
This is one of the options controlling the level of logs printed into the command prompt while running reassure scripts. It will
#### `--silent` (optional)
Just like the previous, this option also controls the level of logs. It will suppress all logs besides explicit errors.
### Scaffolding
#### CI Script (`reassure-tests.sh`)
Basic script allowing you to run Reassure on CI. More on the importance and structure of this file in the following section.
#### Dangerfile
If your project already contains a `dangerfile.ts/js`, the CLI will not override it in any way. Instead, it will generate a `dangerfile.reassure.ts/js` file, allowing you to compare and update your own at your convenience.
#### `.gitignore`
If the `.gitignore` file is present and no mentions of `reassure` appear, the script will append the `.reassure/` directory to its end.
### CI script (`reassure-tests.sh`)
To detect performance changes, you must measure the performance of two versions of your code current (your modified code) and baseline (your reference point, e.g. `main` branch). To measure performance on two branches, you must switch branches in Git or clone two copies of your repository.
We want to automate this task to run on the CI. To do that, you will need to create a performance-testing script. You should save it in your repository, e.g. as `reassure-tests.sh`.
A simple version of such script, using a branch-changing approach, is as follows:
```sh
#!/usr/bin/env bash
set -e
BASELINE_BRANCH=${GITHUB_BASE_REF:="main"}
# Required for `git switch` on CI
git fetch origin
# Gather baseline perf measurements
git switch "$BASELINE_BRANCH"
yarn install
yarn reassure --baseline
# Gather current perf measurements & compare results
git switch --detach -
yarn install
yarn reassure
```
### Integration
As a final setup step, you must configure your CI to run the performance testing script and output the result.
For presenting output at the moment, we integrate with Danger JS, which supports all major CI tools.
#### Updating existing Dangerfile
You will need a working [Danger JS setup](https://danger.systems/js/guides/getting_started.html).
Then add Reassure Danger JS plugin to your dangerfile:
```ts
// /<project_root>/dangerfile.reassure.ts (generated by the init script)
import path from 'path';
import { dangerReassure } from 'reassure';
dangerReassure({
inputFilePath: path.join(__dirname, '.reassure/output.md'),
});
```
#### Creating Dangerfile
If you do not have a Dangerfile (`dangerfile.js` or `dangerfile.ts`) yet, you can use the one generated by the `reassure init` script without making any additional changes.
It is also in our example file [Dangerfile](https://github.com/callstack/reassure/blob/main/dangerfile.ts).
#### Updating the CI configuration file
Finally, run both the performance testing script & danger in your CI config:
```yaml
- name: Run performance testing script
run: ./reassure-tests.sh
- name: Run Danger.js
run: yarn danger ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
You can also check our example [GitHub workflow](https://github.com/callstack/reassure/blob/main/.github/workflows/main.yml).
The above example is based on GitHub Actions, but it should be similar to other CI config files and should only serve as a reference in such cases.
> **Note**: Your performance test will run much longer than regular integration tests. It's because we run each test scenario multiple times (by default, 10) and repeat that for two branches of your code. Hence, each test will run 20 times by default. That's unless you increase that number even higher.
## Assessing CI stability
We measure React component render times with microsecond precision during performance measurements using `React.Profiler`. This means the same code will run faster or slower, depending on the machine. For this reason, baseline & current measurements need to be run on the same machine. Optimally, they should be run one after another.
Moreover, your CI agent needs to have stable performance to achieve meaningful results. It does not matter if your agent is fast or slow as long as it is consistent in its performance. That's why the agent should not be used during the performance tests for any other work that might impact measuring render times.
To help you assess your machine's stability, you can use the `reassure check-stability` command. It runs performance measurements twice for the current code, so baseline and current measurements refer to the same code. In such a case, the expected changes are 0% (no change). The degree of random performance changes will reflect the stability of your machine.
This command can be run both on CI and local machines.
Normally, the random changes should be below 5%. Results of 10% and more are considered too high, meaning you should work on tweaking your machine's stability.
> **Note**: As a trick of last resort, you can increase the `run` option from the default value of 10 to 20, 50 or even 100 for all or some of your tests, based on the assumption that more test runs will even out measurement fluctuations. That will, however, make your tests run even longer.
You can refer to our example [GitHub workflow](https://github.com/callstack/reassure/blob/main/.github/workflows/stability.yml).
## Analyzing results
<p align="center">
<img src="https://github.com/callstack/reassure/raw/main/packages/reassure/docs/report-markdown.png" width="920px" alt="Markdown report" />
</p>
Looking at the example, you can notice that test scenarios can be assigned to certain categories:
- **Significant Changes To Duration** shows test scenarios where the performance change is statistically significant and **should** be looked into as it marks a potential performance loss/improvement
- **Meaningless Changes To Duration** shows test scenarios where the performance change is not statistically significant
- **Changes To Count** shows test scenarios where the render or execution count did change
- **Added Scenarios** shows test scenarios which do not exist in the baseline measurements
- **Removed Scenarios** shows test scenarios which do not exist in the current measurements
## API
### Measurements
#### `measureRenders` function
Custom wrapper for the RNTL `render` function responsible for rendering the passed screen inside a `React.Profiler` component,
measuring its performance and writing results to the output file. You can use the optional `options` object that allows customizing aspects
of the testing
```ts
async function measureRenders(
ui: React.ReactElement,
options?: MeasureRendersOptions,
): Promise<MeasureResults> {
```
#### `MeasureRendersOptions` type
```ts
interface MeasureRendersOptions {
runs?: number;
warmupRuns?: number;
wrapper?: React.ComponentType<{ children: ReactElement }>;
scenario?: (view?: RenderResult) => Promise<any>;
writeFile?: boolean;
}
```
- **`runs`**: number of runs per series for the particular test
- **`warmupRuns`**: number of additional warmup runs that will be done and discarded before the actual runs (default 1).
- **`wrapper`**: React component, such as a `Provider`, which the `ui` will be wrapped with. Note: the render duration of the `wrapper` itself is excluded from the results; only the wrapped component is measured.
- **`scenario`**: a custom async function, which defines user interaction within the UI by utilising RNTL or RTL functions
- **`writeFile`**: (default `true`) should write output to file.
#### `measureFunction` function
Allows you to wrap any synchronous function, measure its execution times and write results to the output file. You can use optional `options` to customize aspects of the testing. Note: the execution count will always be one.
```ts
async function measureFunction(
fn: () => void,
options?: MeasureFunctionOptions
): Promise<MeasureResults> {
```
#### `MeasureFunctionOptions` type
```ts
interface MeasureFunctionOptions {
runs?: number;
warmupRuns?: number;
}
```
- **`runs`**: number of runs per series for the particular test
- **`warmupRuns`**: number of additional warmup runs that will be done and discarded before the actual runs.
### Configuration
#### Default configuration
The default config which will be used by the measuring script. This configuration object can be overridden with the use
of the `configure` function.
```ts
type Config = {
runs?: number;
warmupRuns?: number;
outputFile?: string;
verbose?: boolean;
testingLibrary?:
| 'react-native'
| 'react'
| { render: (component: React.ReactElement<any>) => any; cleanup: () => any };
};
```
```ts
const defaultConfig: Config = {
runs: 10,
warmupRuns: 1,
outputFile: '.reassure/current.perf',
verbose: false,
testingLibrary: undefined, // Will try auto-detect first RNTL, then RTL
};
```
**`runs`**: the number of repeated runs in a series per test (allows for higher accuracy by aggregating more data). Should be handled with care.
- **`warmupRuns`**: the number of additional warmup runs that will be done and discarded before the actual runs.
**`outputFile`**: the name of the file the records will be saved to
**`verbose`**: make Reassure log more, e.g. for debugging purposes
**`testingLibrary`**: where to look for `render` and `cleanup` functions, supported values `'react-native'`, `'react'` or object providing custom `render` and `cleanup` functions
#### `configure` function
```ts
function configure(customConfig: Partial<Config>): void;
```
The `configure` function can override the default config parameters.
#### `resetToDefaults` function
```ts
resetToDefaults(): void
```
Reset the current config to the original `defaultConfig` object
#### Environmental variables
You can use available environmental variables to alter your test runner settings.
- `TEST_RUNNER_PATH`: an alternative path for your test runner. Defaults to `'node_modules/.bin/jest'` or on Windows `'node_modules/jest/bin/jest'`
- `TEST_RUNNER_ARGS`: a set of arguments fed to the runner. Defaults to `'--runInBand --testMatch "<rootDir>/**/*.perf-test.[jt]s?(x)"'`
Example:
```sh
TEST_RUNNER_PATH=myOwnPath/jest/bin yarn reassure
```
## External References
- [The Ultimate Guide to React Native Optimization 2023 Edition](https://www.callstack.com/campaigns/download-the-ultimate-guide-to-react-native-optimization?utm_campaign=RN_Performance&utm_source=readme_reassure) - Mentioned in "Make your app consistently fast" chapter.
## Contributing
See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.
## License
[MIT](./LICENSE)
## Made with ❤️ at Callstack
Reassure is an Open Source project and will always remain free to use. The project has been developed in close
partnership with [Entain](https://entaingroup.com/) and was originally their in-house project. Thanks to their
willingness to develop the React & React Native ecosystem, we decided to make it Open Source. If you think it's cool, please star it 🌟
Callstack is a group of React and React Native experts. If you need help with these or want to say hi, contact us at hello@callstack.com!
Like the project? ⚛️ [Join the Callstack team](https://callstack.com/careers/?utm_campaign=Senior_RN&utm_source=github&utm_medium=readme) who does amazing stuff for clients and drives React Native Open Source! 🔥
| Performance testing companion for React and React Native | performance,performance-testing,react,react-native,regression,testing,hacktoberfest | 17 | 44 | 433 | 358 | 9 | 15 | 3 |
cybersecsi/houdini | # 🐳 HOUDINI: Hundreds of Offensive and Useful Docker Images for Network Intrusion
HOUDINI is a curated list of **Network Security** related Docker Images for Network Intrusion purposes. A lot of images are created and kept updated through our [RAUDI](https://github.com/cybersecsi/RAUDI) repository. Pretty dope, eh?
[![Documentation](https://img.shields.io/badge/Documentation-complete-green.svg?style=flat)](https://github.com/cybersecsi/HOUDINI/blob/main/README.md)
[![Netlify Status](https://api.netlify.com/api/v1/badges/f8b06b7e-bdc6-4af8-aba9-f32e1132cd25/deploy-status)](https://app.netlify.com/sites/houdini/deploys)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://github.com/cybersecsi/HOUDINI/blob/main/LICENSE)
## Table of Contents
- [Web App](#web-app)
- [Built with](#built-with)
- [Add a Tool](#add-a-tool)
- [Development](#development)
- [Roadmap](#roadmap)
- [Contributions](#contributions)
- [Credits](#credits)
- [License](#license)
## Web App
<p align="center">
<img src="docs/houdini-home.png">
</p>
To use HOUDINI, click the link below:
- https://houdini.secsi.io
Other than listing **a lot** of tools we provide ``docker run`` commands for every one of them and useful **Cheatsheets** for some of them (You can also contribute by suggesting new commands to add).
<p align="center">
<img src="docs/houdini-cheatsheet.png">
</p>
### Built with
HOUDINI is created using:
* [React](https://reactjs.org/)
* [TypeScript](https://www.typescriptlang.org/)
* [Tailwind CSS](https://tailwindcss.com/)
And using the following packages:
* [fuse.js](https://www.npmjs.com/package/fuse.js)
* [react-github-btn](https://www.npmjs.com/package/react-github-btn)
* [react-github-corner](https://www.npmjs.com/package/react-github-corner)
* [react-hotkeys-hook](https://www.npmjs.com/package/react-hotkeys-hook)
* [react-icons](https://www.npmjs.com/package/react-icons)
* [react-markdown](https://www.npmjs.com/package/react-markdown)
* [react-router-dom](https://www.npmjs.com/package/react-router-dom)
* [remark-gfm](https://www.npmjs.com/package/remark-gfm)
* [use-clipboard-copy](https://www.npmjs.com/package/use-clipboard-copy)
* [fs-extra](https://www.npmjs.com/package/fs-extra)
* [inquirer](https://www.npmjs.com/package/inquirer)
## Add a tool
A tool is composed by:
- A markdown file in the */tools* folder
- An entry into a Javascript file (in */web/src/config/tools.ts*)
We want people to contribute, so we created a script to automate the process of adding a new tool. All you have to do is add the **description** and (optionally) the **cheatsheet**. The command is ``bootstrap``, here is an example:
<p align="center">
<img src="docs/bootstrap.gif">
</p>
To use the ``boostrap`` command you have to:
- ``pnpm install`` in the `web` folder
- ``pnpm run bootstrap`` in the `web` folder
- Add the mandatory informations to add a new tool
The mandatory informations are the following:
- **Fancy name**: The long version name of the tool
- **Docker Image**: The Docker Image (in the format *repo/image*)
- **Official Doc**: A link to the official documentation for the tool
- **Run Command**: The run command
The last thing you have to do is to add the **description** and (optionally) the **cheatsheet**.
## Development
This section provides a set of commands to run the application locally.
PLEASE use **pnpm** over **npm**
### Setup
This is a **React** based application. Before running it you have to install all the needed packages with the following command:
```
cd ./web && pnpm install
```
### Build
To build the app you have to run:
```
pnpm run build
```
### Run
To execute the app locally you have to run:
```
pnpm dev
```
Please note that the folder used for showing the Markdown files in the React application is **not** the */tools* folder, but a directory inside the source code of the React app itself (*/web/src/_tools*). Every time you run ``yarn start`` from the main directory the */tools* folder is copied in */web/src/_tools*. So if you add a new tool while the app is running it won't show up until you update the */web/src/_tools* folder. For this reason a command has been added to ease this work, you can easily copy the */tools* folder by running the following command while in the main directory:
```
pnpm run update
```
## Roadmap
Here is the current roadmap:
- [x] Responsive Design
- [x] Add copy botton in ``<code>`` tags (make it a component)
- [x] Check ``bootstrap`` command on Linux systems
- [x] Fix margin, padding in tool pages to make it more readable
- [x] Add tools (reach at least 100)
- [x] Add labels **[MUST]**
- [ ] Define customizable fields **[COULD]**
- [ ] Add toolbox for customizing commands **[COULD]**
- [ ] Add webapp snippet (to keep interesting commands) **[COULD]**
- [ ] Add ``bashify`` script **[COULD]**
## Contributions
Everyone is invited to contribute!
We created a **very detailed** document to describe [how to contribute to HOUDINI](https://github.com/cybersecsi/HOUDINI/blob/main/CONTRIBUTING.md).
## Credits
HOUDINI is an idea of [Gaetano Perrone](https://github.com/giper45) and is proudly developed [@SecSI](https://secsi.io) by:
- [Angelo Delicato](https://github.com/thelicato)
- [Daniele Capone](https://github.com/daniele-capone)
- [Emanuele Galdi](https://github.com/emalderson)
- [Gaetano Perrone](https://github.com/giper45)
## License
**HOUDINI** is an open-source and free software released under the [GNU GPL v3](/LICENSE). | Hundreds of Offensive and Useful Docker Images for Network Intrusion. The name says it all. | cheatsheet,docker,docker-images,hacking,pentesting,tools,webapp | 7 | 4 | 7 | 175 | 5 | 2 | 1 |
arriven/db1000n | # Death by 1000 needles
See [Docs](https://arriven.github.io/db1000n)
[![Made in Ukraine](https://img.shields.io/badge/made_in-ukraine-ffd700.svg?labelColor=0057b7)](https://stand-with-ukraine.pp.ua)
This is a simple distributed load generation tool written in Go.
It is able to fetch a simple JSON config from a local or remote location.
The config describes which load generation jobs should be launched in parallel.
There are other existing tools doing the same kind of job.
I do not intend to copy or replace them but rather provide a simple open source alternative so that users have more options.
Feel free to use it in your load tests (wink-wink).
The software is provided as is under no guarantee.
I will update both the repository and this documentation as I go during following days (date of writing this is 26th of February 2022, third day of Russian invasion into Ukraine).
| null | null | 122 | 60 | 306 | 605 | 36 | 2 | 13 |
m1guelpf/lil-web3 | # lil web3
> Small, focused, utility-based smart contracts.
lil web3 aims to build really simple, intentionally-limited versions of web3 protocols & apps. By distilling them to their roots, we can better understand how they work.
## lil ens
> A stupidly-simple namespace implementation.
lil ens contains a single function `register(string name)`, which allows an address to claim a name. \
The key learning here is that the technical implementation of a namespace can be incredibly simple, and its adoption (both of users and apps integrating with it) what makes it successful.
If you're interested in a slightly more comprehensive ENS-like implementation, I also built a simplified version of the base ENS contracts (and tests for them) following the [ENS spec](https://eips.ethereum.org/EIPS/eip-137) as [a separate repo](https://github.com/m1guelpf/ens-contracts-blindrun).
[Contract Source](src/LilENS.sol) • [Contract Tests](src/test/LilENS.t.sol)
## lil opensea
> Barebones NFT marketplace.
lil opensea has three functions, allowing users to list their NFTs for sale (`list(ERC721 tokenContract, uint256 tokenId, uint256 askPrice)`), buy an NFT that has been listed (`buyListing(uint256 listingId)`), or cancel a listing (`cancelListing(uint256 listingId)`). These functions emit events (`NewListing`, `ListingBought`, and `ListingRemoved`) that could be picked up by [a subgraph](https://thegraph.com/) in order to build a database of available listings to present in a UI.
> Note: Remember to call `setApprovalForAll(<lil opensea address>, true)` on the contract for the NFT you're listing before calling the `list` function 😉
[Contract Source](src/LilOpenSea.sol) • [Contract Tests](src/test/LilOpenSea.t.sol)
## lil fractional
> Barebones NFT fractionalisation factory.
lil fractional contains a `split(ERC721 nftContract, uint256 tokenId, uint256 supply, string name, string symbol)` function you can call to fractionalise your NFT into any amount of `$SYMBOL` ERC20 tokens (leaving the sale/spread of these at the discretion of the caller), and a `join(uint256 vaultId)` that you can call if you own the entirety of the `$SYMBOL` supply to burn your tokens and get the NFT back.
> Note: Remember to call `setApprovalForAll(<lil fractional address>, true)` on the contract for the NFT you're fractionalising before calling the `split` function, and to call `approve(<lil fractional address>, <supply or greater>)` on the contract for the ERC20 before calling the `join` function 😉
[Contract Source](src/LilFractional.sol) • [Contract Tests](src/test/LilFractional.t.sol)
## lil juicebox
> Very simple token sale + refund manager.
lil juicebox allows users to participate in a fundraising campaign by sending ETH via the `contribute()` function, in exchange for a proportional share of ERC20 tokens, until the owner decides to close the campaign (`setState(State.CLOSED)`) and withdraw the funds (calling `withdraw()`). If the owner decides to issue refunds (`setState(State.REFUNDING)`) they can send all the ETH back to the contract, where users can burn their ERC20 tokens to get back their ETH (using `refund(uint256 amount)`). Finally, the owner can renounce ownership of the campaign (making it impossible to change any of the aforementioned settings) by calling `renounce()`.
> Note: Remember to call `approve(<lil juicebox address>, <amount of tokens to refund>)` on the contract for the ERC20 before calling the `refund` function 😉
[Contract Source](src/LilJuicebox.sol) • [Contract Tests](src/test/LilJuicebox.t.sol)
## lil flashloan
> A (Proof of Concept)-level flash loan implementation
lil flashloan allows contract implementing the `onFlashLoan(ERC20 token, uint256 amount, bytes data)` to temporarily receive any amount of ERC20 tokens (limited by the loaner's supply ofc), by calling the `execute(FlashBorrower receiver, ERC20 token, uint256 amount, bytes data)` function. These tokens should be repaid (along with any fees) before the end of the transaction to prevent it from reverting. The owner of the contract can set a fee percentage for any ERC20 by calling `setFees(ERC20 token, uint256 fee)` (`fee` is a percentage multiplied by 100 to avoid decimals, `10_00` would be 10% for example), and can withdraw the contract's balance by calling `withdraw(ERC20 token, uint256 amount)`.
> Note: In order to keep the contract simple, it's not compliant with [EIP-3156](https://eips.ethereum.org/EIPS/eip-3156) (the flash loan standard).
[Contract Source](src/LilFlashloan.sol) • [Contract Tests](src/test/LilFlashloan.t.sol)
## lil gnosis
> An optimised ERC721-based multisig implementation
lil gnosis allows you to define a set of approved signers and the number of required signatures to execute a transaction (or change the configuration params) when deploying the contract `LilGnosis(string name, address[] signers, uint256 quorum)`. Once deployed, signers can craft [EIP-712 signatures](https://eips.ethereum.org/EIPS/eip-712) (using the `Execute(address target,uint256 value,bytes payload,uint256 nonce)` signature) to execute any transaction by calling the `execute(address target, uint256 value, bytes payload, Signature[] signatures)` function. You can also update the number of required signatures by calling the `setQuorum(uint256 quorum, Signature[] sigs)` function, or add and remove trusted signers by calling `setSigner(address signer, bool shouldTrust, Signature[] sigs)`.
> Note: For implementation reasons, when building the array of signatures, you need to order them in ascending order by the address that signed them. If you don't do this, the verification will fail!
[Contract Source](src/LilGnosis.sol) • [Contract Tests](src/test/LilGnosis.t.sol)
## lil superfluid
> A simple token streaming implementation
lil superfluid enables anyone to continuously stream tokens to a user during an interval of blocks. You can call the `streamTo(address recipient, ERC20 token, uint256 initialBalance, Timeframe timeframe, uint256 paymentPerBlock)` function to send `paymentPerBlock` every block the stream is active for (between by `timeframe.startBlock` and `timeframe.stopBlock`) to `recipient`, locking `initialBalance` tokens to guarantee their delivery. Once created, the sender can increase the locked balance by calling the `refuel(uint256 streamId, uint256 amount)` function, and the receiver can withdraw their current balance at any time by calling `withdraw(uint256 streamId)`. Once the stream has ended, the sender can call `refund(uint256 streamId)` to withdraw any excess locked funds, and at any point any party can view their balance through `balanceOf(uint256 streamId, address who)`, or update the stream rate or timeframe through by providing an [EIP-712 signature](https://eips.ethereum.org/EIPS/eip-712) from the other party (certifying they approve of it) to the `updateDetails(uint256 streamId, uint256 paymentPerBlock, Timeframe timeframe, Signature sig)` function.
> Note: Remember to call `approve(<lil superfluid address>, <amount>)` on the contract for the ERC20 before calling the `streamTo` and `refuel` functions 😉
[Contract Source](src/LilSuperfluid.sol) • [Contract Tests](src/test/LilSuperfluid.t.sol)
## Contributing
Part of the motivation behind lil web3 is to get better at Solidity. For this reason, I won't be accepting PRs that add new lil contracts, as I'd rather implement them myself.
That doesn't mean contributions aren't welcome tho! If you find a bug, gas optimisation, or there's something you'd have written differently, a PR will be very appreciated. New ideas for protocols/apps you'd like to see me try to build are also very welcome!
## License
This project is open-sourced software licensed under the GNU Affero GPL v3.0 license. See the [License file](LICENSE) for more information.
| Simple, intentionally-limited versions of web3 protocols & apps. | null | 0 | 7 | 6 | 47 | 6 | 1 | 1 |
oleeskild/obsidian-digital-garden | # 🏡 Obsidian Digital Garden
Publish your notes to the web, for free. In your own personal garden.
## Docs
Documentation and examples can be found at [dg-docs.ole.dev](https://dg-docs.ole.dev/).
![Digital-Garden-Demo](https://raw.githubusercontent.com/oleeskild/obsidian-digital-garden/main/img/dg-demo.gif)
## Features
- Basic Markdown Syntax
- Links to other notes
- Dataview queries (as codeblocks, inline and dataviewjs)
- Backlinks
- Obsidian Themes
- Style settings
- Local graph
- Filetree navigation
- Global search
- Callouts/Admonitions
- Embedded/Transcluded Excalidraw drawings
- Embedded/Transcluded Images
- Transcluded notes
- Code Blocks
- MathJax
- Highlighted text
- Footnotes
- Mermaid diagrams
- PlantUML diagrams
## Initial Setup
It's a bit of work to set this all up, but when you're done you'll have a digital garden in which you are in control of every part of it, and can customize it as you see fit. Which is what makes digital gardens so delightful.
Lets get started:
1. First off, you will need a GitHub account. If you don't have this, create one [here](https://github.com/signup).
2. You'll also need a Vercel account. You can sign up using your GitHub account [here](https://vercel.com/signup)
3. Open [this repo](https://github.com/oleeskild/digitalgarden), and click the blue "Deploy to Vercel" button. This will open Vercel which in turn will create a copy of this repository in your GitHub accont. Give it a fitting name like 'my-digital-garden'. Follow the steps to publish your site to the internet.
4. Now you need to create an access token so that the plugin can add new notes to the repo on your behalf. Detailed instructions with images are available in the [docs](https://dg-docs.ole.dev/advanced/fine-grained-access-token/). Use a [Fine grained personal access token](https://github.com/settings/personal-access-tokens/new) with the following settings:
- Token Name: _`YYYY-Digital Garden`_
- Expiration: _Custom / a year / whatever you want._
- Description: _Publishing content to the digital garden._
- Resource owner: _yourself_
- Only select repositories: _Select your garden repo_
- Permissions (just two needed):
- Contents: `Access: Read and write`
- Pull requests: `Access: Read and write`
Click the "Generate token" button, and copy the token you are presented with on the next page.
5. In Obsidian open the setting menu and find the settings for "Digital Garden". The top three settings here is required for the plugin to work.
Fill in your GitHub username, the name of the repo with your notes which you created in step 3. Lastly paste the token you created in step 4. The other options are optional. You can leave them as is.
6. Now, let's publish your first note! Create a new note in Obsidian. And add the following to the top of your file
```
---
dg-home: true
dg-publish: true
---
```
(If you get backticks, \`\`\`, at the start and beginning when copy-pasting the above text, delete those. It should start and end with a triple dash, ---. See [this page](https://help.obsidian.md/Advanced+topics/YAML+front+matter) for more info about Obsidian and frontmatter.)
**This does two things:**
- The dg-home setting tells the plugin that this should be your home page or entry into your digital garden. (It only needs to be added to _one_ note, not every note you'll publish).
- The dg-publish setting tells the plugin that this note should be published to your digital garden. Notes without this setting will not be published. (In other terms: Every note you publish will need this setting.)
7. Open your command palette by pressing CTRL+P on Windows/Linux (CMD+P on Mac) and find the "Digital Garden: Publish Single Note" command. Press enter.
8. Go to your site's URL which you should find on [Vercel](https://vercel.com/dashboard). If nothing shows up yet, wait a minute and refresh. Your note should now appear.
Congratulations, you now have your own digital garden, hosted free of charge!
You can now start adding links as you usually would in Obisidan, with double square brackets like this: [[Some Other Note]], to the note that you just published. You can also link to a specific header by using the syntax [[Some Other Note#A Header]]. Remember to also publish the notes your are linking to as this will not happen automatically. This is by design. You are always in control of what notes you actually want to publish. If you did not publish a linked note, the link will simply lead to a site telling the user that this note does not exist.
![new-note-demo](https://raw.githubusercontent.com/oleeskild/obsidian-digital-garden/main/img/new-note-demo.gif)
## Modifying the template/site
The code for the website is available in the repo you created in step 3, and this is yours to modify however you want. If you know some css I encourage you to change the default styling to make the site your own. Please modify the custom-style.scss when doing so to avoid
future conflict when updating the template. Vercel should automatically update your site when you make changes to the code.
## Updating the template
In the setting menu for the plugin there is, in addition to the previously mentioned settings, a setting with the name "Site Template" with a button saying "Manage site template". Clicking this should open up a popup-window with the setting "Update site to latest template" and a button saying "Create PR". Whenever digital garden template receives any updates, this button can be used to update your site. It will create a new branch in your repo with the changes and create a Pull Request to your main branch. The plugin will present you with this URL in the setting view.
If you used the "Deploy to Vercel" button, a Vercel bot will build a preview version of your site which you can visit to see that the changes does not contain any breaking changes. The URL should be visible in the PR.
When you are ready you can use the "Merge pull request" button on the pull request page to merge the changes into your main branch and make the changes go live.
In the future you will be notified with a visual cue whenever there is an update ready. For now you will need to manually check. If you have the latest version, you will be told so.
---
## Local development
NOTE: this plugin contains a testing vault at `src/dg-testVault`, which is recommended for local development.
1. Clone this repository
2. (for best compatability, use node version manager and run `nvm install && nvm use`)
3. Install dependencies with `npm install`
4. Run with `npm run dev`
5. Open the vault from `src/dg-testVault` into obsidian
6. (if you want to develop this plugin with another vault, move it into .obsidian/plugins of that vault)
To use the test vault with github, add your test repository values to a .env file with:
```
GITHUB_REPO=
GITHUB_TOKEN=
GITHUB_USERNAME=
```
Note: this repository uses prettier and eslint to enforce code formatting and style. It is recommended to install these to your IDE for automatic formatting and error highlighting.
## Join the Community
Be a part of the Digital Garden Community by joining our [Discord Server](https://discord.gg/Z46n2RNX8e).
## Code Contributers
Huge thanks to all the contributors who helped in making this
<a href="https://github.com/oleeskild/obsidian-digital-garden/graphs/contributors">
<img src="https://contrib.rocks/image?repo=oleeskild/obsidian-digital-garden" />
</a>
---
## Support
This plugin is developed in my free time. If you've found it useful, it would make my day and boost my motivation to invest more time in it if you to showed your support by buying me a coffee.
Note that you in no way have to feel any pressure to do this. The plugin is completely free, and will remain free in the unforeseeable future.
[<img style="float:left" src="https://cdn.ko-fi.com/cdn/kofi3.png?v=3" width="200">](https://ko-fi.com/oleeskild)
| null | null | 108 | 13 | 115 | 377 | 195 | 13 | 1 |
dstackai/dstack | <div>
<h2>
<a target="_blank" href="https://dstack.ai">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/dstackai/dstack/master/docs/assets/images/dstack-logo-dark.svg"/>
<img alt="dstack" src="https://raw.githubusercontent.com/dstackai/dstack/master/docs/assets/images/dstack-logo.svg" width="350px"/>
</picture>
</a>
</h2>
[![Last commit](https://img.shields.io/github/last-commit/dstackai/dstack?style=flat-square)](https://github.com/dstackai/dstack/commits/)
[![PyPI - License](https://img.shields.io/pypi/l/dstack?style=flat-square&color=blue)](https://github.com/dstackai/dstack/blob/master/LICENSE.md)
[![Discord](https://dcbadge.vercel.app/api/server/u8SmfwPpMd?style=flat-square)](https://discord.gg/CBgdrGnZjy)
</div>
`dstack` is an open-source container orchestration engine designed for running AI workloads across any cloud or data center.
The supported cloud providers include AWS, GCP, Azure, OCI, Lambda, TensorDock, Vast.ai, RunPod, and CUDO.
You can also use `dstack` ro run workloads on on-prem servers.
## Latest news ✨
- [2024/05] [dstack 0.18.3: OCI, and more](https://github.com/dstackai/dstack/releases/tag/0.18.3) (Release)
- [2024/05] [dstack 0.18.2: On-prem clusters, private subnets, and more](https://github.com/dstackai/dstack/releases/tag/0.18.2) (Release)
- [2024/04] [dstack 0.18.0: RunPod, mult-node tasks, and more](https://github.com/dstackai/dstack/releases/tag/0.18.0) (Release)
- [2024/03] [dstack 0.17.0: Auto-scaling, and other improvements](https://github.com/dstackai/dstack/releases/tag/0.17.0) (Release)
## Installation
Before using `dstack` through CLI or API, set up a `dstack` server.
### Install the server
The easiest way to install the server, is via `pip`:
```shell
pip install "dstack[all]" -U
```
### Configure backends
If you have default AWS, GCP, Azure, or OCI credentials on your machine, the `dstack` server will pick them up automatically.
Otherwise, you need to manually specify the cloud credentials in `~/.dstack/server/config.yml`.
See the [server/config.yml reference](https://dstack.ai/docs/reference/server/config.yml.md#examples)
for details on how to configure backends for all supported cloud providers.
### Start the server
To start the server, use the `dstack server` command:
<div class="termy">
```shell
$ dstack server
Applying ~/.dstack/server/config.yml...
The admin token is "bbae0f28-d3dd-4820-bf61-8f4bb40815da"
The server is running at http://127.0.0.1:3000/
```
</div>
> **Note**
> It's also possible to run the server via [Docker](https://hub.docker.com/r/dstackai/dstack).
### CLI & API
Once the server is up, you can use either `dstack`'s CLI or API to run workloads.
Below is a live demo of how it works with the CLI.
### Dev environments
You specify the required environment and resources, then run it. dstack provisions the dev
environment in the cloud and enables access via your desktop IDE.
<img src="https://raw.githubusercontent.com/dstackai/static-assets/main/static-assets/images/dstack-dev-environment.gif" width="650"/>
### Tasks
Tasks allow for convenient scheduling of any kind of batch jobs, such as training, fine-tuning,
or data processing, as well as running web applications.
Specify the environment and resources, then run it. dstack executes the task in the
cloud, enabling port forwarding to your local machine for convenient access.
<img src="https://raw.githubusercontent.com/dstackai/static-assets/main/static-assets/images/dstack-task.gif" width="650"/>
### Services
Services make it very easy to deploy any kind of model or web application as public endpoints.
Use any serving frameworks and specify required resources. dstack deploys it in the configured
backend, handles authorization, and provides an OpenAI-compatible interface if needed.
<img src="https://raw.githubusercontent.com/dstackai/static-assets/main/static-assets/images/dstack-service-openai.gif" width="650"/>
### Pools
Pools simplify managing the lifecycle of cloud instances and enable their efficient reuse across runs.
You can have instances provisioned in the cloud automatically, or add them manually, configuring the required resources,
idle duration, etc.
<img src="https://raw.githubusercontent.com/dstackai/static-assets/main/static-assets/images/dstack-pool.gif" width="650"/>
## Examples
Here are some featured examples:
- [Llama 3](examples/llms/llama3)
- [Alignment Handbook](examples/fine-tuning/alignment-handbook)
- [vLLM](examples/deployment/vllm)
- [Axolotl](examples/fine-tuning/axolotl)
- [TGI](examples/deployment/tgi)
- [Ollama](examples/deployment/ollama)
- [LoRaX](examples/deployment/lorax)
Browse [examples](examples) for more examples.
## More information
For additional information and examples, see the following links:
- [Docs](https://dstack.ai/docs)
- [Discord](https://discord.gg/u8SmfwPpMd)
## Licence
[Mozilla Public License 2.0](LICENSE.md)
| An open-source container orchestration engine for running AI workloads in any cloud or data center. https://discord.gg/u8SmfwPpMd | machine-learning,python,aws,azure,gcp,gpu,llms,cloud,orchestration,fine-tuning | 32 | 25 | 609 | 1,887 | 47 | 106 | 5 |
free18/v2ray | # [关注我,不迷路!](https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fw379740999)
欢迎加入我的节点电报群:https://t.me/vvkj11
(有任何问题在群里给我反馈,谢谢)
欢迎订阅我的YouTube频道(VV科技):[点击订阅](https://www.youtube.com/channel/UCqdGfxwYKrllrHv_Bc-9vAw?sub_confirmation=1)
(第一时间优先在youtube频道发布)
## 安卓应用—-破解频道(欢迎大家加入)
**频道:https://t.me/qwh01**
====================================================
## 便宜机场推荐(速度快价格便宜)
**【飞鸟云机场】优惠码:150m0Une** [点击注册](https://feiniaoyun.org/#/register?code=150m0Une)
**【各种帐号购买】** [点击注册](https://wandoukj.eu.org/)
====================================================
## 免费订阅
PS:如果不能正常更新,请在外网状态下更新-(安卓版Clash请使用Clash Meta)
🚀Clash Meta订阅:https://tt.vg/vPLkQ
🚀V2ray订阅1:https://tt.vg/UYBbb
🚀Sing-Box订阅:https://tt.vg/pqdoZ
====================================================
## 自建节点
失效的话,请进电报群获取:https://t.me/vvkj11
```
trojan://Puj01Rc8UcA9IzcFcYOs8KMOhCz6aX2Q@mfyousheng.nl.eu.org:443?security=tls&type=ws&path=%2FtjwsLhx0SFASG4l9FERJ1g#TG-%40vvkj11
trojan://Puj01Rc8UcA9IzcFcYOs8KMOhCz6aX2Q@mfyousheng.nl.eu.org:443?security=tls&type=ws&path=%2FtjwsLhx0SFASG4l9FERJ1g#TG-%40vvkj11
vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogIlRHLUB2dmtqMTEiLA0KICAiYWRkIjogIjIzLjIyNy4zOS4xMSIsDQogICJwb3J0IjogIjgwODAiLA0KICAiaWQiOiAiOTY5ZjE5MDktYzBkMy00YzMwLTgxM2QtM2FlYzVjODM4YjdkIiwNCiAgImFpZCI6ICIwIiwNCiAgInNjeSI6ICJhdXRvIiwNCiAgIm5ldCI6ICJ3cyIsDQogICJ0eXBlIjogIm5vbmUiLA0KICAiaG9zdCI6ICJkb25ndGFpd2FuZzE1LmR0a3U0Ny54eXoiLA0KICAicGF0aCI6ICIvMUlLWWpWMHIvIiwNCiAgInRscyI6ICIiLA0KICAic25pIjogIiIsDQogICJhbHBuIjogIiIsDQogICJmcCI6ICIiDQp9
trojan://Puj01Rc8UcA9IzcFcYOs8KMOhCz6aX2Q@mfyousheng.nl.eu.org:443?security=tls&type=ws&path=%2FtjwsLhx0SFASG4l9FERJ1g#TG-%40vvkj11
vmess://ew0KICAidiI6ICIyIiwNCiAgInBzIjogIlRHLUB2dmtqMTEiLA0KICAiYWRkIjogIjEwOS4xMDQuMTUyLjIyMCIsDQogICJwb3J0IjogIjIzMDk5IiwNCiAgImlkIjogIjVlM2NlNmE3LTE3MGUtNDkzOS05YWFlLWM4ZmVmYjM1YTdlYSIsDQogICJhaWQiOiAiMCIsDQogICJzY3kiOiAiYXV0byIsDQogICJuZXQiOiAid3MiLA0KICAidHlwZSI6ICJub25lIiwNCiAgImhvc3QiOiAiIiwNCiAgInBhdGgiOiAiL0h6dU9paEI2LyIsDQogICJ0bHMiOiAiIiwNCiAgInNuaSI6ICIiLA0KICAiYWxwbiI6ICIiLA0KICAiZnAiOiAiIg0KfQ==
trojan://Puj01Rc8UcA9IzcFcYOs8KMOhCz6aX2Q@mfyousheng.nl.eu.org:443?security=tls&type=ws&path=%2FtjwsLhx0SFASG4l9FERJ1g#TG-%40vvkj11
```
clash订阅(自建节点):https://suo.st/22Oq24b
====================================================
## 白嫖VPN
**【免费白嫖-安易VPN】白嫖365天** [官网地址](https://www.anyi555.com/?mid=1033)
**【免费安卓版快连VPN】三天白嫖码:244846304** [官网地址](https://pay.eradpd.xyz)
**【免费苹果版快连VPN】三天白嫖** [官网地址](https://promter-management.onelink.me/WxKq/fb306fec)
====================================================
## 小火箭帐号获取
1、https://free.iosapp.icu
2、https://idfree.top
3、https://apple.laogoubi.net/s/c7d1e73290a646f2513f6f0b75843b0b
4、https://idshare.me
5、https://idshare001.me
6、https://id.fcjs.xyz
====================================================
## TG代理分享(长期可用)
**失效请加频道:** https://t.me/v2ray3
使用方法:复制到电报收藏,点发送,再点开
+ https://t.me/proxy?server=47.237.3.58&port=1888&secret=ee3b222154b9d0cfa5e5cb432d01d4c08063662e71712e636f6d
+ https://t.me/proxy?server=192.74.232.202&port=8806&secret=ee9dea485711e242613affc5add56b6d666761736461736464613333793231732e6363
+ https://t.me/proxy?server=192.74.232.215&port=8806&secret=ee9dea485711e242613affc5add56b6d666761736461736464613333793231732e6363
+ https://t.me/proxy?server=192.74.232.214&port=8806&secret=ee9dea485711e242613affc5add56b6d666761736461736464613333793231732e6363
+ https://t.me/proxy?server=137.175.14.153&port=8806&secret=ee9dea485711e242613affc5add56b6d666761736461736464613333793231732e6363
====================================================
## 国外信用卡(最便宜,无需实名)
:red_circle: fomepay:[点击注册](https://gpt.fomepay.com/#/pages/login/index?d=918895)
:red_circle: 飞扬卡平台:[点击注册](https://vc.fyetd.com/vc_web/main.html#/login?inNo=vtghps)
====================================================
## 工具下载
V2RayN Windows 客户端:[点击下载](https://github.com/2dust/v2rayN/releases)
V2Ray 安卓客户端:[点击下载](https://github.com/2dust/v2rayNG/releases)
Clash Windows端:[点击下载](https://github.com/Fndroid/clash_for_windows_pkg/releases)
Clash Windows汉化地址:[点击下载](https://drive.google.com/file/d/1hLY1pedrIxA1u8sEkPWnMLEsQawD0nvf/view?usp=sharing)
Clash安卓客户端:[点击下载](https://github.com/naicfeng/ClashRForAndroid/releases)
Clash .NET电脑客户端:[点击下载](https://github.com/ClashDotNetFramework/experimental-clash/releases)
WinXray Windows 客户端:[点击下载](https://github.com/TheMRLL/WinXray/releases)
====================================================
## 工具使用教程
v2rayN使用教程:[点击查看](https://youtu.be/MvJwoEo6-JU)
Quantumult使用教程:[点击查看](https://youtu.be/qCkjLMPKygw)
Quantumult X使用教程:[点击查看](https://youtu.be/ghZLHPEGfVc)
shadowrocket使用教程:[点击查看](https://youtu.be/kGKKr6WTrJc)
====================================================
<a href="https://info.flagcounter.com/pIZl"><img src="https://s11.flagcounter.com/count2/pIZl/bg_FFFFFF/txt_000000/border_CCCCCC/columns_2/maxflags_10/viewers_0/labels_1/pageviews_1/flags_0/percent_0/" alt="Flag Counter" border="0"></a>
| 每日分享免费节点、免费机场、付费机场、电报代理、ssr节点、v2ray节点、v2ray订阅、clash节点、clash订阅、shadowrocket订阅、Quantumult X订阅、Clash .NET订阅、小火箭节点、小猫咪节点、免费翻墙、免费科学上网、免费梯子、免费trojan节点、蓝灯、谷歌商店、翻墙梯子、安卓VPN、iphone翻墙节点、iphone vpn、一键翻墙浏览器、节点分享、免费SSR、蓝灯、谷歌商店、V2ary免费节点、代理、proxy代理科学上网、TG代理、电报代理、Telegram代理、ip加速、翻墙软件、socks5、破解VPN、机场推荐、节点订阅、破解VPN | v2ray,ssr,clash,vmess,vless,trojan,vpn,shadowrocket,quantumult-x,iphone-vpn | 0 | 1 | 1 | 719 | 0 | 1 | 0 |
zerodytrash/TikTok-Live-Connector | # TikTok-Live-Connector
A Node.js library to receive live stream events such as comments and gifts in realtime from [TikTok LIVE](https://www.tiktok.com/live) by connecting to TikTok's internal WebCast push service. The package includes a wrapper that connects to the WebCast service using just the username (`uniqueId`). This allows you to connect to your own live chat as well as the live chat of other streamers. No credentials are required. Besides [Chat Comments](#chat), other events such as [Members Joining](#member), [Gifts](#gift), [Subscriptions](#subscribe), [Viewers](#roomuser), [Follows](#social), [Shares](#social), [Questions](#questionnew), [Likes](#like) and [Battles](#linkmicbattle) can be tracked. You can also send [automatic messages](#send-chat-messages) into the chat by providing your Session ID.
### Example Project: [https://tiktok-chat-reader.zerody.one/](https://tiktok-chat-reader.zerody.one/)
Do you prefer other programming languages?
- **Python** rewrite: [TikTokLive](https://github.com/isaackogan/TikTokLive) by [@isaackogan](https://github.com/isaackogan)
- **Java** rewrite: [TikTokLiveJava](https://github.com/jwdeveloper/TikTokLiveJava) by [@jwdeveloper](https://github.com/jwdeveloper)
- **C#** rewrite: [TikTokLiveSharp](https://github.com/frankvHoof93/TikTokLiveSharp) by [@frankvHoof93](https://github.com/frankvHoof93)
- **Go** rewrite: [GoTikTokLive](https://github.com/Davincible/gotiktoklive) by [@Davincible](https://github.com/Davincible)
**NOTE:** This is not an official API. It's a reverse engineering project.
**NOTE:** This JavaScript library is intended for use in [Node.js](https://nodejs.org/) environments. If you want to process or display the data in the browser (client-side), you need to transfer the data from the Node.js environment to the browser. A good approach for this is to use [Socket.IO](https://socket.io/) or a different low-latency communication framework. A complete example project can be found here: [TikTok-Chat-Reader](https://github.com/zerodytrash/TikTok-Chat-Reader)
> **UPDATE**:<br>Due to a change on the part of TikTok, versions prior **v1.1.7** are no longer functional. If you are using one of these versions, upgrade to the latest version using the `npm i tiktok-live-connector` command.
#### Overview
- [Getting started](#getting-started)
- [Params and options](#params-and-options)
- [Methods](#methods)
- [Events](#events)
- [Examples](#examples)
- [Contributing](#contributing)
## Getting started
1. Install the package via NPM
```
npm i tiktok-live-connector
```
2. Create your first chat connection
```javascript
const { WebcastPushConnection } = require('tiktok-live-connector');
// Username of someone who is currently live
let tiktokUsername = "officialgeilegisela";
// Create a new wrapper object and pass the username
let tiktokLiveConnection = new WebcastPushConnection(tiktokUsername);
// Connect to the chat (await can be used as well)
tiktokLiveConnection.connect().then(state => {
console.info(`Connected to roomId ${state.roomId}`);
}).catch(err => {
console.error('Failed to connect', err);
})
// Define the events that you want to handle
// In this case we listen to chat messages (comments)
tiktokLiveConnection.on('chat', data => {
console.log(`${data.uniqueId} (userId:${data.userId}) writes: ${data.comment}`);
})
// And here we receive gifts sent to the streamer
tiktokLiveConnection.on('gift', data => {
console.log(`${data.uniqueId} (userId:${data.userId}) sends ${data.giftId}`);
})
// ...and more events described in the documentation below
```
## Params and options
To create a new `WebcastPushConnection` object the following parameters are required.
`WebcastPushConnection(uniqueId, [options])`
| Param Name | Required | Description |
| ---------- | -------- | ----------- |
| uniqueId | Yes | The unique username of the broadcaster. You can find this name in the URL.<br>Example: `https://www.tiktok.com/@officialgeilegisela/live` => `officialgeilegisela` |
| options | No | Here you can set the following optional connection properties. If you do not specify a value, the default value will be used.<br><br>`processInitialData` (default: `true`) <br> Define if you want to process the initital data which includes old messages of the last seconds.<br><br>`fetchRoomInfoOnConnect` (default: `true`) <br> Define if you want to fetch all room information on [`connect()`](#methods). If this option is enabled, the connection to offline rooms will be prevented. If enabled, the connect result contains the room info via the `roomInfo` attribute. You can also manually retrieve the room info (even in an unconnected state) using the [`getRoomInfo()`](#methods) function.<br><br>`enableExtendedGiftInfo` (default: `false`) <br> Define if you want to receive extended information about gifts like gift name, cost and images. This information will be provided at the [gift event](#gift). <br><br>`enableWebsocketUpgrade` (default: `true`) <br> Define if you want to use a WebSocket connection instead of request polling if TikTok offers it. <br><br>`requestPollingIntervalMs` (default: `1000`) <br> Request polling interval if WebSocket is not used.<br><br>`sessionId` (default: `null`) <br> Here you can specify the current Session ID of your TikTok account (**sessionid** cookie value) if you want to send automated chat messages via the [`sendMessage()`](#methods) function. See [Example](#send-chat-messages)<br><br>`clientParams` (default: `{}`) <br> Custom client params for Webcast API.<br><br>`requestHeaders` (default: `{}`) <br> Custom request headers passed to [axios](https://github.com/axios/axios).<br><br>`websocketHeaders` (default: `{}`) <br> Custom websocket headers passed to [websocket.client](https://github.com/theturtle32/WebSocket-Node). <br><br>`requestOptions` (default: `{}`) <br> Custom request options passed to [axios](https://github.com/axios/axios). Here you can specify an `httpsAgent` to use a proxy and a `timeout` value. See [Example](#connect-via-proxy). <br><br>`websocketOptions` (default: `{}`) <br> Custom websocket options passed to [websocket.client](https://github.com/theturtle32/WebSocket-Node). Here you can specify an `agent` to use a proxy and a `timeout` value. See [Example](#connect-via-proxy). |
Example Options:
```javascript
let tiktokLiveConnection = new WebcastPushConnection(tiktokUsername, {
processInitialData: false,
enableExtendedGiftInfo: true,
enableWebsocketUpgrade: true,
requestPollingIntervalMs: 2000,
clientParams: {
"app_language": "en-US",
"device_platform": "web"
},
requestHeaders: {
"headerName": "headerValue"
},
websocketHeaders: {
"headerName": "headerValue"
},
requestOptions: {
timeout: 10000
},
websocketOptions: {
timeout: 10000
}
});
```
## Methods
A `WebcastPushConnection` object contains the following methods.
| Method Name | Description |
| ----------- | ----------- |
| connect | Connects to the live stream chat.<br>Returns a `Promise` which will be resolved when the connection is successfully established. |
| disconnect | Disconnects the connection. |
| getState | Gets the current connection state including the cached room info (see below). |
| getRoomInfo | Gets the current room info from TikTok API including streamer info, room status and statistics.<br>Returns a `Promise` which will be resolved when the API request is done.<br>*<b>Note: </b>You can call this function even if you're not connected.*<br>[Example](#retrieve-room-info) |
| getAvailableGifts | Gets a list of all available gifts including gift name, image url, diamont cost and a lot of other information.<br>Returns a `Promise` that will be resolved when all available gifts has been retrieved from the API.<br>*<b>Note: </b>You can call this function even if you're not connected.*<br>[Example](#retrieve-available-gifts) |
| sendMessage<br>`(text, [sessionId])` | Sends a chat message into the current live room using the provided session cookie (specified in the [constructor options](#params-and-options) or via the second function parameter).<br>Returns a `Promise` that will be resolved when the chat message has been submitted to the API.<br><br><b>WARNING: Use of this function is at your own risk. Spamming messages can lead to the suspension of your TikTok account. Be careful!</b><br>[Example](#send-chat-messages)|
## Events
A `WebcastPushConnection` object has the following events which can be handled via `.on(eventName, eventHandler)`
Control Events:
- [connected](#connected)
- [disconnected](#disconnected)
- [streamEnd](#streamend)
- [rawData](#rawdata)
- [websocketConnected](#websocketconnected)
- [error](#error)
Message Events:
- [member](#member)
- [chat](#chat)
- [gift](#gift)
- [roomUser](#roomuser)
- [like](#like)
- [social](#social)
- [emote](#emote)
- [envelope](#envelope)
- [questionNew](#questionnew)
- [linkMicBattle](#linkmicbattle)
- [linkMicArmies](#linkmicarmies)
- [liveIntro](#liveintro)
- [subscribe](#subscribe)
Custom Events:
- [follow](#follow)
- [share](#share)
<br><br>
### Control Events
### `connected`
Triggered when the connection is successfully established.
```javascript
tiktokLiveConnection.on('connected', state => {
console.log('Hurray! Connected!', state);
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
isConnected: true,
upgradedToWebsocket: true,
roomId: '7137682087200557829',
roomInfo: {
AnchorABMap: {},
admin_user_ids: [],
anchor_scheduled_time_text: '',
anchor_share_text: '',
anchor_tab_type: 7,
answering_question_content: '',
app_id: 1233,
audio_mute: 0,
auto_cover: 0,
book_end_time: 0,
book_time: 0,
business_live: 0,
challenge_info: '',
client_version: 250701,
comment_has_text_emoji_emote: 0,
comment_name_mode: 0,
commerce_info: {
commerce_permission: 0,
oec_live_enter_room_init_data: '',
use_async_load: false
},
common_label_list: '',
content_tag: '',
cover: {
avg_color: '',
height: 0,
image_type: 0,
is_animated: false,
open_web_url: '',
uri: '720x720/tos-maliva-avt-0068/4e64db7f7c37caf9b2df71df8580a9b0',
url_list: [Array],
width: 0
},
create_time: 1661871149,
deco_list: [],
deprecated10: '',
deprecated11: '',
deprecated12: '',
deprecated13: '',
deprecated14: 0,
deprecated15: 0,
deprecated16: 0,
deprecated17: [],
deprecated18: 0,
deprecated19: '',
deprecated195: false,
deprecated2: '',
deprecated20: 0,
deprecated21: false,
deprecated22: 0,
deprecated23: '',
deprecated24: 0,
deprecated26: '',
deprecated28: '',
deprecated3: {},
deprecated30: '',
deprecated31: false,
deprecated32: '',
deprecated35: 0,
deprecated36: 0,
deprecated39: '',
deprecated4: 0,
deprecated41: 0,
deprecated43: false,
deprecated44: 0,
deprecated5: false,
deprecated6: '',
deprecated7: 0,
deprecated8: '',
deprecated9: '',
disable_preload_stream: false,
drawer_tab_position: '',
effect_info: [],
existed_commerce_goods: false,
fansclub_msg_style: 2,
feed_room_label: {
avg_color: '#F1FFEB',
height: 0,
image_type: 0,
is_animated: false,
open_web_url: '',
uri: 'webcast-sg/2ea90002aca1159b5c67',
url_list: [Array],
width: 0
},
feed_room_labels: [],
filter_msg_rules: [],
finish_reason: 0,
finish_time: 1661878842,
finish_url: '',
finish_url_v2: '',
follow_msg_style: 2,
forum_extra_data: '',
game_tag: [],
gift_msg_style: 2,
gift_poll_vote_enabled: false,
group_source: 0,
has_commerce_goods: false,
have_wishlist: false,
hot_sentence_info: '',
id: 7137682087200558000,
id_str: '7137682087200557829',
indicators: [],
interaction_question_version: 0,
introduction: '',
is_gated_room: false,
is_replay: false,
is_show_user_card_switch: false,
last_ping_time: 1661878842,
layout: 0,
like_count: 0,
link_mic: {
audience_id_list: [],
battle_scores: [],
battle_settings: [Object],
channel_id: 0,
followed_count: 0,
linked_user_list: [],
multi_live_enum: 1,
rival_anchor_id: 0,
show_user_list: []
},
linker_map: {},
linkmic_layout: 0,
live_distribution: [],
live_id: 12,
live_reason: '',
live_room_mode: 0,
live_sub_only: 0,
live_type_audio: false,
live_type_linkmic: false,
live_type_normal: true,
live_type_sandbox: false,
live_type_screenshot: false,
live_type_social_live: false,
live_type_third_party: false,
living_room_attrs: {
admin_flag: 0,
rank: 0,
room_id: 7137682087200558000,
room_id_str: '7137682087200557829',
silence_flag: 0
},
lottery_finish_time: 0,
mosaic_status: 0,
os_type: 1,
owner: {
allow_find_by_contacts: false,
allow_others_download_video: false,
allow_others_download_when_sharing_video: false,
allow_share_show_profile: false,
allow_show_in_gossip: false,
allow_show_my_action: false,
allow_strange_comment: false,
allow_unfollower_comment: false,
allow_use_linkmic: false,
avatar_large: [Object],
avatar_medium: [Object],
avatar_thumb: [Object],
badge_image_list: [],
badge_list: [],
bg_img_url: '',
bio_description: 'HH📍🇩🇪تابعوني انستغرام\nاذا سقطت سأخذ الجميع معي\n👻Alin_issa22👻' ,
block_status: 0,
border_list: [],
comment_restrict: 0,
commerce_webcast_config_ids: [],
constellation: '',
create_time: 0,
deprecated1: 0,
deprecated12: 0,
deprecated13: 0,
deprecated15: 0,
deprecated16: false,
deprecated17: false,
deprecated18: '',
deprecated19: false,
deprecated2: 0,
deprecated21: 0,
deprecated28: false,
deprecated29: '',
deprecated3: 0,
deprecated4: 0,
deprecated5: '',
deprecated6: 0,
deprecated7: '',
deprecated8: 0,
disable_ichat: 0,
display_id: 'alin.i7',
enable_ichat_img: 0,
exp: 0,
fan_ticket_count: 0,
fold_stranger_chat: false,
follow_info: [Object],
follow_status: 0,
ichat_restrict_type: 0,
id: 6672446849804223000,
id_str: '6672446849804223493',
is_follower: false,
is_following: false,
link_mic_stats: 0,
media_badge_image_list: [],
modify_time: 1661427082,
need_profile_guide: false,
new_real_time_icons: [],
nickname: '🦋ALIN🦋',
own_room: [Object],
pay_grade: [Object],
pay_score: 0,
pay_scores: 0,
push_comment_status: false,
push_digg: false,
push_follow: false,
push_friend_action: false,
push_ichat: false,
push_status: false,
push_video_post: false,
push_video_recommend: false,
real_time_icons: [],
sec_uid: 'MS4wLjABAAAAuUKuWAiw0GQO2_zOeyns0YCBRK7ztdoDWAAQ6gPFLBNSdTs-g5BsgScwTD9jWeK_',
secret: 0,
share_qrcode_uri: '',
special_id: '',
status: 1,
ticket_count: 0,
top_fans: [],
top_vip_no: 0,
upcoming_event_list: [],
user_attr: [Object],
user_role: 0,
verified: false,
verified_content: '',
verified_reason: '',
with_car_management_permission: false,
with_commerce_permission: false,
with_fusion_shop_entry: false
},
owner_device_id: 0,
owner_device_id_str: '',
owner_user_id: 6672446849804223000,
owner_user_id_str: '',
pre_enter_time: 0,
preview_flow_tag: 0,
ranklist_audience_type: 0,
relation_tag: '',
replay: true,
room_audit_status: 0,
room_auth: {
Banner: 1,
BroadcastMessage: 0,
Chat: true,
ChatL2: false,
ChatSubOnly: false,
CommercePermission: 0,
CustomizablePoll: 0,
Danmaku: false,
Digg: true,
DonationSticker: 2,
EventPromotion: 0,
Gift: true,
GiftAnchorMt: 1,
GiftPoll: 0,
GoldenEnvelope: 0,
GoldenEnvelopeActivity: 0,
InteractionQuestion: true,
Landscape: 2,
LandscapeChat: 0,
LuckMoney: true,
Pictionary: 0,
Poll: 0,
Promote: false,
PromoteOther: 0,
Props: false,
PublicScreen: 1,
QuickChat: 0,
Rank: 0,
RoomContributor: false,
Share: true,
ShareEffect: 0,
ShoppingRanking: 0,
UserCard: true,
UserCount: 0,
Viewers: false,
deprecated1: false,
deprecated2: 0,
deprecated3: 0,
deprecated4: 0,
deprecated5: 0,
deprecated6: 0,
deprecated7: 0,
deprecated8: 0,
deprecated9: 0,
transaction_history: 1,
use_user_pv: false
},
room_create_ab_param: '',
room_layout: 0,
room_sticker_list: [],
room_tabs: [],
room_tag: 0,
scroll_config: '',
search_id: 0,
share_msg_style: 2,
share_url: 'https://m.tiktok.com/share/live/7137682087200557829/?language=en',
short_title: '',
short_touch_items: [],
social_interaction: { linkmic_scene_linker: {}, multi_live: [Object] },
start_time: 0,
stats: {
deprecated1: 0,
deprecated2: '',
digg_count: 0,
enter_count: 0,
fan_ticket: 0,
follow_count: 686,
gift_uv_count: 0,
id: 7137682087200558000,
id_str: '7137682087200557829',
like_count: 0,
replay_fan_ticket: 0,
replay_viewers: 64076,
share_count: 0,
total_user: 104582,
total_user_desp: '',
user_count_composition: [Object],
watermelon: 0
},
status: 2,
sticker_list: [],
stream_id: 2993830046178738000,
stream_id_str: '2993830046178738249',
stream_status: 0,
stream_url: {
candidate_resolution: [Array],
complete_push_urls: [],
default_resolution: 'ORIGION',
extra: [Object],
flv_pull_url: [Object],
flv_pull_url_params: [Object],
hls_pull_url: 'https://pull-hls-f16-va01.tiktokcdn.com/stage/stream-2993830046178738249_or4/index.m3u8',
hls_pull_url_map: {},
hls_pull_url_params: '{"VCodec":"h264"}',
id: 2993830046178738000,
id_str: '2993830046178738249',
live_core_sdk_data: [Object],
provider: 0,
push_urls: [],
resolution_name: [Object],
rtmp_pull_url: 'https://pull-f5-va01.tiktokcdn.com/stage/stream-2993830046178738249_or4.flv',
rtmp_pull_url_params: '{"VCodec":"h264"}',
rtmp_push_url: '',
rtmp_push_url_params: '',
stream_control_type: 0
},
stream_url_filtered_info: { is_gated_room: false, is_paid_event: false },
title: 'انا جيت😍 🥰' ,
top_fans: [ [Object], [Object], [Object] ],
use_filter: false,
user_count: 1136,
user_share_text: '',
video_feed_tag: '',
webcast_comment_tcs: 0,
webcast_sdk_version: 0,
with_draw_something: false,
with_ktv: false,
with_linkmic: true
},
availableGifts: [] // Filled if `enableExtendedGiftInfo` set
}
```
</p></details>
<br>
### `disconnected`
Triggered when the connection gets disconnected. In that case you can call `connect()` again to have a reconnect logic. Note that you should wait a little bit before attempting a reconnect to to avoid being rate-limited.
```javascript
tiktokLiveConnection.on('disconnected', () => {
console.log('Disconnected :(');
})
```
<br>
### `streamEnd`
Triggered when the live stream gets terminated by the host. Will also trigger the [`disconnected`](#disconnected) event.
```javascript
tiktokLiveConnection.on('streamEnd', (actionId) => {
if (actionId === 3) {
console.log('Stream ended by user');
}
if (actionId === 4) {
console.log('Stream ended by platform moderator (ban)');
}
})
```
<br>
### `rawData`
Triggered every time a protobuf encoded webcast message arrives. You can deserialize the binary object depending on the use case with <a href="https://www.npmjs.com/package/protobufjs">protobufjs</a>.
```javascript
tiktokLiveConnection.on('rawData', (messageTypeName, binary) => {
console.log(messageTypeName, binary);
})
```
<br>
### `websocketConnected`
Will be triggered as soon as a websocket connection is established. The websocket client object is passed.
```javascript
tiktokLiveConnection.on('websocketConnected', websocketClient => {
console.log("Websocket:", websocketClient.connection);
})
```
<br>
### `error`
General error event. You should handle this.
```javascript
tiktokLiveConnection.on('error', err => {
console.error('Error!', err);
})
```
<br>
### Message Events
### `member`
Triggered every time a new viewer joins the live stream.
```javascript
tiktokLiveConnection.on('member', data => {
console.log(`${data.uniqueId} joins the stream!`);
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
actionId: 1,
userId: "6813181309701719620",
secUid: "<redacted>",
uniqueId: "zerodytester",
nickname: "Zerody Tester",
profilePictureUrl: "https://p16-sign-va.tiktokcdn.com/tos-useast2a-avt...webp",
followRole: 0, // 0 = none; 1 = follower; 2 = friends
userBadges: [
{
type: "pm_mt_moderator_im",
name: "Moderator"
},
{
type: "image",
displayType: 1,
url: "https://p19-webcast.tiktokcdn.com/webcast-va/rankl...image"
},
{
type: "image",
displayType: 1,
url: "https://p19-webcast.tiktokcdn.com/webcast-va/....~...image"
}
],
userDetails: {
createTime: "0",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign-va.tiktokcdn.com/tos-useast2a-avt...webp",
"https://p16-sign-va.tiktokcdn.com/tos-useast2a-avt...webp",
"https://p16-sign-va.tiktokcdn.com/tos-useast2a-avt...jpeg"
]
},
followInfo: {
followingCount: 2139,
followerCount: 853,
followStatus: 0,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null,
msgId: "7137750885996120859",
createTime: "1661887134195",
displayType: "live_room_enter_toast",
label: "{0:user} joined"
}
```
</p></details>
<br>
### `chat`
Triggered every time a new chat comment arrives.
```javascript
tiktokLiveConnection.on('chat', data => {
console.log(`${data.uniqueId} writes: ${data.comment}`);
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
comment: "How are you?",
userId: "6813181309701719620",
secUid: "<redacted>",
uniqueId: "zerodytester",
nickname: "Zerody Tester",
profilePictureUrl: "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
followRole: 0, // 0 = none; 1 = follower; 2 = friends
userBadges: [
{
// Moderator badge
type: "pm_mt_moderator_im",
name: "Moderator"
},
{
// Top Gifter badge
type: "image",
displayType: 1,
url: "https://p19-webcast.tiktokcdn.com/webcast-va/rankl...image"
},
{
// Subscriber Badge
type: "image",
displayType: 1,
url: "https://p19-webcast.tiktokcdn.com/webcast-va/....~...image"
}
],
userDetails: {
createTime: "0",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...jpeg"
]
},
followInfo: {
followingCount: 10000,
followerCount: 606,
followStatus: 0,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null,
msgId: "7137750790064065286",
createTime: "1661887134718"
}
```
</p></details>
<br>
### `gift`
Triggered every time a gift arrives. You will receive additional information via the `extendedGiftInfo` attribute when you enable the [`enableExtendedGiftInfo`](#params-and-options) option.
> **NOTE:** Users have the capability to send gifts in a streak. This increases the `repeatCount` value until the user terminates the streak. During this time new gift events are triggered again and again with an increased `repeatCount` value. It should be noted that after the end of the streak, another gift event is triggered, which signals the end of the streak via `repeatEnd`:`true`. This applies only to gifts with `giftType`:`1`. This means that even if the user sends a `giftType`:`1` gift only once, you will receive the event twice. Once with `repeatEnd`:`false` and once with `repeatEnd`:`true`. Therefore, the event should be handled as follows:
```javascript
tiktokLiveConnection.on('gift', data => {
if (data.giftType === 1 && !data.repeatEnd) {
// Streak in progress => show only temporary
console.log(`${data.uniqueId} is sending gift ${data.giftName} x${data.repeatCount}`);
} else {
// Streak ended or non-streakable gift => process the gift with final repeat_count
console.log(`${data.uniqueId} has sent gift ${data.giftName} x${data.repeatCount}`);
}
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
// Gift Details
giftId: 5953,
repeatCount: 1,
repeatEnd: true,
groupId: "1661887131074",
monitorExtra: {
anchor_id: 7087613897129494000,
from_idc: "maliva",
from_user_id: 7044640112358049000,
gift_id: 5953,
gift_type: 1,
log_id: "20220830191849010192055159174B7670",
msg_id: 7137749190944230000,
repeat_count: 1,
repeat_end: 1,
room_id: 7137728632142843000,
send_gift_profit_core_start_ms: 0,
send_gift_send_message_success_ms: 1661887134397,
to_user_id: 7087613897129494000
},
// Sender Details
userId: "6813181309701719620",
secUid: "<redacted>",
uniqueId: "zerodytester",
nickname: "Zerody Tester",
profilePictureUrl: "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
followRole: 0, // 0 = none; 1 = follower; 2 = friends
userBadges: [],
userDetails: {
createTime: "0",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...jpeg"
]
},
followInfo: {
followingCount: 360,
followerCount: 740,
followStatus: 0,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null,
msgId: "7137749190944230150",
createTime: "1661887134397",
displayType: "webcast_aweme_gift_send_message",
label: "{0:user} sent {1:gift} {2:string}",
gift: {
gift_id: 5953,
repeat_count: 1,
repeat_end: 1,
gift_type: 1
},
describe: "Sent Nevalyashka doll",
giftType: 1,
diamondCount: 25,
giftName: "Nevalyashka doll",
giftPictureUrl: "https://p19-webcast.tiktokcdn.com/img/maliva/webca...png",
timestamp: 1661887134397,
extendedGiftInfo: {
// This will be filled when you enable the `enableExtendedGiftInfo` option
},
// Receiver Details (can also be a guest broadcaster)
receiverUserId: "7087613897129493510"
}
```
</p></details>
<br>
### `roomUser`
Triggered every time a statistic message arrives. This message currently contains the viewer count and a top gifter list.
```javascript
tiktokLiveConnection.on('roomUser', data => {
console.log(`Viewer Count: ${data.viewerCount}`);
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
topViewers: [
{
user: {
userId: "6822565897317303297",
secUid: "MS4wLjABAAAALIKFhzvmiCws6B6KWfRgWr5MbyGVPXevakvnP8xc7VLkWtcqNeEe9coyRA74KNxm",
uniqueId: "linmjh",
nickname: "gì z má ( ^ㆍㅅㆍ^)",
profilePictureUrl: "https://p16-sign-sg.tiktokcdn.com/aweme/100x100/to...webp",
followRole: 0,
userBadges: [],
userDetails: {
createTime: "1588502711",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign-sg.tiktokcdn.com/aweme/100x100/to...webp",
"https://p9-sign-sg.tiktokcdn.com/aweme/100x100/tos...webp",
"https://p16-sign-sg.tiktokcdn.com/aweme/100x100/to...jpeg"
]
},
followInfo: {
followingCount: 781,
followerCount: 51,
followStatus: 0,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null
},
coinCount: 0
},
{
user: {
userId: "6828542044454863874",
secUid: "MS4wLjABAAAAxP4NgzG7uJz1tcB8o3JN8PxHWej20NJWCHP1IG1PZ0OmQLB6SVORRSoX0Ool4dwj",
uniqueId: "xuanthainguyen0",
nickname: "Xuan Thai Nguyen",
profilePictureUrl: "https://p16-sign-sg.tiktokcdn.com/aweme/100x100/ti...webp",
followRole: 0,
userBadges: [],
userDetails: {
createTime: "1593865836",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign-sg.tiktokcdn.com/aweme/100x100/ti...webp",
"https://p9-sign-sg.tiktokcdn.com/aweme/100x100/tik...webp",
"https://p16-sign-sg.tiktokcdn.com/aweme/100x100/ti...jpeg"
]
},
followInfo: {
followingCount: 6,
followerCount: 6,
followStatus: 0,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null
},
coinCount: 0
},
{
user: {
userId: "7014684709204624385",
secUid: "MS4wLjABAAAAnVMJ9MXN5HqjnpyEwgEhjv97Pc_ixtG4Iwnnagbrd99WhEATfhZLW6McX-uErTp9",
uniqueId: "dyip0c3sbo2t",
nickname: "Huu Trân572",
profilePictureUrl: "https://p16-sign-sg.tiktokcdn.com/aweme/100x100/ti...webp",
followRole: 0,
userBadges: [],
userDetails: {
createTime: "1640318249",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign-sg.tiktokcdn.com/aweme/100x100/ti...webp",
"https://p9-sign-sg.tiktokcdn.com/aweme/100x100/tik...webp",
"https://p16-sign-sg.tiktokcdn.com/aweme/100x100/ti...jpeg"
]
},
followInfo: {
followingCount: 35,
followerCount: 21,
followStatus: 0,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null
},
coinCount: 0
},
{
user: {
userId: "7133413217468187675",
secUid: "MS4wLjABAAAA2u64n6KnroBOMQo4pR9bLv0twyCIy0X-wd7S__WR4d2VObktWAfs_ck08pjD4hIV",
uniqueId: "uservay64gw9d5",
nickname: "uservay64gw9d5",
profilePictureUrl: "https://p16-sign-va.tiktokcdn.com/tos-useast2a-avt...webp",
followRole: 0,
userBadges: [],
userDetails: {
createTime: "1660877330",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign-va.tiktokcdn.com/tos-useast2a-avt...webp",
"https://p16-sign-va.tiktokcdn.com/tos-useast2a-avt...jpeg"
]
},
followInfo: {
followingCount: 2,
followerCount: 0,
followStatus: 0,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null
},
coinCount: 0
},
{
user: {
userId: "6800374961430791170",
secUid: "MS4wLjABAAAAF3tD_kSi9qas_10I5I5YUIBfXKd0KlKvKTKACzfXS1Wwp04e03xJCTswwzCMRgEu",
uniqueId: "hungtran0293",
nickname: "Trần Hùng",
profilePictureUrl: "https://p16-sign-va.tiktokcdn.com/tos-useast2a-avt...webp",
followRole: 0,
userBadges: [],
userDetails: {
createTime: "1585370455",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign-va.tiktokcdn.com/tos-useast2a-avt...webp",
"https://p16-sign-va.tiktokcdn.com/tos-useast2a-avt...jpeg"
]
},
followInfo: {
followingCount: 1735,
followerCount: 313,
followStatus: 0,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null
},
coinCount: 0
}
],
viewerCount: 630
}
```
</p></details>
<br>
### `like`
Triggered when a viewer sends likes to the streamer. For streams with many viewers, this event is not always triggered by TikTok.
```javascript
tiktokLiveConnection.on('like', data => {
console.log(`${data.uniqueId} sent ${data.likeCount} likes, total likes: ${data.totalLikeCount}`);
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
likeCount: 6, // likes given by the user (taps on screen)
totalLikeCount: 21349, // likes that this stream has received in total (from all users)
userId: "6813181309701719620",
secUid: "<redacted>",
uniqueId: "zerodytester",
nickname: "Zerody Tester",
profilePictureUrl: "https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
followRole: 0, // 0 = none; 1 = follower; 2 = friends,
userBadges: [
{
type: "pm_mt_moderator_im",
name: "Moderator"
},
{
type: "image",
displayType: 1,
url: "https://p19-webcast.tiktokcdn.com/webcast-va/rankl...image"
},
{
type: "image",
displayType: 1,
url: "https://p19-webcast.tiktokcdn.com/webcast-va/....~...image"
}
],
userDetails: {
createTime: "0",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
"https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
"https://p19-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
"https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...jpeg"
]
},
followInfo: {
followingCount: 617,
followerCount: 112,
followStatus: 1,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null,
msgId: "7137750883651619630",
createTime: "1661887134554",
displayType: "pm_mt_msg_viewer",
label: "{0:user} liked the LIVE"
}
```
</p></details>
<br>
### `social`
Triggered every time someone shares the stream or follows the host.
```javascript
tiktokLiveConnection.on('social', data => {
console.log('social event data:', data);
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
userId: "6813181309701719620",
secUid: "<redacted>",
uniqueId: "zerodytester",
nickname: "Zerody Tester",
profilePictureUrl: "https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
followRole: 1,
userBadges: [],
userDetails: {
createTime: "0",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
"https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
"https://p19-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
"https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...jpeg"
]
},
followInfo: {
followingCount: 277,
followerCount: 96,
followStatus: 1,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null,
msgId: "7137750889884076842",
createTime: "1661887134629",
displayType: "pm_main_follow_message_viewer_2", // or pm_mt_guidance_share
label: "{0:user} followed the host"
}
```
</p></details>
<br>
### `emote`
Triggered every time a subscriber sends an emote (sticker).
```javascript
tiktokLiveConnection.on('emote', data => {
console.log('emote received', data);
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
userId: "6813181309701719620",
secUid: "<redacted>",
uniqueId: "zerodytester",
nickname: "Zerody Tester",
profilePictureUrl: "https://p16-sign-sg.tiktokcdn.com/aweme/100x100/to...webp",
followRole: 0, // 0 = none; 1 = follower; 2 = friends,
userBadges: [],
userDetails: {
createTime: "0",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign-sg.tiktokcdn.com/tos-alisg-avt-00...webp",
"https://p16-sign-sg.tiktokcdn.com/aweme/100x100/to...webp",
"https://p16-sign-sg.tiktokcdn.com/aweme/100x100/to...jpeg"
]
},
followInfo: {
followingCount: 14,
followerCount: 6,
followStatus: 1,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: true,
topGifterRank: null,
emoteId: "7121025198379731714",
emoteImageUrl: "https://p19-webcast.tiktokcdn.com/webcast-sg/61964...image"
}
```
</p></details>
<br>
### `envelope`
Triggered every time someone sends a treasure chest.
```javascript
tiktokLiveConnection.on('envelope', data => {
console.log('envelope received', data);
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
userId: "6813181309701719620",
secUid: "<redacted>",
uniqueId: "zerodytester",
nickname: "Zerody Tester",
profilePictureUrl: "https://p16-webcast.tiktokcdn.com/img/alisg/webcas...png",
followRole: 0, // 0 = none; 1 = follower; 2 = friends
userBadges: [],
userDetails: {
createTime: "0",
bioDescription: "",
profilePictureUrls: [
"https://p16-webcast.tiktokcdn.com/img/alisg/webcas...png",
"https://p19-webcast.tiktokcdn.com/img/alisg/webcas...png"
]
},
followInfo: {
followingCount: 828,
followerCount: 1353,
followStatus: 0,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null,
coins: 20,
canOpen: 20,
timestamp: 1661887422
}
```
</p></details>
<br>
### `questionNew`
Triggered every time someone asks a new question via the question feature.
```javascript
tiktokLiveConnection.on('questionNew', data => {
console.log(`${data.uniqueId} asks ${data.questionText}`);
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
questionText: "Do you know why TikTok has such a complicated API?",
userId: "6813181309701719620",
secUid: "<redacted>",
uniqueId: "zerodytester",
nickname: "Zerody Tester",
profilePictureUrl: "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
followRole: 0, // 0 = none; 1 = follower; 2 = friends
userBadges: [],
userDetails: {
createTime: "0",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...jpeg"
]
},
followInfo: {
followingCount: 982,
followerCount: 175,
followStatus: 0,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null
}
```
</p></details>
<br>
### `linkMicBattle`
Triggered every time a battle starts.
```javascript
tiktokLiveConnection.on('linkMicBattle', (data) => {
console.log(`New Battle: ${data.battleUsers[0].uniqueId} VS ${data.battleUsers[1].uniqueId}`);
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
battleUsers: [
{
userId: "6901252963970515973", // Host
uniqueId: "growsa_fluffynation",
nickname: "GrowSA_FluffyNation",
profilePictureUrl: "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
userBadges: [],
userDetails: {
profilePictureUrls: [
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...jpeg"
]
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null
},
{
userId: "262781145296064512", // Guest
uniqueId: "real_martinpinkysmith",
nickname: "Martin Pinky Smith",
profilePictureUrl: "https://p16-sign-sg.tiktokcdn.com/aweme/100x100/to...webp",
userBadges: [],
userDetails: {
profilePictureUrls: [
"https://p16-sign-sg.tiktokcdn.com/aweme/100x100/to...webp",
"https://p16-sign-sg.tiktokcdn.com/aweme/100x100/to...jpeg"
]
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null
}
]
}
```
</p></details>
<br>
### `linkMicArmies`
Triggered every time a battle participant receives points. Contains the current status of the battle and the army that suported the group.
```javascript
tiktokLiveConnection.on('linkMicArmies', (data) => {
console.log('linkMicArmies', data);
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
battleStatus: 1,
battleArmies: [
{
hostUserId: "6842213780475085829",
points: 0,
participants: []
},
{
hostUserId: "6722878711857579013",
points: 33,
participants: [
{
userId: "7122168301669204994",
secUid: "",
nickname: "🦋",
profilePictureUrl: null,
userBadges: [],
userDetails: {
createTime: "0",
bioDescription: ""
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null
},
{
userId: "7112729060212966406",
secUid: "",
nickname: "ealkaabi44",
profilePictureUrl: null,
userBadges: [],
userDetails: {
createTime: "0",
bioDescription: ""
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null
},
{
userId: "7006435669158708229",
secUid: "",
nickname: "worood🦁 🌹🌹🌹🌹",
profilePictureUrl: null,
userBadges: [],
userDetails: {
createTime: "0",
bioDescription: ""
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null
}
]
}
]
}
```
</p></details>
<br>
### `liveIntro`
Triggered when a live intro message appears.
```javascript
tiktokLiveConnection.on('liveIntro', (msg) => {
console.log(msg);
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
id: "1658723381",
description: "welcome to my broadcast!",
userId: "6813181309701719620",
secUid: "<redacted>",
uniqueId: "zerodytester",
nickname: "Zerody Tester",
profilePictureUrl: "https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
followRole: 0,
userBadges: [
{
type: "pm_mt_moderator_im",
name: "Moderator"
},
{
type: "image",
displayType: 1,
url: "https://p19-webcast.tiktokcdn.com/webcast-va/rankl...image"
},
{
type: "image",
displayType: 1,
url: "https://p19-webcast.tiktokcdn.com/webcast-va/....~...image"
}
],
userDetails: {
createTime: "0",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
"https://p77-sign-va.tiktokcdn.com/tos-maliva-avt-0...webp",
"https://p16-sign-va.tiktokcdn.com/tos-maliva-avt-0...jpeg"
]
},
followInfo: {
followingCount: 886,
followerCount: 57141,
followStatus: 0,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null
}
```
</p></details>
<br>
### `subscribe`
Triggers when a user creates a subscription.
```javascript
tiktokLiveConnection.on('subscribe', (data) => {
console.log(data.uniqueId, "subscribed!");
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
subMonth: 1,
oldSubscribeStatus: 2,
subscribingStatus: 1,
userId: "6813181309701719620",
secUid: "<redacted>",
uniqueId: "zerodytester",
nickname: "Zerody Tester",
profilePictureUrl: "https://p16-sign-sg.tiktokcdn.com/aweme/100x100/to...webp",
followRole: 0,
userBadges: [],
userDetails: {
createTime: "0",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign-sg.tiktokcdn.com/aweme/100x100/to...webp",
"https://p16-sign-sg.tiktokcdn.com/aweme/100x100/to...jpeg"
]
},
followInfo: {
followingCount: 23,
followerCount: 43,
followStatus: 0,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null,
msgId: "7137745705032043266",
createTime: "1661885986187",
displayType: "pm_mt_subinfo_user",
label: "{0:user} just subscribed to the host"
}
```
</p></details>
<br>
### Custom Events
These events are based on message events.
<br>
### `follow`
Triggers when a user follows the streamer. Based on `social` event.
```javascript
tiktokLiveConnection.on('follow', (data) => {
console.log(data.uniqueId, "followed!");
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
userId: "6813181309701719620",
secUid: "<redacted>",
uniqueId: "zerodytester",
nickname: "Zerody Tester",
profilePictureUrl: "https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
followRole: 1,
userBadges: [
{
type: "pm_mt_moderator_im",
name: "Moderator"
},
{
type: "image",
displayType: 1,
url: "https://p19-webcast.tiktokcdn.com/webcast-va/rankl...image"
},
{
type: "image",
displayType: 1,
url: "https://p19-webcast.tiktokcdn.com/webcast-va/....~...image"
}
],
userDetails: {
createTime: "0",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
"https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
"https://p19-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
"https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...jpeg"
]
},
followInfo: {
followingCount: 277,
followerCount: 96,
followStatus: 1,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null,
msgId: "7137750889884076842",
createTime: "1661887134629",
displayType: "pm_main_follow_message_viewer_2",
label: "{0:user} followed the host"
}
```
</p></details>
<br>
### `share`
Triggers when a user shares the stream. Based on `social` event.
```javascript
tiktokLiveConnection.on('share', (data) => {
console.log(data.uniqueId, "shared the stream!");
})
```
<details><summary>⚡ Show Data Structure</summary><p>
```javascript
{
userId: "6813181309701719620",
secUid: "<redacted>",
uniqueId: "zerodytester",
nickname: "Zerody Tester",
profilePictureUrl: "https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
followRole: 1,
userBadges: [
{
type: "pm_mt_moderator_im",
name: "Moderator"
},
{
type: "image",
displayType: 1,
url: "https://p19-webcast.tiktokcdn.com/webcast-va/rankl...image"
},
{
type: "image",
displayType: 1,
url: "https://p19-webcast.tiktokcdn.com/webcast-va/....~...image"
}
],
userDetails: {
createTime: "0",
bioDescription: "",
profilePictureUrls: [
"https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
"https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
"https://p19-sign.tiktokcdn-us.com/tos-useast5-avt-...webp",
"https://p16-sign.tiktokcdn-us.com/tos-useast5-avt-...jpeg"
]
},
followInfo: {
followingCount: 277,
followerCount: 96,
followStatus: 1,
pushStatus: 0
},
isModerator: false,
isNewGifter: false,
isSubscriber: false,
topGifterRank: null,
msgId: "7137750889884076842",
createTime: "1661887134629",
displayType: "pm_mt_guidance_share",
label: "{0:user} shared the live"
}
```
</p></details>
<br>
## Examples
### Retrieve Room Info
````javascript
let tiktokLiveConnection = new WebcastPushConnection('@username');
tiktokLiveConnection.getRoomInfo().then(roomInfo => {
console.log(roomInfo);
console.log(`Stream started timestamp: ${roomInfo.create_time}, Streamer bio: ${roomInfo.owner.bio_description}`);
console.log(`HLS URL: ${roomInfo.stream_url.hls_pull_url}`); // Can be played or recorded with e.g. VLC
}).catch(err => {
console.error(err);
})
````
### Retrieve Available Gifts
````javascript
let tiktokLiveConnection = new WebcastPushConnection('@username');
tiktokLiveConnection.getAvailableGifts().then(giftList => {
console.log(giftList);
giftList.forEach(gift => {
console.log(`id: ${gift.id}, name: ${gift.name}, cost: ${gift.diamond_count}`)
});
}).catch(err => {
console.error(err);
})
````
### Send Chat Messages
> Due to the increased signature requirements by TikTok, sending chat messages is currently not possible.
You can send chat messages via the [`sendMessage()`](#methods) function to automatically respond to chat commands for example. For this you need to provide your Session ID.
To get the Session ID from your account, open TikTok in your web browser and make sure you are logged in, then press F12 to open the developer tools. Switch to the **Application** tab and select **Cookies** on the left side. Then take the value of the cookie with the name **`sessionid`**.
<b>WARNING: Use of this function is at your own risk. Spamming messages can lead to the suspension of your TikTok account. Be careful!</b>
````javascript
let tiktokLiveConnection = new WebcastPushConnection('@username', {
sessionId: 'f7fbba3a57e48dd1ecd0b7b72cb27e6f' // Replace this with the Session ID of your TikTok account
});
tiktokLiveConnection.connect().catch(err => console.log(err));
tiktokLiveConnection.on('chat', data => {
if (data.comment.toLowerCase() === '!dice') {
let diceResult = Math.ceil(Math.random() * 6);
tiktokLiveConnection.sendMessage(`@${data.uniqueId} you rolled a ${diceResult}`).catch(err => console.error(err));
}
})
````
### Connect via Proxy
[proxy-agent](https://www.npmjs.com/package/proxy-agent) supports `http`, `https`, `socks4` and `socks5` proxies:
````
npm i proxy-agent
````
You can specify if you want to use a proxy for https requests, websockets or both:
````javascript
const { WebcastPushConnection } = require('tiktok-live-connector');
const ProxyAgent = require('proxy-agent');
let tiktokLiveConnection = new WebcastPushConnection('@username', {
requestOptions: {
httpsAgent: new ProxyAgent('https://username:password@host:port'),
timeout: 10000 // 10 seconds
},
websocketOptions: {
agent: new ProxyAgent('https://username:password@host:port'),
timeout: 10000 // 10 seconds
}
});
// Connect as usual
````
## Contributing
Your improvements are welcome! Feel free to open an <a href="https://github.com/zerodytrash/TikTok-Live-Connector/issues">issue</a> or <a href="https://github.com/zerodytrash/TikTok-Live-Connector/pulls">pull request</a>.
| Node.js library to receive live stream events (comments, gifts, etc.) in realtime from TikTok LIVE. | tiktok,tiktok-api,tiktok-live,chat,chat-reader,connector,stream,scraper,webcast,javascript | 12 | 8 | 13 | 151 | 89 | 1 | 0 |
Tongjilibo/bert4torch | ![bert4torch](./docs/pics/bert4torch.png)
[![licence](https://img.shields.io/github/license/Tongjilibo/bert4torch.svg?maxAge=3600)](https://github.com/Tongjilibo/bert4torch/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/Tongjilibo/bert4torch.svg?maxAge=3600)](https://github.com/Tongjilibo/bert4torch/releases)
[![PyPI](https://img.shields.io/pypi/v/bert4torch?label=pypi%20package)](https://pypi.org/project/bert4torch/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/bert4torch)](https://pypistats.org/packages/bert4torch)
[![GitHub stars](https://img.shields.io/github/stars/Tongjilibo/bert4torch?style=social)](https://github.com/Tongjilibo/bert4torch)
[![GitHub Issues](https://img.shields.io/github/issues/Tongjilibo/bert4torch.svg)](https://github.com/Tongjilibo/bert4torch/issues)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/Tongjilibo/bert4torch/issues)
[![Generic badge](https://img.shields.io/badge/wechat-join-green.svg?logo=wechat)](https://github.com/Tongjilibo/bert4torch/blob/master/docs/pics/wechat_group.jpg)
[Documentation](https://bert4torch.readthedocs.io) |
[Torch4keras](https://github.com/Tongjilibo/torch4keras) |
[Examples](https://github.com/Tongjilibo/bert4torch/blob/master/examples) |
[build_MiniLLM_from_scratch](https://github.com/Tongjilibo/build_MiniLLM_from_scratch)
## 目录
- [目录](#目录)
- [1. 下载安装](#1-下载安装)
- [2. 功能](#2-功能)
- [3. 快速上手](#3-快速上手)
- [4. 版本和更新历史](#4-版本和更新历史)
- [4.1 版本历史](#41-版本历史)
- [4.2 更新历史](#42-更新历史)
- [5. 预训练权重](#5-预训练权重)
- [6. 鸣谢](#6-鸣谢)
- [7. 引用](#7-引用)
- [8. 其他](#8-其他)
## 1. 下载安装
安装稳定版
```shell
pip install bert4torch
```
安装最新版
```shell
pip install git+https://github.com/Tongjilibo/bert4torch
```
- **注意事项**:pip包的发布慢于git上的开发版本,git clone**注意引用路径**,注意权重是否需要转换
- **测试用例**:`git clone https://github.com/Tongjilibo/bert4torch`,修改example中的预训练模型文件路径和数据路径即可启动脚本
- **自行训练**:针对自己的数据,修改相应的数据处理代码块
- **开发环境**:原使用`torch==1.10`版本进行开发,现已切换到`torch2.0`开发,如其他版本遇到不适配,欢迎反馈
## 2. 功能
- **LLM模型**: 加载chatglm、llama、 baichuan、ziya、bloom等开源大模型权重进行推理和微调
- **核心功能**:加载bert、roberta、albert、xlnet、nezha、bart、RoFormer、RoFormer_V2、ELECTRA、GPT、GPT2、T5、GAU-alpha、ERNIE等预训练权重继续进行finetune、并支持在bert基础上灵活定义自己模型
- [**丰富示例**](https://github.com/Tongjilibo/bert4torch/blob/master/examples/):包含[llm](https://github.com/Tongjilibo/bert4torch/blob/master/examples/llm)、[pretrain](https://github.com/Tongjilibo/bert4torch/blob/master/examples/pretrain)、[sentence_classfication](https://github.com/Tongjilibo/bert4torch/blob/master/examples/sentence_classfication)、[sentence_embedding](https://github.com/Tongjilibo/bert4torch/tree/master/examples/sentence_embedding)、[sequence_labeling](https://github.com/Tongjilibo/bert4torch/blob/master/examples/sequence_labeling)、[relation_extraction](https://github.com/Tongjilibo/bert4torch/blob/master/examples/relation_extraction)、[seq2seq](https://github.com/Tongjilibo/bert4torch/blob/master/examples/seq2seq)、[serving](https://github.com/Tongjilibo/bert4torch/blob/master/examples/serving/)等多种解决方案
- **实验验证**:已在公开数据集实验验证,使用如下[examples数据集](https://github.com/Tongjilibo/bert4torch/blob/master/examples/DATA.md)
- **易用trick**:集成了常见的[trick](https://github.com/Tongjilibo/bert4torch/blob/master/examples/training_trick),即插即用
- **其他特性**:[加载transformers库模型](https://github.com/Tongjilibo/bert4torch/blob/master//tutorials/tutorials_load_transformers_model.py)一起使用;调用方式简洁高效;有训练进度条动态展示;配合torchinfo打印参数量;默认Logger和Tensorboard简便记录训练过程;自定义fit过程,满足高阶需求
- **训练过程**:
```text
2022-10-28 23:16:10 - Start Training
2022-10-28 23:16:10 - Epoch: 1/2
5000/5000 [==============================] - 13s 3ms/step - loss: 0.1351 - acc: 0.9601
Evaluate: 100%|██████████████████████████████████████████████████| 2500/2500 [00:03<00:00, 798.09it/s]
test_acc: 0.98045. best_test_acc: 0.98045
2022-10-28 23:16:27 - Epoch: 2/2
5000/5000 [==============================] - 13s 3ms/step - loss: 0.0465 - acc: 0.9862
Evaluate: 100%|██████████████████████████████████████████████████| 2500/2500 [00:03<00:00, 635.78it/s]
test_acc: 0.98280. best_test_acc: 0.98280
2022-10-28 23:16:44 - Finish Training
```
| 功能 | bert4torch | transformers | 备注 |
|-----------------------------|------------|----------------|--------|
|训练进度条 | ✅ | ✅ |进度条打印loss和定义的metrics|
|分布式训练dp/ddp | ✅ | ✅ |torch自带dp/ddp|
|各类callbacks | ✅ | ✅ |日志/tensorboard/earlystop/wandb等|
|大模型推理,stream/batch输出 | ✅ | ✅ |各个模型是通用的,无需单独维护脚本|
|大模型微调 | ✅ | ✅ |lora依赖peft库,pv2自带|
|丰富tricks | ✅ | ❌ |对抗训练等tricks即插即用|
|代码简洁易懂,自定义空间大 | ✅ | ❌ |代码复用度高, keras代码训练风格|
|仓库的维护能力/影响力/使用量/兼容性| ❌ | ✅ |目前仓库个人维护|
## 3. 快速上手
- [Quick-Start](https://bert4torch.readthedocs.io/en/latest//Quick-Start.html)
- [快速上手教程](https://github.com/Tongjilibo/bert4torch/blob/master//tutorials/README.md),[教程示例](https://github.com/Tongjilibo/bert4torch/blob/master//tutorials),[实战示例](https://github.com/Tongjilibo/bert4torch/blob/master/examples)
- [bert4torch介绍(知乎)](https://zhuanlan.zhihu.com/p/486329434),[bert4torch快速上手(知乎)](https://zhuanlan.zhihu.com/p/508890807),[bert4torch又双叒叕更新啦(知乎)](https://zhuanlan.zhihu.com/p/560885427?)
## 4. 版本和更新历史
### 4.1 版本历史
|更新日期| bert4torch | torch4keras | 版本说明 |
|------| ---------------- | ----------------- |----------- |
|20240619| 0.5.1 | 0.2.4 | 增加Qwen1.5, Qwen2, glm4; 增加SWA/convert_lm_logits_dtype;调整各个trainer(重点DPOTrainer), generation中segment_ids, repetition_penalty需带query, RMSNorm中转类型bug|
|20240418| 0.5.0 | 0.2.2 | 修复chatglm3的bug, 修复save_pretrained时多文件的bug,增加CausalLMLoss, 修改deepspeed的传参逻辑,修改Text2Vec的bug, 完善openai client, 增加get_weight_decay_optim_groups|
|20240317| 0.4.9.post2 | 0.2.1.post2 |增加get_weight_decay_optim_groups函数, attention中允许is_causal,修改repetition_penalty的bug,把baichuan从llama中剥离,修复config_path的bug,允许num_key_value_heads参数,[torch4keras-v0.2.1.post2](https://github.com/Tongjilibo/torch4keras/releases/tag/v0.2.1.post2)更新特性|
|20240221| 0.4.8 | 0.2.0|fastapi发布服务允许闲时offload到cpu, `build_transformer_model`允许从hf下载, 添加`FillMask`的pipeline, 添加`SequenceClassificationTrainer`|
[更多版本](https://github.com/Tongjilibo/bert4torch/blob/master/docs/Update.md)
### 4.2 更新历史
[更多历史](https://github.com/Tongjilibo/bert4torch/blob/master/docs/History.md)
## 5. 预训练权重
- 预训练模型支持多种代码加载方式
```python
from bert4torch.models import build_transformer_model
# 1. 仅指定config_path: 从头初始化模型结构, 不加载预训练模型
model = build_transformer_model('./model/bert4torch_config.json')
# 2. 仅指定checkpoint_path:
## 2.1 文件夹路径: 自动寻找路径下的*.bin/*.safetensors权重文件 + bert4torch_config.json/config.json文件
model = build_transformer_model(checkpoint_path='./model')
## 2.2 文件路径/列表: 文件路径即权重路径/列表, config会从同级目录下寻找
model = build_transformer_model(checkpoint_path='./pytorch_model.bin')
## 2.3 model_name: hf上预训练权重名称, 会自动下载hf权重以及bert4torch_config.json文件
model = build_transformer_model(checkpoint_path='bert-base-chinese')
# 3. 同时指定config_path和checkpoint_path(本地路径名或model_name排列组合):
config_path = './model/bert4torch_config.json' # 或'bert-base-chinese'
checkpoint_path = './model/pytorch_model.bin' # 或'bert-base-chinese'
model = build_transformer_model(config_path, checkpoint_path)
```
| 模型分类| 模型名称 | 权重来源| 权重链接/checkpoint_path | config_path|
| ----- | ----- | ----- | ----- | ----- |
| bert| bert-base-chinese| google-bert | [`bert-base-chinese`](https://huggingface.co/bert-base-chinese) | [`bert-base-chinese`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/bert-base-chinese)|
| | [chinese_L-12_H-768_A-12](https://github.com/google-research/bert) | 谷歌 | [tf](https://storage.googleapis.com/bert_models/2018_11_03/chinese_L-12_H-768_A-12.zip), [`Tongjilibo/bert-chinese_L-12_H-768_A-12`](https://huggingface.co/Tongjilibo/bert-chinese_L-12_H-768_A-12) | |
| | [chinese-bert-wwm-ext](https://github.com/ymcui/Chinese-BERT-wwm) | HFL | [`hfl/chinese-bert-wwm-ext`](https://huggingface.co/hfl/chinese-bert-wwm-ext)| [`chinese-bert-wwm-ext`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chinese-bert-wwm-ext) |
| | bert-base-multilingual-cased| google-bert | [`bert-base-multilingual-cased`](https://huggingface.co/bert-base-multilingual-cased) | [`bert-base-multilingual-cased`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/bert-base-multilingual-cased) |
| | [MacBERT](https://github.com/ymcui/MacBERT) | HFL| [`hfl/chinese-macbert-base`](https://huggingface.co/hfl/chinese-macbert-base), [`hfl/chinese-macbert-large`](https://huggingface.co/hfl/chinese-macbert-large) |[`chinese-macbert-base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chinese-macbert-base), [`chinese-macbert-large`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chinese-macbert-large)|
| | [WoBERT](https://github.com/ZhuiyiTechnology/WoBERT)| 追一科技|[`junnyu/wobert_chinese_base`](https://huggingface.co/junnyu/wobert_chinese_base),[`junnyu/wobert_chinese_plus_base`](https://huggingface.co/junnyu/wobert_chinese_plus_base) |[`wobert_chinese_base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/wobert_chinese_base), [`wobert_chinese_plus_base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/wobert_chinese_plus_base)|
|roberta|[chinese-roberta-wwm-ext](https://github.com/ymcui/Chinese-BERT-wwm) | HFL | [`hfl/chinese-roberta-wwm-ext`](https://huggingface.co/hfl/chinese-roberta-wwm-ext), [`hfl/chinese-roberta-wwm-ext-large`](https://huggingface.co/hfl/chinese-roberta-wwm-ext-large) |[`chinese-roberta-wwm-ext`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chinese-roberta-wwm-ext), [`chinese-roberta-wwm-ext-large`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chinese-roberta-wwm-ext-large) |
| |[roberta-small/tiny](https://github.com/ZhuiyiTechnology/pretrained-models)| 追一科技| [`Tongjilibo/chinese_roberta_L-4_H-312_A-12`](https://huggingface.co/Tongjilibo/chinese_roberta_L-4_H-312_A-12), [`Tongjilibo/chinese_roberta_L-6_H-384_A-12`](https://huggingface.co/Tongjilibo/chinese_roberta_L-6_H-384_A-12) | |
| |[roberta-base](https://github.com/facebookresearch/fairseq/tree/main/examples/roberta)| FacebookAI | [`roberta-base`](https://huggingface.co/roberta-base) | [`roberta-base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/roberta-base) |
| | [guwenbert](https://github.com/Ethan-yt/guwenbert) | ethanyt |[`ethanyt/guwenbert-base`](https://huggingface.co/ethanyt/guwenbert-base) | [`guwenbert-base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/guwenbert-base)|
| albert|[albert_zh](https://github.com/brightmart/albert_zh)| brightmart| [torch](https://github.com/lonePatient/albert_pytorch), [`voidful/albert_chinese_tiny`](https://huggingface.co/voidful/albert_chinese_tiny),[`voidful/albert_chinese_small`](https://huggingface.co/voidful/albert_chinese_small), [`voidful/albert_chinese_base`](https://huggingface.co/voidful/albert_chinese_base), [`voidful/albert_chinese_large`](https://huggingface.co/voidful/albert_chinese_large), [`voidful/albert_chinese_xlarge`](https://huggingface.co/voidful/albert_chinese_xlarge), [`voidful/albert_chinese_xxlarge`](https://huggingface.co/voidful/albert_chinese_xxlarge) | [`albert_chinese_tiny`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/albert_chinese_tiny),[`albert_chinese_small`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/albert_chinese_small), [`albert_chinese_base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/albert_chinese_base), [`albert_chinese_large`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/albert_chinese_large), [`albert_chinese_xlarge`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/albert_chinese_xlarge), [`albert_chinese_xxlarge`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/albert_chinese_xxlarge)|
| nezha|[NEZHA](https://github.com/huawei-noah/Pretrained-Language-Model/tree/master/NEZHA-PyTorch) | huawei_noah| [torch](https://github.com/lonePatient/NeZha_Chinese_PyTorch), [`sijunhe/nezha-cn-base`](https://huggingface.co/sijunhe/nezha-cn-base), [`sijunhe/nezha-cn-large`](https://huggingface.co/sijunhe/nezha-cn-large), [`sijunhe/nezha-base-wwm`](https://huggingface.co/sijunhe/nezha-base-wwm), [`sijunhe/nezha-large-wwm`](https://huggingface.co/sijunhe/nezha-large-wwm)|[`nezha-cn-base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/nezha-cn-base), [`nezha-cn-large`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/nezha-cn-large), [`nezha-base-wwm`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/nezha-base-wwm), [`nezha-large-wwm`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/nezha-large-wwm)|
| |[nezha_gpt_dialog](https://github.com/bojone/nezha_gpt_dialog)| bojone| [`Tongjilibo/nezha_gpt_dialog`](https://huggingface.co/Tongjilibo/nezha_gpt_dialog) | |
| xlnet|[Chinese-XLNet](https://github.com/ymcui/Chinese-XLNet) | HFL | [`hfl/chinese-xlnet-base`](https://huggingface.co/hfl/chinese-xlnet-base) | [`chinese-xlnet-base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chinese-xlnet-base)|
||[tranformer_xl](https://github.com/kimiyoung/transformer-xl)|huggingface|[`transfo-xl/transfo-xl-wt103`](https://huggingface.co/transfo-xl/transfo-xl-wt103)|[`transfo-xl-wt103`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/transfo-xl-wt103)|
|deberta| [Erlangshen-DeBERTa-v2](https://github.com/IDEA-CCNL/Fengshenbang-LM) | IDEA | [`IDEA-CCNL/Erlangshen-DeBERTa-v2-97M-Chinese`](https://huggingface.co/IDEA-CCNL/Erlangshen-DeBERTa-v2-97M-Chinese), [`IDEA-CCNL/Erlangshen-DeBERTa-v2-320M-Chinese`](https://huggingface.co/IDEA-CCNL/Erlangshen-DeBERTa-v2-320M-Chinese), [`IDEA-CCNL/Erlangshen-DeBERTa-v2-710M-Chinese`](https://huggingface.co/IDEA-CCNL/Erlangshen-DeBERTa-v2-710M-Chinese) |[`Erlangshen-DeBERTa-v2-97M-Chinese`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Erlangshen-DeBERTa-v2-97M-Chinese), [`Erlangshen-DeBERTa-v2-320M-Chinese`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Erlangshen-DeBERTa-v2-320M-Chinese), [`Erlangshen-DeBERTa-v2-710M-Chinese`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Erlangshen-DeBERTa-v2-710M-Chinese) |
| electra|[Chinese-ELECTRA](https://github.com/ymcui/Chinese-ELECTRA) | HFL |[`hfl/chinese-electra-base-discriminator`](https://huggingface.co/hfl/chinese-electra-base-discriminator) |[`chinese-electra-base-discriminator`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chinese-electra-base-discriminator)|
| ernie|[ernie](https://github.com/PaddlePaddle/ERNIE) | 百度文心| [`nghuyong/ernie-1.0-base-zh`](https://huggingface.co/nghuyong/ernie-1.0-base-zh), [`nghuyong/ernie-3.0-base-zh`](https://huggingface.co/nghuyong/ernie-3.0-base-zh)| [`ernie-1.0-base-zh`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/ernie-1.0-base-zh), [`ernie-3.0-base-zh`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/ernie-3.0-base-zh)|
| roformer|[roformer](https://github.com/ZhuiyiTechnology/roformer)| 追一科技| [`junnyu/roformer_chinese_base`](https://huggingface.co/junnyu/roformer_chinese_base) |[`roformer_chinese_base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/roformer_chinese_base) |
| |[roformer_v2](https://github.com/ZhuiyiTechnology/roformer-v2) | 追一科技| [`junnyu/roformer_v2_chinese_char_base`](https://huggingface.co/junnyu/roformer_v2_chinese_char_base)|[`roformer_v2_chinese_char_base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/roformer_v2_chinese_char_base) |
| simbert|[simbert](https://github.com/ZhuiyiTechnology/simbert) | 追一科技|[`Tongjilibo/simbert-chinese-base`](https://huggingface.co/Tongjilibo/simbert-chinese-base), [`Tongjilibo/simbert-chinese-small`](https://huggingface.co/Tongjilibo/simbert-chinese-small), [`Tongjilibo/simbert-chinese-tiny`](https://huggingface.co/Tongjilibo/simbert-chinese-tiny) | |
| |[simbert_v2/roformer-sim](https://github.com/ZhuiyiTechnology/roformer-sim) | 追一科技|[`junnyu/roformer_chinese_sim_char_base`](https://huggingface.co/junnyu/roformer_chinese_sim_char_base),[`junnyu/roformer_chinese_sim_char_ft_base`](https://huggingface.co/junnyu/roformer_chinese_sim_char_ft_base),[`junnyu/roformer_chinese_sim_char_small`](https://huggingface.co/junnyu/roformer_chinese_sim_char_small),[`junnyu/roformer_chinese_sim_char_ft_small`](https://huggingface.co/junnyu/roformer_chinese_sim_char_ft_small)|[`roformer_chinese_sim_char_base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/roformer_chinese_sim_char_base), [`roformer_chinese_sim_char_ft_base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/roformer_chinese_sim_char_ft_base), [`roformer_chinese_sim_char_small`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/roformer_chinese_sim_char_small), [`roformer_chinese_sim_char_ft_small`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/roformer_chinese_sim_char_ft_small) |
| gau|[GAU-alpha](https://github.com/ZhuiyiTechnology/GAU-alpha) | 追一科技| [`Tongjilibo/chinese_GAU-alpha-char_L-24_H-768`](https://huggingface.co/Tongjilibo/chinese_GAU-alpha-char_L-24_H-768) | |
| uie| [uie](https://github.com/universal-ie/UIE) | 百度| [torch](https://github.com/HUSTAI/uie_pytorch), [`Tongjilibo/uie-base`](https://huggingface.co/Tongjilibo/uie-base) | |
| gpt |[CDial-GPT](https://github.com/thu-coai/CDial-GPT)| thu-coai| [`thu-coai/CDial-GPT_LCCC-base`](https://huggingface.co/thu-coai/CDial-GPT_LCCC-base), [`thu-coai/CDial-GPT_LCCC-large`](https://huggingface.co/thu-coai/CDial-GPT_LCCC-large) | [`CDial-GPT_LCCC-base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/CDial-GPT_LCCC-base), [`CDial-GPT_LCCC-large`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/CDial-GPT_LCCC-large) |
| | [cmp_lm(26亿)](https://github.com/TsinghuaAI/CPM-1-Generate)|清华 | [`TsinghuaAI/CPM-Generate`](https://huggingface.co/TsinghuaAI/CPM-Generate) | [`CPM-Generate`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/CPM-Generate) |
| |[nezha_gen](https://github.com/huawei-noah/Pretrained-Language-Model/tree/master/NEZHA-Gen-TensorFlow)|huawei_noah|[`Tongjilibo/chinese_nezha_gpt_L-12_H-768_A-12`](https://huggingface.co/Tongjilibo/chinese_nezha_gpt_L-12_H-768_A-12)|
| | [gpt2-chinese-cluecorpussmall](https://github.com/dbiir/UER-py/wiki/Modelzoo) |UER | [`uer/gpt2-chinese-cluecorpussmall`](https://huggingface.co/uer/gpt2-chinese-cluecorpussmall) | [`gpt2-chinese-cluecorpussmall`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/gpt2-chinese-cluecorpussmall)|
| | [gpt2-ml](https://github.com/imcaspar/gpt2-ml) |imcaspar | [torch](https://github.com/ghosthamlet/gpt2-ml-torch), [BaiduYun(84dh)](https://pan.baidu.com/s/16tL4Bmoh6jPy0cOND0YyeA) | [`gpt2-ml_15g_corpus`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/gpt2-ml_15g_corpus), [`gpt2-ml_30g_corpus`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/gpt2-ml_30g_corpus) |
| bart| [bart_base_chinese](https://github.com/fastnlp/CPT) |复旦fnlp| [v1.0](https://huggingface.co/fnlp/bart-base-chinese/tree/v1.0), [`fnlp/bart-base-chinese`](https://huggingface.co/fnlp/bart-base-chinese/tree/main)| [`bart-base-chinese`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/bart-base-chinese), [`bart-base-chinese-v1.0`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/bart-base-chinese-v1.0) |
| t5 | [t5](https://github.com/dbiir/UER-py/wiki/Modelzoo) | UER | [`uer/t5-small-chinese-cluecorpussmall`](https://huggingface.co/uer/t5-small-chinese-cluecorpussmall), [`uer/t5-base-chinese-cluecorpussmall`](https://huggingface.co/uer/t5-base-chinese-cluecorpussmall) | [`t5-base-chinese-cluecorpussmall`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/t5-base-chinese-cluecorpussmall), [`t5-small-chinese-cluecorpussmall`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/t5-small-chinese-cluecorpussmall)|
| | mt5 | 谷歌| [`google/mt5-base`](https://huggingface.co/google/mt5-base)| [`mt5-base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/mt5-base)|
| | [t5_pegasus](https://github.com/ZhuiyiTechnology/t5-pegasus)| 追一科技| [`Tongjilibo/chinese_t5_pegasus_small`](https://huggingface.co/Tongjilibo/chinese_t5_pegasus_small), [`Tongjilibo/chinese_t5_pegasus_base`](https://huggingface.co/Tongjilibo/chinese_t5_pegasus_base)| |
| | [chatyuan](https://github.com/clue-ai/ChatYuan)| clue-ai |[`ClueAI/ChatYuan-large-v1`](https://huggingface.co/ClueAI/ChatYuan-large-v1), [`ClueAI/ChatYuan-large-v2`](https://huggingface.co/ClueAI/ChatYuan-large-v2)| [`ChatYuan-large-v1`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/ChatYuan-large-v1), [`ChatYuan-large-v2`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/ChatYuan-large-v2)|
| | [PromptCLUE](https://github.com/clue-ai/PromptCLUE)| clue-ai | [`ClueAI/PromptCLUE-base`](https://huggingface.co/ClueAI/PromptCLUE-base) | [`PromptCLUE-base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/PromptCLUE-base)|
| chatglm | [chatglm-6b](https://github.com/THUDM/ChatGLM-6B) | THUDM | [`THUDM/chatglm-6b`](https://huggingface.co/THUDM/chatglm-6b), [`THUDM/chatglm-6b-int8`](https://huggingface.co/THUDM/chatglm-6b-int8), [`THUDM/chatglm-6b-int4`](https://huggingface.co/THUDM/chatglm-6b-int4), [v0.1.0](https://huggingface.co/THUDM/chatglm-6b/tree/v0.1.0) | [`chatglm-6b`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chatglm-6b), [`chatglm-6b-int8`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chatglm-6b-int8), [`chatglm-6b-int4`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chatglm-6b-int4), [`chatglm-6b-v0.1.0`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chatglm-6b-v0.1.0) |
| |[chatglm2-6b](https://github.com/THUDM/ChatGLM2-6B) | THUDM | [`THUDM/chatglm2-6b`](https://huggingface.co/THUDM/chatglm2-6b), [`THUDM/chatglm2-6b-int4`](https://huggingface.co/THUDM/chatglm2-6b-int4), [`THUDM/chatglm2-6b-32k`](https://huggingface.co/THUDM/chatglm2-6b-32k) | [`chatglm2-6b`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chatglm2-6b), [`chatglm2-6b-int4`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chatglm2-6b-int4), [`chatglm2-6b-32k`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chatglm2-6b-32k) |
| |[chatglm3-6b](https://github.com/THUDM/ChatGLM3) | THUDM | [`THUDM/chatglm3-6b`](https://huggingface.co/THUDM/chatglm3-6b), [`THUDM/chatglm3-6b-32k`](https://huggingface.co/THUDM/chatglm3-6b-32k) | [`chatglm3-6b`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chatglm3-6b), [`chatglm3-6b-32k`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chatglm3-6b-32k) |
| |[glm4-9b](https://github.com/THUDM/GLM-4) | THUDM | [`THUDM/glm-4-9b`](https://huggingface.co/THUDM/glm-4-9b), [`THUDM/glm-4-9b-chat`](https://huggingface.co/THUDM/glm-4-9b-chat), [`THUDM/glm-4-9b-chat-1m`](https://huggingface.co/THUDM/glm-4-9b-chat-1m) | [`glm-4-9b`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/glm-4-9b), [`glm-4-9b-chat`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/glm-4-9b-chat), [`glm-4-9b-chat-1m`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/glm-4-9b-chat-1m)|
| llama | [llama](https://github.com/facebookresearch/llama) | meta| | [`llama-7b`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/llama-7b), [`llama-13b`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/llama-13b)|
| | [llama-2](https://github.com/facebookresearch/llama) | meta| [meta-llama/Llama-2-7b-hf](https://huggingface.co/meta-llama/Llama-2-7b-hf), [meta-llama/Llama-2-7b-chat-hf](https://huggingface.co/meta-llama/Llama-2-7b-chat-hf), [meta-llama/Llama-2-13b-hf](https://huggingface.co/meta-llama/Llama-2-13b-hf), [meta-llama/Llama-2-13b-chat-hf](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf) | [`Llama-2-7b-hf`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Llama-2-7b-hf), [`Llama-2-7b-chat-hf`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Llama-2-7b-chat-hf), [`Llama-2-13b-hf`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Llama-2-13b-hf), [`Llama-2-13b-chat-hf`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Llama-2-13b-chat-hf)|
| | [llama-3](https://github.com/meta-llama/llama3) | meta| [`meta-llama/Meta-Llama-3-8B`](https://huggingface.co/meta-llama/Meta-Llama-3-8B), [`meta-llama/Meta-Llama-3-8B-Instruct`](https://huggingface.co/meta-llama/Meta-Llama-3-8B-Instruct) | [`Meta-Llama-3-8B`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Meta-Llama-3-8B), [`Meta-Llama-3-8B-Instruct`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Meta-Llama-3-8B-Instruct)|
| | [Chinese-LLaMA-Alpaca](https://github.com/ymcui/Chinese-LLaMA-Alpaca)|HFL| |[`chinese_alpaca_plus_7b`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chinese_alpaca_plus_7b), [`chinese_llama_plus_7b`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/chinese_llama_plus_7b)|
| | [Belle_llama](https://github.com/LianjiaTech/BELLE)| LianjiaTech|[BelleGroup/BELLE-LLaMA-7B-2M-enc](https://huggingface.co/BelleGroup/BELLE-LLaMA-7B-2M-enc) | [合成说明](https://github.com/LianjiaTech/BELLE/tree/main/models)、[`BELLE-LLaMA-7B-2M-enc`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/BELLE-LLaMA-7B-2M-enc)|
| | [Ziya](https://github.com/IDEA-CCNL/Fengshenbang-LM) | IDEA-CCNL | [IDEA-CCNL/Ziya-LLaMA-13B-v1](https://huggingface.co/IDEA-CCNL/Ziya-LLaMA-13B-v1), [IDEA-CCNL/Ziya-LLaMA-13B-v1.1](https://huggingface.co/IDEA-CCNL/Ziya-LLaMA-13B-v1.1), [IDEA-CCNL/Ziya-LLaMA-13B-Pretrain-v1](https://huggingface.co/IDEA-CCNL/Ziya-LLaMA-13B-Pretrain-v1) | [`Ziya-LLaMA-13B-v1`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Ziya-LLaMA-13B-v1), [`Ziya-LLaMA-13B-v1.1`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Ziya-LLaMA-13B-v1.1) |
| | [Baichuan](https://github.com/baichuan-inc/Baichuan) | baichuan-inc | [`baichuan-inc/Baichuan-7B`](https://huggingface.co/baichuan-inc/Baichuan-7B), [`baichuan-inc/Baichuan-13B-Base`](https://huggingface.co/baichuan-inc/Baichuan-13B-Base), [`baichuan-inc/Baichuan-13B-Chat`](https://huggingface.co/baichuan-inc/Baichuan-13B-Chat) | [`Baichuan-7B`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Baichuan-7B), [`Baichuan-13B-Base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Baichuan-13B-Base), [`Baichuan-13B-Chat`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Baichuan-13B-Chat) |
| | [Baichuan2](https://github.com/baichuan-inc/Baichuan2) | baichuan-inc | [`baichuan-inc/Baichuan2-7B-Base`](https://huggingface.co/baichuan-inc/Baichuan2-7B-Base), [`baichuan-inc/Baichuan2-7B-Chat`](https://huggingface.co/baichuan-inc/Baichuan2-7B-Chat), [`baichuan-inc/Baichuan2-13B-Base`](https://huggingface.co/baichuan-inc/Baichuan2-13B-Base), [`baichuan-inc/Baichuan2-13B-Chat`](https://huggingface.co/baichuan-inc/Baichuan2-13B-Chat) | [`Baichuan2-7B-Base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Baichuan2-7B-Base), [`Baichuan2-7B-Chat`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Baichuan2-7B-Chat), [`Baichuan2-13B-Base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Baichuan2-13B-Base), [`Baichuan2-13B-Chat`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Baichuan2-13B-Chat) |
| | [vicuna](https://github.com/lm-sys/FastChat) | lmsys| [`lmsys/vicuna-7b-v1.5`](https://huggingface.co/lmsys/vicuna-7b-v1.5) | [`vicuna-7b-v1.5`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/vicuna-7b-v1.5)|
| | [Yi](https://github.com/01-ai/Yi) | 01-ai| [`01-ai/Yi-6B`](https://huggingface.co/01-ai/Yi-6B), [`01-ai/Yi-6B-200K`](https://huggingface.co/01-ai/Yi-6B-200K) | [`Yi-6B`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Yi-6B), [`Yi-6B-200K`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Yi-6B-200K)|
| bloom |[bloom](https://github.com/bigscience-workshop/xmtf) | bigscience | [`bigscience/bloom-560m`](https://huggingface.co/bigscience/bloom-560m), [`bigscience/bloomz-560m`](https://huggingface.co/bigscience/bloomz-560m) | [`bloom-560m`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/bloom-560m), [`bloomz-560m`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/bloomz-560m) |
| Qwen |[Qwen](https://github.com/QwenLM/Qwen) | 阿里云 | [`Qwen/Qwen-1_8B`](https://huggingface.co/Qwen/Qwen-1_8B), [`Qwen/Qwen-1_8B-Chat`](https://huggingface.co/Qwen/Qwen-1_8B-Chat), [`Qwen/Qwen-7B`](https://huggingface.co/Qwen/Qwen-7B), [`Qwen/Qwen-7B-Chat`](https://huggingface.co/Qwen/Qwen-7B-Chat), [`Qwen/Qwen-14B`](https://huggingface.co/Qwen/Qwen-14B), [`Qwen/Qwen-14B-Chat`](https://huggingface.co/Qwen/Qwen-14B-Chat) | [`Qwen-1_8B`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen-1_8B), [`Qwen-1_8B-Chat`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen-1_8B-Chat), [`Qwen-7B`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen-7B), [`Qwen-7B-Chat`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen-7B-Chat), [`Qwen-14B`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen-14B), [`Qwen-14B-Chat`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen-14B-Chat) |
||[Qwen1.5](https://github.com/QwenLM/Qwen1.5)|阿里云|[`Qwen/Qwen1.5-0.5B`](https://huggingface.co/Qwen/Qwen1.5-0.5B), [`Qwen/Qwen1.5-0.5B-Chat`](https://huggingface.co/Qwen/Qwen1.5-0.5B-Chat), [`Qwen/Qwen1.5-1.8B`](https://huggingface.co/Qwen/Qwen1.5-1.8B), [`Qwen/Qwen1.5-1.8B-Chat`](https://huggingface.co/Qwen/Qwen1.5-1.8B-Chat), [`Qwen/Qwen1.5-7B`](https://huggingface.co/Qwen/Qwen1.5-7B), [`Qwen/Qwen1.5-7B-Chat`](https://huggingface.co/Qwen/Qwen1.5-7B-Chat), [`Qwen/Qwen1.5-14B`](https://huggingface.co/Qwen/Qwen1.5-14B), [`Qwen/Qwen1.5-14B-Chat`](https://huggingface.co/Qwen/Qwen1.5-14B-Chat)|[`Qwen1.5-0.5B`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen1.5-0.5B), [`Qwen1.5-0.5B-Chat`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen1.5-0.5B-Chat), [`Qwen1.5-1.8B`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen1.5-1.8B), [`Qwen1.5-1.8B-Chat`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen1.5-1.8B-Chat), [`Qwen1.5-7B`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen1.5-7B), [`Qwen1.5-7B-Chat`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen1.5-7B-Chat), [`Qwen1.5-14B`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen1.5-14B), [`Qwen1.5-14B-Chat`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen1.5-14B-Chat)|
||[Qwen2](https://github.com/QwenLM/Qwen2)|阿里云|[`Qwen/Qwen2-0.5B`](https://huggingface.co/Qwen/Qwen2-0.5B), [`Qwen/Qwen2-0.5B-Instruct`](https://huggingface.co/Qwen/Qwen2-0.5B-Instruct), [`Qwen/Qwen2-1.5B`](https://huggingface.co/Qwen/Qwen2-1.5B), [`Qwen/Qwen2-1.5B-Instruct`](https://huggingface.co/Qwen/Qwen2-1.5B-Instruct), [`Qwen/Qwen2-7B`](https://huggingface.co/Qwen/Qwen2-7B), [`Qwen/Qwen2-7B-Instruct`](https://huggingface.co/Qwen/Qwen2-7B-Instruct)|[`Qwen2-0.5B`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen2-0.5B), [`Qwen2-0.5B-Instruct`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen2-0.5B-Instruct), [`Qwen2-1.5B`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen2-1.5B), [`Qwen2-1.5B-Instruct`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen2-1.5B-Instruct), [`Qwen2-7B`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen2-7B), [`Qwen2-7B-Instruct`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/Qwen2-7B-Instruct)|
| InternLM|[InternLM](https://github.com/InternLM/InternLM) | 上海人工智能实验室 | [`internlm/internlm-chat-7b`](https://huggingface.co/internlm/internlm-chat-7b), [`internlm/internlm-7b`](https://huggingface.co/internlm/internlm-7b) | [`internlm-7b`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/internlm-7b), [`internlm-chat-7b`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/internlm-chat-7b)|
| Falcon|[Falcon](https://huggingface.co/tiiuae) | tiiuae | [`tiiuae/falcon-rw-1b`](https://huggingface.co/tiiuae/falcon-rw-1b), [`tiiuae/falcon-7b`](https://huggingface.co/tiiuae/falcon-7b), [`tiiuae/falcon-7b-instruct`](https://huggingface.co/tiiuae/falcon-7b-instruct) | [`falcon-rw-1b`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/falcon-rw-1b), [`falcon-7b`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/falcon-7b), [`falcon-7b-instruct`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/falcon-7b-instruct) |
| moe |[deeoseek-moe](https://github.com/deepseek-ai/DeepSeek-MoE)|deepseek| [`deepseek-ai/deepseek-moe-16b-base`](https://huggingface.co/deepseek-ai/deepseek-moe-16b-base), [`deepseek-ai/deepseek-moe-16b-chat`](https://huggingface.co/deepseek-ai/deepseek-moe-16b-chat) | [`deepseek-moe-16b-base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/deepseek-moe-16b-base), [`deepseek-moe-16b-chat`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/deepseek-moe-16b-chat) |
| embedding| [text2vec-base-chinese](https://github.com/shibing624/text2vec) |shibing624| [`shibing624/text2vec-base-chinese`](https://huggingface.co/shibing624/text2vec-base-chinese) |[`text2vec-base-chinese`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/text2vec-base-chinese) |
| | [m3e](https://github.com/wangyuxinwhy/uniem) |moka-ai| [`moka-ai/m3e-base`](https://huggingface.co/moka-ai/m3e-base) |[`m3e-base`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/m3e-base)|
| | bge |BAAI| [`BAAI/bge-large-en-v1.5`](https://huggingface.co/BAAI/bge-large-en-v1.5), [`BAAI/bge-large-zh-v1.5`](https://huggingface.co/BAAI/bge-large-zh-v1.5), [`BAAI/bge-base-en-v1.5`](https://huggingface.co/BAAI/bge-base-en-v1.5), [`BAAI/bge-base-zh-v1.5`](https://huggingface.co/BAAI/bge-base-zh-v1.5), [`BAAI/bge-small-en-v1.5`](https://huggingface.co/BAAI/bge-small-en-v1.5), [`BAAI/bge-small-zh-v1.5`](https://huggingface.co/BAAI/bge-small-zh-v1.5) | [`bge-large-en-v1.5`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/bge-large-en-v1.5), [`bge-large-zh-v1.5`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/bge-large-zh-v1.5), [`bge-base-en-v1.5`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/bge-base-en-v1.5), [`bge-base-zh-v1.5`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/bge-base-zh-v1.5), [`bge-small-en-v1.5`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/bge-small-en-v1.5), [`bge-small-zh-v1.5`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/bge-small-zh-v1.5)|
| | gte |thenlper| [`thenlper/gte-large-zh`](https://huggingface.co/thenlper/gte-large-zh), [`thenlper/gte-base-zh`](https://huggingface.co/thenlper/gte-base-zh) |[`gte-base-zh`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/gte-base-zh), [`gte-large-zh`](https://huggingface.co/Tongjilibo/bert4torch_config/tree/main/gte-large-zh)|
*注:
1. `高亮格式`(如`bert-base-chinese`)的表示可直接`build_transformer_model()`联网下载
2. 国内镜像网站加速下载
- `HF_ENDPOINT=https://hf-mirror.com python your_script.py`
- `export HF_ENDPOINT=https://hf-mirror.com`后再执行python代码
- 在python代码开头如下设置
```python
import os
os.environ['HF_ENDPOINT'] = "https://hf-mirror.com"
```
## 6. 鸣谢
- 感谢苏神实现的[bert4keras](https://github.com/bojone/bert4keras),本实现有不少地方参考了bert4keras的源码,在此衷心感谢大佬的无私奉献;
- 其次感谢项目[bert4pytorch](https://github.com/MuQiuJun-AI/bert4pytorch),也是在该项目的指引下给了我用pytorch来复现bert4keras的想法和思路。
## 7. 引用
```
@misc{bert4torch,
title={bert4torch},
author={Bo Li},
year={2022},
howpublished={\url{https://github.com/Tongjilibo/bert4torch}},
}
```
## 8. 其他
- Wechat & Star History Chart
<table border="0">
<tbody>
<tr align="center" >
<td>
<a href="https://github.com/Tongjilibo"><img width="200" height="250" src="./docs/pics/wechat.jpg" alt="pic"></a><br>
<a href="https://github.com/Tongjilibo">微信号</a>
</td>
<td>
<a href="https://github.com/Tongjilibo"><img width="190" height="250" src="./docs/pics/wechat_group.jpg" alt="pic"></a><br>
<a href="https://github.com/Tongjilibo">微信群</a>
</td>
<td>
<a href="https://star-history.com/#Tongjilibo/bert4torch&Date"><img width="400" height="250" src="https://api.star-history.com/svg?repos=Tongjilibo/bert4torch&type=Date" alt="pic"></a><br>
<a href="https://star-history.com/#Tongjilibo/bert4torch&Date">Star History Chart</a>
</td>
</tr>
</tbody>
</table>
| An elegent pytorch implement of transformers | bert,nlp,pytorch,bert4keras,named-entity-recognition,relation-extraction,seq2seq,text-classification,transformers,bert4torch | 34 | 4 | 21 | 1,145 | 24 | 3 | 0 |
vercel/style-guide | # The Vercel Style Guide
<a aria-label="Vercel logo" href="https://vercel.com">
<img alt="" src="https://img.shields.io/badge/Made%20by%20Vercel-000000.svg?style=flat-square&logo=Vercel&labelColor=000">
</a>
<a aria-label="NPM version" href="https://www.npmjs.com/package/@vercel/style-guide">
<img alt="" src="https://img.shields.io/npm/v/@vercel/style-guide.svg?style=flat-square&labelColor=000000">
</a>
<a aria-label="License" href="https://github.com/vercel/style-guide/blob/canary/LICENSE.md">
<img alt="" src="https://img.shields.io/npm/l/@vercel/style-guide.svg?style=flat-square&labelColor=000000">
</a>
<a aria-label="CI status" href="https://github.com/vercel/style-guide/actions/workflows/quality.yml?query=event%3Apush+branch%3Amain">
<img alt="" src="https://img.shields.io/github/actions/workflow/status/vercel/style-guide/quality.yml?event=push&branch=main&style=flat-square&labelColor=000000">
</a>
## Introduction
This repository is the home of Vercel's style guide, which includes configs for
popular linting and styling tools.
The following configs are available, and are designed to be used together.
- [Prettier](#prettier)
- [ESLint](#eslint)
- [TypeScript](#typescript)
## Contributing
Please read our [contributing](https://github.com/vercel/style-guide/blob/main/CONTRIBUTING.md)
guide before creating a pull request.
## Installation
All of our configs are contained in one package, `@vercel/style-guide`. To install:
```sh
# If you use npm
npm i --save-dev @vercel/style-guide
# If you use pnpm
pnpm i --save-dev @vercel/style-guide
# If you use Yarn
yarn add --dev @vercel/style-guide
```
Some of our ESLint configs require peer dependencies. We'll note those
alongside the available configs in the [ESLint](#eslint) section.
## Prettier
> Note: Prettier is a peer-dependency of this package, and should be installed
> at the root of your project.
>
> See: https://prettier.io/docs/en/install.html
To use the shared Prettier config, set the following in `package.json`.
```json
{
"prettier": "@vercel/style-guide/prettier"
}
```
## ESLint
> Note: ESLint is a peer-dependency of this package, and should be installed
> at the root of your project.
>
> See: https://eslint.org/docs/user-guide/getting-started#installation-and-usage
This ESLint config is designed to be composable.
The following base configs are available. You can use one or both of these
configs, but they should always be first in `extends`:
- `@vercel/style-guide/eslint/browser`
- `@vercel/style-guide/eslint/node`
Note that you can scope configs, so that configs only target specific files.
For more information, see: [Scoped configuration with `overrides`](#scoped-configuration-with-overrides).
The following additional configs are available:
- `@vercel/style-guide/eslint/jest`
- `@vercel/style-guide/eslint/jest-react` (includes rules for `@testing-library/react`)
- `@vercel/style-guide/eslint/next` (requires `@next/eslint-plugin-next` to be installed at the same version as `next`)
- `@vercel/style-guide/eslint/playwright-test`
- `@vercel/style-guide/eslint/react`
- `@vercel/style-guide/eslint/typescript` (requires `typescript` to be installed and [additional configuration](#configuring-eslint-for-typescript))
- `@vercel/style-guide/eslint/vitest`
> You'll need to use `require.resolve` to provide ESLint with absolute paths,
> due to an issue around ESLint config resolution (see
> [eslint/eslint#9188](https://github.com/eslint/eslint/issues/9188)).
For example, use the shared ESLint config(s) in a Next.js project, set the
following in `.eslintrc.js`.
```js
module.exports = {
extends: [
require.resolve('@vercel/style-guide/eslint/browser'),
require.resolve('@vercel/style-guide/eslint/react'),
require.resolve('@vercel/style-guide/eslint/next'),
],
};
```
### Configuring ESLint for TypeScript
Some of the rules enabled in the TypeScript config require additional type
information, you'll need to provide the path to your `tsconfig.json`.
For more information, see: https://typescript-eslint.io/docs/linting/type-linting
```js
const { resolve } = require('node:path');
const project = resolve(__dirname, 'tsconfig.json');
module.exports = {
root: true,
extends: [
require.resolve('@vercel/style-guide/eslint/node'),
require.resolve('@vercel/style-guide/eslint/typescript'),
],
parserOptions: {
project,
},
settings: {
'import/resolver': {
typescript: {
project,
},
},
},
};
```
### Configuring custom components for `jsx-a11y`
It's common practice for React apps to have shared components like `Button`,
which wrap native elements. You can pass this information along to `jsx-a11y`
via the `components` setting.
The below list is not exhaustive.
```js
module.exports = {
root: true,
extends: [require.resolve('@vercel/style-guide/eslint/react')],
settings: {
'jsx-a11y': {
components: {
Article: 'article',
Button: 'button',
Image: 'img',
Input: 'input',
Link: 'a',
Video: 'video',
},
},
},
};
```
### Scoped configuration with `overrides`
ESLint configs can be scoped to include/exclude specific paths. This ensures
that rules don't "leak" into places where those rules don't apply.
In this example, Jest rules are only being applied to files matching Jest's
default test match pattern.
```js
module.exports = {
extends: [require.resolve('@vercel/style-guide/eslint/node')],
overrides: [
{
files: ['**/__tests__/**/*.[jt]s?(x)', '**/?(*.)+(spec|test).[jt]s?(x)'],
extends: [require.resolve('@vercel/style-guide/eslint/jest')],
},
],
};
```
#### A note on file extensions
By default, all TypeScript rules are scoped to files ending with `.ts` and
`.tsx`.
However, when using overrides, file extensions must be included or ESLint will
only include `.js` files.
```js
module.exports = {
overrides: [
{ files: [`directory/**/*.[jt]s?(x)`], rules: { 'my-rule': 'off' } },
],
};
```
## TypeScript
This style guide provides multiple TypeScript configs. These configs correlate to the LTS Node.js versions, providing the appropriate `lib`, `module`, `target`, and `moduleResolution` settings for each version. The following configs are available:
| Node.js Version | TypeScript Config |
| --------------- | --------------------------------------- |
| v16 | `@vercel/style-guide/typescript/node16` |
| v18 | `@vercel/style-guide/typescript/node18` |
| v20 | `@vercel/style-guide/typescript/node20` |
To use the shared TypeScript config, set the following in `tsconfig.json`.
```json
{
"extends": "@vercel/style-guide/typescript/node16"
}
```
The base TypeScript config is also available as [`@vercel/style-guide/typescript`](./typescript/tsconfig.base.json) which only specifies a set of general rules. You should inherit from this file when setting custom `lib`, `module`, `target`, and `moduleResolution` settings.
| Vercel's engineering style guide | null | 33 | 80 | 43 | 115 | 17 | 3 | 3 |
vuejs-translations/docs-zh-cn | # Vuejs.org 新版中文文档
这里是焕然一新的 [cn.vuejs.org](https://cn.vuejs.org)。
你也可以预览对应的英文原文文档 [https://vuejs.org](https://vuejs.org) 及其代码仓库 [vuejs/docs](https://github.com/vuejs/docs)。
## 如何参与贡献
本仓库是[英文文档仓库](https://github.com/vuejs/docs)的镜像翻译仓库。我们仅对原文进行内容同步与翻译,**不包含**基于英文原版的扩展、删减或演绎等。如对原文有任何意见或建议,欢迎到[英文文档仓库](https://github.com/vuejs/docs)提出 issue 或发起 PR。
有劳访问我们的 [wiki](https://github.com/vuejs-translations/docs-zh-cn/wiki) 了解相关注意事项。
目前网站处于维护状态,我们会定期同步英文版的更新,包括文档内容和前端代码等。欢迎大家:
- 同步英文站点最新的改动到这里
- 修复错别字或错误的书写格式
- 发 issue 讨论译法或书写格式
- 发 issue 讨论部署或协作流程上的问题
同时我们的文档中可能会偶尔存在暂时未翻译的段落,这些段落通常都以 `<!-- TODO: translation -->` 开头作为标记。所以也欢迎大家在源码中搜索这些段落并贡献翻译。你也可以通过[这个链接](https://github.com/vuejs-translations/docs-zh-cn/search?q=TODO%3A+translation)快速找到尚未翻译好的内容。
## 如何在本地编辑和预览该网站
本项目要求:
- Node.js 为 `v14.0.0` 或更高版本
- pnpm 为 `v7.4.0` 或更高版本
本站基于 [VitePress](https://github.com/vuejs/vitepress) 和 [@vue/theme](https://github.com/vuejs/vue-theme) 建立。网站内容以 Markdown 格式书写,位于 `src` 文件夹中。
```sh
pnpm i
pnpm run dev
```
## 贡献者列表
最新的文档/翻译贡献情况可以参阅 GitHub 提供的 [contributors](https://github.com/vuejs-translations/docs-zh-cn/graphs/contributors) 页面。
以下是基于该仓库中 PR 和 commit 统计并按总数量排序的所有贡献者,[生成逻辑可在此查阅](https://github.com/ShenQingchuan/github-contributor-svg-generator)。
<p align="center">
<a href="https://cdn.jsdelivr.net/gh/ShenQingchuan/github-contributor-svg-generator@main/.github-contributors/vuejs-translations_docs-zh-cn.svg">
<img src="https://cdn.jsdelivr.net/gh/ShenQingchuan/github-contributor-svg-generator@main/.github-contributors/vuejs-translations_docs-zh-cn.svg" />
</a>
</p>
## 版权声明
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="知识共享许可协议" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br />本作品采用<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 (CC BY-NC-SA 4.0) </a>进行许可。
| Vue 文档官方中文翻译 | Official Chinese translation for Vue docs | null | 0 | 705 | 677 | 3,375 | 1 | 5 | 3 |
alibaba/GaiaX | <h1 align="center">
<img src="https://gw.alicdn.com/imgextra/i2/O1CN0140Ny0n1kYMIeGmeyp_!!6000000004695-2-tps-1024-1024.png" width="250" alt="GaiaX-logo">
</h1>
<p align="center">
动态模板引擎是阿里巴巴优酷技术团队研发的一套轻量级的纯原生动态化卡片跨端解决方案
</p>
<p align="center">
[![README-en](https://shields.io/badge/README-ENGLISH-blue)](README.md)
[![README-zh](https://shields.io/badge/README-%E4%B8%AD%E6%96%87-blue)](README-ZH.md)
[![Docs-zh](https://shields.io/badge/Docs-%E4%B8%AD%E6%96%87-blue?logo=Read%20The%20Docs)](www.yuque.com/biezhihua/gaiax)
[![GitHub release](https://img.shields.io/github/release/alibaba/GaiaX)](https://github.com/alibaba/GaiaX/releases)
[![GitHub Stars](https://img.shields.io/github/stars/alibaba/GaiaX)](https://github.com/alibaba/GaiaX/stargazers)
[![GitHub Forks](https://img.shields.io/github/forks/alibaba/GaiaX)](https://github.com/alibaba/GaiaX/fork)
[![user repos](https://badgen.net/github/dependents-repo/alibaba/GaiaX?label=user%20repos)](https://github.com/alibaba/GaiaX/network/dependents)
[![GitHub Contributors](https://img.shields.io/github/contributors/alibaba/GaiaX)](https://github.com/alibaba/GaiaX/graphs/contributors)
![License](https://img.shields.io/github/license/alibaba/GaiaX)
</p>
# 动态模板引擎
动态模板引擎是阿里巴巴优酷技术团队研发的一套轻量级的纯原生动态化卡片跨端解决方案。
除了客户端SDK外,还提供了模板可视化搭建工具Studio,以及Demo工程(包含模板示例,以及扫码预览),支持从模板创建、编辑、真机调试、预览等研发全链路技术。
动态模板引擎的目标是在保证原生体验与性能的同时,帮助客户端开发实现低代码。
## 目标
以下这些目标是我们项目前进的方向:
- 高性能
- 跨端技术
- 可视化搭建
- 纯Native渲染
## 支持平台
- Android
- iOS
- Harmony
## 核心概念
<p align="center">
<img src="https://gw.alicdn.com/imgextra/i3/O1CN01Y4sMkn1Nmnc7thyzR_!!6000000001613-2-tps-3423-886.png" width="1000" alt="GaiaX-arch">
</p>
## 使用到的技术
Rust/Android/Kotlin/iOS/OC/C++/JNI/CSS/FlexBox
## 使用方法
### Android
#### 依赖
增加jitpack源:
```
// 方式1:在setting.gradle中增加
pluginManagement {
repositories {
gradlePluginPortal()
google()
maven { url 'https://jitpack.io' }
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
maven { url 'https://jitpack.io' }
mavenCentral()
}
}
// 方式2:在根build.gradle中增加
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
```
Android-Support version:
```
implementation 'com.github.alibaba.GaiaX:GaiaX-Adapter:$version-support'
implementation 'com.github.alibaba.GaiaX:GaiaX:$version-support'
implementation 'com.alibaba:fastjson:1.2.76'
```
AndroidX version:
```
implementation 'com.github.alibaba.GaiaX:GaiaX-Adapter:$version'
implementation 'com.github.alibaba.GaiaX:GaiaX:$version'
implementation 'com.alibaba:fastjson:1.2.76'
```
#### 模板文件
```
// 用于存放模板资源的路径
/assets/${templateBiz}/${templateId}
```
#### 调用方式
```
// SDK使用方式
// 初始化 - 初始化SDK
GXTemplateEngine.instance.init(activity)
// 构建模板参数 - 模板信息
// activity - 上下文
// templateBiz - 业务ID
// templateId - 模板ID
val item = GXTemplateEngine.GXTemplateItem(activity, "templateBiz", "templateId")
// 构建模板参数 - 视口大小(模板绘制尺寸,类似于Android中画布的概念)
val size = GXTemplateEngine.GXMeasureSize(100F.dpToPx(), null)
// 构建模板参数 - 模板数据
val dataJson = AssetsUtils.parseAssets(activity, "template-data.json")
val data = GXTemplateEngine.GXTemplateData(dataJson)
// 创建模板视图 - 根据模板参数创建出一个原生View
val view = GXTemplateEngine.instance.createView(item, size)
// 视图绑定数据
GXTemplateEngine.instance.bindData(view, data)
// 将插入模板插入到容器中进行渲染
findViewById<ViewGroup>(R.id.template_container).addView(view, 0)
```
### iOS
#### CocoaPods
在Podfile中添加依赖
```
// 依赖
pod 'GaiaXiOS'
```
#### 模板文件
在App或者FrameWork中添加模板文件
```
// 用于存放模板资源的路径
xxx.bundle/templateId
```
#### 调用方式
```
// SDK使用方式
// 引入头文件
#import <GaiaXiOS/GaiaXiOS.h>
//注册模板服务
[TheGXRegisterCenter registerTemplateServiceWithBizId:bizId templateBundle:@"xxx.bundle"];
// 构建模板参数 - 模板信息
// templateBiz - 业务ID
// templateId - 模板ID
GXTemplateItem *item = [[GXTemplateItem alloc] init];
item.templateId = templateId;
item.bizId = templateBiz;
// 构建模板参数 - 视口大小(模板绘制尺寸)
CGSize size = CGSizeMake(1080, NAN);
// 构建模板参数 - 模板数据
GXTemplateData *data = [[GXTemplateData alloc] init];
data.data = @{@"xxx": @"xxx"};
// 创建模板视图 - 根据模板参数创建出一个原生View
UIView *view = [TheGXTemplateEngine creatViewByTemplateItem:item measureSize:size];
// 视图绑定数据
[TheGXTemplateEngine bindData:data onView:view];
// 将插入模板插入到容器中进行渲染
[self.view addSubview:view];
```
### Harmony
#### 依赖管理
在oh-package.json5文件中中添加依赖
```
// 依赖
"dependencies": {
"GaiaxHarmony": "",
}
```
#### 模板文件
在项目rawfile目录
```
// 用于存放模板资源的路径
src/main/resouces/rawfile/xxxx
```
#### 调用方式
```
// SDK使用方式
// 引入头文件
import { GXTemplateItem } from 'GaiaxHarmony/src/main/ets/context/GXTemplateItem';
import { GXTemplateData } from 'GaiaxHarmony/src/main/ets/context/GXTemplateData';
import { GXComponent } from 'GaiaxHarmony/src/main/ets/components/GXComponent';
import { Size } from 'gxstretch';
// 构建模板参数 - 模板信息
templateItem = new GXTemplateItem('bizId', 'templateId', 'templateVersion')
// 构建模板参数 - 模板数据
templateData = new GXTemplateData();
templateData.data = @{@"xxx": @"xxx"};
// 构建模板参数 - 视口大小(模板绘制尺寸)
measureSize: Size<number> = new Size(NaN, NaN);
// 创建模板视图
GXComponent({
templateItem: this.templateItem,
templateData: this.templateData,
measureSize: this.measureSize
})
```
## 2024鸿蒙迭代路线图
![image](https://github.com/alibaba/GaiaX/assets/6761107/2ea4f5f0-9fee-4c79-8aad-66114dcc893f)
## 如何贡献代码
我们非常欢迎您为项目贡献代码。在您编写代码之前,请先创建一个issue或者pull request以便我们能够讨论方案的细节与方案的合理性。您可以针对以下领域贡献代码:
- 包大小
- 运行时性能
- 跨端一致性
- 单元测试用例
- 文档或者使用案例
- 等等
## 工具
- [Gaia Studio](https://www.yuque.com/youku-gaia/gaia-studio/iba10t#qxXg9)
## 问题反馈
- 外部接入方须从Github上按照模板提示提出ISSUE,详细的描述问题,并@负责人的Github账户。
- ISSUE的处理优先级,由高到低排序,1~7:
- Level1 - 可被复现的BUG。
- Level2 - 在GaiaX规划中的新增需求。
- Level3 - GaiaStdio相关问题。
- Level4 - 文档问题。
- Level5 - 未在GaiaX规划中的新增需求。
- Level6 - 不可被复现的BUG。
- Level7 - 其他问题。
- 各模块负责人Github账户:
- GaiaXSDK - iOS - https://github.com/jingcheng1988
- GaiaXSDK - Android - https://github.com/biezhihua
- GaiaXSDK - 表达式SDK - https://github.com/MXPDS6688
- GaiaStudio - https://github.com/ronghui1219
# 许可证
```
Ali-GaiaX-Project is a template dynamic develop solutions developed by Alibaba and licensed under the Apache License (Version 2.0)
This product contains various third-party components under other open source licenses.
See the NOTICE file for more information.
```
| 动态模板引擎是一套轻量化、跨平台、高性能的纯原生移动端卡片渲染动态化解决方案 | android,ios,cross-platform,flexbox,rust,kotlin,swift,css,harmony,harmonyos | 18 | 23 | 314 | 1,197 | 30 | 2 | 2 |
whwlsfb/JDumpSpider | # JDumpSpider
HeapDump敏感信息提取工具
# 下载
预编译包:[Releases](https://github.com/whwlsfb/JDumpSpider/releases)
# 编译
需要Maven、JDK 1.8。
首先需要将netbeans-lib-profiler导入本地maven仓库
```
$ cd lib/
$ mvn install:install-file -Dfile=netbeans-lib-profiler.jar -DgroupId=netbeans -DartifactId=netbeans-lib-profiler -Dversion=1.0 -Dpackaging=jar
```
导入完成后切换至项目根目录,运行编译打包命令
```
$ mvn package
```
# 支持范围
暂支持提取以下类型的敏感信息
- 数据源
- SpringDataSourceProperties
- WeblogicDataSourceConnectionPoolConfig
- MongoClient
- AliDruidDataSourceWrapper
- HikariDataSource
- 配置文件信息
- MapPropertySource
- OriginTrackedMapPropertySource
- MutablePropertySource
- ConsulPropertySource
- OSS(模糊搜索)
- Redis配置
- RedisStandaloneConfiguration
- JedisClient
- ShiroKey
- CookieRememberMeManager
- 模糊搜索用户信息
- UserPassSearcher01
更多类型支持尽请期待。
# 使用
本工具需要使用Java 1.6或更高版本。
```sh
$ java -jar .\target\JDumpSpider-1.0-SNAPSHOT-full.jar
Missing required parameter: '<heapfile>'
Usage: JDumpSpider [-hV] <heapfile>
Extract sensitive information from heapdump file.
<heapfile> Heap file path.
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
```
| HeapDump敏感信息提取工具 | null | 15 | 1 | 1 | 45 | 3 | 2 | 1 |
Pradeep-Pandey13/CheatSheets-HTML-CSS-JavaScript | # CheatSheets-HTML-CSS-JavaScript
I have shared all my cheatsheets on this repository which were previously posted on my Twitter account. You can download and share these cheatsheets with others if you find them helpful.
| In this repository I have provided all the cheatsheets which I have shared on my Twitter account. So if you find these cheatsheets useful you can download and share them with other people. | null | 0 | 2 | 2 | 64 | 6 | 2 | 0 |
hammerstonedev/fast-paginate | # Fast Paginate for Laravel
## About
This is a fast `limit`/`offset` pagination macro for Laravel. It can be used in place of the standard `paginate` methods.
This package uses a SQL method similar to a "deferred join" to achieve this speedup. A deferred join is a technique that defers access to requested columns until _after_ the `offset` and `limit` have been applied.
In our case we don't actually do a join, but rather a `where in` with a subquery. Using this technique we create a subquery that can be optimized with specific indexes for maximum speed and then use those results to fetch the full rows.
The SQL looks something like this:
```sql
select * from contacts -- The full data that you want to show your users.
where contacts.id in ( -- The "deferred join" or subquery, in our case.
select id from contacts -- The pagination, accessing as little data as possible - ID only.
limit 15 offset 150000
)
```
> You might get an error trying to run the query above! Something like `This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery.`
> In this package, we run them as [two _separate_ queries](https://github.com/hammerstonedev/fast-paginate/blob/154da286f8160a9e75e64e8025b0da682aa2ba23/src/BuilderMixin.php#L62-L79) to get around that!
The benefits can vary based on your dataset, but this method allows the database to examine as little data as possible to satisfy the user's intent.
It's unlikely that this method will ever perform worse than traditional `offset` / `limit`, although it is possible, so be
sure to test on your data!
> If you want to read 3,000 words on the theory of this package, you can head over to [aaronfrancis.com/2022/efficient-pagination-using-deferred-joins](https://aaronfrancis.com/2022/efficient-pagination-using-deferred-joins).
## Installation
This package supports Laravel 8, 9, and 10. (Laravel 8 must be 8.37 or higher.)
To install, require the package via composer:
```
composer require hammerstone/fast-paginate
```
There is nothing further you need to do. The service provider will be loaded automatically by Laravel.
## Usage
Anywhere you would use `Model::query()->paginate()`, you can use `Model::query()->fastPaginate()`! That's it! The method signature is the same.
Relationships are supported as well:
```php
User::first()->posts()->fastPaginate();
```
## A Favor
If this helps you, please [tweet at me](https://twitter.com/aarondfrancis) with before and after times! I'd love to know :D
Some community results so far:
* [30 seconds --> 250ms](https://twitter.com/mdavis1982/status/1482429071288066054)
* [28 seconds --> 2 seconds](https://twitter.com/joecampo/status/1483550610028957701)
* [7.5x faster](https://twitter.com/max_eckel/status/1483764319372333057)
* [1.1 seconds --> 0.1 seconds](https://twitter.com/max_eckel/status/1483852300414337032)
* [20 seconds --> 2 seconds](https://twitter.com/1ralphmorris/status/1484242437618941957)
* [2 seconds --> .2 seconds](https://twitter.com/julioelpoeta/status/1549524738980077568)
| A fast implementation of offset/limit pagination for Laravel. | laravel,pagination | 17 | 12 | 33 | 127 | 1 | 2 | 2 |
lucidrains/video-diffusion-pytorch | ![machine imagined fireworks](./fireworks.webp)
*these fireworks do not exist*
## Video Diffusion - Pytorch
Text to video, it is happening! <a href="https://video-diffusion.github.io/">Official Project Page</a>
Implementation of <a href="https://arxiv.org/abs/2204.03458">Video Diffusion Models</a>, <a href="http://www.jonathanho.me/">Jonathan Ho</a>'s new paper extending DDPMs to Video Generation - in Pytorch. It uses a special space-time factored U-net, extending generation from 2d images to 3d videos
<img src="./3d-unet.png" width="500px"></img>
## Status
14k for difficult moving mnist (converging much faster and better than <a href="https://wandb.ai/lucidrains/nuwa-moving-mnist/reports/moving-mnist-nuwa--VmlldzoxNjk3MjI3?accessToken=cx03lswmr4bxj9dhrzzm5c3xebdmfq28a4dqzsoq9n89by6ppofukq7bxp19078j">NUWA</a>) - wip
<img src="./samples/moving-mnist.gif" width="250px">
The above experiments are possible only due to resources provided by <a href="https://stability.ai/">Stability.ai</a>
Any new developments for text-to-video synthesis will be centralized at <a href="https://github.com/lucidrains/imagen-pytorch#text-to-video-ongoing-research">Imagen-pytorch</a>
## Install
```bash
$ pip install video-diffusion-pytorch
```
## Usage
```python
import torch
from video_diffusion_pytorch import Unet3D, GaussianDiffusion
model = Unet3D(
dim = 64,
dim_mults = (1, 2, 4, 8)
)
diffusion = GaussianDiffusion(
model,
image_size = 32,
num_frames = 5,
timesteps = 1000, # number of steps
loss_type = 'l1' # L1 or L2
)
videos = torch.randn(1, 3, 5, 32, 32) # video (batch, channels, frames, height, width) - normalized from -1 to +1
loss = diffusion(videos)
loss.backward()
# after a lot of training
sampled_videos = diffusion.sample(batch_size = 4)
sampled_videos.shape # (4, 3, 5, 32, 32)
```
For conditioning on text, they derived text embeddings by first passing the tokenized text through BERT-large. Then you just have to train it like so
```python
import torch
from video_diffusion_pytorch import Unet3D, GaussianDiffusion
model = Unet3D(
dim = 64,
cond_dim = 64,
dim_mults = (1, 2, 4, 8)
)
diffusion = GaussianDiffusion(
model,
image_size = 32,
num_frames = 5,
timesteps = 1000, # number of steps
loss_type = 'l1' # L1 or L2
)
videos = torch.randn(2, 3, 5, 32, 32) # video (batch, channels, frames, height, width)
text = torch.randn(2, 64) # assume output of BERT-large has dimension of 64
loss = diffusion(videos, cond = text)
loss.backward()
# after a lot of training
sampled_videos = diffusion.sample(cond = text)
sampled_videos.shape # (2, 3, 5, 32, 32)
```
You can also directly pass in the descriptions of the video as strings, if you plan on using BERT-base for text conditioning
```python
import torch
from video_diffusion_pytorch import Unet3D, GaussianDiffusion
model = Unet3D(
dim = 64,
use_bert_text_cond = True, # this must be set to True to auto-use the bert model dimensions
dim_mults = (1, 2, 4, 8),
)
diffusion = GaussianDiffusion(
model,
image_size = 32, # height and width of frames
num_frames = 5, # number of video frames
timesteps = 1000, # number of steps
loss_type = 'l1' # L1 or L2
)
videos = torch.randn(3, 3, 5, 32, 32) # video (batch, channels, frames, height, width)
text = [
'a whale breaching from afar',
'young girl blowing out candles on her birthday cake',
'fireworks with blue and green sparkles'
]
loss = diffusion(videos, cond = text)
loss.backward()
# after a lot of training
sampled_videos = diffusion.sample(cond = text, cond_scale = 2)
sampled_videos.shape # (3, 3, 5, 32, 32)
```
## Training
This repository also contains a handy `Trainer` class for training on a folder of `gifs`. Each `gif` must be of the correct dimensions `image_size` and `num_frames`.
```python
import torch
from video_diffusion_pytorch import Unet3D, GaussianDiffusion, Trainer
model = Unet3D(
dim = 64,
dim_mults = (1, 2, 4, 8),
)
diffusion = GaussianDiffusion(
model,
image_size = 64,
num_frames = 10,
timesteps = 1000, # number of steps
loss_type = 'l1' # L1 or L2
).cuda()
trainer = Trainer(
diffusion,
'./data', # this folder path needs to contain all your training data, as .gif files, of correct image size and number of frames
train_batch_size = 32,
train_lr = 1e-4,
save_and_sample_every = 1000,
train_num_steps = 700000, # total training steps
gradient_accumulate_every = 2, # gradient accumulation steps
ema_decay = 0.995, # exponential moving average decay
amp = True # turn on mixed precision
)
trainer.train()
```
Sample videos (as `gif` files) will be saved to `./results` periodically, as are the diffusion model parameters.
## Co-training Images and Video
One of the claims in the paper is that by doing factored space-time attention, one can force the network to attend on the present for training images and video in conjunction, leading to better results.
It was not clear how they achieved this, but I furthered a guess.
To arrest attention to the present moment for a certain percentage of batch videos samples, simply pass `prob_focus_present = <prob>` on the diffusion forward method
```python
loss = diffusion(videos, cond = text, prob_focus_present = 0.5) # for 50% of videos, focus on the present during training
loss.backward()
```
If you have a better idea how this is done, just open a github issue.
## Todo
- [x] wire up text conditioning, use classifier free guidance
- [x] relative positional encodings in attention (space and time) - use T5 relative positional bias instead of what they used
- [x] add a forward keyword argument that arrests attention across time (as reported / claimed in the paper, this type of image + video simultaneous training improves results)
- [x] consider doing a 3d version of CLIP, so one can eventually apply the lessons of DALL-E2 to video https://github.com/lucidrains/dalle2-video
- [x] offer way for Trainer to curtail or pad frames, if gif is too long
- [ ] find a good torchvideo-like library (torchvideo seems immature) for training on fireworks
- [ ] project text into 4-8 tokens, and use them as memory key / values to condition both time and space in attention blocks
- [ ] prepare a jax version for large scale TPU training
- [ ] have Trainer take care of conditional video synthesis, with text offered as corresponding {video_filename}.txt within the same folder
- [ ] see if ffcv or squirrel-core is a good fit
- [ ] bring in token shifts, along time and space
## Citations
```bibtex
@misc{ho2022video,
title = {Video Diffusion Models},
author = {Jonathan Ho and Tim Salimans and Alexey Gritsenko and William Chan and Mohammad Norouzi and David J. Fleet},
year = {2022},
eprint = {2204.03458},
archivePrefix = {arXiv},
primaryClass = {cs.CV}
}
```
```bibtex
@misc{Saharia2022,
title = {Imagen: unprecedented photorealism × deep level of language understanding},
author = {Chitwan Saharia*, William Chan*, Saurabh Saxena†, Lala Li†, Jay Whang†, Emily Denton, Seyed Kamyar Seyed Ghasemipour, Burcu Karagol Ayan, S. Sara Mahdavi, Rapha Gontijo Lopes, Tim Salimans, Jonathan Ho†, David Fleet†, Mohammad Norouzi*},
year = {2022}
}
```
| Implementation of Video Diffusion Models, Jonathan Ho's new paper extending DDPMs to Video Generation - in Pytorch | artificial-intelligence,deep-learning,ddpm,video-generation,text-to-video | 57 | 3 | 3 | 87 | 26 | 1 | 1 |
gloriasoft/veaury | <div align=center>
<img src="https://github.com/devilwjp/VueReact/assets/38802722/dd7ccd14-4e02-4f4c-bf59-bc0f95088d82"/>
</div>
<h1 align=center>Veaury</h1>
<h2 align=center>Use React in Vue3 and Vue3 in React, And as perfect as possible!</h2>
<p align="center">
<a href="https://coveralls.io/github/devilwjp/veaury?branch=master"><img src="https://coveralls.io/repos/github/devilwjp/veaury/badge.svg?branch=master" alt="Coverage Status"></a>
<a href="https://www.npmjs.com/package/veaury"><img src="https://img.shields.io/npm/v/veaury" alt="Version"></a>
<a href="https://npmcharts.com/compare/veaury?minimal=true"><img src="https://img.shields.io/npm/dm/veaury" alt="Downloads"></a>
<a href="https://www.npmjs.com/package/veaury"><img src="https://img.shields.io/bundlephobia/minzip/veaury" alt="Size"></a>
</p>
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
- [商业合作](#%E5%95%86%E4%B8%9A%E5%90%88%E4%BD%9C)
- [What is Veaury?](#what-is-veaury)
- [The greatest feature](#the-greatest-feature)
- [Legacy](#legacy)
- [Latest documentation](#latest-documentation)
- [Use cases](#use-cases)
- [Installation](#installation)
- [Do you want to preconfigure your project in advance?](#do-you-want-to-preconfigure-your-project-in-advance)
- [Webpack](#webpack)
- [Vite](#vite)
- [Usage](#usage)
- [Vue in React - Basic usage](#vue-in-react---basic-usage)
- [React in Vue - Basic usage](#react-in-vue---basic-usage)
- [Vue in React - Usage of events](#vue-in-react---usage-of-events)
- [React in Vue - Usage of events](#react-in-vue---usage-of-events)
- [Vue in React - Usage of slots](#vue-in-react---usage-of-slots)
- [React in Vue - Usage of render props and React node](#react-in-vue---usage-of-render-props-and-react-node)
- [Context](#context)
- [Vue in React - Usage of Provider / useContext](#vue-in-react---usage-of-provider--usecontext)
- [React in Vue - Usage of Provide / Inject](#react-in-vue---usage-of-provide--inject)
- [Usage of VueContainer in React Component](#usage-of-vuecontainer-in-react-component)
- [Usage of getVNode](#usage-of-getvnode)
- [Usage of getReactNode](#usage-of-getreactnode)
- [Usage of RenderReactNode](#usage-of-renderreactnode)
- [Vue in React, Usage of v-model / v-models](#vue-in-react-usage-of-v-model--v-models)
- [Option useInjectPropsFromWrapper](#option-useinjectpropsfromwrapper)
- [Usage of injecting React hooks in Vue component](#usage-of-injecting-react-hooks-in-vue-component)
- [Usage of injecting Vue hooks in React component](#usage-of-injecting-vue-hooks-in-react-component)
- [Crossing provider](#crossing-provider)
- [Usage of createCrossingProviderForVueInReact](#usage-of-createcrossingproviderforvueinreact)
- [Usage of createCrossingProviderForReactInVue](#usage-of-createcrossingproviderforreactinvue)
- [ReactMissVue](#reactmissvue)
- [Usage of createReactMissVue](#usage-of-createreactmissvue)
- [Usage of lazyReactInVue](#usage-of-lazyreactinvue)
- [Usage of lazyVueInReact](#usage-of-lazyvueinreact)
- [Usage of getting ref](#usage-of-getting-ref)
- [Typescript JSX types conflict caused by Vue and React at the same time.](#typescript-jsx-types-conflict-caused-by-vue-and-react-at-the-same-time)
- [Development Setup](#development-setup)
- [Project Structure](#project-structure)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## 商业合作
正在寻求商业合作的可能性(wechat: devilwjp_new / QQ: 9700616)
- 帮助您的项目做兼容和迁移
- 帮助您vue或react的组件库,同时存在另一种技术栈版本
- 帮助您的sdk同时具备支持vue和react的项目
- 开源的是免费版,可为企业和个人提供定制版需求
## What is Veaury?
Veaury (pronounced /ˈvjuːri/, inspired by 'beauty') is a tool library.
It is built on the Vue and React framework. It's use cases include using both Vue and React in one app, migrating from React to Vue or from Vue to React, and using third-party Vue and React Components, such as `antd`, `element-ui`, `vuetify`.
## The greatest feature
- 🌞 Support Vue3
- 🌈 Support Context - Share the context of all vue and react components.
- 💗 Support for using hooks across frameworks - You can use React's hooks in a Vue component, or you can use Vue's 'setup' function in a React component and use Vue's hooks in this function.
- 🪂 Pure mode - The children of the converted component no longer have an extra element container. [>>learn more about how the pure mode works](https://github.com/devilwjp/veaury/blob/master/pure_mode.md)
## Legacy
The perfect [tool library](https://github.com/devilwjp/vuereact-combined) which can use React in Vue2 and Vue2 in React.
## Latest documentation
View the latest [documentation](https://github.com/devilwjp/veaury#readme)
[中文文档](https://github.com/devilwjp/veaury/blob/master/README_zhcn.md)
## Use cases
- 👨👩👧 Using both Vue and React in one app
- 🏃 Migrating from React to Vue or from Vue to React
- 📲 Using third-party Vue and React Components, such as `antd`, `element-ui`, `vuetify`
## Installation
```sh
# Install with yarn:
$ yarn add veaury
# or with npm:
$ npm i veaury -S
```
## Do you want to preconfigure your project in advance?
In theory, you don't need to do additional configuration in a React project to support Vue, nor do you need to do additional configuration in a Vue project to support React.
If the React or Vue component you want to convert comes from a npm package, or has already been built (Not a direct vue file and does not contain jsx), you can use `applyPureReactInVue` or `applyVueInReact` directly.
If you need to develop both Vue and React in a project, instead of just using an existing npm component (There are both .vue files and react jsx files in a project source code), then you should do some configuration.
### Webpack
[How to configure React in the Vue project from '@vue/cli' ](https://github.com/devilwjp/veaury/tree/master/dev-project-vue3)
[How to configure Vue in the React project from 'create-react-app' ](https://github.com/devilwjp/veaury/tree/master/dev-project-react)
### Vite
If it is a project built by `vite`, the relevant configuration is as follows.
First install `@vitejs/plugin-react`, `@vitejs/plugin-vue` and `@vitejs/plugin-vue-jsx`.
+ The main project is Vue:
```js
import { defineConfig } from 'vite'
// >= veaury@2.1.1
import veauryVitePlugins from 'veaury/vite/index.js'
// if vite 6, should use `veaury/vite/esm`
// import veauryVitePlugins from 'veaury/vite/esm'
export default defineConfig({
plugins: [
// Turn off vue and vuejsx plugins
// vue(),
// vueJsx(),
// When the type of veauryVitePlugins is set to vue,
// only jsx in files in the directory named 'react_app' will be parsed with react jsx,
// and jsx in other files will be parsed with vue jsx
veauryVitePlugins({
type: 'vue',
// Configuration of @vitejs/plugin-vue
// vueOptions: {...},
// Configuration of @vitejs/plugin-react
// reactOptions: {...},
// Configuration of @vitejs/plugin-vue-jsx
// vueJsxOptions: {...}
})
]
})
```
+ The main project is React:
```js
import { defineConfig } from 'vite'
// >= veaury@2.1.1
import veauryVitePlugins from 'veaury/vite/index.js'
export default defineConfig({
plugins: [
// Turn off react plugin
// react(),
// When the type of veauryVitePlugins is set to react,
// only jsx in .vue file will be parsed with vue jsx,
// jsx in other files will be parsed with react jsx
veauryVitePlugins({
type: 'react',
// Configuration of @vitejs/plugin-vue
// vueOptions: {...},
// Configuration of @vitejs/plugin-react
// reactOptions: {...},
// Configuration of @vitejs/plugin-vue-jsx
// vueJsxOptions: {...}
})
]
})
```
If you want to customize the compilation scope of vueJsx, you can configure overrides by setting type to `custom`.
```js
import { defineConfig } from 'vite'
// >= veaury@2.1.1
import veauryVitePlugins from 'veaury/vite/index.js'
export default defineConfig({
plugins: [
veauryVitePlugins({
type: 'custom',
// The jsx in .vue files and in the directory named 'vue_app' will be parsed with vue jsx.
vueJsxInclude: [/vue&type=script&lang\.[tj]sx$/i, /vue&type=script&setup=true&lang\.[tj]sx$/i, /[/\\]vue_app[\\/][\w\W]+\.[tj]sx$/],
// vueJsxExclude: [],
// Configuration of @vitejs/plugin-vue
// vueOptions: {...},
// Configuration of @vitejs/plugin-react
// reactOptions: {...},
// Configuration of @vitejs/plugin-vue-jsx
// vueJsxOptions: {...}
})
]
})
```
## Usage
### Vue in React - Basic usage
```jsx
import {applyVueInReact, applyPureVueInReact} from 'veaury'
// This is a Vue component
import BasicVueComponent from './Basic.vue'
import {useState} from 'react'
// Use HOC 'applyVueInReact'
const BasicWithNormal = applyVueInReact(BasicVueComponent)
// Use HOC 'applyPureVueInReact'
const BasicWithPure = applyPureVueInReact(BasicVueComponent)
export default function () {
const [foo] = useState('Hello!')
return <>
<BasicWithNormal foo={foo}>
<div>
the default slot
</div>
</BasicWithNormal>
<BasicWithPure foo={foo}>
<div>
the default slot
</div>
</BasicWithPure>
</>
}
```
### React in Vue - Basic usage
`applyPureReactInVue` is recommended.
[Learn about the difference between `applyPureReactInVue` and `applyReactInVue`.](https://github.com/devilwjp/veaury/blob/master/pure_mode.md)
```vue
<template>
<BasicPure :foo="foo">
<div>
the children
</div>
</BasicPure>
</template>
<script>
import {applyReactInVue, applyPureReactInVue} from 'veaury'
// This is a React component
import BasicReactComponent from './react_app/Basic.jsx'
import {ref} from 'vue'
export default {
components: {
// Use HOC 'applyReactInVue' or 'applyPureReactInVue'
Basic: applyReactInVue(BasicReactComponent),
BasicPure: applyPureReactInVue(BasicReactComponent)
},
setup() {
return {
foo: ref('Hello!')
}
}
}
</script>
```
> [!NOTE]
>
> When using `applyPureReactInVue` or `applyReactInVue` to perform two-way binding on some react components, if the values are modified frequently, the modification may not be timely.
>
> Veury provides a method `injectSyncUpdateForPureReactInVue` to solve this problem
>
> [>> The related issue](https://github.com/devilwjp/veaury/issues/119)
Let's see an example.
(React component Input.js)
```jsx
import React from 'react'
export default function Input(props) {
return <input value={props.value} onChange={props.onChange}/>
}
```
(Vue page Example.vue)
```vue
<template>
<SimpleInput :value="value" @change="value = $event.target.value"/>
</template>
<script setup>
import { applyPureReactInVue, injectSyncUpdateForPureReactInVue} from 'veaury'
import ReactSimpleInput from "./Input";
// The component only needs to be injected globally once. If injected multiple times, it is equivalent to appending and overwriting function hooks.
injectSyncUpdateForPureReactInVue(ReactSimpleInput, {
// The name of the hook function that determines the content update of the Input component
onChange(args) {
return {
value: args.target.value
}
}
})
const SimpleInput = applyPureReactInVue(ReactSimpleInput)
const value = ref("");
</script>
```
### Vue in React - Usage of events
```jsx
import {applyVueInReact} from 'veaury'
import BasicVue from './Basic.vue'
import {useState} from 'react'
const Basic = applyVueInReact(BasicVue)
export default function () {
function onClickForVue() {
console.log('clicked!')
}
return <div>
{/*Trigger with $emit('click') in Vue component*/}
<Basic onClick={onClickForVue}/>
</div>
}
```
### React in Vue - Usage of events
```vue
<template>
<!-- Trigger with 'props.onClick()' in React component -->
<ReactButton @click="onClickForReact"/>
</template>
<script>
import {ref} from 'vue'
import {applyPureReactInVue} from 'veaury'
// This is a React Component
import ReactButton from "./react_app/Button.jsx"
export default {
components: {
ReactButton: applyPureReactInVue(ReactButton)
},
setup() {
function onClickForReact() {
console.log('clicked!')
}
return {
onClickForReact,
}
}
}
</script>
```
### Vue in React - Usage of slots
The usage of 'slots' is similar to the usage of 'v-slots' of Vue's jsx.
```jsx
import {applyVueInReact} from 'veaury'
import BasicVue from './Basic.vue'
const Basic = applyVueInReact(BasicVue)
export default function () {
const vSlots = {
// Render with '<slot name="slot1" />' in Vue Component
slot1: <div>this is slot1(namedSlot)</div>,
// Render with '<slot name="slot2" value="xxxxxx"/>' in Vue Component
slot2: ({value}) => <div>this is slot2(scopedSlot), and receive value: {value}</div>,
// Render with '<slot/>' in Vue Component
default: <div>this is children</div>
}
return <div>
{/*just send children*/}
<Basic>
{/* Render with '<slot/>' in Vue Component */}
<div>this is children</div>
</Basic>
{/*send v-slots*/}
<Basic v-slots={vSlots}/>
{/*another usage*/}
<Basic>
{vSlots}
</Basic>
</div>
}
```
### React in Vue - Usage of render props and React node
Named slots & scoped slots of Vue = React render props.
Default slots $ children of Vue = React props.children.
A named slot has a name prefixed with `node:` = React Node
```vue
<template>
<Basic>
<!-- Render with 'props.slot1()' in React component -->
<template v-slot:slot1>
<div>
this is slot1 (render props)
</div>
</template>
<!-- Render with 'props.slot2("xxxxx")' in React component -->
<template v-slot:slot2="bar">
<div>
this is slot2 (render props)<br/>
this content is passed from React: {{bar}}
</div>
</template>
<!-- Render with 'props.slot3' in React component -->
<template v-slot:node:slot3>
<div>
this is slot3 (react node)
</div>
</template>
<!-- Render with 'props.children' in React component -->
<div>
this is children (react node)
</div>
</Basic>
</template>
<script>
import {applyPureReactInVue} from 'veaury'
// This is a React Component
import ReactBasic from "./react_app/Slots.jsx"
export default {
components: {
Basic: applyPureReactInVue(ReactBasic)
}
}
</script>
```
### Context
Veaury will judge that if there is a wrapper layer of the same framework in the outer layer, Veaury will use React's `Portal` and Vue's `Teleport` instead of creating a new application instance every time.
It's a really awesome! Veaury can well pass the root node context to the child nodes, regardless of whether the node is wrapped or not.
This means that a Vue component used a React component, and then this React component used another Vue subcomponent. This Vue subcomponent can get the context of the outer Vue component.
#### Vue in React - Usage of Provider / useContext
```jsx
import {applyVueInReact} from 'veaury'
import BasicVue from './Basic.vue'
import {createContext, useContext} from 'react'
const Basic = applyVueInReact(BasicVue)
// Create React context object
const Context = createContext({})
function SubReactComponent() {
// Get context value
const {bossName} = useContext(Context)
return <div className="slot">bossName from Context: {bossName}</div>
}
export default function () {
// Set context value
return <Context.Provider value={{bossName: 'God'}}>
<Basic>
{/* This React component can get the context value from 'Provider' */}
<SubReactComponent/>
</Basic>
</Context.Provider>
}
```
#### React in Vue - Usage of Provide / Inject
```vue
<template>
<Basic>
<!-- This Vue component can get the injection value from 'provide' -->
<SubVueComponent/>
</Basic>
</template>
<script>
import {provide, inject, h} from 'vue'
import {applyPureReactInVue} from 'veaury'
// This is a React component
import ReactBasic from "./react_app/Basic"
// This is a Vue component
const SubVueComponent = {
setup() {
// get bossName from injection
const bossName = inject('bossName')
return h('div', () => bossName)
}
}
export default {
components: {
Basic: applyPureReactInVue(ReactBasic),
SubVueComponent
},
setup() {
// Use 'provide' to set the value of bossName
provide('bossName', 'God')
}
}
</script>
```
### Usage of VueContainer in React Component
You can use the `VueContainer` component in a React component to display Vue components directly.
When React components in Vue components, `VueContainer` can display global Vue components registered in the upper-level Vue app.
```jsx
import {VueContainer} from "veaury"
import BasicVue from './Basic.vue'
export default function ReactComponent() {
const passedProps = {
name: 'Mike'
}
// Render '<router-view>' if 'vue-router' exists, You can use '<VueContainer component="RouterView"/>'
return <VueContainer component={BasicVue} {...passedProps}/>
}
```
`VueContainer` can also render VNodes.
```jsx
import {VueContainer} from "veaury"
import {h} from 'vue'
const VNode = h('div', null, () => 'This is a VNode')
export default function ReactComponent() {
return <VueContainer node={VNode}/>
}
```
### Usage of getVNode
VNode = `getVNode`(ReactNode)
In most cases, vue components follow the SFC specification, but you can also create vue components in other ways, such as `h` or jsx, which may get VNode through properties.
When passing a property of type VNode to a vue component in react, you can use `getVNode`.
```jsx
import { applyVueInReact, getVNode } from 'veaury'
import AAVue from './AA.vue'
const AA = applyVueInReact(AAVue)
const VNodeBar = getVNode(
<div style={{background: '#105a31', marginTop: '5px', color: 'white'}}>
<div>rendered with a property</div>
<div>This is Bar's VNode</div>
</div>
)
export default function ReactComponent () {
// `VNodeBar` is a property of type VNode, so use getVNode to convert reactNode to VNode.
return <AA VNodeBar={VNodeBar}/>
}
```
### Usage of getReactNode
ReactNode = `getReactNode`(VNode)
Sometimes the property of the react component is a complex data structure, which contains ReactNode, and in the vue file, the definition of jsx will be compiled into vue's jsx.
```vue
<template>
<AA :prop1="propForReact"/>
</template>
<script setup lang="jsx">
import { getReactNode, applyPureReactInVue } from 'veaury'
import AAReact from './react_app/AA.jsx'
const AA = applyPureReactInVue(AAReact)
const propForReact = {
foo: 'Mike',
bar: [{
body: getReactNode(<div>John</div>)
}],
render: (name) => getReactNode(<div>{name}</div>)
}
</script>
```
### Usage of RenderReactNode
Sometimes the input parameter of the render props of the react component is ReactNode.
`RenderReactNode` is a vue component that accepts a `node` parameter and can render ReactNode in a Vue component.
```vue
<template>
<AA>
<template v-slot:prop2="itemReactNode">
<RenderReactNode :node="itemReactNode"/>
</template>
</AA>
</template>
<script setup>
import { RenderReactNode, applyPureReactInVue } from 'veaury'
import AAReact from './react_app/AA.jsx'
const AA = applyPureReactInVue(AAReact)
</script>
```
### Vue in React, Usage of v-model / v-models
The usage of 'v-model' is similar to the usage of 'v-model' of Vue's jsx.
The value type of the `v-model` property should be
`[ modelValue, modelSetter, argumentKey, argumentModifiers ]`
`[ modelValue, modelSetter, argumentModifiers ]`
`[ modelValue, modelSetter ]`
Additional 'argumentKey' attached property, such as `v-model-god={[godValue, setGodValue]}` = `v-model={[godValue, setGodValue, 'god']}`
```typescript
// types
type modelValue = any
type modelSetter = (newValue) => void
type argumentKey = string
type argumentModifiers = string[]
```
```jsx
import {applyVueInReact} from 'veaury'
import BasicVue from './Basic.vue'
import Basic1Vue from './Basic1.vue'
import {useState} from 'react'
const Basic = applyVueInReact(BasicVue)
const Basic1 = applyVueInReact(Basic1Vue)
export default function () {
const [foo, setFoo] = useState(Math.random())
const [bar, setBar] = useState(Math.random())
const [zoo, setZoo] = useState(Math.random())
return <div>
<Basic v-model={[foo, setFoo]} v-model-bar={[bar, setBar]} />
{/*<Basic1 v-model={[zoo, setZoo, 'zoo']}/>*/}
{/*<Basic1 v-model={[zoo, setZoo, 'zoo', ['number']]}/>*/}
{/*<Basic1 v-model-zoo={[zoo, setZoo, ['number']]}/>*/}
<Basic1 v-models={{
// The key value of 'modelValue' is equivalent to 'v-model'
modelValue: [zoo, setZoo],
//...otherModels
}} />
</div>
}
```
### Option useInjectPropsFromWrapper
`useInjectPropsFromWrapper` is an option to `applyReactInVue` and `applyVueInReact`.
When developing Vue and React applications at the same time, sometimes it is necessary to obtain the context of the React app inside the Vue component, and vice versa.
For example, to get information from `react-router` in Vue components, or to get state from `vuex` in React components.
#### Usage of injecting React hooks in Vue component
React application uses Vue component, example to get `react-router` inside Vue component.
```vue
<template>
<div class="vue-component">
<h3>This is the Vue Component.</h3>
the path info from 'react-router': <span style="font-weight: bold">{{fullPath}}</span><br/><br/>
<button @click="changeQuery">change query</button>
</div>
</template>
<script>
import { computed } from 'vue'
export default {
props: ['reactRouter'],
// do not destructure props
setup(props) {
function changeQuery() {
props.reactRouter?.navigate(`?a=${Math.random()}`, {replace: true})
}
const fullPath = computed(() => {
const { location } = props.reactRouter || {}
return location?.pathname + location?.search
})
return {
fullPath,
changeQuery
}
}
}
</script>
```
Use `applyVueInReact` to wrap the above Vue component into a React component, and pass in `react-router`
```js
import { applyVueInReact } from 'veaury'
import { useLocation, useNavigate } from 'react-router-dom'
import AboveVueComponent from './AboveVueComponent'
export default applyVueInReact(AboveVueComponent, {
useInjectPropsFromWrapper(reactProps) {
// React hooks can be used in this function
// Use the hooks of react-router-dom
const location = useLocation()
const navigate = useNavigate()
// The returned object will be passed to the Vue component as props
return {
reactRouter: {
navigate,
location
}
}
}
})
```
#### Usage of injecting Vue hooks in React component
Vue application uses React component, example to get `vue-router` and `vuex` inside React component.
There are two modes for injecting functions, 'setup' and 'computed' modes.
```jsx
import React from 'react'
import {toRef} from 'vue'
import {useStore} from 'vuex'
import {useRoute, useRouter} from 'vue-router'
import {applyPureReactInVue} from 'veaury'
// This React component will be used in the Vue app and needs to use the vue-router and vuex hooks
// setup mode
function VueInjectionHookInSetupMode(vueProps) {
// Vue hooks can be used in this function
// This function will be called in the 'setup' hook of the Vue wrapper component
const store = useStore()
const route = useRoute()
const router = useRouter()
// The returned object will be passed to the React component as props
return {
// you need to manually convert to proxy with 'setup' mode
// otherwise it will not be responsive
fullPath: toRef(route, 'fullPath'),
count: toRef(store.state, 'count'),
changeQuery: () => router.replace({
query: {
a: Math.random()
}
}),
incrementCount: () => store.dispatch('increment')
}
}
// computed mode
function VueInjectionHookInComputedMode(vueProps) {
// The context of the function is binding with the proxy from the 'getCurrentInstance' hook
// Returning a function represents the computed of the options api
// All logic code should be written in this computed function.
// The lifecycle cannot be used in this function. If you want to use the lifecycle, you can only use the 'setup' mode
return function computedFunction() {
return {
fullPath: this.$route.fullPath,
count: this.$store.state.count,
changeQuery: () => this.$router.replace({
query: {
a: Math.random()
}
}),
incrementCount: () => this.$store.dispatch('increment')
}
}
}
function ReactComponent (props) {
return (<div>
This is the React Component
<span>
the path info from 'vue-router': <span style={{fontWeight: 'bold'}}>{props.fullPath}</span><br/>
the count from 'vuex': <span style={{fontWeight: 'bold'}}>{props.count}</span>
</span><br/>
<button onClick={props.changeQuery}>change query</button> <button onClick={props.incrementCount}>increment count</button>
</div>)
}
// Vue's injection function has two modes: 'setup' and 'computed'.
// Refer to the case of the above two injection function types.
// Also try replacing the option injectPropsFromWrapper with 'VueInjectionHookInComputedMode'
export default applyPureReactInVue(ReactComponent, {
useInjectPropsFromWrapper: VueInjectionHookInSetupMode
})
```
### Crossing provider
Although it is possible to use hooks from another framework via `useInjectPropsFromWrapper` and get them via properties, but in most cases, it is to get context type data, such as vue-router, react-router, redux, vuex, or another framework custom context.
Use `createCrossingProviderForReactInVue` and `createCrossingProviderForVueInReact` to create cross-frame providers, and components of another framework within the provider can get the context from this framework.
#### Usage of createCrossingProviderForVueInReact
Create a react-router provider and a vue hooks that can be executed in the setup function of the Vue component and get the react-router. (reactRouterCrossingProvider.js)
```jsx
// Create a Provider that can get react hooks
// This Provider will be exported as a react component,
// and all of the vue components in this Provider can get the status of react hooks
import { useLocation, useNavigate } from 'react-router-dom'
import { createCrossingProviderForVueInReact } from 'veaury'
// Execute 'useReactRouterForVue' in the setup function of the vue component to get the object returned by the incoming function
const [useReactRouterForVue, ReactRouterProviderForVue] = createCrossingProviderForVueInReact(
// This incoming function can execute react hooks
function() {
return {
location: useLocation(),
navigate: useNavigate()
}
}
)
export {
useReactRouterForVue,
ReactRouterProviderForVue
}
```
The vue component(Basic.vue) can get the context from the provider through the custom hook returned by `createCrossingProviderForVueInReact`.
```vue
<template>
<div class="vue-component">
<h3>This is the Vue Component.</h3>
the path info from 'react-router': <span style="font-weight: bold">{{pathname + search}}</span><br/><br/>
<button @click="changeQuery">change query</button>
</div>
</template>
<script>
import { useReactRouterForVue } from './reactRouterCrossingProvider'
import React from 'react'
export default {
setup() {
const { location, navigate } = useReactRouterForVue()
function changeQuery() {
navigate(`?a=${Math.random()}`, {replace: true})
}
return {
pathname: location.pathname,
search: location.search,
changeQuery
}
}
}
</script>
```
React components use the provider, so that all vue components (including internal components) in the provider can get the context of this provider through custom hooks.
```jsx
import {applyVueInReact} from 'veaury'
import BasicVue from './Basic.vue'
import { ReactRouterProviderForVue } from './reactRouterCrossingProvider'
const Basic = applyVueInReact(BasicVue)
export default function () {
return <ReactRouterProviderForVue>
<Basic/>
</ReactRouterProviderForVue>
}
```
#### Usage of createCrossingProviderForReactInVue
It is now recommended to use `createCrossingProviderForPureReactInVue` instead of `createCrossingProviderForReactInVue`.
Create a provider including vue-router and vuex and a React hooks that can be executed in the React function component and get the vue-router and vuex. (vueRouterAndVuexCrossingProvider.js)
```js
import {useStore} from 'vuex'
import {useRouter, useRoute} from 'vue-router'
import {createCrossingProviderForPureReactInVue} from 'veaury'
const [useVueHooksInReact, VueProviderForReact] = createCrossingProviderForPureReactInVue(function() {
return {
vuex: useStore(),
vueRoute: useRoute(),
vueRouter: useRouter()
}
})
export {
useVueHooksInReact,
VueProviderForReact
}
```
The React component(Basic.js) can get the context from the provider through the custom hook.
```jsx
import React from 'react'
import { useVueHooksInReact } from '../vueRouterAndVuexCrossingProvider'
export default function (props) {
const { vuex, vueRoute, vueRouter } = useVueHooksInReact()
function changeQuery() {
vueRouter.replace({
query: {
a: Math.random()
}
})
}
function incrementCount() {
vuex.dispatch('increment')
}
return (<div>
This is the React Component<br/>
<span>
the path info from 'vue-router': <span style={{fontWeight: 'bold'}}>{vueRoute.fullPath}</span><br/>
the count from 'vuex': <span style={{fontWeight: 'bold'}}>{vuex.state.count}</span>
</span><br/>
<button onClick={changeQuery}>change query</button> <button onClick={incrementCount}>increment count</button>
</div>)
}
```
Vue components use the provider, so that all React components (including internal components) in the provider can get the context of this provider through custom hooks.
```vue
<template>
<VueProviderForReact>
<Basic/>
</VueProviderForReact>
</template>
<script>
import { applyPureReactInVue } from 'veaury'
// This is a React Component
import ReactBasic from "./react_app/Basic"
import {VueProviderForReact} from "./vueRouterAndVuexCrossingProvider";
export default {
components: {
VueProviderForReact,
Basic: applyPureReactInVue(ReactBasic),
}
}
</script>
```
### ReactMissVue
Sometimes some features and plugins of Vue are really more useful than React, such as `beforeEach` of `vue-router`, and `pinia`.
So I implemented a factory function called `createReactMissVue` that returns a React provider component and a React hook.
With ReactMissVue, you can use Vue's plugins directly in React applications.
Enjoy it!
#### Usage of createReactMissVue
For detailed use cases, please refer to `dev-project-react/src/components/reactMissVue`
```jsx
import { defineStore, createPinia } from 'pinia'
import { createRouter, createWebHashHistory, useRouter, useRoute } from 'vue-router'
import { createReactMissVue, applyReactInVue, VueContainer } from 'veaury'
// create vue-router instance
const router = createRouter({
// Using vue-router inside route 'ReactMissVue'
history: createWebHashHistory('/#/ReactMissVue'),
routes: [
{
name: '',
path: '/aaa',
component: applyReactInVue(() => <div className="react-component">
react use vue-router<br/>
path: /aaa
</div>)
},
{
name: 'empty',
path: '/:default(.*)',
component: applyReactInVue(() => <div className="react-component">
react use vue-router<br/>
empty
</div>)
},
],
})
// create a pinia store
const useFooStore = defineStore({
id: 'foo',
state() {
return {
name: 'Eduardo'
}
},
actions: {
changeName(name) {
this.$patch({
name
})
}
}
})
// create a ReactMissVue instance
let [useReactMissVue, ReactMissVue, ReactMissVueContext] = createReactMissVue({
useVueInjection() {
// This object can be obtained by using useReactMissVue in the react component
return {
fooStore: useFooStore(),
vueRouter: useRouter(),
vueRoute: useRoute()
}
},
// beforeVueAppMount can only be used in the outermost ReactMissVue
// Because veaury will only create a vue application in the outermost layer
beforeVueAppMount(app) {
// register pinia
app.use(createPinia())
// register vue-router
app.use(router)
}
})
function Demo() {
const { fooStore } = useReactMissVue()
return <div>
<div>
Foo's name: {fooStore?.name}
</div>
{/* Use the global component router-view */}
<VueContainer component="RouterView"/>
</div>
}
export default function () {
return <ReactMissVue>
<Demo/>
</ReactMissVue>
}
```
### Usage of lazyReactInVue
It is now recommended to use `lazyPureReactInVue` instead of `lazyReactInVue`.
```vue
<template>
<Basic/>
</template>
<script>
import { lazyPureReactInVue } from 'veaury'
export default {
components: {
// import an async React component
// It is also possible to use the full parameter of the Vue3 API 'defineAsyncComponent'
// for example: lazyReactInVue({ loader: () => import('./react_app/Basic'), timeout: 3000 })
Basic: lazyPureReactInVue(() => import('./react_app/Basic'))
},
}
</script>
```
### Usage of lazyVueInReact
```jsx
import { lazyVueInReact, lazyPureVueInReact } from 'veaury'
const AsyncBasicWithNormal = lazyVueInReact(() => import('./Basic'))
const AsyncBasicWithPure = lazyPureVueInReact(() => import('./Basic'))
export default function () {
return <>
<AsyncBasicWithNormal/>
<AsyncBasicWithPure/>
</>
}
```
### Usage of getting ref
Get the React component's instance in the Vue Component.
```vue
<template>
<Basic ref="Basic">
<div ref="div">hello</div>
<AA ref="AA"/>
</Basic>
</template>
<script>
import { applyPureReactInVue } from 'veaury'
import BasicReact from './Basic.jsx'
import AAReact from './AA.jsx'
export default {
components: {
Basic: applyPureReactInVue(BasicReact),
AA: applyPureReactInVue(AAReact)
},
mounted() {
// Get the real react instance through `__veauryReactRef__`
console.log(this.$refs.Basic.__veauryReactRef__)
// If the converted react component or dom element is placed as a child node in a pure mode react component,
// the ref can be obtained directly
console.log(this.$refs.div)
console.log(this.$refs.AA)
}
}
</script>
```
Get the Vue component's instance in the React Component.
```jsx
import {applyVueInReact} from 'veaury'
import BasicVue from './Basic.vue'
import React, { createRef, useEffect } from "react"
const Basic = applyVueInReact(BasicVue)
export default function () {
const basicInstance = createRef(null)
useEffect(() => {
// Get the real vue instance through `__veauryVueRef__`
console.log(basicInstance.current.__veauryVueRef__)
}, [])
return <Basic ref={basicInstance}/>
}
```
## Typescript JSX types conflict caused by Vue and React at the same time.
> If you can ignore the TS error warning in the IDE, you can skip this chapter.
Vue(@vue/runtime-dom) and React(@types/react) both extend the type interface in the global namespace JSX, which will cause types conflicts.
For example, JSX.Element cannot extend ReactElement and VNode at the same time.
So if both Vue and React are installed in the project, it will cause TS error warning in JSX in IDE (such as vscode or webstorm) , but this will not affect the compilation of the development environment and production environment.
A working solution is to use `patch-package` to modify `@vue/runtime-dom/dist/runtime-dom.d.ts` and `@types/react/index.d.ts`, and make sure to set `compilerOptions.jsx` to `preserve` in tsconfig.json.
For example, the changes to these two files are as follows.
node_modules/@types/react/index.d.ts(@types/react@18.0.14)
```diff
diff --git a/node_modules/@types/react/index.d.ts b/node_modules/@types/react/index.d.ts
index 5c5d343..a850f38 100644
--- a/node_modules/@types/react/index.d.ts
+++ b/node_modules/@types/react/index.d.ts
@@ -3118,7 +3118,9 @@ type ReactManagedAttributes<C, P> = C extends { propTypes: infer T; defaultProps
declare global {
namespace JSX {
- interface Element extends React.ReactElement<any, any> { }
+ interface Element extends React.ReactElement<any, any> {
+ [k: string]: any
+ }
interface ElementClass extends React.Component<any> {
render(): React.ReactNode;
}
@@ -3133,8 +3135,12 @@ declare global {
: ReactManagedAttributes<T, P>
: ReactManagedAttributes<C, P>;
- interface IntrinsicAttributes extends React.Attributes { }
- interface IntrinsicClassAttributes<T> extends React.ClassAttributes<T> { }
+ interface IntrinsicAttributes extends React.Attributes {
+ [k: string]: any
+ }
+ interface IntrinsicClassAttributes<T> extends React.ClassAttributes<T> {
+ [k: string]: any
+ }
interface IntrinsicElements {
// HTML
```
node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts(@vue/runtime-dom@3.2.37)
```diff
diff --git a/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts b/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
index 3366f5a..b9eacc6 100644
--- a/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
+++ b/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts
@@ -1493,7 +1493,7 @@ type NativeElements = {
declare global {
namespace JSX {
- interface Element extends VNode {}
+ // interface Element extends VNode {}
interface ElementClass {
$props: {}
}
```
## Development Setup
The directories `dev-project-react` and `dev-project-vue3` in the project are the basic projects of the development environment of `veaury`, and they are also the two initial projects created by `create-react-app` and `@vue/cli` respectively.
> [!NOTE]
> In the `config/webpack.config.js` of the React project and the `vue.config.js` of the Vue project, you can uncomment the `veaury` in `alias` to develop the source code of `veaury`
> [!TIP]
> **Setup:** Run the command `npm run setup:yarn` or `npm run setup:npm` in the root directory of the main project to install the main project and two subprojects
> [!TIP]
> **Develop:** Run the commands `npm run dev:vue` and `npm run dev:react` in the root directory of the main project for development
> [!IMPORTANT]
> Introduction to other scripts in `package.json`
> `npm run build`: Build veaury to production.
> `build:vue`: Build the project `dev-project-vue3` to production.
> `build:react`: the project `dev-project-react` to production.
> `remotedev:vue`: Start the project `dev-project-vue3` to development (`veaury` is pointed to the dependency in node_modules.)
> `remotedev:react`: Start the project `dev-project-react` to development (`veaury` is pointed to the dependency in node_modules.)
> `remotebuild:vue`: Build the project `dev-project-vue3` to production (`veaury` is pointed to the dependency in node_modules.)
> `remotebuild:react`: Build the project `dev-project-react` to production (`veaury` is pointed to the dependency in node_modules.)
> `test`: Carry out testing
## Project Structure
- `babel`: contains babel presets for projects built via webpack to solve the problem of compiling both vue and react type jsx.
- See [How to configure React in the Vue project from '@vue/cli' ](https://github.com/devilwjp/veaury/tree/master/dev-project-vue3) for more details on the babel preset.
- `dist`: contains built files for distribution. Note this directory is only updated when a release happens; they do not reflect the latest changes in development branches.
- `types`: contains TypeScript type definitions.
- `vite`: contains plugins for projects built with vite to solve the problem of compiling vue and react at the same time.
- `webpack`: contains webpack plugins for projects built via webpack to solve the problem of compiling vue and react at the same time.
- See [How to configure Vue in the React project from 'create-react-app' ](https://github.com/devilwjp/veaury/tree/master/dev-project-react) for more details on the webpack plugin.
- `src`: contains the source code.
| Use React in Vue3 and Vue3 in React, And as perfect as possible! | vue3,vue,react,veaury,vuereact-combined | 41 | 4 | 6 | 559 | 15 | 13 | 0 |
Crequency/KitX |
<p align="center">
<a href="https://kitx.apps.catrol.cn/" target="_blank" rel="noopener noreferrer">
<img width="128" src="https://github.com/Crequency/KitX/assets/50760269/d2f5ee3b-5e01-49d7-ae69-19318a74b8c2" alt="KitX Logo">
</a>
</p>
<br>
<p align="center">
Docs website: <a href="https://kitx.docs.catrol.cn/en/">English</a> | <a href="https://kitx.docs.catrol.cn/">简体中文</a>
🌐
</p>
<br>
<p align="center">
<a href="https://github.com/Crequency/KitX/actions/workflows/build.yml"><img src="https://img.shields.io/github/actions/workflow/status/Crequency/KitX/build.yml?branch=main&label=Build%20Universal" alt="Build Universal"></a>
<a href="https://github.com/Crequency/KitX/actions/workflows/build-loaders.yml"><img src="https://img.shields.io/github/actions/workflow/status/Crequency/KitX/build-loaders.yml?branch=main&label=Build%20Loaders" alt="Build Loaders"></a>
<a href="https://github.com/Crequency/KitX/actions/workflows/build-plugins.yml"><img src="https://img.shields.io/github/actions/workflow/status/Crequency/KitX/build-plugins.yml?branch=main&label=Build%20Plugins" alt="Build Plugins"></a>
</p>
<p align="center">
<a href="./LICENSE"><img src="https://img.shields.io/github/license/Crequency/KitX" alt="License"></a>
<a href="https://github.com/Crequency/KitX/releases"><img src="https://img.shields.io/github/downloads/Crequency/KitX/total?color=%239F7AEA" alt="Release Downloads"></a>
<a href="#"><img src="https://img.shields.io/github/repo-size/Crequency/KitX?color=%234682B4" alt="GitHub Repo Size"></a>
<a href="#"><img src="https://img.shields.io/github/languages/code-size/Crequency/KitX" alt="Code Size"></a>
<a href="https://github.com/Crequency/KitX/commits/"><img src="https://img.shields.io/github/commit-activity/m/Crequency/KitX" alt="Commit Activity"></a>
</p>
<p align="center">
<a href="https://github.com/Crequency/KitX/network/members"><img src="https://img.shields.io/github/forks/Crequency/KitX?style=social" alt="Forks"></a>
<a href="https://github.com/Crequency/KitX/stargazers"><img src="https://img.shields.io/github/stars/Crequency/KitX?style=social" alt="Stars"></a>
<a href="https://github.com/Crequency/KitX/watchers"><img src="https://img.shields.io/github/watchers/Crequency/KitX?style=social" alt="Watches"></a>
<a href="https://github.com/Crequency/KitX/discussions"><img src="https://img.shields.io/github/discussions/Crequency/KitX?style=social" alt="Discussions"></a>
</p>
<p align="center">
<img src="https://profile-counter.glitch.me/Crequency-KitX/count.svg"></img>
</p>
<!--
![ScreenShot of About View](https://raw.githubusercontent.com/Dynesshely/SmallStorge/master/Crequency-KitX/screenshot_about.png)
<br>
<details>
<summary>More Screenshots</summary>
<br>
![ScreenShot of About View](https://raw.githubusercontent.com/Dynesshely/SmallStorge/master/Crequency-KitX/screenshot_plugins.png)
![ScreenShot of About View](https://raw.githubusercontent.com/Dynesshely/SmallStorge/master/Crequency-KitX/screenshot_devices.png)
![ScreenShot of About View](https://raw.githubusercontent.com/Dynesshely/SmallStorge/master/Crequency-KitX/screenshot_update.png)
</details>
<br>
-->
# About
> `KitX Project` is going to build a world that everything is connected.
KitX is an open, shared, connected and free tools platform.
After plugins developed by developers with their prefered languages and frameworks uploading to plugins market, users can download and combine plugins they like.
Every plugin contains atomized and platform independent functions, which will be connected with other functions by KitX.
For example:
0. KitX is running on user's all devices
1. User pressed `Ctrl + Alt + A` which has been assigned to 'Cast remote screenshot' function from plugin 'Screenshot'
2. This function asked KitX for a remote device and suspended to wait KitX's response
3. User selected device 'DESKTOP-Bedroom' and KitX returned user's selection to function above
4. Function then asked KitX to call 'Cast screenshot' function from plugin 'Screenshot' on device 'DESKTOP-Bedroom'
5. Remote returned a screenshot and displayed on user's current device by local plugin
# Architecture
KitX uses a three-layer design
```plaintext
Plugin <-> Loader \
\
Plugin <-> Loader <-> Dashboard <-> User
/
Plugin <-> Loader /
```
The third party is responsible for referring to the documentation to implement the interface that the Plugin should implement.
How to implement the different frameworks of each language and the Loaders chosen to implement are different.
Each language or framework will have a corresponding Loader to achieve interoperability with Plugin, and Loader communicates with Dashboard through Socket, reporting the situation and passing commands.
Each of these three-layer designs can be replaced, and any layer can be customized or a third-party solution can be used.
In this way, plug-ins on other devices in the LAN can also be connected to the current device, so LAN interconnection can be achieved.
## Requirements
| platforms | versions | x86 | arm | risc-v | mips | loongarch |
|-------------------------------------------------------------------------------------------|---------------------------------------------------|---------------|-----------------------------|--------|------|---------------------------------------------|
| ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) | 10, 11 | `x32` , `x64` | `arm` , `arm64` | :x: | :x: | :x: |
| ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) | - | `x64` | `arm` , `arm64` | :x: | :x: | `loongarch32 (ToDo)` , `loongarch64 (ToDo)` |
| ![MacOS](https://img.shields.io/badge/mac%20os-000000?logo=macos&logoColor=F0F0F0) | - | `x64` | `arm64` | :x: | :x: | :x: |
| ![Android](https://img.shields.io/badge/Android-3DDC84?logo=android&logoColor=white) | Android 5.0 + (min: 21, compiled: 33, target: 33) | `x64` | `armeabi-v7a` , `arm64-v8a` | :x: | :x: | :x: |
| ![iOS](https://img.shields.io/badge/iOS-000000?logo=ios&logoColor=white) | iOS 12.0 + | :x: | `arm64` | :x: | :x: | :x: |
| ![Raspberry Pi](https://img.shields.io/badge/-RaspberryPi-C51A4A?logo=Raspberry-Pi) | - | :x: | :x: | :x: | :x: | :x: |
| ![Browser](https://img.shields.io/badge/Browser-4285F4?logo=GoogleChrome&logoColor=white) | - | :x: | :x: | :x: | :x: | :x: |
# Development
> We strongly suggest you to configure your ssh environment,
> in order to use git link format like “git@github.com:Crequency/KitX.git”
> instead of "https://github.com/Crequency/KitX.git"
1. Get source code
```shell
git clone git@github.com:Crequency/KitX.git
cd KitX
```
2. Init submodules
```shell
git submodule update --init --recursive
```
3. Setup
```shell
cheese setup --reference
```
# Versions Roadmap
<br>
<details>
<summary>Deprecated Versions</summary>
<br>
| Version | Info | Code | Support | Term | Require | Runs on |
|-------------------------------------------------------------------------|---------|--------------------------|---------|--------------------------|--------------------|--------------------------------------------------------------------------------------|
| Beta_10016 | Beta | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| Beta_10213 | Beta | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| Beta_10235 | Beta | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.0.0](https://github.com/Crequency/KitX/releases/tag/v1.0.0) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.0.4](https://github.com/Crequency/KitX/releases/tag/v1.0.4) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.0.5](https://github.com/Crequency/KitX/releases/tag/v1.0.5) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.1.0](https://github.com/Crequency/KitX/releases/tag/v1.1.0) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.1.1](https://github.com/Crequency/KitX/releases/tag/v1.1.1-v1.1.5) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.1.2](https://github.com/Crequency/KitX/releases/tag/v1.1.1-v1.1.5) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.1.4](https://github.com/Crequency/KitX/releases/tag/v1.1.1-v1.1.5) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.1.5](https://github.com/Crequency/KitX/releases/tag/v1.1.1-v1.1.5) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.2.0](https://github.com/Crequency/KitX/releases/tag/v1.2.0) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.2.1](https://github.com/Crequency/KitX/releases/tag/v1.2.1) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.2.2](https://github.com/Crequency/KitX/releases/tag/v1.2.2) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.2.4](https://github.com/Crequency/KitX/releases/tag/v1.2.4-preview) | Preview | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.2.4](https://github.com/Crequency/KitX/releases/tag/v1.2.4) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.2.5](https://github.com/Crequency/KitX/releases/tag/v1.2.5) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.2.6](https://github.com/Crequency/KitX/releases/tag/v1.2.6) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v1.2.7](https://github.com/Crequency/KitX/releases/tag/v1.2.7) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v2.0.0](https://github.com/Crequency/KitX/releases/tag/v2.0.0) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v2.0.1](https://github.com/Crequency/KitX/releases/tag/v2.0.1) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v2.0.2](https://github.com/Crequency/KitX/releases/tag/v2.0.2) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v2.0.3](https://github.com/Crequency/KitX/releases/tag/v2.0.3) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v2.0.4](https://github.com/Crequency/KitX/releases/tag/v2.0.4) | Release | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
| [v2.0.5](https://github.com/Crequency/KitX/releases/tag/v2.0.5-preview) | Preview | This version has no code | :x: | This version has no term | .Net Framework 4.8 | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) |
</details>
<br>
| Version | Info | Code | Support | Term | Require | Runs on |
|-----------------------------------------------------------------------------------|---------|-----------|--------------------|--------------------|---------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [v3.0.6187.47831](https://github.com/Crequency/KitX/releases/tag/v3.0.6187.47831) | Preview | Fly | :x: | 2022.04 -> 2023.04 | `Desktop`: .Net 6 (Also Self-Contained) <br> `Mobile`: Native | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![MacOS](https://img.shields.io/badge/mac%20os-000000?logo=macos&logoColor=F0F0F0) |
| [v3.22.04.6230](https://github.com/Crequency/KitX/releases/tag/v3.22.04.6230) | Preview | Telegram | :x: | 2022.04 -> 2023.04 | `Desktop`: .Net 6 (Also Self-Contained) <br> `Mobile`: Native | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![MacOS](https://img.shields.io/badge/mac%20os-000000?logo=macos&logoColor=F0F0F0) |
| [v3.22.04.6235](https://github.com/Crequency/KitX/releases/tag/v3.22.04.6235) | Release | Break | :x: | 2022.04 -> 2023.04 | `Desktop`: .Net 6 (Also Self-Contained) <br> `Mobile`: Native | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![MacOS](https://img.shields.io/badge/mac%20os-000000?logo=macos&logoColor=F0F0F0) |
| [v3.22.04.6287](https://github.com/Crequency/KitX/releases/tag/v3.22.04.6287) | Release | Evolution | :x: | 2022.04 -> 2023.04 | `Desktop`: .Net 6 (Also Self-Contained) <br> `Mobile`: Native | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![MacOS](https://img.shields.io/badge/mac%20os-000000?logo=macos&logoColor=F0F0F0) |
| [v3.23.04.6488](https://github.com/Crequency/KitX/releases/tag/v3.23.04.6488) | Release | ToYou | :white_check_mark: | 2023.04 -> 2024.04 | `Desktop`: .Net 6 (Also Self-Contained) <br> `Mobile`: Native | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![MacOS](https://img.shields.io/badge/mac%20os-000000?logo=macos&logoColor=F0F0F0) ![Android](https://img.shields.io/badge/Android-3DDC84?logo=android&logoColor=white) ![Raspberry Pi](https://img.shields.io/badge/-RaspberryPi-C51A4A?logo=Raspberry-Pi) |
| v3.24.10.x | Release | - | developing | 2024.10 -> 2025.04 | `Desktop`: .Net 8 (Also Self-Contained) <br> `Mobile`: Native | ![Windows](https://img.shields.io/badge/Windows-0078D6?logo=windows&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-FCC624?logo=linux&logoColor=black) ![MacOS](https://img.shields.io/badge/mac%20os-000000?logo=macos&logoColor=F0F0F0) ![Android](https://img.shields.io/badge/Android-3DDC84?logo=android&logoColor=white) ![iOS](https://img.shields.io/badge/iOS-000000?logo=ios&logoColor=white) ![Raspberry Pi](https://img.shields.io/badge/-RaspberryPi-C51A4A?logo=Raspberry-Pi) |
See details in [ChangeLog](./ChangeLog.md)
# Contributors
[![Contributors](https://contrib.rocks/image?repo=Crequency/KitX)](https://github.com/Crequency/KitX/graphs/contributors)
# Star History
<!-- [![Star History Chart](https://api.star-history.com/svg?repos=Crequency/KitX&type=Timeline)](https://star-history.com/#Crequency/KitX&Timeline) -->
[![Star History Chart](https://starchart.cc/Crequency/KitX.svg?variant=adaptive)](https://starchart.cc/Crequency/KitX)
# Thanks to
<p align="center">
<a href="https://www.jetbrains.com/" target="_blank" rel="noopener noreferrer">
<img width="128" src="https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg" alt="JetBrains Logo (Main) logo">
</a>
</p>
<p align="center">
Thanks to the great tools from <a href="https://www.jetbrains.com/" target="_blank">JetBrains</a>, we can turn our ideas into reality.
</p>
| An all-purpose toolbox app that connect everything. | desktop,dotnet,kitx,avalonia,kitx-loaders,android,flutter,ios,linux,macos | 24 | 16 | 180 | 493 | 16 | 4 | 8 |
utilForever/awesome-cafe | <h1 align="center"><strong>☕ awesome-cafe ☕</strong></h1>
## 개요
모각코하기 좋은 국내 카페 리스트를 정리한 저장소입니다.
## 목차
- [지역](#지역)
- [서울](#서울)
- [카페 캠프통](#카페-캠프통)
- [카페 루보브](#카페-루보브)
- [공그로트](#공그로트)
- [이디야커피 강남대치점](#이디야커피-강남대치점)
- [엘피스](#엘피스)
- [요거프레소 한양대점](#요거프레소-한양대점)
- [자유인들](#자유인들)
- [모노블럭](#모노블럭)
- [오플비](#오플비)
- [프로토콜](#프로토콜)
- [여의도커피](#여의도커피)
- [제주몰빵](#제주몰빵)
- [트립티 뚝섬유원지자벌레점](#트립티-뚝섬유원지자벌레점)
- [더 카페 신방](#더-카페-신방)
- [쏠티캐빈 용산직영점](#쏠티캐빈-용산직영점)
- [투썸플레이스 강남대륭타워점](#투썸플레이스-강남대륭타워점)
- [할리스 구로디지털단지역점](#할리스-구로디지털단지역점)
- [부산](#부산)
- [카페 아가미](#카페-아가미)
- [노스 커피 부산대 북문점](#노스-커피-부산대-북문점)
- [카페드팽](#카페드팽)
- [부산커피](#부산커피)
- [카페부케](#카페부케)
- [카페위드](#카페위드)
- [어벤더치 부산대북문점](#어벤더치-부산대북문점)
- [대구](#대구)
- [블라인드멜론 북문점](#블라인드멜론-북문점)
- [아틀리에빈 경북대점](#아틀리에빈-경북대점)
- [인천](#인천)
- [카페 더 노벰버 라운지](#카페-더-노벰버-라운지)
- [카페 세굴라](#카페-세굴라)
- [카페 홀리데이인 인천 송도 더라운지](#카페-홀리데이인-인천-송도-더라운지)
- [카페더스토리 인하대점](#카페더스토리-인하대점)
- [광주](#광주)
- [대전](#대전)
- [할리스커피 대전충남대점](#할리스커피-대전충남대점)
- [울산](#울산)
- [세종](#세종)
- [경기](#경기)
- [카페 델로](#카페-델로)
- [카페드플로르 한경점 (Cafe de Flore)](#카페드플로르-한경점-cafe-de-flore)
- [오브제커피](#오브제커피)
- [The november 라운지 하남풍산역](#the-novemver-라운지-하남풍산역)
- [강원](#강원)
- [충북](#충북)
- [충남](#충남)
- [전북](#전북)
- [전남](#전남)
- [스타벅스 목포평화광장점](#스타벅스-목포평화광장점)
- [경북](#경북)
- [경남](#경남)
- [제주](#제주)
## 지역
### 서울
#### [카페 캠프통](http://naver.me/Fvn7KK7D)
- 위치 : 서울 강남구 압구정로42길 27
- 규모 : 1 ~ 5층, 1,700평 규모
- 운영 시간
- 평일 : 11:00 ~ 20:00
- 주말 : 11:00 ~ 20:00
- 혼잡도
- 평일 : 한산
- 주말 : 보통
- 가격대
- 음료 : 6,000 ~ 7,000
- 베이커리 : 2,000 ~ 5,000
- 책상 및 의자 특징
- 나무 책상 / 의자와 철제 책상 / 의자가 있음
- 일부는 책상이 약간 울퉁불퉁하고 중간에 나사가 있어 불편함
- 콘센트 유무 : 있음
- 콘센트 개수 : 매우 많음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 1층과 2층은 자유롭게 사용 가능
- 2층에 다트 게임을 할 수 있는 공간이 있음
- 4층에 야외 공간, 5층에 루프탑이 있음
#### [카페 루보브](http://naver.me/501GLGC5)
- 위치 : 서울 성동구 마조로1길 6
- 규모 : 1층
- 운영 시간
- 화요일 : 휴무
- 평일 : 12:00 ~ 22:00
- 주말 : 12:00 ~ 22:00
- 혼잡도
- 평일 : 여유
- 주말 : 여유
- 가격대
- 음료 : 3,800 ~ 6,000
- 베이커리 : 4,000 ~ 5,000
- 책상 및 의자 특징
- 10명이 앉을 수 있는 나무 테이블 및 플라스틱 의자, 책상에 콘센트 내장
- 4인 테이블이 약간 있고, 2인 테이블 다수 존재
- 2인 테이블에는 콘센트가 각 자리별로 존재
- 콘센트 유무 : 있음
- 콘센트 개수 : 많음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 다른 왕십리 카페와 달리 조용한 골목에 있어서 한적함
- 10인 테이블 책상 크기가 충분히 커서 모여서 코딩하기 좋음
- 1층에 남/여 각각 화장실 존재, 화장실 입구에 책장이 설치됨
#### [공그로트](http://naver.me/xtWHnjXO)
- 위치 : 서울 마포구 동교로51길 129-6
- 규모 : 1 ~ 4층
- 운영 시간
- 평일 : 09:00 ~ 24:00
- 주말 : 09:00 ~ 24:00
- 혼잡도
- 평일 : 여유
- 주말 : 혼잡
- 가격대
- 음료 : 4,000 ~ 7,000
- 베이커리 : 3,500 ~ 5,000
- 책상 및 의자 특징
- 2층에는 2인, 4인 테이블이 있음
- 3층에는 중앙에 12여명이 앉을 수 있는 긴 테이블이 있음
- 나무 책상/의자가 있음
- 콘센트 유무 : 있음
- 콘센트 개수 : 보통
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 1층 야외 테이블에는 반려동물 동반 가능함
- 2층과 3층에서만 노트북 가능함
- 4층에 루프탑이 있음
- 2층에 여자화장실이 있음
- 3층에 남자화장실이 있음
#### [이디야커피 강남대치점](http://naver.me/xdI6V1co)
- 위치 : 서울 강남구 역삼로 415
- 규모 : 1층
- 운영 시간
- 평일 : 07:30 ~ 21:00
- 주말 : 08:00 ~ 21:00
- 혼잡도
- 평일 : 여유
- 학생들이 학원에 가는 오후 6시 ~ 10시에는 혼잡
- 주말 : 보통
- 가격대 : 3,000 ~ 5,000
- 책상 및 의자 특징
- 스터디 카페처럼 소파 / 1인용 좌석 / 2인용 좌석
- 4인 이상 이용 가능한 방음 부스가 2개 있음
- 콘센트 유무 : 있음
- 콘센트 개수 : 자리마다 1개씩 있음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 예전 개인 스터디카페에서 바뀌어서 중고등학생들이 공부하러 많이 옴
- 전체적으로 조용한 분위기
- 스터디를 진행하기에는 부적합, 모각코 또는 혼자 코딩할때 좋음
#### [엘피스](http://naver.me/GEAL6rzh)
- 위치 : 서울 서대문구 연세로 38 창천교회
- 규모 : 2층 (카페) / 3 ~ 4층 (세미나실)
- 운영 시간
- 평일 : 10:00 ~ 22:00
- 주말 : 10:00 ~ 22:00
- 혼잡도
- 평일 : 보통
- 주말 : 보통 (일요일 한정 혼잡)
- 가격대 : 4,000 ~ 6,000
- 책상 및 의자 특징
- 4인용 테이블, 바형 일자 테이블 구성
- 콘센트 유무 : 있음
- 콘센트 개수 : 보통
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 세미나실 비용 저렴
- 교회에서 운영하여 분위기 자체가 차분함
#### [요거프레소 한양대점](http://naver.me/58HNfgnS)
- 위치 : 서울 성동구 마조로1가길 3 행당동근생
- 규모 : 1층, 69평 규모
- 운영 시간
- 평일 : 11:00 ~ 23:00
- 주말 : 11:00 ~ 23:00
- 혼잡도
- 평일 : 혼잡
- 주말 : 보통
- 가격대
- 음료 : 3,500 ~ 7,200
- 빙수 : 9,800 ~ 12,300
- 베이커리 : 2,400 ~ 5,900
- 아이스크림 : 3,500 ~ 10,900
- 책상 및 의자 특징
- 나무 책상/의자가 있음
- 높이가 높은 책상이 있어 서서 코딩도 가능
- 콘센트 유무 : 있음
- 콘센트 개수 : 많음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 시험기간 근처에는 항상 사람이 많음
- 시험기간이 아니면 종종 사람이 없음
#### [자유인들](http://naver.me/IG6G8W0k)
- 위치 : 서울 마포구 와우산로22길 34 1~2층
- 규모 : 2층
- 운영 시간
- 평일 : 12:00 ~ 00:00
- 토 : 13:00 ~ 01:00
- 일 : 01:00 ~ 20:00
- 혼잡도
- 평일 : 여유
- 주말 : 여유
- 가격대
- 음료 3,500 ~ 6,500
- 책상 및 의자 특징
- 입구에 4~5명 정도가 앉을 수 있는 테이블 있음 (여긴 콘센트 있음)
- 모든 가구가 빈티지 또는 엔틱스러움
- 콘센트 유무 : 있음
- 콘센트 개수 : 적음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 카페 제목 그대로 매우 '자유분방'한 분위기
- 일반적이지 않은 카페를 가고 싶다 할 때 가보자
- 홍대 돌담길로 들어가야 함
#### [모노블럭](http://naver.me/5y4q0qxT)
- 위치 : 서울 마포구 와우산로23길 14, 2층
- 규모 : 1층
- 운영 시간
- 매일 : 11:00 ~ 23:00
- 혼잡도
- 평일 : 보통
- 주말 : 보통
- 가격대
- 음료 4,500 ~ 6,500
- 책상 및 의자 특징
- 2명이 앉을 수 있는 테이블이 대다수
- 창가 테이블 또는 기둥이 있는 곳에만 콘센트 있음
- 콘센트 유무 : 있음
- 콘센트 개수 : 많음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 낮에 가면 햇살이 좋음, 고로 기분 좋은 코딩 가능
#### [오플비](http://naver.me/535BZG6k)
- 위치 : 서울 강동구 성내로3길 37 1층
- 규모 : 2층
- 운영 시간
- 월, 화, 목, 금 : 09:00 ~ 20:00
- 수 : 09:00 ~ 19:00
- 토 : 09:30 ~ 20:00
- 일 : 휴무
- 혼잡도
- 평일 : 여유
- 주말 : 보통
- 가격대
- 음료 3,500 ~ 6,000
- 책상 및 의자 특징
- 의자가 푹신해 작업하기 편함
- 6인용 테이블 2개
- 회의실 이용가능
- 콘센트 유무 : 있음
- 콘센트 개수 : 많음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 독서실도 함께 존재 (주문시 이용 가능)
- 교회 1, 2층을 카페로 만들었음
- 6인 이상 시 6인 테이블, 회의실 이용 가능
- 주차가능
#### [프로토콜](http://naver.me/Fk5BgoEh)
- 위치 : 서울 서대문구 연희로 109, 2층
- 규모 : 1층
- 운영 시간
- 매일: 10:30 ~ 22:00
- 혼잡도
- 평일 : 혼잡
- 주말 : 혼잡
- 가격대
- 음료 5,000 ~ 6,000
- 책상 및 의자 특징
- 보통 작업용 테이블과 스탠드가 자리마다 제공됨
- 바가 있어서 바 테이블 이용 가능
- 창가 쪽 자리는 ㄷ자 형태의 테이블
- 콘센트 유무 : 있음
- 콘센트 개수 : 스탠드가 있는 테이블이라면 자리마다 1개씩
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 작업실 같은 분위기
- 테이블에 스탠드가 하나씩 있다
- 오후가 지나면 꽤나 혼잡해짐
- 남녀 공용 화장실, 화장실 쾌적
- 카페에서 틀어주는 음악소리가 꽤나 크나 집중하기 좋은 음악이 나온다
#### [여의도커피](http://naver.me/5Tv3FdcG)
- 위치 : 서울 영등포구 여의대방로 386 진주상가 2층 11, 12호
- 규모 : 1층
- 운영 시간
- 평일 : 09:00 ~ 18:30
- 주말 : 10:00 ~ 16:30
- 혼잡도
- 평일 : 여유
- 주말 : 여유
- 가격대
- 음료 : 4,000 ~ 7,000
- 베이커리 : 1,000 ~ 4,000
- 책상 및 의자 특징
- 나무 책상 / 의자
- 콘센트 유무 : 있음
- 콘센트 개수 : 적음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적
- 기타 특징
- 커피 관련 취미반 교육, 창업반 컨설팅 상시 진행 중.
- 핸드드립 커피 맛집.
- 조용히 코딩하기 좋은 곳. 자주 remote 근무한 곳.
#### [제주몰빵](http://naver.me/5tj9D1oE)
- 위치 : 서울 광진구 능동로 209 세종대학교 학생회관 2층
- 규모 : 1층
- 운영 시간
- 평일 : 09:00 ~ 19:00
- 주말 : 10:00 ~ 18:00
- 혼잡도
- 평일 : 여유
- 주말 : 여유
- 가격대
- 음료 : 2,000 ~ 5,000
- 베이커리 : 3,000 ~ 5,000
- 책상 및 의자 특징
- 내부 테이블, 창가 테이블, 외부 테이블 종류 다양
- 콘센트 유무 : 있음
- 콘센트 개수 : 적음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적
- 기타 특징
- 외부 빈백에서 누워서 코딩 가능
- 외부 목재 테이블에서 4~5명 회의 가능
- 소음이 다소 있음
#### [트립티 뚝섬유원지자벌레점](http://naver.me/57w2PBDE)
- 위치 : 서울 광진구 강변북로 2202 뚝섬전망복합문화시설
- 규모 : 1층
- 운영 시간
- 평일 : 11:00 ~ 21:00
- 주말 : 11:00 ~ 21:00
- 혼잡도
- 평일 : 보통
- 주말 : 혼잡
- 가격대
- 음료 : 2,000 ~ 5,000
- 베이커리 : 3,000 ~ 5,000
- 책상 및 의자 특징
- 창가 테이블이 별도로 있음
- 자리별 테이블, 의자 모양이 제각기
- 콘센트 유무 : 있음
- 콘센트 개수 : 보통
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적
- 기타 특징
- 규모가 상당히 큼
- 윗층은 카페가 아니나 좌석 등 이용 가능
- 전망이 매우 뛰어남
#### [더 카페 신방](http://naver.me/5012CEPd)
- 위치 : 서울 서초구 남부순환로 2575 1층
- 규모 : 1층
- 운영 시간
- 평일, 일요일 : 08:00 ~ 22:30
- 토요일 : 09:00 ~ 22:30
- 혼잡도
- 평일 : 한산
- 주말 : 한산
- 가격대
- 음료 : 3,000 ~ 5,500
- 베이커리 : 3,000 ~ 5,000
- 책상 및 의자 특징
- 중앙에 넓은 테이블이 있으며 10인 착석, 콘센트 사용 가능
- 콘센트 유무 : 중앙 넓은 테이블에만 자리당 1개씩 있음
- 콘센트 개수 : 보통
- 와이파이 유무 : 있음(영어가 아닌 한글로 된 '더카페신방' 이라는 이름을 사용해야함)
- 와이파이 속도 : 쾌적
- 기타 특징
- 사람이 적고 공간이 넓어 조용함
- 중앙 테이블이 넓고 의자에 팔걸이가 있어 모각코에 최적
- 천장이 높아 쾌적
#### [쏠티캐빈 용산직영점](http://naver.me/FVPMGZiG)
- 위치 : 서울 용산구 새창로44길 10 1층 쏠티캐빈 용산직영점
- 규모 : 1층
- 운영 시간
- 평일 : 08:00 ~ 22:00
- 주말 : 09:00 ~ 22:00
- 혼잡도
- 평일 : 한산
- 주말 : 혼잡
- 가격대
- 음료 : 4,500 ~ 6,000
- 베이커리 및 식사 : 3,500 ~ 10,800
- 책상 및 의자 특징
- 넓은 테이블이 있으며 최대 9인 착석 가능
- 룸 형태로 분리된 공간이 있음
- 콘센트 유무 : 분리된 공간에만 자리당 2개씩 있음
- 콘센트 개수 : 보통
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적
- 기타 특징
- 규모가 크고 평일엔 사람이 적어 조용함
- 베이커리와 음료, 식사, 논알콜 칵테일 판매
- 테이블이 넓고 공간이 분리되어 있어 모각코에 쾌적
- 휴양지의 바다 특유의 짠내가 느껴짐
#### [투썸플레이스 강남대륭타워점](http://naver.me/xGOiOUl0)
- 위치 : 서울 강남구 강남대로 362-2 가로판매대복사
- 규모 : 1층
- 운영 시간
- 평일 : 06:30~23:00
- 주말 : 07:00~23:00
- 혼잡도
- 평일 : 혼잡
- 주말 : 혼잡
- 가격대
- 음료 : 5,000~7,000
- 책상 및 의자 특징
- 나무로 된 책상
- 8명이 사용할 수 있는 긴 테이블 2개
- 낮은 책상이 있는 자리는 적음
- 콘센트 유무 : 있음
- 콘센트 개수 : 보통
- 와이파이 유무 : 있음
- 와이파이 속도 : 느림
- 기타 특징
- 카페 안쪽에 8명이 사용할 수 있는 커뮤니티룸이 있고 예약이 가능함
- 소파 자리, 창가 자리, 커뮤니티룸에만 콘센트가 있음
- 창가 자리는 사람들이 잘 앉지 않음
- 천장이 높음
- 강남역 출구 바로 앞이라 접근성이 좋음
#### [카페 동네](https://naver.me/FAQIzci1)
- 위치 : 서울 관악구 남부순환로 1600-1
- 규모 : 2 ~ 4층, 옥상
- 운영 시간
- 평일 : 08:00 ~ 04:00
- 주말 : 08:00 ~ 04:00
- 혼잡도
- 평일 : 여유
- 주말 : 혼잡
- 가격대 : 4,000원 ~ 7,000원
- 책상 및 의자 특징
- 나무로 된 책상
- 쇼파로 된 의자 나무로 된 의자 다양함
- 콘센트 유무
- 모든 좌석에 콘센트 2구씩 부착
- 콘센트 개수
- 모든 좌석 당 2구씩
- 와이파이 유무
- 와이파이 있음
- 와이파이 속도
- 빠름
- 기타 특징
- 4층은 완전히 노트북 및 공부하는 공간
- 3층은 대화하는 사람들이 많기는 하나 노트북 하시는 분도 많음 제제 따로 안함
- 아메리카노가 맛있음
- 신림역 4번 출구 바로 앞이라 접근성 최강
- 칸막이가 있는 개인 좌석도 있어서 공부하기도 좋고 단체 테이블도 있어서 모각코하기에도 좋음
- 루프탑은 오전 12시에 마감
#### [할리스 구로디지털단지역점](https://naver.me/FiLE8EIw)
- 위치 : 서울 구로구 디지털로32나길 38
- 규모 : 1층
- 운영 시간
- 평일, 토요일 : 07:00 ~ 20:30
- 일요일 : 08:00 ~ 20:30
- 혼잡도
- 평일 : 여유
- 주말 : 보통
- 가격대 : 5,000원 ~ 8,000원
- 책상 및 의자 특징
- 나무로 된 책상과 의자
- 콘센트 유무
- 벽, 창가 쪽 좌석에 콘센트 1구씩 부착
- 벽, 창가가 아닌 좌석에는 콘센트 없음
- 콘센트 개수
- 1구짜리가 많음
- 와이파이 유무
- 와이파이 있음
- 와이파이 속도
- 빠름
- 기타 특징
- 때에 따라 다르지만 주말 오후에도 빈 좌석이 최소 1개씩 유지되고 있음
- 구로디지털단지역 2번 출구 도보 5분 이내
- 입구 가장 가까운 벽 쪽 좌석은 콘센트가 헐거워 주의 필요
- 긴 테이블 좌석은 현재 콘센트가 막혀 있는 관계로 최대 4명이 모이는 게 좋아 보임
### 부산
#### [카페 아가미](http://naver.me/5aVfHM1R)
- 위치 : 부산 금정구 부산대학로 38 3층
- 규모 : 1층
- 운영 시간
- 월화 휴무
- 평일 : 16:00 ~ 22:00
- 주말 : 13:00 ~ 22:00
- 혼잡도
- 평일 : 한산
- 주말 : 한산
- 가격대
- 음료 5,000 ~ 6,000
- 책상 및 의자 특징
- 유리 덮힌 나무 책상과 나무 의자
- 좌식 공간 하나 있음, 등쿠션이 있어 좌식 작업 시 편함
- 콘센트 유무 : 있음
- 콘센트 개수 : 적음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 고양이 4마리가 있음
- 식물이 많음
- 그림도구들과 아가미 고양이 모티브 컬러링 도안이 있음
- 비정기적으로 그림 전시 또는 공연이 열림
#### [노스 커피 부산대 북문점](http://naver.me/x502uOST)
- 위치 : 부산 금정구 수림로85번길 56
- 규모 : 1층, 테라스 있음
- 운영 시간
- 평일 : 07:30 ~ 23:00
- 주말 : 08:00 ~ 23:00
- 혼잡도
- 평일 : 보통
- 주말 : 보통
- 가격대
- 음료 : 3,000 ~ 6,000
- 베이커리 : 2,000 ~ 3,000
- 책상 및 의자 특징
- 4명 정도가 앉을 수 있는 나무 책상과 쿠션감이 있는 의자 또는 소파가 여러 개 있음
- 중앙에 10여명이 앉을 수 있는 긴 나무 책상이 있음
- 테라스에 철제 책상과 의자 있음
- 공간이 칸막이로 나누어져 있음
- 책상과 의자 사이 간격 적절
- 콘센트 유무 : 있음
- 콘센트 개수 : 매우 많음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 테이크 아웃은 1,000원 할인
- 적립 카드를 만들면 포인트 적립 가능, 노스 커피 전 매장에서 사용 가능함
- 시험 기간에는 자리 없음 주의
- 2층 스터디룸 대여 시, 인당 음료 2500원 할인
#### [카페드팽](http://naver.me/Gz5EBHcr)
- 위치 : 부산 금정구 금강로 247-7
- 규모 : 지하 1층 ~ 2층
- 운영 시간
- 평일 : 10:00 ~ 23:00
- 주말 : 10:00 ~ 23:00
- 혼잡도
- 평일 : 보통
- 주말 : 혼잡
- 가격대
- 음료 3,000 ~ 6,000
- 베이터리 2,000 ~ 8,000
- 책상 및 의자 특징
- 나무 책상/의자 있음
- 책상 흔들림 거의 없음
- 기본 4인 좌석, 6인 테이블 있음
- 콘센트 유무 : 낮은 테이블을 제외한 전좌석 콘센트
- 콘센트 개수 : 테이블 당 2개
- 와이파이 유무 : 층별 와이파이 2개씩
- 와이파이 속도 : 쾌적, 지하는 조금 느림
- 기타 특징
- 음료/베이커리 서빙해 주심
- 창문이 많아 햇볕이 잘듬
- 평일 점심 음료 20% 할인 (~ 13:00)
- VIP 카드 생성시 음료 5% 할인
#### [부산커피](http://naver.me/IIqft9S7)
- 위치 : 부산 금정구 장전온천천로 93
- 규모 : 1층 ~ 2층, 별관
- 운영 시간
- 평일 : 11:00 ~ 22:00
- 토요일 : 11:00 ~ 22:00
- 일요일 : 휴무
- 혼잡도
- 평일 : 보통
- 주말 : 혼잡
- 가격대
- 음료 : 4,000 ~ 6,000
- 베이커리 : 2,000 ~ 4,000
- 책상 및 의자 특징
- 나무 책상/의자 있음
- 대부분 대화형 테이블
- 6인 테이블 있음
- 콘센트 유무 : 일부 테이블만 콘센트 있음
- 콘센트 개수 : 적음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적
- 기타 특징
- 2층 및 별관 노키즈존
#### [카페부케](http://naver.me/xE16NJLo)
- 위치 : 부산 금정구 장전온천천로 97-1
- 규모 : 1층 ~ 2층, 테라스
- 운영 시간
- 평일 : 10:00 ~ 23:00
- 주말 : 10:00 ~ 23:00
- 혼잡도
- 평일 : 한적
- 주말 : 한적
- 가격대
- 음료 : 3,500 ~ 5,500
- 베이커리 : 4,000 ~ 6,000
- 책상 및 의자 특징
- 나무 책상/의자
- 콘센트 유무 : 있음
- 콘센트 개수 : 많음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적
- 기타 특징:
- 야외 테라스는 2층, 3층으로 구성
#### [카페위드](http://naver.me/5bXKKcn0)
- 위치 : 부산 남구 용소로19번길 15 대정빌딩 2층
- 규모 : 2층, 테라스
- 운영 시간
- 평일 : 09:00 ~ 23:00
- 주말 : 09:00 ~ 23:00
- 혼잡도
- 평일 : 한적
- 주말 : 보통
- 가격대
- 음료 : 3,500 ~ 6,000
- 베이커리 : 3,500 ~ 6,500
- 책상 및 의자 특징
- 나무 책상 / 의자
- 콘센트 유무 : 전좌석 콘센트 있음
- 콘센트 개수 : 많음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적
- 기타 특징:
- 빔프로젝터, 42인치 모니터, 노트북, 프린터, 마이크 구비
- 10명 / 20명 / 30명 규모의 스터디를 위한 세미나룸 존재 (사용 시 추가 요금 없음)
#### [어벤더치 부산대북문점](https://naver.me/G7KPckHv)
- 위치 : 부산 금정구 수림로85번길 54
- 규모 : 1층
- 운영 시간
- 평일 : 08:00 ~ 23:00
- 주말 : 10:00 ~ 22:00
- 혼잡도
- 평일 : 보통
- 주말 : 보통
- 가격대 : 2000 ~ 4000
- 책상 및 의자 특징
- 나무 책상 / 의자
- 책상이 높아서 노트북하기 좋음
- 콘센트 유무 : 전좌석 콘센트 있음
- 콘센트 개수 : 많음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적
- 기타 특징
- 매장 이용 시 1000원 추가
### 대구
#### [블라인드멜론 북문점](http://naver.me/FbRirm7L)
- 위치 : 대구광역시 북구 대학로 111 1,2층
- 규모 : 1~2층
- 운영 시간
- 평일 : 10:00 ~ 23:50
- 주말 : 10:00 ~ 23:50
- 혼잡도
- 평일 : 보통
- 주말 : 보통
- 가격대
- 음료 : 3,500 ~ 6,000
- 디저트 : 2,500 ~ 4,000
- 책상 및 의자 특징
- 쇼파 테이블 및 일반 철제 테이블
- 쇼파 및 의자
- 콘센트 유무 : 있음
- 콘센트 개수 : 적다
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적
- 기타 특징:
- 1층은 적당한 카페 분위기
- 2층은 시험기간이 되면 혼잡해진다.
#### [아틀리에빈 경북대점](http://naver.me/xcKJGRq9)
- 위치 : 대구 북구 대학로 67-1 산격동 1400-19 1,2층
- 규모 : 1~2층
- 운영 시간
- 평일 : 09:00 ~ 23:59
- 주말 : 09:00 ~ 23:59
- 혼잡도
- 평일 : 보통
- 주말 : 보통
- 가격대
- 음료 : 3,500 ~7,000
- 디저트 : 2,000 ~ 5,500
- 책상 및 의자 특징
- 철제 책상 / 의자
- 콘센트 유무 : 있음
- 콘센트 개수 : 많다
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적
- 기타 특징:
- 독서실처럼 칸막이가 있는 테이블이 있다.
#### [`카페얀`](https://naver.me/xsYGJk7u)
- 위치: 대구 달서구 달서대로109안길 16
- 규모: 1층 로비, 2층, 3층
- 운영 시간
- 평일: 09:30-22:00
- 주말: 10:00-22:00
- 혼잡도
- 평일: 붐빔
- 주말: 보통
- 가격대
- 음료: 아메리카노 4,000원
- 베이커리: 3,500부터
- 책상 및 의자 특징
- 2층 소파와 낮은 책상, 3층 둥근 1인 책상, 다인용 책상
- 콘센트 유무: 유
- 콘센트 개수: 2층 적음, 3층 많음
- 와이파이 유무: 유
- 와이파이 속도: 빠름
- 기타 특징
- 와이파이 비번 없음
- 아샷추 가능
- 말렌카 팖
- 통유리창이고 앞에 숲 공원이 있어서 경치가 좋음
- 스터디룸 있음
- 2층과 3층의 분위기가 다름
- 3층 다인용 책상과 스터디룸에서 개발하기 좋음.
### 인천
#### [카페 더 노벰버 라운지](http://naver.me/5pNEPu3U)
- 위치 : 인천 연수구 컨벤시아대로230번길 42 아라플라자 121호
- 규모 : 1층
- 운영 시간
- 24시간 연중무휴
- 혼잡도
- 평일 : (오전 - 여유) / (오후 - 혼잡) / (새벽 - 주말 외엔 여유)
- 주말 : 혼잡 (오전,오후,새벽)
- 가격대 : 5,000 ~ 10,000
- 책상 및 의자 특징
- 창가쪽은 바 테이블
- 원형 테이블 있음.
- 6인이상 테이블, 4인 이상 테이블 존재
- 24시간이라 새벽에도 갈 수 있음.
- 콘센트 유무 : 있음
- 콘센트 개수 : 적음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 맥주와 칵테일을 팔고 있어 술마시면서 작업 하기 좋습니다.
- 피자와 감튀를 시킬 수 있습니다.
- 조용하진 않지만 스터디, 작업하는 사람들이 많고 분위기가 카페와는 다른 펍 느낌도 납니다.
- 맛있는 커피를 먹고자 하면 가면 안되는 곳 (네스프레소 캡슐로 줍니다.)
#### [카페 세굴라](http://naver.me/xAtVyKSW)
- 위치 : 인천 연수구 인천타워대로 257 (아트포레 프루지오 시티 2층 상가)
- 규모 : 1층
- 운영 시간
- 토 : 휴무
- 월,화,수,목,금 : 10:30 ~ 21:00
- 혼잡도
- 언제가도 혼잡하지 않음. 조용함.
- 가격대 : 3,900 ~ 7,000
- 책상 및 의자 특징
- 원형 테이블 있음.
- 4인 테이블 존재.
- 콘센트 유무 : 있음
- 콘센트 개수 : 적음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 사람이 거의 없어서 항상 조용함.
- 채광이 좋고, 더불어 송도 전망을 볼 수 있는 곳이라 빌드 중에 한숨 돌리기 좋음.
- 카페 아주머니가 엄청 친절하심.
#### [카페 홀리데이인 인천 송도 더라운지](http://naver.me/FPs2aGf1)
- 위치 : 인천 연수구 인천타워대로 251 1층
- 규모 : 1층
- 운영 시간
- 11:00 ~ 19:00 (18:30 라스트오더)
- 혼잡도
- 주말 외엔 한산하지만, 가끔 인천 SSG와 경기하는 어웨이팀 구단이 사용할땐 가끔 사람 많음
- 가격대 : 3,000 ~ 15,000
- 책상 및 의자 특징
- 원형 테이블 있음.
- 6인이상 테이블, 4인 이상 테이블
- 콘센트 유무 : 있음
- 콘센트 개수 : 적음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 호텔 내에 있는 카페라 디저트류가 맛있습니다. (케잌 추천)
- 화장실이 너무 깨끗하고 좋습니다. (호텔에 있는 카페여서..)
- 인천지하철 센트럴파크역에서 바로 나오면 있어 접근성도 좋습니다.
#### [카페더스토리 인하대점](http://naver.me/FjobWpy6)
- 위치 : 인천 미추홀구 인하로91번길 4
- 규모 : 지하 1층 ~ 지상 2층
- 운영 시간
- 평일 : 10:00 ~ 24:00
- 주말 : 11:00 ~ 23:00
- 혼잡도
- 평일 : 보통
- 주말 : 보통
- 가격대
- 음료 : 4,200 ~ 6,000
- 책상 및 의자 특징
- 모든 자리에 콘센트 존재
- 10인 테이블 존재
- 콘센트 유무 : 있음
- 콘센트 개수 : 많음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 1,500원 결제로 사용 컵에 아메리카노 리필 가능 (추가 옵션 선택 가능)
- 방학중에는 매일 11:00 ~ 23:00 운영
- 시험기간에는 혼잡함
### 광주
### 대전
#### [할리스커피 대전충남대점](http://naver.me/5SWKBY1B)
- 위치 : 대전 유성구 대학로 84 1층
- 규모 : 1층
- 운영 시간
- 08:00 ~ 23:00
- 혼잡도
- 대학교 앞 카페로 공부하는 학생들로 붐빔
- 가격대
- 음료 : 4,500 ~ 6,800
- 디저트 : 3,900 ~ 6,900
- 책상 및 의자 특징
- 개인용 책상 있음
- 콘센트 유무 : 있음
- 콘센트 개수
- 개인용 책상마다 있음
- 회의실 책상에는 멀티탭 있음
- 와이파이 유무 : 있음
- 와이파이 속도 : 빠름
- 기타 특징
- 팀 프로젝트 하기에 좋은 회의실을 예약 할 수 있음
- 사람이 많지만 공부하기 위해 온 사람들이 대부분이라 집중하기 좋음
### 울산
### 세종
### 경기
#### [카페 델로](http://naver.me/xcKxyX6u)
- 위치 : 경기 수원시 영통구 인계로 254
- 규모 : 2층
- 운영 시간
- 평일 : 10:00 ~ 22:00 (코로나로 조정)
- 주말 : 10:00 ~ 22:00
- 혼잡도
- 평일 : 여유
- 주말 : 여유
- 가격대 : 4,000 ~ 6,000
- 책상 및 의자 특징
- 원목 책상 / 의자
- 원형 테이블 있음
- 3인용 바형 테이블, 6인 이상 테이블
- 콘센트 유무 : 있음
- 콘센트 개수 : 적음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 사람이 거의 없어서 항상 조용함
- 내부에 식물이 많아 공기가 쾌적함
- 세미나, 스터디가 가능한 공간이 있으나 미리 연락해 예약해야 함
#### [카페드플로르 한경점 (Cafe de Flore)](http://naver.me/GfaMCFzh)
- 위치 : 경기도 안성시 비룡5길 18
- 규모 : 1층
- 운영 시간
- 평일 : 09:00 ~ 22:00 (코로나로 조정)
- 주말 : 09:00 ~ 22:00
- 혼잡도
- 평일 : 여유
- 주말 : 여유
- 가격대 : 4,000 ~ 6,000
- 책상 및 의자 특징
- 원목 책상 / 의자
- 8인 바형 테이블
- 3인용 원형 테이블
- 콘센트 유무 : 있음
- 콘센트 개수 : 전좌석 콘센트 있음. 바형 테이블 1인당 1콘센트
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 수목원처럼 화분으로 조경이 되어있어 공기가 쾌적함
- 한경대 주차장 바로 앞에있어서 무료 주차가 용이함
- 세미나, 스터디가 가능한 롱테이블이 있는 공간이 있음. 미리 예약하거나 자리가 비어있으면 양해를 구하고 사용가능
#### [오브제커피](http://naver.me/GmFVPBDW)
- 위치 : 경기 하남시 미사강변중앙로 164 미타워 3층
- 규모 : 3층
- 운영 시간
- 평일 : 11:00 ~ 03:00 (코로나로 00시까지로 조정)
- 주말 : 11:00 ~ 03:00 (코로나로 00시까지로 조정)
- 혼잡도
- 평일 : 보통
- 주말 : 보통
- 가격대 : 4,500 ~ 6,000
- 책상 및 의자 특징
- 8인 바형 테이블 2개
- 4인용 테이블 / 소파 5개
- 스텐딩 테이블 3개 (콘센트X)
- 콘센트 유무 : 있음
- 콘센트 개수 : 많다
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 주차 무료 4시간
- 미사역이랑 도보 5분
- 대학생 시험기간에 혼잡도 올라감
- 약간 어둡고 따뜻한 분위기
#### [쿠아모스](http://naver.me/x7viajrX)
- 위치 : 경기 의정부시 시민로121번길 8
- 규모 : 1층
- 운영 시간
- 평일 : 10:00 ~ 22:00
- 주말 : 10:00 ~ 22:00
- 혼잡도
- 평일 : 여유
- 주말 : 보통
- 가격대 : 5,000 ~ 6,000
- 책상 및 의자 특징
- 6인용 테이블 2개
- 4인용 테이블 5개
- 콘센트 유무 : 있음
- 콘센트 개수 : 적다
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 술집 거리에 있어서 거리감이 들지만 들어가면 조용한 분위기
- 오래된 가정집 분위기의 카페
- 카페 내부에 흡연실이 있음
- 핸드드립 커피가 유명함
#### [The november 라운지 하남풍산역](http://naver.me/xpPaPanS)
- 위치 : 경기 하남시 미사강변한강로 420
- 규모 : 1층, 2층, 옥상 테라스(야외)
- 운영 시간
- 평일 : 00:00 ~ 24:00
- 주말 : 00:00 ~ 24:00
- 혼잡도
- 평일 : 보통
- 주말 : 보통(오전: 여유, 오후: 혼잡)
- 가격대 : 7,000 ~ 20,000
- 책상 및 의자 특징
- 매우 많음
- 콘센트 유무 : 있음
- 콘센트 개수 : 많음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 연중 무휴 24시간 카페
- 매우 넓음
- 당일 두번째 주문 부터 커피음료 50% 할인
- 지하 주차장 5자리있지만 거의 주차 불가능
- 대부분 주변에 주정차 해둠
- 1층 분위기는 밝고 대화하는 일반 손님들이 많음
- 2층 분위기는 차분하고 공부하는 손님들이 많음
- 자리마다 콘센트 및 스탠드 조명 있음
### 강원
### 충북
### 충남
### 전북
### 전남
#### [스타벅스 목포평화광장점](http://naver.me/GjRGzSGC)
- 위치 : 전남 목포시 미항로 137
- 규모 : 3층
- 운영 시간
- 평일 : 09:00 ~ 22:00
- 주말 : 09:00 ~ 22:00
- 혼잡도
- 평일 : 여유
- 주말 : 혼잡
- 가격대 : 4,000 ~ 8,000
- 책상 및 의자 특징
- 원목 책상 / 의자
- 원형 테이블
- 콘센트 유무 : 있음
- 콘센트 개수 : 많음
- 와이파이 유무 : 있음
- 와이파이 속도 : 쾌적함
- 기타 특징
- 평일과 주말에도 코로나로 인하여서 사람이 적음
- 야외 테라스가 있으며, 테라스에도 테이블이 있고 바로 앞에 바다가 보임
- 바다가 바로 앞에 있으며, 도심지와 가까움
- 최근에 리모델링을 진행하여서 깔끔함
### 경북
### 경남
### 제주
## 도움을 주신 분들
- TBD
## 기여 방법
[`CONTRIBUTING.md`](/CONTRIBUTING.md)를 읽고 기여해주세요!
## 라이선스
<img align="right" src="http://opensource.org/trademarks/opensource/OSI-Approved-License-100x137.png">
The class is licensed under the [MIT License](http://opensource.org/licenses/MIT):
Copyright © 2022 [Chris Ohk](http://www.github.com/utilForever).
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| ☕ 모각코하기 좋은 국내 카페 리스트 | null | 0 | 32 | 38 | 123 | 1 | 1 | 0 |
hongyonghan/Docker_Microsoft365_E5_Renew_X | **制作不易,欢迎Star!!!**
本文是基于作者SundayRX提出的E5 调用API续订服务:Microsoft 365 E5 Renew X的基础上提出的Docker版本的E5调用API续订服务。
基础的账号注册等过程见SundayRX的博客:https://blog.csdn.net/qq_33212020/article/details/119747634
**本项目主要为学习Dockerfile和Docker的部署使用,禁止将此项目进行商业化,仅推荐学习使用。**
【20240307更新】修改密码的位置。密码的设置文件为容器中/app/Deploy目录下的Config.xml文件,修改内容为<LoginPassword>123456</LoginPassword>,将123456修改成自己的密码即可。
【20240115更新】内测:更新了通用版本。支持了多种CPU架构,包括linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v5,linux/arm64/v7。
【20230430更新】收到反馈,已经有部分同学的账号被强制关停。
【20230402更新】增加了邮箱通知功能。
## 支持版本
| CPU架构 | 是否支持 |
| :------------: | :------: |
| linux/amd64 | 是 |
| linux/arm64 | 是 |
| linux/arm/v7 | 是 |
| linux/arm/v5 | 是 |
| Linux/arm64/v7 | 是 |
**优点:**
- 镜像小,仅仅225M,可以轻松部署在任何配置的服务器上,占用资源小
- 部署方便,仅仅使用一行命令即可完成部署。
- 可以邮件通知。
- 可以部署在多种服务器架构上等等。
**你需要有:**
- 有Docker的环境,了解Docker的基本命令(没有也没有关系,可以很快学会)。
- 有一个服务器/群晖NAS等。
<details>
<summary><h3> 一些Docker环境安装的教程</h3></summary>
- Docker环境搭建:https://www.jianshu.com/p/996e08b7976d
- 史上最全Docker环境安装指南:https://zhuanlan.zhihu.com/p/82269806
</details>
<details>
<summary><h3> 部署步骤</h3></summary>
1. 运行MS365 E5 Renew X镜像,得到容器。
```
docker run -d -p 1066:1066 -e TZ=Asia/Shanghai -e sender="by123@163.com" -e pwd="UNxxxxxxxxN" -e receiver="4dddqqq9dd6@qq.com" -e adminpwd="123456" hanhongyong/ms365-e5-renew-x:pubemail
```
修改-e后面的内容,其中 sender = '123456@163.com'为发送邮件的邮箱。
receiver = '789456@qq.com'为接收邮件的邮箱。其中pwd为发送邮箱的授权码。授权码获取方式为,进入网页版163邮箱,点击设置,点击POP3/SMTP/IMAP,点击授权密码管理,新增授权码即可。
adminpwd为web界面的登录密码。
2. 服务访问:输入ip:1066.
![image-20220211205438949](README.assets/image-20220211205438949.png)
</details>
<details>
<summary><h3>通用版(20240115更新)这个版本支持了多种CPU架构,包括linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v5,linux/arm64/v7。</h3></summary>
- 增加了通用版本:这个版本支持了多种CPU架构,包括linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v5,linux/arm64/v7。
- 这个版本后续不增加其他新的功能,需要手动去设置密码(版本太多,有些指令不同版本不一样),如果你有其他版本需求,欢迎发issue.
```
docker run -d -p 1066:1066 -e TZ=Asia/Shanghai --name ms365 hanhongyong/ms365-e5-renew-x:general
```
</details>
<details>
<summary><h3>Email通知功能(推荐,20230402更新。)</h3></summary>
- email通知版本主要实现了检测部署的账号是否全部都正常运行。该版本会每天定时发送邮件来通知是否账号全部运行。
- 该版本内测使用了一个月,目前没发现什么太大的问题。
- 关于修改通知邮箱。推荐使用163邮箱。修改-e后面的内容,其中 sender = '123456@163.com'为发送邮件的邮箱。
receiver = '789456@qq.com'为接收邮件的邮箱。其中pwd为发送邮箱的授权码。授权码获取方式为,进入网页版163邮箱,点击设置,点击POP3/SMTP/IMAP,点击授权密码管理,新增授权码即可。
adminpwd为web界面的登录密码。
- 关于版本。已发布x86机器和arm64v8,其他版本需要可以发issue,会尽快补充。
- 发送邮件的日志的位置:/opt/test.log
- 发送邮件的时间为每天18点。可以通过crontab命令修改。
- x86版本:
docker run -d -p 1066:1066 -e TZ=Asia/Shanghai -e sender="by123@163.com" -e pwd="UNxxxxxxxxN" -e receiver="4dddqqq9dd6@qq.com" -e adminpwd="123456" hanhongyong/ms365-e5-renew-x:pubemail
- arm64v8版本:
docker run -d -p 1066:1066 -e TZ=Asia/Shanghai -e sender="byxxx@163.com" -e pwd="UxxxxWWN" -e receiver="41xxxxx@qq.com" -e adminpwd="123456" hanhongyong/ms365-e5-renew-x:arm64v8
</details>
<details>
<summary><h3> 监控网站运行(推荐部署)</h3></summary>
[见文档](https://github.com/hongyonghan/Docker_Microsoft365_E5_Renew_X/blob/main/monitoring_service.md/)
</details>
<details>
<summary><h3> 定制版(高级操作,主要是为了高级用户分享自己的站点给别人等操作。小白无需使用。)</h3></summary>
```
docker run -d -p 1066:1066 -v /root/Docker_Microsoft365_E5_Renew_X/Microsoft365_E5_Renew_X/Deploy:/app/Deploy hanhongyong/ms365-e5-renew-x:latest
```
其中-p为暴露服务器的端口(前面的1066,可以自行修改)和暴露容器的端口(后面的1066,可以自行修改,这个端口是在Config.xml中指定的开放的端口);-v为数据卷的挂载,前面的Deploy指的是服务器中的Deploy文件夹(可以修改,但是必须是绝对路径),/app/Deploy指的是容器内的文件夹(不能修改);--name为容器的名字。
</details>
<details>
<summary> <h3>备份和迁移:</h3></summary>
所有的配置文件都放在/app文件路径下,如果您以后有迁移的需要可以用命令将容器中/app路径下的文件复制出来。或者在一开始的时候就可以挂载数据卷到您的之前的全部文件中。如:
```
docker run -d -p 1066:1066 -v /root/Docker_Microsoft365_E5_Renew_X/Microsoft365_E5_Renew_X/:/app/ hanhongyong/ms365-e5-renew-x:latest
```
如此便可以实现您所要求的配置文件备份的功能,且您的容器中的文件和服务器主机中文件是一样的。
</details>
<details>
<summary><h3> 轻量化镜像版本</h3></summary>
**为了使得容器更加稳定且好用(小白专用),latest版本中添加了vim等软件,并且更换了基础镜像,会有点大。如果介意,请使用slim版本**
```
docker pull hanhongyong/ms365-e5-renew-x:slim
```
下面部署命令时版本也改为slim版本即可。slim版本仅为225M。
建议使用latest版本,这个版本持续修改完善下去,slim版本仅为资源受限的主机使用。
</details>
<details>
<summary><h3>ARM64版本镜像</h3></summary>
```
docker pull hanhongyong/ms365-e5-renew-x:arm
```
```
docker run -d -p 1066:1066 -e TZ=Asia/Shanghai --name ms365 hanhongyong/ms365-e5-renew-x:arm
```
这个版本是基础版本,没有邮件通知等功能。如果需要邮件通知功能。
</details>
<details>
<summary><h3>Serverless部署</h3></summary>
没有服务器的同学们,可以使用koyeb进行部署。点击下面按钮一键部署:
> [![Deploy to Koyeb](https://www.koyeb.com/static/images/deploy/button.svg)](https://app.koyeb.com/deploy?type=docker&image=docker.io/hanhongyong/ms365-e5-renew-x&name=web-renew&ports=1066;http;/)
koyeb部署:感谢[gd1214b](https://github.com/hongyonghan/Docker_Microsoft365_E5_Renew_X/issues/5)提出的解决方案。
具体见文件: [ReadMe_Serverless.md](./ReadMe_Serverless.md)
注意:类似于heroku和koyeb等云容器平台,都会有重启实例的现象,不过heroku是每天强制重启,koyeb是隔几天重启一次。每次重启都会丢失实例在部署后的所有更改,造成数据丢失。请大家注意。感谢[ChirmyRam](https://github.com/hongyonghan/Docker_Microsoft365_E5_Renew_X/issues/15)给出的提醒。
</details>
<details>
<summary><h3>开发相关的命令(与部署无关)</h3></summary>
```
##构建镜像
docker build -t ms365-e5-renew-x .
docker tag ms365-e5-renew-x:latest hanhongyong/ms365-e5-renew-x:latest
#上传镜像
docker push hanhongyong/ms365-e5-renew-x:latest
#登录dockerhub
docker login
#使用buildx编译arm架构的镜像
docker buildx build --push --tag hanhongyong/ms365-e5-renew-x:arm --platform linux/arm64/v8 -f Dockerfile_arm .
```
</details>
### 赞助我
项目会持续更新,大家有啥问题可以发issue。如果可以的话,欢迎大家赞助一元钱。
![image-20220211205438949](README.assets/zhifubao.jpg)
### Starchart
![Star History Chart](https://api.star-history.com/svg?repos=hongyonghan/Docker_Microsoft365_E5_Renew_X&type=Date)
**制作不易,欢迎Star!!!**
GitHub:https://github.com/hongyonghan/Docker_Microsoft365_E5_Renew_X
Dockerhub:https://hub.docker.com/r/hanhongyong/ms365-e5-renew-x
CSDN:https://blog.csdn.net/qq_40605167/article/details/122888580
| Docker版本的E5调用API续订服务:Microsoft 365 E5 Renew X | null | 0 | 1 | 1 | 78 | 16 | 1 | 0 |
starsliao/TenSunS | <div align="center">
[![StarsL.cn](https://img.shields.io/badge/website-StarsL.cn-orange)](https://starsl.cn)
[![Commits](https://img.shields.io/github/commit-activity/m/starsliao/ConsulManager?color=ffff00)](https://github.com/starsliao/ConsulManager/commits/main)
[![open issues](http://isitmaintained.com/badge/open/starsliao/ConsulManager.svg)](https://github.com/starsliao/ConsulManager/issues)
[![Python](https://img.shields.io/badge/python-%3C=v3.10-3776ab)](https://nodejs.org)
[![Node.js](https://img.shields.io/badge/node.js-%3E=v14-229954)](https://nodejs.org)
[![GitHub license](https://img.shields.io/badge/license-WTFPL-blueviolet)](https://github.com/starsliao/ConsulManager/blob/main/LICENSE)
[![OSCS Status](https://www.oscs1024.com/platform/badge/starsliao/ConsulManager.svg?size=small)](https://www.murphysec.com/dr/Zoyt5g0huRavAtItj2)
</div>
![tensuns-arch](https://raw.githubusercontent.com/starsliao/TenSunS/main/screenshot/tensuns-arch.png)
- **v1.0.0开始支持自定义登录页,登录后你可以在`系统设置`中自定义登录页:[欢迎Show出你的登录页](https://github.com/starsliao/TenSunS/issues/75)。**
- **如果你觉得本项目还不错,[烦请在这里留下脚印](https://github.com/starsliao/TenSunS/issues/74),简单登记下,也可以分享您的使用经验与实践,感谢支持!**
## 🏷目录
* [🚀概述](#概述)
* [🌈功能描述](#功能描述)
* [💾部署说明](#部署说明)
* [📌更新记录](#更新记录)
* [🎨截图预览](#截图预览点击查看完整截图)
* [🥇最佳实践](#最佳实践)
* [💖特别鸣谢](#特别鸣谢)
## 🦄概述
>**后羿 - TenSunS**(原ConsulManager)是一个使用Flask+Vue开发,基于Consul的WEB运维平台,弥补了Consul官方UI对Services管理的不足;并且基于Consul的服务发现与键值存储:实现了Prometheus自动发现多云厂商各资源信息;基于Blackbox对站点监控的可视化维护;以及对自建与云上资源的优雅管理与展示。
## 🌈功能描述
### 🎡1. Consul管理(比官方更优雅的Consul Web UI)
- 支持Consul Services的增删改查,可以批量删除Service。
- 直观的查看每个Services实例的信息,及整体Services的健康状态。
- 可以便捷的对Services实例的Tags、Meta、健康检查配置管理与查询。
### 💎2. 自建与云资源监控管理(ECS/RDS/Redis)
>**基于Consul实现Prometheus监控目标的自动发现。**
- ✔**当前已支持对接阿里云、腾讯云、华为云。**
- ⭐支持多云ECS/RDS/Redis的**资源、分组、标签**自动同步到Consul并接入到Prometheus自动发现!(并提供云资源信息查询与自定义页面)
- ⭐支持多云ECS信息自动同步到**JumpServer**。
- ⭐支持多云**账户余额**与云资源**到期日**设置阈值告警通知。
- ⭐支持作为Exporter接入Prometheus:Prometheus增加ConsulManager的JOB后可抓取云厂商的部分MySQL/Redis指标。(弥补原生Exporter无法获取部分云MySQL/Redis指标的问题)
- ✔**支持自建主机/MySQL/Redis**接入WEB管理,支持增删改查、批量导入导出,自动同步到Consul并接入到Prometheus监控!
- ✔提供了按需生成Prometheus配置与ECS/MySQL/Redis告警规则的功能。
- ✔设计了多个支持同步的各字段展示的Node_Exporter、Mysqld_Exporter、Redis_Exporter Grafana看板。
### 🚀3. 站点与接口监控管理
>**基于Consul + Prometheus + Blackbox_Exporter实现站点的自动发现与监控。**
- 使用Web页面即可对监控目标增删改查,支持站点的分级分组查询管理。
- 支持对监控目标的批量删除与批量导入,数据实时同步到Consul。
- 提供了Blackbox的配置、Prometheus的配置以及Prometheus站点监控的告警规则。
- 设计了一个支持各分级分组字段展示的Blackbox_Exporter Grafana看板。
### 💫4. 高危漏洞采集与实时告警
- 增加了高危风险漏洞采集与实时告警通知功能。
- 功能开启即可采集最新30个漏洞列表。
- 每小时采集一次,发现新漏洞立即推送到群机器人。
- 支持企微、钉钉、飞书群机器人通知。
---
## 💾部署说明
#### ♨TenSunS 版本更新只需在`docker-compose.yaml`所在目录执行`docker-compose pull && docker-compose up -d`即可完成更新。
#### 💥新增基于docker/K8S的一键部署脚本,Consul独立部署脚本,安装脚本统一放置install目录
##### 基于docker-compose安装
- [`install/docker-compose/all_install.sh`](https://github.com/starsliao/TenSunS/blob/main/install/docker-compose/all_install.sh)(**推荐**):
1. **前提**服务器需要先安装好**docker和docker-compose**
2. **一键安装**:`curl -s https://starsl.cn/static/img/all_install.sh|sudo bash`
3. 运行该脚本后会使用docker-compose启动TenSunS和Consul,安装路径是:/opt/tensuns
4. 脚本运行完成后会有使用提示及自动生成登录密码,**打开浏览器立刻登录TenSunS,开始体验吧!**
- [`install/docker-compose/consul_install_only.sh`](https://github.com/starsliao/TenSunS/blob/main/install/docker-compose/consul_install_only.sh) 独立的Consul安装脚本
- [`install/docker-compose/tensuns_install_only.sh`](https://github.com/starsliao/TenSunS/blob/main/install/docker-compose/tensuns_install_only.sh) 独立的TenSunS安装脚本(已经有Consul的用户可以使用这个脚本)
##### 基于K8S安装
- [`install/k8s/install.sh`](https://github.com/starsliao/TenSunS/blob/main/install/k8s/install.sh):
1. 运行后需要设置admin用户的密码。
2. 脚本执行完成后**只会生成TenSunS的安装yaml文件和Consul的安装yaml文件**,不会做其它操作,需要执行`kubectl apply`命令来完成安装。
>TenSunS是无状态的,有一个初始化容器检查consul连接是否成功,所以建议先安装Consul。Consul是StatefulSet,需要先配置好存储(volumeClaimTemplates),默认是华为云自动创建存储的配置例子,请自行参考修改。
3. 完成安装后即可使用任意K8S节点IP+31026端口访问,调用的service是tensuns。
##### 注意
- 所有安装方式Consul的管理token会自动生成,可以在Consul的配置文件或TenSunS的docker-compose中查看。
- 已经部署Consul的用户可以在TenSunS的docker-compose.yaml或者K8S yaml文件的环境变量部分找到:`consul_token`,`consul_url`,并配置上你的Consul信息;环境变量`admin_passwd`是TenSunS登录admin账号的密码。
- **安装使用中遇到问题,以及问题排查,请参考:[FAQ](https://github.com/starsliao/ConsulManager/blob/main/docs/FAQ.md)**
##### 🎉活动
- **登录后你可以在`系统设置`中来`自定义登录页`:[欢迎Show出你的登录页](https://github.com/starsliao/TenSunS/issues/75)。**
- **如果你觉得本项目还不错,[烦请在这里留下脚印](https://github.com/starsliao/TenSunS/issues/74),简单登记下,也可以分享您的使用经验与实践,感谢支持!**
## 📌[更新记录](https://github.com/starsliao/ConsulManager/releases)
## 🎨截图预览([点击查看完整截图](https://github.com/starsliao/ConsulManager/tree/main/screenshot#%E6%88%AA%E5%9B%BE))
<details><summary>💥点击展开</summary>
### Consul Web Manager 界面
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/screenshot/consul3.PNG)
### 多云ECS同步Consul界面
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/screenshot/ecs1.PNG)
### 多云ECS同步JumpServer界面
![图片](https://user-images.githubusercontent.com/3349611/180870935-56e536d2-0b71-4803-b5f8-0839a241c79a.png)
### Node Exporter Dashboard 截图
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/vue-consul/public/node1.png)
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/vue-consul/public/node2.png)
### Blackbox Manager 界面
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/screenshot/blackbox1.PNG)
### Blackbox Exporter Dashboard 截图
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/vue-consul/public/blackbox.png)
### 高危漏洞采集与通知 界面
![](https://raw.githubusercontent.com/starsliao/ConsulManager/main/screenshot/bug.png)
##### 钉钉告警通知
![图片](https://user-images.githubusercontent.com/3349611/173263960-4d69fff9-82fe-42a1-ba18-4c78775cf35e.png)
</details>
---
## 🥇最佳实践
- #### [TenSunS:实践与FAQ](https://github.com/starsliao/ConsulManager/tree/main/docs)
- #### [应用场景1:如何优雅的基于Consul自动同步ECS主机监控](https://github.com/starsliao/ConsulManager/blob/main/docs/ECS%E4%B8%BB%E6%9C%BA%E7%9B%91%E6%8E%A7.md)
- #### [应用场景2:如何优雅的使用Consul管理Blackbox站点监控](https://github.com/starsliao/ConsulManager/blob/main/docs/blackbox%E7%AB%99%E7%82%B9%E7%9B%91%E6%8E%A7.md)
- #### [应用场景3:如何把云主机自动同步到JumpServer](https://github.com/starsliao/ConsulManager/blob/main/docs/%E5%A6%82%E4%BD%95%E6%8A%8A%E4%B8%BB%E6%9C%BA%E8%87%AA%E5%8A%A8%E5%90%8C%E6%AD%A5%E5%88%B0JumpServer.md)
- #### [应用场景4:使用1个mysqld_exporter监控所有的MySQL实例](https://github.com/starsliao/ConsulManager/blob/main/docs/%E5%A6%82%E4%BD%95%E4%BC%98%E9%9B%85%E7%9A%84%E4%BD%BF%E7%94%A8%E4%B8%80%E4%B8%AAmysqld_exporter%E7%9B%91%E6%8E%A7%E6%89%80%E6%9C%89%E7%9A%84MySQL%E5%AE%9E%E4%BE%8B.md)
- #### [应用场景5:使用1个redis_exporter监控所有的Redis实例](https://github.com/starsliao/ConsulManager/blob/main/docs/%E4%BD%BF%E7%94%A8%E4%B8%80%E4%B8%AAredis_exporter%E7%9B%91%E6%8E%A7%E6%89%80%E6%9C%89%E7%9A%84Redis%E5%AE%9E%E4%BE%8B.md)
## 💖特别鸣谢
### 赞赏与关注公众号【**云原生DevOps**】加入交流群(请备注:后羿),获取更多...
**如果看不到图片请点击该链接:[https://starsl.cn/static/img/thanks.png](https://starsl.cn/static/img/thanks.png)**
![](https://starsl.cn/static/img/thanks.png)
---
### 💰赞赏
##### 🥇榜一大哥:**@浩哥**
##### 🥈榜二大哥:**@南城阿宇** **@weibw**
##### 🥉榜三大哥:**@新的奇迹** **@李宫俊** **@锋** **@小明SQLBOY** **@Swancavalier**
##### 🏆榜N大哥:@老叶 @mac🐬 🌈 @Stephen @蔡志昆 @风与尘的誓约 @Initᯤ⁶ᴳ @254209 @Runner91 @烂泥 @ASL·D·阿威 @惊雷 @默读自我 @MiracleWong
---
### ✅提交代码
[@dbdocker](https://github.com/dbdocker) [@anatsking](https://github.com/anatsking)
---
### 🎃提交bug与建议
@会飞的鱼 [@奈](https://github.com/Wp516781950) @Swancavalier [@Show_Lo](https://github.com/ShowXian) @郑不错 @init @weibw @Martin [@dong9205](https://github.com/dong9205) @MiracleWong [@dissipator](https://github.com/dissipator) @烂泥 [@SkipperSky](https://github.com/klllmxx)
---
### 🏆开源推荐
[🌉Go-Ldap-Admin: 基于Go+Vue实现的openLDAP后台管理项目](https://github.com/eryajf/go-ldap-admin)
---
## 💖感谢伟大的[Flask](https://github.com/pallets/flask)、[VUE](https://github.com/vuejs/vue)、[vue-admin-template](https://github.com/PanJiaChen/vue-admin-template)
| 🦄后羿 - TenSunS(原ConsulManager):基于Consul的运维平台:更优雅的Consul管理UI&多云与自建ECS/MySQL/Redis同步Prometheus/JumpServer&ECS/MySQL/Redis云监控指标采集&Blackbox站点监控维护&漏洞通知/资源到期余额告警&各类资源Grafana看板展示 | consul,blackbox-exporter,prometheus,node-exporter | 25 | 6 | 11 | 614 | 15 | 1 | 0 |
academind/react-native-practical-guide-code | # React Native - The Practical Guide Code & Course Materials
This repository contains code snapshots and other attachments (e.g., slides) for our [React Native - The Practical Guide](https://acad.link/react-native) course.
You may use the provided resources to follow along with the course, debug your code or to compare your solution to Maximilian's. Re-distributing course materials (including the content provided with this repository) is not permitted.
# How To Use
This repository contains multiple [branches](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches). Every branch represents a course section and contains the resources that belong to that section.
For example, the branch [02-basics](https://github.com/academind/react-native-practical-guide-code/tree/02-basics) contains all course resources (e.g., code snapshots) that belong to section 2 ("React Native Basics") of the course.
You can switch branches via the dropdown in the top left corner of this repository page:
![Selecting a branch](./selecting-branches.png)
# Provided Resources
In most branches (i.e., for most course sections), you find the following folders in the repository branch:
- **`/code`**: Contains multiple subfolders with different code snapshots for this course section (also see [Using Code Snapshots](#using-code-snapshots))
- **`/slides`**: Contains section slides (if slides were shown / used in the section)
- **`/extra-files`**: Contains any extra files that were used (e.g., image assets that were used in the section)
# Using Code Snapshots
Code snapshots (which you find in `/code`) are there for you to compare your code to mine and find + fix errors you might have in your code.
You can either view my code directly here on Github (you can open + view code files without issues here) or you download the snapshots. To download (or [clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository)) the snapshots, simply use the **"Code" button** in the top right corner of the repository. This allows you to download the currently selected branch. You can then browse the code snapshots locally on your machine.
The subfolders in the `/code` folder are named such that mapping them to the course lectures is straightforward.
# Running The Provided Code
The provided code is primarily meant to be used for code comparisons (i.e., so that you can compare your code to mine to find + fix errors).
But you can also run my project code by navigating into the respective code snapshots subfolder (i.e., a subfolder in the `/code` folder) and executing `npm install` followed by `npm start` there.
Please note that dependency mismatches could lead to errors here, even if the provided code itself still works and is correct. In addition, you will always need to bring your own backend URLs (e.g., Firebase) or API keys, if any were used in the course section! | Course code & attachments for our "React Native - The Practical Guide" (https://acad.link/react-native) course. | null | 0 | 2 | 15 | 3 | 9 | 16 | 0 |
diamondburned/dissent | <div align="center">
![Dissent logo](./internal/icons/hicolor/scalable/apps/so.libdb.dissent.svg)
<h1>Dissent</h1>
<img src="./.github/screenshots/03.png" alt="Screenshot 3" width="800">
<div>
<a href="./.github/screenshots/03.png"><img src="./.github/screenshots/03.png" alt="Screenshot 3" width="150"></a>
<a href="./.github/screenshots/01.png"><img src="./.github/screenshots/01.png" alt="Screenshot 1" width="150"></a>
<a href="./.github/screenshots/02.png"><img src="./.github/screenshots/02.png" alt="Screenshot 2" width="150"></a>
<a href="./.github/screenshots/04.png"><img src="./.github/screenshots/04.png" alt="Screenshot 4" width="150"></a>
</div>
</div>
<br>
<div>
<a href="https://github.com/diamondburned/dissent/releases/latest"><img height="22" src="https://img.shields.io/github/downloads/diamondburned/dissent/total?label=GitHub%20Downloads&logo=github" alt="GitHub download count"></a>
<a href="https://flathub.org/apps/so.libdb.dissent"><img height="22" src="https://img.shields.io/flathub/downloads/so.libdb.dissent?logo=flathub&logoColor=white&label=Flatpak%20Installs&color=%233d7fcd" alt="Flathub download count"></a>
<a href="https://github.com/diamondburned/dissent/releases/latest"><img height="22" src="https://img.shields.io/github/v/tag/diamondburned/dissent?filter=!nightly&label=Latest%20Release&color=blue" alt="Latest release"></a>
<a href="https://repology.org/project/dissent/versions"><img height="22" src="https://img.shields.io/repology/repositories/dissent?label=Packaged Distros" alt="Packaging status"></a>
<a href="https://goreportcard.com/report/github.com/diamondburned/dissent"><img height="22" src="https://goreportcard.com/badge/github.com/diamondburned/dissent" alt="Go Report Card"></a>
</div>
<br>
Dissent (previously gtkcord4) is a third-party Discord client designed for a
smooth, native experience on Linux desktops.
Built with the GTK4 and libadwaita for a modern look and feel, it delivers your
favorite Discord app in a lightweight and visually appealing package.
## Features
Dissent offers a streamlined Discord experience, prioritizing simplicity and
speed over feature completeness on par with the official client. Here's what
you can expect:
- Text chat with complete Markdown and custom emoji support
- Guild folders and channel categories
- Tabbed chat interface
- Quick switcher for channels and servers
- Image and file uploads, previews, and downloads
- User theming via custom CSS
- Partial thread/forum support
- Partial message reaction support
- Partial AI summary support (provided by Discord)
It does not aim to support voice chat and other advanced features, as these are
best handled by the official client or the web app.
## Installation
### Flatpak
Dissent is available on Flathub:
<a href="https://flathub.org/apps/details/so.libdb.dissent">
<img src="https://flathub.org/api/badge?svg&locale=en" alt="Download on Flathub" width="220">
</a>
### Pre-built Downloads
You can download Dissent as a pre-built binary for the following platforms by
clicking on the below badges. These are automatically built and uploaded by
GitHub Actions on each release.
<div>
<a href="https://github.com/diamondburned/dissent/releases/latest/download/dissent-windows-amd64.exe">
<img height="24" alt="Windows x86_64" src="https://img.shields.io/badge/Windows-Download%20for%20x86__64-grey?style=flat&logo=windows11&labelColor=%23357EC7&cacheSeconds=999999999" />
</a>
<br>
<a href="https://github.com/diamondburned/dissent/releases/latest/download/dissent-linux-amd64.tar.zst">
<img height="24" alt="Linux x86_64" src="https://img.shields.io/badge/Linux-Download%20for%20x86__64-grey?style=flat&logo=linux&logoColor=black&labelColor=%23ffcc33&cacheSeconds=999999999" />
</a>
<br>
<a href="https://github.com/diamondburned/dissent/releases/latest/download/dissent-linux-arm64.tar.zst">
<img height="24" alt="Linux Aarch64" src="https://img.shields.io/badge/Linux-Download%20for%20AArch64-grey?style=flat&logo=linux&logoColor=black&labelColor=%23ffcc33&cacheSeconds=999999999" />
</a>
</div>
#### Dependencies
- Linux: Dissent needs GTK4, gobject-introspection, and optionally
libcanberra. If compiling, then the library headers are also required.
- Windows: all the needed dependencies are bundled in the executable.
### Distribution Packages
Dissent is available in the distribution repositories below. Click on the badge
to see the available versions and installation instructions.
<a href="https://repology.org/project/dissent/versions">
<img src="https://repology.org/badge/vertical-allrepos/dissent.svg" alt="Packaging status" width="200">
</a>
### Compiling
You need Go 1.21+ for this step. To compile Dissent and install it into `$GOBIN`, run:
```sh
go install -v libdb.so/dissent@latest
```
> [!NOTE]
> Compiling is known to take at least 20 minutes on a modern system due
> to CGo. This is normal and expected, but it is still recommended to use a
> pre-built binary if available.
## Logging In
To log into Dissent, you can either use your token (recommended) or login using
your username and password. Here's how you can obtain your token:
1. Open the Discord web app in your browser and log in.
2. Press <kbd>F12</kbd> to open the Inspector.
3. Go to the Network tab then press <kbd>F5</kbd> to refresh the page.
4. In the 'Filter URLs' text box, search `discord api`.
5. Click on any HTTP message entry and inspect its message headers. Under
the 'Request Headers' section, search for the `Authorization` header.
6. Copy its value (the token) into the Token field, then click Login.
> [!WARNING]
> Logging in using username/email and password is strongly discouraged. This
> method is untested and may cause your account to be banned! Prefer using the
> token method above.
> [!IMPORTANT]
> Using an unofficial client at all is against Discord's Terms of Service and
> may cause your account to be banned! While Dissent tries its best to not use
> the REST API at all unless necessary to reduce the risk of abuse, it is still
> possible that Discord may ban your account for using it.
>
> **Please use Dissent at your own risk!**
| Tiny native Discord app | discord,discord-client,gtkcord4,adwaita,gnome,gtk4 | 30 | 11 | 44 | 545 | 98 | 13 | 3 |
squidowl/halloy | # Halloy - IRC Client
![banner](https://github.com/squidowl/halloy/assets/2248455/57144563-02aa-40ed-a626-35d2a731a82a)
![halloy](./assets/animation.gif)
Halloy is an open-source IRC client written in Rust, with the Iced GUI library. It aims to provide a simple and fast client for Mac, Windows, and Linux platforms.
For more information, see the [website](https://halloy.squidowl.org).
Join **#halloy** on libera.chat if you have questions or looking for help.
## Installation
[Installation documentation](https://halloy.squidowl.org/installation.html)
<a href="https://repology.org/project/halloy/versions">
<img src="https://repology.org/badge/vertical-allrepos/halloy.svg" alt="Packaging status">
</a>
Halloy is also available from [Flathub](https://flathub.org/apps/org.squidowl.halloy) and [Snap Store](https://snapcraft.io/halloy).
## Features
* IRCv3.2 capabilities
* [away-notify](https://ircv3.net/specs/extensions/away-notify)
* [batch](https://ircv3.net/specs/extensions/batch)
* [server-time](https://ircv3.net/specs/extensions/server-time)
* [labeled-response](https://ircv3.net/specs/extensions/labeled-response)
* [echo-message](https://ircv3.net/specs/extensions/echo-message)
* [invite-notify](https://ircv3.net/specs/extensions/invite-notify)
* [userhost-in-names](https://ircv3.net/specs/extensions/userhost-in-names)
* [sasl-3.1](https://ircv3.net/specs/extensions/sasl-3.1)
* [cap-notify](https://ircv3.net/specs/extensions/capability-negotiation.html#cap-notify)
* [multi-prefix](https://ircv3.net/specs/extensions/multi-prefix)
* [message-tags](https://ircv3.net/specs/extensions/message-tags)
* [`WHOX`](https://ircv3.net/specs/extensions/whox)
* [`UTF8ONLY`](https://ircv3.net/specs/extensions/utf8-only)
* SASL support
* DCC Send
* Keyboard shortcuts
* Auto-completion for nicknames, commands, and channels
* Notifications support
* Multiple channels at the same time across servers
* Commandbar for for quick actions
* Custom themes
* Portable mode
## Why?
<a href="https://xkcd.com/1782/">
<img src="https://imgs.xkcd.com/comics/team_chat.png" title="2078: He announces that he's finally making the jump from screen+irssi to tmux+weechat.">
</a>
## License
Halloy is released under the GPL-3.0 License. For more details, see the [LICENSE](LICENSE) file.
## Contact
For any questions, suggestions, or issues, please open an issue on the [GitHub repository](https://github.com/squidowl/halloy/issues).
<a href="https://github.com/iced-rs/iced">
<img src="https://gist.githubusercontent.com/hecrj/ad7ecd38f6e47ff3688a38c79fd108f0/raw/74384875ecbad02ae2a926425e9bcafd0695bade/color.svg" width="130px">
</a>
| IRC application written in Rust | irc,rust,iced | 11 | 24 | 226 | 1,012 | 37 | 4 | 4 |
trickest/inventory | <h1 align="center">Inventory <a href="https://twitter.com/intent/tweet?text=Inventory%20-%20Asset%20Inventory%20of%20public%20bug%20bounty%20programs.%20https://github.com/trickest/inventory%20by%20%40trick3st&hashtags=security,bugbounty,bugbountytips,assets,infosec,cybersecurity,recon,reconnaissance"><img src="https://img.shields.io/badge/Tweet--lightgrey?logo=twitter&style=social" alt="Tweet" height="20"/></a></h1>
<h3 align="center">Attack Surface Management of public bug bounty programs.</h3>
The data we collect here includes DNS and Web Server data of public bug bounty programs.
Our aim with this project is to:
- Monitor [over 800](targets.json) companies for new assets
- help bug bounty hunters get up and running on new programs as quickly as possible.
- give security teams better visibility into their assets.
- reduce the load and noise that some programs face from automated tools (we run them on schedule, and give the results to everyone)
[<img src="screenshots/banner.png" />](https://trickest.io/auth/register)
## How it works
The setup consists of two workflows
* Inventory 3.0 - Targets
* Inventory 3.0
### Inventory 3.0 - Targets
This workflow streamlines the consolidation of bug bounty program data from various sources, ensuring a comprehensive and organized view. Let's break it down:
1. **Data collection**: The workflow fetches data from two important sources:
- [Bounty Targets Data](https://github.com/arkadiyt/bounty-targets-data): This repository contains a wealth of bug bounty program information.
- [Chaos Public Bug Bounty Programs](https://github.com/projectdiscovery/public-bugbounty-programs): It provides additional valuable bug bounty program data.
2. **Data transformation**: The collected data undergoes transformation using Python scripts. The scripts convert the data into a specific format, ensuring consistency and ease of analysis. You can find the detailed data format in the [targets.json](targets.json) file.
3. **Program merging**: To avoid duplication, the workflow merges programs with the same URL together. This consolidation eliminates redundancies and presents a unified view of bug bounty programs.
4. **Community program inclusion**: The workflow incorporates an additional set of programs from the [community.json](community.json) file. These programs are merged with the existing dataset, enhancing its coverage and diversity.
5. **Final output**: The workflow generates a final consolidated JSON file, [targets.json](targets.json), which encompasses all the merged bug bounty program data. This file serves as a valuable resource for bug bounty researchers, providing a centralized and comprehensive view of programs.
![Trickest Targets](screenshots/inventory-3.0-targets.png)
**Note**: The screenshot above provides a visual representation of the workflow.
### Inventory 3.0
1. **Gathering the tagets**: Get the list of domains from [targets.json](targets.json), and extract program names.
2. **Making workflow run in parallel**: Extracted program names are connected `file-splitter` node to make the whole workflow distributed per program
![Trickest Parsing Targets](screenshots/inventory-3.0-parsing-targets.png)
3. **Passive Enumeration**:
* Use [subfinder](https://github.com/projectdiscovery/subfinder), [vita](https://github.com/junnlikestea/vita), [findomain](https://github.com/Findomain/Findomain) to get passive enumeration data.
* Use [mksub](https://github.com/trickest/mksub) to create a custom list of potential subdomains
* Resolve with [puredns](https://github.com/d3mondev/puredns) and [trickest resolvers](https://github.com/trickest/resolvers)
* Generate custom-wordlists from passive results with custom bash script
![Trickest Passive Enumeration](screenshots/inventory-3.0-passive.png)
4. **Active Enumeration**
* Use passive enumeration data and create a new bruteforce wordlist
* Use [dsieve](https://github.com/trickest/dsieve) to get environments per subdomain level
* Generate new potential subdomains with [mksub](https://github.com/trickest/mksub) and custom wordlist, with additional [level2.txt wordlist](https://github.com/trickest/wordlists/blob/main/inventory/levels/level2.txt)
* Resolve again with [puredns](https://github.com/d3mondev/puredns)
![Trickest Active Enumeration](screenshots/inventory-3.0-environments.png)
5. **Permutations**
* Merge active and passive results from previous steps
* Extract environments per subdomain level again
* Use [alterx](https://github.com/projectdiscovery/alterx) to generate permutations and resolve with [puredns](https://github.com/d3mondev/puredns)
![Trickest Permutations](screenshots/inventory-3.0-permutations.png)
6. **Collecting previous results**
* Use python script that will get all of the previous `hostnames.txt` per program
* Use [anew](https://github.com/tomnomnom/anew) to get the new hostnames found
* zip active, passive, permutations per program to be pushed to repository
![Trickest Previous Results](screenshots/inventory-3.0-previous-results.png)
7. **Reporting**
* Use [dnsx](https://github.com/projectdiscovery/dnsx) to resolve found hostnames and python script for `dns-report.csv`; mark newly found domains coming from [anew](https://github.com/tomnomnom/anew) with `[x]`
* Use [httpx](https://github.com/projectdiscovery/httpx) to gather web servers and python script for `server-report.csv
* Push to the repository
![Trickest Reporting](screenshots/inventory-3.0-reporting.png "Trickest Workflow - Inventory 3.0 - Targets")
### Final workflow
![Trickest Inventory 3.0 Workflow](screenshots/inventory-3.0.png "Trickest Workflow - Inventory 3.0 - Targets")
---
> **Note**: As described, almost everything in this repository is generated automatically. We carefully designed the workflows (and continue to develop them) to ensure the results are as accurate as possible.
## Contribution
All contributions/ideas/suggestions are welcome! If you want to add/edit a target/workflow, feel free to send us a PR with new targets through [community.json](community.json), tweet at us [@trick3st](https://twitter.com/trick3st), or join the conversation on [Discord](https://discord.gg/7HZmFYTGcQ).
## Build your own workflows!
We believe in the value of tinkering. Sign up for a demo on [trickest.com](https://trickest.com) to customize this workflow to your use case, get access to many more workflows, or build your own from scratch!
[<img src="screenshots/banner.png" />](https://trickest.io/auth/register) | Asset inventory of over 800 public bug bounty programs. | security,bugbounty,bugbountytips,infosec,reconnaissance,recon,pentesting,hacking,security-tools,red-team | 0 | 9 | 10 | 12,559 | 4 | 2 | 0 |