Skip to content

Instantly share code, notes, and snippets.

@scanzy
scanzy / tewaker.py
Created April 28, 2023 11:00
Set custom id/class in Streamlit, and inject css/js
import random as rd
import functools as ft
import streamlit as st
import streamlit.components.v1 as components
# Domanda: come applicare stili css solo ad alcuni elementi streamlit?
# Risposta: iniettare js che aggiorni id e classe dell'elemento precedente
@scanzy
scanzy / dropbox-paper-docx-latex-fix.bas
Created October 17, 2018 23:40
Simple LibreOffice Macro (VB) to render correctly latex content in .docx files exported from Dropbox Paper
'This script calls functions from the LibreOffice TexMaths extension
'Make sure TexMaths is installed, along with Tex
Sub PaperLatex
dim t as string
dim oDoc as object
dim oSearch as object
dim oResult as object
dim oCursor as object
@scanzy
scanzy / scanzytable.js
Last active July 4, 2016 23:09
Simple js script to load data into table using ajax request
$.fn.extend({
scanzytable: function (options) {
//saves root, options and load items function
var t = { root: this, options: options, loadItems: function (requestdata) {
var root = this.root;
//loads request data
if (requestdata == undefined) requestdata = options['request']['data'];
else //uses data passed as param to update data stored in object