What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-12 12:01:22
read all files in folder python
import os path ="C:/workspace/python" #we shall store all the file names in this list filelist = [] for root, dirs, files in os.walk(path): for file in files: #append the file name to the list filelist.append(os.path.join(root,file)... Add solution -
SQL 2021-11-11 01:01:15
install postgresql mint
$ sudo apt update -y $ sudo apt install postgresql postgresql-contrib $ sudo systemctl status postgresql $ sudo -i -u postgres $ psql # \q $ sudo pg_isready $ sudo apt install libgmp3-dev build-essential libssl-dev $ sudo apt install python3-virtualenv py... Add solution -
Shell/Bash 2021-11-07 22:16:10
pgadmin for linux
sudo apt-get update sudo apt-get install build-essential libssl-dev libffi-dev libgmp3-dev virtualenv python-pip libpq-dev python-dev mkdir pgAdmin4 cd pgAdmin4 virtualenv pgAdmin4 cd pgAdmin4 source bin/activate wget https://ftp.postgresql.org/pub/pgadmi... Add solution -
Python 2021-11-07 08:38:20
configparser error reading relative file path
# the current directory can be changed by your program [or a module] # and it is in general not the directory of your program file import configparser, os config = configparser.ConfigParser() config.read(os.path.join(os.path.dirname(__file__), 'config.cf... Add solution -
Other 2021-11-05 12:57:19
custom 3d image generator for segmentation
import glob import os import keras import numpy as np import skimage from imgaug import augmenters as iaa class DataGenerator(keras.utils.Sequence): """Generates data for Keras""" """This structure ... Add solution -
Python 2021-11-04 22:01:07
vs
import numpy as np import os import six.moves.urllib as urllib import sys import tarfile import tensorflow as tf import zipfile from collections import defaultdict from io import StringIO from matplotlib import pyplot as plt from PIL import Image &... Add solution