Skip to content

Instantly share code, notes, and snippets.

View elbaro's full-sized avatar

elbaro elbaro

View GitHub Profile
@elbaro
elbaro / graph.txt
Last active May 3, 2019 05:33
Graph in Rust
https://github.com/nrc/r4cppp/blob/master/graphs/README.md
1. lifetime
- 1. User creates node/edge and provide their ref to Graph
- 2. Let Graph owns nodes/edges.
- Some helpers like from_adjacency_matrix() allocates on its own
2. mutability
3. Trait design
@elbaro
elbaro / print.sh
Created April 8, 2019 06:36
print job example
curl -L -s $1 | pdfnup --frame false --nup 2x1 /dev/stdin --outfile /dev/stdout | lpr -o sides=two-sided-short-edge
@elbaro
elbaro / code.py
Last active December 23, 2021 15:35
RabbitMQ
import pika
from pika.adapters.blocking_connection import BlockingConnection, BlockingChannel
import time
import atexit
from typing import List, Iterator, Tuple
from multiprocessing import Queue, Process
import queue
class RabbitConsumer(object):
@elbaro
elbaro / main.go
Created February 6, 2018 15:40
mpb test example
package main
import (
"fmt"
"sync"
"time"
"github.com/vbauerster/mpb"
"github.com/vbauerster/mpb/decor"
)
@elbaro
elbaro / sds.md
Created June 5, 2016 07:52
SDS Expert-to-be

SDS Expert-to-be

강사. 강동구

1회

  • 2차원 벡터 연속된 180도 범위의 모든 벡터를 쓰는 것이 정답이다.

  • 분수 찾기 이분검색 + 특정 수 이하의 기약분수 개수 구하기 (에라토스테네스의 체)

@elbaro
elbaro / ts
Created June 5, 2016 07:51
SDS Expert-to-be
# SDS Expert-to-be
#### 강사. 강동구
## 1회
- 2차원 벡터
연속된 180도 범위의 모든 벡터를 쓰는 것이 정답이다.
- 분수 찾기
이분검색 + 특정 수 이하의 기약분수 개수 구하기 (에라토스테네스의 체)