News for hackers. Stuff that matters.

sloev

Ask HN: How to pay devs evenly on product?

Hi I am making a new agency for developing a portfolio of niche saas products. My ideal is to split all profits accordingly:50% goes to buying (read: freeing) up forrest land.50% is split between all devs on the individual products.My questions are (and here only regarding the 50% not going to forrests)1. How to split the profit amongst devs in a fair way?1.a. Should it reflect their level of...

( Read More... | no comments | 2 points | on HN )
hi, i just released an api version of the opensource "spotiflite" spotify metadata scraper (https://github.com/sloev/spotiflite) that lets you fetch metadata for an artist.

I thought it could be a fun exercise to see how easy it is now-a-days to setup a subscription paid api "without pulling up my credit card from the pocket"

so here is the steps i took:

1. setup a free api using cloudflare workers:

I started by creating the api on cloudflare workers since they are by far the cheepest and their fremium model makes it possibly to publish an api without a credit card.

Key learnings for me was:

* env vars can be created in the UI and then they get injected as vars in your js script.

* use the url.pathname to have multiple paths in one api

* Use custom headers from your apigateway provider to only respond to those requests.

The sourcecode for the cloudflare worker is here https://github.com/sloev/spotiflite/blob/master/cloudflare/w...

2. use rapidapi.com as api gateway

After i had created my api i needed a place to publish it and "receive moneyz cuz lulz" so i choose rapidapi cuz they dont need any credit cards either and have a simple way to setup.

With rapidapi i created an endpoint pointing to my new api with my new path: "artist-meta" and then i specified some ~random~ price ranges include a free option and pressed publish.

All in all, publishing an api and get moneyz for requests is more easy now than ever.

If you want to stay in control of deployment i can recommend Lambdarest instead. Its much simpler: only does routing and input marshaling. Has been in prod since 2017 and is actively maintained (i am doing that ;-)

https://github.com/trustpilot/python-lambdarest

Re:Show HN: Spotiflite – scrape spotify metadata to sqlite on Saturday April 04, 2020 @10:35PM (#22783298)
like like this (but now in color): https://www.youtube.com/watch?v=2gralXkKSkw
Re:Show HN: Spotiflite – scrape spotify metadata to sqlite on Saturday April 04, 2020 @10:31PM (#22783279)
Scrapes meta data, like related artists, and where in the world people listen to the artist, off Spotify and stores in a sqlite4 db.

source code: https://github.com/sloev/spotiflite

install: $ pip install spotiflite

run: $ spotiflite scrape

Re:Fuzzy portrait live drawn by Python on Saturday April 04, 2020 @08:49PM (#22782786)
A repost of a previous post on Hackernews: https://news.ycombinator.com/item?id=21660647

Since i didnt know how to update the old one with the timelapse video that i think shows the diversity of the algorithm

Re:Fuzzy portrait live drawn by Python on Saturday April 04, 2020 @08:46PM (#22782768)
Live drawing: https://vrangen.net/fuzzy/

Debug frame showing the particles that draw: https://vrangen.net/fuzzy/static/images/debug.jpg

Stopmotion of 3 months of drawings in full hd: https://youtu.be/7xoZ3aDwPk4

Source code: http://github.com/sloev/face_experiments

Byw supernihil, sloev and johannes valbjorn are one and the same (occationally nihil as well)
Yeah please contact me. I have been around in mount silly for years and might be able to help out other sillyheads

My contact info is at

sloev.github.io (about)

Re:Show HN: A live-drawn portrait of the common face on Friday November 29, 2019 @05:57PM (#21667300)
The image on the site is refreshed every 5 seconds. Changes are minuscule it does 1000 pixel changes a minute currently. Particles move at 1 pixel speed with an angle based on their behavior
Re:Show HN: A live-drawn portrait of the common face on Friday November 29, 2019 @05:55PM (#21667295)
Yeah very unnerving. It is also nearly as hairy as i am hahaha (long haired danish dude here)
Re:Show HN: A live-drawn portrait of the common face on Friday November 29, 2019 @05:55PM (#21667293)
They are unaware of the underlying image they draw. Each particle is associated a random picture to draw at birth and continous to draw until death. Draw means copy a pixel from the source image to the displayed output image.

Each particle class is defined with a color in the debug.jpg image

Re:Show HN: A live-drawn portrait of the common face on Friday November 29, 2019 @05:53PM (#21667289)
It moves in real time. It is drawn continously by phthon software. Visit the mentioned https://vrangen.net/fuzzy/static/images/debug.jpg url for a snapshot of how the particle workers are currently moving around
Re:Show HN: A live-drawn portrait of the common face on Thursday November 28, 2019 @05:41PM (#21660647)
Author here.

A python program continously draws 22 different faces over each other.

All faces are aligned at the eyes.

The drawing particles have three different behaviors:

1. Move randomly

2. Move randomly with 45 degree angles

3. Move randomly but attracted to the firstborn particle and afraid of being near the average position of all particles.

Go to

https://vrangen.net/fuzzy/static/images/debug.jpg

for a picture of the particles in action

Sourcecode available at

http://github.com/sloev/face_experiments

I am so tired of AI-bullying. No-one should be degraded or spoken badly about because some AI wins in some task. Please treat Lee with respect as he is a pillar in human intelligence. We in denmark whish you all the best Lee. I hope you will continue with your explorations in this fine game. Kindest regards from Denmark
Re:Show HN: Metrace – easy Python CPU/memory tracing on Tuesday September 17, 2019 @11:15AM (#20996144)
author here

I spend some time looking for a tool (2 hours on github/google) and simply couldn't find a tool that:

* tracked cpu/memory usage for a process AND its children

* let me annotate scopes (using a context manager) in code to know later how much was used (cpu/memory) in that scope

* provided a nice HTML output with interactive charts and downloadable images

* low amount of dependencies

.

so i made Metrace. It does those things and ONLY those things.

it

* appends all info to a json lines file for easy interpretation (slow i know, but simple ;-)

* uses plotly to generate nice cpu and memory charts where individual processes have their own line charts (within the figure) and the traces (reported using the context manager) are correctly associated to the processes

It is brutally implemented, I needed the tool asap, but i will invest some time in increasing code quality soon (20 percent time).

.

similar things that didnt feel they met my demands:

* memory-profiler

* netdata

* name your tool, i probably tried it :-)

Re:Emailbin.org a Place for Anonymous Emails on Tuesday February 19, 2019 @07:32AM (#19198468)
Re:Emailbin.org a Place for Anonymous Emails on Tuesday February 19, 2019 @07:30AM (#19198459)
creator here:

emailbin.org is running on elasticsearch with a hideous frontend of pure raw html hahaha

usecases:

* email signups

* posting of email threads to government

* your ideas

it is and will always be a free place to lay your emails to rest :-)

Re:Facebook likes in Python on Sunday February 17, 2019 @05:34PM (#19187331)
a python package to get facebook likes for arbitrary facebook pages, using the facebook iframe page widget under the hood