What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-17 02:02:02
read file from s3 python
boto3 offers a resource model that makes tasks like iterating through objects easier. Unfortunately, StreamingBody doesn't provide readline or readlines. s3 = boto3.resource('s3') bucket = s3.Bucket('test-bucket') # Iterates through all the objects, doin... Add solution -
Other 2021-09-17 01:29:02
nick j dotfiles
# I would consider these packages essential or very nice to have. The GTK # version of Vim is to get +clipboard support, you'd still run terminal Vim. sudo apt-get update && sudo apt-get install -y \ vim-gtk \ tmux \ git \ gpg \ curl \ ... Add solution -
-
Python 2021-09-14 19:50:01
python non blocking input
#! /usr/bin/python3 """Treat input if available, otherwise exit without blocking""" import sys import select def something(line): print('read input:', line, end='') def something_else(): print('no input') # If there'... Add solution -
Python 2021-09-12 19:17:01
how to give autocomplete in python
import readline readline.parse_and_bind("tab: complete") def complete(text,state): volcab = ['dog','cat','rabbit','bird','slug','snail'] results = [x for x in volcab if x.startswith(text)] + [None] return results[state] readline.se... Add solution
Best helpers
Ranking is empty