Skip to content

Instantly share code, notes, and snippets.

/*
Paul Kaplan, @ifitdidntwork
Create an ASCII STL file from a THREE.js mesh
that can be saved save from browser and 3D printed
--------------------------------------------------
See further explanation here:
http://buildaweso.me/project/2013/2/25/converting-threejs-objects-to-stl-files
--------------------------------------------------
Saving the file out of the browser is done using FileSaver.js
<!DOCTYPE html>
<html>
<head>
<title>Boogle</title>
<link href="style.css" rel="stylesheet">
</head>
<body>
<div id="top-bar">
<a href="http://gmail.com">Gmail</a>
<a href="http://google.com">Images</a>
# the dna.txt file needs to be in the same folder
dna = open('dna.txt').read()
print 'The Profile of the DNA is:'
#Hair color
if 'CCAGCAATCGC' in dna:
hair_color = 'black'
elif 'GCCAGTGCCG' in dna:
hair_color = 'brown'
@marko-knoebl
marko-knoebl / calculator.py
Created May 27, 2016 19:29
Der "Calculator", den wir in der Stunde vom 27.5. erstellt haben (basierend auf Salehs Lösung)
print "This is a simple calculator"
# wir definieren unsere eigene "Funktion",
# die wiederholt ausgefuehrt werden kann.
# Vorteil: ich muss diesen Code nur einmal Schreiben und kann ihn zweimal ausfuehren
def get_number():
# die funcktion fragt den Benutzer nach einer
# Zahl und liefert diese ans Programm zurueck.
# Den Code in der Funktion musst du nicht unbedingt ganz verstehen.
try:
@marko-knoebl
marko-knoebl / item_prices.py
Created May 27, 2016 19:34
Das item_prices - Skript, das wir am Ende der Lektion erstellt haben
item_prices = {'milk': 2.30, 'bread': 1.10, 'water': 0.50}
item = raw_input('Choose an item:')
if item in item_prices:
print 'price:', item_prices[item]
else:
print 'item not available!'
menu=[]
while True:
meal=raw_input("Welche Speise wollen Sie dem Menu hinzufuegen: ")
price=raw_input("Was kostet diese Speise: ")
new_meal={"Speise":meal, "Preis":price}
menu.append(new_meal)
abbruch=raw_input("Bist du fertig mit deinen Eintraegen? (J) ")
if abbruch.lower()=="j":
break
@marko-knoebl
marko-knoebl / mayaOnUbuntu.sh
Last active October 31, 2016 12:13 — forked from z3ntu/mayaOnUbuntu.sh
Shell script for installing Maya 2016 SP4. Tested on Ubuntu 15.10
#!/bin/bash
# Heith Seewald 2012
# Garoe Dorta 2015
# Luca Weiss 2015
# Also based on https://gist.github.com/MichaelLawton/ee27bf4a0f591bed19ac
# Feel free to extend/modify to meet your needs.
#### Lets run a few checks to make sure things work as expected.
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Experimente</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1 class="important">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hairdresser Hans</title>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">