Skip to content

Instantly share code, notes, and snippets.

View pramjana's full-sized avatar

Pramod J pramjana

  • Hyderabad, India
  • 11:08 (UTC +05:30)
View GitHub Profile
@pramjana
pramjana / Archived_Files_Python.md
Last active July 30, 2020 10:24
[Work with archived files in Python] Various snippets to various common tasks with archived files #zip #python #archives #snippets

Working with archived files in Python

This gist is to capture related code snippets for managing archived files.

Zip file handling

First, a look at how to work with zip files.

In case there's a list of zip files in a folder, and we need to extract them (taking care to rename same file names):

@pramjana
pramjana / Config.md
Last active April 1, 2021 15:07
[Shell and Code Environment Configuration] #shell #config

Shell and Code Environment Configuration

The following sections list the commands required to setup the fish shell and various programming language environments, for standardized environments on new systems.

Code Environments

Python

# Poetry with pip
@pramjana
pramjana / postgres-snippets.md
Created June 15, 2020 17:22
[PostgreSQL snippets] Useful snippets I've come across #postgres #snippets

Data Import/Export

CSV Import

The link to the official documentation on COPY The COPY command can be used to import data from files. To import data from a csv file, use:

 -- The table into which to import the data into
COPY table_name