(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// https://github.com/Bukkit/CraftBukkit/blob/7e1ac0a77129b169704c1e222ff2deb3ab6cd2d2/src/main/java/net/minecraft/server/EntityPlayer.java#L596 | |
//Method to open an anvil inventory to a player | |
public static void openAnvil(Player player, Inventory inventory){ | |
//Get our EntityPlayer | |
EntityPlayer p = ((CraftPlayer) player).getHandle(); | |
//Create the AnvilContainer | |
AnvilContainer container = new AnvilContainer(p); |
package your-package; | |
import org.bukkit.ChatColor; | |
import org.bukkit.entity.Player; | |
import java.awt.*; | |
import java.awt.image.BufferedImage; | |
import java.util.HashMap; | |
/** |
public static String romanNumerals (int value) { | |
String[] values = { | |
"M", "CM", "D", "CD", "C", "XC", | |
"L", "XL", "X", "IX", "V", "IV", "I" | |
}; | |
int[] correspondents = { | |
1000, 900, 500, 400, 100, 90, | |
50, 40, 10, 9, 5, 4, 1 | |
} |
How do I make an effect that spirals, becoming smaller as time goes on? | |
So, as we know a circle is defined by the equation: | |
r^2 = (x - a)^2 + (y - b)^2 | |
So that gets us the general equation with which we will be working. As a result, we should also know that: | |
as a->∞ = translation in the x, right | |
as b->∞ = translation in the y, up |
package com.comphenix.example; | |
import java.io.BufferedInputStream; | |
import java.io.DataInput; | |
import java.io.DataInputStream; | |
import java.io.DataOutput; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; |
#!/usr/bin/perl | |
use strict; | |
for my $i (1..16420) { | |
system("wget -O data/bf.$i.html 'http://forums.bukkit.org/members/?page=$i'"); | |
sleep 2; | |
} |
package com.comphenix.example; | |
import java.lang.reflect.Field; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.UUID; | |
import java.util.concurrent.ConcurrentMap; | |
import javax.annotation.Nonnull; | |
import javax.annotation.Nullable; |
/* | |
* ServerListAPI - API to modify some advanced Minecraft server list data | |
* Copyright (C) 2013 Minecrell | |
* You are not allowed to use this API to fake online players on a production server. | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 3 of the License, or | |
* (at your option) any later version. | |
* |