- Create a new folder
- Create a build.gradle file
- Inside the build.gradle file, put the following:
buildscript {
repositories {
jcenter()
}
dependencies {
from fastapi import FastAPI, Request | |
import json | |
import requests | |
""" | |
{ | |
"messages": [ | |
{ | |
"content": "you are immensely smart function AI", | |
"role": "system" |
apply plugin: 'groovy' | |
apply plugin: 'idea' | |
repositories { | |
maven { url "https://dl.bintray.com/danveloper/maven" } | |
} | |
dependencies { | |
compile 'com.github.danveloper.ast:ignore-exceptions-ast:1.0.0-rc-2' | |
} |
buildscript {
repositories {
jcenter()
}
dependencies {
Ratpack "Hello World" on a t2.micro, Ubuntu 14.04, no extra server configuration.
~30,000 req/s
# ./wrk -t4 -c72 -d60s -R35000 http://localhost:5050
Running 1m test @ http://localhost:5050
4 threads and 72 connections
Thread calibration: mean lat.: 823.764ms, rate sampling interval: 3041ms
Thread calibration: mean lat.: 800.518ms, rate sampling interval: 2902ms
I hereby claim:
To claim this, I am signing this object:
package app | |
import com.fasterxml.jackson.databind.ObjectMapper | |
import com.fasterxml.jackson.databind.node.ObjectNode | |
import com.google.common.io.ByteSource | |
import com.google.common.io.Resources | |
import ratpack.config.ConfigSource | |
import ratpack.file.FileSystemBinding | |
import java.nio.file.Files |
import groovy.transform.Memoized | |
class FibBackoff { | |
int tryNum | |
void backoff() { | |
tryNum = fib(tryNum) | |
sleep(tryNum * 1000) | |
} |
/** | |
* The `Promise#map` method is used to retrieve | |
* a value asynchronously (via a `Promise`) and | |
* transform it synchronous to a new value. | |
*/ | |
class MappingSpec extends Specification { | |
@AutoCleanup | |
ExecHarness harness = ExecHarness.harness() |
Does JavaScript optimize for a function that is defined within the context of another function?
For example, are the following examples canonically represented (in performance terms) after compilation, or is one approach favored optimally over the other?
function sortMyThings() {