Skip to content

Instantly share code, notes, and snippets.

Noam cohen noam1023

Block or report user

Report or block noam1023

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
noam1023 /
Created May 7, 2019
preprocess csv file to remove commas appearing in ""
# remove comma char in strings in a csv file without harming the rest of the content.
# read input from supplied file name or from stdin
# write to stdout
# example:
# cat t.csv | python
# python t.csv
# Noam Cohen, 2019-05-05
# tested with python 3.6
noam1023 /
Created Feb 12, 2019
print binary data as hex string for inclusion in source code
# read a binary file and output it in ASCII/hex
$ python3 --infile 00_00_00_400_L01.jpg --head 20
0xff, 0xd8, 0xff, 0xe0, 0x00, 0x10, 0x4a, 0x46, 0x49, 0x46, 0x00, 0x01, 0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00,
import argparse
def parse(input, max_bytes):
i = 0
with open(input,"rb") as f:
while True:
View gist:d69e830718ce9cc84fa1e5740d28206f
# after installing ansible:
sudo ansible-galaxy install theNewFlesh.sublime
sudo ansible-galaxy install henriklynggaard.clion
ansible-galaxy install theNewFlesh.sublime
You can’t perform that action at this time.