I hereby claim:
- I am cianlr on github.
- I am cianlr (https://keybase.io/cianlr) on keybase.
- I have a public key ASB5rFkyRFKMWm02zf8hSYgqlPiar39n0jEl-sGWgsnGGgo
To claim this, I am signing this object:
BITS 32 | |
org 0x08048000 | |
ehdr: ; Elf32_Ehdr | |
db 0x7F, "ELF", 1, 1, 1, 0 ; e_ident | |
; we use the padding to store data, must be 8 bytes | |
msg: db '4', 0xa | |
filename: db '4', 0 | |
pad_entry: mov cl, 0b1000010 |
#include <vector> | |
#include <array> | |
#include <iostream> | |
#include <algorithm> | |
constexpr std::vector<int> primesVec(int N) { | |
std::vector<int> primes; | |
std::vector<int> vec(N + 1, 1); | |
for (int i = 2; i < N + 1; ++i) { | |
if (!vec[i]) continue; |
I hereby claim:
To claim this, I am signing this object:
from math import sin, cos, pi | |
import sys | |
def polar_to_point(radius, angle): | |
x = radius * sin(angle) | |
y = radius * cos(angle) | |
return round(x)+radius, round(y)+radius | |
def circle_string(radius, to_cir): |
from queue import PriorityQueue | |
class Location: | |
def __init__(self, i, items): | |
self.i = i | |
self.items = items | |
self.connected_to = [] | |
self.best_road_to = None | |
self.total_items_up_to = 0 |
float STRIKE_CHANCE = 0.05; | |
float FORK_CHANCE = 0.08; | |
void setup() { | |
size(800, 600); | |
//frameRate(30); | |
} | |
void draw() { | |
fill(37, 50, 88, 30); |
% Q1 | |
is_in(X, [X|_]) :- !. | |
is_in(X, [_|LT]) :- | |
is_in(X, LT). | |
delete_from(X, [X|LT], LT) :- !. | |
delete_from(X, [LH|LT], [LH|AT]) :- | |
delete_from(X, LT, AT). | |
% Q2 |
def count_char(s, c): | |
if s == '': | |
return 0 | |
else: | |
is_c = int(s[0] == c) # 1 if True, 0 if False | |
return is_c + count_char(s[1:], c) | |
#include <iostream> | |
#include <vector> | |
#include <queue> | |
using namespace std; | |
class Person | |
{ | |
public: | |
string name; |
/* | |
AutoMed EEPROM write by Cian Ruane 13/03/15 | |
For Teensy++ 2.0 | |
*/ | |
#include <EEPROM.h> | |
int addr = 0; |