Skip to content

Instantly share code, notes, and snippets.

View extremeheat's full-sized avatar
🔶

extremeheat

🔶
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
var addBinary = function(a, b) {
let binaryStringA = a.split('').reverse()
let binaryStringB = b.split('').reverse()
let valA = 0n
for (let i = 0n; i < binaryStringA.length; i++) {
if (binaryStringA[i] == 1) valA += 2n ** i
}
let valB = 0n
@extremeheat
extremeheat / mineflayer.ipynb
Created July 18, 2021 08:47
mineflayer.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@extremeheat
extremeheat / mineflayer.ipynb
Created July 18, 2021 08:02
mineflayer.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import { py, python, PyClass } from "JSPyBridge"
const tf = await python('tensorflow')
class KerasCallback extends PyClass {
constructor() {
super(tf.keras.callbacks.Callback())
}
on_epoch_end(epoch, logs) {
if (logs.loss < 0.4) {
@extremeheat
extremeheat / calc.js
Created June 28, 2021 07:04
node tkinter calculator
import { python } from 'JSPyBridge'
const tk = await python('tkinter')
let expression = ''
let equation
async function press(num) {
if (num === '=') {
try {
console.info('Evaluating:', expression)
@extremeheat
extremeheat / come_bot.py
Created June 22, 2021 08:49
mineflayer bot in python
from JSPyBridge import require, On
mineflayer = require('mineflayer')
pathfinder = require('mineflayer-pathfinder')
RANGE_GOAL = 1
BOT_USERNAME = 'python'
bot = mineflayer.createBot({
'host': '127.0.0.1',
'port': 25565,
@extremeheat
extremeheat / recipe-map.json
Created August 14, 2020 05:09
bedrock recipie map
[
{
"inp": [
"339,-1",
"345,-1"
],
"id": 0,
"out": "395,2"
},
{
{
"potion_container_change": [
{
"ingredient": {
"id": 289
},
"input_item_id": 373,
"output_item_id": 438
},
{
@extremeheat
extremeheat / data.txt
Created May 1, 2018 05:41
minecraft 1.12 block states to minecraft 1.13 block states map
>python java113convgen.py
no blockstate for minecraft:air
$ minecraft:air => None
$ minecraft:stone[variant=stone] => minecraft:stone
$ minecraft:stone[variant=granite] => minecraft:granite
$ minecraft:stone[variant=smooth_granite] => minecraft:polished_granite
$ minecraft:stone[variant=diorite] => minecraft:diorite
$ minecraft:stone[variant=smooth_diorite] => minecraft:polished_diorite
$ minecraft:stone[variant=andesite] => minecraft:andesite
$ minecraft:stone[variant=smooth_andesite] => minecraft:polished_andesite