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
using System; | |
namespace MCDawn | |
{ | |
public class PluginName : Plugin | |
{ | |
public override string Name { get { return "pluginname"; } } // name, all in lowercase | |
public override string PluginVersion { get { return "1.0"; } } // version | |
public override string MCDawnVersion { get { return "1.0.1.2"; } } // compatible mcdawn version | |
public override void LoadPlugin() |
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
public static int IntSqrt(int num) // Faster than Math.Sqrt, because that uses doubles. | |
{ | |
if (num < 0) throw new Exception("Cannot get square root of negative number."); | |
if (0 == num) return 0; // Avoid zero divide | |
int n = (num / 2) + 1; // Initial estimate, never low | |
int n1 = (n + (num / n)) / 2; | |
while (n1 < n) | |
{ | |
n = n1; | |
n1 = (n + (num / n)) / 2; |
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
, | |
_/^\_ | |
< hax > | |
/.-.\ | |
* MERRY * `/&\` | |
,@.*;@, | |
/_o.I %_\ | |
(`'--:o(_@; | |
/`;--.,__ `') | |
;@`o % O,*`'`&\ |
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
public static bool OnGround(Player p) { | |
if (!Block.Walkthrough(p.level.GetTile((ushort)(p.pos[0] / 32), (ushort)((p.pos[1] / 32) - 2), (ushort)(p.pos[2] / 32)))) return true; | |
return false; | |
} |
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
x = (player.x / 32) | |
y = (player.y / 32) | |
z = (player.z / 32) | |
pitch = round((double)(player.pitch * (360 / 256))) | |
yaw = round((double)((-(sbyte)(player.yaw)) * (360 / 256))) |
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
using System; | |
using System.Collections.Generic; | |
namespace BinarySearch | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
List<int> list = new List<int>() { 5, 8, 900, 1, 22, 52, 567, 666, 123, 256, 765, 0, 500 }; // example list |
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
file_export_version=3.0 | |
/instance/org.codehaus.groovy.eclipse.ui/groovy.editor.groovyDoc.keyword.enabled=true | |
/instance/org.codehaus.groovy.eclipse.ui/groovy.editor.groovyDoc.link.enabled=true | |
/instance/org.codehaus.groovy.eclipse.ui/groovy.editor.groovyDoc.tag.enabled=true | |
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.SelectionForeground.SystemDefault=false | |
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.SelectionBackground.SystemDefault=false | |
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.Background.SystemDefault=false | |
/instance/org.eclipse.ui.editors/AbstractTextEditor.Color.Foreground.SystemDefault=false | |
/instance/org.epic.perleditor/AbstractTextEditor.Color.Background.SystemDefault=false | |
/instance/org.epic.perleditor/AbstractTextEditor.Color.Foreground.SystemDefault=false |
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
div>*:not(code) { | |
/* using the default discord theme's fonts */ | |
font-family: | |
Whitney, | |
'Helvetica Neue', | |
Helvetica, | |
Arial, | |
'Meiryo', /* you can change this to whatever japanese font you prefer */ | |
sans-serif !important; | |
} |
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
""" | |
Since Model.fit doesn't support class_weight when using multiple outputs, | |
this custom loss subclass may be useful. | |
Relevant issues: | |
https://github.com/keras-team/keras/issues/11735 | |
https://github.com/tensorflow/tensorflow/issues/40457 | |
https://github.com/tensorflow/tensorflow/issues/41448 | |
""" |
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 argparse | |
import chess | |
import chess.engine | |
import chess.pgn | |
def main(stockfish_path, output_path): | |
engine = chess.engine.SimpleEngine.popen_uci(stockfish_path) |
OlderNewer