{{ message }}

Instantly share code, notes, and snippets.

ι(｀ロ´)ノ

# Fernando Bassferbass

ι(｀ロ´)ノ
Last active Aug 7, 2020
View instructions.md
Created May 5, 2020
1.3 Hidden Messages in the Replication Origin (Part 2)
View solution.py
 # Copy your updated FrequentWords function (along with all required subroutines) below this line def FrequentWords(Text, k): FrequentPatterns = [] # output variable # your code here Count = CountDict(Text, k) m = max(Count.values()) for i in Count: if Count[i] == m: FrequentPatterns.append(Text[i:i+k])
Created May 5, 2020
1.3 Hidden Messages in the Replication Origin (Part 2) 10 out of 13 steps passed
View problem.py
 # Input: A string Text and an integer k # Output: A list containing all most frequent k-mers in Text def FrequentWords(Text, k): words = [] freq = FrequencyMap(Text, k) m = max(freq.values()) for key in freq: if freq[key] == m: words.append(key) return words
Last active May 5, 2020
View frequency_map.py
 def FrequencyMap(Text, k): # your code here freq = {} n=len(Text) for i in range (n-k+1): Pattern = Text [i:i+k] if Pattern not in freq: freq [Pattern] = 1 else: freq [Pattern] +=1
Created May 4, 2020
Reverse complement of DNA strand using Python
View reverse_complement.py
 alt_map = {'ins':'0'} complement = {'A': 'T', 'C': 'G', 'G': 'C', 'T': 'A'} def reverse_complement(seq): for k,v in alt_map.iteritems(): seq = seq.replace(k,v) bases = list(seq) bases = reversed([complement.get(base,base) for base in bases]) bases = ''.join(bases) for k,v in alt_map.iteritems():
Created May 4, 2020
pattern count
View patterncount.py
 def PatternCount(Text, Pattern): count = 0 for i in range(len(Text)-len(Pattern)+1): if Text[i:i+len(Pattern)] == Pattern: count = count+1 return count
Created Aug 28, 2019
Introduction to Self-Driving Cars - Glossary Terms
View glossary-terms.md

A cruise control system for vehicles which controls longitudinal speed. ACC can maintain a desired reference speed or adjust its speed accordingly to maintain safe driving distances to other vehicles.

# Ego

A term to express the notion of self, which is used to refer to the vehicle being controlled autonomously, as opposed to other vehicles or objects in the scene. It is most often used in the form ego-vehicle, meaning the self-vehicle.

# FMEA: Failure Mode and Effects Analysis

Created Sep 28, 2017
View key base.md

### Keybase proof

I hereby claim:

• I am ferbass on github.
• I am ferbass (https://keybase.io/ferbass) on keybase.
• I have a public key ASBIz1bPa8UBMrybqhmZAwxv_qNNUi3ROttgqhpFRc1KkAo

To claim this, I am signing this object:

Last active Mar 9, 2020
UIKeyCommand external keyboard keys, extract from https://github.com/kishikawakatsumi/KeyboardShortcuts/blob/master/KeyCommands/ViewController.m
View key-command.m
 NSMutableArray *commands = [[NSMutableArray alloc] init]; NSString *characters = @"`1234567890-=qwertyuiop[]asdfghjkl;'zxcvbnm,./"; for (NSInteger i = 0; i < characters.length; i++) { NSString *input = [characters substringWithRange:NSMakeRange(i, 1)]; /* Caps Lock */ [commands addObject:[UIKeyCommand keyCommandWithInput:input modifierFlags:UIKeyModifierAlphaShift action:@selector(handleCommand:)]]; /* Shift */ [commands addObject:[UIKeyCommand keyCommandWithInput:input modifierFlags:UIKeyModifierShift action:@selector(handleCommand:)]]; /* Control */
Created May 3, 2016
Adding a closure as target to a UIButton
View button.swift
 import UIKit extension UIButton { private func actionHandleBlock(action:(() -> Void)? = nil) { struct __ { static var action :(() -> Void)? } if action != nil {
You can’t perform that action at this time.