Skip to content

Instantly share code, notes, and snippets.

View daovietanh190499's full-sized avatar

Đào Việt Anh daovietanh190499

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<meta charset="UTF-8">
<title>♥️ Facebook ♥️</title>
<style type="text/css">
/* width */
::-webkit-scrollbar {
window.localStorage.setItem("shopdata", JSON.parse([
{
"image": "",
"itemName": "Bút bi Thiên Long 027",
"company": "Thiên Long",
"description": "",
"barcode": ""
}, {
"image": "",
"itemName": "Bút bi Thiên Long 028",
@daovietanh190499
daovietanh190499 / population.js
Created January 18, 2020 15:24
NEUROEVOLUTION USING TENSORFLOW
//you must provide tensorflow js to run this
class NeuralNetwork {
constructor(a, b, c, d) {
if (a instanceof tf.Sequential) {
this.model = a;
this.input_nodes = b;
this.hidden_nodes = c;
this.output_nodes = d;
} else {
this.input_nodes = a;
<script>
let schedule = (array, type, quantum) => {
let sum = 0;
for(let i =0; i < array.length; i ++) {
sum += array[i][2];
}
let cloneArray = JSON.parse(JSON.stringify(array));
let time = -1;
let result = [];
let totalBurst = 0;
class CustomPromise {
constructor(executable = (resolve, reject) => {}) {
this.state = 'pending';
this.result = undefined;
this.error = undefined;
this.thenList = [];
this.catchList = [];
this.executable = executable;
this.execute();
return this
import java.io.IOException;
import java.io.BufferedReader;
import java.io.PrintWriter;
import java.io.InputStreamReader;
import java.net.InetAddress;
import java.net.Socket;
import java.net.UnknownHostException;
public class Client {
import cv2
import math
import numpy as np
import ocr_v2.config.constants as const
from ocr_v2.process.PretrainedModel import PretrainedModel
from ocr_v2.model.yolact.yolact_eval import yolact_predict
models = PretrainedModel()
from __future__ import print_function, division
import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim import lr_scheduler
from torch.autograd import Variable
from torchvision import models
from torchvision import transforms, datasets
from PIL import Image
import scipy.io as scio
function emailTemplate(code){
return `
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Shopsmon Email</title>
<style>
@media only screen and (max-width: 620px) {
function doGet(e){
return handleResponse(e);
}
function getData(sheet) {
var rows = sheet.getRange(2,1,(sheet.getLastRow()-1 <= 0) ? 1 : sheet.getLastRow()-1, sheet.getLastColumn()).getValues();
return rows
}
var SHEET_NAME = "orders";