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
    
  
  
    
  | -- Question: https://adventofcode.com/2015/day/3 | |
| import qualified Data.Set as S | |
| import System.IO (readFile) | |
| -- Move Santa according to a direction | |
| move :: (Int, Int) -> Char -> (Int, Int) | |
| move (x, y) c = case c of | |
| '^' -> (x, y + 1) | |
| 'v' -> (x, y - 1) | 
  
    
      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
    
  
  
    
  | -- Pull in the wezterm API | |
| local wezterm = require("wezterm") | |
| -- This will hold the configuration. | |
| -- local config = wezterm.config_builder() | |
| local act = wezterm.action | |
| -- hyperlinks rules | |
| local hyperlink_rules = wezterm.default_hyperlink_rules() | |
| table.insert(hyperlink_rules, { | 
  
    
      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
    
  
  
    
  | type stack []rune | |
| func (s *stack) push(n rune) { | |
| *s = append(*s, n) | |
| } | |
| func (s *stack) pop() rune { | |
| if s.empty() { | |
| panic("stack is empty") | 
  
    
      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
    
  
  
    
  | // | |
| // ContentView.swift | |
| // WeirdSheet | |
| // | |
| // Created by lotusirous on 28/11/2022. | |
| // | |
| import SwiftUI | |
| protocol Nameable { | 
  
    
      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
    
  
  
    
  | import Combine | |
| import Foundation | |
| enum NetworkError: Error { | |
| case unauthorized | |
| case badServerResponse | |
| case wrongType | |
| case unknown | |
| } | 
  
    
      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
    
  
  
    
  | package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "math/rand" | |
| "net/http" | |
| "time" | |
| ) | 
  
    
      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
    
  
  
    
  | // | |
| // StreamRecorder.swift | |
| // pesos | |
| // | |
| // Created by Gru-2019015 on 2022/08/26. | |
| // | |
| import AVFoundation | |
| import Combine | |
| import Foundation | 
  
    
      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 split_by_n(seq, n): | |
| """Split a sequence by n elements""" | |
| while seq: | |
| yield seq[:n] | |
| seq = seq[n:] | 
  
    
      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
    
  
  
    
  | let url = URL(string: "https://postman-echo.com/time/valid?timestamp=2016-10-10")! | |
| struct PostmanResponse: Decodable { | |
| let valid: Bool | |
| } | |
| enum ApiError: Error { | |
| case invalidServerResponse | |
| } | 
  
    
      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
    
  
  
    
  | import UIKit | |
| let url = URL(string: "http://127.0.0.1:1234")! | |
| var request = URLRequest(url: url) | |
| request.setValue("application/json", forHTTPHeaderField: "Content-Type") | |
| request.setValue("you-value-goes-here", forHTTPHeaderField: "X-API-KEY") | |
| let task = URLSession.shared.dataTask(with: request) { data, _, error in | |
| if let data = data { | 
NewerOlder