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
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
name: dcgm-exporter | |
labels: | |
name: dcgm-exporter | |
--- | |
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: |
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 train_model(model, criterion, optimizer, scheduler, num_epochs=25): | |
since = time.time() | |
best_model_wts = copy.deepcopy(model.state_dict()) | |
best_acc = 0.0 | |
model.train() # Set model to training mode | |
for epoch in range(num_epochs): | |
# print('Epoch {}/{}'.format(epoch, num_epochs - 1)) | |
# print('-' * 10) |
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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx | |
namespace: nginx-mysql | |
spec: | |
replicas: 4 | |
selector: | |
matchLabels: | |
app: nginx |
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 | |
MAINTAINER cheng <bravo325806@gmail.com> | |
WORKDIR /var/www/html | |
RUN apt-get update | |
RUN apt-get install -y nginx | |
RUN apt-get install -y php7.0 | |
RUN apt-get install -y php7.0-mysql | |
RUN apt-get install -y git |
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 librosa | |
import os | |
import re | |
import sys | |
import wave | |
import numpy as np | |
import tensorflow as tf | |
from tensorflow.contrib import rnn | |
from random import shuffle | |
from tensorflow.python.tools import freeze_graph |
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 | |
import os | |
import time | |
import cv2 | |
from random import shuffle | |
class mnist(object): | |
learning_rate = 0.001 | |
input_node_name = '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
import math | |
class MLP(): | |
learning_rate = 0.1 | |
epoch = 2000 | |
display = 100 | |
w11=0.5;w12=0.9;w21=0.4;w22=1.0;w31=-1.2;w32=1.1;b1=-1;b2=-1;b3=-1 | |
def train(self): | |
step = 1 |
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 get_articles_content(this_page_article_href): | |
for url in this_page_article_href: | |
print('------------------------------------') | |
print("https://www.ptt.cc" + url ) | |
r = requests.get("https://www.ptt.cc" + url ) | |
soup = BeautifulSoup(r.text,"html.parser") | |
# try: | |
# author = soup.select('span.article-meta-value')[0].text | |
# board = soup.select('span.article-meta-value')[1].text | |
# title = soup.select('span.article-meta-value')[2].text |