Skip to content

Instantly share code, notes, and snippets.

View lextoumbourou's full-sized avatar

Lex Toumbourou lextoumbourou

View GitHub Profile
@lextoumbourou
lextoumbourou / predictions.py
Last active August 27, 2018 00:27
Making predictions with a SequentialRNN model (Fast.ai)
# Note: ensure you have the latest version of Torchtext by running: pip install torchtext --upgrade
rnn_model = text_data.get_model(opt_fn, 1500, bptt, emb_sz=em_sz, n_hid=nh, n_layers=nl,
dropout=0.1, dropouti=0.65, wdrop=0.5, dropoute=0.1, dropouth=0.3)
# ...
rnn_model.data.test_dl.src.sort = False
rnn_model.data.test_dl.src.sort_within_batch = False
rnn_model.data.test_dl.src.shuffle = False
@lextoumbourou
lextoumbourou / roblox-create-voxel-of-terrain.lua
Last active May 11, 2021 11:39
Create a single Voxel of Terrain in Roblox
local Terrain = game:GetService("Workspace").Terrain
-- The resolution required for Terrain system.
local terrainResolution = 4
-- The smallest possible voxel size.
local region = Region3.new(Vector3.new(0,0,0), Vector3.new(4,4,4))
-- The material as a 1x1x1 3d-grid. What material should go in the voxel?
local material = {
@lextoumbourou
lextoumbourou / GamepadCursorScrollUtil.lua
Last active July 9, 2021 02:04
A Roblox module that allows Gamepad scrolling using the DPad
local ContextActionService = game:GetService('ContextActionService')
local module = {hold=false}
local ActionNames={
['ScrollDown']='ScrollDown',
['ScrollUp']='ScrollUp',
['ScrollRight']='ScrollRight',
['ScrollLeft']='ScrollLeft'
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.