Skip to content

Instantly share code, notes, and snippets.

View privateOmega's full-sized avatar
🎮
Focusing

Kiran Mathew Mohan privateOmega

🎮
Focusing
  • Hinge Health
  • Bangalore, India
  • 17:06 (UTC +05:30)
View GitHub Profile
@privateOmega
privateOmega / install-redis.sh
Last active July 12, 2022 12:50 — forked from felipecsl/install-redis.sh
Installing Redis 6.x.x on Amazon Linux
#!/bin/bash
###############################################
# To use:
# chmod +x install-redis.sh
# ./install-redis.sh
###############################################
version=6.2.7
@privateOmega
privateOmega / enzyme_render_diffs.md
Created June 22, 2022 09:44 — forked from fokusferit/enzyme_render_diffs.md
Difference between Shallow, Mount and render of Enzyme

Shallow

Real unit test (isolation, no children render)

Simple shallow

Calls:

  • constructor
  • render
@privateOmega
privateOmega / dcmanonymize.sh
Created February 15, 2022 05:01 — forked from jdoepfert/dcmanonymize.sh
simple dicom anonymization with dcmtk
# Patient's Name. Patient ID birth date series UID. series UID Institution Name Institution Address Accession Number physician operator sop UID other pat ids study id Image Comments
dcmodify -ie -gin -nb -ea "(0010,0010)" -ea "(0010,0020)" -ea "(0010,0030)" -ea "(0020,000E)" -ea "(0020,000D)" -ea "(0008,0080)" -ea "(0008,0081)" -ea "(0008,0050)" -ea "(0008,0090)" -ea "(0008,1070)" -ea "(0008,1155)" -ea "(0010,1000)" -ea "(0020,0010)" -ea "(0020,4000)" *.dcm
@privateOmega
privateOmega / Task 4
Created December 8, 2021 06:21 — forked from Esperanzq/Task 4
Write a wrapper for the os.walk() function that returns a generator. The generator should give me all the files (and only files, excluding directories!) with their absolute path.
import os
import pprint
def get_all_files(path, min_size_kb=None):
for root, dirs, files in os.walk(path):
for file_ in files:
path = os.path.abspath(os.path.join(root, file_))
size = (os.path.getsize(path)) // 1024
if size >= min_size_kb:
@privateOmega
privateOmega / pr.md
Created July 17, 2021 19:17 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: