Skip to content

Instantly share code, notes, and snippets.

View FlorianCassayre's full-sized avatar

Florian Cassayre FlorianCassayre

View GitHub Profile
@FlorianCassayre
FlorianCassayre / Quine.java
Created November 13, 2015 20:29
Quick Quine on Processing (Java)
/**
* @author Florian Cassayre
*/
void setup()
{
String[] string = {
"/**",
" * @author Florian Cassayre",
" */",
"void setup()",
@FlorianCassayre
FlorianCassayre / WorldGenCaves.java
Created January 3, 2016 13:08
Modify the minecraft cave generation behavior by increasing/decreasing caves density.
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
@FlorianCassayre
FlorianCassayre / Fractals_.gitignore
Created January 23, 2016 14:21
Fractals generator
# 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/

Le talent acrobatie s'active quand le joueur fait une chute. Cela lui rapporte de l'expérience et il peut potentiellement amortir ses dégâts au moyen de deux capacités passives.

Cependant, l'acrobatie ne s'active pas lorsque le plugin détecte que le joueur essaie de farmer la capacité. Il n'obtient alors ni expérience, ni roulade (gracieuse).

Les conditions pour que l'acrobatie s'active lors d'une chute sont les suivantes (d'après le code source) (configurables, mais zcraft possède la configuration par défaut) :

  • La chute ne doit pas être mortelle.
  • Ne pas avoir d'enderpearl(s) dans sa main principale lors de la chute. En avoir dans la main secondaire fonctionne cependant.
  • Ne pas être dans un véhicule ou bien chevaucher une entité lors de la chute.
  • Attendre au moins 5 secondes entre chaque chute.
@FlorianCassayre
FlorianCassayre / RandomFractalGenerator.java
Created August 24, 2016 16:50
Random fractal generator. Customizable & scalable.
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import java.util.Random;
/**
* Random fractal generator that looks like terrain.
* Since this is just an example, it doesn't keep track of the 'window' location.

Keybase proof

I hereby claim:

  • I am FlorianCassayre on github.
  • I am flomine (https://keybase.io/flomine) on keybase.
  • I have a public key whose fingerprint is F9E9 8023 F31D 58C1 C3E4 6BF6 7C75 C952 059C 1F29

To claim this, I am signing this object:

@FlorianCassayre
FlorianCassayre / gauss_jordan.py
Last active February 9, 2017 18:44
Élimination de Gauss-Jordan en Python
__author__ = 'Florian Cassayre'
from copy import copy, deepcopy
def inverse(toInverse):
size = len(toInverse)
matrix = [[0 for j in range(size * 2)] for i in range(size)] # Matrice n x 2n
final float g = 0.5, m1 = 1, l1 = 100;
final float i = m1 * l1 * l1 / 3; // m*L^2/3
float a = 0, v = 0.01, x = -PI / 2 + 0.1;
void setup()
{
size(500, 500);
}
void draw()
final float g = 0.2;
final float m1 = 1, l1 = 100, m2 = 1, l2 = 100;
float a1 = 0, v1 = 0, x1 = PI / 2;
float a2 = 0, v2 = -0.005, x2 = PI;
float lastX = 0, lastY = 0;
boolean first = true;
PGraphics graphics;
import java.math.BigInteger;
public final class BigRational extends Number implements Comparable<BigRational>
{
public final static BigRational ZERO = valueOf(0);
public final static BigRational ONE = valueOf(1);
public final static BigRational MINUS_ONE = valueOf(-1);
private BigInteger numerator;