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
| const std = @import("std"); | |
| // fails with compile error | |
| pub fn fileReader() !type { | |
| var file = try std.fs.cwd().openFile("./lines.csv", .{}); | |
| defer file.close(); | |
| var buf_reader = std.io.bufferedReader(file.reader()); | |
| return buf_reader.reader(); | |
| } | |
| pub fn main() !void { |
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
| Line | Start | End | Duration | One Way? | |
|---|---|---|---|---|---|
| 1 | Château de Vincennes | ||||
| 1 | Bérault | Château de Vincennes | 0:01 | ||
| 1 | Saint-Mandé–Tourelle | Bérault | 0:01 | ||
| 1 | Porte de Vincennes | Saint-Mandé–Tourelle | 0:01 | ||
| 1 | Nation | Porte de Vincennes | 0:02 | ||
| 1 | Reuilly–Diderot | Nation | 0:02 | ||
| 1 | Gare de Lyon | Reuilly–Diderot | 0:01 | ||
| 1 | Bastille | Gare de Lyon | 0:02 | ||
| 1 | Saint-Paul | Bastille | 0:02 |
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
| puts "DATA is a #{DATA.class}" | |
| puts DATA.read | |
| __END__ | |
| here is some | |
| data, that, i, | |
| have |
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
| <html> | |
| <head> | |
| <script src="https://unpkg.com/stimulus/dist/stimulus.umd.js"></script> | |
| <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script> | |
| <link | |
| href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" | |
| rel="stylesheet" | |
| /> | |
| <script> |
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
| MEMORY | |
| { | |
| ROM: start=$8000, size=$8000, type=ro, define=yes, fill=yes, file=%O; | |
| } | |
| SEGMENTS | |
| { | |
| CODE: load=ROM, type=ro; | |
| VECTORS: load=ROM, type=ro, offset=$7ffa; | |
| } |
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
| # this will be the mandelbrot set, written in python | |
| import sys | |
| import machine | |
| import st7789py as st7789 | |
| import random | |
| from machine import Pin | |
| def scale_x(px): | |
| #scaled x coordinate of pixel (scaled to lie in the Mandelbrot X scale (-2.5, 1)) | |
| return -2.5 + px * 3.5 / 239 |
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
| Dir["./app/middleware/*.rb"].each do |file| | |
| require file | |
| end | |
| config.middleware.use(::DebugMiddleware) |
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
| console.log('done'); |
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
| #!/usr/bin/env ruby | |
| #find a commit from a file and a line | |
| require 'optparse' | |
| options = {} | |
| OptionParser.new do |opts| | |
| opts.banner = "Usage: #{$0} [options] filename:linenumber" | |
| opts.on("-l") do |v| |
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
| pip3 install jupyter | |
| jupyter notebook | |
| # now, you have a web server running with jupyter! |