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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
Created on Mon Mar 9 12:47:29 2020 | |
@author: parashar | |
""" | |
import googlemaps |
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
let tmp = ["#chart_placeholder_0", "#prod_fill_weight_placeholder"] | |
Promise.all(tmp.map(d => html2canvas(document.querySelector(d)))) | |
.then(function (images) { | |
_.each(images, (canvas, idx) => { | |
img.file(`${idx}.png`, canvas.toDataURL("image/png", [0.0, 1.0]).split(',')[1], { base64: true }); | |
}) | |
// after | |
zip.generateAsync({ type: "blob" }).then(function (content) { |
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 | |
for filename in assets/completed/*.mp4; do | |
_filename=${filename::-4} | |
ffmpeg -i $_filename.mp4 $_filename.avi | |
rm $_filename.mp4 | |
ffmpeg -i $_filename.avi $_filename.mp4 | |
rm $_filename.avi | |
done |
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
TIMED_OUT="HostedRendezvous: Rendezvous lookup failed: Hosted Bootstrap error: Network failure: Timed out fetching resource" | |
# sample response variable | |
# RESP="Jun 23 17:49:07 pi-desktop vncserver-x11[915]: HostedRendezvous: Rendezvous lookup failed: Hosted Bootstrap error: Network failure: Timed out fetching resource" | |
RESP=$(service vncserver-x11-serviced status) | |
if [[ "$RESP" =~ "$TIMED_OUT" ]]; then | |
echo "Network Failure, commencing reboot" | |
$(reboot) |
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
""" | |
Here's a high-level overview of the recommended architecture for text correction using a Seq2Seq model: | |
1. Encoder: | |
- Input: Incorrect text sequence | |
- Apply word embeddings to convert each word into a fixed-length vector representation | |
- Pass the embedded input sequence through one or more recurrent layers, such as LSTM or GRU, to capture the contextual information of the input sequence | |
- The final hidden state(s) of the encoder will serve as the initial state of the decoder | |
2. Decoder: |
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
sudo apt update && sudo apt upgrade -y | |
sudo apt-get install openssh-server | |
# Add Docker's official GPG key: | |
sudo apt-get update | |
sudo apt-get install ca-certificates curl | |
sudo install -m 0755 -d /etc/apt/keyrings | |
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc | |
sudo chmod a+r /etc/apt/keyrings/docker.asc |