Skip to content

Instantly share code, notes, and snippets.

@joeycastillo
joeycastillo / bluemarble.py
Created August 1, 2020 20:12
Display real-time GOES-East imagery on a Waveshare 7-color EPD
# Based on Waveshare's epd5in65f.py demo. Copyright notice at end.
import sys
import os
picdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'pic')
libdir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'lib')
if os.path.exists(libdir):
sys.path.append(libdir)
@hasparus
hasparus / README.md
Last active August 19, 2024 18:34
A color scheme for Windows Terminal

👨‍🎤 Cyberpunk SCARLET for Windows Terminal

screenshot of terminal presenting colors and borg cowsay saying "Hello!"

profile settings in screenshot

  "colorScheme": "Cyberpunk SCARLET",
  "cursorHeight": 25,
 "cursorShape": "vintage",
@jerilkuriakose
jerilkuriakose / convert_excel.py
Last active May 20, 2024 07:19
Recover corrupt excel file using Python
# Changing the data types of all strings in the module at once
from __future__ import unicode_literals
# Used to save the file as excel workbook
# Need to install this library
from xlwt import Workbook
# Used to open to corrupt excel file
import io
filename = r'SALEJAN17.xls'
# Opening the file using 'utf-16' encoding
@coreyhermanson
coreyhermanson / list_to_clipboard.py
Created June 30, 2016 16:52
Takes a list of strings and copies them to the Clipboard, ready to paste. Useful function if you need to copy a list of results into Excel or Notepad++. Uses Python and pyperclip module.
#!/usr/bin/env python
import pyperclip
example_list = ["Line 1", "Line 2", "Line 3", "forever and ever"]
def list_to_clipboard(output_list):
""" Check if len(list) > 0, then copy to clipboard """
if len(output_list) > 0:
pyperclip.copy('\n'.join(output_list))
@cdiaz
cdiaz / TrmSoapClient.py
Last active July 20, 2024 19:22
Obtener La tasa de cambio representativa del mercado (TRM) para Colombia consumiendo el webservice de la Superintentencia Financiera desde Python
#!/usr/bin/env python
from suds.client import Client
import time
WSDL_URL = 'https://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService?WSDL'
date = time.strftime('%Y-%m-%d')
def trm(date):
try:
client = Client(WSDL_URL, location=WSDL_URL, faults=True)