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
| eventsource | |
| go-eventsource | |
| client/client |
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
| from flask import Flask, request, redirect, url_for, make_response, abort | |
| from werkzeug import secure_filename | |
| from pymongo import Connection | |
| from pymongo.objectid import ObjectId | |
| from gridfs import GridFS | |
| from gridfs.errors import NoFile | |
| ALLOWED_EXTENSIONS = set(['txt', 'pdf', 'png', 'jpg', 'jpeg', 'gif']) | |
| DB = Connection().gridfs_server_test | |
| FS = GridFS(DB) |
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 { | |
| yellow, | |
| cyan, | |
| bold, | |
| red | |
| } from "https://deno.land/std@v0.31.0/fmt/colors.ts"; | |
| import { serve } from "https://deno.land/std@v0.31.0/http/mod.ts"; | |
| import { | |
| MultipartReader, | |
| FormFile |
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 { readLines } from "https://deno.land/std@v0.36.0/io/mod.ts"; | |
| import { parse } from "https://deno.land/std@v0.36.0/flags/mod.ts"; | |
| import { basename } from "https://deno.land/std@v0.36.0/path/mod.ts"; | |
| export {}; | |
| if (import.meta.main) { | |
| const args = parse(Deno.args, { | |
| boolean: ["h"], | |
| alias: { |
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 { parse } from "https://deno.land/std@v0.30.0/flags/mod.ts"; | |
| import { EOL } from "https://deno.land/std@v0.30.0/path/mod.ts"; | |
| import marked from "https://raw.githubusercontent.com/denolib/marked/master/main.ts"; | |
| const args = parse(Deno.args); | |
| if (args.h || args.help) { | |
| printUsage(); | |
| Deno.exit(0); | |
| } |
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
| /** | |
| * spark - https://github.com/holman/spark | |
| * | |
| * The MIT License | |
| * Copyright (c) Zach Holman, https://zachholman.com | |
| */ | |
| import { parse } from "https://deno.land/std@v0.30.0/flags/mod.ts"; | |
| export function spark(...nums: number[]): string { | |
| let min = Infinity; |
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
| #lang racket/base | |
| (require racket/list | |
| racket/match) | |
| ; The call-by-value lambda calculus: | |
| (define (eval-expr expr env) | |
| (match expr | |
| [(? symbol?) | |
| (env expr)] |
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
| // see http://www.eprg.org/computerphile/tripref.c | |
| package main | |
| import ( | |
| "fmt" | |
| "strings" | |
| ) | |
| type thing struct { | |
| item string |
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
| module Manifest exposing (..) -- remove this line to run in http://elm-lang.org/try | |
| import Html exposing (Html, node, div, h2, text, table, thead, tbody, tr, th, td) | |
| import Html.Attributes exposing (class) | |
| import Json.Decode as Json exposing (Decoder) | |
| main : Html msg | |
| main = |
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 { useEffect, useReducer } from "react"; | |
| const dispatchers = new Map(); | |
| function centralDispatch(type, payload) { | |
| for (const dispatch of dispatchers.keys()) { | |
| dispatch({ type, payload }); | |
| } | |
| } |
NewerOlder