This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
class Foo { | |
public: | |
union { | |
float arr[3]; | |
struct { | |
float x,y,z; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.thumb | |
.syntax unified | |
.include "gpio_constants.s" // Register-adresser og konstanter for GPIO | |
.text | |
.global Start | |
.global GPIO_ODD_IRQHandler | |
Start: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xC dagar i jola | |
Melodi: http://www.youtube.com/watch?v=fo6UY_Zzk_w#t=212 | |
På den 0xC-te dag jol, då fekk eg av IDI | |
0xC EPROM, | |
0xB registre, | |
0xA prosessorar, | |
0x9 pekarar, | |
0x8 instruksjonar, | |
0x7 Hamming-kodar, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
return new THREE.SceneUtils.createMultiMaterialObject(text3d, | |
new THREE.MeshBasicMaterial( | |
{ color: 0x42a42b, overdraw: true } | |
), | |
new THREE.MeshBasicMaterial( | |
{ color: 0, wireframe: true, wireframe_linewidth: 10 } | |
) | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved, required | |
filetype off " required | |
set number | |
set showmatch | |
set novisualbell | |
set hlsearch | |
set smartcase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -x /usr/bin/dircolors ]; then | |
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" | |
alias ls='ls --color=auto' | |
#alias dir='dir --color=auto' | |
#alias vdir='vdir --color=auto' | |
alias grep='grep --color=auto' | |
alias fgrep='fgrep --color=auto' | |
alias egrep='egrep --color=auto' | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Element(object): | |
"""Element class""" | |
def __init__(self, elementName, molarMass): | |
self.elementName = elementName | |
self.molarMass = molarMass | |
def __str__(self): | |
return self.elementName | |
def __repr__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import randint | |
def is_prime(n): | |
return False if n <= 1 else not any(n % x == 0 for x in range(2, int(n ** 0.5) + 1)) | |
def biggest_prime_factor(n): | |
''' | |
intentionally not using recursion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "pitches.h" | |
int melody[] = { | |
NOTE_G3, NOTE_G3, NOTE_G3, NOTE_E4, NOTE_D4, NOTE_C4, NOTE_G3, | |
NOTE_G3, NOTE_G3, NOTE_G3, NOTE_E4, NOTE_D4, NOTE_C4, NOTE_A3, | |
NOTE_A3, NOTE_A3, NOTE_F4, NOTE_E4, NOTE_D4, NOTE_B3, | |
NOTE_G4, NOTE_A4, NOTE_G4, NOTE_F4, NOTE_D4, NOTE_E4, | |
NOTE_G3, NOTE_G3, NOTE_G3, NOTE_E4, NOTE_D4, NOTE_C4, NOTE_G3, | |
NOTE_E4, NOTE_E4, NOTE_D4, NOTE_C4, NOTE_A3, | |
NOTE_A3, NOTE_A3, NOTE_F4, NOTE_E4, NOTE_D4, NOTE_G4, NOTE_G4, NOTE_G4, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from html.parser import HTMLParser | |
from django.core.validators import MinLengthValidator | |
# via http://stackoverflow.com/a/925630/2295891 (see there for Py2 version) | |
class MLStripper(HTMLParser): | |
def __init__(self): | |
super(MLStripper, self).__init__() | |
self.reset() |
OlderNewer