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 | |
# make sure to install dependencies | |
# sudo apt-get install maim xclip | |
# if you want to make this action hotkeyable add the following lines to your | |
# .zshrc or .bashrc file | |
# alias segmented_screenshot='~/Linux-Setup-Scripts/scripts/take_segmented_screenshot.sh' | |
# bindkey -s '^x' 'segmented_screenshot\n' # this will bind segmented screenshot to ctrl + x |
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
alias gcl='CloneAndrewRepo' | |
alias gpl='git pull' | |
alias gaa='git add --all' | |
alias gam='git commit -a -m' | |
alias gampu='AddCommitAndPush' | |
alias gpu='git push' | |
alias gba='git branch -a' | |
alias gb='git branch' | |
alias gc='git checkout' | |
alias gbgc='BranchAndCheckout' |
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
const hiraganaToRomajiMap: Map<string, string> = new Map([ | |
['あ', 'a'], | |
['い', 'i'], | |
['う', 'u'], | |
['え', 'e'], | |
['お', 'o'], | |
['か', 'ka'], | |
['き', 'ki'], | |
['く', 'ku'], | |
['け', 'ke'], |
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
a | |
b | |
c | |
d | |
e | |
f | |
g | |
h | |
i | |
j |
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
int rows, cols; | |
int scl = 20; | |
int w = 2920; | |
int h = 1080; | |
float flying = 0; | |
// 2d array in java | |
float[][] terrain; |
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 cv2 | |
import numpy as np | |
from tqdm import tqdm | |
import torch | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import torch.optim as optim | |
REBUILD_DATA = False # set to true to one once, then back to false unless you want to change something in your training data. |
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
# Ping PLC | |
ping -t 10.114.4.10 > C:\Users\apynch\Github\scripts\ignition.txt | |
# Ping google | |
ping -t google.com > C:\Users\apynch\Github\scripts\google.txt |
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
new_q = (1 - LEARNING_RATE) * current_q + LEARNING_RATE * (reward + DISCOUNT * max_future_q) | |
q_table[observation][action] = reward |
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
def crop_lower_half(fnames): # fnames is a list of jpg names in a folder | |
for i, file in enumerate(fnames): | |
cropped_image = crop(open_image(jpg_extractions[i]), 1910, 1.29995, 0) | |
print(i) | |
print(file) | |
cropped_image.save("/home/andrew/Github/neuralink-bot/image_manipulation/cropped_jpgs/top_crop/top_crop_%s.jpg" % (str(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
import sys | |
sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages') | |
import cv2 | |
vidcap = cv2.VideoCapture('neuralink3.mp4') | |
success,image = vidcap.read() | |
count = 0 | |
while success: |
NewerOlder