Skip to content

Instantly share code, notes, and snippets.

@mr0a
mr0a / limit-virtual-memory-of-subprocess.py
Created July 16, 2021 10:27 — forked from s3rvac/limit-virtual-memory-of-subprocess.py
Limits the maximal virtual memory for a subprocess in Python on Linux.
#!/usr/bin/env python3
#
# Limits the maximal virtual memory for a subprocess in Python.
#
# Linux only.
#
import subprocess
import resource
@mr0a
mr0a / Bootstrap.md
Created March 10, 2021 09:59
Bootstrap
title created modified
Bootstrap
2020-11-01T15:12:40.287Z
2020-11-24T09:34:19.651Z

Bootstrap

Bootstrap Basics - Part 1

@mr0a
mr0a / submit.md
Created December 9, 2020 11:43 — forked from tanaikech/submit.md
Simple Script of Resumable Upload with Google Drive API for Python

Simple Script of Resumable Upload with Google Drive API for Python

This is a simple sample script for achieving the resumable upload to Google Drive using Python. In order to achieve the resumable upload, at first, it is required to retrieve the location, which is the endpoint of upload. The location is included in the response headers. After the location was retrieved, the file can be uploaded to the location URL.

In this sample, a PNG file is uploaded with the resumable upload using a single chunk.

Sample script

Before you use this, please set the variables.