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 ray | |
import s3fs | |
import yaml | |
from ray import serve | |
from haystack.pipelines.base import Pipeline | |
RAY_ADDRESS=<HEAD_NODE_ADDRESS> | |
RAY_PORT='10001' | |
RAY_SERVE_PORT='8000' |
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
# Let pyenv decide which version of python to use | |
# Taken from StackOverflow https://stackoverflow.com/a/70307478/788833 | |
export PYENV_ROOT="$HOME/.pyenv" | |
export PATH="$PYENV_ROOT/bin:$PATH" | |
eval "$(pyenv init --path)" | |
eval "$(pyenv init -)" | |
eval "$(pyenv virtualenv-init -)" | |
# Activate Rust |
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 torch | |
print(torch.cuda.is_available()) |
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 main | |
import ( | |
"crypto/rand" | |
"encoding/base32" | |
"net/http" | |
"strconv" | |
"github.com/gin-gonic/gin" | |
) |
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
version: '3.6' | |
services: | |
# app: | |
# build: | |
# context: ./app | |
# depends_on: | |
# - redis | |
# environment: | |
# - REDIS_HOST=redis | |
# ports: |
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 main | |
import "github.com/gin-gonic/gin" | |
import "fmt" | |
import "github.com/go-redis/redis" | |
func ExampleNewClient() { | |
client := redis.NewClient(&redis.Options{ | |
Addr: "localhost:6379", | |
Password: "", // no password set |
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
// Flurl will use 1 HttpClient instance per host | |
var person = await "https://api.com" | |
.AppendPathSegment("person") | |
.SetQueryParams(new { a = 1, b = 2 }) | |
.WithOAuthBearerToken("my_oauth_token") | |
.PostJsonAsync(new | |
{ | |
first_name = "Claire", | |
last_name = "Underwood" | |
}) |
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
#!/usr/bin/env python | |
# coding: utf8 | |
# Script to create superset users | |
import pandas as pd | |
from sqlalchemy import create_engine | |
import datetime | |
import pexpect | |
import os |
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
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', { preload: preload, create: create, update: update, render: render}); | |
function preload() { | |
game.load.spritesheet('ship', 'assets/sprites/humstar.png', 32, 32); | |
game.load.image('pixel', 'http://1x1px.me/FF4D00-0.8.png'); | |
} | |
var ship; |