Skip to content

Instantly share code, notes, and snippets.

View manegame's full-sized avatar
👁️‍🗨️

Manus manegame

👁️‍🗨️
View GitHub Profile
<script lang="ts">
import { PrismiceEmbed } from "@prismicio/types"
export let embedCode;
export let classes = "";
export let responsive = false;
export let background = false // only for Vimeo chromeless videos
let htmlCode = embedCode.html
if (background) {
@manegame
manegame / mapping.js
Created May 26, 2020 16:13
OCEAN mapping on an X-Y scale
// Start with an OCEAN model, for example:
// LGBTI
// O: 75
// C: 30
// E: 75
// A: 45
// N: 65
// Here we assign the weights for each of the scales
// SCALE X
let people = ['Jack', 'John', 'James'];
let colors = ['red', 'blue', 'green'];
console.log(people);
console.log(colors);
// Length of an array
console.log(colors.length)
// Add purple
@manegame
manegame / 1.json
Last active June 16, 2019 16:38
Requests
{
"MUST": [
{
"MATCH": {
"predicted_lexicology_v1_1": {
"id": "744fdb65-8810-4a48-a16f-4238d6d814c9",
"value": "[90:100]"
}
}
}
@manegame
manegame / Lexicologies.json
Last active June 14, 2019 16:57
Lex results
[
{
"id": "ecc592c2-808f-a3f7-5e1f-c9108584e61f",
"category_name": "situation",
"name": "Adrenaline (Sports & Action)",
"description": ""
},
{
"id": "9be268c7-674b-4bd3-a2a3-a8883d347aa7",
"category_name": "mood",
{
"tracks": {
"href": "https://api.spotify.com/v1/search?query=isrc%3AFR59R1779926&type=track&offset=0&limit=20",
"next": null,
"items": [
{
"id": "1bJXuE8HHh3KnNOBhAk3xK",
"uri": "spotify:track:1bJXuE8HHh3KnNOBhAk3xK",
"href": "https://api.spotify.com/v1/tracks/1bJXuE8HHh3KnNOBhAk3xK",
"name": "Just Feel Alright",
/**
*
* @param {Number} num
* @param {Number} in_min
* @param {Number} in_max
* @param {Number} out_min
* @param {Number} out_max
*/
mapValues(num, in_min, in_max, out_min, out_max) {
return (num - in_min) * (out_max - out_min) / (in_max - in_min) + out_min
[
{
"category": "genre",
"uid": "32e195f0-f5c9-4646-b76c-b4a68cc11be2",
"percentage": 100,
"color": "rgb(53, 204, 113)",
"catIndex": 0,
"subcatIndex": 0
},
{
{
"MUST": [
{
"MATCH": {
"predicted_lexicology_v1_1": {
"id": "d004e500-719d-4880-9eec-1e76cabeec11",
"value": "[80:100]"
}
}
}
Request:
{
"SHOULD": [
{
"MATCH": {
"predicted_lexicology_v1_2": {
"id": "4a3b3492-8a7e-413f-9d8c-bcc76a1c2ad2",
"value": "[50:100]"
}