Skip to content

Instantly share code, notes, and snippets.

@ythosa
ythosa / main.go
Created February 17, 2021 18:22
The Number Of Sophie Germain
package main
import "fmt"
type eratosthenesSieve struct {
sieve []bool
maxN int
}
func newEratosthenesSieve(maxN int) *eratosthenesSieve {
@ythosa
ythosa / all-syntax-typescript.ts
Created December 4, 2020 23:12
all-syntax-typescript.ts
// //
// --- Generics --- //
// //
const cars: Array<number|string> = [1, "aa"]
function mergeObjects<T1 extends object, T2 extends object>
(a: T1, b: T2): T1 & T2 {
return Object.assign({}, a, b)
}
@ythosa
ythosa / clone-all.bat
Last active December 18, 2020 12:56 — forked from Konard/clone-all.bat
Clone all LinksPlatform's repositories using SSH.
git clone [email protected]:linksplatform/ccc
git clone [email protected]:linksplatform/Collections
git clone [email protected]:linksplatform/Collections.Methods
git clone [email protected]:linksplatform/Communication
git clone [email protected]:linksplatform/Communication.Protocol.Lino
git clone [email protected]:linksplatform/Comparers
git clone [email protected]:linksplatform/Comparisons.SQLiteVSDoublets
git clone [email protected]:linksplatform/Converters
git clone [email protected]:linksplatform/Crawler
git clone [email protected]:linksplatform/CSharpToCppTranslator
gource -1920x1080 --key -o - | ffmpeg -analyzeduration 2147483647 -probesize 2147483647 -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 gource.mp4
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
# Ez pz parser
import json
import subprocess
def parsing(site_link):
curl_command = f'curl {site_link} > data.json'
data = subprocess.run(curl_command, shell=True)
if data.returncode != 0: