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
| import 'package:flutter/material.dart'; | |
| void main() { | |
| runApp(const MyApp()); | |
| } | |
| class MyApp extends StatelessWidget { | |
| const MyApp({Key? key}) : super(key: key); | |
| @override |
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
| import { render } from "solid-js/web"; | |
| import { createSignal, For, Show } from "solid-js"; | |
| import { createStore } from "solid-js/store"; | |
| const [state, setState] = createStore<TreeNode[]>([ | |
| { | |
| value: "foo", | |
| children: [ | |
| { value: "bar", children: [] }, | |
| { value: "baz", children: [{ value: "quux", children: [] }] }, |
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 args | |
| import ( | |
| "encoding/json" | |
| "errors" | |
| "fmt" | |
| "reflect" | |
| "testing" | |
| ) |
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 main | |
| import ( | |
| "net/http" | |
| "encoding/json" | |
| ) | |
| // Using variadic (hack) to default the response code to 200 | |
| func sendJSON(w http.ResponseWriter, v interface{}, status ...int) { | |
| st := http.StatusOK |
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
| data class Envelope( | |
| val type: String, | |
| val payload: JsonNode | |
| ) | |
| data class Thing1( | |
| val property: 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
| FROM 'alpine' | |
| WORKDIR /xgboost | |
| RUN apk add --update git cmake make gfortran python3 python3-dev py-pip openblas lapack-dev libexecinfo-dev libstdc++ libgomp build-base && \ | |
| python3.7 -m pip install numpy==1.15.4 scipy==1.2.0 pandas==0.23.4 scikit-learn==0.20.2 && \ | |
| git clone --recursive -b release_0.90 https://github.com/dmlc/xgboost.git && \ | |
| cd xgboost && \ | |
| mkdir build && \ | |
| cd build && \ |
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 main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| ) | |
| type Envelope struct { | |
| Type string | |
| Payload interface{} |
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 main | |
| import ( | |
| "testing" | |
| "time" | |
| ) | |
| func BenchmarkChanByteArray(b *testing.B) { | |
| c := make(chan []byte, 1) |
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 main | |
| import ( | |
| "github.com/go-redis/redis" | |
| "github.com/jmoiron/sqlx" | |
| _ "github.com/lib/pq" | |
| "github.com/robfig/cron" | |
| "github.com/sirupsen/logrus" | |
| "time" | |
| ) |