Skip to content

Instantly share code, notes, and snippets.

View minjejeon's full-sized avatar

Minje Jeon minjejeon

  • Bank of Korea
  • Seoul, Korea
View GitHub Profile
path = "/public/yelp-dataset/yelp_review.csv"
yelpReview = sc.newAPIHadoopFile(path,
'org.apache.hadoop.mapreduce.lib.input.TextInputFormat',
'org.apache.hadoop.io.LongWritable',
'org.apache.hadoop.io.Text',
conf={'textinputformat.record.delimiter' : '\r'})
yelpReview.count()
@NaniteFactory
NaniteFactory / get_own_process_address.go
Last active May 21, 2025 02:27
A way to get 'Windows process module (.exe) handle' of process itself in Golang.
package main
import "syscall"
func main() {
// equivalent to (HANDLE)GetModuleHandle(NULL); in C
handle, _, _ := syscall.Syscall(
syscall.NewLazyDLL("kernel32.dll").NewProc("GetModuleHandleW").Addr(),
1, 0, 0, 0,
@bruce30262
bruce30262 / qemu-networking.md
Created June 18, 2019 10:31 — forked from extremecoders-re/qemu-networking.md
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@jitsejan
jitsejan / Dockerfile
Last active August 18, 2024 09:53
PySpark, Docker and S3
FROM jupyter/pyspark-notebook
USER root
# Add essential packages
RUN apt-get update && apt-get install -y build-essential curl git gnupg2 nano apt-transport-https software-properties-common
# Set locale
RUN apt-get update && apt-get install -y locales \
&& echo "en_US.UTF-8 UTF-8" > /etc/locale.gen \
&& locale-gen
# Add config to Jupyter notebook
COPY jupyter/jupyter_notebook_config.py /home/jovyan/.jupyter/
@bmaupin
bmaupin / install-oracle-client-ubuntu.md
Last active April 29, 2025 23:57
Install Oracle client on Ubuntu

Reference: https://help.ubuntu.com/community/Oracle%20Instant%20Client

Tested on: Ubuntu 18.04, 20.04

  1. Decide which version of the Oracle client to install

  2. Download the Oracle client packages

@soulmachine
soulmachine / nfs-proxmox.md
Last active December 2, 2025 11:50
Launch a NFS server on Proxmox

Method 1: NFS server on LXC container

Create a priviledged LXC container with:

mount=nfs,nesting=1

apt update

apt install nfs-kernel-server

@phartenfeller
phartenfeller / Oracle Instant Client on Debian or Ubuntu
Last active November 6, 2025 17:44
Install an oracle instant client on a Debian or Ubuntu linux
apt-get install -y libaio1 alien
# Change version based on https://www.oracle.com/de/database/technologies/instant-client/linux-x86-64-downloads.html
# Example alternative: http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.5-basiclite-19.5.0.0.0-1.x86_64.rpm
wget http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.6-basic-19.6.0.0.0-1.x86_64.rpm
sudo alien -i --scripts oracle-instantclient*.rpm
rm -f oracle-instantclient*.rpm
# Optionally install SQLPlus
wget http://yum.oracle.com/repo/OracleLinux/OL7/oracle/instantclient/x86_64/getPackage/oracle-instantclient19.6-sqlplus-19.6.0.0.0-1.x86_64.rpm
sudo alien -i --scripts oracle-instantclient*.rpm
@gmolveau
gmolveau / golang_offline.md
Last active July 7, 2025 02:48
golang mod offline dependencies download

golang offline module dependencies download

Using go mod vendor

0 - With an existing module

  • copy go.mod and go.sum files from the offline PC to the internet PC

0bis - New module

@ebicoglu
ebicoglu / command-prompt.reg
Last active November 24, 2024 23:20
Useful developer Windows right click items (context menu)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\Command Prompt *]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\Command Prompt *\command]
@="cmd.exe /s /k pushd \"%V\""
@jtmoon79
jtmoon79 / python-embedded-for-Win10.md
Last active October 16, 2025 19:42
fully configuring embedded Python on Windows 10

Update: use PowerShell script PythonEmbed4Win.ps1.

The instructions in this gist have some subtle problems and this gist will not be updated.

About