Skip to content

Instantly share code, notes, and snippets.

View Hawaiideveloper's full-sized avatar
🎯
Focusing

Corey Albright Hawaiideveloper

🎯
Focusing
View GitHub Profile
@Hawaiideveloper
Hawaiideveloper / solution.java
Last active May 5, 2020 19:33
Sum of two elements in a queue that equal 9
import java.util.ArrayList;
class solution {
public static void main(String[] args) {
int repository_numbers = 3;
// int sumValues = 0;
ArrayList<Integer> number_set = new ArrayList<Integer>(repository_numbers);
// use add method to add elements into the list
number_set.add(2);
@Hawaiideveloper
Hawaiideveloper / move.py
Created June 17, 2016 17:43 — forked from vadviktor/move.py
Python: move files to creation date named directories
#!/usr/bin/python3
import os, time, shutil, sys
dir = sys.argv[1]
os.chdir(dir)
for f in os.listdir('.'):
ftime = time.gmtime(os.path.getmtime(f))
ctime_dir = str(ftime.tm_year) '-' str(ftime.tm_mon) '-' str(ftime.tm_mday)
if not os.path.isdir(ctime_dir):
os.mkdir(ctime_dir)