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 | |
from tensorflow.keras import Model, layers | |
from spectral_normalization import SpectralNormalization | |
class Cnn(k.Model): | |
def __init__(self, name=None): | |
super(cnn, self).__init__(name=name) | |
self.conv1 = SpectralNormalization(layers.Conv2D(1, (3, 3))) | |
self.conv2 = SpectralNormalization(layers.Conv2D(64, (3, 3))) | |
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 tensorflow.python.eager import def_function | |
from tensorflow.python.framework import dtypes | |
from tensorflow.python.framework import tensor_shape | |
from tensorflow.python.keras import backend as K | |
from tensorflow.python.keras import layers | |
from tensorflow.python.keras import initializers | |
from tensorflow.python.ops import array_ops | |
from tensorflow.python.ops import math_ops | |
class SpectralNormalization(layers.Wrapper): |
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
基本教學 | |
https://medium.com/pyladies-taiwan/python-%E5%B0%87python%E6%89%93%E5%8C%85%E6%88%90exe%E6%AA%94-32a4bacbe351 | |
除錯參考 | |
https://dotblogs.com.tw/shaynling/2018/01/22/170349 | |
PyInstaller | |
http://www.pyinstaller.org/ |
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
typedef struct Cards | |
{ | |
int face; | |
char* suit; | |
} Card; | |
char spade[5]; | |
char heart[5]; | |
char diamond[7]; | |
char club[4]; |
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
sum=input; | |
for(count=1;count<=10;count++)//反向相加的次數以10為上限(這裡開始好像怪怪的) | |
{ | |
reverse = 0; | |
temp=sum; | |
while(temp) | |
{ | |
reverse=reverse*10+temp%10; | |
temp/=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
int input; | |
int answer[100] | |
int counter = 0 | |
int i; | |
scanf("%d", &input); | |
while(input >= 1){ | |
answer[counter] = input % 2; | |
input = input / 2; |
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 main() | |
{ | |
int N; | |
double input; | |
printf("學號後五碼:30023\n"); | |
printf("Enter a number:"); | |
scanf("%lf",&N); //讀double要用%lf | |
fflush(stdin); | |
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
#include <stdio.h> | |
#include <stdlib.h> | |
void change(char i); | |
int main(){ | |
char string[5]; | |
int j=0; | |
printf("1.請輸入進行編碼的五個字元:"); | |
scanf("%c%c%c%c%c", string, string+1, string+2, string+3, string+4); |
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
#include<stdio.h> | |
#include<stdlib.h> | |
int scale = 0; | |
int i = 0; | |
int j = 0; | |
int is_p = 0; | |
scanf("%d", &scale); | |
//calculate every int lower than scale |
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
static public void getCookie() throws IOException | |
{ | |
HttpURLConnection HttpConn; | |
URL Url = new URL(INDEX_URL); | |
HttpConn = (HttpURLConnection) Url.openConnection(); | |
System.out.println(HttpConn); | |
HttpConn.setConnectTimeout(15000); |
NewerOlder