This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ninja: error: rebuilding 'build.ninja': subcommand failed | |
>>>> Finish compiling(exit: 1) | |
>>>> Start compiling | |
[1/2] Building src/views/PlaylistCreator.mlast | |
File "/Users/pawelfalisz/Documents/Reason/reason-spotify-mood/src/views/PlaylistCreator.re", line 68, characters 5-9: | |
Error: 1277: <syntax error> | |
File "/Users/pawelfalisz/Documents/Reason/reason-spotify-mood/src/views/PlaylistCreator.re", line 1, characters 0-0: | |
Error: Error while running external preprocessor | |
Command line: /Users/pawelfalisz/Documents/Reason/reason-spotify-mood/node_modules/bs-platform/lib/refmt.exe --print binary '/Users/pawelfalisz/Documents/Reason/reason-spotify-mood/src/views/PlaylistCreator.re' > /var/folders/c3/ss_l17896dzb35nz69__hqfr0000gn/T/ocamlppb47104 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import urllib | |
from flask import Flask, send_file, jsonify, redirect | |
from flask_cors import CORS | |
from .conifg import Config | |
from api import TracksEndpoint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slownik = {} | |
while True: | |
imie = input("podaj imie") | |
if(imie == "quit"): | |
break | |
telefon = input("podaj telefon: ") | |
slownik[imie] = telefon | |
print(slownik) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let updateData = (send, payload: Api.payload, newOffset) => { | |
send(SetTracks(payload.tracks)); | |
send(SetPercent(payload.percent)); | |
send(SetTotal(payload.total)); | |
send(SetOffset(newOffset)) | |
}; | |
let rec fetchTracksUntilAllGetLoaded = (send, state) => | |
Api.fetchMoreTracks(state.offset) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Components; | |
open Belt; | |
module type Config = { | |
type t; | |
let instancesDecoder: Js.Json.t => array(Js.t(t)); | |
let recordKeeper: (~id: string, Js.t(t)) => bool; | |
let detailsUrl: string; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Belt; | |
module type Track = { | |
type t; | |
let percentDecoder: Js.Json.t => int; | |
}; | |
type state = {percent: int}; | |
type action = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let parseUrlParams = urlString => { | |
let params = | |
Js.String.replace("?", "", Js.String.replace("#", "", urlString)); | |
let listParams = Js.String.split("&", params); | |
let pairs = Js.Array.map(x => Js.String.split("=", x), listParams); | |
let keys = Js.Array.map(x => x[0], pairs); | |
let values = Js.Array.map(x => x[1], pairs); | |
Js.log(keys); | |
Js.log(values); | |
let dict = |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let parseUrlParams = urlString => { | |
let params = | |
Js.String.replace("?", "", Js.String.replace("#", "", urlString)); | |
let listParams = Js.String.split("&", params); | |
Js.log(listParams); | |
let arrayParams = | |
Js.Array.reduce( | |
(acc, curr) => { | |
let singleParam = Js.String.split("=", curr); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
external toJsUnsafe: 'a => 'b = "%identity"; | |
let unwrapValue = | |
fun | |
| `String((s: string)) => toJsUnsafe(s) | |
| `Bool((b: bool)) => toJsUnsafe(b) | |
| `Float((f: float)) => toJsUnsafe(f) | |
| `Int((i: int)) => toJsUnsafe(i) | |
| `Date(d) => toJsUnsafe(d) | |
| `Callback(c) => toJsUnsafe(c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open Components; | |
type state = {fetching: bool}; | |
let initialState = () => {fetching: false}; | |
type action = | |
| StartFetching | |
| Noop; |