This file contains hidden or 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
/* Copyright 2021 TW59420 <https://github.com/TW59420> | |
* | |
* This program is free software: you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation, either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
This file contains hidden or 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 UIKit | |
extension UIColor { | |
class func colorWithHexString(string: String) -> UIColor { | |
let num = Int(string, radix: 16)! | |
let r = CGFloat(num >> 16) / 255 | |
let g = CGFloat(((num >> 8) - (num >> 8) & 0xFF00)) / 255 | |
let b = CGFloat(num - (num & 0xFFFF00)) / 255 | |
This file contains hidden or 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
// | |
// RC4 | |
// | |
// Created by Bradley Slayter on 2/2/16. | |
// Copyright © 2016 Bradley Slayter. All rights reserved. | |
// | |
import Foundation |
This file contains hidden or 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 os | |
import sys | |
numlines = 0 | |
numFiles = 0 | |
exclude = ['.o', '.bin', '.iso', '.img', '.log', '#', '.dre'] # file extensions to ignore | |
def countLines(path): | |
global numlines |
This file contains hidden or 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
def main(): | |
strings = raw_input("Enter two comma seperated stings: ") | |
strings = strings.split(',') | |
origStrings = strings | |
root1 = getWordRoot(strings[0]) | |
root2 = getWordRoot(strings[1]) | |
while (root1 == root2) and (len(strings[0]) > 1 and len(strings[1]) > 1): |
This file contains hidden or 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 class Arrays { | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
String[] names = new String[5]; | |
names[0] = "Garret"; | |
names[1] = "Calvin"; | |
names[2] = "Ben"; | |
names[3] = "James"; |
This file contains hidden or 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 java.util.Scanner; | |
public class Average { | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
Scanner input = new Scanner(System.in); | |
System.out.println("Brad's grade averager!!"); |
This file contains hidden or 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 java.util.Random; | |
public class TestBed { | |
public static void main(String[] args) { | |
// TODO Auto-generated method stub | |
char[] tokens = {'o', '+', '-', '#'}; // symobols | |
Random random = new Random(); |
This file contains hidden or 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 praw | |
import time | |
seen = [] | |
def main(): | |
user_agent = ("User stalker 1.0") | |
r = praw.Reddit(user_agent=user_agent) | |
r.login('username', 'password') |