Skip to content

Instantly share code, notes, and snippets.

View FloydHsiu's full-sized avatar

Charlie Chang FloydHsiu

  • Phison
  • Taiwan
View GitHub Profile
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)))
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):
基本教學
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/
typedef struct Cards
{
int face;
char* suit;
} Card;
char spade[5];
char heart[5];
char diamond[7];
char club[4];
sum=input;
for(count=1;count<=10;count++)//反向相加的次數以10為上限(這裡開始好像怪怪的)
{
reverse = 0;
temp=sum;
while(temp)
{
reverse=reverse*10+temp%10;
temp/=10;
}
int input;
int answer[100]
int counter = 0
int i;
scanf("%d", &input);
while(input >= 1){
answer[counter] = input % 2;
input = input / 2;
@FloydHsiu
FloydHsiu / Cal.c
Last active October 31, 2016 04:13
int main()
{
int N;
double input;
printf("學號後五碼:30023\n");
printf("Enter a number:");
scanf("%lf",&N); //讀double要用%lf
fflush(stdin);
@FloydHsiu
FloydHsiu / Test.c
Last active October 27, 2016 08:58
#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);
#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
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);