Skip to content

Instantly share code, notes, and snippets.

View scottming's full-sized avatar
🎯
Focusing

Scott Ming scottming

🎯
Focusing
View GitHub Profile
@scottming
scottming / start_peer.exs
Created March 13, 2023 02:03 — forked from ityonemo/start_peer.exs
starts a BEAM peer node
:net_kernel.start([:"main@127.0.0.1"])
:erlang.set_cookie(:cook)
{:ok, peer, peername} =
:peer.start(%{connection: 0, name: :peer, host: ~C'127.0.0.1'})
:peer.call(peer, :erlang, :set_cookie, [:cook])
Node.connect(peername)
# add code paths
:rpc.call(peername, :code, :add_paths, [:code.get_path()])
# -*- coding: utf-8 -*-
import click
import os
import pandas as pd
def file_split(file):
s = file.split('.')
name = '.'.join(s[:-1]) # get directory name