This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PIL import Image, ImageDraw | |
import aggdraw | |
class Drawing: | |
def __init__(self, image): | |
self.d = aggdraw.Draw(image) | |
self.img_height = image.height | |
self.img_width = image.width | |
def transform(self, arr): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Directory Structure | |
# problem-folder/ | |
# ├─ 1.in | |
# ├─ 1.ans | |
# ├─ ... | |
# ├─ main.py <- Your source file | |
# ├─ tester.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import liwc | |
import csv | |
import numpy as np | |
import re | |
import seaborn as sns | |
def printProgress(message, progress, limit): | |
output = f"{message} ({progress}/{limit})" | |
print("\r{: <100}".format(output), end="") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*\ | |
title: $:/adithyab/macros/timediff.js | |
type: application/javascript | |
module-type: macro | |
Macro to return a human readable time difference between present and given times. | |
If caltime is false, it will ignore the time part of the date and only work on the date. | |
Date should be passed in JS compatible format "YYYY-MM-DD". With time, the format should be "YYYY-MM-DD H:MM AM/PM" | |
Visit https://adithyab.in/2020/how-to-make-a-basic-javascript-macro-in-tiddlywiki/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*\ | |
title: $:/adithyab/macros/helloworld.js | |
type: application/javascript | |
module-type: macro | |
A helloworld JS macro for Tiddlywiki! | |
Visit https://adithyab.in/2020/how-to-make-a-basic-javascript-macro-in-tiddlywiki/ | |
\*/ | |
(function() { |