Skip to content

Instantly share code, notes, and snippets.

View wallabra's full-sized avatar

Gustavo Ramos Rehermann wallabra

View GitHub Profile
@wallabra
wallabra / unrealbrushexporter.py
Last active March 8, 2021 00:01
Blender Python script to export Blender models to Unreal Engine 1 brushes
bl_info = {
"name": "Unreal Brush to Clipboard (.t3d)",
"category": "Import-Export",
"desctiption": "This is an exporter for Unreal Editor 2 (Unreal Engine 1).\n\nIt uses subprocess and Windows' clip command to paste the brush data\ninto the clipboard so it can be pasted directly into Unreal Editor.",
"author": "Gustavo Ramos 'Gustavo6046' Rehermann"
}
import functools
import bpy
@wallabra
wallabra / __fragment__connload.py
Created February 15, 2017 14:14
String reversing GusPIRC 2 thingie.
@c.global_receiver(regex=":[^\\!]+\\![^\\@]+\\@[^ ]+ PRIVMSG #([^ ]+) :|;reverse( (.+))?")
def reverse_string(connection, message, custom_groups):
if custom_groups[1] == "":
return "PRIVMSG #{} :Syntax: reverse <string to reverse>"
r = custom_groups[2]
if r is None:
return
@wallabra
wallabra / train.py
Last active March 1, 2017 00:04
Failed attempt at some Cyberspeare
import cPickle as pk
import random
import re
import difflib
from pybrain.tools.shortcuts import buildNetwork as new_net
from pybrain.datasets import SupervisedDataSet
from pybrain.supervised.trainers import BackpropTrainer
from pybrain.structure import SoftmaxLayer
@wallabra
wallabra / vectiles.md
Last active June 1, 2017 21:29
Vectorial Tile Format (VTF)

VTF

Vectorial Tile Format (VTF) is a format to store large tilemaps in small bytespaces.


How do I store VTF data?

There are two kinds of VTF: XVTF (XML-based Vectorial Tile Format) and BVTF (Binary Vectorial Tile Format). Both share a specification in common, but each uses their own structure to store it.

XVTF

XVTF is an XML document that stores VTF data using a structure that looks like the following:

@wallabra
wallabra / bhaskara.md
Last active June 10, 2017 17:38
Some stuff for my Maths teacher.

Problema:

"Tenho uma frota de ônibus, e alugo cada ônibus para 40 ou mais passageiros. Se o número de passageiros for exatamente 40, cada um pagará R$350,00. Haverá um abatimento de R$5,00 para cada passageiro que exceder os 40. Como a capacidade de cada ônibus é de 60 passageiros, qual deverá ser o número de passageiros em cada ônibus, a fim de que eu obtenha a maior receita possível, ou seja, a receita máxima? Qual o valor da receita máxima?"

Resolução:

Seja R = Receita. Logo, R= Número de passageiros vezes pagamento por passageiro. Se o número de passageiros passar de 40 para 41, então o Pagamento por Passageiro (41)

@wallabra
wallabra / saybale_ajax.md
Last active June 10, 2017 22:01
List of possible processes within the SayBale server (e.g. saybale.url/connect) using POST requests.

Ajax POST JSON subpages available in SayBale

SUBPAGES (Ajax) ARGUMENT KEYS RETURN KEYS
disconnect reason
connect nick
sendchat text
getchat logs next continue
setnick newNick continue
adminauth password success
kick other success
@wallabra
wallabra / Cosingle.md
Created June 12, 2017 23:08
Step-by-step algebra solver and sub-block-based solution finder

Cosingle

Cosingle is a math engine that finds solutions to equations by breaking them into small blocks and solving them step-by-step.

@wallabra
wallabra / xbs_syntax.md
Last active June 18, 2017 15:56
XBS syntax organization (work in progress)

XBS Syntax

Variable assignment: var varname = value;, $varname = value;
Variable references: @varname;
Associative array operations: @arrname['key'];, @arrname['key'] = value;
External command calls: &command('arg1' @arg2);
Inline external command calls: &(command 'arg1' @arg2)
Functions: funcname(arg1, arg2) {statements;}
Anonymous functions: (arg1, arg2) -> {statements;}
Function calls: call funcname(arg1, arg2);
Anonymous function calls (when assigned to a variable): call @(varname)(arg1, arg2);

@wallabra
wallabra / handparse.coffee
Created June 30, 2017 12:09
Small manual parsing library I'm doing in CoffeeScript for Node.JS (WIP)
class Parsing
constructor: ->
parse: (text) ->
throw new Error("Use a subclass of ParsingBlock!")
class CharacterClass extends Parsing
constructor: (@chars, @otherChars, @whitespace) ->
parse: (text) =>
@wallabra
wallabra / redub.md
Created July 28, 2017 20:14
Software Concept: redub.io

Ever felt like you needed someone else's voice to dub something you can't yourself, either due to some bad or missing microphone?

Ever felt like some dubbing would sound clearer in the voice of Rambo but never managed to find the very words you wanted to use?

Worry not! ...at least once this project is made:

redub.io

(not an actual working link yet!)

Usage