Skip to content

Instantly share code, notes, and snippets.

View GerardLutterop's full-sized avatar

Gerard Lutterop GerardLutterop

View GitHub Profile

Als je slechts geïnteresseerd bent in één specifieke frequentie, is het berekenen van een volledige Fast Fourier Transform (FFT) vaak “overkill”. Een FFT berekent namelijk de amplitude voor álle frequentie-bins tegelijk.

Voor een enkele frequentie kun je beter de Discrete Fourier Transform (DFT) formule direct toepassen voor die specifieke waarde, of de Goertzel-algoritme gebruiken als efficiëntie cruciaal is.

Hier is hoe je dit aanpakt in Python:

1. De directe methode (DFT)

De wiskundige kern van een Fourier-transformatie is het vermenigvuldigen van je signaal met een complexe sinusgolf van de doelfrequentie en daar het gemiddelde (of de som) van nemen.

X(f)
@GerardLutterop
GerardLutterop / costs comparison.md
Created April 24, 2018 11:53
Cost comparison high level traditional and yourapi
Scenario One time traditional Monthly traditional One time yourapi Monthly yourapi
1 dev, 5M records, 100M API calls/mo $15k-$25k $650-$1,350 $2k $450
2 dev, 10M records, 200M API calls/mo $20k-$30k $1,000-$2,000 $3k $850
@GerardLutterop
GerardLutterop / costs.md
Created April 24, 2018 11:51
Table price comparison breakdown
Activity Amount of work yourapi amount of work
Research 3-6 days 0
Design url's, database, security 10-15 days 0
Build a prototype 5-8 days 0
Minimum viable product 5-10 days 0
Full product 10-20 days 5 days
Monitoring and alerting 3-5 days 0
Documentation (somebody will use your API!) 1-2 days 1 day
Selecting hosting, deployment 5-8 days 0
@GerardLutterop
GerardLutterop / price2.md
Created April 24, 2018 11:47
Cost table API, total cost
Activity Amount of work
Research 3-6 days
Design url's, database, security 10-15 days
Build a prototype 5-8 days
Minimum viable product 5-10 days
Full product 10-20 days
Monitoring and alerting 3-5 days
Documentation (somebody will use your API!) 1-2 days
Selecting hosting, deployment 5-8 days
@GerardLutterop
GerardLutterop / price1.md
Last active December 3, 2019 10:07
Cost table additional work
Activity Amount of work
Research 2–3 days
Design url’s, security 5–10 days
Build a prototype 3–5 days
Minimum viable product 5 days
Monitoring and alerting 2–3 days
Documentation (somebody will use your API!) 1–2 days
Selecting hosting, deployment 3–5 days
Deployment
@GerardLutterop
GerardLutterop / price.md
Last active April 24, 2018 11:33
Cost comparison custom and yourapi solution
Activity Amount of work yourapi amount of work
Research 3-6 days 0
Design url's, database, security 10-15 days 0
Build a prototype 5-8 days 0
Minimum viable product 5-10 days 0
Full product 10-20 days 5 days
Monitoring and alerting 3-5 days 0
Documentation (somebody will use your API!) 1-2 days 1 day
Selecting hosting, deployment 5-8 days 0
def test_remote_detect():
from indroid.utils import get
r1 = get(function='light_detect_stub',
arguments={"chosen": False, "housenumber": "1", "postcode": "9999AA", "namechecked": True})
print r1
@view_config(route_name='appointment_by_code', renderer='templates/index.jinja2', request_method='GET')
def appointment_by_code(self):
"""Landingspage for the user to show available time slots and process the user's choice."""
log.debug('appointment_by_code')
request = self.request
code = request.matchdict.get('code')
cust = request.db.get_customer_by_code(code)
if not cust:
request.session['header'] = 'Klant onbekend'
request.session['message'] = 'Het opgegeven klantnummer is niet gevonden.'