Skip to content

Instantly share code, notes, and snippets.

View nanda-dash's full-sized avatar

Nanda DASH nanda-dash

View GitHub Profile
@nanda-dash
nanda-dash / automail.py
Last active April 20, 2021 11:26 — forked from ITSecMedia/outlook_email.py
Python: Create an Email with Outlook
# -*- coding: utf-8 -*-
"""
@author: unknown
"""
import win32com.client as win32
import psutil
import os
import subprocess
@nanda-dash
nanda-dash / README.md
Created September 19, 2017 09:54 — forked from bradleyRSA/README.md
Modular Temperature Measurement and Logging

Measures temperature using thermistors and logs the data in csv format.

Designed to be modular in nature so that additional temperature sensors can be added easily, with the long term intent to expand the available sensor inputs or outputs.

The temperature information is extracted from a board of your choice (an Arduino board was originally used) using the Johnny-Five node.js library and the custom built Johnny-Five node-red node (available at https://www.npmjs.com/package/node-red-contrib-gpio, with details as to which micro controller boards are supported)

Can be used for any temperature monitoring application, but was built with the intent to log temperature data with a timestamp for research experiments. The data is logged in CSV format for easing importing into more suitable software packages for post-processing and analysis, such as MATLAB or Python.

A more detailed description of how to use this flow can be found at: https://sites.google.com/view/opensourcehardwaresouthafrica

@nanda-dash
nanda-dash / python_test.py
Created August 20, 2017 16:58
This code checks the installation version as well as packages available
# Python program that can be executed to report whether particular
# python packages are available on the system.
import math
import os
import sys
def test_is_python_35():
major = sys.version_info.major
@nanda-dash
nanda-dash / decrypt_pdf.py
Created August 20, 2017 06:24 — forked from bzamecnik/decrypt_pdf.py
Decrypt password-protected PDF in Python.
# Decrypt password-protected PDF in Python.
# cleaned-up version of http://stackoverflow.com/a/26537710/329263
#
# Requirements:
# pip install PyPDF2
#
# Usage: decrypt_pdf('encrypted.pdf', 'decrypted.pdf', 'secret_password')
from PyPDF2 import PdfFileReader, PdfFileWriter
@nanda-dash
nanda-dash / csv2xml.py
Created January 27, 2017 17:50
CSV to XML
# csv2xml.py
# First row of the csv file must be header!
# example CSV file: myData.csv
# id,code name,value
# 36,abc,7.6
# 40,def,3.6
# 9,ghi,6.3
# 76,def,99