[ Launch: test ] 5605667 by lostinplace See Previous Inlet [ Gist ]
[ Launch: sin waves ] 5621425 by lostinplace See Previous Inlet [ Gist ]
[ Launch: modularity testing ] 5627785 by lostinplace See Previous Inlet [ Gist ]
[ Launch: An inlet to Tributary ] 8526973 by lostinplace[ Launch Inlet ]Gist #3200444
This file contains 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
def count_set_bits(a_bv): | |
tmp = a_bv | |
next_i = 0 | |
last_diff = 0 | |
tmp_diff = 0 | |
set_bits_count = 0 | |
most_contiguous_set_bits = 0 | |
current_contiguous_set_bits = 0 |
This file contains 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 datetime | |
import math | |
import re | |
import dateutil.parser | |
class BitVectorTools: | |
bitvector_resolution_minutes = 15 |
This file contains 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
package wikiparser | |
import scala.language.implicitConversions | |
object Xml { | |
import fastparse.all._ | |
val digits = "0123456789" | |
val Digit = P( CharIn(digits) ) |
This file contains 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
package wikiparser | |
import fastparse.all._ | |
import fastparse.core.{Mutable} | |
import scala.util.matching.Regex | |
class RegexParser(pattern: Regex, leapDistance:Int = 10, maxLength:Int=100) extends Parser[Regex.Match] { | |
import fastparse.core.{ParseCtx} | |
private val _startsWith = """^\^.*""".r |
This file contains 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
package wikiparser | |
import org.scalatest.{FlatSpec, Matchers} | |
import fastparse.all._ | |
import fastparse.core.Parsed.{Failure, Success} | |
import scala.util.matching.Regex | |
import RegexParser._ | |
This file contains 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
{ Blocks.ATM , new HashSet<Blocks>() {Blocks.ATM} }, | |
{ Blocks.AlienBlocks , new HashSet<Blocks>() {Blocks.AlienBlocks} }, | |
{ Blocks.AlienDeviceBlocks , new HashSet<Blocks>() {Blocks.AlienDeviceBlocks} }, | |
{ Blocks.AlienLargeBlocks , new HashSet<Blocks>() {Blocks.AlienFull, Blocks.AlienThin, Blocks.AlienLargeBlocks, Blocks.AlienFullLarge, Blocks.AlienThinLarge} }, | |
{ Blocks.AlienNPCBlocks , new HashSet<Blocks>() {Blocks.NPCAlienTemplate, Blocks.ScifiTableNPC2, Blocks.ScifiTableNPC3, Blocks.ScifiLargeSofaNPC, Blocks.ConsoleSmallNPC, Blocks.ScifiTableV2NPC, Blocks.SofaNPC, Blocks.StandingNPC, Blocks.ControlStationNPC, Blocks.ReceptionTableNPC, Blocks.ScifiSofaNPC, Blocks.ScifiTableNPC, Blocks.StandingNPC2, Blocks.AlienNPCBlocks, Blocks.CommandingOfficerAlien, Blocks.SecurityGuardAlien} }, | |
{ Blocks.AncientStatue , new HashSet<Blocks>() {Blocks.AncientStatue} }, | |
{ Blocks.AntennaBlocks , new HashSet<Blocks>() {Blocks.Antenna, Blocks.AntennaBlocks, Blocks.Antenna01, Blocks.Antenna02, Blocks.Antenna03, Blocks.Antenna04, |
OlderNewer