Skip to content

Instantly share code, notes, and snippets.

View dongsam's full-sized avatar
⚛️

dongsam dongsam

⚛️
View GitHub Profile
"""
a polymorphic many-to-many association with referential integrity and clean
collection access! (at least in one direction) sqlalchemy is the shit.
"""
__author__ = 'scott torborg (scotttorborg.com)'
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dvm-shlee
dvm-shlee / pykoen.py
Last active April 21, 2022 10:19
pykoen, jupyter notebook 을 이용한 interactive 한영번역기 (구글번역기 + Ginger 문법교정기)
from __future__ import absolute_import
import json
import sys
import re
import requests
import urllib
import urlparse
from urllib2 import HTTPError
from urllib2 import URLError
from urllib2 import urlopen
@arno-di-loreto
arno-di-loreto / openapi_specification_fka_swagger_specification_tutorial.md
Last active May 5, 2022 13:46
OpenAPI Specification (fka Swagger Specification) tutorial files from [API Handyman blog](http://apihandyman.io)
@alexvandesande
alexvandesande / Random generator
Last active December 23, 2022 09:10
A very simple random generator. A miner can influence the number by not publishing a block with an unwanted outcome, and forfeiting the 5 block reward.
contract random {
/* Generates a random number from 0 to 100 based on the last block hash */
function randomGen(uint seed) constant returns (uint randomNumber) {
return(uint(sha3(block.blockhash(block.number-1), seed ))%100);
}
/* generates a number from 0 to 2^n based on the last n blocks */
function multiBlockRandomGen(uint seed, uint size) constant returns (uint randomNumber) {
uint n = 0;
for (uint i = 0; i < size; i++){
@bellbind
bellbind / ecc.py
Created December 1, 2011 08:08
[python]basics of elliptic curve cryptography
# Basics of Elliptic Curve Cryptography implementation on Python
import collections
def inv(n, q):
"""div on PN modulo a/b mod q as a * inv(b, q) mod q
>>> assert n * inv(n, q) % q == 1
"""
for i in range(q):
if (n * i) % q == 1:
@UndergroundLabs
UndergroundLabs / gist:fad38205068ffb904685
Created October 3, 2015 19:46
Facebook Python Login Script
#!/home/drspock/scripts/FBInvite/bin/python
import argparse
import requests
import pyquery
def login(session, email, password):
'''
Attempt to login to Facebook. Returns user ID, xs token and
@haje01
haje01 / TensorFlow 시작하기.md
Last active May 3, 2024 07:30
TensorFlow 시작하기

텐서플로우 시작하기

글쓴이: 김정주(haje01@gmail.com)

이 문서는 텐서플로우 공식 페이지 내용을 바탕으로 만들어졌습니다.


소개

텐서플로우(TensorFlow)는 기계 학습과 딥러닝을 위해 구글에서 만든 오픈소스 라이브러리입니다. 데이터 플로우 그래프(Data Flow Graph) 방식을 사용하였습니다.