Skip to content

Instantly share code, notes, and snippets.

View wiseaidev's full-sized avatar
🦀
Rusting!

Mahmoud wiseaidev

🦀
Rusting!
View GitHub Profile
@SpencerPark
SpencerPark / install_ipc_proxy_kernel.py
Last active December 20, 2023 13:26
A little proxy kernel (and installer) that manages a wrapped kernel connected with tcp. It was designed to support the case where the server starts kernels with ipc transport but only tcp is supported (like IJava). See https://gist.github.com/SpencerPark/447de114fcd3e6a272dc140809462e30 for a sample notebook that installs this.
import argparse
import json
import os
import os.path
import shutil
import sys
from jupyter_client.kernelspec import KernelSpec, KernelSpecManager, NoSuchKernel
parser = argparse.ArgumentParser()
@korakot
korakot / kernel.py
Last active January 19, 2024 06:25
Install rust, cargo in Colab
# run this once, then reload, and then skip this
!apt install rustc
!gdown --id 1PULtTc-2e9z4bswh_SQqL5oy_4JpfV7c
!chmod +x evcxr_jupyter
!./evcxr_jupyter --install
// install dependency
:dep cmd_lib
use cmd_lib::run_cmd as sh;
@markerikson
markerikson / redux-saga-poll-loop.js
Last active February 21, 2023 07:25
Redux-Saga controllable long-polling loop
import { take, put, call, fork, cancel, cancelled } from 'redux-saga/effects'
import {EVENT_POLLING_START, EVENT_POLLING_STOP} from "constants/eventPolls";
import {ClientEventType} from "constants/serverEvents";
function* handleEventA(serverEvent) {
yield put({type : serverEvent.type, payload : {name : serverEvent.eventAData}});
}