This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Netpad Player - A Nix flake for the Netpad Player application."; | |
inputs = { | |
nixpkgs.url = "github:NixOS/nixpkgs/release-24.11"; # It's generally recommended to use a stable channel, but for accessing 'electron', unstable might be needed. Adjust as necessary. | |
flake-utils.url = "github:numtide/flake-utils"; | |
}; | |
outputs = { self, nixpkgs, flake-utils }: | |
flake-utils.lib.eachDefaultSystem (system: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Auto hide liked twitter | |
// @namespace Violentmonkey Scripts | |
// @match https://twitter.com/* | |
// @match https://mobile.twitter.com/* | |
// @match https://x.com/* | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description 2/9/2025, 10:08:58 PM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Auto enable tools | |
// @namespace Violentmonkey Scripts | |
// @match https://aistudio.google.com/* | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description 1/29/2025, 7:43:30 PM | |
// ==/UserScript== | |
(function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 知乎自动跳转 fxzhihu | |
// @namespace Violentmonkey Scripts | |
// @version 0.1 | |
// @description 访问知乎自动跳转到 fxzhihu | |
// @author You | |
// @match https://www.zhihu.com/question/*/answer/* | |
// @match https://www.zhihu.com/answer/* | |
// @match https://zhuanlan.zhihu.com/p/* | |
// @match https://www.zhihu.com/pin/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//@ts-check | |
export default { | |
async fetch(request, env) { | |
try { | |
if (request.method !== 'POST') { | |
return new Response('Method not allowed', { status: 405 }); | |
} | |
const { message } = await request.json(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# only consider base case | |
from enum import Enum, auto | |
import unittest | |
import re | |
from typing import List, Union | |
class Status(Enum): | |
Normol = auto() | |
Number = auto() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# only consider base case | |
from enum import Enum, auto | |
import re | |
from typing import List, Union | |
class Status(Enum): | |
Normol = auto() | |
Number = auto() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
learned from https://www.sitepen.com/blog/unlocking-the-power-of-parser-combinators-a-beginners-guide | |
author: asuka minato | |
""" | |
from __future__ import annotations | |
import string as S | |
from dataclasses import dataclass, field | |
from typing import Callable, Dict, Iterable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
try: | |
import tomllib | |
except ImportError as e: | |
print(e, "require python 3.11, exit", file=sys.stderr) | |
exit() | |
from pathlib import Path | |
from typing import Any, Dict, List |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import annotations | |
from dataclasses import dataclass | |
from typing import Callable, List | |
from operator import attrgetter, add, sub, mul, truediv | |
def adder(a: Connector, b: Connector, c: Connector): | |
return TernaryConstraint(a, b, c, add, sub, sub) | |
NewerOlder