Skip to content

Instantly share code, notes, and snippets.

View ShawonAshraf's full-sized avatar
🐈
I'm simply not there.

Shawon Ashraf ShawonAshraf

🐈
I'm simply not there.
View GitHub Profile
@ShawonAshraf
ShawonAshraf / Output.txt
Last active December 7, 2020 01:23
IRTM EX2 Output
wei* AND maße => [0, 115, 125, 168, 286, 430, 457, 471, 1002, 1005, 1012, 1020, 1025, 1032, 1036, 1042, 1043, 1047, 1053, 1055, 1065, 1066, 1069, 1072, 1081, 1088, 1095, 1115, 1116, 1119, 1129, 1149, 1155, 1171, 1173, 1176, 1178, 1183, 1188, 1195, 1202, 1207, 1225, 1226, 1232, 1249, 1259, 1266, 1281, 1301, 1313, 1317, 1334, 1337, 1342, 1348, 1372, 1376, 1399, 1400, 1405, 1407, 1429, 1444, 1451, 1458, 1470, 1473, 1479, 1496, 1505, 1510, 1518, 1545, 1548, 1549, 1556, 1563, 1564, 1572, 1573, 1579, 1582, 1587, 1601, 1610, 1630, 1631, 1636, 1646, 1652, 1654, 1658, 1659, 1678, 1679, 1687, 1694, 1697, 1701, 1723, 1732, 1744, 1745, 1754, 1755, 1759, 1761, 1764, 1770, 1790, 1809, 1813, 1817, 1836, 1842, 1844, 1864, 1868, 1880, 1885, 1887, 1897, 1902, 1913, 1924, 1929, 1938, 1955, 1957, 1968, 1973, 1987, 2004, 2008, 2015, 2055, 2064, 2071, 2073, 2083, 2116, 2124, 2135, 2137, 2142, 2145, 2151, 2153, 2158, 2165, 2199, 2203, 2215, 2218, 2219, 2231, 2266, 2273, 2280, 2296, 2297, 2300, 2310, 2331, 2338, 2361, 2362, 2377, 2
@ShawonAshraf
ShawonAshraf / cnn.py
Created November 20, 2020 21:20
TF Apple Fork test on mnist data
import tensorflow as tf
from tensorflow.python.compiler.mlcompute import mlcompute
mlcompute.set_mlc_device(device_name='gpu')
mnist = tf.keras.datasets.mnist
(x_train, y_train), (x_test, y_test) = mnist.load_data()
@ShawonAshraf
ShawonAshraf / boolean_and_query.py
Created November 16, 2020 21:13
irtm boolean and
paris = [1, 2, 3, 4, 5, 7, 8, 9, 11, 12, 13, 14, 15]
france = [2, 6, 10, 12, 14]
def query(posting1, posting2):
result = []
it1 = iter(posting1)
it2 = iter(posting2)
el1 = next(it1)
@ShawonAshraf
ShawonAshraf / geoplot.py
Created November 6, 2020 13:19
For Tahmid Vai's work
ncols = 3
nrows = 4
# create a figure of dimension nrows X ncols
fig, ax = plt.subplots(nrows=nrows, ncols=ncols, figsize=(20, 15))
# keeps track of the indexes of iaq
df_idx_counter = 0
# iterate through the grid and plot one iaq element in each grid box
@ShawonAshraf
ShawonAshraf / dm-toilet-paper.js
Created October 22, 2020 12:11 — forked from marco79cgn/dm-toilet-paper.js
Scriptable iOS widget that shows the amount of toilet paper which is available at your next dm drugstore
let storeId = 386
let param = args.widgetParameter
if (param != null && param.length > 0) {
storeId = param
}
const storeCapacity = await fetchAmountOfPaper()
const storeInfo = await fetchStoreInformation()
const widget = new ListWidget()
await createWidget()
def merge_sort(arr):
if len(arr) > 1:
middle = len(arr) // 2
left = arr[:middle]
right = arr[middle:]
merge_sort(left)
merge_sort(right)
@ShawonAshraf
ShawonAshraf / alex_torch.py
Created July 7, 2020 11:27
Alexnet draft PyTorch
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.utils.data as data
import skimage
import skimage.io
import skimage.transform
@ShawonAshraf
ShawonAshraf / data_helpers.py
Created May 28, 2020 10:15
Text Classification CNN Keras
"""
Taken from https://github.com/alexander-rakhlin/CNN-for-Sentence-Classification-in-Keras
"""
import numpy as np
import re
import itertools
from collections import Counter
"""
@ShawonAshraf
ShawonAshraf / Dockerfile
Created May 12, 2020 22:28
node-express docker medium
FROM node:10.11-alpine
WORKDIR /usr/app
COPY . .
RUN npm install
EXPOSE $PORT
CMD [ "npm", "run", "start" ]
@ShawonAshraf
ShawonAshraf / package.json
Created May 12, 2020 22:27
node-express-docker-medium
"scripts": {
"start": "npm run build && node build/server.js",
"build": "npm run clean && npm run babel-build",
"clean": "rimraf ./build",
"babel-build": "./node_modules/.bin/babel src/ --out-dir build/ --ignore ./node_modules/,./babelrc,./package.json,./package-lock.json,./npm-debug.log --copy-files",
"eslint-init": "./node_modules/.bin/eslint --init",
"test": "echo \"Error: no test specified\" && exit 1"
},