Skip to content

Instantly share code, notes, and snippets.

@kratsg
Created December 16, 2022 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kratsg/3e09f19e49ed0f981b67e6b36a05a2ba to your computer and use it in GitHub Desktop.
Save kratsg/3e09f19e49ed0f981b67e6b36a05a2ba to your computer and use it in GitHub Desktop.
import requests
import subprocess
import itkdb
fpath = "~/VBFSUSY_13_Higgsino_150.root"
eos_path = "/eos/atlas/test/itkpd/d/e/8/debug_ewans_file"
data = requests.post(f'https://itkpd2eos.unicornuniversity.net/generate-token?path={eos_path}&permissions=rw')
eos_token = data.json()['token']
fp = open(fpath, 'rb')
requests.put(f"https://eosatlas.cern.ch{eos_path}?authz={eos_token}", fp=fp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment