View dispatch_openai_requests.py
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 openai | |
import asyncio | |
from typing import Any | |
async def dispatch_openai_requests( | |
messages_list: list[list[dict[str,Any]]], | |
model: str, | |
temperature: float, | |
max_tokens: int, | |
top_p: float, |
View readme.md
Klipper mesh on print area only install guide
What this macro do
- This macro will dymanic change the bed_mesh area based on the size of the printed part. The fw will only probe on the area that the part will be printed (plus mesh_area_offset value)
Setup guide
- (1) Add the following macrro to your printer config, this will replace the default
BED_MESH_CALIBRATE
command.
View freebase_ner.py
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
# coding=UTF-8 | |
from __future__ import division | |
import nltk | |
import re | |
import requests | |
# Add your freebase key here | |
# If you don't have one, register at https://code.google.com/apis/console | |
FREEBASE_KEY = "" |
View brnn.py
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
""" | |
An implementation of the `Local reparameterization trick` | |
from Kingma & Wellings and | |
Bayesian RNN | |
from Fortunato, Blundell & Vinyals | |
""" | |
import os | |
import time | |
import copy | |
from os.path import join as pjoin |
View README.rst
Elasticsearch CLI
Experimental CLI interface for the helpers in the `python library`_.
Main purpose is to expose the bulk functionality to enable rapid loading of data into an elasticsearch cluster. Combined with the scan command it can also be used to reindex data from elasticsearch into a different index or cluster.
View schools.stan
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
data { | |
int<lower=0> J; // number of schools | |
real y[J]; // estimated treatment effects | |
real<lower=0> sigma[J]; // s.e. of effect estimates | |
} | |
parameters { | |
real mu; | |
real<lower=0> tau; | |
real eta[J]; | |
} |
View python-pil-image-sprite.py
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/python | |
# This work is licensed under the Creative Commons Attribution 3.0 United | |
# States License. To view a copy of this license, visit | |
# http://creativecommons.org/licenses/by/3.0/us/ or send a letter to Creative | |
# Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. | |
# from http://oranlooney.com/make-css-sprites-python-image-library/ | |
# Orignial Author Oran Looney <olooney@gmail.com> |
View install-ros-kinetic_osx.sh
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
#!/bin/bash | |
ROS_DISTRO=${ROS_DISTRO:-kinetic} | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew update | |
brew install cmake |
View SparkSQLJira.scala
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 com.databricks.spark.jira | |
import scala.io.Source | |
import org.apache.spark.rdd.RDD | |
import org.apache.spark.sql._ | |
import org.apache.spark.sql.functions._ | |
import org.apache.spark.sql.sources.{TableScan, BaseRelation, RelationProvider} |
NewerOlder