Skip to content

Instantly share code, notes, and snippets.

View himself65's full-sized avatar

Alex Yang himself65

View GitHub Profile
@himself65
himself65 / index.ts
Created October 16, 2023 21:48
y-indexeddb example
import { setMergeCount } from '@toeverything/y-indexeddb'
// just for type check test
setMergeCount(1)
import * as React from 'react'
const mockA = new Map([
[
'react',
React
],
]);
const module = new StaticModuleRecord(`
@himself65
himself65 / CLA.md
Created February 15, 2023 23:42
BlockSuite CLA

BlockSuite Contributor License Agreement

To clarify the intellectual property license granted with contributions from any person or entity, BlockSuite must have on file a signed Contributor License Agreement ("CLA") from each contributor, indicating agreement with the license terms below. This agreement is for your protection as a contributor as well as the protection of the BlockSuite and its users; it does not change your rights to use your own contributions for any other purpose.

You accept and agree to the following terms and conditions for your past, present and future contributions submitted to BlockSuite. You should sign this agreement before submitting your first contribution. Except for the license granted herein to BlockSuite and recipients of software distributed by BlockSuite, You reserve all right, title, and interest in and to Your Contributions.

  1. Parties.

    (a) "BlockSuite" refers to the project's operator, TOEVERYTHING PTE. LTD registered in Republic of Singapore.

@himself65
himself65 / 1.txt
Created January 4, 2023 07:04
some words for the future
-----BEGIN PGP MESSAGE-----
Version: ObjectivePGP
Comment: https://www.objectivepgp.com
Charset: UTF-8
wcDMA7/6oVW1BzR+AQwAoPooOKyo2TKPj6ZLH4Orxfaxmx9N9V/Fc1RUydLIb58NL1qHnkx4x+Vv
4m9+8xKJhhJTrjT9QKsuD4YUn7oaszwcU8d7ctvK+ERrUvXC1l4B0gy6kRlP1sRBXcmPBH+e3c4q
25NlhxP8rp0q/VffWyZLl5yvb5yfjnxMifFFRPd64cdrfffFUM8D1qc3iSBKojRi1/a7R54IEwED
hag3INIRMl/F39Kved1MNBr5RqL5e4OBdUSTjnTo0mLrcddX6AK+iiQP2iLJOZR8uKDKK9GgYrtY
pZyutr5N9WK4JDE1hPeifU7VOp3MVAC8q0i7wMgKKTbvbsgGz3p89QLASAjizlwVcqFNmeINeE7D
const { MongoClient } = require('mongodb')
// Connection URL
const url = 'mongodb://localhost:27017'
const client = new MongoClient(url)
// Database Name
const dbName = 'myProject'
async function main () {
@himself65
himself65 / main.py
Created July 12, 2022 23:03
Use pydantic to genrerate standard function type
import pydantic.validators
def plus_a_b(a: int, b: int):
return a + b
result = pydantic.validate_arguments(plus_a_b)
print(result.model.schema_json(indent=2))
# {
INFO: 192.168.31.144:52267 - "POST /sentence_classification HTTP/1.1" 500 Internal Server Error
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/home/labelray/Code/NLP_server/venv/lib/python3.10/site-packages/uvicorn/protocols/http/httptools_impl.py", line 401, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/home/labelray/Code/NLP_server/venv/lib/python3.10/site-packages/uvicorn/middleware/proxy_headers.py", line 78, in __call__
return await self.app(scope, receive, send)
File "/home/labelray/Code/NLP_server/venv/lib/python3.10/site-packages/fastapi/applications.py", line 269, in __call__
await super().__call__(scope, receive, send)
File "/home/labelray/Code/NLP_server/venv/lib/python3.10/site-packages/starlette/applications.py", line 124, in __call__
Date Close/Last Volume Open High Low
04/12/2022 $167.66 79265180 $168.02 $169.87 $166.64
04/11/2022 $165.75 72246710 $168.71 $169.03 $165.5
04/08/2022 $170.09 76575510 $171.78 $171.78 $169.2
04/07/2022 $172.14 77594650 $171.16 $173.36 $169.85
04/06/2022 $171.83 89058780 $172.36 $173.63 $170.13
04/05/2022 $175.06 73401790 $177.5 $178.3 $174.415
04/04/2022 $178.44 76545980 $174.57 $178.49 $174.44
04/01/2022 $174.31 78751330 $174.03 $174.88 $171.94
03/31/2022 $174.61 103049300 $177.84 $178.03 $174.4
@himself65
himself65 / index.html
Created October 22, 2021 18:57
Blogger Code
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Example 01</title>
</head>
<body>
<h1>IndexedDB example</h1>
</body>
<script type="module">

Keybase proof

I hereby claim:

  • I am himself65 on github.
  • I am himself65 (https://keybase.io/himself65) on keybase.
  • I have a public key ASBZaZ33kwDgLhupwfqUx_Npl5fEaOADoITAx6Bv3aXXEAo

To claim this, I am signing this object: