This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
color alphaColor; | |
// I test this program using red color. | |
// But you can use any color you want. | |
color mainColor = color(255, 0, 0); | |
// The least alpha value is 0 while | |
// the most alpha value is 255. | |
// This variable is the starting alpha | |
// value. | |
int alphaValue = 255; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public color ChangeAlpha( | |
color _color, | |
int _desiredAlpha | |
){ return _color & ~#000000 | (_desiredAlpha << 030); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime as dt | |
# This is a class to detect change in second. | |
# My first initial idea was to make a codes | |
# those execute for every second passed. | |
# The method here is to take the current time | |
# from datetime.datetime.now().time(), extract | |
# the second and then execute something when | |
# the value changes (most of the time codes | |
# will be executed for every one second). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from os import listdir | |
from os.path import isfile, join | |
from tzlocal import get_localzone | |
import datetime as dt | |
import os | |
import shutil | |
import sys | |
# Constants. | |
# Constant for a backup folder name. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import copy | |
import datetime as dt | |
import os | |
import shutil | |
import subprocess | |
import sys | |
import time | |
def main(args): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a Python script to initiate notes with all images. | |
# Images are all already re - sized into 600 pixel width with | |
# proportional height. First is that I need to get the directory | |
# that is filled with the notes I want to init. | |
import datetime as dt | |
import io | |
import os | |
import shutil | |
import subprocess |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a simple demonstration on how to stream | |
# audio from microphone and then extract the pitch | |
# and volume directly with help of PyAudio and Aubio | |
# Python libraries. The PyAudio is used to interface | |
# the computer microphone. While the Aubio is used as | |
# a pitch detection object. There is also NumPy | |
# as well to convert format between PyAudio into | |
# the Aubio. | |
import aubio | |
import numpy as num |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Only works with operating system that uses | |
# AlsaAudio as audio driver. Most Linux distros | |
# are using this (Debian, Ubuntu). Does not work | |
# any where else (MacOS or Windows). | |
# | |
# This is a class to stream audio data from | |
# computer microphone then extract the pitch | |
# and the volume from it. This is done using | |
# AlsaAudio and Aubio Python library. The | |
# AlsaAudio is used to turn on the computer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a Python script to mass add same | |
# extension for all files in a folder. | |
import os | |
import shutil | |
import sys | |
def MassAddSameExtension(_targDir, _ext): | |
# Get the list of all files in the targetDirectory. | |
targDirList = os.listdir(_targDir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a Python script that let you arrange | |
# files into a folder for each extension. Actually | |
# I lied, this script is not about file extension | |
# but about a file's mime type. So, in case there | |
# are files that has no extension this script can | |
# predict what the file's extension could be. | |
# However, the only requirement is that file need | |
# to be able to be read by the computer's OS. For | |
# example image files usually has no problem with | |
# this script also with other media files. But, |
OlderNewer