Skip to content

Instantly share code, notes, and snippets.

View zeroth's full-sized avatar
🔬

Abhishek Patil zeroth

🔬
View GitHub Profile

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@zeroth
zeroth / error
Last active March 9, 2021 07:03
TRex Learn error
[19:16:52] Setting home to 'CONDA_PREFIX'
[WARNING 19:16:52 GPURecognition.cpp:598] Python not yet initialized. Waiting...
2021-03-02 19:16:53.150998: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
[19:16:53] Took 1.027124s to calculate percentiles in 541 frames.
2021-03-02 19:16:55.015413: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations: AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-03-02 19:16:55.025723: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x19746b6a0e0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-03-02 19:16:55.025813: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
2021-03-02 19:16:55.027816:
import numpy as np
from timeit import default_timer as timer
from pathlib import Path
import os
import tifffile
import glob
import argparse
import re
import multiprocessing
from functools import partial
@zeroth
zeroth / Deskew.py
Created January 20, 2021 06:46
Deskew for LLSM data with noise padding
from pycudadecon import deskewGPU
import cupy as cp
import numpy as np
import tifffile
import glob
import os
import argparse
"""
need to install https://github.com/tlambert03/pycudadecon
@zeroth
zeroth / PhotoBleachCorrect.py
Last active January 21, 2021 05:43
Photo Bleach Correct
import numpy as np
from timeit import default_timer as timer
from pathlib import Path
import os
import tifffile
import glob
import argparse
import re
"""
@zeroth
zeroth / Decon.py
Last active January 21, 2021 04:35
LLSM Decon
import sys
import os
from pycudadecon import RLContext, rl_decon
import tifffile
from pycudadecon.otf import make_otf, TemporaryOTF
import re
import glob
import argparse
"""
async def main():
coroutine1 = do_some_work(1)
coroutine2 = do_some_work(2)
coroutine3 = do_some_work(4)
tasks = [
asyncio.ensure_future(coroutine1),
asyncio.ensure_future(coroutine2),
asyncio.ensure_future(coroutine3)
]
from sklearn.datasets import fetch_20newsgroups
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.feature_extraction.text import TfidfTransformer
from sklearn.naive_bayes import MultinomialNB
categories = ['alt.atheism', 'soc.religion.christian',
'comp.graphics', 'sci.med']
twenty_train = fetch_20newsgroups(subset='train',
@zeroth
zeroth / hello_world.S
Last active July 31, 2017 14:08
Hello World in Assembly on Linux
section .text
global _start
_start:
mov edx,len
mov ecx,msg ;message to write
mov ebx,1 ;file descriptor (stdout)
mov eax,4 ;system call number (sys_write)
int 0x80 ;call kernel
mov eax,1 ;system call number (sys_exit)
@zeroth
zeroth / main.js
Last active January 7, 2016 07:15
Simple Hapi Server with views helper
/* Index.js */
const Hapi = require('hapi');
const Vision = require('vision');
const Path = require('path');
const server = new Hapi.Server();
// Server connection
server.connection({
host: 'localhost',