Skip to main content

Posts

Showing posts from 2019

Modern Cpp features used

shared_ptr, unique_ptr, weak_ptr auto lambda auto pred = [&] (const class &obj)                    {                        if(checks on the obj data)                            return true/false;                    }; soemthing::instance().process(pred); std::make_tuple(params) std::tie(3 variables) = [&] () {                                                 if(something) return make_tuple(3 variables)                                                 else if(soething else) return make_tuple(3 var...

Python features/libs used

import logging import logging.handlers import os import pwd import sys import time import functools import traceback time.localtime functools.partial sys.exit(1) _________________________ import cx_Oracle import csv import datetime from optparse import OptionParser from report_utils import write_cursor_to_file, send_email writer = csv.writer(filename) text = 'something' writer.writerow(text) db = cx_Oracle.connect(connection_stirng) cursor = db.cursor sproc = os.path.expandvars($DataBaseName.storedProcName) cursor.callfunc(sproc, int, [refcursor]) opt_parser = OptionParser() opt_parser.add_option(variables) _________________________ import subprocess import sys import threading subprocess.Popen() listening_event = treading.Event() async_waiter = threading.Thread() async_waiter.daemon = true/false; async_waiter.start() thread_handle.join thread_handle.isAlive() _________________________ import argparse import os import db_uti...