Skip to content

Instantly share code, notes, and snippets.

View 24hours's full-sized avatar
💬
commit

Lee Yeong Khang 24hours

💬
commit
View GitHub Profile
import os
import torch
from torch.nn import functional as F
from torch.utils.data import DataLoader
from torchvision.datasets import MNIST
from torchvision import transforms
import pytorch_lightning as pl
class MNISTModel(pl.LightningModule):
[
{
"image_id": 897,
"category_id": 0,
"bbox": [
x,
y,
w,
h,
theta
import tensorflow as tf
tf.reset_default_graph()
isTrain = tf.placeholder(tf.bool)
user_input = tf.placeholder(tf.float32)
# ema = tf.train.ExponentialMovingAverage(decay=.5)
with tf.device('/cpu:0'):
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
<?php
/*
--------------------------------------------------------------------------
Zenphoto <= 1.4.1.4 (ajax_create_folder.php) Remote Code Execution Exploit
--------------------------------------------------------------------------
author............: Egidio Romano aka EgiX
mail..............: n0b0d13s[at]gmail[dot]com
software link.....: http://www.zenphoto.org/
@24hours
24hours / diary.m
Last active August 29, 2015 14:02
Handling Matlab on cmd
echo "matlab -nojvm -nodisplay -nosplash -r \"warning off, delete('result.txt'), warning on, diary('result.txt'), try, run 'main.m', catch e,disp(getReport(e)), end, exit\" ; echo 'Test Result attached' | mail -s 'Matlab Experiment Completed' -a 'From: Cluster@ubuntu (Mulsec Cluster)' -A result.txt s@gmail.com" | batch
import sys, getopt
def main():
try:
opts, args = getopt.getopt(sys.argv[1:], "hm:t:", ["help", "memory=", "time="])
except getopt.GetoptError as err:
# print help information and exit:
print str(err) # will print something like "option -a not recognized"
usage()
sys.exit(2)
"""A simple implementation of a greedy transition-based parser. Released under BSD license."""
from os import path
import os
import sys
from collections import defaultdict
import random
import time
import pickle
SHIFT = 0; RIGHT = 1; LEFT = 2;
@24hours
24hours / bob.js
Last active August 29, 2015 13:58
bob = {
move : function(game){
var possibleMoves = game.moves({
verbose: true
});
var randomIndex = Math.floor(Math.random() * possibleMoves.length);
var move = possibleMoves[randomIndex];
return move;
}