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
#!/bin/bash | |
# TigerGraph Support Collector v1.0 | |
# Revised 3/17/2022 | |
supportdir="support_collection_"$(date +%F_%H%M) | |
echo; read -p "Would you like to collect logs (this may take some time)? [y/n]" | |
if [[ $REPLY =~ ^[Yy]$ ]]; then | |
echo; echo "Collecting logs..." | |
gcollect -o ./$supportdir -c gpe,gse,gsql,rest -t 86400 collect |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
BEGIN | |
CREATE LOADING JOB load_job_bi_data FOR GRAPH dataops { | |
DEFINE FILENAME MyDataSource = "/home/tigergraph/tigergraph/data/gui/loading_data/bi_data.csv"; | |
LOAD MyDataSource | |
TO VERTEX object VALUES(gsql_concat($0, ":", $1, ":", $3), $0, $1, $3, _, _) | |
, TO VERTEX object VALUES(gsql_concat($0, ":", $4, ":", $5), $0, $4, $5, _, _) WHERE $4 != "Logical Table" | |
, TO EDGE relates_to VALUES(gsql_concat($0, ":", $1, ":", $3), gsql_concat($0, ":", $4, ":", $5)) WHERE $4 != "Logical Table" | |
USING SEPARATOR = "," |
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 coremltools | |
# Load a Core ML model | |
coreml_model = coremltools.utils.load_spec('SentimentPolarity.mlmodel') | |
# Convert the Core ML model into ONNX | |
onnx_model = onnxmltools.convert_coreml(coreml_model, 'Sentiment Polarity') | |
# Save as protobuf | |
onnxmltools.utils.save_model(onnx_model, 'SentimentPolarity.onnx') |
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
bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9000)" != "200" ]]; do sleep 5; done' | |
# also check https://gist.github.com/rgl/c2ba64b7e2a5a04d1eb65983995dce76 |
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 isProd(taskName) { | |
def isProdEnv = "prod".equalsIgnoreCase(findProperty("environmentName")) | |
if (isProdEnv) { | |
println "Skipping ${taskName} as is prod envrionment" | |
} | |
return isProdEnv | |
} | |
mlUndeploy.onlyIf { !isProd("mlUndeploy") } | |
mlUndeploy.dependsOn.each { taskList -> | |
taskList.each { taskName -> |
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
'use strict'; | |
// Simple way to download the model and insert it into the database. | |
// Normally would use a tool like mlcp to do this. This only needs to be done once | |
declareUpdate() | |
//downloads the BiDAF model | |
let model = fn.subsequence( | |
xdmp.httpGet("https://onnxzoo.blob.core.windows.net/models/opset_9/bidaf/bidaf.onnx") | |
, 2, 1) | |
//inserts the BiDAF model into the database at the URI /onnx/model/bidaf.onnx |
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
xquery version "1.0-ml"; | |
(xdmp:list-cache-clear(), | |
xdmp:expanded-tree-cache-clear(), | |
xdmp:compressed-tree-cache-clear(), | |
xdmp:triple-cache-clear(), | |
xdmp:triple-value-cache-clear(), | |
xdmp:cache-status(xdmp:host())) |
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
find . -name "*.pdf" -o -name "*.jpg" -o -name "*.png" -o -name "*.tif" -o -name "*.PNG" | sed 's| |\\ |g' | xargs ls -sk | sed 's/ .\/.*\//,/g' |
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
class CustomDeleteCollectionsTask extends com.marklogic.gradle.task.datamovement.DataMovementTask { | |
String[] collections | |
@org.gradle.api.tasks.TaskAction | |
void deleteCollections() { | |
project.ext.collections = (collections != null && collections.length > 0) ? collections.join(",") : null | |
runQueryBatcherJob(new com.marklogic.client.ext.datamovement.job.DeleteCollectionsJob()) | |
} | |
} |
NewerOlder