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
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
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
| function import_extract_first { | |
| echo "name:ID(Concept)" > concepts.txt | |
| cat data-concept-instance-relations.txt | cut -d $'\t' -f 1 | sort | uniq >> concepts.txt | |
| echo "name:ID(Instance)" > instances.txt | |
| cat data-concept-instance-relations.txt | cut -d $'\t' -f 2 | sort | uniq >> instances.txt | |
| echo $':END_ID(Concept)\t:START_ID(Instance) relations:int' > is_a.hdr | |
| $NEO4J_HOME/bin/neo4j-import --into concepts.db --id-type string --delimiter TAB --bad-tolerance 13000000 --skip-duplicate-nodes true --skip-bad-relationships true \ |
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
| create index on :Node(name); | |
| //load the data in raw form | |
| Load csv with headers from "https://docs.google.com/spreadsheets/u/0/d/17WuC_B8RWzsSS8pw-NtY8qWeFFQGCGnCR5uXmENOFUI/export?format=csv&id=17WuC_B8RWzsSS8pw-NtY8qWeFFQGCGnCR5uXmENOFUI&gid=112267709" as csv | |
| Merge (n:Node {name: csv.Name, type: csv.Type, tags: csv.Tags, link: csv.Link}); | |
| // move the 'type' property to a label and remove it as a property, USING APOC (not supported in Graphgist) | |
| MATCH (n:Node) | |
| with n, split(n.type, ",") AS futurelabels | |
| unwind futurelabels as futurelabel |
Install Android App Termux from APKPure or AppStore. If the app exists, just delete and re-install it to get the latest version, The APK can be downloaded from https://apkpure.com/termux/com.termux/ Install the APK using by running
adb install ~/Downloads/Termux_v0.73_apkpure.com.apk
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 | |
| set -e | |
| SOURCE_DIR='<path_to_project_root_goes_here>' | |
| # Find all .R files which have been staged via git add | |
| FILES_TO_STYLE=$(git diff --name-only --staged | grep "\.R") | |
| for FILE in ${FILES_TO_STYLE[@]} | |
| do |
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 | |
| # Ollama Model Export Script | |
| # Usage: bash ollama-export.sh vicuna:7b | |
| # SPDX-License-Identifier: MIT (https://ncurl.xyz/s/o_o6DVqIR) | |
| # https://gist.github.com/supersonictw/f6cf5e599377132fe5e180b3d495c553 | |
| # Interrupt if any error occurred | |
| set -e | |
| # Declare |