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 functools | |
import json | |
from collections.abc import AsyncGenerator | |
from contextlib import asynccontextmanager | |
from typing import Any | |
from crpaylib.infrastructure.logger import get_logger | |
from sqlalchemy.exc import SQLAlchemyError | |
from sqlalchemy.ext.asyncio import AsyncEngine | |
from sqlalchemy.ext.asyncio import AsyncSession |
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 | |
import threading | |
class enchanted_thread(threading.Thread): | |
def __init__(self, *args, **keywords): | |
threading.Thread.__init__(self, *args, **keywords) | |
self.has_stopped = False | |
def start(self): |
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
" general config | |
set term=xterm-256color | |
set termguicolors | |
set cscopeverbose | |
set cscopetag | |
set tabstop=4 | |
set softtabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set autoindent |
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
This is the list of exit codes for wget: | |
0 No problems occurred | |
1 Generic error code | |
2 Parse error — for instance, when parsing command-line options, the .wgetrc or .netrc… | |
3 File I/O error | |
4 Network failure | |
5 SSL verification failure | |
6 Username/password authentication failure | |
7 Protocol errors |
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
package main | |
import "fmt" | |
func searchMatrix(matrix [][]int, target int) bool { | |
if len(matrix) == 0 { | |
return false | |
} | |
m, n := len(matrix), len(matrix[0]) | |
left, right := 0, m*n-1 |
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
#!/usr/bin/python | |
def combinations(digits): | |
keys = { | |
"2": "abc", | |
"3": "def", | |
"4": "ghi", | |
"5": "jkl", | |
"6": "mno", |
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
#!/usr/bin/python | |
from collections import deque | |
def combinations(digits): | |
keys = { | |
"2": "abc", | |
"3": "def", | |
"4": "ghi", |
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
#!/bin/bash | |
# | |
# Auto-rotate touch screen based on device orientation. | |
# | |
# Fedora 36 | |
# 5.17.14-300.fc36.x86_64 | |
# | |
# Cinnamon 5.2.7 | |
# | |
# You just need to add this script to the startup of applications for the user. |
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
#!/usr/bin/python | |
import aiohttp | |
import asyncio | |
from timeit import default_timer as timer | |
from time import sleep | |
async def main(): |
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
#!/usr/bin/python | |
import aiohttp | |
import asyncio | |
import httpx | |
from timeit import default_timer as timer | |
from time import sleep | |
NewerOlder