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
package com.dangets; | |
import com.squareup.moshi.Json; | |
import com.squareup.moshi.Moshi; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.List; | |
import retrofit2.Call; | |
import retrofit2.Response; | |
import retrofit2.Retrofit; |
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
[ | |
{ "namespace": "com.dangets.customer", | |
"type": "record", | |
"name": "Address", | |
"fields": [ | |
{"name": "receiver", "type": "string"}, | |
{"name": "streetAddress", "type": "string"}, | |
{"name": "addressLocality", "type": "string"}, | |
{"name": "addressRegion", "type": "string"}, | |
{"name": "postalCode", "type": "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
package com.dangets; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.concurrent.TimeUnit; | |
import net.jodah.failsafe.CircuitBreaker; | |
public class FailRateLimiter { | |
public static void main(String[] args) throws InterruptedException, IOException { |
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
package com.dangets | |
import java.io.IOException | |
import java.io.Reader | |
import kotlin.math.max | |
import kotlin.math.min | |
/** | |
* Create a Reader that will drop the last 'numLines' of input. |
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
package com.dangets | |
import com.squareup.moshi.FromJson | |
import com.squareup.moshi.JsonClass | |
import com.squareup.moshi.Moshi | |
import com.squareup.moshi.ToJson | |
import java.time.LocalDate | |
import java.util.* | |
data class Partition(val type: Type, val id: Int) { |
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
// OR types | |
#[derive(Debug, Copy, Clone, PartialEq)] | |
enum AppleVariety { | |
GoldenDelicious, | |
GrannySmith, | |
Fuji | |
} | |
#[derive(Debug, Copy, Clone, PartialEq)] | |
enum BananaVariety { |
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="http://mbostock.github.com/d3/d3.v2.js"></script> | |
</head> | |
<body> | |
<svg id="viz"> | |
</svg> | |
<script type="text/javascript"> | |
var w = 500; |
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
#include <math.h> | |
#include <GL/glew.h> | |
#include <GL/freeglut.h> | |
#include <cuda_gl_interop.h> | |
#include <thrust/device_vector.h> | |
#include <thrust/transform.h> | |
#include <thrust/iterator/counting_iterator.h> |
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
#include <iostream> | |
#include <cstdlib> | |
#include <thrust/iterator/zip_iterator.h> | |
using std::size_t; | |
template<typename Vector> | |
struct Particles { |