Skip to content

Instantly share code, notes, and snippets.

View Dan6erbond's full-sized avatar
Building blockchain projects.

RaviAnand Mohabir Dan6erbond

Building blockchain projects.
View GitHub Profile
@Dan6erbond
Dan6erbond / DonorAssignment.py
Created July 9, 2020 08:37
A Python exercise focused on multidimensional lists.
def main():
print("Input the folowing data for the donor:")
donors = list() # 'columns represent name, address, contact'
# get information for three donors
for i in range(3):
# ask for donor information and store in temporary variables
first_name = input('First name: ')
address = input('Address: ')
@Dan6erbond
Dan6erbond / aPRAWDiscordStream.py
Last active June 21, 2020 17:54
Discord bot layout to fetch new comments and post them to a desired location based on Banhammer.py's design and aPRAW.
from discord.ext import commands
import apraw
# instatiate a `Bot` instance
# this is using the Discord.py library
# source can be found here: https://github.com/Rapptz/discord.py
bot = commands.Bot(COMMAND_PREFIX, description=DESCRIPTION)
# instantiate a `Reddit` instance
# you can also supply a key to an entry within a praw.ini
@Dan6erbond
Dan6erbond / FileHandlerGetSubFolders.java
Last active June 3, 2019 10:58
A simple method to get all the sub-folders within another folder in Java.
public static ArrayList<File> getSubFolders(File folder) {
File[] dirs = {folder};
ArrayList<File> directories = new ArrayList<>(Arrays.asList(dirs));
File[] fs = {folder};
ArrayList<File> folders = new ArrayList<>(Arrays.asList(fs));
while (folders.size() > 0){
ArrayList<File> remove = new ArrayList<>();
ArrayList<File> add = new ArrayList<>();