Skip to content

Instantly share code, notes, and snippets.

@Jordach
Jordach / main.py
Last active September 1, 2022 01:55
from datetime import datetime, date, timezone
import numpy as np
import pandas as pd
import sqlite3
def get_stock_from_db(ticker, interval, limit=-1):
# Translate between local SQL db and expected formatting:
pwd = os.getcwd()
name = ticker.lower()
con = sqlite3.connect(pwd + "/db/db_" + name + ".db")
player:set_sky({
base_color = minetest.rgba(
result_fog.r,
result_fog.g,
result_fog.b),
type = "skybox",
textures = {
sky_tex_top,
sky_tex_bottom,
sky_tex_side,
@Jordach
Jordach / example.lua
Last active December 6, 2018 14:19
Skybox PR V2
player:set_skybox({
type = "texture", -- "dynamic", "plain", "texture", "texture_dome"
textures = {"top.png", "bottom.png", "side.png", "side.png", "side.png", "side.png"},
base_color = "#rrggbb",
dynamic_color = { --applies to type = "dyanmic"
day_sky = "#rrggbb",
day_horizon = "#rrggbb",
dawn_sky = "#rrggbb",
dawn_horizon = "#rrggbb",
night_sky = "#rrggbb",
Demo Beats, Experimental Minetracker
Jordach
135
return {{["sample"] = "kick", ["vol"] = 0.25, ["fade"] = 0.0, ["pitch"] = 1.0}}
return {["gap"] = 0}
return {{["sample"] = "hat", ["vol"] = 75.0, ["fade"] = 0.0, ["pitch"] = 1.0}}
return {{["sample"] = "snare", ["vol"] = 10.0, ["fade"] = 0.0, ["pitch"] = 1.0}}
return {{["sample"] = "kick", ["vol"] = 0.25, ["fade"] = 0.0, ["pitch"] = 1.0}}
return {["gap"] = 0}
return {{["sample"] = "hat2", ["vol"] = 75.0, ["fade"] = 0.0, ["pitch"] = 1.0}}
[ 95%] Building CXX object src/CMakeFiles/minetest.dir/sound_openal.cpp.o
[ 96%] Building CXX object src/CMakeFiles/minetest.dir/staticobject.cpp.o
[ 96%] Building CXX object src/CMakeFiles/minetest.dir/subgame.cpp.o
[ 97%] Building CXX object src/CMakeFiles/minetest.dir/terminal_chat_console.cpp.o
[ 97%] Building CXX object src/CMakeFiles/minetest.dir/tileanimation.cpp.o
[ 97%] Building CXX object src/CMakeFiles/minetest.dir/tool.cpp.o
[ 98%] Building CXX object src/CMakeFiles/minetest.dir/translation.cpp.o
[ 98%] Building CXX object src/CMakeFiles/minetest.dir/version.cpp.o
[ 99%] Building CXX object src/CMakeFiles/minetest.dir/voxel.cpp.o
[ 99%] Building CXX object src/CMakeFiles/minetest.dir/voxelalgorithms.cpp.o
CMakeFiles/minetest.dir/convert_json.cpp.o: In function `fetchJsonValue(std::string const&, std::vector<std::string, std::allocator<std::string> >*)':
convert_json.cpp:(.text+0x899): undefined reference to `Json::Value::Value(Json::Value&&)'
CMakeFiles/minetest.dir/serverlist.cpp.o: In function `ServerList::deleteEntry(Json::Value const&)':
serverlist.cpp:(.text+0x2397): undefined reference to `Json::Value::Value(Json::Value&&)'
serverlist.cpp:(.text+0x23dd): undefined reference to `Json::Value::Value(Json::Value&&)'
serverlist.cpp:(.text+0x2409): undefined reference to `Json::Value::Value(Json::Value&&)'
serverlist.cpp:(.text+0x2435): undefined reference to `Json::Value::Value(Json::Value&&)'
CMakeFiles/minetest.dir/serverlist.cpp.o:serverlist.cpp:(.text+0x246d): more undefined references to `Json::Value::Value(Json::Value&&)' follow
CMakeFiles/minetest.dir/serverlist.cpp.o: In function `ServerList::sendAnnounce(ServerList::AnnounceAction, unsigned short, std::vector<std::string, std::allocator<std::string>
Linking CXX executable ../bin/minetest
CMakeFiles/minetest.dir/convert_json.cpp.o: In function `fetchJsonValue(std::string const&, std::vector<std::string, std::allocator<std::string> >*)':
convert_json.cpp:(.text+0x68e): undefined reference to `Json::Value::Value(Json::Value&&)'
CMakeFiles/minetest.dir/serverlist.cpp.o: In function `ServerList::deleteEntry(Json::Value const&)':
serverlist.cpp:(.text+0x2437): undefined reference to `Json::Value::Value(Json::Value&&)'
serverlist.cpp:(.text+0x247d): undefined reference to `Json::Value::Value(Json::Value&&)'
serverlist.cpp:(.text+0x24a9): undefined reference to `Json::Value::Value(Json::Value&&)'
serverlist.cpp:(.text+0x24d5): undefined reference to `Json::Value::Value(Json::Value&&)'
CMakeFiles/minetest.dir/serverlist.cpp.o:serverlist.cpp:(.text+0x250d): more undefined references to `Json::Value::Value(Json::Value&&)' follow
collect2: error: ld returned 1 exit status
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/textures/base/pack/menu_header.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/games/Solar_Plains/menu/header.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/games/Solar_Plains/menu/icon.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/games/minetest_game/menu/icon.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/games/minimal/menu/icon.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/textures/base/pack/menu_header.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/games/Solar_Plains/menu/header.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/textures/base/pack/menu_header.png
Loaded texture: C:/Users/jorda/Desktop/minetest-0.4.15/games/Solar_Plains/menu/header.png
2017-06-08 17:01:12: WARNING[Main]: BanManager: creating C:\Users\jorda\Desktop\minetest-0.4.15\bin\..\worlds\testgfse\ipban.txt
@Jordach
Jordach / gist:f66af33cc01f60da2e9fa790f7d85f22
Last active May 29, 2017 21:26
Simplified Power System
Alternative to Technic and Pipeworks:
Power can only be generated from renewable sources, such as water, lava[?], wind and solar[?].
All connected machines will consume active power at all time, whether the machines are depowered or not.
Each passive producer provides 1 EP indefinitely or add an active producer that uses fuel but for more EP,
perhaps make cabling slowly disintergrate or passive machines need repairs over time?
Tiered power is not nessessary at all.
@Jordach
Jordach / .lua
Last active March 9, 2022 00:51
less strange slabs and stairs.
-- stairs, Jordach / Solar Plains redo
-- mods depend on us (to provide them with their own stairs, damn socialists!), so lets make a namespace
stairs = {}
function stairs.register_stair(subname, groups_table, images, desc, sound_table)
groups_table.stair = 1