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
| def extract_anyvalue(av) | |
| fallback( | |
| $av.stringValue, | |
| $av.boolValue, | |
| number($av.intValue), | |
| $av.doubleValue, | |
| $av.bytesValue, | |
| [for ($av.arrayValue.values) extract_anyvalue(.)], | |
| {for ($av.kvlistValue.values) .key : extract_anyvalue(.value)} | |
| ) |
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
| def extract_anyvalue(av) | |
| fallback( | |
| $av.stringValue, | |
| $av.boolValue, | |
| number($av.intValue), | |
| $av.doubleValue, | |
| $av.bytesValue, | |
| [for ($av.arrayValue.values) extract_anyvalue(.)], | |
| {for ($av.kvlistValue.values) .key : extract_anyvalue(.value)} | |
| ) |
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
| def extract_anyvalue(av) | |
| fallback( | |
| $av.stringValue, | |
| $av.boolValue, | |
| number($av.intValue), | |
| $av.doubleValue, | |
| $av.bytesValue, | |
| [for ($av.arrayValue.values) extract_anyvalue(.)], | |
| {for ($av.kvlistValue.values) .key : extract_anyvalue(.value)} | |
| ) |
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
| def removeEscaping(def value) { | |
| return value.replaceAll("\\\\=", "=").replaceAll("\\\\,", ",").replaceAll("\\\\ ", " ") | |
| } | |
| enum EscapeMode { | |
| NONE, | |
| SIMPLE, | |
| TEXT | |
| } |
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 -*- | |
| """ | |
| Created on Sun Aug 12 00:30:58 2018 | |
| @author: tustunkok | |
| """ | |
| import numpy as np | |
| class ParticleSwarm: |