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
| #!/usr/bin/python | |
| # In the binary case, maybe the length of a b-run should be encoded bit-flipped. | |
| # Then the bit-flip of the compressed string should decode into the bit-flip | |
| # of the uncompressed string, which seems like a neat property. | |
| # It would be even neater if we could also preserve reversal of the string, but then | |
| # we have to rethink a lot. The special casing of the ending sabotages most meaning | |
| # we can squeeze into reversal. |
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
| #!/usr/bin/python | |
| import re | |
| # Encode a natural number (incl 0) as a bijective number (string) | |
| def enc(num, symbols="01"): | |
| ret = '' | |
| slen = len(symbols) | |
| while num > 0: | |
| num -= 1 |
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
| #!/usr/bin/python | |
| # Encode a natural number (incl 0) as a bijective number (string) | |
| def bijEnc(num, symbols="ab"): | |
| ret = '' | |
| slen = len(symbols) | |
| while num > 0: | |
| num -= 1 | |
| ret = symbols[num % slen] + ret | |
| num = num // slen |
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
| #!/usr/bin/python | |
| from itertools import chain | |
| hilbert = { | |
| 'A': list("-BF+AFA+FB-"), | |
| 'B': list("+AF-BFB-FA+"), | |
| '-': ['-'], | |
| '+': ['+'], | |
| 'F': ['F'] |
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
| #!/usr/bin/python | |
| # Factor a string into nonincreasing Lyndon words, | |
| # using Duval's algorithm | |
| def lyndonFactor(s): | |
| k = 0 | |
| ret = [] | |
| while k < len(s): | |
| i = k | |
| j = i + 1 |
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 torch | |
| import torch.nn as nn | |
| from torch.autograd import Variable | |
| import numpy as np | |
| BATCH_SIZE = 1 | |
| INPUT_DIM = 1 | |
| OUTPUT_DIM = 1 | |
| DTYPE = np.float32 |
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
| -- Duval's algorithm | |
| function lyndonFac(str) | |
| local k = 1 | |
| local ret = {} | |
| while k <= #str do | |
| local i,j = k, k+1 | |
| while j <= #str and str:sub(i,i) <= str:sub(j,j) do | |
| if str:sub(i,i) == str:sub(j,j) then | |
| i = i + 1 | |
| else |
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
| |n|println!{"{:?}",&[2,3,6-1,7,11,13,17,19,23,29,31,37,41,43,47,60-7,0x3b,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,0x97,0x9d,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,0xfb,0x101,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,0x161,0x167,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,0x1c9,461,463,467,479,487,491,499,0x1f7,0x1fd,0x209,0x20b,0x21d,0x223,0x22d,0x233,0x239,0x23b,0x241,0x24b,600-7,600-1,601,607,613,617,619,631,641,643,647,0x28d,0x293,661,673,677,683,691,701,709,719,727,733,739,743,0x2Ef,760-3,761,769,773,787,797,809,811,821,823,827,829,839,860-7,860-3,860-1,863,877,881,883,887,907,911,919,929,937,941,947,0x3b9,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,0x41b,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,0x47f,0x481,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,0x4Eb,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433, |
This file has been truncated, but you can view the full file.
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
| [18:45:52] [main/DEBUG] [FML/]: Injecting tracing printstreams for STDOUT/STDERR. | |
| [18:45:52] [main/INFO] [FML/]: Forge Mod Loader version 7.10.79.1212 for Minecraft 1.7.10 loading | |
| [18:45:52] [main/INFO] [FML/]: Java is OpenJDK 64-Bit Server VM, version 1.7.0_65, running on Linux:amd64:3.13.0-34-generic, installed at /usr/lib/jvm/java-7-openjdk-amd64/jre | |
| [18:45:52] [main/DEBUG] [FML/]: Java classpath at launch is /home/harald/pakker/MultiMC/bin/jars/NewLaunch.jar | |
| [18:45:52] [main/DEBUG] [FML/]: Java library path at launch is /home/harald/pakker/MultiMC/instances/1.7.10/natives | |
| [18:45:52] [main/DEBUG] [FML/]: Enabling runtime deobfuscation | |
| [18:45:52] [main/DEBUG] [FML/]: Instantiating coremod class FMLCorePlugin | |
| [18:45:52] [main/DEBUG] [FML/]: Added access transformer class cpw.mods.fml.common.asm.transformers.AccessTransformer to enqueued access transformers | |
| [18:45:52] [main/DEBUG] [FML/]: Enqueued coremod FMLCorePlugin | |
| [18:45:52] [main/DEBUG] [FML/]: Instantiating coremod class FMLForgePlugin |
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
| ---- Minecraft Crash Report ---- | |
| // I'm sorry, Dave. | |
| Time: 9/4/14 6:31 PM | |
| Description: Updating screen events | |
| java.lang.NoSuchMethodError: cpw.mods.fml.common.registry.GameData.buildItemDataList()Ljava/util/Map; | |
| at thaumcraft.client.gui.GuiResearchRecipe.<init>(GuiResearchRecipe.java:114) | |
| at thaumcraft.client.gui.GuiResearchBrowser.func_73864_a(GuiResearchBrowser.java:893) | |
| at net.minecraft.client.gui.GuiScreen.func_146274_d(GuiScreen.java:296) |