Generally, I think the document is very well-prepared and addresses most of the important problems that startups face in their early stages.
This file contains hidden or 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
{ | |
"data": { | |
"completeSubmissionProcessing": { | |
"success": false, | |
"error_message": "exception {'message': \"field '_set' not found in type: 'Submission_set_input'\", 'extensions': {'path': '$.selectionSet.update_Submission_by_pk.args._set._set', 'code': 'validation-failed'}} when making gql query\nmutation CompleteClientSubmissionProcessing($id: Int!, $set: Submission_set_input!) {\n update_Submission_by_pk(pk_columns: {id: $id}, _set: $set) {\n id\n sg_playlist_id\n status\n error_message\n SubmissionRows {\n id\n error_message\n sg_version_id\n status\n SubmissionRowFiles {\n id\n error_message\n sg_published_file_id\n status\n SubmissionRowFileLocations {\n id\n error_ |
This file contains hidden or 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
use calculator::Calculator; | |
use clap::Parser; | |
use db::InMemory; | |
use futures::{future::poll_fn, SinkExt, StreamExt}; | |
use tokio::{ | |
net::{TcpListener, TcpStream}, | |
sync::mpsc, | |
}; | |
use tokio_stream::wrappers::UnboundedReceiverStream; | |
use tokio_tungstenite::tungstenite::Message as WsMessage; |
This file contains hidden or 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
{ pkgs ? import <nixpkgs> { } }: | |
pkgs.mkShell { | |
packages = [ | |
pkgs.elixir | |
pkgs.exercism | |
pkgs.elixir-ls | |
] ++ | |
# Linux only | |
pkgs.lib.optionals pkgs.stdenv.isLinux [ |
This file contains hidden or 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
(defun range (x y) | |
(let ((start (min x y)) (end (max x y))) | |
(loop for i from start to end | |
collect i))) | |
(defun primep (num) | |
(cond | |
((<= num 1) nil) | |
((= num 2) t) | |
(t |
This file contains hidden or 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
use itertools::Itertools; | |
pub fn lexo_next(num: usize) -> usize { | |
let digits = digits(num); | |
let mut perms = digits | |
.iter() | |
.permutations(digits.len()) | |
.map(number) | |
.filter(|perm| *perm != num) |
This file contains hidden or 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
pub type Grid = Vec<Vec<u8>>; | |
pub fn grid_perimeter(grid: Grid) -> usize { | |
grid.iter() | |
.enumerate() | |
.map(|(i, row)| { | |
row.iter() | |
.enumerate() | |
.filter_map(|(j, cell)| if *cell == 1 { Some(j) } else { None }) | |
.map(|j| { |
This file contains hidden or 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
def island_perimeter(grid): | |
perimeter = 0 | |
for i in range(len(grid)): | |
row = grid[i] | |
for j in range(len(row)): | |
cell = grid[i][j] | |
if cell != 1: | |
continue |
This file contains hidden or 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
fn is_isomorphic(s1: &str, s2: &str) -> bool { | |
let mask1 = str_mask(s1); | |
let mask2 = str_mask(s2); | |
mask1 == mask2 | |
} | |
fn str_mask(s: &str) -> Vec<usize> { | |
s.chars() | |
.fold((None, Vec::<usize>::new()), |(last_c, mut acc), curr_c| { |
This file contains hidden or 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
function faultyKeeb(str: string): string { | |
const out = []; | |
const vowels = ["a", "e", "i", "o", "u"]; | |
for (const ch of str) { | |
if (vowels.includes(ch)) { | |
out.reverse(); | |
} else { | |
out.push(ch); | |
} | |
} |
NewerOlder