Skip to content

Instantly share code, notes, and snippets.

@DarkCoder28
DarkCoder28 / Parse.java
Created May 27, 2018 22:55
Basic integer and double parser with error messages
package com.aidensheeran.prg10EmployeeClass;
import com.aidensheeran.prg10EmployeeClass.GUI.Sign;
@SuppressWarnings("null")
public class Parse {
public static boolean isDouble(String string) {
string = string.trim();
try {
@DarkCoder28
DarkCoder28 / RNA.java
Last active May 27, 2018 22:58
All RNA combinations. to be used with my Amino.java gist
package com.aidensheeran.DNATranslator;
import java.util.HashMap;
import java.util.Map;
public enum RNA {
UUU("UUU",Amino.PHE),UUC("UUC",Amino.PHE),UUA("UUA",Amino.LEU),UUG("UUG",Amino.LEU),CUU("CUU",Amino.LEU),CUC("CUC",Amino.LEU),
CUA("CUA",Amino.LEU),CUG("CUG",Amino.LEU),AUU("AUU",Amino.ILE),AUC("AUC",Amino.ILE),AUA("AUA",Amino.ILE),AUG("AUG",Amino.MET),
GUU("GUU",Amino.VAL),GUC("GUC",Amino.VAL),GUA("GUA",Amino.VAL),GUG("GUG",Amino.VAL),UCU("UCU",Amino.SER),UCC("UCC",Amino.SER),
@DarkCoder28
DarkCoder28 / Amino.java
Created May 27, 2018 22:57
The Amino.java gist mentioned in the RNA.java gist
package com.aidensheeran.DNATranslator;
public enum Amino {
PHE("Phenylalanine"), LEU("Leucine"), ILE("Isoleucine"), MET("Methionine"), VAL("Valine"), SER("Serine"), PRO("Proline"),
THR("Threonine"), ALA("Alanine"), TYR("Tyrosine"), HIS("Histidine"), GLN("Glutamine"), ASN("Asparagine"), LYS("Lysine"),
ASP("Aspartic acid"), GLU("Glutamic acid"), CYS("Cysteine"), TRP("Tryptophan"), ARG("Arginine"), GLY("Glycine"),
STP("Stop"), UNKNOWN("Unknown");
private String name;
@DarkCoder28
DarkCoder28 / config.cson
Created July 13, 2018 22:23
My config.cson in Atom
"*":
core:
packagesWithKeymapsDisabled: []
telemetryConsent: "no"
editor:
softWrap: true
"exception-reporting":
userId: "PRIVATE"
"linter-ui-default": {}
"sync-settings":
@DarkCoder28
DarkCoder28 / falling_brick_solver.py
Last active April 15, 2019 12:29
The code used in my falling brick solver video
import time
import cv2
import mss
import numpy
import random
from pynput.keyboard import Key, Controller
keyboard = Controller()
topleft = (-1220, 492)
blueprint:
name: Philips Hue Dimmer RWL022 (Aiden Edition)
description:
"Control lights with a Philips Hue Dimmer Switch (v2).\nPower will toggle the state, Dim Up will brighten the light (double press sets full brightness), Dim Down will dim the light, & Hue will flash the light to make sure it works\n\n Blueprint\
\ Version: 1"
domain: automation
input:
remote:
name: Philips Hue Dimmer Switch
description: Pick a RWL022 Dimmer Switch
blueprint:
name: Philips Hue Dimmer RWL022 (TESTING)
description:
"Control lights with a Philips Hue Dimmer Switch (v2).\n\n Blueprint\
\ Version: 1"
domain: automation
input:
remote:
name: Philips Hue Dimmer Switch
description: Pick a RWL022 Dimmer Switch
blueprint:
name: Door Sensor w/ Retrigger Timeout
description:
"Turns on the entity specified below; dosn't retrigger within the set timespan\n\n Blueprint\
\ Version: 3"
domain: automation
input:
sensor:
name: Door Sensor
description: Pick a Binary Sensor
blueprint:
name: Door Sensor
description:
"Turns on the entity specified below when a opening sensor is triggered on.\n\n Blueprint\
\ Version: 3"
domain: automation
input:
sensor:
name: Door Sensor
description: Pick an opening Sensor
blueprint:
name: Door Sensor Notify
description:
"Send notifications to your phone when the door sensor sees that it is open\n\n Blueprint\n Version: 3"
domain: automation
input:
sensor:
name: Open Sensor
selector:
entity: