Skip to content

Instantly share code, notes, and snippets.

View SvizelPritula's full-sized avatar

Benjamin Swart SvizelPritula

  • Czechia
  • 07:53 (UTC +02:00)
View GitHub Profile
#include <DHT.h>
DHT dht(3, DHT11);
void setup() {
Serial.begin(9600);
dht.begin();
}
void loop() {
This file has been truncated, but you can view the full file.
function countdown(letters) {
var words = [];
if (letters.match(/A/g) != null && letters.match(/A/g).length >= 2 && letters.match(/B/g) != null && letters.match(/D/g) != null && letters.match(/D/g).length >= 2 && letters.match(/E/g) != null && letters.match(/N/g) != null && letters.match(/N/g).length >= 2 && letters.match(/O/g) != null)
words.push("ABANDONED");
if (letters.match(/A/g) != null && letters.match(/B/g) != null && letters.match(/E/g) != null && letters.match(/I/g) != null && letters.match(/I/g).length >= 3 && letters.match(/L/g) != null && letters.match(/S/g) != null && letters.match(/T/g) != null)
words.push("ABILITIES");
if (letters.match(/A/g) != null && letters.match(/A/g).length >= 2 && letters.match(/B/g) != null && letters.match(/C/g) != null && letters.match(/R/g) != null && letters.match(/S/g) != null && letters.match(/S/g).length >= 2 && letters.match(/T/g) != null && letters.match(/T/g).length >= 2)
words.push("ABSTRACTS");
if (letters.match(/
function scrabble(str) {
var score = 0;
for (var i = 0; i < str.length; i++) {
if (str[i] == 'a' || str[i] == 'A') {
score += 1;
} else {
if (str[i] == 'b' || str[i] == 'B') {
score += 3;
} else {
if (str[i] == 'c' || str[i] == 'C') {
How to use:
1. Create your animation in Blender. Use 1x1x1 cubes. (That's the default cube with a scale of 0.5) Use 20 fps. Only location and rotation is relevant.
2. Import the export.py script, and pick a location to save the data. Input it into the path variable.
3. Select the blocks you want exported and run the script.
4. Make an empty datapack inside your world folder. Create your pack.mcmeta.
5. Install node.js and download the generateDataPack.js script.
6. Fill in all the paths. That's a path to the root datapack folder, a path to the animation data from step 2.
7. Put in the coordinates. That is the position in your world that corresponds to 0 0 0 in Blender. The mapping of Blender to Minecraft coordinates is X=Z, Y=X, Z=Y
8. Fill in the namespace and name. The namespace is the regular Minecraft namespace, the name is a unique name within the namespace.
9. Fill in the scoreboard objective. Create it in Minecraft with the dummy type.
@SvizelPritula
SvizelPritula / while.js
Created March 13, 2020 12:18
string_count.js
function stringCount(s) {
var spacec = 0;
var exclc = 0;
var quotec = 0;
var hashtagc = 0;
var usdc = 0;
var precentc = 0;
var andc = 0;
var quotesc = 0;
var brackc = 0;
This file has been truncated, but you can view the full file.
function cupid(male, female) {
return { [["Aarav", "Aaliyah"]]: 74, [["Aarav", "Abby"]]: 5, [["Aarav", "Abigail"]]: 46, [["Aarav", "Ada"]]: 33, [["Aarav", "Adalee"]]: 85, [["Aarav", "Adaline"]]: 39, [["Aarav", "Adalyn"]]: 92, [["Aarav", "Adalynn"]]: 97, [["Aarav", "Addilyn"]]: 99, [["Aarav", "Addilynn"]]: 35, [["Aarav", "Addison"]]: 72, [["Aarav", "Addisyn"]]: 35, [["Aarav", "Addyson"]]: 18, [["Aarav", "Adelaide"]]: 76, [["Aarav", "Adele"]]: 79, [["Aarav", "Adelina"]]: 67, [["Aarav", "Adeline"]]: 37, [["Aarav", "Adelyn"]]: 6, [["Aarav", "Adelynn"]]: 17, [["Aarav", "Adley"]]: 70, [["Aarav", "Adriana"]]: 11, [["Aarav", "Adrianna"]]: 82, [["Aarav", "Adrienne"]]: 8, [["Aarav", "Ailani"]]: 56, [["Aarav", "Aileen"]]: 88, [["Aarav", "Ainsley"]]: 15, [["Aarav", "Aisha"]]: 98, [["Aarav", "Aislinn"]]: 39, [["Aarav", "Aitana"]]: 89, [["Aarav", "Aiyana"]]: 29, [["Aarav", "Alaia"]]: 66, [["Aarav", "Alaina"]]: 97, [["Aarav", "Alana"]]: 20, [["Aarav", "Alani"]]: 20, [["Aarav", "Alanna"]]: 36, [["Aarav", "Alannah"]]: 47,