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
name: TLA | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: |
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
usage: | |
``` | |
cat /tmp/My\ Clippings.txt | python3 quote-to-md.py | |
``` |
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
class Trie: | |
def __init__(self): | |
self.children = {} | |
self.isTerminal = False | |
def setIsTerminal(self): | |
self.isTerminal = True | |
def insert(self, word: str) -> None: |
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
datatype ffun = const of int (* Possiamo trovare delle costanti intere *) | |
| plus of (ffun*ffun) (* Addizione *) | |
| var of string (* Variabili di tipo stringhe *) | |
| llet of (string*ffun*ffun) (* La funzione let, che prende una variabile stringa, e due oggetti di tipo ffun *) | |
| fffun of (string*ffun) (* Una funzione *) | |
| ycombinator of (ffun) | |
| appl of (ffun*ffun) | |
| ifelse of (ffun*ffun*ffun) | |
| minus of ffun | |
| prod of (ffun*ffun); |
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
# Instruction + template repo: https://github.com/FedericoPonzi/rust-ci | |
# Search and replace <YOUR_BINARY_NAME> with your binary name. | |
name: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
tags: |
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
use crate::error::Result; | |
use crate::formats::Service; | |
use std::collections::BTreeMap; | |
/// Get a starting executon order | |
/// Result is a vector of vectors(batches) of Service. | |
/// Each batch has no dependence between each other so they can be started in parallel. | |
/// TODO: this might deadlock if `services` is not a DAG. | |
/// TODO: this topological sorting works, every process in set index i + 1 has only | |
/// dependencies in `0...i`. But, this might lead to a non optimal solution, because if a process j + 1 has a dependency |
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
use futures::{Async, Future, Poll}; | |
use tokio::io::{AsyncRead, AsyncWrite, Error, ReadHalf, WriteHalf}; | |
use tokio::net::TcpStream; | |
use warp::{path, Filter, Stream}; | |
struct Receiver { | |
rx: ReadHalf<TcpStream>, | |
} | |
impl Stream for Receiver { | |
type Item = String; |
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
#from: https://basarat.gitbooks.io/typescript/docs/quick/nodejs.html | |
npm init -y | |
npm install typescript --save-dev | |
npm install @types/node --save-dev | |
npx tsc --init --rootDir src --outDir lib --esModuleInterop --resolveJsonModule --lib es6,dom --module commonjs | |
# Done! use `code .` to fireup visual studio. |
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 me.fponzi; | |
class Main { | |
static class Pair{ | |
// Result string | |
String ret; | |
// Position of the consumed portion of the string. | |
int val; | |
public Pair( String ret, int val) { |
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
FROM gradle:jdk8-alpine | |
VOLUME gradle-cache:/home/gradle/.gradle | |
VOLUME /tmp | |
USER root | |
ADD . /home/gradle/project | |
WORKDIR /home/gradle/project | |
RUN chown gradle:gradle -R /home/gradle | |
USER gradle | |
RUN gradle bootJar | |
#Start from a java:8 |
NewerOlder