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 torch import nn | |
import logging | |
import mlflow | |
import torch | |
class MLP(nn.Module): | |
def __init__(self): | |
super().__init__() | |
self.layers = nn.Sequential( | |
nn.Linear(633, 1024), |
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
fun floatArrayToColorBitmap ( | |
floatArray: FloatArray, | |
width: Int, | |
height: Int, | |
alpha :Byte = (255).toByte(), | |
reverseScale :Boolean = false | |
) : Bitmap { | |
// Create empty bitmap in RGBA format (even though it says ARGB but channels are RGBA) | |
val bmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888) |
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
fun floatArrayToGrayscaleBitmap ( | |
floatArray: FloatArray, | |
width: Int, | |
height: Int, | |
alpha :Byte = (255).toByte(), | |
reverseScale :Boolean = false | |
) : Bitmap { | |
// Create empty bitmap in RGBA format (even though it says ARGB but channels are RGBA) | |
val bmp = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888) |
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 ubuntu:bionic | |
SHELL ["/bin/bash", "-c"] | |
RUN apt update -qq && apt upgrade -y -qq | |
ENV CONDAROOT "/opt/conda" | |
WORKDIR /root/ | |
ADD https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh /root/ | |
RUN mkdir ~/.conda && \ | |
bash Miniconda3-latest-Linux-x86_64.sh -b -p $CONDAROOT && \ | |
rm -rf Miniconda3-latest-Linux-x86_64.sh && \ |
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 nvidia/cuda:10.1-base | |
# install git for accessing repositories | |
# and make /opt accessible for all users | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends git && \ | |
chmod 777 /opt | |
SHELL ["/bin/bash", "-c"] |
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 torch | |
import segmentation_models_pytorch as smp | |
in_channels = 8 | |
# load pretrained Unet with resnet34 encoder and imagenet weights | |
net = smp.Unet() | |
# Checking the parameters of the first layer | |
print(net.encoder.conv1) |
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 node as builder | |
COPY github_key . | |
RUN eval $(ssh-agent) && \ | |
ssh-add github_key && \ | |
ssh-keyscan -H github.com >> /etc/ssh/ssh_known_hosts && \ | |
git clone git@github.com:phillies/vue_example.git /opt/vue_example | |
WORKDIR /opt/vue_example | |
RUN npm install && npm run build |
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 node as builder | |
RUN git clone https://github.com/phillies/vue_example.git /opt/vue_example | |
WORKDIR /opt/vue_example | |
RUN npm install && npm run build | |
FROM nginx | |
COPY --from=builder /opt/vue_example/dist/ /usr/share/nginx/html/ |
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 node | |
RUN git clone https://github.com/phillies/vue_example.git /opt/vue_example | |
WORKDIR /opt/vue_example | |
RUN npm install | |
CMD ["npm", "run", "serve"] |
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; |
NewerOlder