Skip to content

Instantly share code, notes, and snippets.

View sofyan48's full-sized avatar
๐ŸŒ
Eat, learn and sleep

Pi An sofyan48

๐ŸŒ
Eat, learn and sleep
View GitHub Profile
@sofyan48
sofyan48 / ast.py
Created January 13, 2019 00:26 — forked from buriy/ast.py
# from py2.6 distr
# -*- coding: utf-8 -*-
"""
ast
~~~
The `ast` module helps Python applications to process trees of the Python
abstract syntax grammar. The abstract syntax itself might change with
each Python release; this module helps to find out programmatically what
@sofyan48
sofyan48 / api.json
Created October 27, 2017 15:01 — forked from sihandry/api.json
Contoh api
http://example.com/api/book?key=ImhDM1Y0WGZUU2JlNmFSZVYuaGFuZHJ5bGFnaS5pMnNHMTFseWFUMEUxcnNhIg.K2JCKMF1gbBMrkr-viW8TY7dv0U
http://example.com/api/book?page=2&<key> (untuk mendapatkan list buku perhalaman)
http://example.com/api/book?limit=30&<key> (untuk mendapatkan list buku dengan jumlah limit tertentu)
http://example.com/api/book?page=2&limit=30&<key> (untuk mendapatkan list buku keduanya)
[
[
{
"code": 200,
"msg": "success",
@sofyan48
sofyan48 / heap.c
Last active June 23, 2017 11:32 — forked from martinkunev/heap.c
// WARNING: Requires C99 compatible compiler
#include <unistd.h>
#include <stdlib.h>
#include "heap.h"
#define CMP(a, b) ((a) >= (b))
static const unsigned int base_size = 4;