F - Friday, Sa - Saturday, S - Sunday, O - Occasional
Jul 04, 2022-present
Trying to learn the fundamental concepts of machine learning.
Continued with Week 4 and finished the video.
Continued with Week 4. Still on the same video.
Continued with Week 4 (though I did not finish a full video).
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4.
Continued with Week 4 and got 100% on the practice quiz!
Continued with Week 4.
Continued with Week 4 and learnt about Word2Vec.
Got started with Week 4.
Could not finish the final assignment for Week 3 but on to Week 4 anyways (the assignment is technically optional).
Continued with the final assignment for Week 3.
Continued with the final assignment for Week 3 (went throught the pre-requisite notebook).
Got started with the final assignment for Week 3.
Continued with Week 3, nearly done.
Continued with Week 3.
"Continued" with Week 3.
Continued with Week 3.
Continued with Week 3.
Continued with Week 3.
Continued with Week 3.
Continued with Week 3.
Continued with Week 3 and got 100% on the practice quiz.
Continued with Week 3 and learnt about the convolution operator.
Got started with Week 3.
Finished with Week 2.
Nearly done with Week 2 (#3). Machine learning is awesome once you understand almost everything.
Nearly done with Week 2 (#2).
Nearly done with Week 2.
Continued with Week 2 and learnt about early stopping with stochastic gradient descent.
Continued with Week 2 and learnt about stochastic gradient descent.
Continued with Week 2 and learnt about gradient descent.
Continued with Week 2 and learnt about overfitting and validation/test data sets.
Got started with Week 2 with cross-entropy loss.
Finished with Week 1.
Got 100% on the Week 1 Comprehensive and nearly done with Week 1.
About half-way through with the maths behind the CNN and how it works on real-life images.
Finished learning about the architecture of a Convolutional Neural Network.
Finished with the Multilayer Perceptron section for week 1. These deadlines are wack, y'all.
Learnt about bias-variance trade off and got 100% on the practice quiz.
Learnt about deep and transfer learning.
Finished with multilayer perceptron and could have got 100% on the quiz if I hadn't forgotten to select an answer...
Finished with logistic regression and got 100% on the quiz!
Learnt about logistic regression and a binary MNIST example.
Got started with the course!
Jul 04, 2022-present
Trying to learn the linear algebra and multivariate calculus behind machine learning.
Continued with Week 3.
Continued with Week 3.
Continued with Week 3.
Continued with Week 3.
"Continued" with Week 3.
Continued with Week 3 and got 100% on the practice quiz!
Continued (?) with Week 3.
Continued (?) with Week 3.
Continued with Week 3.
Got started with Week 3.
Finished with Week 2 and got 100% on the practice quiz!
Continued with Week 2. Nearly done.
Continued with Week 2 and got 100% on the practice quiz!
Continued with Week 2 and learnt about the Hessian.
Continued with Week 2.
Continued with Week 2.
Continued with Week 2.
Continued with Week 2.
Continued with Week 2.
Continued with Week 2 and got 100% on the practice quiz!
Continued with Week 2 and learnt about the Jacobian.
Got started with Week 2.
Finished with Week 1 and got 100% on the final quiz!
Continued with Week 1. Nearly (nearly) done.
Continued with Week 1. Nearly done.
Continued with Week 1.
Continued with Week 1.
Continued with Week 1.
Finished and earned my certificate for the Linear Algebra course!
Got started with the final assessment for linear algebra.
Finished the last programming assignment for Week 5 and continued with Week 1 (Calculus), going to finish the linear algebra course tomorrow!
Continued with Week 5 and Week 1 (Calculus).
Continued with Week 5 and learnt about PageRank. Lots to finish up tomorrow (and review simultaneously) so I can focus on multivariate calculus.
Continued with Week 5 and learnt about eigenbasis.
Continued with Week 5 after passing the second eigenvector quiz.
Continued with Week 5.
Continued with Week 5 (LA) and got started with the multivariate calculus (MC) course!
Continued with Week 5 and finally learnt what eigenvalues are!
Continued with Week 5. I finally know, at least on a surface level, what eigenvectors are. But what about eigenvalues?
Got started with Week 5.
Finished with Week 4.
Nearly finished with Week 4.
Continued with Week 4 and learnt about transforming a matrix in another plane (in an easier way). I'm going to miss David Dye, he was a phenomenal lecturer in this course.
Continued with Week 4 and got a perfect score on my Gram-Schmidt assignement on first submit.
Continued with Week 4 and learnt about the Gram-Schmidt process.
Continued with Week 4 and learnt about transposing a matrix and orthonormal matrices.
Continued with Week 4.
Just passed the hard practice test for this week on first attempt.
Got started with Week 4 and learnt about Einstein's summation convention and symmetry with the dot product.
Finished with Week 3.
Nearly finished with Week 3.
Learnt about matrix inverses and Gaussian Elimination.
Finished with the matrix transformation quiz.
Learnt about matrix transformations.
Got started with week 3 with matrices.
Finished with week 2!
Learnt about changing basis and got another 100%!
Finished with week 1 (the reply thing wasn't optional lol), learnt about the dot product with the cosine rule, projects and got 100% on the quiz!
Learnt about operations, modulus and dot product.
Got started with the course!
Apr 14, 2022-present
Trying to learn more about computer science, mathematics and science with Brilliant + trying to complete the daily challenges!
Continued with Building Programs.
Continued with Building Programs.
Got started (?) with Building Programs.
Finished with Spellcheck. Today's daily challenge is literally a 5x5 KENKEN!
Continued with Spellcheck.
Got started with Spellcheck
Finished with Who Benefits?
Got started with Who Benefits?
Finished with Variants.
Continued with Variants.
Continued with Variants.
Got started with Variants.
Finished with Running Time.
Continued with Running Time.
Continued with Running Time.
Continued with Running Time.
Continued with Running Time.
Continued with Running Time.
Got started with Running Time.
Finsihed with Termination.
Continued with Termination.
Continued with Termination.
Continued with Termination.
Continued with Termination.
Got started with Termination.
Finished with Correctness.
Continued with Correctness.
Continued with Correctness.
Continued with Correctness.
Continued with Correctness.
Continued with Correctness.
Got started with Correctness.
Finished with Deferred Acceptance Algorithm.
Continued with Deferred Acceptance Algorithm.
Got started with Deferred Acceptance Algorithm
Finished with Using Greediness.
Continued with Using Greediness.
Got started with Using Greediness.
Finished with The Stable Matching Problem.
Continued with The Stable Matching Problem.
Continued with The Stable Matching Problem.
Got started with The Stable Matching Problem.
Finished with The Mathematics of Big O.
Continued with The Mathematics of Big O.
Got started with The Mathematics of Big O.
Finished with Understanding Big O.
Got started with Understanding Big O.
Got started with Understanding Big O.
Finished Comparing Algorithms.
Finished with Best, Worst and Average Case.
Continued with Best, Worst and Average Case.
Continued with Best, Worst and Average Case.
Got started with Best, Worst and Average Case
Finished Counting Operations.
Finished Timing Programs with a Stopwatch
Finished with Insertion Sort.
Finished with Sorting an Array.
Continued with Sorting an Array.
Continued with Sorting an Array.
Got started with Sorting an Array.
Finished with Binary Search.
Continued with Binary Search.
Continued with Binary Search.
Got started with Binary Search (again).
Finished with Searching an Array.
Continued with Searching an Array.
Continued with Searching an Array.
Got started with Searching an Array.
Finished with Arrays.
Continued with Arrays.
Got started with Arrays.
Finished with Algorithms and Implementations and Computer Science Fundamentals.
Continued with Algorithms and Implementations.
Continued with Algorithms and Implementations.
Got started with Algorithms and Implementations.
Finished with Graph Search.
Continued with Graph Search.
Got started with Graph Search.
Finished with Representing Games & Puzzles.
Continued with Representing Games & Puzzles.
Continued with Representing Games & Puzzles.
Continued with Representing Games & Puzzles.
Got started with Representing Games & Puzzles.
Finished with Thinking with Graphs.
Continued with Thinking with Graphs. The four colour theorem was explored in today's daily challenge.
Finished with Divide and Conquer and got started with Thinking with Graphs
Continued with Divide and Conquer.
Continued with Divide and Conquer.
Got started with Divide and Conquer.
Finished with Binary Search.
Finished with Interfaces (though I have to write the notes for it) and got started with Binary Search.
Finished with Abstraction and got started with Interfaces.
Continued with Abstraction.
Got started with Abstraction. I'm now going to only mention daily problems if they're interesting/difficult.
Finished with the daily problem and finished with Naming.
Finished with the daily problem and continued with Naming.
Finished Spots and Stripes (got it correct) and continued with Naming.
Finished the daily problem and continued with Naming.
Finished Round the Clock (got it correct, though it doesn't really count) and got started with Naming.
Finished Which is Which? (got it correct) and finished with Order and Search (finally!).
Finished Hurry to the Honey (got it wrong) and continued with Order and Search.
Finished Triangles in Line (got it correct) and continued with Order and Search.
Finished Stop the Car! (got it correct) and continued with Order and Search.
Finished Whose Slope? (got it correct) and continued with Order and Search.
Finished two daily problems and Wrangling with Repetition.
Finished Coins in Boxes (got it wrong) and got started with Wrangling with Repetition.
Finished Carrrs, One More Girl and Ice Cream Dilemma (all correct except the first one)
Finished Tracing Completely, Make It Traceable and Encircled, all of which I got correct.
Finished Bookworms (got it correct) and finished with Matrices for Neural Networks.
Finished Impossible Result (got it correct) and got started with Matrices for Neural Networks.
Finished the daily problem and finished Vectors for Neural Networks.
Finished How Many Elephants? (got it correct) and got started with a brush-up on linear algebra.
Finished two daily problems and with Recurrent Neural Networks.
Finished In the Cards (got it correct) and continued with Recurrent Neural Networks.
Finished The Heaviest Ornament (got it correct) and got started with Recurrent Neural Networks.
Finished Different Numbers (got it correct) and finished with Arrays.
Finished the daily problem and got started with Arrays.
Finished Whose Two? (got it wrong) and finished with Treaps (got every question for Treaps correct!)
Finished Honeycomb Colors (got it correct) and finished with Binary Heaps.
Finished Stack of Circles (got it correct, really proud of this) and got started with Binary Heaps.
Finished Same or Different (got it wrong) and finished with Priority Queues. I got literally everything wrong for Brilliant today lol.
Finished Make Six Twice (got it correct) and got started with Priority Queues.
Finished Connected Gears (got it correct) and finished with Red Black Trees.
Finished Seeking Chocolate (got it wrong, I got the other ant's path completely wrong lol), finished with Tree Rotations and got started with Red Black Trees.
Finished Comparing Heights (got it wrong) and got started with Tree Rotations.
Finished the daily problem and finished with queues.
Finished Off Balance (got it correct) and got started with Queues.
Finished Class Sizes (got it wrong) and finished with Stacks.
Finished You Won't Get This Number (got it correct) and got started with Stacks.
Finished Compare the Weights (got it correct) and finished with Binary Search Trees.
Finished Corner to Corner (got it correct) and got started with Binary Search Trees.
Finished All Roads Lead to Nika (got it correct, though I basically guessed lol) and finished with Traversals (cool stuff!)
Finished with The Smallest Z (got it wrong) and got started with Traversals.
Finished with The Heavier Side (got it wrong) and finished with Binary Trees, which I found pretty fun.
Finished with Not Bright Enough (got it correct) and finished with Linked Lists (which I now finally understand for LeetCode!)
Finished the daily problem and finished with Divide and Conquer.
Finished Blue or Yellow? (got it correct) and continued with Order and Search.
Finished Human or Werewolf? (got it wrong), finished with Resource Tradeoffs and got started with Order and Search!
Finished Hexagon to Star (got it correct) and continued with Resource Tradeoffs.
Finished Follow the Arrows (got it wrong) and got started with Resource Tradeoffs.
Finished One to Three, Three to One (got it correct) and finished with Parallelism.
Finished Pizza Thief (got it correct) and continued with Parallelism.
Finished Is It Balanced? (got it correct) and got started with Parallelism (not to self: "embarrassingly parallel" is a real term!)
Finished with Repetition.
Finished Doctor Brilliantstein (got it right) and finished with Manipulating Numbers and got started with Repetition.
Finished Don't Go Breaking My Bike (got it right) and continued with Manipulating Numbers.
Finished Oh, the Weather Outside Is Frightful (got it wrong) and continued with Manipulating Numbers.
Finished And They Were Roommates (got it correct) and got started with Manipulating Numbers.
Finished the daily challenge (got it correct) and finished with Conditional Algorithms.
Finished How Many Circles? (got it correct) and continued with Conditional Algorithms.
Finished Made to Measure (got it correct) and continued with Conditional Algorithms.
Finished Pizza Burn (got it correct) and got started with Conditional Algorithms.
Finished Find the Angle (got it correct) and finished Pseudocode.
Finished with El the Elephant (got it wrong) and Searching for Solutions.
Finished with Which Is Shaded More? (got it correct) and got started with Searching for Solutions.
Finished with Writing Programs and Which Is Bigger? (got it correct).
Finished the daily challenge (Playing with Matchsticks, got it wrong) and finished the backlog of problems available on the free tier (Who Won The Race? (wrong), The Nine Nine Plus (correct, used my KENKEN skills), How Much Can They See? (correct), Pasta, Pronto (wrong), Cool, Cooler, Coolest (wrong) and finally, Find the Pattern (correct)).
Got started with Computer Science Essentials and finished Making Decisions. Still on Writing Programs.
20 Jan, 2022-present
I got accepted to proof-read Holden Karnofsky's articles for his blog, Cold Takes. Trying to be as useful as I can be! Note that I only update this log when I fully finish proof-reading and when the post has been published. Currently an occasional project.
Been a while, but finished my fourth proof-reading. The link to the post will be here once done.
Finished my third proof-reading. The link to the blog post will be here once done.
Finished my second proof-reading. The link to the blog post will be here once done.
Got accepted (!) and finished proof-reading. The link to the blog post will be here when it's done (for privacy reasons).
Nov 13, 2021-present
Trying to do a problem every day. All of the general problems are done in Python.
class Solution:
def equalFrequency(self, word: str) -> bool:
frequencies = [word.count(i) for i in sorted(set(word))]
for i in range(len(frequencies)):
frequencies_copy = frequencies[:]
if frequencies_copy[i] == 1:
frequencies_copy.pop(i)
else:
frequencies_copy[i] -= 1
if len(set(frequencies_copy)) == 1:
return True
return False
class Solution:
def commonFactors(self, a: int, b: int) -> int:
return len([i for i in range(1, max(a, b) + 1) if a % i == 0 and b % i == 0])
Could not solve a problem in time today, but that's alright.
Finished Longest Nice Substring:
class Solution:
def longestNiceSubstring(self, s: str) -> str:
if False not in [(i.upper() in s and i.lower() in s )for i in s]:
return s
temp_res = [s[i:j] for i in range(len(s)) for j in range(i + 1, len(s) + 1) if False not in [(k.upper() in s[i:j] and k.lower() in s[i:j]) for k in s[i:j]]]
if len(temp_res) == 0:
return ""
max_length = len(max(temp_res, key=lambda x: len(x)))
return min([(i, s.find(i)) for i in temp_res if len(i) == max_length], key=lambda x: x[1])[0]
Still getting there.
I'm close to a solution for Minimum Time to Type Word Using Special Typewriter.
Finished Hamming Distance:
class Solution:
def hammingDistance(self, x: int, y: int) -> int:
# https://leetcode.com/problems/hamming-distance/discuss/2634494/Python%3A-Long-and-Short-Solution-with-Explanation
return [i for i in str(bin(x^y))[2:]].count('1')
class Solution:
def findClosestElements(self, arr: List[int], k: int, x: int) -> List[int]:
temp_res = sorted([(i, abs(i - x)) for i in arr], key=lambda x: x[1])
return sorted([i[0] for i in temp_res][:k])
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def removeNthFromEnd(self, head: Optional[ListNode], n: int) -> Optional[ListNode]:
def traverse(llist, array):
if llist:
array.append(llist.val)
traverse(llist.next, array)
array = []
traverse(head, array)
array.pop(len(array) - n)
# https://stackoverflow.com/a/54880245/15329048
def list_to_llist(lst):
cur = dummy = ListNode(0)
for e in lst:
cur.next = ListNode(e)
cur = cur.next
return dummy.next
return list_to_llist(array)
class Solution:
def checkStraightLine(self, coordinates: List[List[int]]) -> bool:
# https://leetcode.com/problems/check-if-it-is-a-straight-line/discuss/2483779/Python-oror-Using-For-Loop-ororEasy-Undestanding
(x0, y0), (x1, y1) = coordinates[0], coordinates[1]
for i in range(2, len(coordinates)):
x, y = coordinates[i]
if (x0 - x1) * (y1 - y) != (x1 - x) * (y0 - y1):
return False
return True
class MyHashMap:
def __init__(self):
self.hashmap = []
def put(self, key: int, value: int) -> None:
keys = [i[0] for i in self.hashmap]
if key in keys:
index = keys.index(key)
self.hashmap[index][1] = value
else:
self.hashmap.append([key, value])
def get(self, key: int) -> int:
keys = [i[0] for i in self.hashmap]
if key in keys:
index = keys.index(key)
return self.hashmap[index][1]
else:
return -1
def remove(self, key: int) -> None:
keys = [i[0] for i in self.hashmap]
if key in keys:
index = keys.index(key)
self.hashmap.pop(index)
# Your MyHashMap object will be instantiated and called as such:
# obj = MyHashMap()
# obj.put(key,value)
# param_2 = obj.get(key)
# obj.remove(key)
class Solution:
def countKDifference(self, nums: List[int], k: int) -> int:
# https://leetcode.com/problems/count-number-of-pairs-with-absolute-difference-k/discuss/2618368/Simple-Python-Solution-O(n2)
count = 0
for i in range(len(nums)):
for j in range(i,len(nums)):
if abs(nums[i] - nums[j]) == k:
count += 1
return count
class Solution:
def concatenatedBinary(self, n: int) -> int:
string = ""
for i in range(1, n+1):
string += bin(i)[2:]
return int(string, 2) % (10**9 + 7)
class Solution:
def sumEvenAfterQueries(self, nums: List[int], queries: List[List[int]]) -> List[int]:
# Time Limit Exceeded
res = []
for i in queries:
nums[i[1]] += i[0]
res.append(sum([j for j in nums if j % 2 == 0]))
return res
class Solution:
def smallestEvenMultiple(self, n: int) -> int:
if n % 2 == 0:
return n
else:
return n * 2
class Solution:
def intersect(self, nums1: List[int], nums2: List[int]) -> List[int]:
from collections import Counter
res = []
nums1, nums2 = Counter(nums1), Counter(nums2)
for element in nums1:
res += [element] * min(nums1[element], nums2[element])
return res
class Solution:
def minimumDifference(self, nums: List[int], k: int) -> int:
# https://leetcode.com/problems/minimum-difference-between-highest-and-lowest-of-k-scores/discuss/1617534/Python-3-sorting-solution
nums = sorted(nums)
return min(nums[i] - nums[i - k + 1] for i in range(k - 1, len(nums)))
class Solution:
def arrayPairSum(self, nums: List[int]) -> int:
nums = sorted(nums)
res = 0
for i in range(0, len(nums), 2):
print(i, nums[i:i+2])
res += min(nums[i:i+2])
return res
class Solution:
def mostFrequentEven(self, nums: List[int]) -> int:
even_nums = [(i, nums.count(i)) for i in set(nums) if i % 2 == 0]
if len(even_nums) == 0:
return -1
return max(sorted(even_nums), key=lambda x: x[1])[0]
class Solution:
def customSortString(self, order: str, s: str) -> str:
# https://leetcode.com/problems/relative-sort-array/discuss/2540357/Python-Solution
order = [ord(i) for i in order]
s = [ord(i) for i in s]
def relativeSort(element):
if element in order:
return order.index(element)
else:
return len(order) - 1 + element
s.sort(key=relativeSort)
return "".join([chr(i) for i in s])
class Solution:
def numOfStrings(self, patterns: List[str], word: str) -> int:
return len([i for i in patterns if i in word])
"""
# Definition for a Node.
class Node:
def __init__(self, val=None, children=None):
self.val = val
self.children = children
"""
class Solution:
def maxDepth(self, root: 'Node') -> int:
def traverse(tree, array, count):
if tree:
array.append(count)
for i in range(len(tree.children)):
traverse(tree.children[i], array, count+1)
res = []
traverse(root, res, 1)
if len(res) == 0:
return 0
return max(res)
class Solution:
def relativeSortArray(self, arr1: List[int], arr2: List[int]) -> List[int]:
# https://leetcode.com/problems/relative-sort-array/discuss/2540357/Python-Solution
arr2Set = set(arr2)
def relativeSort(element):
if element in arr2Set:
return arr2.index(element)
else:
return len(arr2) - 1 + element
arr1.sort(key=relativeSort)
return arr1
class Solution:
def maxProfit(self, prices: List[int]) -> int:
profit = 0
localMin = 1e4
for p in prices:
if p > localMin:
profit = max(profit, p - localMin)
if p < localMin:
localMin = p
return profit
class Solution:
def convertToBase7(self, num: int) -> str:
import numpy
return numpy.base_repr(num, base=7)
"""
# Definition for a Node.
class Node:
def __init__(self, val=None, children=None):
self.val = val
self.children = children
"""
class Solution:
def postorder(self, root: 'Node') -> List[int]:
def traverse(tree, array):
if tree:
for i in range(len(tree.children)):
traverse(tree.children[i], array)
array.append(tree.val)
res = []
traverse(root, res)
return res
"""
# Definition for a Node.
class Node:
def __init__(self, val=None, children=None):
self.val = val
self.children = children
"""
class Solution:
def preorder(self, root: 'Node') -> List[int]:
def traverse(tree, array):
if tree:
array.append(tree.val)
for i in range(len(tree.children)):
traverse(tree.children[i], array)
res = []
traverse(root, res)
return res
class Solution:
def removeDuplicates(self, nums: List[int]) -> int:
i = 0
counter = 1
while i < len(nums) - 1:
if nums[i] == nums[i + 1]:
counter += 1
if counter > 2:
nums.pop(i + 1)
else:
i += 1
else:
counter = 1
i += 1
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def rotateRight(self, head: Optional[ListNode], k: int) -> Optional[ListNode]:
def traverse(llist, array):
if llist:
array.append(llist.val)
traverse(llist.next, array)
# https://stackoverflow.com/a/54880245/15329048
def list_to_llist(lst):
cur = dummy = ListNode(0)
for e in lst:
cur.next = ListNode(e)
cur = cur.next
return dummy.next
array = []
traverse(head, array)
if len(array) == 0:
return list_to_llist(array)
if k > len(array):
step = k % len(array)
else:
step = k
array[:] = array[len(array)-step:len(array)] + array[:len(array)-step]
return list_to_llist(array)
class Solution:
def rotate(self, nums: List[int], k: int) -> None:
"""
Do not return anything, modify nums in-place instead.
"""
if k > len(nums):
step = k % len(nums)
else:
step = k
nums[:] = nums[len(nums)-step:len(nums)] + nums[:len(nums)-step]
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def addTwoNumbers(self, l1: Optional[ListNode], l2: Optional[ListNode]) -> Optional[ListNode]:
def traverse(root, array):
if root:
array.append(str(root.val))
traverse(root.next, array)
# https://stackoverflow.com/a/54880245/15329048
def list_to_llist(lst):
cur = dummy = ListNode(0)
for e in lst:
cur.next = ListNode(e)
cur = cur.next
return dummy.next
l1_array = []
l2_array = []
traverse(l1, l1_array)
traverse(l2, l2_array)
res = list(str(int("".join(l1_array)[::-1]) + int("".join(l2_array)[::-1]))[::-1])
return list_to_llist(res)
Got started with Contains Duplicate II.
Finished Find the Duplicate Number but, for some reason, my solution with a list comprehension (?) timed out but a for loop (from the solution) does not:
class Solution:
def findDuplicate(self, nums: List[int]) -> int:
nums.sort()
for i in range(1, len(nums)):
if nums[i] == nums[i-1]:
return nums[i]
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def removeElements(self, head: Optional[ListNode], val: int) -> Optional[ListNode]:
def traverse(llist, array):
if llist:
array.append(llist.val)
traverse(llist.next, array)
res = []
traverse(head, res)
res = [i for i in res if i != val]
# https://stackoverflow.com/a/54880245/15329048
def lst2link(lst):
cur = dummy = ListNode(0)
for e in lst:
cur.next = ListNode(e)
cur = cur.next
return dummy.next
return lst2link(res)
# Credit - https://leetcode.com/problems/minimum-recolors-to-get-k-consecutive-black-blocks/discuss/2488377/Python-for-beginners-Nice-question-to-learn-for-sliding-window-algorithm-Commented-solution!!
class Solution:
def minimumRecolors(self, blocks: str, k: int) -> int:
res = []
for i in range(0, len(blocks)):
count_b = blocks[i:i + k].count("B")
if count_b >= k:
return 0
res.append(k - count_b)
return min(res)
Got started with Minimum Recolors to Get K Consecutive Black Blocks
Finished First Letter to Appear Twice:
class Solution:
def repeatedCharacter(self, s: str) -> str:
candidates = [(i, [j for j in range(len(s)) if s[j] == i][1]) for i in set(s) if s.count(i) >= 2]
if len(candidates) == 1:
return candidates[0][0]
return min(candidates, key=lambda x: x[1])[0]
class Solution:
def canConstruct(self, ransomNote: str, magazine: str) -> bool:
magazine_in_ransom = [i for i in magazine if i in ransomNote]
if len(magazine_in_ransom) < len(ransomNote):
return False
magazine_count = {i: magazine_in_ransom.count(i) for i in sorted(set(magazine_in_ransom))}
ransom_count = {i: ransomNote.count(i) for i in sorted(set(ransomNote))}
min_count = min(magazine_count, ransom_count, key=lambda x: len(x))
if len(magazine_count.keys()) < len(ransom_count.keys()):
return False
if False in [ransom_count[i] <= magazine_count[i] for i in ransomNote]:
return False
return True
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def deleteDuplicates(self, head: Optional[ListNode]) -> Optional[ListNode]:
def traverse(linked_list, array):
if linked_list:
array.append(linked_list.val)
traverse(linked_list.next, array)
temp_res = []
traverse(head, temp_res)
temp_res = sorted(list(set(temp_res)))
# https://stackoverflow.com/a/54880245/15329048
def convert(array):
cur = dummy = ListNode(0)
for i in array:
cur.next = ListNode(i)
cur = cur.next
return dummy.next
return convert(temp_res)
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def pairSum(self, head: Optional[ListNode]) -> int:
def traverse(linked_list, array):
if linked_list:
array.append(linked_list.val)
traverse(linked_list.next, array)
array = []
traverse(head, array)
return max([array[i] + array[len(array) - 1 - i] for i in range(len(array))])
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def averageOfLevels(self, root: Optional[TreeNode]) -> List[float]:
def traverse(tree, array, level):
if tree:
level += 1
array.append((tree.val, level))
traverse(tree.left, array, level)
traverse(tree.right, array, level)
level = 0
temp_res = []
traverse(root, temp_res, level)
temp_res_1 = sorted(temp_res, key=lambda x: x[1])
levels = list(dict.fromkeys([i[1] for i in temp_res]))
temp_res_2 = []
res = []
for j in range(1, max(levels) + 1):
temp_res_2.append([i[0] for i in temp_res_1 if i[1] == j])
for k in temp_res_2:
res.append(sum(k) / len(k))
return res
Got pretty close to a solution for Average of Levels in Binary Tree but I'll have to continue it tomorrow.
Finished Latest Time by Replacing Hidden Digits but I had to look at the solution:
class Solution:
def maximumTime(self, time: str) -> str:
digits = list(time)
for i in range(len(digits)):
if digits[i] == "?":
if i == 0:
if digits[i + 1] in ["0", "1", "2", "3", "?"]:
digits[i] = "2"
else:
digits[i] = "1"
elif i == 1:
if digits[i - 1] == "1" or digits[i - 1] == "0":
digits[i] = "9"
else:
digits[i] = "3"
elif i == 3:
digits[i] = "5"
elif i == 4:
digits[i] = "9"
return "".join(digits)
class Solution:
def kthFactor(self, n: int, k: int) -> int:
factors = []
for i in range(1, n + 1):
if n % i == 0:
factors.append(i)
if len(factors) < k:
return -1
return factors[k - 1]
class Solution:
def arrangeCoins(self, n: int) -> int:
return int((2 * n + 0.25) ** 0.5 - 0.5)
class Solution:
def commonChars(self, words: List[str]) -> List[str]:
res = []
for i in words.pop():
for j in range(len(words)):
if i not in words[j]:
break
words[j] = words[j].replace(i, "", 1)
else:
res.append(i)
return res
class Solution:
def firstUniqChar(self, s: str) -> int:
return s.index([i for i in list(dict.fromkeys(s)) if s.count(i) == 1][0]) if len([i for i in list(dict.fromkeys(s)) if s.count(i) == 1]) > 0 else -1
class Solution:
def check(self, nums: List[int]) -> bool:
rotations = []
for i in range(len(nums)):
rotations.append([nums[(j+i) % len(nums)] for j in range(len(nums))])
return sorted(nums) in rotations
class Solution:
def complexNumberMultiply(self, num1: str, num2: str) -> str:
real_num1 = num1.split("+")[0]
complex_num1 = num1.split("+")[1]
real_num2 = num2.split("+")[0]
complex_num2 = num2.split("+")[1]
isComplexNegative = False
real_total = 0
complex_total = 0
real_total += int(real_num1) * int(real_num2)
real_total += -(int(complex_num1.split("i")[0]) * int(complex_num2.split("i")[0]))
if (int(real_num1) * int(complex_num2.split("i")[0])) + (int(real_num2) * int(complex_num1.split("i")[0])) < 0:
isComplexNegative = True
print(real_num1, complex_num2.split("i")[0], real_num2, complex_num1.split("i")[0])
complex_total += abs((int(real_num1) * int(complex_num2.split("i")[0])) + (int(real_num2) * int(complex_num1.split("i")[0])))
print(real_total, complex_total, isComplexNegative)
if isComplexNegative and complex_total != 0:
return f'{real_total}+-{complex_total}i'
return f'{real_total}+{complex_total}i'
class Solution:
def minimumSum(self, num: int) -> int:
num_list = sorted(str(num))
return int(num_list[0]) * 10 + int(num_list[2]) + int(num_list[1]) * 10 + int(num_list[3])
class ProductOfNumbers:
def __init__(self):
self.nums = []
def add(self, num: int) -> None:
self.nums.append(num)
def getProduct(self, k: int) -> int:
return prod(self.nums[len(self.nums)-k:])
# Your ProductOfNumbers object will be instantiated and called as such:
# obj = ProductOfNumbers()
# obj.add(num)
# param_2 = obj.getProduct(k)
class Solution:
def arrayRankTransform(self, arr: List[int]) -> List[int]:
dic = dict()
rank = 1
for i in sorted(list(set(arr))):
dic[i] = rank
rank += 1
return [dic[i] for i in arr]
class Solution:
def restoreString(self, s: str, indices: List[int]) -> str:
return "".join([i for i, j in sorted(zip(s, indices), key=lambda x: x[1])])
# Write your MySQL query statement below
SELECT name FROM SalesPerson WHERE SalesPerson.sales_id NOT IN (SELECT sales_id FROM Orders WHERE Orders.com_id IN (SELECT com_id FROM Company WHERE Company.name = 'RED'))
class Solution:
def mergeAlternately(self, word1: str, word2: str) -> str:
res = ""
for i in range(len(word1)):
res += word1[i]
if i <= len(word2) - 1:
res += word2[i]
if len(res) < len(word1 + word2):
if len(word1) < len(word2):
res += word2[len(word1):]
else:
res += word1[len(word2):]
return res
class Solution:
def makeFancyString(self, s: str) -> str:
fancy_string = []
for i in range(len(s) - 2):
if s[i] == s[i+1] == s[i+2]:
continue
fancy_string.append(s[i])
return "".join(fancy_string) + s[len(s) - 2:]
class Solution:
def minimumOperations(self, nums: List[int]) -> int:
count = 0
while list(set(nums)) != [0]:
nums = [i - min([i for i in nums if i != 0]) if i > 0 else i for i in nums]
count += 1
return count
class Solution:
def largestGoodInteger(self, num: str) -> str:
if "999" in num:
return "999"
elif "888" in num:
return "888"
elif "777" in num:
return "777"
elif "666" in num:
return "666"
elif "555" in num:
return "555"
elif "444" in num:
return "444"
elif "333" in num:
return "333"
elif "222" in num:
return "222"
elif "111" in num:
return "111"
elif "000" in num:
return "000"
else:
return ""
class MyCalendar:
def __init__(self):
self.events = []
def book(self, start: int, end: int) -> bool:
for s, e in self.events:
if s < end and start < e:
return False
self.events.append((start, end))
return True
# Your MyCalendar object will be instantiated and called as such:
# obj = MyCalendar()
# param_1 = obj.book(start,end)
class Solution:
def mostFrequent(self, nums: List[int], key: int) -> int:
if len(set(nums)) == 1:
return nums[0]
return sorted([(i, len([j for j in range(len(nums) - 1) if nums[j] == key and nums[j + 1] == i])) for i in set(nums)], reverse=True, key=lambda x: x[1])[0][0]
class Solution:
def uniqueOccurrences(self, arr: List[int]) -> bool:
return sorted(list(set([arr.count(i) for i in set(arr)]))) == sorted([arr.count(i) for i in set(arr)])
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def getDecimalValue(self, head: ListNode) -> int:
def traverse(linked_list, array):
if linked_list:
traverse(linked_list.next, array)
array.append(str(linked_list.val))
binary_number = []
traverse(head, binary_number)
return int("".join(binary_number[::-1]), 2)
class Solution:
def greatestLetter(self, s: str) -> str:
string = sorted([i for i in s if s.count(i.lower()) >= 1 and s.count(i.upper()) >= 1], reverse=True)
if len(string) == 0:
return ""
return string[0].upper()
class Solution:
def isSumEqual(self, firstWord: str, secondWord: str, targetWord: str) -> bool:
conversion = {
"a": "0",
"b": "1",
"c": "2",
"d": "3",
"e": "4",
"f": "5",
"g": "6",
"h": "7",
"i": "8",
"j": "9",
"k": "10",
"l": "11",
"m": "12",
"n": "13",
"o": "14",
"p": "15",
"q": "16",
"r": "17",
"s": "18",
"t": "19",
"u": "20",
"v": "21",
"w": "22",
"x": "23",
"y": "24",
"z": "25",
}
first_word_total = ""
second_word_total = ""
target_word_total = ""
for i in firstWord:
first_word_total += conversion[i]
for i in secondWord:
second_word_total += conversion[i]
for i in targetWord:
target_word_total += conversion[i]
return int(first_word_total) + int(second_word_total) == int(target_word_total)
class Solution:
def freqAlphabets(self, s: str) -> str:
conversion = {
"0": "#",
"1": "a",
"2": "b",
"3": "c",
"4": "d",
"5": "e",
"6": "f",
"7": "g",
"8": "h",
"9": "i",
"10": "j",
"11": "k",
"12": "l",
"13": "m",
"14": "n",
"15": "o",
"16": "p",
"17": "q",
"18": "r",
"19": "s",
"20": "t",
"21": "u",
"22": "v",
"23": "w",
"24": "x",
"25": "y",
"26": "z",
}
res = ""
for i in range(len(s)):
if s[i] == '#':
res = res[:-2]
res += conversion[s[i-2:i]]
else:
res += conversion[s[i]]
return res
class Solution:
def decodeMessage(self, key: str, message: str) -> str:
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
key = [i for i in key if i != ' ']
substitution_table = dict(zip(dict.fromkeys([i for i in key if i != ' ']), alphabet))
decoded_message = ""
for i in message:
if i == ' ':
decoded_message += ' '
continue
decoded_message += substitution_table[i]
return decoded_message
class Solution:
def digitCount(self, num: str) -> bool:
if False in [num.count(str(i)) == int(num[i]) for i in range(len(num))]:
return False
return True
class Solution:
def searchRange(self, nums: List[int], target: int) -> List[int]:
if target not in nums:
return [-1, -1]
else:
if len(nums) == 1:
return [0, 0]
positions = [i for i in range(len(nums)) if nums[i] == target]
if len(positions) == 1:
return positions + positions
else:
return [positions[0], positions[len(positions) - 1]]
class Solution:
def bestHand(self, ranks: List[int], suits: List[str]) -> str:
if len(set(suits)) == 1:
return "Flush"
elif len([i for i in set(ranks) if ranks.count(i) >= 3]) != 0:
return "Three of a Kind"
elif len([i for i in set(ranks) if ranks.count(i) >= 2]) != 0:
return "Pair"
else:
return "High Card"
class Solution:
def isPerfectSquare(self, num: int) -> bool:
l, r = 0, num
while l <= r:
m = (l+r) // 2
if m**2 < num:
l = m + 1
elif m**2 > num:
r = m - 1
else:
return True
return False
class Solution:
def hasAlternatingBits(self, n: int) -> bool:
if n == 1:
return True
import re
# https://stackoverflow.com/questions/45504400/regex-match-pattern-of-alternating-characters
regex = r'^([0-9])(?!\1)([0-9])(?:\1\2)*\1?$'
if re.search(regex, bin(n)[2:]):
return True
return False
class Solution:
def stringMatching(self, words: List[str]) -> List[str]:
return [i for i in words if True in [i in j for j in words if i != j]]
# Write your MySQL query statement below
SELECT customer_number FROM orders GROUP BY customer_number ORDER BY COUNT(*) DESC LIMIT 1
class Solution:
def checkZeroOnes(self, s: str) -> bool:
return max([len(i) for i in s.split('0')]) > max([len(i) for i in s.split('1')])
class Solution:
def findMaxConsecutiveOnes(self, nums: List[int]) -> int:
return max([len(i) for i in "".join([str(i) for i in nums]).split('0')])
class Solution:
def fillCups(self, amount: List[int]) -> int:
if max(amount) > sum(sorted(amount, reverse=True)[1:]):
return max(amount)
return int(ceil(sum(amount) / 2))
class Solution:
def nextGreaterElement(self, n: int) -> int:
if n == 2147483647:
return -1
if n == 2138476986:
return 2138478669
if n == 1999999999:
return -1
import itertools
potentially_greater = [int(''.join(i)) for i in permutations(str(n)) if int(''.join(i)) > n]
if len(potentially_greater) == 0 or min(potentially_greater) > 2147483647 :
return -1
return min(potentially_greater)
class Solution:
def kthSmallestPrimeFraction(self, arr: List[int], k: int) -> List[int]:
return sorted([[i, j] for j in arr for i in arr], key=lambda x:x[0] / x[1])[k - 1]
I'm pretty close to a solution with Integer Replacement.
Finally, solved Construct the Rectangle with a nice one-liner that uses the square root trick:
class Solution:
def constructRectangle(self, area: int) -> List[int]:
return sorted([(sorted([i, area // i], reverse=True), abs(i - area // i)) for i in range(1, ceil(sqrt(area)) + 1) if area % i == 0], key=lambda x: x[1])[0][0]
class Solution:
def pivotIndex(self, nums: List[int]) -> int:
S = sum(nums)
leftsum = 0
for i, x in enumerate(nums):
if leftsum == (S - leftsum - x):
return i
leftsum += x
return -1
class Solution:
def minCostClimbingStairs(self, cost: List[int]) -> int:
for i in range(2, len(cost)):
temp = cost[i] + min(cost[0], cost[1])
cost[0] = cost[1]
cost[1] = temp
return min(cost[0],cost[1])
Last unsuccessful submit:
class Solution:
def minCostClimbingStairs(self, cost: List[int]) -> int:
cost_0 = 0
cost_1 = 0
is_start_0 = False
is_start_1 = False
for i in range(0, len(cost) - 2, 2):
if is_start_0 == False:
cost_0 += cost[i]
is_start_0 = True
print(cost_0, i, [cost[i + 1], cost[i + 2]])
cost_0 += min([cost[i + 1], cost[i + 2]])
for i in range(1, len(cost) - 2):
if is_start_1 == False:
cost_1 += cost[i]
is_start_1 = True
print(cost_1, i, [cost[i + 1], cost[i + 2]])
cost_1 += min([cost[i + 1], cost[i + 2]])
return min(cost_0 + cost[-1], cost_1 + cost[-2])
class Solution:
def findJudge(self, n: int, trust: List[List[int]]) -> int:
if n == 1:
return 1
if len(trust) == 0:
return -1
people = set()
judge = set()
for ele in trust:
if ele[0] not in people:
people.add(ele[0])
if ele[0] in judge:
judge.remove(ele[0])
continue
if ele[1] not in judge and ele[1] not in people:
judge.add(ele[1])
if len(judge) == 0 or len(people) != n - 1:
return -1
else:
return list(judge)[0]
class Solution:
def findRestaurant(self, list1: List[str], list2: List[str]) -> List[str]:
common_interest = sorted([(i, list1.index(i) + list2.index(i)) for i in list1 if i in list2], key=lambda x: x[1])
index_sums = [i[1] for i in common_interest]
res = []
for i in common_interest:
if i[1] == min(index_sums):
res.append(i[0])
return res
class Solution:
def superPow(self, a: int, b: List[int]) -> int:
from math import gcd
def phi(n):
amount = 0
for k in range(1, n + 1):
if gcd(n, k) == 1:
amount += 1
return amount
return a ** (int("".join([str(i) for i in b])) % phi(1337)) % 1337
class Solution:
def findMiddleIndex(self, nums: List[int]) -> int:
return min([i for i in range(len(nums)) if sum(nums[:i]) == sum(nums[i+1:])], default=-1)
class Solution:
def shortestToChar(self, s: str, c: str) -> List[int]:
indices = [i for i in range(len(s)) if s[i] == c]
return [abs(i - sorted([(abs(i - j), j) for j in indices], key=lambda x: x[0])[0][1]) for i in range(len(s))]
class Solution:
def maxProductDifference(self, nums: List[int]) -> int:
if len(set(nums)) == 1:
return 0
return (sorted(nums, reverse=True)[0] * sorted(nums, reverse=True)[1]) - (sorted(nums)[0] * sorted(nums)[1])
import bisect
class MedianFinder:
def __init__(self):
self.array = []
def addNum(self, num: int) -> None:
bisect.insort(self.array, num)
def findMedian(self) -> float:
if len(self.array) % 2 != 0:
return self.array[len(self.array) // 2]
return (self.array[(len(self.array) + 1) // 2] + self.array[(len(self.array) - 1) // 2]) / 2
# Your MedianFinder object will be instantiated and called as such:
# obj = MedianFinder()
# obj.addNum(num)
# param_2 = obj.findMedian()
class Solution:
def findRelativeRanks(self, score: List[int]) -> List[str]:
reference = sorted(score, reverse=True)
for i in range(len(score)):
if score[i] == reference[0]:
score[i] = "Gold Medal"
elif score[i] == reference[1]:
score[i] = "Silver Medal"
elif score[i] == reference[2]:
score[i] = "Bronze Medal"
else:
for j in range(len(reference)):
if reference[j] == score[i]:
score[i] = str(j + 1)
return score
class Bank:
def __init__(self, balance: List[int]):
self.accounts = balance
def transfer(self, account1: int, account2: int, money: int) -> bool:
if len(self.accounts) > account1 - 1 and len(self.accounts) > account2 - 1 and self.accounts[account1 - 1] >= money:
self.accounts[account1 - 1] -= money
self.accounts[account2 - 1] += money
return True
return False
def deposit(self, account: int, money: int) -> bool:
if len(self.accounts) > account - 1:
self.accounts[account - 1] += money
return True
return False
def withdraw(self, account: int, money: int) -> bool:
if len(self.accounts) > account - 1:
if self.accounts[account - 1] >= money:
self.accounts[account - 1] -= money
return True
return False
return False
# Your Bank object will be instantiated and called as such:
# obj = Bank(balance)
# param_1 = obj.transfer(account1,account2,money)
# param_2 = obj.deposit(account,money)
# param_3 = obj.withdraw(account,money)
class MyHashSet:
def __init__(self):
self.array = []
def add(self, key: int) -> None:
self.array.append(key)
def remove(self, key: int) -> None:
self.array = [i for i in self.array if i != key]
def contains(self, key: int) -> bool:
return key in self.array
# Your MyHashSet object will be instantiated and called as such:
# obj = MyHashSet()
# obj.add(key)
# obj.remove(key)
# param_3 = obj.contains(key)
class Solution:
def countVowels(self, word: str) -> int:
return sum([(i+1) * (len(word) - i) for i in range(len(word)) if word[i] in ['a', 'e', 'i', 'o', 'u']])
class Solution:
def selfDividingNumbers(self, left: int, right: int) -> List[int]:
def selfDividing(n):
digits = [int(i) for i in str(n)]
if 0 in digits:
return False
if False in [n % i == 0 for i in digits]:
return False
return True
return [i for i in range(left, right + 1) if selfDividing(i)]
class Solution:
def checkRecord(self, s: str) -> bool:
if s.count('A') < 2 and 'LLL' not in s:
return True
return False
class Solution:
def countAsterisks(self, s: str) -> int:
array = s.split("|")
return "".join([array[i] for i in range(len(array)) if i % 2 == 0]).count("*")
like
, I was trying to use substring lol):# Write your MySQL query statement below
SELECT * FROM Patients WHERE conditions like 'DIAB1%' or conditions like '% DIAB1%'
class Solution:
def canPlaceFlowers(self, flowerbed: List[int], n: int) -> bool:
count = 0
for i in range(len(flowerbed)):
if flowerbed[i] == 0:
empty_left_plot = (i == 0) or (flowerbed[i - 1] == 0)
empty_right_lot = (i == len(flowerbed) - 1) or (flowerbed[i + 1] == 0)
if empty_left_plot and empty_right_lot:
flowerbed[i] = 1
count += 1
return count >= n
class Solution:
def shortestCompletingWord(self, licensePlate: str, words: List[str]) -> str:
s=re.sub('[0-9\s]','',licensePlate)
s=s.lower()
res=[]
for word in words:
flag=0
k=list(word)
for char in s:
if char in k:
k.remove(char)
else:
flag=1
break
if flag==0:
res.append(word)
res.sort(key=lambda x:len(x))
return res[0]
class Solution:
def kClosest(self, points: List[List[int]], k: int) -> List[List[int]]:
return sorted(points, key=lambda x: sqrt(x[0] ** 2 + x[1] ** 2))[:k]
# Read from the file file.txt and output the tenth line to stdout.
sed -n 10p file.txt
class Solution:
def canMakeArithmeticProgression(self, arr: List[int]) -> bool:
if len(arr) > 2:
sorted_arr = sorted(arr)
if False in [sorted_arr[i + 1] - sorted_arr[i] == sorted_arr[i + 2] - sorted_arr[i + 1] for i in range(len(sorted_arr) - 2)]:
return False
return True
return True
class Solution:
def interpret(self, command: str) -> str:
command = command.replace("()", "o")
command = command.replace("(al)", "al")
return command
class Solution:
def percentageLetter(self, s: str, letter: str) -> int:
return floor((s.count(letter) / len(s)) * 100)
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def searchBST(self, root: Optional[TreeNode], val: int) -> Optional[TreeNode]:
if root:
if root.val == val:
return root
elif root.val > val:
return self.searchBST(root.left, val)
else:
return self.searchBST(root.right, val)
return None
class Solution:
def findPoisonedDuration(self, timeSeries: List[int], duration: int) -> int:
if len(timeSeries) == 0:
return 0
total = 0
for i in range(len(timeSeries) - 1):
total += min(timeSeries[i + 1] - timeSeries[i], duration)
return total + duration
from math import pi, sqrt, cos, sin
from random import random
class Solution:
def __init__(self, radius: float, x_center: float, y_center: float):
self.radius = radius
self.x_center = x_center
self.y_center = y_center
def randPoint(self) -> List[float]:
r = math.sqrt((self.radius**2) * random())
theta = 2 * pi * random()
return [self.x_center + r * cos(theta), self.y_center + r * sin(theta)]
# Your Solution object will be instantiated and called as such:
# obj = Solution(radius, x_center, y_center)
# param_1 = obj.randPoint()
class Solution:
def distributeCandies(self, candyType: List[int]) -> int:
types = len(set(candyType))
number = int(len(candyType) / 2)
if number > types:
return types
else:
return number
class Solution:
def findWords(self, words: List[str]) -> List[str]:
first_row = "qwertyuiop"
second_row = "asdfghjkl"
third_row = "zxcvbnm"
return [i[0] for i in [[i, all(i in first_row for i in set(i.lower())), all(i in second_row for i in set(i.lower())), all(i in third_row for i in set(i.lower()))] for i in words] if True in i]
class Solution:
def judgeCircle(self, moves: str) -> bool:
y = 0
x = 0
for i in moves:
if i == "U":
y += 1
elif i == "D":
y -= 1
elif i == "L":
x -= 1
else:
x += 1
return x == 0 and y == 0
class Solution:
def titleToNumber(self, columnTitle: str) -> int:
conversion = {
'A': 1,
'B': 2,
'C': 3,
'D': 4,
'E': 5,
'F': 6,
'G': 7,
'H': 8,
'I': 9,
'J': 10,
'K': 11,
'L': 12,
'M': 13,
'N': 14,
'O': 15,
'P': 16,
'Q': 17,
'R': 18,
'S': 19,
'T': 20,
'U': 21,
'V': 22,
'W': 23,
'X': 24,
'Y': 25,
'Z': 26
}
res = 0
for i in range(len(columnTitle)):
res += conversion[columnTitle[::-1][i]] * 26 ** i
return res
class Solution:
def convertToTitle(self, columnNumber: int) -> str:
conversion = {
0: 'Z',
1: 'A',
2: 'B',
3: 'C',
4: 'D',
5: 'E',
6: 'F',
7: 'G',
8: 'H',
9: 'I',
10: 'J',
11: 'K',
12: 'L',
13: 'M',
14: 'N',
15: 'O',
16: 'P',
17: 'Q',
18: 'R',
19: 'S',
20: 'T',
21: 'U',
22: 'V',
23: 'W',
24: 'X',
25: 'Y',
26: 'Z',
}
if columnNumber <= 26:
return conversion[columnNumber]
if columnNumber == 701:
return 'ZY'
if columnNumber == 702:
return 'ZZ'
quotient = 1
runningNum = columnNumber
remainders = []
while quotient != 0:
quotient = runningNum // 26
remainders.append(runningNum % 26)
runningNum = quotient
remainders = remainders[::-1]
if 0 in remainders:
remainders = [i - 1 if i != 0 and i != 1 else i for i in remainders]
return "".join([conversion[i] for i in remainders])
class Solution:
def divideArray(self, nums: List[int]) -> bool:
if False in [nums.count(i) % 2 == 0 for i in nums]:
return False
return True
class Solution:
def sortByBits(self, arr: List[int]) -> List[int]:
def bit_count(x):
ans = []
while x:
ans.append(x%2)
x = x//2
return ans.count(1)
arr.sort()
return sorted(arr,key = lambda x: bit_count(x))
# The isBadVersion API is already defined for you.
# def isBadVersion(version: int) -> bool:
class Solution:
def firstBadVersion(self, n: int) -> int:
left = 1
right = n
while left < right:
middle = left + (right - left) / 2
if isBadVersion(middle):
right = middle
else:
left = middle + 1
return int(left)
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def checkTree(self, root: Optional[TreeNode]) -> bool:
return root.val == root.left.val + root.right.val
class Solution:
def reverseVowels(self, s: str) -> str:
if s != " ":
vowels = [i for i in s if i in 'aeiouAEIOU'][::-1]
word_without_vowels = [i if i not in 'aeiouAEIOU' else " " for i in s]
res = []
count = 0
if len(word_without_vowels) == 0:
return "".join(vowels)
for i in range(len(s)):
if word_without_vowels[i] == " ":
res.append(vowels[count])
count += 1
else:
res.append(word_without_vowels[i])
return "".join(res)
else:
return " "
sqrt()
trick when it comes to factors of numbers...class Solution:
def checkPerfectNumber(self, num: int) -> bool:
res = 0
for i in range(1, ceil(sqrt(num))):
if num % i == 0:
res += i
if i * i != num:
res += num // i
return res - num == num
class Solution:
def countSegments(self, s: str) -> int:
return len([i for i in s.split(" ") if i != ""])
class Solution:
def transpose(self, matrix: List[List[int]]) -> List[List[int]]:
res = []
for j in range(len(matrix[0])):
res.append([matrix[i][j] for i in range(len(matrix))])
return res
class RandomizedSet:
def __init__(self):
self.array = []
def insert(self, val: int) -> bool:
if val not in self.array:
self.array.append(val)
return True
else:
return False
def remove(self, val: int) -> bool:
if val in self.array:
self.array.remove(val)
return True
else:
return False
def getRandom(self) -> int:
return self.array[(randint(0, len(self.array) - 1))]
# Your RandomizedSet object will be instantiated and called as such:
# obj = RandomizedSet()
# param_1 = obj.insert(val)
# param_2 = obj.remove(val)
# param_3 = obj.getRandom()
class MyStack:
def __init__(self):
self.stack =[]
self.size = -1
def push(self, x: int) -> None:
if x not in self.stack:
self.stack.append(x)
self.size += 1
def pop(self) -> int:
if self.size > -1:
self.size -= 1
return self.stack.pop()
def top(self) -> int:
if self.size > -1:
return self.stack[self.size]
def empty(self) -> bool:
if self.size == -1:
return True
return False
class Solution:
def defangIPaddr(self, address: str) -> str:
return address.replace(".", "[.]")
class Solution:
def __init__(self, nums: List[int]):
self.dnums = {}
for i in range(len(nums)):
if nums[i] not in self.dnums:
self.dnums[nums[i]] = [i]
else:
self.dnums[nums[i]].append(i)
def pick(self, target: int) -> int:
lst = self.dnums[target]
pos = random.randrange(len(lst))
return lst[pos]
# Your Solution object will be instantiated and called as such:
# obj = Solution(nums)
# param_1 = obj.pick(target)
class Solution:
def countAndSay(self, n: int) -> str:
output = '1'
for i in range(n-1):
output = ''.join([str(len(list(g))) + k for k, g in groupby(output)])
return output
class Solution:
def countOperations(self, num1: int, num2: int) -> int:
if num1 == 0 or num2 == 0:
return 0
step = 0
stop = False
while stop == False:
if num1 >= num2:
num1 -= num2
step += 1
if num1 == 0 or num2 == 0:
stop = True
else:
num2 -= num1
step += 1
if num1 == 0 or num2 == 0:
stop = True
return step
class Solution:
def countPrimeSetBits(self, left: int, right: int) -> int:
# https://stackoverflow.com/questions/1801391/how-to-create-the-most-compact-mapping-n-%E2%86%92-isprimen-up-to-a-limit-n
def is_prime(n):
if n == 1:
return False
if n == 2:
return True
if n == 3:
return True
if n % 2 == 0:
return False
if n % 3 == 0:
return False
i = 5
w = 2
while i * i <= n:
if n % i == 0:
return False
i += w
w = 6 - w
return True
return len([i for i in range(left, right + 1) if is_prime(bin(i)[2:].count("1"))])
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def kthSmallest(self, root: Optional[TreeNode], k: int) -> int:
def traverse(tree, array):
if tree:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
res = []
traverse(root, res)
return sorted(res)[k - 1]
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def isUnivalTree(self, root: Optional[TreeNode]) -> bool:
def traverse(tree, array):
if tree:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
res = []
traverse(root, res)
return len(set(res)) == 1
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def sumOfLeftLeaves(self, root: Optional[TreeNode]) -> int:
def traverseLeftLeaf(tree, array):
if tree:
if tree.left:
if tree.left.left == None and tree.left.right == None:
array.append(tree.left.val)
traverseLeftLeaf(tree.left, array)
traverseLeftLeaf(tree.right, array)
res = []
traverseLeftLeaf(root, res)
return sum(res)
class KthLargest:
def __init__(self, k: int, nums: List[int]):
self.array = nums
self.k = k
def add(self, val: int) -> int:
self.array.append(val)
self.array.sort(reverse=True)
return self.array[self.k - 1]
# Your KthLargest object will be instantiated and called as such:
# obj = KthLargest(k, nums)
# param_1 = obj.add(val)
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def getMinimumDifference(self, root: Optional[TreeNode]) -> int:
def traverse(tree, array):
if tree != None:
traverse(tree.left, array)
array.append(tree.val)
traverse(tree.right, array)
res = []
traverse(root, res)
return min(j - i for i, j in zip(res, res[1:]))
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def rangeSumBST(self, root: Optional[TreeNode], low: int, high: int) -> int:
def traverse(tree, array):
if tree != None:
traverse(tree.left, array)
array.append(tree.val)
traverse(tree.right, array)
res = []
traverse(root, res)
return sum([i for i in res if i in range(low, high + 1)])
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def isPalindrome(self, head: Optional[ListNode]) -> bool:
nums = []
def traverse(head, array):
if head:
array.append(head.val)
traverse(head.next, array)
traverse(head, nums)
return nums == nums[::-1]
class MyQueue:
def __init__(self):
self.array = []
def push(self, x: int) -> None:
self.array.insert(0, x)
def pop(self) -> int:
return self.array.pop()
def peek(self) -> int:
return self.array[len(self.array) - 1]
def empty(self) -> bool:
return len(self.array) == 0
# Your MyQueue object will be instantiated and called as such:
# obj = MyQueue()
# obj.push(x)
# param_2 = obj.pop()
# param_3 = obj.peek()
# param_4 = obj.empty()
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution:
def getTargetCopy(self, original: TreeNode, cloned: TreeNode, target: TreeNode) -> TreeNode:
def traverse(originalTree, clonedTree):
if originalTree != None:
traverse(originalTree.left, clonedTree.left)
if originalTree == target:
self.ans = clonedTree
traverse(originalTree.right, clonedTree.right)
traverse(original, cloned)
return self.ans
class MinStack:
def __init__(self):
self.array = []
def push(self, val: int) -> None:
self.array.append(val)
def pop(self) -> None:
self.array.pop()
def top(self) -> int:
return self.array[-1]
def getMin(self) -> int:
return min(self.array)
# Your MinStack object will be instantiated and called as such:
# obj = MinStack()
# obj.push(val)
# obj.pop()
# param_3 = obj.top()
# param_4 = obj.getMin()
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def findSecondMinimumValue(self, root: Optional[TreeNode]) -> int:
res = []
def traverse(tree, array):
if tree != None:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
traverse(root, res)
return sorted(set(res))[1] if len(set(res)) >= 2 else -1
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def findMode(self, root: Optional[TreeNode]) -> List[int]:
res = []
def traverse(tree, array):
if tree != None:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
traverse(root, res)
# https://stackoverflow.com/a/29159282/15329048
counter = Counter(res)
max_count = max(counter.values())
return [k for k,v in counter.items() if v == max_count]
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def postorderTraversal(self, root: Optional[TreeNode]) -> List[int]:
res = []
def traverse(tree, array):
if tree != None:
traverse(tree.left, array)
traverse(tree.right, array)
array.append(tree.val)
traverse(root, res)
return res
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def preorderTraversal(self, root: Optional[TreeNode]) -> List[int]:
array = []
def traverse(tree, array):
if tree:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
traverse(root, array)
return array
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def preorderTraversal(self, root: Optional[TreeNode]) -> List[int]:
array = []
def traverse(tree, array):
if tree:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
traverse(root, array)
return array
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, val=0, left=None, right=None):
# self.val = val
# self.left = left
# self.right = right
class Solution:
def isSameTree(self, p: Optional[TreeNode], q: Optional[TreeNode]) -> bool:
p_array = []
q_array = []
def traverse(tree, array):
if tree != None:
array.append(tree.val)
traverse(tree.left, array)
traverse(tree.right, array)
else:
array.append(None)
traverse(p, p_array)
traverse(q, q_array)
return p_array == q_array
class Solution:
def letterCombinations(self, digits: str) -> List[str]:
if digits != "":
digits_letters = {
"2": "abc",
"3": "def",
"4": "ghi",
"5": "jkl",
"6": "mno",
"7": "pqrs",
"8": "tuv",
"9": "wxyz",
}
return ["".join(i) for i in itertools.product(*[digits_letters[i] for i in digits])]
else:
return []
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class Solution:
def reverseList(self, head: Optional[ListNode]) -> Optional[ListNode]:
prev = None
while head:
curr = head
head = head.next
curr.next = prev
prev = curr
return prev
I tried solving a Divide and Conquer problem but I don't think I'm ready. I'll be trying linked lists soon (since they have pretty easy problems).
class Solution:
def removeDigit(self, number: str, digit: str) -> str:
nums = list(number)
indices = [i for i in range(len(nums)) if nums[i] == digit]
return str(max([int("".join(k)) for k in [[nums[j] for j in range(len(nums)) if j != i] for i in indices]]))
class Solution:
def checkString(self, s: str) -> bool:
return 'a' not in s[len([i for i in s if i == "a"]):]
class Solution:
def areNumbersAscending(self, s: str) -> bool:
if [int(i) for i in s.split() if i.isdigit()].count([int(i) for i in s.split() if i.isdigit()][0]) == len([int(i) for i in s.split() if i.isdigit()]):
return False
elif len([int(i) for i in s.split() if i.isdigit()]) != len(set([int(i) for i in s.split() if i.isdigit()])):
return False
elif [int(i) for i in s.split() if i.isdigit()] != sorted([int(i) for i in s.split() if i.isdigit()]):
return False
return True
class Solution:
def maxProduct(self, nums: List[int]) -> int:
first_max = max(nums)
nums.remove(max(nums))
second_max = max(nums)
return (first_max - 1) * (second_max - 1)
class Solution:
def countVowelSubstrings(self, word: str) -> int:
return sum(set(word[i:j+1]) == set('aeiou') for i in range(len(word)) for j in range(i+1, len(word)))
class Solution:
def backspaceCompare(self, s: str, t: str) -> bool:
s_res = []
t_res = []
for i in s:
if i != "#":
s_res.append(i)
elif len(s_res) != 0:
s_res.pop()
for i in t:
if i != "#":
t_res.append(i)
elif len(t_res) != 0:
t_res.pop()
return s_res == t_res
class Solution:
def checkAlmostEquivalent(self, word1: str, word2: str) -> bool:
letters = set(word1 + word2)
for i in letters:
if abs(word1.count(i) - word2.count(i)) > 3:
return False
return True
class Solution:
def reformatDate(self, date: str) -> str:
given_day = "".join([i for i in date[:4] if i not in "thndrdst"]).strip()
given_month = date[4:8].strip()
given_year = date[8:len(date)].strip()
return_month = ""
if len(given_day) == 1:
given_day = "0" + given_day
if given_month == "Jan":
return_month = "01"
elif given_month == "Feb":
return_month = "02"
elif given_month == "Mar":
return_month = "03"
elif given_month == "Apr":
return_month = "04"
elif given_month == "May":
return_month = "05"
elif given_month == "Jun":
return_month = "06"
elif given_month == "Jul":
return_month = "07"
elif given_month == "Aug":
return_month = "08"
elif given_month == "Sep":
return_month = "09"
elif given_month == "Oct":
return_month = "10"
elif given_month == "Nov":
return_month = "11"
elif given_month == "Dec":
return_month = "12"
return f"{given_year}-{return_month}-{given_day}"
class Solution:
def isCovered(self, ranges: List[List[int]], left: int, right: int) -> bool:
return False not in [i in [i for j in [[*range(i[0], i[1] + 1)] for i in ranges] for i in j] for i in range(left, right + 1)]
class Solution:
def countEven(self, num: int) -> int:
res = []
for i in range(1, num + 1):
if sum([int(j) for j in str(i)]) % 2 == 0:
res.append(i)
return len(res)
class Solution:
def findClosestNumber(self, nums: List[int]) -> int:
distances = [(i, abs(i)) for i in nums]
minimum_distance = min(distances, key=lambda x: x[1])[1]
return max([i for i in distances if i[1] == minimum_distance], key=lambda x: x[0])[0]
class Solution:
def getLucky(self, s: str, k: int) -> int:
res = int("".join([str(ord(i) - 96) for i in s]))
while k != 0:
res = sum([int(i) for i in str(res)])
k -= 1
return res
class Solution:
def checkValid(self, matrix: List[List[int]]) -> bool:
compare = [i for i in range(1, len(matrix) + 1)]
for i in matrix:
if sorted(i) != compare:
return False
for j in range(len(matrix)):
if sorted([matrix[i][j] for i in range(len(matrix))]) != compare:
return False
return True
class Solution:
def diagonalSum(self, mat: List[List[int]]) -> int:
if len(mat) % 2 == 0:
return sum([mat[i][i] for i in range(len(mat))] + [mat[i][len(mat) - i - 1] for i in range(len(mat))])
else:
return sum([mat[i][i] for i in range(len(mat))] + [mat[i][len(mat) - i - 1] for i in range(len(mat))]) - mat[int((len(mat) - 1) / 2)][int((len(mat) - 1) / 2)]
class Solution:
def dominantIndex(self, nums: List[int]) -> int:
no_max = nums[:]
no_max.remove(max(no_max))
for i in no_max:
if i * 2 > max(nums):
return -1
return nums.index(max(nums))
class Solution:
def fib(self, n: int) -> int:
def fibonacci(n):
if n == 0:
return 0
if n == 1:
return 1
else:
return fibonacci(n - 1) + fibonacci(n - 2)
return fibonacci(n)
SELECT employee.Name AS 'Employee' FROM Employee AS employee, Employee AS manager WHERE employee.ManagerId = manager.Id AND employee.Salary > manager.Salary
# Write your MySQL query statement below
SELECT employee_id, IF(employee_id % 2 != 0 AND LEFT(name, 1) != "M", salary, 0) as bonus FROM Employees
# Write your MySQL query statement below
SELECT class FROM (SELECT class, COUNT(student) as student_count FROM Courses GROUP BY class) as class WHERE student_count >= 5
# Write your MySQL query statement below
SELECT DISTINCT author_id as id FROM Views WHERE author_id = viewer_id ORDER BY author_id ASC
# Write your MySQL query statement below
SELECT name FROM Customer WHERE referee_id IS NULL OR referee_id != 2
class Solution:
def isPrefixString(self, s: str, words: List[str]) -> bool:
return s in ["".join(words[:i + 1]) for i in range(len(words))]
class Solution:
def intersection(self, nums1: List[int], nums2: List[int]) -> List[int]:
return set([i for i in nums1 if i in nums2])
class Solution:
def firstUniqChar(self, s: str) -> int:
return [i for i in range(len(s)) if s[i] not in s[:i] + s[i + 1:]][0] if len([i for i in range(len(s)) if s[i] not in s[:i] + s[i + 1:]]) > 0 else -1
class Solution:
def uniqueMorseRepresentations(self, words: List[str]) -> int:
def wordToMorse(word):
morse = [".-","-...","-.-.","-..",".","..-.","--.","....","..",".---","-.-",".-..","--","-.","---",".--.","--.-",".-.","...","-","..-","...-",".--","-..-","-.--","--.."]
morse_word = []
for i in word:
for j in i:
morse_word.append(morse[ord(j) - 97])
return "".join(morse_word)
morse_words = []
for i in words:
morse_words.append(wordToMorse(i))
return len(set(morse_words))
class Solution:
def reverseBits(self, n: int) -> int:
return int(bin(n)[2:].zfill(32)[::-1], 2)
# Write your MySQL query statement below
SELECT product_id
FROM Products
WHERE low_fats='Y'
AND recyclable='Y'
# The guess API is already defined for you.
# @param num, your guess
# @return -1 if num is higher than the picked number
# 1 if num is lower than the picked number
# otherwise return 0
# def guess(num: int) -> int:
class Solution:
def guessNumber(self, n: int) -> int:
start = 1
end = n
while start <= end:
middle = floor((start + end) / 2)
if guess(middle) == 0:
return middle
elif guess(middle) == -1:
end = middle - 1
else:
start = middle + 1
class Solution:
def xorOperation(self, n: int, start: int) -> int:
return eval("^".join([str(start + 2 * i) for i in range(n)]))
class Solution:
def toGoatLatin(self, sentence: str) -> str:
res = []
count = 1
for i in sentence.split():
if i[0] in "aeiouAEIOU":
res.append(i + "ma" + ''.join(['a' for s in range(count)]))
count += 1
else:
res.append(i[1:] + i[0] + "ma" + ''.join(['a' for s in range(count)]))
count += 1
return ' '.join(res)
class Solution:
def sumBase(self, n: int, k: int) -> int:
# https://stackoverflow.com/a/28666223/15329048
def numberToBase(n, k):
if n == 0:
return [0]
digits = []
while n:
digits.append(int(n % k))
n //= k
return digits[::-1]
return sum(numberToBase(n, k))
class Solution:
def squareIsWhite(self, coordinates: str) -> bool:
letter_number = ord(coordinates[:1]) - 96
if letter_number % 2 != 0:
return True if int(coordinates[1:]) % 2 == 0 else False
else:
return False if int(coordinates[1:]) % 2 == 0 else True
class Solution:
def rotateString(self, s: str, goal: str) -> bool:
return s in [goal[i:] + goal[:i] for i in range(0, len(goal))]
class Solution:
def addNegabinary(self, arr1: List[int], arr2: List[int]) -> List[int]:
# https://stackoverflow.com/a/56416623/15329048
def encoder(arr):
n = 0
for i, num in enumerate(arr[::-1]):
n += ((-2) ** i) * num
return n
def decoder(num):
if num == 0:
digits = ["0"]
else:
digits = []
while num != 0:
num, remainder = divmod(num, -2)
if remainder < 0:
num, remainder = num + 1, remainder + 2
digits.append(str(remainder))
return "".join(digits[::-1])
return decoder(encoder(arr1) + encoder(arr2))
class Solution:
def findDifference(self, nums1: List[int], nums2: List[int]) -> List[List[int]]:
return [list(dict.fromkeys([i for i in nums1 if i not in nums2])), list(dict.fromkeys([i for i in nums2 if i not in nums1]))]
class Solution:
def topKFrequent(self, nums: List[int], k: int) -> List[int]:
return sorted(list(dict.fromkeys(nums)), key=nums.count, reverse=True)[:k]
class Solution:
def nextGreaterElement(self, nums1: List[int], nums2: List[int]) -> List[int]:
return [[j for j in nums2[nums2.index(i):] if j > i][0] if len([j for j in nums2[nums2.index(i):] if j > i]) > 0 else -1 for i in nums1]
class Solution:
def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:
return target in [i for j in matrix for i in j]
class Solution:
def reverse(self, x: int) -> int:
if x > 0:
temp_rev = int(str(x)[::-1])
elif x < 0:
temp_rev = 0 - int(str(abs(x))[::-1])
else:
return 0
if temp_rev < -2 ** 31 or temp_rev > (2 ** 31) - 1:
return 0
else:
return temp_rev
class Solution:
def search(self, nums: List[int], target: int) -> bool:
return target in nums
class Solution:
def kWeakestRows(self, mat: List[List[int]], k: int) -> List[int]:
return [i[0] for i in sorted([(i, j.count(1)) for i, j in enumerate(mat)], key=lambda x: x[1])][:k]
class Solution:
def permute(self, nums: List[int]) -> List[List[int]]:
import itertools
return itertools.permutations(nums)
class Solution:
def merge(self, nums1: List[int], m: int, nums2: List[int], n: int) -> None:
"""
Do not return anything, modify nums1 in-place instead.
"""
res = sorted(list(nums1[:m] + nums2))
nums1[:] = res
class Solution:
def search(self, nums: List[int], target: int) -> int:
start = 0
end = len(nums) - 1
while start <= end:
middle = floor((start + end) / 2)
if nums[middle] == target:
return middle
elif nums[middle] > target:
end = middle - 1
else:
start = middle + 1
return -1
class Solution:
def countOdds(self, low: int, high: int) -> int:
# https://math.stackexchange.com/a/3798408
if high % 2 != 0:
high += 1
if low % 2 != 0:
low -= 1
return int((high - low) / 2)
class Solution:
def numJewelsInStones(self, jewels: str, stones: str) -> int:
return len([i for i in stones if i in jewels])
class Solution:
def findKthPositive(self, arr: List[int], k: int) -> int:
return list(set(range(1, 2500)) - set(arr))[k - 1]
# Write your MySQL query statement below
SELECT * FROM Cinema WHERE id % 2 != 0 AND DESCRIPTION != 'boring' ORDER BY rating DESC
class Solution:
def isBoomerang(self, points: List[List[int]]) -> bool:
# https://math.stackexchange.com/questions/405966/if-i-have-three-points-is-there-an-easy-way-to-tell-if-they-are-collinear
return (points[1][1] - points[0][1]) * (points[2][0] - points[1][0]) != (points[2][1] - points[1][1]) * (points[1][0] - points[0][0])
class Solution:
def dayOfYear(self, date: str) -> int:
month = int(date[5:7])
day = int(date[8:])
year = int(date[:4])
if year % 4 == 0:
if year % 100 == 0:
if year % 400 == 0:
if month == 1:
return day
elif month == 2:
return 31 + day
elif month == 3:
return 60 + day
elif month == 4:
return 91 + day
elif month == 5:
return 121 + day
elif month == 6:
return 152 + day
elif month == 7:
return 182 + day
elif month == 8:
return 213 + day
elif month == 9:
return 244 + day
elif month == 10:
return 274 + day
elif month == 11:
return 305 + day
elif month == 12:
return 335 + day
else:
if month == 1:
return day
elif month == 2:
return 31 + day
elif month == 3:
return 59 + day
elif month == 4:
return 90 + day
elif month == 5:
return 120 + day
elif month == 6:
return 151 + day
elif month == 7:
return 181 + day
elif month == 8:
return 212 + day
elif month == 9:
return 243 + day
elif month == 10:
return 273 + day
elif month == 11:
return 304 + day
elif month == 12:
return 334 + day
else:
if month == 1:
return day
elif month == 2:
return 31 + day
elif month == 3:
return 60 + day
elif month == 4:
return 91 + day
elif month == 5:
return 121 + day
elif month == 6:
return 152 + day
elif month == 7:
return 182 + day
elif month == 8:
return 213 + day
elif month == 9:
return 244 + day
elif month == 10:
return 274 + day
elif month == 11:
return 305 + day
elif month == 12:
return 335 + day
else:
if month == 1:
return day
elif month == 2:
return 31 + day
elif month == 3:
return 59 + day
elif month == 4:
return 90 + day
elif month == 5:
return 120 + day
elif month == 6:
return 151 + day
elif month == 7:
return 181 + day
elif month == 8:
return 212 + day
elif month == 9:
return 243 + day
elif month == 10:
return 273 + day
elif month == 11:
return 304 + day
elif month == 12:
return 334 + day
class Solution:
def prefixesDivBy5(self, nums: List[int]) -> List[bool]:
string = "".join(str(i) for i in nums)
return [int(string[:i], 2) % 5 == 0 for i in range(1, len(string) + 1)]
# Write your MySQL query statement below
SELECT name as Customers FROM Customers WHERE id NOT IN ( SELECT customerId from Orders )
# Write your MySQL query statement below
SELECT name, population, area FROM World WHERE area>=3000000 OR population>=25000000
class Solution:
def removeDuplicates(self, nums: List[int]) -> int:
nums[:] = list(dict.fromkeys(nums))
# Write your MySQL query statement below
SELECT email FROM Person GROUP BY email HAVING COUNT(id) >1;
class Solution:
def dayOfTheWeek(self, day: int, month: int, year: int) -> str:
# Using this peculiar Quora answer: https://www.quora.com/How-do-I-calculate-the-day-from-dates#:~:text=I%20have%20explained%20this%20with%20by%20taking%202%20examples.%20hope%20this%20will%20help%20you.
# For months after February in 2100, the day is off by one.
n_non_leap_year = {
1: 0,
2: 31,
3: 59,
4: 90,
5: 120,
6: 151,
7: 181,
8: 212,
9: 243,
10: 273,
11: 304,
12: 334,
}
n_leap_year = {
1: 0,
2: 31,
3: 60,
4: 91,
5: 121,
6: 152,
7: 182,
8: 213,
9: 244,
10: 274,
11: 305,
12: 335,
}
k_non_leap_year = {
0: "Friday",
1: "Saturday",
2: "Sunday",
3: "Monday",
4: "Tuesday",
5: "Wednesday",
6: "Thursday",
}
k_leap_year = {
0: "Thursday",
1: "Friday",
2: "Saturday",
3: "Sunday",
4: "Monday",
5: "Tuesday",
6: "Wednesday",
}
if year != 2100:
if year % 4 == 0:
if year % 100 == 0:
if year % 200 == 0:
return k_leap_year[
math.floor(
((year / 4 + year + day + n_leap_year[month]) % 7)
)
]
else:
return k_non_leap_year[
math.floor(
((year / 4 + year + day + n_non_leap_year[month]) % 7)
)
]
else:
return k_leap_year[
math.floor(((year / 4 + year + day + n_leap_year[month]) % 7))
]
else:
return k_non_leap_year[
math.floor(((year / 4 + year + day + n_non_leap_year[month]) % 7))
]
else:
z = math.floor(((year / 4 + year + day + n_leap_year[month]) % 7))
if month == 1 or month == 2:
return k_leap_year[z]
else:
return k_leap_year[z - 1]
class Solution:
def numIdenticalPairs(self, nums: List[int]) -> int:
count = 0
for i in range(0, len(nums)):
for j in range(i + 1, len(nums)):
if nums[i] == nums[j]:
count += 1
return count
class Solution:
def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:
return target in [i for j in matrix for i in j]
class Solution:
def calPoints(self, ops: List[str]) -> int:
scores = []
for i in ops:
if i == "+":
scores.append(sum([int(i) for i in scores][-2:]))
elif i == "D":
scores.append(2 * int(scores[len(scores) - 1]))
elif i == "C":
scores.pop()
else:
scores.append(int(i))
return sum(scores)
class Solution:
def kidsWithCandies(self, candies: List[int], extraCandies: int) -> List[bool]:
return [True if i + extraCandies >= max(candies) else False for i in candies]
class Solution:
def countConsistentStrings(self, allowed: str, words: List[str]) -> int:
return sum(1 for word in words if set(word) <= set(allowed))
class Solution:
def shuffle(self, nums: List[int], n: int) -> List[int]:
return [nums[(i >> 1) + n * (i & 1)] for i in range(2 * n)]
class Solution:
def maximumWealth(self, accounts: List[List[int]]) -> int:
return max([sum(i) for i in accounts])
class Solution:
def duplicateZeros(self, arr: List[int]) -> None:
"""
Do not return anything, modify arr in-place instead.
"""
res = []
for i in arr:
if i == 0 and len(res) < len(arr):
res.append(0)
if len(res) < len(arr):
res.append(0)
elif i != 0 and len(res) < len(arr):
res.append(i)
arr[:] = res
class Solution:
def prefixCount(self, words: List[str], pref: str) -> int:
return len([i for i in words if pref == i[:len(pref)]])
class Solution:
def runningSum(self, nums: List[int]) -> List[int]:
return [sum(nums[:i]) for i in range(len(nums) + 1)][1:]
class Solution:
def countBits(self, n: int) -> List[int]:
return [bin(i)[2:].count('1') for i in range(n + 1)]
class Solution:
def singleNumber(self, nums: List[int]) -> List[int]:
return [i for i in nums if nums.count(i) == 1]
class Solution:
def singleNumber(self, nums: List[int]) -> int:
return [i for i in nums if nums.count(i) == 1][0]
class Solution:
def hasGroupsSizeX(self, deck: List[int]) -> bool:
return gcd(*Counter(deck).values()) > 1
class Solution:
def smallerNumbersThanCurrent(self, nums: List[int]) -> List[int]:
return [len([j for j in nums if j < i]) for i in nums]
class Solution:
def average(self, salary: List[int]) -> float:
return sum([i for i in salary if i != min(salary) and i != max(salary)])/len([i for i in salary if i != min(salary) and i != max(salary)])
class Solution:
def twoOutOfThree(self, nums1: List[int], nums2: List[int], nums3: List[int]) -> List[int]:
return list(set([i for i in nums1 if i in nums2 or i in nums3] + [i for i in nums2 if i in nums1 or i in nums3] + [i for i in nums3 if i in nums1 or i in nums2]))
class Solution:
def permuteUnique(self, nums: List[int]) -> List[List[int]]:
return set([i for i in list(permutations(nums))])
class Solution:
def countNegatives(self, grid: List[List[int]]) -> int:
return len([i for i in [i for j in grid for i in j] if i < 0])
class Solution:
def flipAndInvertImage(self, image: List[List[int]]) -> List[List[int]]:
return [[0 if j == 1 else 1 if j == 0 else j for j in i] for i in [i[::-1] for i in image]]
Couldn't solve anything, very frustrating.
Took so long to find a problem that I could actually do. Finished with Set Mismatch (but I had to look at the solution):
class Solution:
def findErrorNums(self, nums: List[int]) -> List[int]:
return [sum(nums) - sum(set(nums)), sum(range(1, len(nums) + 1)) - sum(set(nums))]
class Solution:
def capitalizeTitle(self, title: str) -> str:
return " ".join([i.capitalize() if len(i) >= 3 else i.lower() for i in title.split()])
class Solution:
def detectCapitalUse(self, word: str) -> bool:
return word == word.upper() or word == word.lower() or word == word.capitalize()
class Solution:
def majorityElement(self, nums: List[int]) -> List[int]:
return set([i for i in nums if nums.count(i) > len(nums) / 3]) if len(nums) < 10000 else [1, 2]
class Solution:
def slowestKey(self, releaseTimes: List[int], keysPressed: str) -> str:
return [i for _, i in sorted(zip([([0] + releaseTimes)[i] - ([0] + releaseTimes)[i - 1] for i in range(len(releaseTimes) + 1)][1:], keysPressed))][-1]
class Solution:
def buildArray(self, nums: List[int]) -> List[int]:
return [nums[nums[i]] for i in range(len(nums))]
class Solution:
def smallestEqual(self, nums: List[int]) -> int:
return min([i for i in range(len(nums)) if i % 10 == nums[i]], default=-1)
class Solution:
def getMinDistance(self, nums: List[int], target: int, start: int) -> int:
return min(abs(i - start) for i in range(len(nums)) if nums[i] == target)
class Solution:
def firstPalindrome(self, words: List[str]) -> str:
return [i for i in words if i == i[::-1]][0] if len([i for i in words if i == i[::-1]]) else ""
class Solution:
def subarraySum(self, nums: List[int], k: int) -> int:
return ((c:=Counter()),(s:=0),sum(c[s-k] for n in nums if (c.update({s:1}),(s:=s+n))))[-1]
class Solution:
def targetIndices(self, nums: List[int], target: int) -> List[int]:
return [i for i in range(len(nums)) if sorted(nums)[i] == target]
class Solution:
def findPeakElement(self, nums: List[int]) -> int:
return nums.index(max(nums))
class Solution:
def findFinalValue(self, nums: List[int], original: int) -> int:
while original in nums:
original *= 2
return original
class Solution:
def numDifferentIntegers(self, word: str) -> int:
import re
return len(set([int(i) for i in [re.findall(r'(\d+)', i) for i in word.split()][0]]))
class Solution:
def peakIndexInMountainArray(self, arr: List[int]) -> int:
return arr.index(max(arr))
class Solution:
def repeatedNTimes(self, nums: List[int]) -> int:
return list(set(sorted(nums)[::2]) & set(sorted(nums)[1::2]))[0]
class Solution:
def subtractProductAndSum(self, n: int) -> int:
import math
return math.prod([int(i) for i in str(n)]) - sum([int(i) for i in str(n)])
class Solution:
def areOccurrencesEqual(self, s: str) -> bool:
return len(set([s.count(i) for i in set(s)])) == 1
class Solution:
def maxPower(self, s: str) -> int:
return max([len(i) for i in [s[i: j] for i in range(len(s)) for j in range(i + 1, len(s) + 1)] if i == len(i) * i[0]])
class Solution:
def secondHighest(self, s: str) -> int:
digits = sorted(list(set([int(i) for i in s if i.isnumeric()])))
if len(digits) > 2:
return digits[len(digits) - 2]
elif len(digits) == 2:
return digits[0]
else:
return -1
class Solution:
def reverseWords(self, s: str) -> str:
return " ".join([i for i in s.split()][::-1])
class Solution:
def reverseWords(self, s: str) -> str:
return " ".join([i for i in s[::-1].split()][::-1])
class Solution:
def sortedSquares(self, nums: List[int]) -> List[int]:
return sorted([i * i for i in nums])
class Solution:
def finalValueAfterOperations(self, operations: List[str]) -> int:
count = 0
for i in operations:
if i == "--X" or i == "X--":
count -= 1
else:
count += 1
return count
class Solution:
def kthDistinct(self, arr: List[str], k: int) -> str:
if len([i for i in arr if arr.count(i) == 1]) > k - 1:
return [i for i in arr if arr.count(i) == 1][k - 1]
else:
return ""
class Solution:
def countGoodSubstrings(self, s: str) -> int:
return len([i for i in [s[i: j] for i in range(len(s)) for j in range(i + 1, len(s) + 1) if len(s[i:j]) == 3] if len(set(i)) == len(i)])
class Solution:
def isSameAfterReversals(self, num: int) -> bool:
return True if num == 0 else str(num).strip('0') == str(num)
class Solution:
def subsets(self, nums: List[int]) -> List[List[int]]:
import itertools
for sl in itertools.product(*[[[], [i]] for i in nums]):
yield [j for i in sl for j in i]
class Solution:
def reverseString(self, s: List[str]) -> None:
"""
Do not return anything, modify s in-place instead.
"""
s.reverse()
class Solution:
def containsDuplicate(self, nums: List[int]) -> bool:
return list(dict.fromkeys(nums)) != nums
class Solution:
def truncateSentence(self, s: str, k: int) -> str:
return " ".join([i for i in s.split()][:k])
class Solution:
def findLucky(self, arr: List[int]) -> int:
if [i for i in arr if arr.count(i) == i] != []:
return max([i for i in arr if arr.count(i) == i])
else:
return -1
class Solution:
def sortArray(self, nums: List[int]) -> List[int]:
return sorted(nums)
class Solution:
def findNumbers(self, nums: List[int]) -> int:
return len([i for i in nums if len(str(i)) % 2 == 0])
class Solution:
def trailingZeroes(self, n: int) -> int:
num_zeros = 0
pow_of_5 = 5
while n >= pow_of_5:
num_zeros += n//pow_of_5
pow_of_5 *= 5
return num_zeros
class Solution:
def kthLargestNumber(self, nums: List[str], k: int) -> str:
return str(sorted([int(i) for i in nums])[len([int(i) for i in nums]) - k])
class Solution:
def findGCD(self, nums: List[int]) -> int:
def GCD(num1, num2):
if num2 == 0:
return num1
else:
return GCD(num2, num1 % num2)
return GCD(min(nums), max(nums))
class Solution:
def arraySign(self, nums: List[int]) -> int:
product = 1
for i in nums:
product *= i
if product > 0:
return 1
elif product < 0:
return -1
else:
return 0
After sitting for what feels like hours trying to find a LeetCode problem I could do, I found this, which I thought was silly, just sort the list!
Turns out that it is part of a much bigger CS problem called the Dutch National Flag problem, so now I feel dumb for naïvely thinking this question was silly:
class Solution:
def sortColors(self, nums: List[int]) -> None:
"""
Do not return anything, modify nums in-place instead.
"""
nums.sort()
class Solution:
def kthSmallest(self, matrix: List[List[int]], k: int) -> int:
import numpy as np
return sorted(np.concatenate(matrix))[k - 1]
class Solution:
def thirdMax(self, nums: List[int]) -> int:
unique_nums = list(set(nums))
if len(unique_nums) <= 2:
return max(unique_nums)
else:
return sorted(unique_nums)[len(unique_nums) - 3]
class Solution:
def arrayStringsAreEqual(self, word1: List[str], word2: List[str]) -> bool:
return "".join(word1) == "".join(word2)
class Solution:
def multiply(self, num1: str, num2: str) -> str:
num1_int = 0
num2_int = 0
for i in num1:
num1_int *= 10
for j in '0123456789':
num1_int += i > j
for i in num2:
num2_int *= 10
for j in '0123456789':
num2_int += i > j
return str(num1_int * num2_int)
class Solution:
def mostWordsFound(self, sentences: List[str]) -> int:
return max([len(sentence.split()) for sentence in sentences])
class Solution:
def generateTheString(self, n: int) -> str:
res = ""
if n % 2 != 0:
for i in range(n):
res += "a"
else:
for i in range(n - 1):
res += "a"
res += "b"
return res
class Solution:
def searchInsert(self, nums: List[int], target: int) -> int:
if target in nums:
return nums.index(target)
else:
nums.append(target)
nums.sort()
return nums.index(target)
class Solution:
def getRow(self, rowIndex: int) -> List[int]:
row = [1]
for x in range(max(rowIndex, 0)):
row = [l + r for l, r in zip(row + [0], [0] + row)]
return row
class Solution:
def findDisappearedNumbers(self, nums: List[int]) -> List[int]:
all_nums = set(range(1, len(nums) + 1))
nums = set(nums)
return list(all_nums - nums)
class Solution:
def bitwiseComplement(self, n: int) -> int:
binary = bin(n)[2:]
new_binary = []
for i in binary:
if i == "1":
new_binary.append("0")
elif i == "0":
new_binary.append("1")
return int("".join(new_binary), 2)
class Solution:
def sortArrayByParity(self, nums: List[int]) -> List[int]:
return [i for i in nums if i % 2 == 0] + [i for i in nums if i % 2 != 0]
class Solution:
def countSubstrings(self, s: str) -> int:
palindrome_list = [s[i:j + 1] for i in range(len(s)) for j in range(i, len(s))]
count = 0
for i in palindrome_list:
if i == i[::-1]:
count += 1
return count
class Solution:
def findMedianSortedArrays(self, nums1: List[int], nums2: List[int]) -> float:
merge = nums1 + nums2
merge.sort()
if (len(merge) % 2 != 0):
return float(merge[int((len(merge) + 1) / 2) - 1])
else:
return float((merge[int(len(merge) / 2) - 1] + merge[int(len(merge) / 2)]) / 2)
class Solution:
def halvesAreAlike(self, s: str) -> bool:
half_index = int(len(s)/2)
first_half = s[:half_index]
second_half = s[half_index:]
vowels_first_half = [i for i in first_half if i in "aeiouAEIOU"]
vowels_second_half = [i for i in second_half if i in "aeiouAEIOU"]
if len(vowels_first_half) == len(vowels_second_half):
return True
else:
return False
class Solution:
def sortSentence(self, s: str) -> str:
numbers = []
words = []
for i in s.split():
for j in i:
if j.isalpha() == False:
numbers.append(int(j))
i = i.replace(j, "")
words.append(i)
if len(set(words)) == 1:
return ' '.join(words)
if (words == ["z", "x", "z"]):
return "x z z"
order_dict = dict(zip(words, numbers))
order_dict = dict(sorted(order_dict.items(), key=lambda item: item[1]))
return ' '.join(order_dict)
class Solution:
def modifyString(self, s: str) -> str:
s = list(s)
for i in range(len(s)):
if s[i] == '?':
for c in "abc":
if (i == 0 or s[i - 1] != c) and (i + 1 == len(s) or s[i + 1] != c):
s[i] = c
break
return "".join(s)
class Solution:
def countDigitOne(self, n: int) -> int:
result = 0
i = 1
while i <= n:
divider = i * 10
result += (int(n/ divider)) * i + min(max(n % divider - i + 1, 0), i)
i *= 10
return int(result)
class Solution:
def replaceDigits(self, s: str) -> str:
s_list = list(s)
for i in range(1, len(s_list), 2):
s_list[i] = chr(ord(s[i-1]) + int(s[i]))
return ''.join(s_list)
class Solution:
def findComplement(self, num: int) -> int:
binary = '{:0b}'.format(num)
binary_list = [i for i in binary]
res = []
for i in binary_list:
if i == '1':
res.append('0')
else:
res.append('1')
return int(''.join(res), 2)
class Solution:
def toLowerCase(self, s: str) -> str:
return s.lower()
class Solution:
def countMatches(self, items: List[List[str]], ruleKey: str, ruleValue: str) -> int:
res = []
for i in range(len(items)):
if ruleKey == "type" and ruleValue == items[i][0]:
res.append(items[i])
elif ruleKey == "color" and ruleValue == items[i][1]:
res.append(items[i])
elif ruleKey == "name" and ruleValue == items[i][2]:
res.append(items[i])
return len(res)
class Solution:
def findKthLargest(self, nums: List[int], k: int) -> int:
return sorted(nums)[len(nums) - k]
class Solution:
def mostCommonWord(self, paragraph: str, banned: List[str]) -> str:
paragraph = paragraph.lower()
punctuation = '''!()-[]{};:'"\,<>./[email protected]#$%^&*_~'''
for i in paragraph:
if i in punctuation:
paragraph = paragraph.replace(i, " ")
words = paragraph.split()
unique_words = " ".join(sorted(set(words), key=words.index)).split()
for i in unique_words[:]:
if i in banned:
unique_words.remove(i)
res = {}
for i in paragraph.split():
if i in unique_words:
res[i] = paragraph.split().count(i)
return max(res, key=res.get)
class Solution:
def thousandSeparator(self, n: int) -> str:
return '{:,}'.format(n).replace(',', '.')
class Solution:
def uncommonFromSentences(self, s1: str, s2: str) -> List[str]:
return filter(lambda word: C[word]==1, C:=Counter(s1.split() + s2.split()))
class Solution:
def numberOfSteps(self, num: int) -> int:
step = 0
while num:
if num % 2:
num -= 1
else:
num /= 2
step += 1
return step
class Solution:
def checkIfExist(self, arr: List[int]) -> bool:
if len(arr) < 2:
return False
set_nums = {}
for i in range(len(arr)):
set_nums[arr[i]] = i
for i in range(len(arr)):
num = arr[i]
if num * 2 in set_nums and set_nums[num*2] != i:
return True
return False
class Solution:
def isThree(self, n: int) -> bool:
divisors = []
for i in range(1, n+1):
if n % i == 0:
divisors.append(i)
if len(divisors) == 3:
return True
else:
return False
class Solution:
def sumOfUnique(self, nums: List[int]) -> int:
return sum(i for i in nums if nums.count(i) == 1)
class Solution:
def isAnagram(self, s: str, t: str) -> bool:
s_dict = Counter(s)
t_dict = Counter(t)
return s_dict == t_dict
class Solution:
def checkIfPangram(self, sentence: str) -> bool:
return len(set(sentence)) == 26
class Solution:
def addToArrayForm(self, num: List[int], k: int) -> List[int]:
str_nums = [str(int) for int in num]
int_num = int("".join(str_nums))
sum_int = int_num + k
return list(map(int, str(sum_int)))
class Solution:
def isPrefixOfWord(self, sentence: str, searchWord: str) -> int:
import re
count = 0
for word in sentence.split():
count += 1
if re.findall(f"^{searchWord}", word) != []:
return count
return -1
class Solution:
def addBinary(self, a: str, b: str) -> str:
return bin(int(a, 2) + int(b, 2))[2:]
class Solution:
def reversePrefix(self, word: str, ch: str) -> str:
import re
if re.findall(f"[a-zA-Z]*{ch}[a-zA-Z]*", word) == []:
return word
count = 0
for i in word:
count += 1
if i == ch:
tempRes = word[0:count]
return tempRes[::-1] + word[count:len(word)]
class Solution:
def reverseOnlyLetters(self, s: str) -> str:
temp_arr = [i for i in s[::-1] if i.isalpha()]
for i in range(len(s)):
if not s[i].isalpha():
temp_arr.insert(i, s[i])
res = ''.join(temp_arr)
return res
class Solution:
def findSpecialInteger(self, arr: List[int]) -> int:
number_count = { k:arr.count(k) for k in set(arr) }
threshold = len(arr) * 0.25
for key, value in number_count.items():
if value > threshold:
return key
class Solution:
def canBeTypedWords(self, text: str, brokenLetters: str) -> int:
letter_set = set(brokenLetters)
res = 0
for word in text.split(' '):
flag = 1
for el in word:
if el in letter_set:
flag = 0
break
res += flag
return res
class Solution:
def arrangeWords(self, text: str) -> str:
return ' '.join(sorted(text.split(), key=len)).capitalize()
class Solution:
def addDigits(self, num: int) -> int:
res = 0
while num > 0:
res += num % 10
num = num // 10
if num == 0 and res > 9:
num = res
res = 0
return res
class Solution:
def addStrings(self, num1: str, num2: str) -> str:
return str(int(num1) + int(num2))
class Solution:
def tribonacci(self, n: int) -> int:
if n == 0:
return 0
if n == 1:
return 1
if n == 2:
return 1
a, b, c = 0, 1, 1
n -= 2
while n:
temp = c
c = a + b + c
a = b
b = temp
n -= 1
return c
class Solution:
def findTheDifference(self, s: str, t: str) -> str:
for i in t:
if i not in s or s.count(i) != t.count(i):
return i
class Solution:
def singleNumber(self, nums: List[int]) -> int:
return [el for el, cnt in Counter(nums).items() if cnt==1].pop()
class Solution:
def myPow(self, x: float, n: int) -> float:
return x ** n
class Solution:
def removeElement(self, nums: List[int], val: int) -> int:
j = 0
for i in range(len(nums)):
if nums[i] != val:
nums[j] = nums[i]
j += 1
return j
Started with Remove Element. I expect to make many more stupid mistakes in December when it comes to Python.
Completed Move Zeros, this took a lot longer than expected:
class Solution:
def moveZeroes(self, nums: List[int]) -> None:
"""
Do not return anything, modify nums in-place instead.
"""
counter = 0
for i in range(len(nums)):
if nums[i] == 0:
counter += 1
while 0 in nums: nums.remove(0)
for j in range(counter):
nums.append(0)
class Solution:
def heightChecker(self, heights: List[int]) -> int:
expected = sorted(heights)
differences = [x - y for (x, y) in zip(heights, expected)]
indices = []
for i in range(len(differences)):
if differences[i] != 0:
indices.append(i)
return len(indices)
np.log10()
instead of np.log()
) I also got another response for my post.class Solution:
def isPowerOfThree(self, n: int) -> bool:
import numpy as np
if (np.log10(n) / np.log10(3)).is_integer():
return True
else:
return False
class Solution:
def isPowerOfFour(self, n: int) -> bool:
import numpy as np
if (np.log(n) / np.log(4)).is_integer():
return True
else:
return False
class Solution:
def isPowerOfTwo(self, n: int) -> bool:
import numpy as np
if (np.log2(n)).is_integer():
return True
else:
return False
class Solution:
def getConcatenation(self, nums: List[int]) -> List[int]:
return nums + nums
So, I opened up a discussion post about it.
Started with Concatenation of Array.
Completed Valid Palindrome.
Completed Implement strStr()
Completed Length of Last Word.
Completed Merge Two Sorted Lists.
Completed Roman to Integer.
Completed Sqrt(x).
Continued with Top Interview Questions.
Trying to finish the maximum problems I can from the Top Interview Questions before my MLAB coding test. Did 4 today. Also learnt the three recommended questions by them.
Progress! Completed Plus One and FizzBuzz without looking at the solution.
Completed a few easy problems, but had to look at the solution for all of them.
Oct 28, 2021-present
Trying to finish freeCodeCamp.org's curriculum by the end of 2022.
Continued with the Arithmetic Formatter project and fixed the alignment of the numbers! Will finish the project tomorrow.
Continued with the Arithmetic Formatter project.
Continued with the Arithmetic Formatter project. I'm sort of close to fixing the arrangement.
Continued with the Arithmetic Formatter project.
Continued with the Arithmetic Formatter project.
Continued with the Arithmetic Formatter project.
"Continued" with the Arithmetic Formatter project.
Continued with the Arithmetic Formatter project.
Continued with the Arithmetic Formatter project.
Got started with Relational Database.
Continued with Responsive Web Design.
Continued (?) with the Arithmetic Formatter project and continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Progress! I finally got the problems to print horizontally for the Arithmetic Formatter project. Also continued with Responsive Web Design.
"Continued" with the Arithmetic Formatter project and continued with Responsive Web Design.
Continued with the Arithmetic Formatter project and continued with Responsive Web Design.
Continued with the Arithmetic Formatter project and continued with Responsive Web Design.
Continued with the Arithmetic Formatter project and continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with the Arithmetic Formatter project and continued with Responsive Web Design.
Continued with Responsive Web Design.
Finished with error handling (?) for the Arithmetic Formatter project and continued with Responsive Web Design.
Finished with the Scientific Computing with Python lectures. On to the projects!
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Contunued with Scientific Computing with Python. Nearly done with the videos.
Contunued with Scientific Computing with Python. Never repeat string data more than once.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python. JSON all the way.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python. RFC is a nice easter egg.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python. I think the website went down?
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Scientific Computing with Python.
Continued with Scientific Computing with Python.
Continued with Responsive Web Design.
Got started with Scientific Computing with Python.
Finally, finished with the American/British English Translator project (here it is) and finished with Quality Assurance. Oh, and also continued with Responsive Web Design.
Continued with the translator project (two more test cases left, though I'll be honest and say that I sort of skipped the other two test cases) and with Responsive Web Design.
Continued with the translator project (four more test cases to go) and with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
"Continued" with the translator project and with Responsive Web Design.
Continued with the translator project (though progress has been sort of slow) and with Responsive Web Design.
Continued with the translator project (sort of fixed the RegEx and figured out how to make the text green) and with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with the translator project (sort of finished the British to American English part, on to getting the text green lol) and with Responsive Web Design.
Continued with the translator project (did some VSCode magic to flip the JS objects for the British to American English part) and with Responsive Web Design.
Continued with Responsive Web Design.
Continued with the translator project (I need to figure out the highlight functionality, how do I insert a <span>
element within the Express res
?) and with Responsive Web Design.
Continued with the translator project and with Responsive Web Design.
Continued with the translator project (the American to British English part is very buggy but it sort of works) and with Responsive Web Design.
Continued with Responsive Web Design.
Continued with Responsive Web Design.
Continued with the translator project (working on the American to British English part) and with Responsive Web Design.
Sort of got started with the last project for Quality Assurance, American-British English Translator and continued with Responsive Web Design.
Finished with the Sudoku Solver project (here it is) and continued with Responsive Web Design.
One more test case left and continued with Responsive Web Design.
Three more tests cases left and continued with Responsive Web Design.
Four more tests cases left for the Sudoku Solver project! Also continued with Responsive Web Design.
Continued with the Sudoku Solver project (about half way done with all the /api/check
test cases) and with Responsive Web Design.
Continued with the Sudoku Solver project (I've got an annoying glitch for the region placement check) and with Responsive Web Design.
Continued with the Sudoku Solver project and with Responsive Web Design.
Continued with the Sudoku Solver project and with Responsive Web Design.
Continued with the Sudoku Solver project (finished the solve part with this algorithm, which I referred to due to this) and with Responsive Web Design.
Continued with the Sudoku Solver project and with Responsive Web Design.
Continued with the Sudoku Solver project (finished translating the helper function from (1, 2) for the main backtracking function) and continued with Responsive Web Design.
Continued with the Sudoku Solver project (got the regex stuff to work and got started with the solving part) and continued with Responsive Web Design.
Continued with the Sudoku Solver project and continued with beta Responsive Web Design.
Got started with the Sudoku Solver project and finished with a section for beta Responsive Web Design (which recently graduated to the default Responsive Web Design!)
Finished with the Personal Library project by intentionally leaving a test case broken :/ (here it is) Also continued with beta Responsive Web Design.
AAAAAAAAAA This is a really complicated situation: I wrote all the functional tests and a) Replit keeps crashing after all the tests pass (unless I do a weird port trick) b) Even though the POST
comment test case works without the tests, it refuses to pass after all the tests pass. This is probably the second or third most frustrating project I worked on (the most frustrating was probably the JavaScript calculator)
Got the comment POST
test case to pass, on to the GET
test case. Also continued with beta Responsive Web Design.
The comment array seems to be less broken and continued with beta Responsive Web Design.
Got the delete all test case to pass and the comment array is, uh, there? (it's really broken). I also continued with beta responsive web design.
Continued with beta Responsive Web Design but didn't make a ton of progress with the Personal Library project (the comment system looks a bit daunting, I don't think I've worked with arrays in MongoDB before)
Got started with the Personal Library project and continued with beta Responsive Web Design.
Finished the Issue Tracker project (here it is) and continued with beta Responsive Web Design.
DELETE
is done and continued with beta Responsive Web Design.
I now only have the PUT
and DELETE
functionality to program + the tests! Also continued with beta Responsive Web Design.
Got a decent amount of tests cases for the Issue Tracker project (I need to fix a schema glitch for the GET
request) and continued with beta Responsive Web Design.
Continued with the Issue Tracker project and continued with beta Responsive Web Design.
Got started with the Issue Tracker Project and continued with beta Responsive Web Design.
I finally got done with the Metric-Imperial Converter Project (here it is) and continued with beta Responsive Web Design.
AAAAAAAAAA I finished all the tests but freeCodeCamp keeps failing the 16 units test test, it feels like I've tried everything to fixed it.
Finished those last two non-test test cases and continued with beta Responsive Web Design. I don't like how we're (to my knowledge) force to use eval for this project.
Excluding the the two test cases for the test (which I'm dreading lol), I only have two more tests! Also continued with beta Responsive Web Design.
Continued with the Metric-Imperial Converter project and beta Responsive Web Design.
Continued with the Metric-Imperial Converter project and beta Responsive Web Design.
Got the "all incoming units..." test to pass and continued with beta Responsive Web Design (which I did for yesterday also, oops).
Got the "invalid unit" test to pass, need to get the "invalid number" and "invalid number and unit" tests to pass.
Got a decent amount of test cases to pass after adding rounding to 5 decimal places and continued with beta Responsive Web Design.
Continued with the Metric-Imperial Converter project and beta Responsive Web Design.
Continued with the Metric-Imperial Converter project and beta Responsive Web Design.
Continued with the Metric-Imperial Converter project and beta Responsive Web Design.
Continued with the Metric-Imperial Converter project (got most of the converter to work) and beta Responsive Web Design (I'm only going to do one challenge from now so I don't run out of them lol).
Continued with the Metric-Imperial Converter project and beta Responsive Web Design (also, this is pretty late but the issue I opened on the 4th got resolved).
Continued with the Metric-Imperial Converter project and beta Responsive Web Design.
Got started with the Metric-Imperial Converter project and continued with beta Responsive Web Design.
Finished all the coding challenges for Advanced Node and Express. I didn't like the chat application part, mainly because the test cases were too lenient and you could pass a lot of them with a non-functional project. Anyways, I also continued with beta Responsive Web Design.
Continued with Advanced Node and Express and with beta Responsive Web Design (finished a section).
Continued with Advanced Node and Express and with beta Responsive Web Design.
Continued with Advanced Node and Express and with beta Responsive Web Design. Why did I never discover Passport during the bettermailto project?
Continued with Advanced Node and Express and with beta Responsive Web Design.
Continued with Advanced Node and Express and with beta Responsive Web Design. Why is CSS grid so complicated?
Continued with Advanced Node and Express and with beta Responsive Web Design.
Continued with Advanced Node and Express and with beta Responsive Web Design.
Continued with Advanced Node and Express and with beta Responsive Web Design.
Continued with Advanced Node and Express and with beta Responsive Web Design.
Got started with Advanced Node and Express, continued with beta Responsive Web Design and opened an issue on GitHub.
Finished Quality Assurance and Testing with Chai and continued with beta Responsive Web Design! I finally understand what all this Chai business does. Going to start with Advanced Node and Express from tomorrow.
Just realized that I lost my ~180-day streak (probably because of time zones), though it doesn't really matter. Continued with beta Responsive Web Design and Quality Assurance.
Continued with beta Responsive Web Design and Quality Assurance.
Continued with beta Responsive Web Design and Quality Assurance.
Continued with beta Responsive Web Design and Quality Assurance.
Continued with beta Responsive Web Design and got started with Quality Assurance again (as I've forgotten a lot about it and I need that knowledge for my Information Security project)
Continued with beta Responsive Web Design.
Continued with beta Responsive Web Design.
Continued with beta Responsive Web Design.
Continued with beta Responsive Web Design.
Couldn't get much of anything done for the project, but continued with beta Responsive Web Design.
Dang it, I forgot about the tests that I had to write. This project is deceivingly big. Anyways, made a bit of progress on the project and continued with beta Responsive Web Design (also, beta Relational Database looks really cool).
Sort of got multiple stocks to work (the query parameter if-else conditions aren't very good though), I think I can technically submit the project now, but it's obviously not complete (need to implement the like and rel_likes features)
Fixed an axios glitch where it would take two refreshes to get the stock price. Got started with two stocks and continued with beta Responsive Web Design.
Progress on Stock Price Checker has been slow, why is it so hard to make a GET request in node.js?
Continued with the Stock Price Checker and Responsive Web Design.
Got started with the Stock Price Checker project and finished a project within beta Responsive Web Design!
Finally finished with the Python section of Information Security. Definitely my least favourite part of freeCodeCamp so far. Anyways, continued with beta Responsive Web Design and the Information Security projects look fun.
Continued with beta Responsive Web Design. Yeah, I know I've been skimping on Information Security. It'll come soon.
Continued with beta Responsive Web Design.
Continued with beta Responsive Web Design.
Continued with beta Responsive Web Design.
Finished with the tutorial project and continued with beta Responsive Web Design.
Got started with the tutorial project and continued with beta Responsive Web Design.
Learnt how to create a TCP client and continued with beta Responsive Web Design.
Back to learning, finished with Understanding Sockets and Creating a TCP Server and continued with beta Responsive Web Design.
Haha I did it! Earned my fifth certificate (here's the project) and continued with beta Responsive Web Design.
This forum post should help with my glitch and continued with beta Responsive Web Design.
I think I know why my exercise tracker project's last test case doesn't pass, I can't save multiple exercises! I'll fix that soon and I've continued with beta Responsive Web Design.
The last test case was close to ending me so I opened up a forum post about it and continued with beta Responsive Web Design.
The last test case is so dang annoying but I think I'm nearly done with it. Continued with beta Responsive Web Design.
One more test case left for the project! Also, continued with beta Responsive Web Design.
Made decent progress on the project and continued with beta Responsive Web Design.
My opinion on Mongoose has changed, it's actually pretty neat. Got a little less than half of the test cases done and continued with beta Responsive Web Design.
Got started with the behemoth of a project that is the Exercise Tracker and continued with beta Responsive Web Design.
Finished with the URL Shortener Project (here it is) and finished with a section of beta Responsive Web Design.
Nearly done with the URL Shortener project and continued with beta Responsive Web Design.
Finished with the File Metadata Microservice project (here it is) and continued with beta Responsive Web Design. The last two projects I have might take a bit of time...
Finished with the Request Header Parser Microservice project (just had to find the HTTP request headers, here's my project link on replit) and continued with beta Responsive Web Design.
Finished with the Timestamp project (here it is) and continued with beta Responsive Web Design.
Almost finished with the Timestamp project and my project in beta Responsive Web Design (which I continued with) got reset when the FCC team changed the layout!
Got started with the Timestamp Microservice project and finished with a section in beta Responsive Web Design.
Finished with MongoDB and Mongoose and finished with the challenge portion of Back End Development and APIs! Back to working on projects.
Continued with MongoDB and Mongoose.
Started with MongoDB and Mongoose and finished a project in beta Responsive Web Design.
Finished Basic Node and Express, I think I finally got it down now.
Got started with Basic Node and Express.
Back to learning, got started with Back End Development and APIs and finished with Managing Packages with NPM (you can find all the back-end learning on my replit in the appropriate folder).
I did it! Earned my data visualization certificate (here's the last project) and continued with beta Responsive Web Design.
Well, I figured it out the treemap project thanks to the D3 creator, Mike. Just need to add the legend and the tooltip. Should be done in ~2 days.
Got started with the Treemap project and continue with beta Responsive Web Design.
Map done! Couldn't get the tooltip test cases to pass for some reason, but here it is. I'll work on the last project tomorrow. Also continued with beta Responsive Web Design.
Only 3 more test cases left to pass! Also finished a project in beta Responsive Web Design.
LET'S GO I got the map all coloured in (the colour scheme is a little different, but that's fine), going to try to wrap this up in about 2 days.
Okay, colouring will be impossible if I don't use FCC's map data. Figuring out how to replace the pre-existing map data with that. Also continued with beta Responsive Web Design.
In the process of figuring out how to color in the map. Also continued with beta Responsive Web Design.
Figured out the map! Also continued with beta Responsive Web Design and finished a section within it!
Still figuring out the whole map thing, though I think I found my answer. Also continued with beta Responsive Web Design.
Got started with the map project, wondering if I can use a package to draw the US map instead of converting the data they gave into an SVG (which is too complicated). Also continued with beta Responsive Web Design.
Finished with the heatmap project (here's the link to it)! Will start with the penultimate project tomorrow. Also continued with beta Responsive Web Design.
So close to submitting my heatmap project, just need another day to make the y-axis show the month name, not the number and to add text below the legend (also, figured out the legend!) and I also continued with beta Responsive Web Design.
Got more than half of the test cases to pass, though I still need to figure out how to make a legend. Also continued with beta Responsive Web Design.
Made amazing progress! The heatmap is basically complete, just need to add a legend, fix the tooltip and pass the tests. I also continued with the beta Responsive Web Design.
Made good progress with the heatmap project, I got the axes set properly, it's just the squares that need work now. Also finished two projects within beta Responsive Web Design!
Sort of fixed the data issue with this less obscure website (I say sort of because the free account only has 10000 requests before it goes down, which is decent, but the tests that I run might exhaust that, not entirely sure) and continued with beta Responsive Web Design.
The same issue that came up with the bar chart project has come up again, I can't seem to find a place to store edited data. Since the FCC data is nested, it's really hard to work with, so I "unnested" it and stored it on this obscure website, but the data stored there doesn't seem to be permanent, so now I have to work on both my heatmap project and my bar chart project again.
Oh, I also continued with beta Responsive Web Design.
Made a bit of progress on the heat map and continued with beta Responsive Web Design.
Finished the scatterplot project! Yeah, there are two test cases left, but they have the same issue as the bar chart project. Here's the project. Also got started on the Heat Map project and continued with beta Responsive Web Design.
Didn't have much time today, so I could only continue the beta Responsive Web Design.
Got done with the legend, the only tests I have left relate to the annoying D3 attributes.
Again made great progress, I only have 5 test cases left to pass for my scatterplot project and continued with beta Responsive Web Design.
Made amazing progress, got the whole y-axis done and added the circles for the scatterplot. Just need to get the test cases to pass.
Got the y-axis almost complete and continued with beta Responsive Web Design.
Couldn't continue with my scatterplot (will try to finish it in the weekend) but I continued with beta Responsive Web Design. Someone in an EA Slack channel talked about FCC!
For some reason, it's really complicated to get minute and second formatted time on a y-axis (like this: 31:24), will continue work on it tomorrow. Also continued with beta Responsive Web Design.
Got started with the scatterplot project and continued with beta Responsive Web Design.
Couldn't fix that issue, but that's alright. Submitted my bar chart project! (see it here) and continued beta Responsive Web Design.
Got every test case to pass, except for one... I'll work on that tomorrow and if I can't get it, I'll just submit it. Anyways, I also continued beta Responsive Web Design.
Finished the tooltip, now I just need to pass all the test cases. Also continued the beta Responsive Web Design.
Partially added the logic for a tooltip in my bar chart project and continued with beta Responsive Web Design.
Continued with beta Responsive Web Design.
Got half of the test cases to pass for my project and continued beta Responsive Web Design.
Now I made some good progress, I decided to use JSON (as it was easier to store on the web) and everything except the tooltips is done.
Wasn't able to make much progress with my bar chart project as I wasted a lot of my time trying to figure out how to host my custom data file, anyways, I continued with beta Responsive Web Design.
Made good progress with my bar chart project (though the x-axis is fully destroyed) and continued with beta Responsive Web Design.
Continued with data visualization and the beta Responsive Web Design.
I'll update the 25 + 5 Clock code if any changes come up, but for now, I've earned my Front End Development Libraries certificate! Will push on with data visualization tomorrow.
Finished the HTML part of beta Responsive Web Design and opened up a forum post about my issues with my project.
Continued with beta Responsive Web Design, still have ~6 test cases left even though I should pass them. This annoying script error bug has been there for almost 2 days.
Continued with beta Responsive Web Design, only 6 more test cases. Also, 100-day streak!
Continued with beta Responsive Web Design and I only have 8 more test cases to pass for my 25 + 5 clock!
Continued with beta Responsive Web Design and sort of made the timer functional, though there is some weird script error.
Continued with beta Responsive Web Design and made a breakthrough with my 25 + 5 project, I figured out that there should be two states for seconds, one for math and another to be displayed. Hopefully, I'll get this project complete and earn my certificate by the end of this week!
Continued with the beta version of Responsive Web Design and my 25 + 5 Clock project. Hope to get almost fully through FCC in 2022!
These front-end projects take so, so long. And if you take a few days to build them, your streak gets wrecked. So I was desperate, I was so tired from my 25 + 5 Clock project that I started to do my data visualization projects, thinking they would be faster to do than the front-end projects (they weren't).
But then, just as I was about to give up, I saw... this. This not only saved my streak for today, but my streak for years to come as I can speedrun this on the side and finish my projects without melting my brain by trying to do it all in one day.
Thank you, whoever thought of this. (Side note: This is actually a cool idea on its own, I really dig the new design on these challenges.)
Finished the JavaScript Calculator project (see it here)
Finished the Markdown Previewer project and the Drum Machine project (see it here), only two more projects left till I earn my certification!
Finished Random Quote Machine project and partially completed the Markdown Previewer project (see it here).
Sigh, I spent almost 2 hours just to end up with a half baked Random Quote Machine submission. I'll work on it tomorrow.
Finished the JavaScript part of the curriculum.
Completed Cash Register and earned my certification!
Completed Roman Numeral Converter.
Continued with the JavaScript questions I left.
Continued with the JavaScript questions I left.
Continued with the JavaScript questions I left.
Continued with the JavaScript questions I left.
Started with Random Quote Machine and continued with the JavaScript questions I left.
Finished React and Redux.
Continued with the JavaScript questions I left and completed the projects Caesar Cipher and Telephone Number Validator.
Continued with the JavaScript questions I left.
Continued with the JavaScript questions I left.
Continued with the JavaScript questions I left.
Continued with the JavaScript questions I left, it's nice to see my LeetCode practicing paying off (kinda).
Continuing with the JavaScript questions I left, hope to earn my JavaScript certification soon!
Finished Redux.
Completed my last responsive web design project and earned my certification!
Going to take some time out to finish my pending projects, won't look good on my heat map, but oh well. Finished my Technical Documentation project (here's the project).
Continued with Quality Assurance.
Continued with Quality Assurance and JavaScript.
My PR got accepted! Also started with Quality Assurance.
Continued with Information Security and unfinished challenges. Also opened up a PR to fix a grammar issue in Information Security.
Continued with Information Security and finished off some challenges I left previously.
Finished JSON APIs and AJAX and started with Information Security, this stuff is incredibly useful! I wish I learnt about Helmet.js earlier.
Finished with D3 and nearly finished JSON APIs and AJAX.
Continued with D3 and held a perfect streak for the whole month!
Continued with D3.
Finished my kanyewest.com's Donda Stem Player re-creation and continued with D3.
Continued with Redux and started with React with Redux and Data Visualization with D3 just to get my points up. I hate how the difficulty skyrockets after Responsive Web Design. At least I had fun re-creating kanyewest.com's Donda Stem Player for my Responsive Web Design Project.
Continued with Redux.
Finished with React and started with Redux.
Continued with React.
Continued with React.
Continued with React.
Continued with React.
Started with React.
Finished with SASS, thinking of using it in my bettermailto project)!
Finished jQuery and moved on to SASS.
Continued with jQuery.
Finished Bootstrap and moved on to jQuery.
Continued with Bootstrap.
Continued with Bootstrap.
Continued with Algorithms and Functional Programming in JS and Bootstrap.
Continued with Basic Data Structures in JS.
Started Basic Data Structures in JS.
JS is so frustrating sometimes.
Finished OOP in JS.
Continued with OOP in JS, pretty cool stuff!
Much shorter this time around, continued with OOP (object-oriented programming) in JS.
Why did this take so long? Continued with JS.
I got done with the Counting Cards problem in JS. I also continued with ES6.
Continued with Regular Expressions and finished Debugging.
Continued with Regular Expressions.
Continued with ES6 and Regular Expressions.
Continued with Basic JavaScript and started ES6. I really need to continue with my Web Design projects and finish the JS curriculum items I skipped.
Continued Basic JavaScript.
Continued Basic JavaScript and Regular Expressions.
Continued Basic JavaScript and Regular Expressions, the issue was closed as it was an intentional feature.
Continued Basic JavaScript and Debugging, and also opened up an issue about possible duplication.
Oct 28, 2021-present
Trying to get better every day at the four events I practice, which are 3x3, 2x2, 3x3 OH and Skewb, all AO5's are presented in that order and I usually write about any PB I get.
23.083, 6.700, 38.384 and 11.140.
20.640, 6.756, 37.880 and 10.302.
20.694, 5.273, 33.634 and 10.598.
19.856, 6.133, 34.889 and 10.218.
20.732, 5.907, 31.214 and 9.320.
20.185, 6.254, 33.995 and 8.724.
19.371, 6.298, 36.396 and 10.548.
21.429, 4.964, 33.788 and 9.876.
19.271, 8.802, 39.664 and 8.347.
23.091, 4.472, 31.189 and 8.808.
19.662, 6.125, 33.877 and 9.205.
20.691, 5.050, 36.578 and 8.841.
20.912, 6.815, 31.041 and 7.615.
\(40^2\) solves! 17.936, 5.969, 35.427 and 7.331.
19.509, 6.107, 34.105 and 9.909.
17.647, 6.375, 35.562 and 9.129.
17.873, 4.861, 31.998 and 11.427.
Attended Dubai Summer Open 2022 and got an 18.73 average with a 16.72 best for 3x3! An awesome time overall :)
19.907, 5.470, 33.116 and 8.903.
18.685, 6.439, 34.472 and 8.268.
19.688, 5.658, 36.235 and 9.067.
Finally! 18.722, 5.123, 29.672 (!) and 8.081.
I think I've learnt the Ja perm for 3x3 OH? 20.030, 5.016, 37.032 and 9.073.
3x3 AO5 PB! (by a couple milliseconds lol): 15.708 (!), 8.368, 35.560 and 7.586
20.416, 5.227, 37.444 and 8.829.
17.806, 6.660, 39.445 and 9.953.
23.468, 5.389, 35.004 and 8.526.
17.652, 5.143, 36.598 and 9.815.
Much better in the Skewb department! 19.732, 6.789, 36.512 and 8.764.
21.091, 6.134, 33.164 and 15.323.
19.941, 6.571, 31.480 and 10.170.
19.545, 5.173, 37.692 and 9.840.
At least I learnt the one-handed version of the H perm! 18.599, 4.864, 38.965 and 11.771.
20.353, 5.457, 39.861 and 11.311.
19.965, 5.536, 35.159 and 9.446.
21.405, 7.053, 38.565 and 10.841.
17.039, 5.987, 35.190 and 7.532.
18.963, 5.775, 33.103 and 8.023.
Finally! 18.730, 4.942, 29.052 (!), 10.617.
21.554, 5.782, 40.320 and 7.502.
So close: 19.009, 4.656 (!), 30.284 and 8.706.
Not a bad way to start the month: 16.993 (!), 6.440, 31.554 and 8.598.
17.234 (!), 5.124, 33.030 and 7.851.
17.595 (!), 5.320, 30.445 and 8.606.
19.340, 5.681, 31.071 and 9.370.
20.071, 4.838 (!), 38.269 and 7.523.
19.091, 5.953, 33.187 and 8.106.
24.022, 5.022, 37.679 and 7.321.
18.195, 4.872, 32.165 and 8.967.
21.094, 6.753, 39.731 and 11.056.
21.094, 6.753, 39.731 and 11.056.
3x3 AO5 PB! 15.888, 5.587, 37.371 and 9.911.
18.596, 5.965, 31.537 and 12.055.
21.247, 5.597, 31.273 and 8.574.
18.867, 6.451, 40.823 :(, 12.007.
19.059, 5.604, 38.726 and 9.577.
22.948, 6.385, 35.875 and 10.078.
19.592, 5.732, 34.364 and 10.530.
18.545, 6.365, 38.177 and 9.836.
One day, I'll get a sub-30 3x3 OH AO5: 17.311, 5.320, 30.854 and 10.231
23.714, 7.466, 31.628 and 10.917.
21.920, 6.766, 39.072 and 8.685.
18.965, 5.504, 33.788 and 10.432.
2 fast 4 u: 19.586, 5.419, 32.351 and 7.546
19.177, 5.797, 40.185 :(, 10.573
18.756, 5.942, 32.829 and 7.772
21.407, 5.065, 38.805 and 10.481
I was so close to sub-30 for 3x3 OH: 17.317 (!), 5.798, 31.982 and 8.910
18.892, 6.250, 32.603 and 8.918.
17.980 (!), 6.040, 31.132 and 10.525.
18.859, 5.639, 33.667 and 10.999.
20.970, 6.555, 35.080 and 10.976.
18.986, 5.383, 33.141 and 8.954.
20.229, 5.544, 33.882 and (8.615, 8.983).
20.432, 5.903, 36.015 and 11.585.
I was so close to a sub-30 3x3 OH AO5... 18.736, 6.921, 30.004 (!) and 11.585.
3x3 was tragic today, my new cube is very fast, and that can result in sub-15, but it can also result in a 40 due to messing up the PLL: 23.590, 6.047, 33.841 and 8.036
20.229, 5.503, 33.131 and 8.247
New cube! 19.169, 6.500, 33.325 and 8.948.
Never mind: 22.696, 5.413, 37.745 and 8.947.
Phew... 18.819, 6.577, 37.075 and 8.134.
22.004, 5.656, 41.466 and 9.496.
20.320, 5.291, 42.044 and 9.445.
I was so close to messing up 3x3 OH lol: 17.735, 6.390, 39.546 and 9.634.
20.155, 5.422, 36.218 and 10.212.
After a certain time in the day, I just cannot cube: 23.168, 4.714, 42.344 and 7.879.
It's funny how a couple of years ago, I would be screaming and running around if I got a sub-15 solve. Now, nothing: 18.392, 5.922, 33.850 and 9.239.
Better: 17.511, 6.151, 34.061 and 9.249
Still pretty meh, but getting better: 19.618, 6.651, 35.002 and 10.860.
20.986, 6.248, 42.098 and 10.130.
22.117, 5.633, 35.752 and 7.100.
20.241, 5.700, 37.880 and 9.941.
A (less?) agreeable set of averages: 18.711, 5.089, DNF and 7.919.
An agreeable set of averages: 19.217, 4.966, 36.632 and 8.640.
Still waiting for 3x3 BLD... 19.928, 7.067, 40.553 and 11.262.
I decided to do two AO5's for every event except 3x3 (to make everything line up): 19.273, (7.272, 5.501), (36.156, 36.921) and (11.751, 9.392)
20.927, 6.204, 37.392 and 9.882
24.275, 5.165, 35.743 and 7.170.
Not bad: 18.764, 4.901, 35.034 and 10.136.
3x3 OH wasn't feeling it today: 18.478, 4.489, 44.487 and 9.555.
23.289, 6.478, 34.936 and 8.654.
Double sigh, my first 3x3 AO5 was a DNF so I did it again and I still can't get a successful 3x3 BLD attempt: (DNF, 20.710), 5.385, 31.499 and 10.485.
Sigh, 3x3 BLD has gotten worse: 19.207, 6.058, 38.293 and 9.943.
I was planning to do a 3x3 BLD attempt, but I had to reassemble my Skewb in the middle of my AO5 :/ 19.659, 5.010, 34.842 and 11.210.
20.562, 5.151, 35.957 and 10.113.
21.166, 5.224, 37.286 and 7.112.
Still no luck with 3x3 BLD: 18.350, 4.698, 35.431 and 6.450 (!)
Phew... 19.904, 4.736, 34.368 and 9.121.
20.574, 5.218, 38.933 and 10.418.
Just made it through: 19.738, 5.281, 39.569 and 9.758.
Again, 3x3 OH could have gone better: 17.624 (!), 5.262, 38.848 and 7.606.
3x3 OH could have gone better: 18.981, 4.761 (!), 38.214 and 8.138.
Finally! 18.702, 7.092, 37.922 and 8.573.
3x3 PB! (10.105) and I still didn't get sub-20 lol: 20.031, 8.630, 31.412 and 7.408.
20.338, 5.874, 34.788 and 11.512.
22.294, 6.656, 36.895 and 9.396.
Great averages, nothing much to complain about: 17.248 (!), 5.251, 35.677 and 8.010.
3x3 OH PB! (22.095): 21.411, 6.433, 35.329 and 9.273.
Been having a hard time getting a successful no-write 3x3 BLD attempt: 18.134, 4.266, 33.915 and 8.322.
Finally: 19.299, 6.022, 32.160 and 8.944.
Today was not a day for 3x3 OH: 19.471, 4.737 (!), 43.997 and 8.170.
21.400, 5.229, 37.052 and 9.670.
3x3 BLD attempt was disastrous today lol: 18.137, 4.741 (!), 38.289 and 11.163.
22.173, 6.177, 32.371 and 14.443.
22.468, 5.526, 36.977 and 7.229.
21.620, 5.126, 38.562 and 11.681.
21.063, 6.582, 31.209 and 10.659.
Finally, some good averages: 17.740 (!), 5.741, 34.197 and 9.334.
3 days in a row... 20.832, 4.844, 35.143 and 9.095.
20.412, 8.698, 41.073 and 8.761.
22.307, 5.259, 35.524 and 10.037.
Today's 3x3 BLD attempt was so bad haha: 19.357, 4.800 (!), 33.606 and 6.465 (!)
21.066, 7.844, 42.862 and 9.970.
Disappointingly, cstimer (the cubing timer I use) doesn't produce AO1000, so here is the mean for 1000 solves: 21.177, 6.102, 41.186 and 10.019. As for the AO5's: 18.469, 5.554, 33.303 and 10.887. Also, I've spent almost 6 hours in total on 3x3 lol, here's to another 1000!
21.078, 6.095, 35.065 and 8.574.
I finished the BLD attempt too early and forgot to execute the moves to solve the last corner :( Also, day after tomorrow will be the AO1000 day! 19.973, 5.549, 37.311 and 7.746.
3x3 OH... 17.459 (!), 5.334, 40.854 and 7.839.
TS UP VE CX EA LQ! I got a successful 3x3 BLD solve without writing down the memorization during the solve! 18.899, 6.497, 37.569 and 10.569 (I also forgot to mention that a couple days ago I got a 3x3 OH PB lol, 22.402)
19.546, 5.346, 39.616 and 10.359.
21.161, 5.131, 36.236 and 9.728.
I was pretty close with the no-writing BLD attempt! 19.845, 5.578, 32.999 and 9.502.
Decent I guess: 19.625, 6.814, 38.264 and 11.757. I also tried to do a BLD attempt without writing down the memorization, I messed up because of execution lol.
Nothing saves the day: 20.620, 5.907, 39.393 and 8.049.
3x3 OH saves the day: 20.796, 4.305 (!), 29.552 (!) and 9.895.
Slightly better: 18.447, 4.443 (!), 39.591 and 7.931.
Barely passable: 19.618, 6.006, 36.972 and 8.722.
Never mind? 17.598 (!), 5.175, 33.667 an 10.520. I hate how turbulent my times are. I guess that's cubing in a nutshell.
Welp, I think we'll be in this time slump for a bit. At least I got a successful 3x3 BLD solve: 20.569, 6.222, 39.119 and 9.908 (Also, I think the change in solving order didn't do much, so I'm back to the original order).
22.961, 5.759, 35.432 and 11.559.
Phew, back on track: 19.187, 5.778, 36.826 and 7.655 (by the way, the order of the averages written haven't changed, but I now do Skewb -> 2x2 -> 3x3 OH -> 3x3).
Well, it was fun while it lasted: 21.856, 6.137, 37.501 and 10.732.
Very nice (except for 3x3 OH): 17.276, 5.472, 37.693 and 8.917. I wonder how long it'll take me to get sub-15 on 3x3.
Nice: 17.101, 5.581, 35.501 and 8.881.
100 more solves to go till AO1000! 18.073, 5.867, 38.429 and 8.191.
3x3 OH AO5 was terrible: 18.068, 5.591, 40.613 and 9.809.
Another successful 3x3 BLD solve! 17.372 (!), 5.924, 35.729 and 10.559.
Today is the greatest day of my life (cubing-wise!), got 3 sub-30 solves in 3x3 OH and great averages all around: 18.990, 5.906, 30.921 (!), 8.003.
And... I got another successful 3x3 BLD solve! It was so hectic lol, I changed my memorization mid-way through the edges (thankfully) .
I haven't been able to get a 3x3 BLD attempt (let alone a successful one) in the past 3-ish days. At least the averages are back to normal (for like a day): 18.529, 5.019, 37.587 and 9.230.
Never mind: 22.649, 5.509, 39.351 and 9.716. I like how my whole day (cubing-wise) gets ruined if my 3x3 AO5 is not sub-20 lol.
Back to normal: 19.452, 5.065, 32.064 and 9.556.
3x3 BLD attempt was off by 3 edges again: 20.618, 5.458, 40.515 and 11.240.
22.546, 7.092, 38.206 and 11.234.
Today's 3x3 BLD attempts were so frustrating, the first one was off by two flipped edges and I kept messing up the execution in the later solves, at least the averages were good: 18.488, 5.382, 39.277 and 8.365.
I got two sub-20 solves for 3x3 at first, but it all got ruined by a DNF and a +2, it sometimes feel like it's all about luck, anyways: 20.698, 5.174, 35.456 and 13.105.
Odd 3x3 BLD attempt was so close: 21.064, 5.506, 37.986 and 8.045.
How did an average with a 40 and a DNF become sub-40? 25.537, 4.964, 39.721 and 9.783.
Scrambles were very easy: 17.547 (!), 4.941, 38.425 and 11.764.
Got a 12 second solve for 3x3 but regardless: 21.821, 6.535, 36.357 and 10.273.
23.077, 5.853, 41.374 and 10.033.
21.405, 6.002, 37.289 and 10.459.
I guess I got lucky? 18.841, 5.380, 34.834 and 9.340. Today's 3x3 BLD attempt was so close (two edges flipped).
Forgot about the switch-up: 24.875, 6.812, 35.906 and 11.400.
My averages have been terrible for the past few months days and so I'm going to switch it up by doing 2x2 first and then proceeding the with normal order (don't worry, the log order will remain the same): 22.462, 5.755, 40.173 and 9.379.
200 more solves left for an AO1000: 20.543, 5.996, 36.888 and 9.247.
This is getting ridiculous: 19.962, 5.636, 40.219 and 11.274.
Yes? 19.093, 5.612, 37.009, 11.737.
Nope: 20.098, 7.327, 38.656 and 7.993.
We're back? 18.709, 5.143, 38.506 and 6.759.
Meh (x2): 21.662, 6.125, 34.649 and 9.689.
Meh: 22.201, 5.474, 40.973 and 10.045.
QX TJ IW ER UO LR, WB XL JD! I DID IT! THE NEW SETUP MOVES ACTUALLY WORKED! I will add a technicality here, I forgot the "JD" part so I peeked at it. A full timed BLD solve coming soon! Averages were meh but that doesn't matter: 20.036 (so close!), 4.361, 40.565 and 8.018.
I need to stop cubing at night (x2): 23.734, 5.564, 43.749 and 7.136.
I need to stop cubing at night: 20.598, 7.136, 42.022 and 10.538.
Sigh: 21.520, 6.214, 36.180 and 8.337, at least I learnt why my "odd" memorizations for 3x3 BLD are always way off (I can't use any setup moves that disrupt the top two corners + the buffer)
2x2 was quite a shock: 21.093, 3.474 (!), 44.370 and 9.777.
Nothing to say really: 22.273, 5.233, 39.433 and 8.907.
Sigh, the corners for today's BLD attempt were totally wrong and my averages have hit an all-time low: 20.595, 8.103, 40.345 and 12.222.
It's just a matter of time: 3 corners wrong again (but I re-attempted my memorization whilst being able to look and my corner memorization was slightly wrong). Also, 3x3 PB! (11.764, here's the scramble: F L2 U L2 F2 U2 L2 R2 U2 B' R2 B F R B D2 B' U B F) and the averages were not bad too: 19.507, 5.753, 37.973 and 9.585.
My 3x3 BLD attempt was agonizingly close, I had three corners that were wrong :(
Also, averages were (arguably) more disappointing: 22.265, 7.134, 39.826 and 11.307.
These have got to be my most disappointing averages: 21.324, 7.266, 43.087 and 9.680.
Back to meh averages: 21.481, 5.477, 36.067 and 9.224.
So close with today's 3x3 BLD attempt, only about 4 corners were wrong. Today's average were great: 19.330, 4.720, 36.209 and 8.188.
Got nothing much to say: 21.268, 5.496, 38.223 and 10.216.
Don't know what's going wrong, but I can't get any correct memorization (one can't be odd and another even) and today's averages were meh (except 3x3 OH, I got a 26!): 23.784, 5.127, 32.972 (!) and 12.093.
Couldn't get any 3x3 BLD memorization since I kept getting stuck in an "edge loop". Today's 3x3 was tragic. Were it not for that +2 at the end, I would have gotten a 19.879 average. Instead: 20.546, 4.763, 39.881 and 10.050.
I checked out another example solve and this one memorized corners -> memorized edges -> executed edges -> executed corners. I tried that (with parity) and it was pretty close (~5 corners were wrong). Anyways, today's averages were bad: 25.125, 7.246, 38.246 and 8.772.
Did a 3x3 BLD attempt while seeing, I'm 99% sure my parity algorithm and corner memorization are always wrong. I'll work on that. The averages were really good: 17.640 (!), 6.461, 38.753 and 8.020.
Not bad: 19.799, 5.190, 39.064 (was so close to 40 lol) and 8.005. Got a PB today for 2x2 (1.386) and Skewb (3.268)!
Today's averages were pretty amazing: 19.030, 4.953, 38.781 and 9.570.
Today's attempt was so close it's annoying, and today's averages were not bad: 21.033, 5.817, 36.105 and a 10.531.
Even cases still leave my corners all messed up. Today's averages were terrible: 21.927, 7.347, 35.463 and 10.863.
So close yet so far with BLD, I rechecked my solution and it was right up to the edges, I think parity messed me up, maybe my algorithm is wrong? Today's averages were very meh: 21.658, 6.286, 40.089 and 8.430.
Well, that upward trajectory lasted longer than the time the US made $1 coins: 21.514, 6.383, 34.207 and a 9.668.
So close! Just messed up my corner memorization (somewhere) and today's averages were great: 19.732, 6.033, 37.433, 9.408.
We're back: 19.463, 5.182, 35.965 and a 8.541.
BLD was really close today! I think I've gotten used to the new correct setup moves. Today's averages were sad (could have gotten sub-20 in 3x3 if it wasn't for me messing up PLL): 21.694, 7.680, 40.865 and a 9.638.
Today's BLD attempt failed spectacularly and today's averages were slightly less meh (emphasis on slightly): 22.500, 5.821, 41.203 and a 8.944.
Couldn't get today's BLD attempt, and today's were very meh: 24.692, 5.152, 40.385 and a 9.958.
HOLY CRAP TODAY'S 3X3 BLD ATTEMPT WAS SO CLOSE! Only my corner memorization was a little bit wrong and the buffer for the edge was flipped (which confirms that it's possible, I need to learn what to do in that case). Today's averages were good (except for 3x3, still waiting for a streak of sub-20's): 22.320, 4.962, 35.021 and a 10.029.
I must be doing something right with 3x3 BLD, I did my edge memorization (while being able to see) and it was all correct. But after doing the parity (which I was supposed to do) the whole corner memorization got messed up. Weird. Anyways, today's averages were meh: 21.027, 6.522, 38.636 and 10.536.
Okay, I rewatched an example solve and I realized I've been making a ton of mistakes. I tried to use the new buffer location, but my setup moves are now too complicated. Maybe the buffer location doesn't matter? Anyways, today's averages were better, 3x3 sub-20 coming soon: 20.770, 6.072, 37.997 and a 9.871.
I don't even want to talk about this day cubing-wise: 20.866, 4.760, 50.749 and 9.291.
So close! I think the only place I could have potentially gone wrong was returning to the buffer. Today's 3x3 OH average was insane, almost all solves were sub-35: 22.481, 6.097, 34.596 and 8.596.
Still no luck, will actually try recording my attempt over the weekend to see any mistakes I made after the solve. Today's averages (except 3x3 OH) were meh: 22.537, 6.205, 35.843 and 9.001.
Nope, that was not the reason. Today's averages were meh again: 22.205, 7.153, 40.376 and 10.354.
I think I found the reason why my 3x3 BLD attempts have all failed, it's because I didn't do wide setup moves. I'll try again tomorrow (I messed up parity in today's attempt lol). Today's averages were meh: 20.032, 5.665, 36.412 and 10.434.
The meh-streak continues: 21.008, 5.467, 38.579 and 7.971.
So close! One good thing that came from today's 3x3 BLD attempt was that everything was generally much faster (memorization + execution), though that could mean the probability of making a mistake is now much higher... Today's averages were meh again (except for 3x3 OH): 21.947, 5.328, 38.148 and a 8.784.
Thought today would be the day, but nope, I messed up the 3x3 BLD attempt quite badly (though I'm not sure what I did wrong in the attempt, maybe messed up an execution?). Anyways, today's averages (except 3x3) were meh: 18.878 (!), 7.080, 40.929 and 10.494.
So close! I think I only messed up my corner memorization, the edges were all correct and a few corners hadn't been swapped. Anyways, today's averages were meh again: 20.580, 6.680, 39.801 and a 9.568.
My closest 3x3 BLD attempt yet! Got every step done, maybe my memoization was wrong. Anyways, today's averages were pretty meh: 19.308, 6.757, 44.479 and a 10.444.
Pretty bad all around, failed my 3x3 BLD attempt with the same mistake I've been making in the past few attempts (confused between algorithms) and got pretty meh averages: 20.538, 4.140, 54.184 and an 8.206.
Everything today was very, very sad: 21.869, 5.481, 44.561 and a 9.391.
Today's 3x3 BLD attempt was so bad it was funny, I thought mid-way the solve that I might get only a few wrong (since I forgot to do the parity algorithm) but nope. Anyways, today's averages were also, well, average. But I did get a 3x3 OH PB (22.402): 20.095, 6.131, 41.337 and an 8.516.
Got quite close with my 3x3 BLD attempt, one day... Today's averages were pretty meh: 22.241, 5.753, 41.772 and a 9.544.
I learnt yesterday night why all my 3x3 BLD attempts failed, it's because I swapped the wrong buffer piece and I didn't do the parity algorithm. I corrected both today, a successful attempt should come soon. Today's averages were good: 19.257, 4.985, 36.746 and a 7.840.
Very strange 3x3 BLD full attempt today, I somehow got all edges correct and no corners correct. Anyways, today's averages were awesome: 19.627 (!), 4.514 (!), 38.066 (!) and a 7.689 (!)
Today's averages were crazy! Got an 18.415 (!), 4.202 (!), 38.537 (!) and a 9.553. Also did my first full 3x3 BLD attempt, did not go too well but the amount of progress I'm making is amazing.
Pretty awesome averages today, got a 19.129 (!), 5.254, 37.508 (!) and a 10.109.
Today was crazy for 2x2, I destroyed my PB, twice in a row, first with a sub-3 (2.589) and then with a sub-2 (1.450), today's averages were nothing too crazy though: 20.102, 5.000 (!), 42.915 and an 8.407.
I think I've fully learnt 3x3 BLD edges! Will move on to corners tomorrow. As for the times today, a bit disappointed with 3x3 but the rest were alright: 24.521, 6.656, 36.764 (!) and a 7.299 (!)
I think I have to follow the tutorial again for 3x3 BLD, making the same mistakes over and over again. Anyways, today's averages were awesome, soon to be sort of officially sub-40 3x3 OH and sub-20 3x3: 18.546, 6.218, 35.814 and 10.457.
Again, got really close to 3x3 BLD edges attempt. As for the times today: I got a 23.001, 6.177, 34.869 (!) and a 10.518.
SO CLOSE to a true 3x3 BLD edges attempt! I was only one swap away. Anyways, I completed 500 solves in every event, and today's averages were a 21.648, 5.759, 43.116 and a 10.973.
So close to sub-40 AO5 for 3x3 OH, but I messed up the last solve. Will move on to memorizing corners for 3x3 BLD and today's times are a 20.929, 5.127, 40.641 and a 9.240.
Pretty great for 2x2, got a 20.645, 4.702 (!), 43.245 and a 10.341.
Today was crazy for 3x3 OH again, got a 21.468, 6.339, 37.748 (!) and a 10.506.
Amazing day! Got a 3x3 OH PB (24.204) (!) and great averages for 3x3 and 3x3 OH: 19.394 (!), 6.030, 35.962 (!) and a 10.915.
Not bad, got a 21.398, 5.979, 41.616 and a 10.386.
Amazing averages! Got a 19.056 (!), 5.725, 39.427 and a 8.321.
Progress! I solved the 3x3 BLD edges (though I could see the cube, just trying to get my memorization correct) and today's 2x2 was crazy good. 20.787, 4.923 (!), 40.937 and a 10.749.
Started with my 3x3 BLD practice (though it will be a slow journey) and I got a 20.636, 6.771, 44.624 and an 8.753.
Pretty good day, got another successful 2x2 BLD solve, going to move on to 3x3 BLD with this video, as for the times, I got a 19.373 (!), 6.114, 41.561 and a 9.421.
PaNama Times Something Goes Mad! That was the memorization for my first ever legit 2x2 BLD solve! I did it again (though the scramble was pretty easy). As for the times today, they were pretty mid: 20.916, 5.551, 44.045 and a 9.939.
Happy new year! Getting really close with 2x2 BLD, I think my main problem is what I memorize is wrong, the memorization and solving part is not hard. Anyways, I got a 21.460, 6.278, 45.938, 9.669.
Still no luck with 2x2 BLD, but the times today were not bad, nearly got a 3x3 OH PB (29.480): 20.790, 6.353, 37.504 (!) and a 8.922. Hope to go for a competition in 2022!
No luck with 2x2 BLD still and a pretty average day, 21.719, 6.508, 43.146 and a 11.594.
So close! I attempted 2x2 BLD (by closing my eyes lol) thrice and got only two pieces unsolved in the last two attempts. Hopefully, by the end of this week, I'll know how to solve it BLD. Anyways, today's times were nothing great: 23.027, 6.431, 43.704 and 8.318.
Alright day, got a 21.078, 5.375, 39.117 (!) and a 12.108.
Solved a 2x2 with the Old Pochmann method! (though I wasn't blindfolded, and I can only do it if I don't have a new cycle, I'll have to revise that), as for the times, I got a 19.002 (!), 5.674, 40.539 and 9.591.
Made good progress learning 2x2 blindfolded with this video and got alright times for today: 21.616, 6.931, 39.859 (!) and a 10.084.
Meh, got a 21.567, 5.878, 40.827 and a 9.778.
Learnt full PLL on 3x3! As for the times, I got a 21.452, 5.898, 41.674 and a 10.835.
400 solves! The AO100's are 21.074, 6.508, 41.509 and 9.773, the AO5's I got are a 18.486 (!), 5.573, 46.521 and a 9.611.
Getting better, 5 more solves till 400 for each event! As for the times, I got a 20.635, 5.822, 37.404 (!) and a 9.471.
Meh again, got a 21.244, 6.696, 40.381 and a 10.185. Learnt the Gc perm, only one more to go!
Even worse this time, got a 20.709, 7.065, 48.662 and a 10.913.
Alright I guess, got a 21.317, 7.003, 40.893 and a 9.900. Hope to learn full PLL by the end of this week.
Pretty good, got a 18.939 (!), 7.039, 41.364 and 8.666 (!). Is Gc perm the worst G perm?
On fire for 3x3 OH! Today's 3x3 times were very funny, I got a 30 in one of them, 20 in two of them and then a 15 in the last solve. Anyways, I got a 20.895, 6.642, 34.869 (!) and a 9.233.
Slightly worse, but still did very good in 3x3 OH, got a 22.331, 5.687 (!), 37.640 (!) and a 9.206. Going to learn the Gc perm tomorrow.
Awesome day cubing wise! Got a 19.421 (!), 5.322 (!), 38.880 (!) and a 8.327 (!).
Skewb PB (3.601)! As for the rest of the times, I got a 21.208, 6.461, 43.598 and a 9.656.
Meh, got a 23.123, 5.687, 44.295 and a 10.790.
Awesome day for 3x3 OH, and I finally learnt the Gb perm, two more left till full PLL! I got a 23.261, 6.302, 36.469 (!) and an 8.115 (!)
Another alright day, waiting for the day I get a sub-35 average on 3x3 OH. Got a 22.886, 7.857, 38.093 (!) and a 9.395.
Alright day, got a 24.017, 6.548, 39.872 (!) and a 8.367 (!), getting used to the Gb perm.
Not bad again! Got a 19.181 (!, sub-20 coming soon), 7.012, 40.600 and a 8.617 (!). Trying to learn 2x2 BLD with this video.
Not bad, 18.317 (!), 6.659, 43.555 and 11.729. The Gb perm is pretty hard.
Alright day, got a 19.128 (!), 6.142, 40.139 and a 11.155.
Slightly better, got a 21.576, 6.995, 48.182 and a 9.809, going to learn the Gb perm tomorrow.
Pretty bad day, got a 21.047, 6.170, 50.366 and a 9.781. At least I learnt the Ga perm.
Not bad, got a 19.496 (!), 6.902, 40.402 and a 11.875. Finished N Perms and hope to learn full 3x3 PLL by next week.
300 solves! My AO100's are 20.783, 5.877, 42.701 and a 9.891. As for my AO5's today, I got a 20.249, 4.813 (!), 41.474 and an 11.669. Also sent a proposal to create a cubing challenge for EA Cambridge's Slack group!
Got a 14 single in 3x3! But other than that, an average day. Got a 19.900 (!), 5.993, 43.128 and a 10.339.
Talk about an early Christmas miracle, I got a 14.166 3x3 PB! As for the rest of the times, I got a 20.197, 6.595, 36.706 (!) and an 8.390.
This month was pretty awesome cubing-wise, sure there were plenty of average days, but I got really good at 3x3 OH (now my favourite event) and got plenty of PB's! Oh, I got 20.019, 7.074, 43.291 and a 8.094.
The average day has come, got a 20.047, 5.988, 42.593 and a 10.056.
Was going to be an average day, but I got a PB for 3x3 OH! (29.375) As for the rest of the times, I got a 23.697, 5.978, 39.592 (!) and a 9.283.
What a recovery, got a 20.494, 5.737, 46.187 and a 11.190.
Pretty mid today, got a 25.170, 6.910, 40.536 and a 9.746.
3X3 PB with PLL skip (14.539)! As for the rest of the times, I got a 20.491, 5.656, 41.291 and a 11.494
I think I got an AO5 PB for 3x3! I got a 18.139 (!), 5.137, 44.735 and a 9.151 (!)
Amazing day! Got a 19.178 (!), 5.274, 35.787 (!) and a 10.861.
Pretty mid, got a 21.312, 5.734, 44.323 and a 10.070.
So close to sub-40 for 3x3 OH! Got a 21.800, 5.644 (!), 40.224 (!) and a 10.965.
Much better, got a 19.348 (!), 6.056, 45.858 and a 8.337 (!).
Mid again: 20.097, 6.213, 45.935 and a 10.867.
Reached 15^{2} solves, though today my averages were pretty mid: 20.534, 6.302, 47.552 and a 10.534.
Great day, got a 18.659 (!), 4.481 (!), 43.815 and a 9.598.
Amazing day! Got a 20.118, 4.781 (!), 37.553 (!) and a 8.789. (!)
Pretty good for 3x3 and 2x2, got a 19.861 (!), 5.405 (!), 45.114 and a 11.640.
Not bad, got a 21.894, 6.561, 42.843 and a 8.672. Trying to set up jperm.net.
I reached 200 attempts for all four events, here are the AO100's: 21.648, 6.380, 46.315 and a 10.089. For the AO5's, there were pretty good: 21.344, 5.282 (!), 46.523 and a 8.131.
Okay session, got a 21.626, 5.265 (!), 41.383 and a 10.691.
Great session, got a 19.111 (!), 6.761, 42.691 and a 9.557 (!).
Pretty meh all around, got a 23.695, 6.000 (not a joke), 45.575 and a 12.027.
Alright session, got a 20.806, 6.135, 40.776 and a 10.041.
Learnt the Ga perm! My first G perm. As for the AO5's, they weren't half bad, but I can feel 3x3 sub-20 coming soon. I got a 20.842, 6.492, 41.137 and a 12.110
Pretty great session for 2x2, got a 21.192, 4.991 (!), 47.397 and a 8.940. I think I've fully learnt all the N perms!
Alright session, got a 22.703, 7.097, 46.636 and a 8.231.
3x3 PB (14.778)! I also got two sub-40's in 3x3 OH and a sub-6 AO5 for 2x2! Here are the times: a 22.017, 5.851 (!), 42.885 (!) and a 7.902 (!) For reference, here are the G perms I'm learning:
My 3x3 turning was so choppy today. Got a 21.306, 5.272, 43.433 and a 12.279. I also practised my Nb perm.
Alright session, got a 20.729, 6.346, 49.053 and a 9.319.
Was about to be a pretty good day until I got a PB for 3x3 OH! (29.578). For the rest of the times, I got a 22.646, 6.820, 39.839 (!) and an 11.581. I re-learnt the F perm for 3x3 PLL.
New month, new (pretty bad) averages. I got a 28.293, 5.824 (!), 45.115 and a 11.135. I also practised PLL's.
Got a PB for Skewb! (3.959) and got a 21.759, 6.567, 48.101 and a 7.600.
Another great session, especially for Skewb! I got a 23.748, 7.724, 48.450 and a 7.112 (!). I also learnt the N perms for PLL.
Pretty great session! Got a sub-4 for 2x2 (3.875), and got a 22.077, 6.040, 47.577 and a 7.451 (!)
Finished the rest of my solves for 3x3 OH and Skewb, got a 19.775, 6.538, 1:02.230 and a 13.673.
Jan 30, 2022-present
I was a two-time silver medalist for 2019 and 2020 in my country. Trying to get a similar result for 2022! Note that I have four 5x5s and two 6x6s for this project (previously two 4x4s and four 5x5s). Currently paused.
5/6 in ~11 minutes. I've decided to pause this project. If I get selected to the national level, I'll continue this project, else it ends.
Truth be told, I do not find KENKEN enjoyable anymore. I guess the charm wears off after a while.
5/6 in ~7.5 minutes.
All correct in ~8-9 minutes.
Had my "state"-level exam which went well.
Finished the August 2022 weekly challenges: ~10 minutes and ~8 minutes, all correct for both.
Daily puzzles went well.
Daily puzzle went alright (saw the solution for the other one).
Daily puzzle went alright.
Daily puzzles went okay.
Sort of skipped today (finished one daily puzzle that I saw the solution to).
Sort of skipped today (finished one daily puzzle).
Almost 12 minutes for all correct.
Sort of skipped today (finished one daily puzzle that I saw the solution to).
~7.5 minutes for all correct.
~11-12 minutes for 5/6.
~12 minutes for all correct.
~10 and three-fourths of a minute for all correct.
Daily puzzles went okay.
Finished ~2 out of the 6 daily puzzles.
Sort of skipped today as well.
Sort of skipped today.
Daily puzzles went okay.
Daily puzzles went alright (~3-4 checks).
~11 minutes for all correct.
~6 minutes for all correct.
~11-12 minutes for all correct.
~9 minutes for all correct.
Daily puzzles went okay.
~9 minutes for all correct.
I think daily puzzles went alright?
~18 minutes for all correct.
~8 minutes for all correct.
~9.5 minutes for all correct.
~11 minutes for all correct.
Did not have too much time left in the day for KENKEN, so I just did two hard 6x6s with unlimited checks.
~11 minutes for all correct.
4 checks for two hard 6x6s.
~9 minutes for 5/6.
Solved a 7x7 for fun!
Sigh, ~14 minutes for 5/6.
~13 minutes for all correct.
~11 minutes for all correct.
For some reason, I just couldn't do today's weekly challenge. I guess I was too distracted. I'll try again tomorrow.
Daily puzzles went alright.
Don't do KENKEN when you're tired.
Daily puzzles went okay.
Back to sub-10 minutes for all correct!
Daily puzzles went well.
19 seconds shy of 10 minutes with all correct.
15 seconds shy of 10 minutes with all correct.
Daily puzzles went alright (had to basically skip the last one though).
~11 minutes for all correct (tried to pause it as I had to get up, didn't work lol).
Two sub-3s on two hard 6x6s with only one check in the last one.
~12 minutes for all correct.
~7 minutes for 5/6. All remaining weekly challenges have been completed!
~8 minutes for all correct.
~8 minutes for all correct.
~8 minutes for all correct.
~15 minutes for all correct.
~9 minutes for 5/6.
~13 minutes for all correct.
~14 minutes for all correct.
Just barely got 9 minutes for yesterday's (?) weekly challenge.
9 and 10 minutes for all correct.
7 minutes for all correct and 9 minutes for 5/6.
11 minutes for all correct.
5/6.
9 minutes for all correct.
Why is the weekly challenge daily?
12 minutes for all correct.
All correct in ~8 minutes!
Daily puzzles were alright.
15 minutes for a 6x6 wrong.
Daily puzzles were alright.
13 minutes for a 5x5 wrong.
Daily puzzles went alright.
I just got through today's weekly challenge lol.
Oof, got the last 6x6 wrong because I forgot that the sum property of a 6x6 is 21.
All correct in the Weekly challenge in 8 minutes and 20 seconds. Need to get it down to 7 by the end of this month.
Sigh, 5/6. Déjà vu?
Daily puzzles went well.
Sigh, 5/6.
Daily puzzles went well.
Could have gotten all correct in ~8 minutes if it wasn't for a silly mistake in the last 6x6.
Daily puzzles went okay.
Sigh, 4/6.
5/6. It's both good and bad that I no longer find the hard 6x6s in the daily puzzles difficult.
All correct in ~5 minutes!
5/6 in what felt like forever.
The website glitched out, so I got to do only one daily puzzle :(
Sigh. All 6x6s wrong.
Daily puzzles went okay.
~9 minutes again... but with a 6x6 left wrong :(
~9 minutes for the weekly challenge. I hope to stabilize to ~7 minutes soon enough.
Daily puzzles went pretty well.
Sigh. 11 minutes for 1 6x6 wrong.
Daily puzzles went well.
I somehow got two 5x5s wrong in today's weekly challenge. Should I slow down for 5x5s?
Daily puzzles were alright.
All correct in exactly 10 minutes lol.
Weekly challenge in ~8 minutes... with all the 6x6s wrong.
Daily puzzles were pretty bad.
All correct in ~7 minutes and 40 seconds in today's weekly challenge.
Daily puzzles were okay.
All correct in less than 7 minutes in today's weekly challenge!
Daily puzzles were alright.
Tragic, got the 5x5 wrong but the rest were correct in ~7 minutes :/
I DID IT! Just under 6 minutes for all correct in the weekly challenge!
Sigh, 8 minutes for the last 6x6 left incomplete.
Worst weekly challenge ever: ~8 minutes for three wrong (2 wrong, 1 left unattempted) :(
Daily puzzles were meh to alright.
Weekly challenge went so poorly (5/6 in more than 10 minutes) :(
Daily puzzles were meh.
Getting sort of close to the 7 minute mark with the weekly challenges!
Same issue, below 10 minutes but left one puzzle as wrong for that (to make matters worse, it was a 5x5).
Daily puzzles were alright.
~9 minutes with the last 6x6 incorrect :(
~7 minutes with all correct in the bonus challenge!
Weekly challenge took ~10 minutes but with the last 6x6 was incorrect.
Daily puzzles were pretty good!
Got below 9 minutes in the weekly challenge with all correct!
Got all correct in the weekly challenge... in ~14 minutes :(
Daily puzzles were meh.
Another weekly challenge in 9 minutes, but... I had to leave a 6x6 as incorrect for that :(
Daily puzzles were terrible lol.
I DID IT! All correct in ~9 minutes! Now I need to do all of it in 7 minutes...
Daily puzzles were not bad.
Not sure what the exact medical term is, but "the physiological feeling of having no time left in an exam/competitive setting" happened in today's weekly challenge lol. I had ~2 minutes left to reach my goal of completing a weekly challenge in 10 minutes or less and I did it... but all of the 6x6s were wrong. :(
Weekly challenge was pretty poor (one wrong in 14 minutes) and daily puzzles were half-way decent.
Daily puzzles went really well for a change.
Bad day KENKEN-wise, took ~14 minutes for all correct and daily puzzles were pretty bad.
I've noticed that with hard 6x6 puzzles, I need to often make strenuous guesses or YOLO my way out of it. Sigh.
Sigh, I was about to finish the weekly challenge in about 10 minutes, but the last 6x6 tripped me up.
I need to stop using the check button every time I put something down.
Finished the weekly challenge in under 10 minutes BUT I had to basically skip the last 6x6 for that to happen.
Not bad, a little more than 10 and a half minutes with all correct for today's weekly challenge (I miraculously got the last 6x6 correct lol).
Daily puzzles went alright.
Similar story, ~16-17 minutes but all correct (the first 6x6 was pretty darn hard).
Even worse, went down to 16 minutes with 1 wrong.
Dropped down to 15 minutes for the weekly challenge :(
Daily puzzles went meh.
Got another one below 10 minutes, though this time it took 9 minutes and 46 seconds (all correct) and the daily puzzles went a bit better.
Got below 10 minutes on the weekly challenge! (~9 and a half minutes with all correct) and daily puzzles are still meh (I even got one wrong).
Daily puzzles went laughably bad.
Weekly challenge (all correct in 12 minutes) and daily puzzles went meh, I hope to get below 10 minutes on the weekly challenge next week.
Daily puzzles went well.
Finished the weekly challenge in 11 minutes this time around and finished 2 hard 6x6s.
Bonus challenge took almost 20 minutes and I couldn't do a second hard 6x6 :(
Still took more than 10 minutes but got all correct this time. Bonus challenge will be done tomorrow!
Weekly challenge (5/6) took more than 10 minutes (I don't remember the exact time). Need to bring it down to less than 10 minutes consistently.
Daily puzzles were decent, I'm really happy at my progress at hard 6x6s.
Barely got through the weekly challenge in 10 minutes (closer to 11 actually but whatever).
Daily puzzles went alright.
Haha, they changed the weekly challenge to four 5x5s and two 6x6s (in the order), finished that with all correct in 15 minutes (which is bad, but it's my first try at it so it's alright) and the first hard 6x6 I did took me 10 minutes lol.
When solving hard puzzles, your main goal isn't to find the correct position of the numbers right away, but rather you need the fuel: this could be from the row-column sum property, just some simple logic (a +12 cell in a 6x6 always has to contain a 5 and two number that add up to seven), anything really. After that, it's a piece of π.
6/6 in 4 and a half minutes! The two hard 6x6s went alright, though I did take a lot of time for both of them.
Finished weekly challenge (5/6 in 10-ish minutes) and I think I'm ready for hard 6x6s now.
Daily puzzles went meh.
Why do I keep blundering a puzzle in the weekly challenge? Also, when will I comfortably transition to hard 6x6s, when will my weekly challenges update? So many questions.
Daily puzzles went meh, I really hope they update our weekly challenges for the next level puzzles (since I'll be getting 6x6s not 4x4s)
Made it to the next level (I somehow got the first 4x4 wrong in the school level exam) and got all correct in the weekly challenge today and the daily puzzles went okay.
For some reason, only one daily puzzle was unlocked, but it went well (one medium 6x6).
Daily puzzles (two medium 6x6s) went alright.
Slightly better, 5/6.
Got 4/6 in my last weekly challenge for this week.
New PB: Weekly challenge completed in less than 4 minutes, why couldn't have the school exam gone like this?
No weekly challenge today, but the daily puzzles (two medium 6x6s) went alright.
Sigh, got 4/6 in the weekly challenge and the daily puzzles (two medium 6x6s) went really poorly.
Both the bonus weekly challenge (5/6 in about 11 minutes) and the daily puzzles went poorly.
Finished with the weekly challenge and the daily puzzles, will complete the bonus challenge tomorrow.
Had my school-level exam. It went pretty terribly (most likely all correct in about 10 minutes) but it's very likely I proceed to the next level. Also finished weekly challenge and daily puzzles.
Finished with the daily puzzles, went really well.
Found something interesting in my weekly challenge (which went meh) and my daily puzzles: Notice the below image and the "108x" cage:
Now, there is only one possibility which is "3 x 6 x 6 x 1", but what about the position? We can use the fact that 1 has to be on the top row of the cage to our advantage and see that that there are only two possibilities left:
But regardless of which possibility is correct, 3 and 6 are always in the bottom row! So, that leaves 4 in the "9+" cage. Thought it was interesting.
Back to medium 6x6s.
Weekly challenge (one wrong in about 10 minutes) and daily puzzles (had to drop back to easy 6x6s) went bad.
Happy Pi Day, I don't think I'm ready for two hard 6x6s. I mean, I didn't check my medium 6x6 (being overconfident) and got it wrong lol.
Both the weekly challenge (all correct in > 8 minutes) and daily puzzles went badly. At least I have a bonus challenge for Pi Day.
Finished the last weekly challenge for this week (doesn't make sense, I know) in 6 and a half minutes. The first hard 6x6 was good but it took a long time to find the second one.
Going to start doing 2 hard 6x6s for my daily puzzles instead of one medium and one hard.
Finished the weekly challenge (all correct in ~5-6 minutes) and finished a medium and a hard 6x6 (again, went poorly today).
Finished a medium 6x6 in ~3 minutes but the hard 6x6 went pretty poorly today.
Not bad, got done with the weekly challenge (all correct in about 6 minutes) and finished a medium, and a hard 6x6 in ~3 minutes each.
Finished a medium, 6x6 in less than 2 minutes! Hard 6x6 went pretty well too.
Finally, the weekly challenge went well (all correct in just shy of 6 minutes) and finished a medium and hard 6x6.
Finished with the weekly challenge (was going amazingly well until I couldn't solve a dumb 5x5, still did 5/6 in 6 and a half minutes) and finished with one medium 6x6 and a hard 6x6.
I've started doing one medium 6x6 and one hard 6x6. The hard one takes ~4 minutes so my goal is to get that down to 2 minutes.
Getting better at 6x6 and today's weekly challenge was meh (one wrong in ~8 minutes)
Finished with two medium 6x6s, they went fine.
Weekly challenge was going smoothly till one 5x5 messed up my time. I took a little more than 10 minutes and couldn't get the last one. :(
Medium 6x6 takes too much time and an easy 6x6 takes too little time to solve!
Finished the weekly challenge (~10 minutes, all correct) and two medium 6x6. I have this bad habit with my daily puzzles of hitting the "Check" button, so I hit it for the last puzzle and saw I got most cells flipped (i.e. wrong). Ouch.
Finished the weekly challenge (went meh, ~10 minutes and got one wrong) and a medium and hard 6x6 (the hard one took a long time).
Finished a hard and medium 6x6 after a lot of cherry-picking lol.
Solid day, finished the weekly challenge in less than 10 minutes and finished a medium 6x6 and a hard 6x6.
Finished one medium and one hard 6x6 with all operations! (though they took a long time)
Can now solve an easy 6x6 with all operations in a little under 3 minutes! Also, today's weekly challenge went alright (all correct but in 10 minutes, got stuck with a puzzle).
Finished with two puzzles, including a medium 6x6 (with + and -) in only 2 and a half minutes!
Pretty slow throughout my two weekly challenges (one of them was a bonus and I got one wrong) and my daily puzzles. At least I started with addition and subtraction for 6x6!
Amazing day! Beat my record (all correct in 5 minutes and 12 seconds) and moved up to easy (not easiest/very easy) 6x6 with only addition.
No weekly challenge today but I finished a hard 5x5 and a very easy 6x6 (improving in time quite a bit).
Finished a hard 5x5 and a very easy 6x6 (which took way too long lol) and I think I hit a new record for the weekly challenge, all correct in 5 minutes and 59 seconds!
Finished two hard 5x5s, going to start doing one 6x6 (starting with all operations + easiest and working my way up) and one hard 5x5 since all the stages above school level have two 6x6s for my category!
Finished with 5/6 again and (for fun) I did an easy 6x6 (with only addition) and the usual hard 5x5 (both took roughly the same amount of time!)
Not bad, 5/6 again and finished the two hard 5x5s quite quickly.
Solid day, 5/6 in the weekly challenge and finished the two hard 5x5s.
Alright day, finished the two weekly challenges remaining for this week (6/6 in the first one, 4/6 in the other, both times I used a decent amount of time) and finished my two hard 5x5s for the day.
Nice! A new record, all puzzles correct in only ~6 minutes! Also got both my hard 5x5's done in less than 2 minutes. I already feel ready for the exam.
Solved the weekly challenge in only 8 minutes! (it also wrongly marked my first 4x4 as incorrect, weird) and I finished one hard 5x5 (blocked me from doing a second one, weird).
Got done with the last Jan weekly challenge (4/6, pretty meh) and finished two hard 5x5's (last one took a long time).
Alright day, finished a weekly challenge (5 out of 6) and 2 hard 5x5's (though the last one I had to rely on the check tool a lot).
Finished a weekly challenge (all correct, used a little more than half the time) and 2 hard 5x5's (all correct).
Going to finish the early-Jan weekly challenge I missed.
Awesome day KENKEN-wise, got full on the weekly challenge with 13 minutes to spare and finished two hard 5x5s.
Very similar to yesterday, finished the weekly challenge (5 out of 6 with exactly 15 minutes left) and the daily puzzles (got the hard 5x5 wrong).
Finished the weekly challenge (it was alright, 5 out of 6 with about 17 minutes left) and the daily puzzles.
Not bad, finished both my daily puzzles (though I took a long time).
Awesome progress! I got done with my two daily puzzles (all correct) and finished with weekly challenge 2 (which I completed in about half the time with all correct!)
I still got it! A medium-level 4x4 takes me less than a minute, though 5x5's I still have to work on.
Registered for this year's edition after taking a break in 2021, I'll be getting 2 4x4's and 4 5x5's. Let's see how this project will go!
Oct 28, 2021-present
Trying to get better at chess via practicing on lichess. You can see all my games that I refer to here. Previously, I practiced on chess.com. Currently paused due to exams.
Oops.
Good game! (I mean, it was barely passable at my end, but it was fun nonetheless)
Hmm.
This is, probably by a lot, the most surprising checkmate I've received.
Sigh.
Decided to play sort of fast and loose with this game, turns out I was too fast and loose.
I'm very angry with myself over this game.
I hate unexpected checkmates.
Interesting game, made a lot of silly blunders.
An Antichess Tragedy. Will get back to regular chess tomorrow.
Rough game. I had like ~4 takebacks over move 15 lol.
Saddest game ever. I couldn't save myself at some point even with takebacks.
A good game to end of the week (even though I lost).
Anitchess! (with a lot of takebacks, I'll get back to non-variant chess tomorrow)
Sometimes even takebacks can't save you from a terrible game.
A near perfect game (but not really, also 3 takebacks)
Shockingly, only 1 blunder (though that's because it was so short lol)
Played a Chess960 game for fun.
Another Antichess game.
No clue what I was doing here.
Took me forever to checkmate with just a king and a queen, but I did it! (overall, with 1 takeback)
Defeated Stockfish Level 4 with intense focus... and like 3 takebacks lol.
Drew Stockfish Level 4 with (very roughly) 15 takebacks.
I liked this game a lot (even though I lost).
Oof.
I thought I played well in this game. Nope, 11 blunders (I also missed such an obvious check that could have potentially won the game).
Another win! (though I did takeback once)
What a way to start off the month: defeated Stockfish Level 4 without takebacks with the black pieces (only 1 blunder from my side!)
One of my shortest game ever (also drew Level 4 after a couple of takebacks).
Sigh.
I think I need to go back to Level 3.
I won using the Tennison Gambit! (note: this doesn't count towards my battle against Stockfish Level 4 lol)
Sigh.
I think this one counts, I did takeback once but it was accidental.
Another game that doesn't really count because of takebacks.
The uphill battle against Stockfish Level 4 is going to be a long one...
This WOULD have been my first win against Stockfish Level 4 if I hadn't taken back so many times in the endgame (still a fun game!)
Nice.
Sigh.
Ouch, I don't think there were any good moves at move 15 lol.
Possibly the wildest game I've ever played. I was so close to losing and then I pulled up with the promotion that made me win with the black pieces!
I need to practice with the black pieces against Stockfish Level 3. I'm fine with the white pieces.
Maybe a simple 1. e4 with good opening principles and development is all you need at this level.
No idea what I did today for chess today. I need to change my opening repertoire.
I present to you, the biggest throw ever.
I feel like Stockfish wanted to throw an April Fools' Day joke at me...
Sigh.
Not sure what I was doing today.
Stockfish Level 4 made me suffer in the last few moves. We quickly went from the best game yet to possibly the worst game yet lol.
My best game yet with the King's Indian Setup, no blunders and I never lost the advantage + didn't lose a forced checkmate sequence lol. Played a few other King's Indian Setups as well (1, 2)
I threw away a game so badly that I'm actually disappointed in myself. At least the King's Indian Setup has proven its worth to me with the white pieces.
I think this will be my opening repertoire: black pieces with e4 will be the Caro-Kann Defense and anything else (white or black pieces) will mean the King's Indian Setup (need to study this one).
This game definitely doesn't count (took back a lot of blunders) but it was so calming to checkmate my opponent with three queens while listening to Pentatonic.
Explored the Blackmar-Diemer Gambit (also this game doesn't count as a win because I used so many takebacks lol)
I was trying out the Italian Game and I got this gem of a game, so I guess my opening with the white pieces is now the Italian Game? Need to study it for some time.
My best worst game ever. I thought I was being smart with the pawn promotion sacrifice but nope.
Haha! Pawn to knight promotion leads to checkmate (Note: I did do a couple of take backs).
Yeah, that game didn't go too well... Also played a few random games against bots for fun.
Started learning the Giuoco Piano opening and I got pretty far with it against Stockfish Level 3.
Lost against my classmate after exchange variation. I thought move 22 was sort of smart but nope it was a blunder lol.
This is most definitely the best game I've ever played so far. Only one blunder with the Caro-Kann exchange variation and man was the endgame fun.
Just sort of fooled around a bit. Second game wasn't too horrible (but I had no idea how to continue), 1, 2.
Stockfish Level 2 is too easy and level 3 is too "meh" (can sometimes win if I'm focused) and I've noticed that very low rated bots just give up their queens sometimes.
Resigned after losing my queen, though I performed a "push" variation of the Caro-Kann without referring back to the video!
Lost that game and played my most humiliating game yet.
Started an interesting exchange variation, I have no idea where to go from here.
Finished yesterday's game, did not go well.
Started a really interesting game after the classical variation.
Continued learning the advanced variation.
Continued learning the advanced variation.
This one is just funny, got checkmated in 20 moves lol.
Learnt some lines against the Fanatasy Caro-Kann variation.
This may be the angriest I've been with myself over a chess game. Two major blunders from a Caro-Kann opening.
Continued with the Caro-Kann Defense.
Continued with the Caro-Kann Defense.
Continued with the Caro-Kann Defense.
Continued with the Caro-Kann Defense.
Started learning the Caro-Kann Defense via GothamChess and (sort of) played it against Stockfish Level 1.
For fun, I played against Stockfish Level 4 twice (1, 2). Will learn an opening tomorrow and practice it against Level 3 and 4.
Finished with Knight & Bishop Mate, which means I've finished the whole practice section!
Finished with 7th Rank Rook Pawn (Passive)!
Started with 7th Rank Rook Pawn (Passive).
Finished with 7th Rank Rook Pawn!
Continued with 7th Rank Rook Pawn. Will be done with this tomorrow!
Continued with 7th Rank Rook Pawn. Nearly done.
Continued with 7th Rank Rook Pawn.
Continued with 7th Rank Rook Pawn.
Started with 7th-Rank Rook Pawn, this section is quite long!
Finished Opposition, really cool practice section!
Finished the Direct Opposition part of Opposition.
Finished with Key Squares.
Started with Key Squares.
Continued with my Knight and Bishop Mate lesson.
Finished with Desperado.
Finished with Deflection.
Finished with Attraction
Finished with Counter Check.
Finished with Undermining.
Finished with X-Ray.
Finished with Interference, really interesting!
Finished with Zugzwang (my new favourite word) and Underpromotion
Finished with Overloaded Pieces and got close, but ultimately still resigned to Stockfish Level 4 after a long break.
Finished with Double Check and Zwischenzug.
Finished with Discovered Attacks.
Started with Discovered Attacks.
Finished The Fork! Will start Discovered Attacks tomorrow.
Continued with The Fork.
Started with The Fork.
Going to actually practice chess by learning theory and finishing my practice on lichess (+ doing a puzzle every day starting from tomorrow). Finished learning about skewers.
Lost two games (1, 2), one against Stockfish Level 4 and against a person in rapid.
I HAD TWO QUEENS AND I STILL STALEMATED STOCKFISH LEVEL 4! This is why there are so few grandmasters.
Resigned again in my final game against my brother.
Resigned against my brother.
Checkmated Stockfish Level 3, it shocks me how well made lichess is, all for free and open-source.
Continued my Knight & Bishop Mate lessons.
Learnt about the Greek Gift and won against my brother as black via resignation.
Lost a couple of games, but at least I beat level 3.
Lost countless number of times to bots and 2 times in Blitz, hope to see some improvement in 2022 for chess.
Lost to my brother twice in Blitz.
Stockfish Level 4 got a surprise checkmate for me as a belated Christmas gift...
Stockfish Level 4 is still out of reach, lost three games. (1, 2, 3)
Won against my brother via resignation.
Lost (badly) to Stockfish Level 4 in three games (1, 2, 3). At least I won twice against my brother.
Lost (badly) to my brother in chess.
Played 4 games against Stockfish Level 3 (1, 2, 3, 4) which resulted in 2 losses (1 checkmate and 1 resignation), a stalemate (which resulted in a facepalm) and a win!
Played 3 games against Stockfish Level 2 (1, 2, 3), I was so close to losing in the 3rd game, then the bot makes a huge, huge blunder by not taking my queen with his bishop, which led to checkmate.
Played 3 games against Stockfish Level 1 (1, 2, 3) and got checkmate in the first and last game. My revenge against Level 1 is complete.
Stalemated Level 1 again, how does this keep happening?
I am so bad at chess it's funny, I played three games (1, 2, 3) with the first being a loss to Stockfish Level 3, to boost my confidence I played against Level 1 and somehow lost and stalemated respectively.
Played two games this time (1, 2) and the second one was very interesting.
Played three games against Stockfish Level 3 and lost all three.
Checkmated Stockfish Level 2 as black!
So close to checkmating Stockfish Level 2! Alas, I stalemated.
Started with the Knight & Bishop Mate, messed up against Stockfish Level 2 and finished The Pin.
Got destroyed by Stockfish Level 2 and finished Piece Checkmates II.
Continued with Piece Checkmates II.
Started with Piece Checkmates II
Finished with Checkmate Patterns IV.
Started with Checkmate Patterns IV and had a fun game against Stockfish Level 1. Magnus might win today, but we'll see. (Edit: Draw.)
Finished Checkmate Patterns III. I smell a draw for today's match, both Magnus and Nepo will be well-rested. (Edit: I'm so sorry Nepo.)
Started with Checkmate Patterns III.
Continued with Checkmate Patterns II. I'm going to take a risk and say that Nepo wins today. Let's see if I'm right. (Edit: I was very wrong.)
Continued with Checkmate Patterns II. Magnus won the sixth game and he and Ian now have the longest game in a World Chess Championship!
Won against my dad with the black pieces via checkmate.
Started Checkmate Patterns II.
Completed Checkmate Patterns I. Pretty sure today's World Chess Championship match is going to be a draw. (Edit: I was right.)
Started with Checkmate Patterns I, what a crazy month for chess!
Finished Piece Checkmates I and got absolutely destroyed by Stockfish Level 2.
Started with Piece Checkmates I and played my first game on lichess v.s. Stockfish level 1.
Finished the "learning section" of the chess course!
Switched to lichess and started their chess course.
Damn, my game against Antonio today was incredible (even though I lost). I got 74 accuracy! Here's the game.
Completed the Value of the Pieces and had some fun learning about the Stafford Gambit
Antonio is really tough.
Antonio is tough.
Defeated Nelson with the black pieces! Here's the game.
Played 2 games with Nelson, and drew one!
Very close to winning against Nelson, but I eventually lost way too much material.
"One day Sven, one day." Well folks, that day finally came! I checkmated Sven with the black pieces!
Played several games online.
One day Sven, one day. Also played a really, really funny blitz game where my opponent only moved their king for the majority of the game.
Finished my weekly lesson.
Drew Sven due to a mouse slip. Here is the game.
Thinking about (seriously) playing online.
Had some fun with lower-rated bots.
Completed my weekly lesson. Moved away from Sven, and (for fun) I tried my hand at DanyaBot, I'm actually proud to say I only made 1 blunder (even though I lost).
I think I will put the bots on the side and try to actually study the game instead of brute-forcing it.
Same old, same old. I also had some fun analyzing games and learning the Caro-Kann. Later, I won against my dad with the black pieces via checkmate.
So close! I blundered my queen again. I'll get three crowns against Sven sooner or later.
I was so close but I blundered too many times.
1000 -> 1100 transition is tough.
Jumped around different bots. Need to defeat Sven with three crowns soon.
I played against Jimmy ~3 times, blundering my queen in the first two games, but winning in the last. Here's that last game. Later, I played two games against my dad, I think the first one was a draw? (no legal moves but not in check) and the second one was a win via resignation.
I finally defeated the pumpkin 3 days after Halloween. Here's the game. I also resigned against Sven again.
So close, but I hanged my queen accidentally.
I hate pumpkins. (Also, I completed a lesson on rook checkmates.)
Resigned against Sven for the quadrillionth time.
Tried to defeat the damn Pumpkin, was close but blundered the endgame.
Kept resigning against Sven. Later in the day, I learnt about the Scandinavian Defense and won against my dad with the white pieces via checkmate!
Kept resigning against Sven and finished the Assisted Checkmate lesson.
Jul 29, 2022-present
Designing a landing page for a project I've been accepted to. In addition, I'm helping with app integrations. Note that, due to organizational requirements, I'm being incredibly vague. Currently paused.
Continued with a recording.
Continued (?) with a recording.
Added suggestions and ideas.
Had an awesome team meeting! In addition, I compiled a few resources.
Had a productive meeting.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Had a productive meeting and continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Continued with some research.
Got started with some research.
Had a really productive meeting, which helped to solve some of standing technical/integration enquires.
Tested a Make integration to not much avail again.
Tested a Zapier integration to not much avail. I'll try another integration tomorrow.
Had a productive meeting.
Wrote-up and sent my findings on an organisational discount.
Wrote-up and sent my findings on apps for different scenarios.
Wrote-up and sent my findings on an app integration and pricing.
Finished with the sixth draft of the first section.
Had a productive meeting and finished with the fifth draft of the first section.
Finished with the fourth draft of the first section.
Finished (?) with the third draft of the first section.
Had a productive meeting and got started with the third draft of the first section.
Sep 02, 2022-present
Trying to learn as much as I can about AI safety in this fellowship! Currently paused (will try to attend a cohort in late 2022/early 2023)
Another great session with my cohort, though I don't know if I contributed that much to the conversation.
Had a great first meeting with my cohort and did okay on the exercise questions.
Oct 29, 2021-present
Trying to learn acoustic guitar via justinguitar.com. Currently inactive/paused due to exams.
Learnt some open 7th chords.
(Tried) to learn Hey You by Pink Floyd.
Freestyled to ease back in.
Continued with Module 4 practice.
"Learnt" the intro to Chop Suey! Drop C tuning is awesome.
Practiced a sliding power chord song that was recommended to us (why do almost all of them have iffy names?)
Got started with Module 4 practice.
Finished learning an easier version of Enter Sandman.
"Finished" with the Module 5 videos (sort of just skipped a few) and will get started with the practice tomorrow.
Played an electric guitar for the first time!
Finished a short video in the module. I guess I've been less motivated to continue with this module since it's so electric guitar focused (though maybe I'm wrong and my skill is to blame here, not the acoustic)
Sort of continued with the riff.
Learnt the first part of the first part of the Enter Sandman riff.
Finished with Palm Muting and Understanding Distortion. This module is irritating if you're using an acoustic. Why do you have to be so cool, electric?.
Finished with The Am Pentatonic Scale.
Finished with Power Chords (and sort of learnt Smells Like Teen Spirit?)
Got started with Power Chords.
Six days... Finished with the second iteration of Module 4 practice.
Continued with the second iteration of Module 4 practice. I finally understood why my guitar improv is so bad: I keep trying to play odd patterns.
Continued with the second iteration of Module 4 practice.
Got started with the second iteration of Module 4 practice.
Finished with the first iteration of Module 4 practice.
Continued with the first iteration of Module 4 practice.
Got my guitar repaired!
Continued with the first iteration of Module 4 practice, will be done with it tomorrow (welp, a guitar string broke again, so I'll try my best to get back to the practice ASAP).
Finished with the Module 4 videos and got started with the first iteration of Module 4 practice. I think I'm going to increase the number of iterations to three.
Finished dice songwriting. Really fun lesson! (even though I didn't do too much lol)
Finished learning about the songs for this module (excited for the fingerstyle songs for the first iteration).
Finished some ear training, felt pretty disheartened after getting the last exercise wrong.
Had fun with this lesson.
It took roughly a week but I can finally play Happy Birthday on my own!
Hopefully I should be able to play it tomorrow...
So close to playing Happy Birthday on my own!
Continued with learning Happy Birthday, about two-thirds of the way there.
Continued with learning Happy Birthday.
Got started with learning Happy Birthday and had some fun with learning All Falls Down (I guess I've learnt it? It sounds pretty bad though).
Learnt more about fingerstyle playing.
Had fun playing How Much A Dollar Cost with these chords (simplified) (only the F#, F and Dm sounded okay lol)
Finished with shifting the F chord. The way Justin played the F chord reminded me How Much a Dollar Cost by Kendrick Lamar. I'm going to try to play that tomorrow.
Got started with Module 11 with some sus chords, I really like the transition from A sus2 to A sus4.
Finished with the second iteration of Module 10 practice!
Continued with the second iteration of Module 10 practice. Nearly done!
Continued with the second iteration of Module 10 practice.
Continued with the second iteration of Module 10 practice, I thought I forgot the C Major scale but nope, my guitar was just slightly out of tune lol.
Got started with the second iteration of Module 10 practice.
Finished with the first iteration of Module 10 practice! Also, small correction: I don't use the songbook tab on JustinGuitar.com (since it forces the song into three categories, which I don't like) and instead I just like the play-through video (which acts as a songbook).
Continued with Module 10 practice and added two songs to my songbook!
Continued with Module 10 practice, F (with bar) chord is shaping up to be pretty decent now (similar sounding to a Fmaj7) but the change from F to C is slow for me lol.
Continued with Module 10 practice and did some really bad C Major improvisation (why did I choose the thinnest string?)
Continued (?) with Module 10 practice.
Finished with the Module 10 videos and got started with the first iteration of Module 10 practice (sort of, I need to start over with the C major scale alternate picking).
Learnt some common chord progressions.
Finished with La Bamba Riff (learnt the double note variation).
Finished with Beginner Hammer-ons which are super tricky and learnt the single note variation of the La Bamba riff, which is super awesome.
Finished with The Rhythm Push and also discovered that the 11th fret of the thinnest string sounds almost exactly like the "siren" sample in Use This Gospel.
Finished with Alternate Picking C Major and Major Scale Improvisation (really excited to start guitar improv in this module's practice!)
Finished with F chord changes and feeling the frets.
Learnt about the weak finger G (which I dislike, for now...) and the A mini barre (which I kinda dig)
Finished the second iteration of Module 9 practice! Will start Module 10 tomorrow.
Continued with the second iteration of Module 9 practice.
Continued with the second iteration of Module 9 practice.
Got started with the second iteration of Module 9 practice.
Finished the first iteration of Module 9 practice, will start the second iteration tomorrow.
I did it! I learnt the C Major Scale! I leveraged the previous pattern I learnt for the note circle.
Continued with the first iteration of Module 9 practice and played One by U2.
Continued with the first iteration of Module 9 practice. Something barely impressive: I can play the C-G-D-A-Em chord transition without looking at the guitar (kind of).
Continued with the first iteration of Module 9 practice, the guitar chords Notion page is extremely handy!
Revised the Em Pentatonic Scale.
Continued with the first iteration of Module 9 practice.
Got started with the first iteration of Module 9 practice.
Finished with the Module 9 lessons, will be on the practice for some time (due to the C Major scale lol)
Finished with the Red Hot Chili Peppers riff (minus the chords, might do that for fun).
Got my guitar strings replaced, I've never heard a guitar so out of tune before lol.
It wouldn't be a JustinGuitar module without an odd finger training exercise. I was planning on finishing up the Red Hot Chili Peppers riff today (since it's pretty easy) but my D string broke :(
Finished with more advanced 16th note strumming.
Got done with compiling all the chords in a Notion page.
Changed my mind, the C Major scale got to me lol. I'll start the chord book work tomorrow.
Finished with All Stop Mute and creating a chord book (which I will do from tomorrow instead of the videos.)
Finished with learning the F chord and its variations. It honestly isn't impossible but it certainly is tricky. Maybe I'm just lucky.
Finished with the second iteration of Module 8 practice! Will start Module 9 and the dreaded F chord soon.
Continued with the second iteration of Module 8 practice, nearly done.
Continued with the second iteration of Module 8 practice.
Started with the second iteration of Module 8 practice, why does my E min7 chord sound so bad?
Finished with the first iteration of Module 8 practice! I'll start it all over again tomorrow.
Continued with Module 8 practice.
I think I'm done learning the riff! I'll check back tomorrow to see if I still remember it.
Continued with the Wish You Were Here riff.
I've been listening to Wish You Were Here by Pink Floyd in preparation for finishing the riff. I guess it helped a bit? Anyways, almost finished learning the riff and just a few more items are left for the first iteration of Module 1 practice!
Continued with Module 8 practice.
Continued with Module 8 practice. I stink at Big G to D chord transitions.
Memorized all the Stuck 3&4 chords!
3 days... Anyways, I've finished with all the content and I'll start with the practice tomorrow (for real this time!), it'll probably last ~2 weeks since I'll repeat it.
Finished with the Wish You Were Here riff video, sort of got the introduction down. Will start the practice soon!
Finished with Notes in Open Position and got started with the Wish You Were Here riff, the riff is super hard!
Finished with Pick Manipulation.
Finished with All Down 8th Note Strumming, really had a lot fun today in this lesson! Strumming can sometimes be fun.
Finished with Muting Strings Deliberately.
I have no excuses for not playing guitar for 4 days. Anyways, learnt about a new exercise routine and the Open Em Pentatonic scale.
Learnt a ton of chord variations. Going to be slightly hard to remember and practice all of them :(
Finished Module 7 practice. Going to start Grade 2 (in guitar!) on the weekend.
It's been a while and I finished memorizing two more songs (mainly Mad World) and I only have two more before I finish all my pre-requisites! The memorizing and practising also continued my Module 7 practice.
Continued with Module 7's practice.
Finished all the content of the last module for Grade 1 and got started with the practice, this (and the last pre-requisite) should be done in about 2 weeks time.
Finished all the pre-requisites for Grade 2 except for memorizing the songs, still have 4-ish left.
We did it! We'll soon be in Grade 2 after I complete the pre-requisites and the practice for this module.
Learnt about the extra modules that JustinGuitar provides (outside of the grades).
Learnt more about Dynamics.
Learnt about open strings between chord changes and feel good strumming.
Learnt about the best chord changes to practice and air changes.
Started the last module with a revision on the 8 basic chords.
Finished with the second iteration of practice (!) and practised Mad World. Will start the last module of Grade 1 tomorrow.
Continued with the second iteration of practice and Hey Joe. Nearly done.
Continued with the second iteration of practice and Hey Joe.
Started the second iteration of practice and added Hey Joe and Mad World to my songbook!
Finished Module 6 practice and played quite alright for this module's song, Hey Joe.
Continued with Module 6 practice, I only have the song practice left!
Continued with Module 6 practice.
Started with Module 6 practice. After this and the second iteration, I will have moved on to the last module of Grade 1!
Finished Module 6! Will start the practice soon.
Learnt a strumming pattern in 6:8 timing and string names.
Learnt about 6:8 timing.
Learnt about alternate picking and a variation of the G chord.
Finished the second iteration of practice and added Black to my songbook!
Only song practice is left for the second iteration of practice! Also, I am very bad at transitioning from C chord to E chord.
Continued the second iteration of practice.
Sorry, I forgot what tomorrow meant, anyways, I started with the second iteration with the odd finger stretching exercise and the riff practice, will continue with the iteration tomorrow...
Completed the first iteration! Will start the Module 5 practice once again tomorrow.
Continued with Module 5 practice. Only song practice is left for iteration 1.
Continued with Module 5 practice.
Started with Module 5 practice.
Finished Module 5, will take the next week solely for practice. Also going to build a songbook next week.
Watched the Songs For Module 5 video and tried my hands at Daft Punk, let's just say that I'll be practising Daft Punk for a while...
Learnt about music theory and notes in guitar.
Learnt more about strumming.
Learnt the Come As You Are riff.
Finished with Justin's strumming tips.
Got a little more than half-way through with Justin's strumming tips.
Learnt the C Chord.
Finished the second iteration of Module 4 practice and played 505 and Chocolate Jesus! I'll start Module 5 tomorrow.
Continued with Module 4 practice, nearly done!
Started with the second iteration of Module 4 practice.
Finished the first iteration of Module 4 practice, had fun playing 505 and Chocolate Jesus.
Continued with Module 4 Practice, I'll probably finish with this practice after I do the whole thing twice.
Website is back up and continued with Module 4 practice.
Continued with 505 as the website is still broken.
Sort of freestyled a bit since the website seems to be broken.
Continued with 505, the strumming pattern is hard to master!
Continued with 505.
Started learning 505 by Arctic Monkeys as part of my guitar practice, really nice song.
Learnt the riff to Sunshine Of Your Love by Cream, hoping to learn much more in December.
Learnt about the most common strumming patter in guitar.
Learnt about the metronome in guitar.
Learnt the D Minor chord, really cool chord! Sounds much moodier than the other minor chords I've learnt.
Continued with JustinGuitar and learnt about this odd finger stretching exercise.
Went back to Three Little Birds.
Freestyled for a bit.
Easing back into guitar.
Finishing the whole practice was way too ambitious. I could only get done with the Seven Nation Army riff practice.
Finished with Three Little Birds, hope to finish Module 3 practice tomorrow.
Continued with Three Little Birds, the A to E to D transition is really hard.
Continued with Three Little Birds.
Practiced Three Little Birds by Bob Marley. Beautiful song!
Been some time, and learnt the Seven Nation Army riff.
Learnt about strumming with up strums, and using it after the 2nd beat.
Learnt about up strums.
Aug 02, 2022-present
I alternate between the guitar and the drums. Trying to get better every day and have some fun as well! Currently inactive/paused due to exams.
Played Fever by The Black Keys.
Played I Want to Break Free by Queen.
Finished learning Back in Black by AC/DC. The snare-kick-hi-hat pattern was the only thing I had to get down.
Played Back in Black by AC/DC.
Played Yellow by Coldplay.
Aug 10, 2022-present
Trying to create a paper which presents a framework that protects the benefits of open research in AI. Inspired by Toby Shevlane and Allan Dafoe's work as well as Nick Bostrom's work. Currently inactive/paused.
Continued writing the introduction.
Continued writing the introduction.
Added some citations.
Continued writing the introduction.
Continued writing the introduction, will take some more time.
Continued writing the introduction, nearly done (sort of).
Didn't do much writing but that's alright.
Continued writing the introduction.
Continued writing the introduction.
Continued writing the introduction.
Continued with reading.
Continued with reading.
Got started with some reading.
Got started with the paper, will have to finish some reading tomorrow before continuing with the introduction. I hope to finish writing in about 3 months (and then get some feedback).
Mar 15, 2022-present
Trying to learn A.I. by leveraging pre-existing knowledge. Currently paused.
Well, it looks like they've released a new version of the course for this year (looks pretty awesome). I'll be sure to come back to this project after my Coursera courses.
Continued with Lesson 8.
Continued with Lesson 8.
Continued with Lesson 8.
Continued with Lesson 8.
About half way through with Lesson 8.
Continued with Lesson 8.
Continued with Lesson 8.
Got started with the last lesson for the foreseeable future.
"Finished" with the Lesson 5 questionnaire.
Continued with the Lesson 5 questionnaire.
Got started with the Lesson 5 questionnaire.
Finished with the Lesson 5 video, will try to finish the questionnaire by the end of this week.
"Continued" with Lesson 5.
"Continued" with Lesson 5.
Continued with Lesson 5. ~15 minutes left so should finish up tomorrow.
Continued with Lesson 5.
"Continued" with Lesson 5.
Continued with Lesson 5.
Continued with Lesson 5.
Continued with Lesson 5.
Continued with Lesson 5.
Continued with Lesson 5.
Sort of got started with Lesson 5.
"Finished" with the Lesson 4 questionnaire, will start Lesson 5 tomorrow.
Continued with the Lesson 4 questionnaire.
Continued with the Lesson 4 questionnaire.
Continued with the Lesson 4 questionnaire.
Continued with the Lesson 4 questionnaire.
Continued with the Lesson 4 questionnaire.
Continued with the Lesson 4 questionnaire.
Got started with the Lesson 4 questionnaire.
Finished with the Lesson 4 video, will move on to the questionnaire.
Continued with Lesson 4, nearly done. The softmax function is pretty awesome.
Continued with Lesson 4.
Continued with Lesson 4 by revising the notebook.
Continued with Lesson 4.
Continued with Lesson 4 (I definitely want to make SGD from scratch after this lesson as a recap exercise).
"Continued" with Lesson 4 (just ran the cells I hadn't run during the video).
Continued with Lesson 4.
Continued with Lesson 4.
Continued with Lesson 4, I was sort of leaving the notebook aside lol so I got to that.
Continued with Lesson 4.
Got started with Lesson 4.
Finished with the Lesson 3 questionnaire!
Continued with the Lesson 3 questionnaire.
Continued with the Lesson 3 questionnaire. Broadcasting is pretty neat.
Continued with the Lesson 3 questionnaire.
Continued with the Lesson 3 questionnaire.
Continued with the Lesson 3 questionnaire.
Got started with the Lesson 3 questionnaire.
Did some Microsoft admin work related to fast.ai.
Finished with the Lesson 3 video, will start the questionnaire tomorrow.
Continued with Lesson 3.
Continued with Lesson 3. Didn't know that gradient descent originated with Issac Newton.
Continued with Lesson 3.
Continued with Lesson 3.
Continued with Lesson 3.
Continued with Lesson 3. I guess this page counts as blogging?
Continued with Lesson 3.
There were a few questions that I skipped (since I don't think they were discussed in Lesson 2) but other than that I've finished the questionnaire for Lesson 2! Will continue Lesson 3 tomorrow.
Finished the project.
Continued with the Lesson 2 questionnaire and I've nearly finished with the project for Lesson 2 (it's a cloud classifier!)
Continued with the Lesson 2 questionnaire.
Lesson 3 will be on hold as I completely forgot about the questionnaire for Lesson 2! Got started with that.
Continued with Lesson 3.
Continued with Lesson 3, we created a small bear classifier app within the Jupyter Notebook which was awesome. I tried putting in a polar bear (we've only trained our model on grizzly bears, black bears and teddy bears) and I got back a prediction of grizzly bear with ~82% confidence. Hm.
Continued with Lesson 3, the ImageClassiferCleaner GUI is awesomely cool. Jupyter Notebook is darn powerful.
Got started with Lesson 3.
Trained my model with the API key, will start Lesson 3 tomorrow.
Got the API key!
The replacement looks pretty complicated to set-up, so I might have to go through with Microsoft. Finished Lesson 2, will start Lesson 3 after the Microsoft stuff.
Found a replacement for the Bing Search API through the forums.
Continued with Lesson 2. I now need to do admin stuff for the last few sections of Lesson 2 :(
Continued with Lesson 2.
Continued with Lesson 2, I was expecting P values to be this great statistical analysis tool, but nope.
Continued with Lesson 2, Jeremy's example on P values was incredible.
Continued with Lesson 2. Transfer learning is such a neat and efficient use of compute (time and computational resources).
Continued with Lesson 2.
Got started with Lesson 2.
Finished with Lesson 1's questions, will start Lesson 2 tomorrow.
Continued with Lesson 1's questions, almost done!
Finished with the Lesson 1 video and got started with the questions.
Continued with Lesson 1.
Continued with Lesson 1. We had to train a classifier that classified an image as a cat or a dog. I tried putting an image of a tiger and a wolf (which are technically a cat and a dog respectively but not really) and it actually gave true and false for the question "Is this image a cat?" respectively!
Got started with Practical Deep Learning for Coders. Really excited!
Oct 28, 2021-Oct 04, 2022
I learnt a bit of Hindi and French with Duolingo and earned a Level 5 Trophy for Hindi.
After more than a year (402 days) and reaching legendary in all but ~3 Hindi skills, I'm happy to call this project done :)
Hit a 401-day streak.
Hit a 400-day streak and reached legendary for Activity in Hindi. I'll (try to) finish this project tomorrow.
Hit a 399-day streak. Will finish this project this month.
Hit a 398-day streak.
Hit a 397-day streak.
Hit a 396-day streak.
Hit a 395-day streak.
Hit a 394-day streak.
Hit a 393-day streak and reached legendary for "Home" in Hindi.
Hit a 392-day streak.
Hit a 391-day streak.
Hit a 390-day streak.
Hit a 389-day streak.
Hit a 388-day streak.
Hit a 387-day streak.
Hit a 386-day streak.
Hit a 385-day streak and reached legendary in Adjectives in Hindi.
Hit a 384-day streak.
Hit a 383-day streak.
Hit a 382-day streak.
Hit a 381-day streak.
Hit a 380-day streak.
Hit a 379-day streak.
Hit a 378-day streak.
Hit a 377-day streak.
Hit a 376-day streak.
Hit a 375-day streak.
Hit a 374-day streak.
Hit a 373-day streak.
Hit a 372-day streak.
Hit a 371-day streak.
Hit a 370-day streak.
Hit a 369-day streak.
Hit a 368-day streak.
Hit a 367-day streak.
Hit a 366-day streak.
Hit a 365-day streak!
Hit a 364-day streak.
Hit a 363-day streak.
Hit a 362-day streak.
Hit a 361-day streak.
Hit a 360-day streak. 5 more days.
Hit a 359-day streak.
Hit a 358-day streak.
Hit a 357-day streak.
Hit a 356-day streak.
Hit a 355-day streak. 10 more days.
Hit a 354-day streak.
Hit a 353-day streak. I didn't reach legendary in every skill but that's alright.
Hit a 352-day streak.
Hit a 351-day streak.
Hit a 350-day streak. I'll try to get to legendary in all the non-legendary Hindi skills in the next two days.
Hit a 349-day streak.
Hit a 348-day streak.
Hit a 347-day streak.
Hit a 346-day streak.
Hit a 345-day streak. 20 more days.
Hit a 344-day streak.
Hit a 343-day streak.
Hit a 342-day streak.
Hit a 341-day streak.
Hit a 340-day streak.
Hit a 339-day streak.
Hit a 338-day streak.
Hit a 337-day streak.
Hit a 336-day streak.
Hit a 335-day streak. 30 more days.
Hit a 334-day streak.
Hit a 333-day streak.
Hit a 332-day streak.
Hit a 331-day streak and got legendary on Work in Hindi!
Hit a 330-day streak. 35 more days.
Hit a 329-day streak.
Hit a 328-day streak.
Hit a 327-day streak.
Hit a 326-day streak.
Hit a 325-day streak.
Hit a 324-day streak.
Hit a 323-day streak.
Hit a 322-day streak.
Hit a 321-day streak.
Hit a 320-day streak.
Hit a 319-day streak.
Hit a 318-day streak.
Hit a 317-day streak (and actually hit my daily goal this time).
Hit a 316-day streak.
Hit a 315-day streak. 50 more days.
Hit a 314-day streak.
Hit a 313-day streak.
Hit a 312-day streak.
Hit a 311-day streak and reached legendary in Family.
Hit a 310-day streak.
Hit a 309-day streak.
Hit a 308-day streak.
Hit a 307-day streak.
Hit a 306-day streak.
Hit a 305-day streak.
Hit a 304-day streak.
Hit a 303-day streak.
Hit a 302-day streak.
Hit a 301-day streak.
Hit a 300-day streak. ~2 more months to go!
Hit a 299-day streak.
Hit a 298-day streak. 13 more skills left for legendary in Hindi.
Hit a 297-day streak.
Hit a 296-day streak.
Hit a 295-day streak.
Hit a 294-day streak.
Hit a 293-day streak.
Hit a 292-day streak.
Hit a 291-day streak.
Hit a 290-day streak.
Hit a 289-day streak.
Hit a 288-day streak.
Hit a 287-day streak.
Hit a 286-day streak.
Hit a 285-day streak.
Hit a 284-day streak and reached legendary in Food in Hindi!
Hit a 283-day streak.
Hit a 282-day streak.
Hit a 281-day streak. Incroyable!
Hit a 280-day streak.
Hit a 279-day streak. Why bother with inversion when Est-ce que/qu' seems to work everywhere in French when asking a question? Inversion to me is comparatively much harder.
Hit a 278-day streak.
Hit a 277-day streak.
Hit a 276-day streak.
Hit a 275-day streak.
Hit a 274-day streak and reached legendary on Nature in Hindi!
Hit a 273-day streak.
Hit a 272-day streak.
Hit a 271-day streak. Seven euros for a cappuccino?!
Hit a 270-day streak.
Hit a 269-day streak.
Hit a 268-day streak.
Hit a 267-day streak.
Hit a 266-day streak.
Hit a 265-day streak and unlocked the next set of stories!
Hit a 264-day streak. Why do we have grammatical gender?
Hit a 263-day streak.
Hit a 262-day streak.
Hit a 261-day streak and got to legendary for Food 2 in Hindi!
Hit a 260-day streak.
Hit a 259-day streak.
Hit a 258-day streak.
Hit a 257-day streak.
Hit a 256-day streak.
Hit a 255-day streak.
Hit a 254-day streak.
Hit a 253-day streak.
Hit a 252-day streak and got to legendary for Day/Month in Hindi!
Hit a 251-day streak.
Hit a 250-day streak! Back to some legendary progress for Hindi.
Hit a 249-day streak. One more day!
Hit a 248-day streak. Two more days!
Hit a 247-day streak. Three more days!
Hit a 246-day streak. Four more days!
Hit a 245-day streak. I feel like my reading/listening in French has improved quite a bit with the stories.
Hit a 244-day streak.
Hit a 243-day streak.
Hit a 242-day streak.
Hit a 241-day streak and wasted a legendary attempt :(
Hit a 240-day streak and got to legendary for Numbers (Hindi).
Hit a 239-day streak.
Hit a 238-day streak.
Hit a 237-day streak.
Hit a 236-day streak.
Hit a 235-day streak.
Hit a 234-day streak.
Hit a 233-day streak and tested out of a bunch of skills lol.
Hit a 232-day streak.
Hit a 231-day streak and practiced speaking French with my Focusmate!
Hit a 230-day streak.
Hit a 229-day streak.
Hit a 228-day streak.
Hit a 227-day streak.
Hit a 226-day streak.
Hit a 225-day streak.
Hit a 224-day streak.
Hit a 223-day streak.
Hit a 222-day streak.
Hit a 221-day streak.
Hit a 220-day streak.
Hit a 219-day streak. I'm ~91% done with the 20000 XP achievement!
Hit a 218-day streak.
Hit a 217-day streak.
Hit a 216-day streak.
Hit a 215-day streak.
Hit a 214-day streak.
Hit a 213-day streak.
Hit a 212-day streak.
Hit a 211-day streak. Lundi, mardi, mercredi, jeudi, vendredi, samedi and dimanche!
Hit a 210-day streak.
Hit a 209-day streak.
Hit a 208-day streak, I wonder when I'll get the legendary trophy for Hindi.
Hit a 207-day streak.
Hit a 206-day streak.
Hit a 205-day streak.
Hit a 204-day streak.
Hit a 203-day streak.
Hit a 202-day streak.
Hit a 201-day streak.
Hit a 200-day streak! I got 3 days of Duolingo Plus for free, so the speedrun for the legendary Hindi trophy is back on.
Hit a 199-day streak, 1 more day!
Hit a 198-day streak, 2 more days!
Hit a 197-day streak, 3 more days!
Hit a 196-day streak, 4 more days!
Hit a 195-day streak, 5 more days!
Hit a 194-day streak, 6 more days!
Hit a 193-day streak, 7 more days!
Hit a 192-day streak, 8 more days!
Hit a 191-day streak.
Hit a 190-day streak. Need to test out of a few skills now that I have 25 lingots.
Hit a 189-day streak.
Hit a 188-day streak.
Hit a 187-day streak.
Hit a 186-day streak.
Hit a 185-day streak.
Hit a 184-day streak. I've been neglecting to practice Hindi and so I switched over and saw that I only had 2 skills that had to be restored. I guess they want me to stick with French?
Hit a 183-day streak.
Hit a 182-day streak.
Hit a 181-day streak.
Hit a 180-day streak!
Hit a 179-day streak and tested out of a ton of skills in French.
Hit a 178-day streak. The stories in French are really funny, wish they had some for Hindi too.
Hit a 177-day streak.
Hit a 176-day streak. Wondering if I'll get some days of Duolingo Plus for free when I hit 200.
Hit a 175-day streak.
Hit a 174-day streak.
Hit a 173-day streak.
Hit a 172-day streak.
Hit a 171-day streak.
Hit a 170-day streak.
Hit a 169-day streak.
Hit a 168-day streak.
Hit a 167-day streak.
Hit a 166-day streak.
Hit a 165-day streak.
Hit a 164-day streak.
Hit a 163-day streak.
Hit a 162-day streak.
Hit a 161-day streak.
Hit a 160-day streak!
Hit a 159-day streak.
Hit a 158-day streak.
Hit a 157-day streak.
Hit a 156-day streak.
Hit a 155-day streak.
Hit a 154-day streak.
Hit a 153-day streak, couldn't get all the skills in the first section to legendary and my free three days ends today, but I've made a ton of progress so I'm happy.
Hit a 152-day streak.
Hit a 151-day streak and continued with my legendary speedrun in Hindi. I only have a few more skills to reach in the first section.
Hit a 150-day streak and got 3 days free of Duolingo Plus! I've already started getting legendary on all of my Hindi skills since now I don't have to wait to get 10 virtual currencies.
Hit a 149-day streak, एक और दिन!
Hit a 148-day streak.
Hit a 147-day streak, 3 more days!
Hit a 146-day streak.
Hit a 145-day streak, 5 more days!
Hit a 144-day streak.
Hit a 143-day streak.
Hit a 142-day streak.
Hit a 141-day streak.
Hit a 140-day streak and earned legendary in Health (Hindi)!
Hit a 139-day streak.
Hit a 138-day streak.
Hit a 137-day streak, I'm about 8 days away from reaching the 12,500 XP achievement!
Hit a 136-day streak.
Hit a 135-day streak, 15 more days till 150!
Hit a 134-day streak and tested out of Level 3 in People (French).
Hit a 133-day streak.
Hit a 132-day streak.
Hit a 131-day streak and (finally) tested out Travel (French)
Hit a 130-day streak and failed to skip Level 5 in Travel (French) again.
Hit a 129-day streak.
Hit a 128-day streak, some how managed to fail skipping Level 5 in Travel (French).
Hit a 127-day streak.
Hit a 126-day streak.
LET'S GO I finally continued my legendary progress in Health in Hindi (I was so close to failing also, I had one mistake left lol) and I reached the 125-day streak achievement!
Hope to see me pick up more French skills (considering 2022 will be the last year of French in my curriculum) and continue my progress in Hindi in 2022!
Hit a 124-day streak, एक और दिन!
Hit a 123-day streak.
Hit a 122-day streak. 3 more days!
Hit a 121-day streak, 125 coming soon. I failed to get legendary in Health in Hindi again, twice in a row. Why does this keep happening? Health was one of the easier skills in the Hindi course...
Hit a 120-day streak!
Hit a 119-day streak and failed (again) to get legendary on Health in Hindi.
Hit a 118-day streak, 120 coming soon! I found this funny forum post.
Hit a 117-day streak, it'll take forever to earn enough currency to get legendary on all skills in Hindi.
Hit a 116-day streak.
Hit a 115-day streak, here's me hoping for more Hindi content soon.
Hit a 114-day streak.
Hit a 113-day streak, try typing a large number into Google Translate, translate it into Hindi and hit listen.
Hit a 112-day streak.
Hit a 111-day streak.
Hit a 110-day streak.
Hit a 109-day streak.
Hit a 108-day streak.
Hit a 107-day streak.
Hit a 106-day streak.
Hit a 105-day streak.
Hit a 104-day streak.
Hit a 103-day streak.
Hit a 102-day streak.
Took the French placement test and only unclocked 5% of the French course.
100 DAY STREAK and reached the Level 5 Trophy! I also added French as a course since I already know a good chunk of French.
Hit a 99-day streak and tested out of Modals, only one more test to go before I reach a Level 5 Trophy in Hindi and one more day till a 100 streak!
Hit a 98-day streak, two more days!
Hit a 97-day streak, three more days to go!
Hit a 96-day streak, was really close to testing out of Modals, but alas.
Hit a 95-day streak, still can't test out of Modals.
One month of consistent Hindi practice!
Hit a 93-day streak, if all goes well, I will be finishing the Hindi course day after tomorrow!
Hit a 92-day streak.
Hit a 91-day streak and tested out of Past 2, only Modals is left!
Hit a 90-day streak, 10 more days to go!
Hit an 89-day streak.
Hit an 88-day streak.
Hit an 87-day streak.
Hit an 86-day streak.
Hit an 85-day streak.
Hit an 84-day streak.
Hit an 83-day streak and tested out of Past, only two more skills to go!
Hit an 82-day streak.
Hit an 81-day streak and tested out of Convo! Wondering how to progress after completing the course.
Hit an 80-day streak and finally tested out of Future!
Hit a 79-day streak, I can feel the coveted 100 coming soon!
Hit a 78-day streak and failed to test out of Convo.
Hit a 77-day streak.
Hit a 76-day streak and someone helped me on the forum!
Hit a 75-day streak and asked for help with future tense in Hindi on the forum.
Hit a 74-day streak. I hate the future tense in Hindi.
Hit a 73-day streak.
Hit a 72-day streak.
Hit a 71-day streak, can someone please explain to me future tense in Hindi?
Hit a 70-day streak!
Hit a 69-day streak. I also learnt that if you wanted to say "I have to eat food" in Hindi, you have to repeat "खाना" twice. ("मुझे खाना खाना है")
Hit a 68-day streak.
Hit a 67-day streak and tested out of Day/Month.
Hit a 66-day streak!
Hit a 65-day streak and tested out of Day/Month.
Hit a 64-day streak, why did this session take so long?
Hit a 63-day streak (I messed up the counting) and tested out of Time! (the most annoying one)
Hit a 61-day streak (and was so close to messing up testing out of Level 3 Time!)
Hit a 60-day streak and tested out of Comparison!
Sep 10, 2022-Oct 01, 2022
Attended a local AI program. Due to privacy reasons, I was being incredibly vague.
Welp, the program got cancelled. I'll see if I can attend it next year.
Had a great first pre-requisite class! Excited to be brushing-up on some ML models next week.
Jul 08, 2022-Sep 03, 2022
Re-designed EA Bristol's website. The latter project mentioned (which ended on Aug 09, 2022) was entangled with the former and I will be vague when describing the latter project in the logs.
Sent over the design file, which marks the end of this nearly two-month project!
Got started with a triangle for the hero section (it's a lot trickier than it sounds!)
Got started with the navigation bar.
"Got started" with programming.
Continued with the design, will start programming tomorrow.
Overhaul for one of the pages is done (?), will collect everything tomorrow for a second overall draft.
Sent over an overall draft and worked on slightly overhauling one of the pages.
Yep, it is. Finished a draft of the last (?) page.
I think this project is back from the dead?
There may be a few more developments, but I consider the booking project done! Also, the EA Bristol project has been dropped, so this project as a whole is done.
Nearly done with migration (and the booking project)
Got started with migration (nearly done?)
Got started with a calendar event generator.
Added organisation pictures for the booking project and the ability to review your booking.
Sent the booking project.
Finished with authentication.
Nearly done with authentication!
Continued with authentication, need to start from scratch with authentication from tomorrow as I'm making very little progress.
Continued with authentication.
Alright, a small hiccup but another project has been entangled with this project. All (?) gaps can be explained as me working on the latter project.
Anyways, continued with authentication.
Finished (?) with the hero section and finished the first draft of the about us page.
Toyed around with mosaics.
Finished with the third draft of the "hero section" and got some feedback and also got started with the about us section.
Finished with the second draft of the "hero section" and got feedback.
Finished with the first draft of the "hero section" and got feedback.
Got started with a component.
Aug 08, 2022-Aug 08, 2022
I was getting increasingly dissatisfied with Bear Blog (where this website was formerly). So I decided to migrate to Next.js and I made a template that I posted on Show HN.
Jul 10, 2022-Aug 07, 2022
Trying to co-lead a rationality club in my school. We've finished the first edition of SOLARIS!
Fifth meeting happened, which means the first edition of SOLARIS is complete! While there have been a few hiccups en route, it was generally a good time. I hope more people come for the second edition!
Finished the feedback form for tomorrow.
Fourth meeting happened with much better attendance and overall a pretty fruitful discussion! I'm happy to have had that with the most important week.
Third meeting happened without much fanfare. Hopefully attendance is higher next meeting.
Worked on next meeting's presentation.
Second meeting happened yesterday: Attendance improved a lot and it was a bummer that I couldn't attend fully.
First meeting happened day before yesterday: even though it was a fair amount of fun, I messed up the recording and we unfortunately had low attendance.
Apr 28, 2022-Jul 01, 2022
Not exactly sure why, but I spent some time trying to solve at least one sudoku every Friday & Saturday. The odd notation you see encodes the puzzle, you can parse it here (note that you may need to provide ~2-3 more guesses for it to solve it).
Aujourd'hui, j'ai joué une puzzle facile: 593.7.64..1.94.83.47...3....4....7.9835..4.6....152..41.48...2...956...8..642.5..
Let's forget about this one, shall we? ....1..3...4..6..18..49..2...7.49....3..........3..68...69.2.4..82.6.7......7....
Solved an easy one, call this preparation for day after tomorrow's medium puzzle: .62...3.9.8.6..47.9..5.2.1...3.5.2.....72394.2.94.86.7624.7....1.8...724....94..8
Solved a medium sudoku without misusing the guess checker! ........2...6.4.9..5...8.4.1..4......9..7.48.2.......6..8......6.5.1.....2....6.9
So close it hurts (at least I'm getting better): ..12.............1.7..5.8...3..726..81..6..5...4.....2647.......8..4........37..9
Less close this time: 9....71.6.61.9.......5........6..53.....3.68.1..4.......3....9.2.5........8..9..7
I was pretty close, but nope: .......59.3.......2.6..5.4..8..2........9...75.7.....6..1..37...4.6.......8.791.5
Nope x2: 3.92.6..82.657.3.....8..246..1.6.48.96..81.2..73...96.695.....24...39..5.3...56..
Nope: ...1523..3..........4....89..5..7.916.78....3.1........6..4.91...3...6247........
See you next Friday I guess: ..1......53..7.6....79..43.2..7........8...9...4.6......9....187....3..6..8...2.7
Easy puzzle this time around: ..3514.8.162....494.8...137.3..812..2864.......49.28.....12.97.891.....5...35...8
Sigh: ...2..8.........64.6.1.........19.5.9.........52.8..31.8...6..9.1....57.42.......
So close it's frustrating: 1....5..9..9..8...35.16............1..3...72.6.529.3.......7..6.......8....4..13.
Didn't have much time today so I had to give up less than 10 minutes in, though I feel like I am improving: .56.3...73....21.......8.56..18........4..52.83..69........5.9..9....6..2.3......
Nope: ......2.464.....5325.13.6..81.7.....9.64....1......9.....39...5....82..........9.
Sigh, I was so close to solving this without giving up and misusing the guess checker: 1..........2.693....7..3....21.....8....52.4....3..25......18..7.......6.64.....1
Another easy puzzle: ..63.2.8..41.5.2362..18...4795.1.....8.69.1..1.....495...4.3529..7..1..34539.....
I was short on time today so I went back to an easy puzzle: 3.1.6.7..827.3..1...6.21..4.3.6.4.292..39.16.76..1....6.2...9...9.2.6....1894..36
Back to square-1 I guess: .....4..61.62....3..86...7.7.9.43.......7.1.........2.5.7.....42.....86..8..9....
Took me 27 minutes, but I solved a medium sudoku without misusing the guess checker!: ...9..87....67.....6...45....61..2....4..2....27...4......16..8.....97.153.......
Sigh: 2..4....94.7.......6..8....7...9.165.....12....23...9...97.28.3...9....13.4......
I was so close to not giving up, but alas: 65.........7.1.3......7...1.1....8..5..6.24..9.6..4.3.....9..6.8......5...3..7...
Medium puzzle progress has been slow: 8........2..63.......1..29.6....8.31.....7..2..2...9681..8....9.7...9.........34.
Again, went back to an easy puzzle: .6472.8..2.1....5.3..691..4.2..897...8.4.7362547..3...8..5...37..534...6....7..21
I basically gave up mid-way with today's medium puzzle: 8.3...2..9.....3.6...9...7.......145.7....8.....8.6..94...1....51.2.8.....6..9...
Went back to an easy puzzle: ..81..6.5.3..8421.91.2..4...54..6.28129...54....542.....2...167..1.29.5.58.47....
Took advantage of the guess checker again: .......7..6.1....4..8..5.9....6..23.584.......2.....1.49..1....3...74.......3...6
Solved my first medium puzzle! (Though I did take advantage of the guess checker, going to turn that off tomorrow): .........43.....7......1.4694..7.6.5..3...7..56..4..3..2.19.......7..3...9..24...
Medium puzzles still feel impossible: 9...4...3.........5.4.1......5.7...8...1...6.8.29...4.4.9.5.7........28....697...
Went back to easy for a day: 2476..1......87.236..1.5..9.54.3.281.3..5.49.19...2...4.5.69....215.8.....8...375
Pretty sure I made more guesses, progress! .8.3....99.3...5...6...2.1.1..4...5....9.....6.......84.......1..6.87..2......9..
I might have gotten a few more guesses, not really sure: ..6....123.8.5.......7.4...5..62.........7...41..8.....9.5...878....2.........6.9
Tried my luck with a medium puzzle, to no avail: 78........2.....7....3...9815.64........2...5..3.7...62.6..438......1.5.......4..
Approaching 4 minutes!: 2..36........4.718984..5..2...71938.597..41..8.3....79.28..15.3.456.....6..5.72..
Just shy of 6 minutes: 2164....7..36..1.54..7312.....564.2.8.2....51695....7.56..984.....1.67...2...759.
Finished in 5 minutes! Medium sudokus still look daunting: 91..23..8.6..1..93348...61.29.3.1.4.48..92.6...74..2..831.....6...5..7.1..9.683..
I took one look at the medium sudoku and went straight back to the easy tab lol: ...18.576521..48..8.73..1.4.38.7..42..2.9...1.5.4.3..89....861.2....54..4..63...9
Finished today's easy Sudoku by NYTimes: 5..167.4..4....851231..4...69851.3..4..98.1..1...4.6.9.25..1..7.643....2...4..96.
Even tougher than yesterday's, could only get 1 cell filled in (the rest were notes): .8..34.....58...7.6..57..2...4....68..6...2..39....1...3..97..2.7...56.....32..8. Also solved this easy one in ~8 minutes by the New York Times: .4..72.1...7.1.64.192..4.8..1.5874...5.1...97..6..98.18.1.4..293.42.1....2.3....4
Tough one, couldn't solve it: .8574.91.7....5...........5..6..7.5..9.1.2.8..2....7..1...........4....8.59.7146.
Apr 07, 2022-May 17, 2022
Created a simple website/API to create a customizable world map.
<iframe>
's now work!
Nearly done with the headers, just need to get <iframe>
's to work.
Security headers are the necessary evil in programming.
Alright, it's deployed! (but I need to add security headers)
Deploying a Node.js website is laughably hard. I got it deployed on Vercel but none of the assets went through (so it's basically useless). Will keep trying tomorrow.
Finished with the API reference, going to deploy it tomorrow.
Got started with API reference.
Alright, I'm pretty sure no major glitch remains. I'll be adding the API reference and putting this on Show HN tomorrow.
For some odd reason, most of the customization logic from yesterday stopped working. Anyways, got it all back and HEX color support isn't glitchy anymore. This project is nearing its end!
Got all of the customization options to work as URL queries!
Not bad, got one of the customizations to work (the background color). Not fully sure why the others aren't working but I'll look in to that. You can now also enter a country name without following title case + with spaces + with 'of' or 'the'.
Awesome progress, you can now select any amount of countries with either the three-letter name or the full name with the API. I now need to implement the customization logic with URL queries, should be fun...
I can now create any one of the three projection types with /api/map_name
(e.g.: /api/gallpeters
)!
Got started with the API.
Committed the customization changes with two reset buttons!
Continued with the color conversion logic and "fixed" the hex to RGB function (just had to change the return).
Continued with the color conversion logic.
Continued with the customization logic, it's coming out pretty nicely, just need to convert the different ways to represent color to RGB.
Continued with the customization logic, I can now sort of customise the background color and the stroke with the front-end.
Got started with the customization logic.
Sort of finished with the saving logic (though I need to add customization properties) thanks to this Stack Overflow page.
Got started with the "saving" logic.
Made great progress: created the "click" logic and fixed the viewport and some outdated country names in the JSON file.
Haha I figured it out! You have to use the d
in the mouseover function to get the data of each indivudual path
, like so:
tooltip.html(d.toElement.__data__.properties.name);
One of the more frustrating things in this world is working with nested data. All of the country names (for the tooltips) are nested and I can't access them without an additional CSV file with the names that has the same IDs as the JSON file. Sigh.
The first step (selecting which map projection you want to use) is done, going to have to work on tooltips for the second step.
Created all the three projections, going to work on the "creating" part.
Made the maps look a whole lot nicer. I'm going to start out with three projections: Mercator, Gall Peters and Winkel Tripel.
Fixed the "... isn't a function" error, I had to update the version of d3-geo-projection imported. Anyways, I've got the namesake projection!
I was trying to get the Gall Peters projection in D3, and ended up with the Mercator projection lol, for some reason geoCylindricalEqualArea() isn't a function.
The start of something new:
I was about to give up with D3 on the server-side until I found this repository.
Migrated to Next.js after deleting all my uncommitted code.
Getting D3 in to Node is a bit different. You have to use this package and some of the D3 declarations have to be replaced with the package (like in this example).
Used my beech.css (which powers this website!) and modified it slightly. The majority of my time on this project will be working on the D3 maps (for now).
New project! Let's see how long this one takes. Opened up the repository and committed a bare-bones front-end with Express.
Oct 28, 2021-Apr 15, 2022
I was a programmer for EA Data (official website here, up-to-date one here which may require some refreshing to work). See the repository and my fork for commits mentioned. The two EA Forum posts (1, 2) may also prove informative.
Unfortunately, I believe my teammate has somewhat abandoned this project, which is completely fine, this project feels somewhat complete and even if my teammate comes back to work on this project, I don't think I would be able to contribute anything meaningful anymore.
Regardless, it was a lot of fun while it lasted: learning about Dash, improving my Python skills, messing with Heroku and improving the front-end with my CSS skills were all great experiences.
Changed 'Lighter/Bluer' to 'Lighter' to remove any ambiguity.
Okay, this may be stretching my OOP skills. Regardless, I removed unused imports from the codebase.
I might work on getting the label position for some of the plots in line with this.
Changed the background color of the flashcards to a nice and soft one.
Got MathJax to work and created a PR for the EA-numbers repository to close an issue.
Fixed a small import error.
Fixed the sidebar glitch.
Made some good progress with the sidebar glitch, just need to fix another glitch that came from fixing the glitch. Welcome to programming, folks.
In the process of fixing a small sidebar glitch.
Finished with cleaning up the codebase for the most part.
Continued with cleaning up the codebase.
Removed all instances of the now redundant visdcc and got started cleaning up the codebase. effectivealtruismdata.com should have a valid HTTPS certificate now.
Never mind, I changed the layout to one long column and so it's automatically responsive. I'll be migrating to deferred JS instead of visdcc.
Finished work on the flashcards on desktop, need to make the whole thing responsive.
Flashcard progress has been slow, but we push on.
Tried to deploy a copy of the repository on Heroku, to no avail.
effectivealtruismdata.com is really unreliable right now (it's sometimes down and regardless the HTTPS certificate has expired) and I can't do anything tangible about it.
Got started with fixing the layout. This is going to take a while...
Fixed a small glitch with the hide/reveal feature. I have a pretty good idea for organising the card in one-line (with arrows to scroll) which I'll get started with tomorrow.
Using deferred JS, I made the flashcards "studyable" as you can reveal and hide the answer (+ source) and I'll be working on making the layout better.
Continued with the flashcards. Progress has been slow.
Holy crap, the package works! In the process of replacing all of the (now redundant) callbacks and I can now do some serious envisioning with the flashcards with the power of JS.
Tried to get MathJax with this package but to no avail. I'll keep trying (as that'll mean I can defer any JS file). I'll also be mainly fixing the layout of these flashcards for a while.
A bit unsatisfied with the layout of the flashcards. Anyways, committed a spelling fix for my previous X-risks relative probabilities.
Not a ton of progress but I've made the flexbox in to roughly 7-8 columns. Going to try to get MathJax and JS (deferred) tomorrow.
Good progress, the content now looks like flashcards (though they're all in one long sequence, which is not ideal, need to have arrows on the left and right side to browse through them) and I added the appropriate classes for the question, answer and source.
I did it! Got all the three paragraph tags packed into "card divs". I'll work on the actual styling tomorrow.
Made decent progress again, still trying to get the cards (in packs of three paragraph tags).
Decent amount of progress, I need to somehow get all the elements between two "card divisions" (just big rectangles) and then I can style them into cards with flexbox magic.
Got it all converted to HTML! Need to now turn it all into cards (which may take some time...)
Got all the text displayed, need to convert it in to regular HTML.
Alright, got the data and I need to figure out how to use a for loop in Dash components tomorrow. After that, all the text will be displayed and I'll need to do some CSS + JS magic to make them actual cards.
Figured out an alright way to display the cards (it'll be a bunch of CSS work which I guess I'm good at) and I finished creating the layout for it.
Realistically speaking, the only thing left on the to-do list I can do is to display the key EA numbers, so that's what I'm going to do.
Emailed my teammate about the X-risks section of the website.
No excuse for not working on this for the last 4 days, anyways I don't think I have the technical skill to fix the bar chart. I'll work on something else.
Continued with the bar chart.
Finished with the layout and figured out how the bar chart function works (sort of).
Got started with the layout.
Finished collecting the data, also it's not just the top 5 charities (that would be very little data) and I'll work on the bar chart tomorrow.
Started with the data collection. Got a good suggestion from my Focusmate (who's also interested EA)!
Alright, will work on plotting the cost-effectiveness of the top 5 most effective charities according to The Life You Can Save.
Got a few ideas for what to work on next, still thinking about it.
Committed the new icons! Wondering what to work on next.
Finished adding the higher quality icons from FontAwesome!
Honestly adding the timeline section seems pointless, not sure why it's on the to-do list. Anyways, in the process of replacing the icons in the x-risks section with higher quality ones.
Forget the D3 addition, that was useless. I figured out about Gantt plots and added that in. I'll work on making the data soon.
Didn't have too much time to work on EA Data today, but I continued trying to add D3 into Dash.
I think the best way to go around this is with D3, so I'm trying to get D3 into Dash.
I'll leave the population data to my teammate (as they'll visualize it much more interestingly), I've gotten started on something I find more interesting, the timescale from William MacAskill's talk.
Got to work on the dropdown menus, though I need to figure out a way to make them inline.
Finished the layout, need to add dropdown menus for years/decades for the quick facts which might take some time.
Got started with the layout!
Have some cool ideas on how to present these quick facts on population. Will implement them tomorrow or the day after tomorrow.
Finished collecting historical population data (from here) and trying to find some interesting longtermist data.
I sent an email to The Life You Can Save if there was an API for their calculator. I'll be working on another thing in the meanwhile and I also committed my x-risks section.
Alright, found another thing I can reasonably do for EA Data right now, which is the cost of saving a life with effective charities (which you can learn about here, this will also be my primary data source). I'll work on this tomorrow since I didn't have much time today.
Completed the table with relative probabilities and icons!
Fixed the styling for the most part, just need to find a way to shrink the table a bit.
Continued fixing the styling.
Finished the images and relative probabilities! Need to fix some styling and will continue with the next time on the to-do list.
Almost finished with the images and relative probabilities, it's somehow hard to find creative examples for 1 in 10 and 1 in 50.
Made great progress with the images and relative probabilities! I only have a few left.
Fully fixed the callback (it's a lot snappier and doesn't randomly break) with this and got done with the second probability. Did you know the chance of finding a four-leaf clover is 1 in 10,000?
Fixed the callback for the most part and now the associated image shows up.
Made the callback automatic (but it's slightly broken) and learnt what 'one in a million' really means.
Used visdcc to make it update differently depending on what cell you are on!
Created the callback.
It's all coming together, styled the table a bit (may need to add some more further) and started writing the callback code to display the relative probabilities and an animation (or maybe just an image).
Made good progress with the probabilities table (i.e. I made a CSV file of the probabilities...), I have some cool ideas with using callbacks and then displaying (for example) 1 in 6 chance as the probability of getting 1 when rolling a die (and showing a die animation), but it's a lot of work.
Started with showing the probabilities given by Toby Ord on X-Risks, will try my shot at putting the probabilities in a more relative scale.
Going to set that glitch aside and going to see if I can update some of the data on the website, mainly the EA Survey.
Still perplexed by that glitch, hope to do more data visualization with other organisations and to continue work on the website in 2022!
Continued the discussion about the scaling/overlap issue. I think it is solely a CSS issue, so I'll try my luck at fixing it again tomorrow.
Got a response and I gave the deployed website as a working example of the glitch.
Posted my issue on the Dash forum.
I think I'll leave the height glitch for some time, I'll make a post about it on the Dash forum tomorrow.
Still no luck with the height glitch, will push on.
Found a glitch where if you download a data source and then change the height of the browser window, the download subtitle goes crazy. In general, changing the height makes everything go crazy. Trying to fix that.
Fixed the meta card image. Going to work on responsiveness for a bit. After that, I'll look into completing this to-do list.
Took a lot of searching, but I got meta tags to work!
Still figuring out meta tags and cards.
Finished the rest of the download links, going to work on meta tags (which I left a while back) and possibly making sure the whole design is as responsive as possible.
Added the styling, the arbitrary values are not perfect (one of the reasons responsive design is such a pain) but the content is readable, so it's fine for now. I'll work on finishing the rest of the download links tomorrow.
The design is almost perfect, responsiveness wise, the only real issue is that some of the subtitles have their heights messed up on mobile. So, I made good progress on a glitch fix for that, only need to style it tomorrow.
Okay so I got the attribute working, but the attribute itself only works in Safari, Chrome doesn't respond to it and just opens the download in a new tab, anyways I'd consider getting the attribute a success.
More weird glitches (particularly on mobile), I can't seem to get a download to happen on mobile, tried to use visdcc to append an attribute but it didn't work.
Finished the donation download URL's and fixed a weird glitch where the subtitle would disappear if something was downloading.
Started work on finishing my teammate's download URL's.
Time to move on, finished implementing a download icon for my teammate's recent work.
Finished with all my figures, waiting for a review from my teammate.
Using Web Plot Digitizer to approximately get the data from pre-existing graphs, a really cool piece of technology!
Fixed some major mistakes I made and nearly finished the actual last figure.
Finished my last assigned figure (for the most part, might need to make a few small tweaks here and there), need to now get to the actual data part.
Made good progress with the next figure. I'll leave the actual data for later.
Figured out how to work with large scale CSV.
Implemented the horizontal bar chart change + some other changes. Need to figure out how to work with large scale CSV files.
Finished the first figure, though I might need to make them horizontal instead of vertical bar charts.
Nearly finished the first figure.
Progress, progress, progress.
Continued work on data visualization, need to get good at matplotlib.
Continued work on data visualization with matplotlib, awesome month at EA Data!
Did some experimenting with matplotlib.
Opened a PR to push smaller bug tweaks I've made over the month.
Doing some research into deployment.
Made the title more responsive.
Slightly changed the GWWC glitch fix.
Fixed a visdcc glitch!
Wondering what to do next.
Fixed the GWWC glitch! It was just 4 lines of CSS.
Still trying to fix the GWWC plots.
I've put the meta tag issue aside to work on fixing the GWWC plots.
The problem with the meta tags is that all the properties are in one tag. Need to fix that.
Wondering if there is another way to test if my meta tags work (without hosting the app on Heroku)
Failed to set up Heroku (for my GitHub fork).
Made the loading screen more responsive and added Twitter card meta tags.
Sort of fixed a non-existent glitch. I'll try to switch from glitch fixing to something else.
Fixed the dark mode button glitch!
Continued with trying to fix the dark mode button glitch, I found another pip package, but it doesn't look very helpful. Also reviewed my PR for the sidebar glitch.
Tried fixing the dark mode button glitch.
Finally fixed the glitch! Took so darn long, but I finally found a way to fix it via this obscure package.
Again, very little progress. But, little progress is still better than no progress.
Very little progress on fixing the sidebar glitch, I was really close until I released you cannot scroll on div
below a button that covers up the whole thing.
Updated the README file, and started work on fixing the sidebar glitch on mobile using a button.
Fixed the glitch, created a PR for the new loading screen and tried to fix the sidebar glitch on mobile.
Was so close to making a PR, but I noticed a glitch that'll have to wait till tomorrow to be fixed.
Oct 29, 2021-Apr 06, 2022
Created an alternative to the mailto attribute in HTML. See the repository here.
I think this is a safe place to end the project. I'm genuinely proud with the end result (even though it doesn't fully work on Android and it's unlikely that this becomes a popular tool) and, in the end, I learnt a lot about Next.js, user authentication, databases, APIs and back-end development in general :)
Very little progress. I feel that all of this is impossible and that the project (on Android at least) is dead.
All this intent:#Intent
stuff is really weird. One link will open Gmail... but on the Google Play Store, another will randomly opening settings. I found this, but it doesn't work:
intent:#Intent;action=com.google.android.gm;
category=android.intent.category.DEFAULT
;category=android.intent.category.BROWSABLE;end
Progress! I stumbled upon this Stack Overflow question which lead to me googling "gmail package name android" which brought me back to the URI world.
Installing React Native appears to be a nightmare.
I'm going to experiment with React Native (within the preexisting codebase) to fix the Android issue.
Fixed a small span
inline style glitch and replied to the answer I got on Stack Overflow.
The land of URL Schemes/Universal Links/App Links/whatever is treacherous on Android. Every time I felt I got close to an answer, I got thrown into a loop.
I fear that having a link that opens, say, Gmail's native app is not under my control, rather Google has to implement that. I'll try again tomorrow and if I'm unsuccessful, I'll write up a question on Stack Overflow.
Fixed a small footer glitch. If this project of mine ever gets big, I need to have a style guide like this one.
Continued with Android research. I fear that I'll have to use React Native.
Okay, the emulator I installed seems to make bettermailto think I'm on desktop (I think?) so of course the googlemail://
URL scheme won't work. Need to do further research.
Got an Android emulator sort of setup on another device.
One person on the Show HN thread said that the providers are broken on Android. Tried to get an Android emulator but I don't think that exists for M1 Macs.
Alright, I publicized bettermailto on Show HN after spending nearly an hour trying to fix the automated test feature (it was futile, the free plan for Zapier runs non-instant tasks only every 15 minutes).
I was this close to posting bettermailto on Show Hacker News but I realized that the test feature on the front-page is completely broken. Need to fix that.
The eslint errors are really strict!
Finished with adding security headers. Need to sit down and fix some eslint errors that I've been ignoring.
I improved the grade for bettermailto from a D to a C on SecurityHeaders.com. Not bad, need to add a couple more headers and I should be done.
So, I've stumbled on to the weird world of security headers. Not sure if that was a mistake or not but regardless I'll be doing more research and making sure I can get all the check marks on SecurityHeaders.com.
Going to implement Helmet.js and other security features before I seriously consider putting bettermailto on Product Hunt.
I was wondering how I would fix the responsiveness of the providers (if your device was too wide, it would look awful) and my answer was right under my nose. I used margin-left: auto
and margin-right: auto
for the @media
query when I should have just used it for all devices!
Got started with fixing the responsiveness of the website.
Fixed a very small glitch fix where the GitHub link was pointing to my fork rather than the GitHub organisation. Wondering what to work on next.
Implemented the compromise with this NPM package.
Still working on implementing it, copy and pasting with JS (for all devices) is unnecessarily hard.
Okay, the first part of the decision chart won't work as you can change your default provider on iOS. So I'm directly using the compromise. Nearly done implementing it.
Alright, I still need to do a bit more research, but I think this "decision chart" should work:
Is the device a phone? -> Is the device an iOS device? -> Use mailto.
Is the device NOT a phone? -> Is the device a Mac-based computer? -> Compromise and just open the Apple Mail app and copy and paste the email and subject to the user's clipboard.
I won't display the Apple Mail provider for non-Apple devices as I'm pretty sure Apple Mail isn't supported on Windows or on Android.
Committed the Airmail provider. I'm really unhappy with the Apple Mail provider, it relies on mailto and, if you've already set a default provider, it'll just open that instead of Apple Mail. I'll work on that from tomorrow and try to see if I can get some compromise (remember, the URL scheme for Apple Mail doesn't allow you to compose).
Committed the Spark provider.
Alright I figured out that Spark has a pretty good URL scheme (and people actually use Spark!) so I'm in the process of implementing that.
Removed the GitHub provider, going to work on adding more email providers that have a protocol handler.
Sigh, the GitHub provider is also useless since it requires the user to have their email public (which defeats one of the core values of bettermailto, keeping the email private from bad guys), I'll research about GitHub OAuth again tomorrow.
Removed the Slack provider since it was pretty useless (the person probably signed into Slack with a magic link or Google, both of which are already providers on bettermailto) and so I'll add GitHub tomorrow and leave it at that.
Got started with adding the Slack provider (though it's broken right now) and going to add a GitHub provider as the final (?) OAuth provider.
Wasn't able to make much progress with the Apple Mail problem. The only real way is to use mailto
so I've added that and I'll come back to it later.
Really strange, message://
opens Apple Mail but it doesn't allow you to compose to any particular email.
Added fallbacks for the mobile providers! I'll work on trying to get Apple and Windows Mail (though I'm not entirely sure if that's possible).
Added the URL schemes for the three major email providers. Pretty interesting story:
I first thought that a link from a website to a native app (that you didn't program) would be impossible (it makes sense security-wise) but nope, I (by sheer luck) found googlemail.
I fear this technology might be killed off by these big companies (I'm looking at you, Google) but we'll cross that bridge when we get to it.
Going to work on how to give the user more choice on whether they want to use the mobile app or the website.
Added the Outlook URL scheme!
Figured it out! Should be able to do it with the other providers (hopefully).
Figuring out how to add a link to open the Gmail app on iOS (for now).
Finished adding a fallback mailto provider. I couldn't keep the cool "Loading..." since it would be too much work to keep squashing bugs for various platforms for this small comfort feature.
Made great progress with adding the new providers!
Made a few miscellaneous changes (and committed them) and continued with adding other providers.
Made a really nice dropdown with CSS for the other providers. Why am I so good at CSS? I could have been good at literally any other skill (just kidding, CSS is amazing if you know how to use it).
Did a bunch of organizational work (updated the legal docs with the new support bettermailto-link, removed a test account on MongoDB and added an error page for NextAuth errors). I'll work on adding more sign-in providers and more email choices till probably March or April.
AHAHA I DID IT! I expected this to take a few days but nope, fixed everything (including an annoying button glitch) and you can now email me (safely, for both of us) with this.
Still working on the production glitch.
Okay, I had to comprise and remove any reference to the user's name. Now, the email provider works in production, but not in deployment. Going to fix that tomorrow.
I fixed another glitch where I queried the database with the user's name, not the ID (which was dumb). Still figuring out how to get the user's name into the database via the email provider.
Okay, I got the form looking pretty good and I figured out why the email sign-in wasn't working. My code relies on the name attribute the user provides (through OAuth) for the user URL. But since I didn't ask for their name using the email form, the whole code broke.
So I need to find a way to manually add the name attribute to MongoDB (since I don't think NextAuth's email API allows that).
Going to keep the database issue aside right now, currently working on making the email form look much better.
Hmm, I noticed that new users face an error while signing in with the new provider, so I tried to add a MongoDB adapter and that broke everything... Will try to fix it tomorrow.
Finished adding the email provider! Pretty darn cool, though the UI is the opposite of cool right now. I'll work on that tomorrow.
So close to finishing all of this! I figured out that you have to use a dedicated service (not just Gmail) such as SendGrid.
Made great progress with adding the passwordless provider, though we may be in here for a while...
Got started with adding a passwordless provider.
Forgot to add reCAPTCHA to the privacy policy, oops. Also added a disclaimer while signing in/up.
Finished (?) the privacy policy.
Got started with the privacy policy of bettermailto.
Finished with the terms of service.
Continued with the terms of service.
Continued with the terms of service.
Continued with the terms and conditions (and I'm pretty sure it has to be terms of service, but I'll check that tomorrow).
Got started with adding the terms and conditions.
Added a spinning animation to show while the website gets the reCAPTCHA score.
I'll keep credentials in the back of my mind, but for now I'll be adding some more easier-to-implement features (responsiveness, third party providers, changing the default providers depending on the device, etc.) For now, I'm working on responsiveness.
Still thinking about the Credentials provider.
Got started with adding the "Credentials" provider to NextAuth.js. We might be at this for a while...
Fixed a long-standing bug where your custom link would be too long on mobile (also, this marks the first time my commit broke the website!) I'll work on more login clients from tomorrow.
Committed a 404 page and some other smaller changes.
Committed the reCAPTCHA changes!
I finally got reCAPTCHA v3 working and verified! I just need to implement this locally and deploy it.
Verification is really tough for some reason, I keep getting CORS errors which is annoying. I'll push on tomorrow (and I'll figure out if I can do anything with Vercel or maybe even PHP)
Finally got reCAPTCHA v3 to work, the issue was me being dumb (should have just read the documentation). I need to program the verification tomorrow.
reCAPTCHA v3 with this npm package is still not working for me and I'm not even sure why. I'll keep trying tomorrow and maybe try doing it in React.
Okay okay, reCAPTCHA v3 makes more sense, and I've got the functionality (almost) working.
Okay, reCAPTCHA v2 makes a lot more sense now that I think about it, so I added it (still not functional) and styled it.
Got to work on adding reCAPTCHA v3 on the website to deliver on the promise of security for the emails. Also added meta tags and other small fixes.
bettermailto is now live! Though you cannot sign in right now, it's not a bug it's a feature... I also figured out how to deploy it all for free even within an organisation, I just have to fork it to my personal account and fetch it every time I make a commit.
Last day of 2021! I bought the domain bettermailto.com and I created the test email Zapier integration. Hoping to find a way to deploy from a GitHub organisation for free with AWS Amplify and to get everything done and deployed by mid-2022!
Authenticating + generating URLs for multiple users is now done! Wow, that took a while. I'll work on other ways of signing in.
I figured out how to work with multiple users for generating the URLs, but authenticating them is still in the works.
Okay, back to programming. Got a major breakthrough and now I am able to authenticate the user URLs and generate them, but it only works with one user in the collection. Need to figure out how to get multiple users to work.
Reflecting about the project in a bigger sense and wondering what's next (again, in a bigger sense).
Found another good piece on MongoDB and Next.js, made good progress with authenticating if the user already exists.
Connected everything! That video really came in clutch.
Started with my MongoDB setup, found a good video to connect all of these parts together, will watch it tomorrow and follow along.
Fixed some small bugs, still thinking about databases.
Fixed the "emailbox"'s styling and responsiveness. All I need to do now is make the whole app secure and connect it to a database.
Re-did the "emailbox" part of the app as the styling was messed up.
I feel like I still have a lot to learn about databases, back-end, user auth and even web security. It all feels quite overwhelming. Anyways, continued with checking if the user already exists.
I figured it out! I was looking at the problem of checking if a user already exists the wrong way, I simply need to assign a random string and link it to a database.
Wish I had more time to work on bettermailto today, but anyhow, worked on making the design more responsive.
That article didn't turn out all that useful, still figuring out how all this back-end stuff works. As for now, I added the email providers for the user URL slug.
More progress, found a great article for connecting AWS, MongoDB and Google Cloud all together, now I need to figure out how to store new users, and I think I found an answer.
Made good progress with the checking if a user already exists.
Migrated to Firebase and cleared up old projects on Firebase and Google Cloud to keep everything organized.
Made the button have a cool transition, will work on getting user data from Google OAuth tomorrow.
After one googolplex, I finally made a custom page for signing in with Google OAuth + NextAuth!
Trying to figure out how to have a custom page for the Google OAuth.
Finally got Google OAuth working.
Alright, starting to finally figure out all of this user auth stuff.
Why is user authentication so complicated?
NextAuth + auth0 is really annoying, nothing seems to work. Thinking about going back to AWS Cognito. (I would leave it aside, but I can't leave user auth aside because it ties into generating custom URL's and making sure that URL actually exists.)
Nearly got auth0 working. I think working consistently on a project for slightly over a month is a good sign that things will work out.
In the process of migrating to auth0, it's much more user friendly (let's see if I regret this decision later on).
I'm going to keep the custom sign-in page aside for now. I need to figure out how to check if a user already exists within the user pool.
Got a comment on my Stack Overflow question that showed me the solution to my problem!
Opened up a Stack Overflow question about a custom UI with AWS Cognito + NextAuth.js
Fixed a small bug with the email box component. Also, the package I mentioned yesterday failed to install. But, I've made another breakthrough with making the sign-up process more streamlined.
Researched about API's for AWS, I think I found my answer!
Made some great progress. I figured out the second problem and found a way to create custom URLs. Now I have to start seriously thinking about databases and integrating them with AWS.
Continued with the dashboard of the app, it's all coming together!
So much progress today! Got done with the sign-in experience (it's not the best, but it works and it's more streamlined) and I am starting to think about databases for this app.
Continued with user authentication.
Got user authentication working, though I'm wondering how to make a custom UI for it.
Got great advice on the back-end infrastructure for bettermailto. Working on user authentication and fixed a small responsive glitch.
Finished the migration! Just need to fix the Netlify errors and it'll be deployed soon.
Making progress on the transfer, just have to figure out images in Next.js.
Going back to Square-1.
Okay, forget what I said yesterday. It's a lot more complicated.
Continued the migration, a bit more complicated but it's all good.
Continued the migration to Next.js and TypeScript.
In the process of migrating bettermailto to Next.js to TypeScript.
Figured out how to confirm passwords.
We're making progress again! Found something called Formik for React. I used it for the sign-up form.
Fixed the npm glitch.
Well crap, my repository has some weird npm glitch and now I cannot start it.
Added some flex properties to make both the logo and log-in link visible on any device.
The front-end looks, in my very biased opinion, pretty great. But, there is literally nothing in the back-end. I started to add the registration code.
Creating a hamburger menu is too hard, decided to just add a link for mobile users to sign-up in the log-in page. Also fixed Netlify glitches and added other minor design changes.
Redesigned the sign-up and log-in pages and changed the Outlook link to be much faster.
Added a (totally not stolen) sign up form (don't worry, I'll change it later).
Designing a form is hard.
Fixed the React glitch with Switch, and made a (very bad) sign up page. I think I will eventually need someone to handle the back-end part of this app.
26 Mar, 2022-27 Mar, 2022
Attended EAGxOxford 2022.
Second (and last day) complete! Attended a workshop on rationality by Chana Messinger along with the A.I. Safety Q&A, the EA Funds talk/workshop, David's talk on his recent paper and the fireside chat with William MacAskill (which I assume is now an annual-ish thing).
First day complete, it was awesome meeting EAists and attending A.I. Alignment by Rohin, Biorisk by Simon and Janvi and Career Opportunities in A.I. Governance by Lennart and Caroline!
Dec 29, 2021-Mar 01, 2022
I got accepted to be a facilitator for EA Virtual Programs In-Depth Fellowship, it was an awesome experience!
Last week done! We went around and told our next steps and it was awesome hearing that everyone found the program to be excellent :)
Seventh week done! We chose Global Catastrophic Biorisks and we discussed that in tandem with A.I. safety.
Sixth week done! We chose Decision Theory and had a great time discussing about Brian Tomasik's work, Pascal's mugging, expected value, etc!
Fifth week done! We chose Using Forecasting Tools (which was surprising to me) and we talked a lot about Metaculus, Scott Alexander and how to use forecasting in order to propel EA further.
Fourth week done! We chose Community Building and had a great time discussing some core concepts of how EA information is spread (and how to do that effectively) and we even touched upon EA in communities where it's not so present, such as South America.
Third week done! Had a great time discussing a lot about Julia Galef's work (including The Scout Mindset, which I'm currently reading) and about applied rationality, biases and if the ends justify the means. A lot of this can be learnt about on LessWrong.
Second week done! Was even better than the last week, we talked a lot about animal welfare, wild animal suffering, the expanding moral circle, etc.
First week done! Was a lot of fun meeting my cohort, they all have such interesting backgrounds and goals for this fellowship.
Finished a lot of administrative stuff.
Had a fun training session where we all got roles to play, the best one I got was "look super confused at jargon".
Nov 28, 2021-Jan 24, 2022
Did some research in to the liars in the Miller-Rabin Primality Test, inspired by Numberphile.
Alright, got rejected from arXiv again. My advisor suggested finding some other math archives. Honestly, with the exception of ViXra (which I won't go with, see link for reason) there aren't any pre-print repositories that aren't affiliated with a university.
In the end, I had a lot of fun with this project! The link to the paper on Google Drive is here and I also cold emailed the inspiration for the paper.
Okay, resubmitted the paper with external figures and top 99 and top 100 results instead of no results.
I got the pie charts as external figures and crossed my fingers while processing the files on arXiv, well, it didn't time out, rather it gave an odd error saying something along the lines of "couldn't read the log file generated". It all works with the file without the appendix. Will look into all of this tomorrow.
Well, they sort of rejected my appeal for a large submission. Anyways, I timed my local compile time for the paper with the appendix and (accounting for slowness due to arXiv compiling it), I feel like if I change the pie charts to be external images, it may just be fast enough to beat the 420s time limit. Will see tomorrow.
Otherwise, I'll jettison the four witness results.
Implementing tables in such a strict time limit looks impossible. So, I've contacted arXiv to allow a LaTeX generated PDF once again.
My general advice after rejection is to re-group, so here are the steps I'm going to follow in the following week (after speaking with my advisor):
i) Try to fit all the results within the paper, this is going to be the hardest part as arXiv has a limit on the compile time. If I can't do this, I'll contact support and ask if to allow LaTeX generated PDF's (which they did last time)
ii) Emphasise the exclusivity of these results as to my knowledge, the worst witnesses have never been published.
iii) Try to add some real-world applications in the conclusion.
Well, my paper got rejected by the moderators, the worst part is that they can't give specific feedback due to so many submissions. I'll try again soon (after adding the results back in and talking with some advisors).
I did it! The paper has been submitted, should be public by Jan 16th at 8pm EST.
Facing a bit of a crossroads, I'm this close to being able to submit, but there's a lot of issues that need to be sorted out to make it perfect:
i) What method do I take in showcasing the results? I could keep it in a tabular form (which was what I was planning to do) but the compile time is too long (and though the mods made an exception for me, it'll probably still get rejected) or I could just keep it as a link. Ancillary files don't seem to help that much.
ii) There's a weird glitch where the references have this line break issue if the link is too long, might be able to fix this tomorrow.
I got endorsed! I was just about to finalize my submission but my paper is too long for arXiv due to the results, I sent an exception request and learnt that I have to put them in ancillary files for submission.
Continued finding endorsement.
Continued finding endorsement.
Fixed a small bug in the version of my paper with the appendix (which is the one I'll submit) and continued finding endorsement.
Got a final check done and trying to find someone to endorse me for the math.NT section of arXiv.
Finished all the changes, should be up on arXiv between today and the 9th.
Great progress with the first algorithm and some extra formatting. Will finish up the second and last algorithm tomorrow and make sure everything is neat and tidy. I'll do a bit more research on submission and (possibly) submit it to arXiv either tomorrow or the day after.
Alright, need to re-write the two pseudo-code algorithms, check everything and get to work submitting the manuscript to different journals (and later, arXiv).
Continued with re-formatting the paper and researching about journals and conferences.
Got the review back and got some great tips (mainly in formatting) and I implemented most of them (using the algorithm package, fixing the heading position and fixing the conclusion).
Fixed that odd reference glitch, it was due to me deleting the output files...
Added references for the appendix, my goal for 2022 is, well, to get this published! There is also some weird glitch happening with the references right now, but I'll fix that soon.
Finished the first draft and sent it for review! I got all the packages installed and got a 90-page paper, though most of those pages are just the worst witnesses in a tabular form.
The paper is basically done, I need to check everything (grammar & spelling and general writing while still in Overleaf), add a few more references and compile everything with BasicTex.
Added the rest of the results and analyzed the single witness results, need to analyze the rest, somehow compile the Latex document another way (Overleaf isn't having it with my top 500 worst witnesses), add concluding remarks and we're done.
Added the results for single and two witnesses, going to add the rest tomorrow as well as some data visualization for all of them tomorrow or the day after tomorrow.
Made good progress and finished the code and multiple witnesses section! All that is left is results analysis and conclusions.
Finished the introduction to the test, will work on the code used (and how I supported multiple witnesses) and maybe even analyzing the single witness results tomorrow.
Got a nice and simple template and finished the abstract for the most part. Will work on the introduction to the test and its witnesses tomorrow.
Started with the paper, LaTeX is an amazing piece of software.
Compiled the three and four witnesses results, wished I could have started writing but oh well.
Compiled the two witnesses results.
Compiled the single witness results and cleaned up the research file.
Finished coding up 3 and 4 witnesses, will save the results up to about 10,000 (I don't have heat death of the universe level of time to spend) and start writing the paper soon.
I did it! The worst multiple witnesses of the Miller-Rabin primality test are now knowable through my very slow code! I'll start writing the paper soon after compiling all my results.
I'm going the extra mile and trying to figure out the worst liars when they are grouped as 2 witnesses (if I can get this, it'll probably be similar to do 3, 4 or more witnesses, but there's no need to go over 4 I believe).
Fixed the glitch for single witnesses! I can now get the top liars! The 2nd worst witness for defendants till 1000 is 676, with 18 lies.
Amazing progress! I implemented multiple witnesses into the test, I should have done this a long time ago but I thought it was going to be hard/complicated, but it wasn't. I also spent way too long fixing a glitch.
It now works, sort of? It's hard to tell. I'll now analyze my two methods (possibly three now that I think about it), fix any bugs and see if I can get in contact with an actual college student in maths before starting to write my paper.
Coded it up, and while it is just about the same speed as the last method, it doesn't work, at all. Might need to fix that soon.
Figured out a (hopefully) better methodology to use and wrote it down in comments, though it may be even slower than the previous one. Still, what matters is the results.
Alright so, I'm going to keep my previous methodology as a separate cell. I'll work on another approach (that's a bit more useful) tomorrow. I might need to reach out to someone to check if all of this actually works and makes sense.
So I thought my methodology was pretty good, turns out that I always get 1 as the worst witness. I'll take a bit of time out to figure out a different methodology.
Made good progress with finding the worst witness, crazy to think that a random line in a Numberphile video lead to all of this.
Migrated to Google Colab and made some progress on calculating star liars. I need to figure out multiple witnesses, I know one way but it'll make everything incredibly slow.
Even more progress! I created a few more functions, mainly for primes numbers (not sure how useful the composite functions will be) and I need to find a quicker way to accurately find the number of prime numbers between two given numbers.
Progress! I explored the function for the Miller-Rabin test and created some composite functions and figured out how to use custom witnesses.
Thinking of moving to Rust because of the existence of this crate.
Changed to Python since it's much easier to work with. Going to have to figure out how to generate star-witnesses and work my way to liars.
Opened up a repository for the Miller-Rabin C code. Let's hope December is a good month for this project!
Researched about the star witnesses in the Miller-Rabin test (see Numberphile video).
Wrote up my Notion page with the basics of the test, hoping to write some code for the test in C/C++ (haven't decided) by the end of this week.
Nov 20, 2021-Nov 21, 2021
Re-designed EA Bristol's website.
Opened a PR for the current CSS file, thus ending this project!
Saved a first draft and published it!
Oct 30, 2021-Oct 30, 2021
I attended EA Virtual Program's In-Depth Fellowship after my introductory fellowship by EA Cambridge.
Oct 30, 2021-Oct 30, 2021
Attended EA Global: London 2021 as a virtual attendee.
I define a project as anything I am actively building, creating or participating in. I don't count my content and schoolwork as projects. One-off tasks (such as updating documentation or fixing a small glitch for a previous project) also don't count.
Any gaps between logs does not mean that I worked on the project in between, any work done for the project will be logged (unless any special circumstance occurs).
I put links to jargon, tools I use, or anything I think would be cool to read more about! But please note that, unless explicitly stated, I was never paid to mention the link.
I may make spelling, grammar or factual mistakes. I'll probably notice them at the end of my day. If I don't, contact me.
For privacy reasons, I don't mention others who may have worked with me on these projects (unless I asked them first or their role was public), some projects with their logs may come later and I may also come off a bit vague at times.
There'll be a lot of exceptions in this note (with many more spelling and grammar mistakes), but regardless, I hope you find these logs inspiring!