Skip to content

Instantly share code, notes, and snippets.

View shitalmule04's full-sized avatar

Shital Mule shitalmule04

View GitHub Profile
@shitalmule04
shitalmule04 / MySQL_Export.py
Last active April 20, 2024 11:32
Python Script to export SQLite database tables into CSV file.
import sqlite3 as sql
import os
import csv
from sqlite3 import Error
try:
# Connect to database
conn=sql.connect('mydb.db')
@trishnaguha
trishnaguha / demo.yml
Created February 5, 2019 12:24
Ansible101
- hosts: webserver
connection: local
tasks:
- shell: /bin/echo hello
- ping:
object Solution {
def main(args: Array[String]) {
println(
draw(0, 100 / 2, 100, 16, 0, 63, scala.io.StdIn.readInt(), 1, 5).reverseMap(_.mkString).mkString("\n")
)
}
def mergeResult(l1: List[List[Char]], l2: List[List[Char]]): List[List[Char]] =
l1 zip l2 map { p: (List[Char], List[Char]) => p._1 ::: p._2 }
@lbillingham
lbillingham / split_into_2_files.py
Created September 13, 2016 11:52
python click + pytest example
# hello.py
import click
@click.command()
@click.option(
'--name', default='world',
prompt='greet whom?',
help='who should i greet?'
)
def main(name):