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
wget https://drive.google.com/file/d/1M8kRWh-pt-CiSXtXSMX68YTwB7ibCB4C/view?usp=sharing -O small.zip | |
unzip small.zip | |
rm -rf uploads | |
cp -r Anganwadi-upload uploads | |
cd uploads | |
mv 'pdf/activity bank' 'Activity Bank' | |
mv 'pdf/activity book' 'Activity Book' | |
mv 'pdf/Child Assesment Card' 'Child Assessment Card' | |
mv 'pdf/curriculam' 'Curriculum' | |
mv 'pdf/syllabus' 'Syllabus' |
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
{ | |
"wrappers": { | |
"python3": "ulimit -m {memory_limit} && ulimit -t {time_limit} && python3 '{code}' < '{input}'", | |
"python2": "ulimit -m {memory_limit} && ulimit -t {time_limit} && python2 '{code}' < '{input}'", | |
"perl5": "ulimit -m {memory_limit} && ulimit -t {time_limit} && perl '{code}' <'{input}'", | |
"lua": "ulimit -m {memory_limit} && ulimit -t {time_limit} && lua '{code}' <'{input}'", | |
"g++": "g++ '{code}' -o '{code}.compiled' && ulimit -m {memory_limit} && ulimit -t {time_limit} && '{code}.compiled' <'{input}'", | |
"java(use 'class Solution')": "mkdir 'dir_{code}' && mv '{code}' 'dir_{code}/Solution.java' && cd 'dir_{code}' && javac Solution.java && ulimit -m {memory_limit} && ulimit -t {time_limit} && java Solution < '{input}' && cd .. ; rm -rf 'dir_{code}'", | |
"gcc": "gcc '{code}' -o '{code}.compiled' && ulimit -m {memory_limit} && ulimit -t {time_limit} && '{code}.compiled' <'{input}'" | |
}, |
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 scipy.misc import imread, imsave | |
import numpy as np | |
import os | |
# Place images of same size in folder called images. | |
# name them in the order you want them to appear in. | |
# run script. | |
# view file all.png | |
images = list([os.path.join('images', i) |
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
var script = document.createElement("script"); | |
script.setAttribute("src", "http://localhost:8000/static/bot.js"); | |
document.body.appendChild(script); |
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 keras import layers as L | |
from keras import models as M | |
inputs = L.Input((4, )) | |
output = L.Dense(3)(inputs) | |
model = M.Model(inputs, outputs) | |
model.compile('sgd', 'mse') | |
import numpy as np |
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 tensorflow as tf | |
import numpy as np | |
x = np.array([[0, 0], | |
[0, 1], | |
[1, 0], | |
[1, 1]]*100) | |
y = np.array([0, 1, 1, 0]*100).reshape((-1, 1)) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 pandas as pd | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import networkx as nx | |
import pickle | |
from collections import deque | |
import multiprocessing as mp | |
import editdistance | |
import os |
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
# AUTHOR: Arjoonn Sharma | |
# LICENSE: MIT | |
# Recommended Reading before tinkering with code: | |
# https://en.wikipedia.org/wiki/Heaviside_step_function | |
# https://en.wikipedia.org/wiki/Perceptron | |
def dot_product(vector1, vector2): | |
"Returns the dot product between two vectors" | |
# assertions allow us to make sure some things are true before | |
# we proceede. Here dot product is only defined for vectors |
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 os | |
import time | |
import cv2 | |
import sys | |
print('python script.py harr.xml 1') | |
print(sys.argv) | |
script, casc, nodisplay = sys.argv | |
nodisplay = (nodisplay == '0') |