Skip to content

Instantly share code, notes, and snippets.

View isterin's full-sized avatar

Ilya Sterin isterin

View GitHub Profile
{
"query": "create edit checks in rave",
"total_results": 10,
"documents": [
{
"document_number": 1,
"source": "s3://platform-assistant-distro/zoomin-extract/rave-architect/creating_check_steps_in_rave_architect.html",
"relevance_score": 0.7323289,
"content": "To modify, click **Edit ** next to the check step you want to edit.\n## Add Check Function Check Steps\n1. Navigate to **Rave Architect** > ...."
},
@isterin
isterin / processing.r
Created April 3, 2025 02:15
Example R Integration
library(arrow)
library(dplyr)
library(dataconnect)
dc <- dataconnect::init(api_key)
datasets <- dc$list(study = "12345")
for (ds in datasets) {
print(cat("Dataset: ", ds$name))
}
### Keybase proof
I hereby claim:
* I am isterin on github.
* I am isterin (https://keybase.io/isterin) on keybase.
* I have a public key ASBeeNpLPjr5HN39W8poOT69YgYgraigHy1SRqG32UZ_6go
To claim this, I am signing this object:
class ProxiedHttpRequest(val req:HttpRequest) {
lazy val proxyServer = InetAddress.getByName(“some.proxy.com”)
}
object ProxiedHttpRequest {
implicit def delegateToOriginalHttpRequest(
r: ProxiedHttpRequest):HttpRequest = r.req
}
object Application {
def proxyRequest(req:ProxiedHttpRequest) {
val where = req.proxyServer
object Application {
def proxyRequest(req:ProxiedHttpRequest) {
val where = req.proxyServer
/*
Here I need access to original request being wrapped to get the headers This is ugly and I’d prefer to access it as I would a regular HttpRequest req.headers()
*/
val headers = req.req.headers()
}
}
class ProxiedHttpRequest(val req:HttpRequest) {
lazy val proxyServer = InetAddress.getByName(“some.proxy.com”)
}
@isterin
isterin / Application.scala
Created July 9, 2017 03:21
Scala automatic wrapper/delegation with implicits
class ProxiedHttpRequest(val req:HttpRequest) {
lazy val proxyServer = InetAddress.getByName(“some.proxy.com”)
}
object ProxiedHttpRequest {
implicit def delegateToOriginalHttpRequest(
r: ProxiedHttpRequest):HttpRequest = r.req
}
object Application {
def proxyRequest(req:ProxiedHttpRequest) {
val where = req.proxyServer
<%= form_for @changeset, @action, fn f -> %>
<%= for {[id, name], ae} <- Enum.group_by(f.data.appentries, &([&1.sqmentry.sqmgroup.id, &1.sqmentry.sqmgroup.name])) do %>
<div>Group: <%= name %></div>
# Here I have to iterate the hierarchy
<%= inputs_for f, :appentries, fn e -> %>
<%= inputs_for e, :sqmentry, fn s -> %>
<%= inputs_for s, :sqmgroup, fn g -> %>
<div>
# input field goes here for (e, :status)
</div>
const playlist = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
let N = process.argv[2] || 10;
function shuffle(a) {
const newA = a.slice(); // Copy array
for (let i = newA.length; i; i--) {
let j = Math.floor(Math.random() * i);
[newA[i - 1], newA[j]] = [newA[j], newA[i - 1]];
}
@isterin
isterin / one.scala
Last active July 6, 2016 04:09
Scala automatic wrapper/delegation with implicits
class ProxiedHttpRequest(val req:HttpRequest) {
lazy val proxyServer = InetAddress.getByName(“some.proxy.com”)
}