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/env python3 | |
import argparse | |
import json | |
import subprocess | |
import sys | |
from typing import List | |
def run(cmd: List[str]) -> str: | |
result = subprocess.run(cmd, capture_output=True, text=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
{ | |
"links": [ | |
{ | |
"source": "Napoleon", | |
"target": "Myriel", | |
"value": 1 | |
}, | |
{ | |
"source": "Mlle.Baptistine", | |
"target": "Myriel", |
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 { | |
PutObjectCommand, | |
type PutObjectCommandInput, | |
} from "@aws-sdk/client-s3"; | |
import s3 from "../../utils/s3Client"; // s3 client instance with set up credentials | |
import { getSignedUrl } from "@aws-sdk/s3-request-presigner"; | |
import { randomUUID } from "crypto"; | |
import { type NextApiRequest, type NextApiResponse } from "next"; | |
// AWS sdk v3 uses signatureVersion 4 by default |
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
[ | |
{ | |
"category": "Evidence at protein level", | |
"category_order": 0, | |
"chromosome": "1", | |
"chromosome_order": 0, | |
"count": "1864", | |
"color": "red", | |
"error": [1800, 2500] | |
}, |
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
export function downloadSVG(svgE, downloadFilename) { | |
const serializer = new XMLSerializer(); | |
let source = serializer.serializeToString(svgE); | |
if ( | |
!source.match(/^<svg[^>]+xmlns="http\:\/\/www\.w3\.org\/2000\/svg"/) | |
) { | |
source = source.replace( | |
/^<svg/, | |
'<svg xmlns="http://www.w3.org/2000/svg"' |
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
const a = {b:12} |