Skip to content

Instantly share code, notes, and snippets.

View penut85420's full-sized avatar
😎
I Love Oppai!

PenutChen penut85420

😎
I Love Oppai!
  • Graduate Student of National Taiwan Ocean University
  • New Taipei, Taiwan
View GitHub Profile

夜靈護盾傷害倍率推算

基礎數值

  • 一棱鏡
    • 基傷 3000
    • 暴傷 2.6x
    • 攻速 2.0
  • 七支架
    • 基傷 9000
  • 暴傷 2.0x
import tensorflow as tf
def build_model(maxlen1, maxlen2, num_labels, max_features, emb_size, rnn_size):
emb_layer = tf.keras.layers.Embedding(max_features, emb_size, name='SharedEmbedding')
bid = tf.keras.layers.Bidirectional
inn1 = tf.keras.Input(shape=(maxlen1, ), name='Input1')
x1 = tf.keras.layers.Masking(name='Masking1')(inn1)
emb1 = emb_layer(x1)
x1 = bid(tf.keras.layers.GRU(rnn_size, return_sequences=True), name='BiRNN1')(emb1)
# coding: utf-8
from scripts import silent
import numpy as np
import tensorflow as tf
import transformers as tfs
def build_model():
inn = tf.keras.layers.Input(shape=(384,), dtype=tf.int32)
my_feature = tf.keras.layers.Input(shape=(84,))
@penut85420
penut85420 / build_gti.py
Created June 3, 2020 13:28
Build script of Google Translate Improver
import os
import shutil
import datetime as dt
import subprocess as sp
import PyInstaller.__main__
def main():
shutil.rmtree('./build')
shutil.rmtree('./dist')
shutil.rmtree('./release')
@penut85420
penut85420 / clean_windows.ps1
Created June 3, 2020 06:37
Uninstall all built-in apps in Windows 10.
Set-ExecutionPolicy -ExecutionPolicy ByPass
Get-AppxPackage *3dbuilder* | Remove-AppxPackage
Get-AppxPackage *windowsalarms* | Remove-AppxPackage
Get-AppxPackage *windowscommunicationsapps* | Remove-AppxPackage
Get-AppxPackage *windowscamera* | Remove-AppxPackage
Get-AppxPackage *officehub* | Remove-AppxPackage
Get-AppxPackage *skypeapp* | Remove-AppxPackage
Get-AppxPackage *getstarted* | Remove-AppxPackage
Get-AppxPackage *zunemusic* | Remove-AppxPackage
Get-AppxPackage *windowsmaps* | Remove-AppxPackage
@penut85420
penut85420 / sources.list
Last active May 27, 2020 19:40
Ubuntu APT Taiwan Mirrors
# File Path: /etc/apt/sources.list
# Reference: https://tinyurl.com/ya9husgz
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://tw.archive.ubuntu.com/ubuntu/ focal main restricted
# deb-src http://tw.archive.ubuntu.com/ubuntu/ focal main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://tw.archive.ubuntu.com/ubuntu/ focal-updates main restricted
@penut85420
penut85420 / f.m
Last active May 26, 2020 08:20
Matlab programming homework
function y = f(x)
a = 0
b = 9
if x < a
y = 10
elseif ((x >= a) && (x < b))
y = 10 * x + 10
else
y = 15 * sqrt(4 * x) + 10
end
@penut85420
penut85420 / shorten_url.py
Last active May 23, 2020 13:27
Shorten url all in one script
#!/usr/bin/python3
import os
import sys
import json
import requests
import pyperclip as pc
import subprocess as sp
import urllib.parse as up
def main():
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
import logging
import warnings
warnings.filterwarnings('ignore')
import tensorflow as tf
tf.get_logger().setLevel(logging.ERROR)
import string
import random
@penut85420
penut85420 / java_send_request.java
Last active May 14, 2020 11:51
Sending HTTP request
import java.net.*;
import java.io.*;
class HelloWorld {
public static void main(String[] args) throws Exception {
URL url = new URL("https://nlp4.cse.ntou.edu.tw:5000/");
HttpURLConnection con = (HttpURLConnection) url.openConnection();
con.setRequestMethod("GET");
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));