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
import urllib.request | |
import pyarrow.csv as csv | |
import gzip | |
CSV_FORMAT = 'text/csv' | |
response = urllib.request.urlopen('http://localhost:8000') | |
content_type = response.headers['Content-Type'] | |
if content_type != CSV_FORMAT: | |
raise ValueError(f"Expected {CSV_FORMAT}, got {content_type}") |
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
/* @flow */ | |
export class CancellationToken { | |
source: CancellationTokenSource; | |
requestId: number; | |
constructor(source: CancellationTokenSource, requestId: number) { | |
this.source = source; | |
this.requestId = requestId; | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
/** | |
* Copyright (C) 2022 Felipe Oliveira Carvalho | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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 rs.felipe.random | |
import java.util.Random | |
import scala.collection.mutable | |
import scala.collection.mutable.ArrayBuffer | |
object Sampling { | |
/** | |
* Randomly sample up to k items from a sequence. |
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
type 'a member = | |
{ mutable parent : 'a member | |
; mutable rank : int | |
; value : 'a | |
} | |
let make_set value = | |
let rec m = { parent = m; rank = 0; value } in | |
m | |
;; |
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
<?php | |
final class SBTTestEngine extends ArcanistUnitTestEngine { | |
const SBT_ROOT = 'services'; | |
public function getEngineConfigurationName() { | |
return 'sbt'; | |
} | |
protected function supportsRunAllTests() { |
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 m79.random | |
import java.util.Random | |
import scala.collection.mutable | |
import scala.collection.mutable.ArrayBuffer | |
object Sampling { | |
/** | |
* Randomly sample up to k items from a sequence. |
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
/* @flow */ | |
const KEY_KIND_STRING = 1; | |
const KEY_KIND_NUMBER = 2; | |
const KEY_KIND_BOOL = 3; | |
const KEY_KIND_RECORD = 4; | |
type KeyKind = 1 | 2 | 3 | 4; | |
class KeyValue<K, V> { | |
key: ?K; |
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 m79.infra | |
import java.net.URI | |
import java.time.format.DateTimeFormatter | |
import m79.infra.HttpAPIClient.Call | |
import org.eclipse.jetty.client.HttpClient | |
import org.eclipse.jetty.client.api.{Request, Result} | |
import org.eclipse.jetty.client.util.{BufferingResponseListener, MultiPartContentProvider, StringContentProvider} | |
import org.eclipse.jetty.http.HttpMethod |
NewerOlder