Skip to content

Instantly share code, notes, and snippets.

@miku
miku / .gitignore
Created July 23, 2021 16:03 — forked from tkf/.gitignore
A script to locate libpython associated with the given Python executable.
*.pyc
.pytest_cache
@miku
miku / disassembler.go
Created December 15, 2020 16:36 — forked from grantseltzer/disassembler.go
Full disassembler
package main
import (
"debug/elf"
"fmt"
"log"
"os"
"github.com/bnagy/gapstone"
)
@miku
miku / gist:9d32607dc394949e5f56bf2066562c79
Created August 15, 2020 16:41 — forked from fnielsen/gist:3904327
Python shelve concurrency
import shelve
import multiprocessing
import os
filename = "tmp.shelve"
N = 4
end = 10000
def insert((offset, jump, end, filename)):
@miku
miku / http_proxy.go
Created July 2, 2020 15:52 — forked from jim3ma/http_proxy.go
Register Dialer Type for HTTP&HTTPS Proxy in golang
package main
import (
"bufio"
"fmt"
"net"
"net/http"
"net/url"
"crypto/tls"
@miku
miku / TkinterPong.py
Created May 10, 2020 19:43 — forked from calebrob6/TkinterPong.py
Python Tkinter Poing
import Tkinter
from Tkinter import Frame, BOTH, Canvas
#By Caleb Robinson
class Pong(Frame):
player1 = 0
player2 = 0
ballX=50
ballY=50
I was drawn to programming, science, technology and science fiction
ever since I was a little kid. I can't say it's because I wanted to
make the world a better place. Not really. I was simply drawn to it
because I was drawn to it. Writing programs was fun. Figuring out how
nature works was fascinating. Science fiction felt like a grand
adventure.
Then I started a software company and poured every ounce of energy
into it. It failed. That hurt, but that part is ok. I made a lot of
mistakes and learned from them. This experience made me much, much
prefix publisher journals dois
10.12679 0 0
10.7579 123Doc Education 0 0
10.3731 21st Century COE Program (Toplogical Science and Technology) 1 40
10.5775 A. I. Rosu Cultural Scientific Foundation Fundatia cultural-stiintifica A. I. Rosu 1 80
10.4037 AACN Publishing 2 766
10.1306 AAPG/Datapages 4 21817
10.3183 AB Svensk Papperstidning 1 1550
10.5769 ABEAT - Associacao Brasileira de Especialistas em Alta Tecnologia 1 57
10.7597 ACOPIOS - Revista Iberica de Mineralogia 1 9
@miku
miku / insert_paginator.py
Created April 15, 2020 22:02 — forked from evan-burke/insert_paginator.py
psycopg2 execute_values wrapper for accurate row counts
# One of the fastest ways to insert bulk data into Postgres (at least, aside from COPY) is using the psycopg2 extras function execute_values.
# However, this doesn't return an accurate row count value - instead, it just returns the row count for the last page inserted.
# This wraps the execute_values function with its own pagination to return an accurate count of rows inserted.
# Performance is approximately equivalent to underlying execute_values function - within 5-10% or so in my brief tests.
import psycopg2
import psycopg2.extras
import math
db_connection_string = "dbname=EDITME host=EDITME"
@miku
miku / dial-pq-via-ssh.go
Created April 13, 2020 23:10 — forked from vinzenz/dial-pq-via-ssh.go
Use postgres via SSH in Golang
package main
import (
"database/sql"
"database/sql/driver"
"fmt"
"net"
"os"
"time"
@miku
miku / download_github_organization_stats.py
Created January 5, 2020 12:53 — forked from s-m-e/download_github_organization_stats.py
Download basic statistics for all repositories in list of GitHub organizations
#!/usr/bin/env python
# Python 3
import datetime
import json
import os
from github import Github # pip install PyGithub
ORGANIZATIONS = ['my_organization', 'some_other_organization']