Skip to content

Instantly share code, notes, and snippets.

View dmateos's full-sized avatar

Daniel Mateos dmateos

View GitHub Profile
#include "main.h"
#include <SDL2/SDL.h>
#include <cglm/cglm.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "utils.h"
#include "main.h"
#include <SDL2/SDL.h>
#include <cglm/cglm.h>
#include <math.h>
#include <stdio.h>
#include <unistd.h>
typedef struct _triangle {
char r, g, b;
1 import fastapi
2 import pydantic
3 import typing
4 import redis
5
6
7 class Blob(pydantic.BaseModel):
8 handle: str
9 data: str
10 lifetime: int
1 import fastapi
2 import pydantic
3 import typing
4 import redis
5
6
7 class Blob(pydantic.BaseModel):
8 handle: str
9 data: str
10 lifetime: int
1 import fastapi
2 import pydantic
3 import typing
4
5
6 app = fastapi.FastAPI()
7
8
9 class Blob(pydantic.BaseModel):
10 handle: str
@dmateos
dmateos / .py
Last active January 29, 2019 14:31
import time
import re
import selenium.webdriver
from selenium.webdriver.support.ui import Select
TARGET="https://azure.microsoft.com/en-au/pricing/calculator/"
def extract_decimal_from_string(string):
floats = re.findall("\d+\.\d+", string)
return [ float(f) for f in floats ]
class CacheTable(object):
def __init__(self, cache):
self.cache = cache
self.row_template = {
"capital" : 0,
"amortised" : 0,
"monthly" : 0,
"costs" : [],
"scenarios" : [],
"dependencies" : 1,
# Toy Robot Simulator
## Description
This test must be completed in *python*.
### Overview
* The application is a simulation of a toy robot moving on a square tabletop, of dimensions **5 x 5 units**.
* There are no other obstructions on the table surface.
package main
import (
"fmt"
"net/http"
)
type Routable interface {
Get() string
}
class device {
class { "ntp" :
service_ensure => "running",
package_ensure => "present",
servers => ["time.iinet.net.au"]
}
class { "python" :
#this should be 2.7 explicilty but breaks on my test ubuntu 16.04 vm...
version => "system",