Skip to content

Instantly share code, notes, and snippets.

@staberas
staberas / interactive_websearch_chat.py
Last active May 2, 2024 22:17
interactive_websearch_chat.py
# This script requires to have some basic Python skills
# - Install python dependencies (thanks to TitwitMuffbiscuit on reddit) :
# pip install nltk beautifulsoup4 googlesearch-python trafilatura wolframalpha
#
# If you get this error "Resource punkt not found", it's because Punkt sentence tokenizer for Natural Language Toolkit is missing.
# Edit the file and add this before
# from nltk.tokenize import word_tokenize ,
# it will download the necessary english.pickle:
# import nltk
# nltk.download('punkt')
#!/bin/bash
# Define the minimum required free space in MB
MIN_FREE_SPACE=2000
# Define the filesystem to check
FILESYSTEM="/dev/root"
# Get the current directory
BUILD_DIR=$(pwd)
@staberas
staberas / index.html
Created March 23, 2023 12:52
pixi-live2d-display Basic
<script src="https://cubism.live2d.com/sdk-web/cubismcore/live2dcubismcore.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/dylanNew/live2d/webgl/Live2D/lib/live2d.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pixi.js@6.5.2/dist/browser/pixi.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/pixi-live2d-display/dist/index.min.js"></script>
<canvas id=canvas></canvas>
@staberas
staberas / wifi.ino
Created December 19, 2018 06:08
WEMOS WIFI monitor with oled screen
/*
This sketch demonstrates how to scan WiFi networks.
The API is almost the same as with the WiFi Shield library,
the most obvious difference being the different file you need to include:
resources: https://github.com/wemos/D1_mini_Examples & https://wiki.wemos.cc/products:d1:d1_mini_lite
*/
#include "ESP8266WiFi.h"
#include <SPI.h>
#include "SSD1306Ascii.h"
@staberas
staberas / bot.sh
Last active April 7, 2018 08:32
Shell bot
#!/bin/sh
# This is a comment!
echo starting bot; # This is a comment, too!
echo "initialize gpio";
gpio mode 1 out
gpio mode 0 out
VARIP="$(curl v4.ifconfig.co)"; #save external ip addr OR USE: curl ifconfig.me/ip
echo "Got IP addr";
echo "${VARIP}"; #echo ip
@staberas
staberas / Dice Gambler
Last active December 17, 2015 21:18 — forked from anonymous/Untitled
Created using soleditor: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://chriseth.github.io/browser-solidity?gist=
contract Dicegambler {
//get commands from God Creator
uint storedData;
address creator;
address gamblesite;
address gambleaddress;
address myAddress = this;
string asciidata;
string asciidata1;
string asciidata2;