Skip to content

Instantly share code, notes, and snippets.

View kazarazat's full-sized avatar

kaza razat kazarazat

View GitHub Profile
@kazarazat
kazarazat / evolution_algorithm.py
Created October 19, 2016 21:00
This code is inspired by an Evolutionary Algorithm as discussed by Ray Kurzweil. The idea is to use simple Mendelian biological inheritance to breed two "organisms" with random genetic data to each other to produce an offspring that has inherited "desired" genetic data from them.
import string
import random
model_genes = ['1','2','3','4','a','b','c','d']
strand = len(model_genes)/2
def female_code(size, chars=string.digits):
return list(''.join(random.choice(chars) for _ in range(size)))
def male_code(size, chars=string.ascii_lowercase):
@kazarazat
kazarazat / tabs.js
Created May 6, 2020 17:32
A Vue.js Tabbed Navigation snippet
const Page1 = { tabLabel: "Home", template: "<p>Home View Content</p>" };
const Page2 = { tabLabel: "Food", template: "<p>Food View Content</p>" };
const Page3 = { tabLabel: "Sports", template: "<p>Sports View Content</p>" };
const Page4 = { tabLabel: "Video Games", template: "<p>Games View Content</p>" };
const Page5 = { tabLabel: "Services", template: "<p>Services View Content</p>" };
const Page6 = { tabLabel: "Music", template: "<p>Music View Content</p>" };
const Page7 = { tabLabel: "Movies", template: "<p>Movie View Content</p>" };
const OtherComponent = { template: "<p><em>This content is not mixed in with tab components</em></p>" };