Skip to content

Instantly share code, notes, and snippets.

View OlegJakushkin's full-sized avatar
🤩

Oleg Jakushkin OlegJakushkin

🤩
View GitHub Profile
@OlegJakushkin
OlegJakushkin / Google_Translate_V3_OJ.ipynb
Last active January 12, 2021 17:46
Translating LaTeX using Google Translate V3 In Colaboratory
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@OlegJakushkin
OlegJakushkin / Dockerfile
Last active April 10, 2021 09:39
RemoteSSH SDN via l3ns
# docker build -t sshnode .
FROM ubuntu:20.04
## kubenode software base
RUN apt update \
&& apt install -yq software-properties-common ca-certificates openssh-client apt-transport-https \
wget curl nano htop iptables supervisor systemd
### SSH
RUN useradd --create-home --no-log-init --shell /bin/bash -g root vagrant && \
# docker build -t kubenode .
FROM ubuntu:20.04
## kubenode software base
RUN apt update \
&& apt install -yq curl software-properties-common ca-certificates openssh-client apt-transport-https \
wget curl iptables supervisor systemd
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using QuickGraph;
using QuickGraph.Algorithms;
using QuickGraph.Algorithms.RankedShortestPath;
using QuickGraph.Graphviz;
using tree;
index d831be6..8891b88 100644
--- a/davis2017/davis.py
+++ b/davis2017/davis.py
@@ -8,10 +8,11 @@ from PIL import Image
class DAVIS(object):
SUBSET_OPTIONS = ['train', 'val', 'test-dev', 'test-challenge']
TASKS = ['semi-supervised', 'unsupervised']
+ YEARS = ['2016', '2017', '2019']
DATASET_WEB = 'https://davischallenge.org/davis2017/code.html'
VOID_LABEL = 255
# docker build -t kubenode .
FROM ubuntu:20.04
RUN apt update \
&& apt install -yq curl software-properties-common ca-certificates openssh-client apt-transport-https \
wget curl iptables supervisor systemd
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6A030B21BA07F4FB \
# Initialize the library.
ee.Initialize()
# This is the cloud masking function provided by GEE but adapted for use in Python.
def maskS2clouds(image):
qa = image.select('QA60')
# Bits 10 and 11 are clouds and cirrus, respectively.
cloudBitMask = 1 << 10
# python3 stream.py | cvlc --demux=rawvideo --rawvid-fps=15 --rawvid-width=640 --rawvid-height=480 --rawvid-chroma=RV24 - --sout=#transcode\{vcodec=theo,vb=1024,channels=2,samplerate=44100,ab=128,acodec=vorb\}:http\{mux=ogg,dst=:8080/stream\} :sout-all :sout-keep -I dummy
import pyrealsense2 as rs
import numpy as np
import cv2
import sys
pipeline = rs.pipeline()
config = rs.config()
config.enable_stream(rs.stream.depth, 640, 480 , rs.format.z16, 15)
# docker build -t kubenode .
FROM ubuntu:20.04
RUN apt update \
&& apt install -yq curl software-properties-common ca-certificates openssh-client apt-transport-https \
wget curl iptables supervisor systemd
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 6A030B21BA07F4FB \
import pyrealsense2 as rs
import numpy as np
import cv2
pipeline = rs.pipeline()
config = rs.config()
config.enable_stream(rs.stream.depth, 1280, 720, rs.format.z16, 15)
config.enable_stream(rs.stream.infrared, 1, 1280, 720, rs.format.y8, 15)
config.enable_stream(rs.stream.infrared, 2, 1280, 720, rs.format.y8, 15)
#config.enable_stream(rs.stream.infrared1, 640, 480, rs.format.y8, 30)