Skip to content

Instantly share code, notes, and snippets.

Avatar

Jose Benito Gonzalez Lopez jbenito3

View GitHub Profile
View zenodo-upload-new-file.py
# Provide the Deposit ID, access token
depid = DEPOSIT_ID
params = {'access_token': ACCESS_TOKEN}
filename = 'myfile.zip'
# Get the deposit resource as in the old API
headers = {'Content-Type': 'application/json'}
r = requests.get('https://zenodo.org/api/deposit/depositions/{depid}'.format(depid=depid),
params=params, json={}, headers=headers)
View zenodo-upload-new-deposit.py
import requests
params = {'access_token': '<your-access-token>'}
# Create the deposit resource
url = "https://zenodo.org/api/deposit/depositions"
headers = {"Content-Type": "application/json"}
res = requests.post(
url,
@jbenito3
jbenito3 / docker-stop.sh
Created Oct 20, 2017 — forked from ntarocco/docker-stop.sh
Docker stop and kill
View docker-stop.sh
#!/usr/bin/env bash
docker stop $(docker ps -aq)
# docker container prune # Remove all stopped containers
# docker volume prune # Remove all unused volumes
# docker image prune # Remove unused images
# docker system prune # All of the above, in this order: containers, volumes, images
echo y | docker system prune
View keybase.md

Keybase proof

I hereby claim:

  • I am jbenito3 on github.
  • I am jotabe (https://keybase.io/jotabe) on keybase.
  • I have a public key ASAwuR-y2RPVh3Cu2TFtzfqgOHew7uvf7G43h-rMdLKDhwo

To claim this, I am signing this object: