Skip to content

Instantly share code, notes, and snippets.

View makmanalp's full-sized avatar

Mehmet Ali "Mali" Akmanalp makmanalp

View GitHub Profile
@merlinmann
merlinmann / usage I dislike.md
Last active February 28, 2024 21:24
An Epicenter of Wordsmithing…for the Enterprise.

Usage I Dislike


An Epicenter of Wordsmithing…for the Enterprise.


Words: Ugly, Dumb, or Overpriced

@loilo
loilo / idb-backup-and-restore.md
Last active April 29, 2024 06:40
Back up and restore an IndexedDB database

Back up and restore an IndexedDB database

This gist is an ES module which provides functions to import and export data from an IndexedDB database as JSON. It's based on Justin Emery's indexeddb-export-import package, but applies some adjustments that reflect better on the current browser landscape (i.e. better developer ergonomics but no support for Internet Explorer).

Usage

For each of the provided functionalities, you need a connected IDBDatabase instance.

Export Data

import { idb } from 'some-database'
@johnhw
johnhw / umap_sparse.py
Last active January 6, 2024 16:09
1 million prime UMAP layout
### JHW 2018
import numpy as np
import umap
# This code from the excellent module at:
# https://stackoverflow.com/questions/4643647/fast-prime-factorization-module
import random
@seandavi
seandavi / Snakefile
Created February 2, 2018 12:27
Snakemake with s3 and custom profile
import boto3
# set the profile name based on ~/.aws/credentials entry
boto3.setup_default_session(profile_name='s3')
from snakemake.remote.S3 import RemoteProvider as S3RemoteProvider
s3 = S3RemoteProvider()
# This simply copies the file from local storage to s3
rule all:
@maartenbreddels
maartenbreddels / h5map.ipynb
Created October 25, 2017 12:25
memory mapping hdf5 continuous data
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chaoflow
chaoflow / model.py
Created April 20, 2017 10:26
sqlite WITHOUT ROWID with (flask-)sqlalchemy
import flask_sqlalchemy
from sqlalchemy import schema
from sqlalchemy.ext.compiler import compiles
db = flask_sqlalchemy.SQLAlchemy()
class Tag(db.Model):
__table_args__ = {'info': {'without_rowid': True}}
text = db.Column(db.String, primary_key=True)
@nothings
nothings / kotaku_hzd.md
Last active January 23, 2024 15:24
Why Frustum Culling Matters, and Why It's Not Important

There is a nice GIF illustrating a technique called "frustum culling" in this Kotaku article: http://kotaku.com/horizon-zero-dawn-uses-all-sorts-of-clever-tricks-to-lo-1794385026

The interwebs being what they are, this has also led to some controversy.

Some people have interpreted the opening sentence "Every time you move the camera in Horizon Zero Dawn, the game is doing all sorts of under-the-hood calculations, loading and unloading chunks of world to ensure that it all runs properly," as being about the GIF; that's not what frustum culling does, but that's probably not what the article's author meant anyway.

@agounaris
agounaris / xelatex_macos.txt
Last active September 22, 2017 19:32
Jupyter notebook pdf export fix on macos
Download and install xelatex from http://www.texts.io/support/0001/
Based on the exact version etc add the executable on path
export PATH="$PATH:/usr/local/texlive/2016basic/bin/x86_64-darwin"
install all the following
sudo tlmgr update --self
sudo tlmgr install collectbox
sudo tlmgr install ucs
sudo tlmgr install adjustbox

Papers

This list is adapted from the lecture plan for the "Advanced Topics in Computer Systems" course at Berkeley, which is available here: https://people.eecs.berkeley.edu/~kubitron/cs262/index_lectures.html

Thanks to Anthony Joseph and John Kubiatowicz for putting the original list together.

Introduction to the course, some basic philosophy, UNIX system.