This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Created by https://www.gitignore.io/api/intellij | |
### Intellij ### | |
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm | |
*.iml | |
## Directory-based project format: | |
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InfiniteSeries | |
{ | |
public static void main(String[] args) | |
{ | |
/* | |
1 + 2 + 4 + 8 + ... = -1 | |
This algebraic proof is an analogy to Euler's approach to divergent series. | |
See https://en.wikipedia.org/wiki/1_%2B_2_%2B_4_%2B_8_%2B_%E2%8B%AF | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum BrainfuckInstruction | |
{ | |
INCREMENT('+'), | |
DECREMENT('-'), | |
CURSOR_RIGHT('>'), | |
CURSOR_LEFT('<'), | |
LOOP_START('['), | |
LOOP_END(']'), | |
INPUT(','), | |
OUTPUT('.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final int HIDDEN_LAYERS = 1; | |
final int INPUTS = 4 * 2; | |
final int OUTPUTS = 4; | |
final int NEURONS_PER_LAYER = 16; | |
final float LEARNING_RATE = 0.1; | |
final float[][] neurons = new float[2 + HIDDEN_LAYERS][]; // [layer][neuron] | |
final float[][][] axons = new float[1 + HIDDEN_LAYERS][][]; // [layer][previous_neuron][next_neuron] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"layers":[{"out_depth":1,"out_sx":24,"out_sy":24,"layer_type":"input"},{"sx":5,"sy":5,"stride":1,"in_depth":1,"out_depth":8,"out_sx":24,"out_sy":24,"layer_type":"conv","l1_decay_mul":0,"l2_decay_mul":1,"pad":2,"filters":[{"sx":5,"sy":5,"depth":1,"w":{"0":-0.002005437436999499,"1":0.11800762769429841,"2":0.15288575246122227,"3":0.17926717613376164,"4":-0.08993469726722844,"5":-0.20254829450417103,"6":0.15791114405597814,"7":0.31846451260019604,"8":0.01467962792660115,"9":-0.13848296305157726,"10":0.10341788356249301,"11":-0.06268045391638183,"12":0.6978074481239207,"13":-0.2938077242420065,"14":-0.5089319294176927,"15":-0.12264368305380181,"16":0.44763879656035277,"17":0.3359516007279942,"18":-0.06184286836783794,"19":-0.482255823490501,"20":0.3677897224446566,"21":0.10207491930585594,"22":0.21835092856908758,"23":-0.02092531346874951,"24":0.13842120306943864}},{"sx":5,"sy":5,"depth":1,"w":{"0":-0.43289539339825756,"1":-0.5130859925805419,"2":0.02528701695327489,"3":0.3359550133438127,"4":0.218543747256232,"5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import net.minecraft.server.v1_8_R2.*; | |
import org.bukkit.craftbukkit.v1_8_R2.CraftWorld; | |
import org.bukkit.craftbukkit.v1_8_R2.generator.NormalChunkGenerator; | |
import java.lang.reflect.Field; | |
/** | |
* @author Florian Cassayre (6infinity8) | |
*/ | |
public class WorldGenCaves extends net.minecraft.server.v1_8_R2.WorldGenCaves |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final int INITIAL_K = 0; | |
int k = INITIAL_K; | |
final int POINTS_PER_CLUSTER = 100; | |
final float POINTS_DEVIATION = 50; | |
final int INTERVAL = 100; | |
final ArrayList<Point> points = new ArrayList<Point>(); | |
final ArrayList<Point> centroids = new ArrayList<Point>(); | |
final HashMap<Point, Point> map = new HashMap<Point, Point>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reproduction of "Self-Description" by xkcd (https://xkcd.com/688). | |
// @author Florian Cassayre | |
final int PANEL_WIDTH = 500, PANEL_HEIGHT = 400, PADDING = 50, WEIGHT = 4; | |
PFont font; | |
void setup() | |
{ | |
surface.setSize(PANEL_WIDTH * 3 + PADDING * 2, PANEL_HEIGHT); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object CompteBonCombinations extends App { | |
val plates = { | |
val small = (1 to 10).toList | |
val big = List(25, 50, 75, 100) | |
small ++ small ++ big | |
} | |
val grouped = plates.groupBy(identity).mapValues(_.size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.util.Random | |
import Fiddle.draw._ | |
import org.scalajs.dom.{Event, EventTarget, MouseEvent} | |
import scala.collection.mutable.ArrayBuffer | |
val square = 50 | |
val (width, height) = (Fiddle.canvas.width, Fiddle.canvas.height) | |
val (mapWidth, mapHeight) = (20 * square, 20 * square) | |
val (borderLeft, borderRight, borderTop, borderBottom) = (0, mapWidth, 0, mapHeight) |