Skip to content

Instantly share code, notes, and snippets.

View Moeflon's full-sized avatar
🎯
Focusing

Vic Degraeve Moeflon

🎯
Focusing
View GitHub Profile
@Moeflon
Moeflon / playerlist.php
Created April 28, 2012 13:26
Include playerlist
<?php
# You can use this snippet to integrate the serverlist into your existing website.
# You can also restyle the text and other content inside the playerlist by putting this (including php tags) inside a div.
# Make sure you are pasting this in a file ending on .php (If it's html, it is most likely safe to change that to php as your browser will read the html part as html)
// Getting contents of playerlistfile
$playerlist = file('http://path/to/serverlistfolder/?server=serverip&port=serverport&avatar=http://kiwi.la/minecraft/avatar.php'); # Replace the avatar location with your self-hosted one for faster loading
// Implode the playerlist for easy access to file
$contents = implode("", $playerlist);
@Moeflon
Moeflon / kiwimc.php
Created August 15, 2012 11:35
Config kiwiminecraft
<?php
// Use curl
function curl($url) {
if (!function_exists('curl_init')){
die('CURL is not installed!');
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec($ch);
<?php
// Bewaar de Yahoo API link (deze is voor Amsterdam met de 'unit' celsius)
$url = "http://weather.yahooapis.com/forecastjson?w=727232&u=c";
// cURL function om JSON op te halen
function curl($url) {
if (!function_exists('curl_init')){
die('CURL is not installed!');
}
$ch = curl_init();
@Moeflon
Moeflon / sc.js
Created September 30, 2012 16:46
// Delete elements
function remove(element) {
return (elem=element).parentNode.removeChild(elem);
}
if (mcsl.text == 'enabled') {
// Creating IFRAME
var mctxt= document.createElement('iframe');
mctxt.src = 'http://minecraft.serverlijst.nl/api/list/'+mcsl.server+'/text';
mctxt.style.display="none";
@Moeflon
Moeflon / AllAccessDL
Created June 6, 2014 18:10
A Python script based on gmusicapi and mutagen. This downloads all Google Play All Access tracks in a playlist called 'Download' to your user downloads folder. (The playlist is cleaned by the script if the download was successfull)
import os
from os.path import expanduser
import sys
import re
import getpass
from subprocess import call
import urllib2
from gmusicapi import Mobileclient
from gmusicapi import Webclient
from mutagen.mp3 import MP3
import wandb
from wandb.keras import WandbCallback
def get_model(config: dict):
model = Sequential()
for (i, (
filters,
kernel_size,
dropout,
_ = None
dropout = 0
history, model = get_fit_model({
'filters': [64, 128, 128, 128, _, 128, 128, 256, _, 256, 256, _, 512, 2048, 256, _, 256, _],
'kernel_sizes': [(3,3), (3,3), (3,3), (3,3), _, (3,3), (3,3), (3,3), _, (3,3), (3,3), _, (3,3), (1,1), (1,1), _, (3,3), _],
'pool': [_, _, _, _, ((2,2), 'max'), _, _, _, ((2,2), 'max'), _, _, ((2,2), 'max'), _, _, _, ((2,2), 'max'), _, ((2,2), 'max')],
'conv_dropouts': [_, _, _, _, dropout, _, _, _, dropout, _, _, dropout, _, _, _, dropout, _, dropout],
'activations': ['relu','relu','relu','relu', _,'relu','relu','relu', _,'relu','relu', _,'relu','relu','relu', _, 'relu', _],
'padding': ['same','same','same','same', _,'same','same','same', _,'same','same', _,'same','same','same', _, 'same', _],
'stride': [(1,1),(1,1),(1,1),(1,1), _,(1,1),(1,1),(1,1), _,(1,1),(1,1), _,(1,1),(1,1),(1,1), _, (1,1), _],
_ = None
r = 'relu'
dropout = 0.1
history, model = get_fit_model({
'filters': [128, 128, 128, _, 128, 128, 128, _, 256, 256, 256, _, 512, 512, 512, _, 1024, _],
'kernel_sizes': [(3,3), (3,3), (3,3), _, (3,3), (3,3), (3,3), _, (3,3), (3,3), (3,3), _, (2,2), (2,2), (2,2), _, (1,1), _],
'pool': [ _, _, _, ((2,2), 'max'), _, _, _, ((2,2), 'max'), _, _, _, ((2,2), 'max'), _, _, _, ((2,2), 'max'), _, ((2,2), 'max')],
'conv_dropouts': [_, _, _, 0.1, _, _, _, 0.1, _, _, _, 0.1, _, _, _, 0.1, _, 0.1],
'activations': [r,r,r, _,r,r,r, _,r,r, r, _,r,r,r, _, r, _],
'padding': ['same','same','same', _,'same','same','same', _,'same','same','same', _,'same','same','same', _, 'same', _],