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 gym | |
import numpy as np | |
from tensorflow.keras.models import Sequential | |
from tensorflow.keras.layers import Dense | |
import pygad.kerasga | |
import pygad | |
def fitness_func(solution, sol_idx): | |
global keras_ga, model, observation_space_size, env |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 torchvision | |
import torchvision.transforms as transforms | |
import torch.nn as nn | |
import torch.nn.functional as F | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import torch.optim as optim | |
transform = transforms.Compose([ |
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 numpy as np | |
import matplotlib.pyplot as plt | |
TRUE_W = 3.0 | |
TRUE_b = 0.5 | |
NUM_EXAMPLES = 1000 | |
x = torch.empty(NUM_EXAMPLES).normal_(mean=0,std=1.0) |
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
<template> | |
<nb-container> | |
<nb-header></nb-header> | |
<nb-grid> | |
<nb-row :style="{ height: 60 }" v-for="(todo, idx) in todos" :key="idx"> | |
<nb-col :size="85" :style="{ justifyContent: 'center' }"> | |
<text :style="{marginLeft: 10}">{{todo}}</text> | |
</nb-col> | |
<nb-col :size="15" :style="{ justifyContent: 'center' }"> | |
<nb-button iconCenter transparent :on-press="() => removeItem(idx)"> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Vue.js TODO Example</title> | |
<script src="https://unpkg.com/vue"></script> | |
<script src="https://unpkg.com/http-vue-loader"></script> | |
</head> | |
<body> |
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
<template> | |
<table> | |
<tr v-for="(todo, idx) in todos" :key="idx"> | |
<td class="todo_text">{{todo}}</td> | |
<td> | |
<button @click="removeItem(idx)">Done</button> | |
</td> | |
</tr> | |
<tr> | |
<td> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Vue.js TODO Example</title> | |
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> | |
</head> | |
<body> | |
<div id="app"> |
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
<html> | |
<head> | |
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> | |
</head> | |
<body> | |
<div id="app"> | |
<span>{{msg}}</span><button @click="btnClick">Push me!</button> | |
</div> | |
<script> | |
new Vue({ |
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
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-3.5.1.min.js" integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin="anonymous"></script> | |
</head> | |
<body> | |
<span id="msg">Hello World!</span><button id="btn">Push me!</button> | |
<script> | |
$('#btn').click(function() { | |
$('#msg').html('Hello jQuery!'); | |
}); |