This file contains 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 | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) | |
# Delete allthe servicex (Docke swarm mode) | |
docker service ls -q | xargs docker service rm |
This file contains 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 sys | |
sum_file = 0 | |
sum_code = 0 | |
sys.stdin.__next__() | |
sys.stdin.__next__() | |
languages = ['JSON', 'Markdown'] | |
partials = {} |
This file contains 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 log_args(func): | |
def inner(*args, **kwargs): | |
print("Called {} with arguments {} {}".format(func.__name__, args, kwargs)) | |
return func(*args, **kwargs) | |
return inner | |
@log_args | |
def muFunc(x,y,z): | |
retunr x+y+z |
This file contains 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 os | |
import json | |
import requests | |
url = "http://131.114.88.8:3000/api/images" | |
path_file_json = os.getcwd()+"/images-graph.json" | |
page = 1 # first page to be downloaed | |
limit = 1000 # number of images per page | |
payload = {'page': page, 'limit': limit} |