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
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
# 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 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 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
# Python script to arrange files numbering in my personal see folder. | |
from tzlocal import get_localzone | |
import datetime as dt | |
import os | |
import shutil | |
import sys | |
def ArrangeFilesNumbering(_startDir): | |
# Get the list of files and folders in |
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
// Function to detect if x second is already passed. | |
// If each tick is more than 1 second then this | |
// function is screwed, but that will not happen | |
// (hopefully). | |
function DetectChangeInTSecond(_t, _date){ | |
this.t = _t; | |
this.currSecond = _date.getSeconds(); | |
this.currSecondPrev = this.currSecond; | |
this.counter = 0; |
OlderNewer