Skip to content

Instantly share code, notes, and snippets.

View dikiprawisuda's full-sized avatar

dikip dikiprawisuda

View GitHub Profile
@us10096698
us10096698 / enc_converter.sh
Created October 28, 2013 03:06
Japanese Kanji File Encode Converter (from CP932/ISO-2022-JP-1/EUC-JP to UTF-8 with LF)
#!/bin/sh
#
# Japanese Kanji File Encode Converter (to UTF-8)
# Usage: $ sh ./enc_converter.sh "<FilePath>"
# <Filepath> is used for argument of "ls" command.
# Ex) sh ./enc_converter.sh "~/test/*.txt"
# Expect Output of 'file' Command
cp932="Non-ISO extended-ASCII text"
jis="ASCII text"
@nifl
nifl / js-functions.md
Last active May 27, 2024 07:27
JS Functions

Functions

Functions are first–class citizens in JS, meaning that they can be passed around like any other type of data, eg, variables. http://en.wikipedia.org/wiki/First-class_function

Declared function

Declared functions build in memory immediately when the program loads.

Basic syntax

@arne-cl
arne-cl / restore_packages.R
Created September 16, 2014 08:46
save/load/install a list of your currently installed R packages
# restore_packages.R
#
# installs each package from the stored list of packages
# source: http://hlplab.wordpress.com/2012/06/01/transferring-installed-packages-between-different-installations-of-r/
load("~/installed_packages.rda")
for (count in 1:length(installedpackages)) {
install.packages(installedpackages[count])
}
@bishboria
bishboria / springer-free-maths-books.md
Last active November 27, 2024 12:11
Springer made a bunch of books available for free, these were the direct links
@stephenturner
stephenturner / keybindings.json
Created May 31, 2017 21:04
VSCode keybindings to replicate my most commonly used RStudio shortcuts (Mac)
// Place your key bindings in this file to overwrite the defaults
[
// RStudio: Copy lines up/down with alt+cmd+up/down
{
"key": "alt+cmd+down",
"command": "editor.action.copyLinesDownAction",
"when": "editorTextFocus && !editorReadonly"
},
{
"key": "shift+alt+down",
@fasiha
fasiha / DictionaryOfJapaneseGrammar.csv
Created December 15, 2017 04:39
All example sentences from Seiichi Makino and Michio Tsutsui's series of three Japanese grammar dictionaries: "Dictionary of Basic Japanese Grammar", "Intermediate" and "Advanced
We can't make this file beautiful and searchable because it's too large.
Number,Expression,Translation,Reading,Grammar Japanese,Grammar English,Grammar Explanation,Notes,Picture,Page,Level,Scrambled
1,私は良子に花をあげた・あげました。,I gave Yoshiko flowers.,私[わたし]は 良子[りょうこ]に 花[はな]をあげた・あげました。,あげる,,give |&nbsp;Someone gives something to a person who is not a member of the giver’s in group but whose status is about equal to that of the giver.,,,63,Basic,
2,大野さんは山本さんに本をあげた。,Ms. Ono gave Mr. Yamamoto a book.,大野[おおの]さんは 山本[やまもと]さんに 本[ほん]をあげた。,あげる,,give |&nbsp;Someone gives something to a person who is not a member of the giver’s in group but whose status is about equal to that of the giver.,,,63,Basic,scrambled
3,君はアンに何をあげましたか。,What did you give to Ann?,君[きみ]はアンに 何[なに]をあげましたか。,あげる,,give |&nbsp;Someone gives something to a person who is not a member of the giver’s in group but whose status is about equal to that of the giver.,,,63,Basic,scrambled
4,私は信男さんにネクタイを買ってあげた・あげました。,I bought a tie for Nobuo.,私[わたし]は 信男[のぶお]さんにネクタイを 買[か]ってあげた・あげました。,あげる,,do s.t. for s.o.; do s.o. a favor by doing s.t.&nbsp;|&nbs
@Svidro
Svidro / !Making Measurements in QuPath
Last active October 15, 2024 06:00
Making Measurements in QuPath
Collections of scripts harvested mainly from Pete, but also picked up from the forums
TOC
Accessing dynamic measurements.groovy - Most annotation measurements are dynamically created when you click on the annotation, and
are not accessible through the standard getMeasurement function. This is a way around that.
Affine transformation.groovy - access more accurate measurements for the affine transformation used in the image alignment (m5/m6+)
Alignment of local cells.groovy - check neighborhood for similarly aligned cells
@bmaupin
bmaupin / free-backend-hosting.md
Last active March 1, 2025 15:16
Free backend hosting
@DarwinAwardWinner
DarwinAwardWinner / analyze_pkg_usage.R
Last active February 12, 2025 16:27
Script for finding loaded but unused packages in R scripts
#!/usr/bin/env Rscript
suppressPackageStartupMessages({
library(globals)
library(readr)
library(stringr)
library(rex)
library(magrittr)
library(rlang)
library(knitr)
@kauffmanes
kauffmanes / install_anaconda.md
Last active February 16, 2025 07:11
Install Anaconda on Windows Subsystem for Linux (WSL)

Thanks everyone for commenting/contributing! I made this in college for a class and I no longer really use the technology. I encourage you all to help each other, but I probably won't be answering questions anymore.

This article is also on my blog: https://emilykauffman.com/blog/install-anaconda-on-wsl

Note: $ denotes the start of a command. Don't actually type this.

Steps to Install Anaconda on Windows Ubuntu Terminal

  1. Install WSL (Ubuntu for Windows - can be found in Windows Store). I recommend the latest version (I'm using 18.04) because there are some bugs they worked out during 14/16 (microsoft/WSL#785)
  2. Go to https://repo.continuum.io/archive to find the list of Anaconda releases
  3. Select the release you want. I have a 64-bit computer, so I chose the latest release ending in x86_64.sh. If I had a 32-bit computer, I'd select the x86.sh version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose `Anaconda3-5.2.0-Li