Skip to content

Instantly share code, notes, and snippets.

@mht-sharma
mht-sharma / onnx_trocr_inference.py
Created December 16, 2022 10:46
ONNX TrOCR Inference
import os
import time
from typing import Optional, Tuple
import torch
from PIL import Image
import onnxruntime as onnxrt
import requests
from transformers import AutoConfig, AutoModelForVision2Seq, TrOCRProcessor, VisionEncoderDecoderModel
@danieldogeanu
danieldogeanu / RenameGitBranch.md
Last active May 17, 2024 00:41
How to rename your Git master branch to main.

To rename your Git master branch to main, you must do the following steps:

  1. Navigate to your repository in the command line and issue the following commands: - git branch -m master main - git push -u origin main

  2. Change your default branch on GitHub by going to your GitHub repository in your browser, and navigate to Settings > Branches and click on the dropdown and switch from master to main and click Update (this will only show if you have two or more branches). The main branch is now your default branch.

  3. Update the tracking of the branch from your command line with the following command: - git branch -u origin/main main

@deekayen
deekayen / 1-1000.txt
Last active May 17, 2024 00:39
1,000 most common US English words
the
of
to
and
a
in
is
it
you
that
@diachedelic
diachedelic / deep-link-from-browser.js
Last active May 17, 2024 00:35
Deep link to a native app from a browser, with a fallback
@ammarshah
ammarshah / all_email_provider_domains.txt
Last active May 17, 2024 00:32
A list of all email provider domains (free, paid, blacklist etc). Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0-mail.com
007addict.com
020.co.uk
027168.com
0815.ru
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org
@mignonstyle
mignonstyle / markdown-cheatsheet.md
Last active May 17, 2024 00:27
Markdown記法 チートシート

Block Elements ## Headers 見出し 先頭に#をレベルの数だけ記述します。 ```

見出し1

見出し2

見出し3

見出し4

見出し5
見出し6
## 見出し2
### 見出し3
#### 見出し4
##### 見出し5
###### 見出し6 ## Block 段落 空白行を挟むことで段落となります。 ```
段落1
(空行)
段落2
``` 段落1 段落2 ## Br 改行 改行の前に半角スペース` `を2つ記述します。 ```
hoge
fuga(スペース2つ)
piyo
``` hoge
fuga piyo ## Blockquotes 引用 先頭に`>`を記述します。ネストは`>`を多重に記述します。 ```
> 引用 > 引用
>> 多重引用
``` > 引用 > 引用
>> 多重引用 ## Code コード `` `バッククオート` `` 3つ、あるいはダッシュ`~`3つで囲みます。 ```
print 'hoge'
``` ```
print 'hoge'
``` ### インラインコード `` `バッククオート` `` で単語を囲むとインラインコードになります。 ```
これは `インラインコード`です。
``` これは `インラインコード`です。 ## pre 整形済みテキスト 半角スペース4個もしくはタブで、コードブロックをpre表示できます ``` class Hoge def hoge print 'hoge' end end
``` class Hoge def hoge print 'hoge' end end ## Hr 水平線 アンダースコア`_` 、アスタリスク`*`、ハイフン`-`などを3つ以上連続して記述します。 ```
hoge
***
hoge
___
hoge
---
``` hoge
***
hoge
___
hoge
--- # Lists ## Ul 箇条書きリスト ハイフン`-`、プラス`+`、アスタリスク`*`のいずれかを先頭に記
@mmcbrear
mmcbrear / gist:4664333
Last active May 17, 2024 00:27
XCode5 Custom Key Bindings/ Delete Current Line/ Duplicate Line/Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Resources/IDETextKeyBindingSet.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Cancellation</key>
<dict>
<key>Cancel</key>
<string>cancelOperation:</string>
</dict>
<key>Case Changes</key>
.SortingHeader {
display: flex;
overflow-x: scroll;
gap: 18px;
align-items: center;
}
.MediaGrid {
display: grid;
gap: 1.5rem;
@OxiBo
OxiBo / recover.c
Created July 28, 2017 04:49
CS50 week 4 recover
/**
* CS50 pset4 recover
* recovering JPEG files from a memory card
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
typedef uint8_t BYTE;