This file contains 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
#!/bin/bash | |
temporary='.topprover-tool' | |
cookie="$temporary/cookie.txt" | |
problem="$temporary/id.txt" | |
curl="curl -b $cookie" | |
topprover='https://top-prover.top' | |
function make_tmpdir() { | |
if [ ! -d $temporary ]; then |
This file contains 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
#!/bin/sh | |
COOKIE="cookie.txt" | |
CURL="curl -b $COOKIE" | |
TOPPROVER='https://top-prover.top' | |
cat <<EOF > Makefile | |
login: | |
curl -X POST -F 'user=$TOPPROVER_USER' -F 'password=$TOPPROVER_PASSWORD' $TOPPROVER/login -c $COOKIE |
This file contains 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
section .data | |
fizz db "Fizz" | |
buzz db "Buzz" | |
newline db 10 | |
section .bss | |
digits resb 32 | |
section .text | |
global _start |
This file contains 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 dir-opt | |
set fmt | |
set sig | |
switch $argv[1] | |
case left | |
set fmt "+%d+0" | |
set sig '(-1)' | |
case right | |
set fmt "+%d+0" | |
set sig 1 |
This file contains 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 perl6 | |
use v6.c; | |
use HTTP::UserAgent; | |
use XML::Document; | |
use HTML::Parser::XML; | |
sub get-popularity($user-agent, $phrase) { | |
my $url = 'https://www.google.com/search?lr=lang_en&as_epq=' ~ $phrase.subst(' ', '+', :g); | |
my $response = $user-agent.get($url); | |
my $parser = HTML::Parser::XML.new; |
This file contains 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 tsp | |
import ( | |
"math" | |
"math/rand" | |
"time" | |
) | |
type Point struct { | |
X, Y float64 |
This file contains 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-compile-options main: #t) | |
(module-extends javafx.application.Application) | |
(import (class javafx.stage Stage) | |
(class javafx.scene Scene) | |
(class javafx.scene.layout StackPane) | |
(class javafx.scene.control Button) | |
(class javafx.application Application)) | |
(define (start (stage :: Stage)) | |
(let* ((btn (Button |
This file contains 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
#!/bin/zsh | |
#usage : ./runner.zsh 'execution command' problem-id | |
COMMAND=$1 | |
PROBLEMID=$2 | |
for i in {1..5}; do | |
INFILE="2015-yo-t$PROBLEMID-in$i.txt" | |
OUTFILE="2015-yo-t$PROBLEMID-out$i.txt" |
This file contains 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
\documentclass[a4j]{jsarticle} | |
\makeatletter | |
\def\eratos#1 {{% | |
\newcount \eratos@i \relax | |
\eratos@i = 1 \relax | |
\@whilenum\eratos@i<#1\do{% | |
\@namedef{eratos@isprime\the\eratos@i}{1} \relax | |
\advance \eratos@i 1 \relax | |
}% |
This file contains 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
(ns fxtest.core | |
(:require [fx-clj.core :as fx])) | |
(import (javafx.scene.paint Color LinearGradient Stop CycleMethod) | |
(javafx.geometry Insets) | |
(javafx.scene.effect DropShadow)) | |
(defn create-view [] | |
(fx/h-box | |
{:style "-fx-background-color: #000000" |
NewerOlder