-
java.util.Random, An instance of this class is used to generate a stream of pseudorandom numbers. The class uses a 48-bit seed, which is modified using a linear congruential formula. (See Donald Knuth, The Art of Computer Programming, Volume 2, Section 3.2.1.)
-
This class has 6 nifty functions:
- nextBoolean()
- nextDouble()
-
nextFloat()
This file contains hidden or 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
process.env.NTBA_FIX_319 = 1; | |
const TelegramBot = require('node-telegram-bot-api'); | |
const rp = require('request-promise'); | |
const cheerio = require('cheerio'); | |
// replace the value below with the Telegram token you receive from @BotFather | |
const token = 'my awesome token'; | |
// Create a bot that uses 'polling' to fetch new updates | |
const bot = new TelegramBot(token, { |
This file contains hidden or 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 java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Random; | |
public class FortressGen { | |
private static final Random rand = new Random(); |
This file contains hidden or 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
const Discord = require('discord.js'); | |
const client = new Discord.Client(); | |
const auth = require('./auth.json'); | |
const xp = require('./xp.json'); | |
const fs = require('fs'); | |
var messageCounter = 0; | |
client.on('ready', () => { | |
console.log('Ready!'); | |
console.log(client.guilds.map(g => g.name).join("\n")); |
This file contains hidden or 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
/* | |
* Decompiled with CFR 0.146. | |
*/ | |
package net.minecraft.world.level.biome; | |
import net.minecraft.util.LinearCongruentialGenerator; | |
import net.minecraft.world.level.biome.Biome; | |
import net.minecraft.world.level.biome.BiomeManager; | |
import net.minecraft.world.level.biome.BiomeZoomer; |
This file contains hidden or 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
#include <stdio.h> | |
#include <string.h> | |
#include <inttypes.h> | |
#include <time.h> | |
#ifdef __linux | |
#include <unistd.h> | |
#endif | |
#include <errno.h> | |
#define min(a, b) ((a) < (b) ? (a) : (b)) |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
from util_gro_tp2 import * | |
from numpy import minimum | |
def flot_max(G, source, puits, debug=False) : | |
# | |
# calcul du flot max pour le graphe G | |
# | |
if not type(G) == GrapheOrienteValue : |
This file contains hidden or 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
download msys2 here : https://www.msys2.org/ | |
then run | |
pacman -Syuu | |
pacman -S --needed base-devel mingw-w64-i686-toolchain mingw-w64-x86_64-toolchain \ | |
git subversion mercurial \ | |
mingw-w64-i686-cmake mingw-w64-x86_64-cmake | |
pacman -Syuu mingw64/mingw-w64-x86_64-opencl-headers | |
then | |
git clone https://github.com/hube12/GPUDUNGEONS |
This file contains hidden or 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
#include <jrand.cl> | |
inline uint next(unsigned long* seed, int bits) { | |
*seed = (*seed * 0x5DEECE66DUL + 0xBUL) & ((1UL << 48) - 1); | |
return *seed >> (48 - bits); | |
} | |
__kernel void start(ulong offset, ulong stride, __global ulong *seeds, __global ushort *ret) { | |
size_t id = get_global_id(0); | |
uchar max_count = 0; |
This file contains hidden or 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
#include <stdio.h> | |
#include <NTL/ZZ.h> | |
#include <NTL/vec_double.h> | |
#include <NTL/vec_ZZ.h> | |
#include <NTL/mat_ZZ.h> | |
#include <NTL/mat_RR.h> | |
#include <NTL/LLL.h> | |
#include <iostream> |
OlderNewer