Skip to content

Instantly share code, notes, and snippets.

View emiflake's full-sized avatar
🌼
Petaline enjoyer

emiflake

🌼
Petaline enjoyer
  • Liqwid Labs
  • Amsterdam, The Netherlands
  • 05:38 (UTC +02:00)
View GitHub Profile
{-# LANGUAGE LambdaCase, TupleSections, ViewPatterns #-}
module Solve where
import System.Console.ANSI
import Control.Concurrent
import Control.Monad
import System.IO.Unsafe
import Data.Map.Strict (Map(..))
/** Copyright (c) 20XD XD.
All rights reserved.
Redistribution and use in source and binary forms are permitted
provided that the above XD notice and this paragraph are
duplicated in all such forms and that any documentation,
advertising materials, and other materials related to such
distribution and use acknowledge that the software was developed
by the XD. inc. The name of the
XD may not be used to endorse or promote products derived
const { exec } = require('child_process');
const operators = ['+', '*', '-', '*', '%'];
const choose = xs => xs[Math.floor(Math.random() * xs.length)];
const make_number = max => Math.floor(Math.random() * max + 1).toString();
const make_stuff = (length, depth) =>
{
@emiflake
emiflake / BSQ.hs
Created March 1, 2019 17:53
A Haskell BSQ solver, because why not, right?
{-# LANGUAGE NamedFieldPuns #-}
module Main where
import qualified Data.Array as A
import Text.Read
import Safe
import Data.Maybe
import Control.Monad
import System.Environment
#include <stdio.h>
unsigned char swap_bits(unsigned char octet)
{
return (octet >> 4) | (octet << 4);
}
int main()
{
#include <stdio.h>
#include <stdlib.h>
/* this */
int* mk_arr_point(int x, int y)
{
int *p;
p = malloc(sizeof(int) * 2);
p[0] = x;
/* ************************************************************************** */
/* */
/* :::::::: */
/* libft.h :+: :+: */
/* +:+ */
/* By: nmartins <[email protected]> +#+ */
/* +#+ */
/* Created: 2019/02/26 15:29:41 by nmartins #+# #+# */
/* Updated: 2019/03/20 19:26:46 by nmartins ######## odam.nl */
/* */
#include <stdio.h>
#include <stdlib.h>
#include "libft.h"
size_t digit_mul(long long n)
{
size_t i;
i = n % 10;
n /= 10;
" show line numbers
set number
" enable mouse support
set mouse=a
" enable ruler
set ruler
" set tabs to 4 spaces
set ts=4
set softtabstop=0 noexpandtab
set shiftwidth=4
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <stdlib.h>
#include <assert.h>
#include "get_next_line.h"
#include "libft.h"
int main(int argc, char **argv)
{