Skip to content

Instantly share code, notes, and snippets.

View HelBorn's full-sized avatar

David Blake HelBorn

  • New York City, NY, United States
View GitHub Profile
import re
# Your protein input sequence. This should be replaced with something like raw_input(""),
# but for this demo I just typed the string in.
sequence = "AUGCAAGGUACUUUCAGUUGACAAUAG" # Valid protein
#sequence = "AUGCAAGGUACUUUCAGUUGACAACAA" # Invalid protein
# Performs the search. The first argument is the regular expression (regex)
# and the second argument is the sequence (as seen above).
m = re.search(r'^(AUG([ACGU]{3,})(UAA|UAG|UGA))$', sequence)
final def KAPREKARS_CONSTANT = "6174"
final def MAX_ITERATIONS = 7
def startingDigits = "1123"
def iterations = 0
def solved = false
println "Attempting to solve ${startingDigits}:"
for(res = startingDigits; iterations < MAX_ITERATIONS && !solved; iterations++) {
import org.powerbot.game.bot.Context;
import java.awt.event.MouseListener;
/**
* @author HelBorn
*/
public class MouseBlock {
private static MouseListener mouseListener;
private static boolean enabled;
@HelBorn
HelBorn / Startup.cs
Created March 31, 2012 15:33
Adding a program to startup in C#
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;
namespace RunOnStartup
{
/// <summary>
/// It attempts to write to HKEY_LOCAL_MACHINE first, which will run on startup on all user accounts.