please this file in mix/tasks/
then
mix calc_deps_upgraded
After installed ollama in ubuntu, the usual use will be fine, but when want to access it from another machine (like from your laptop to home lab server), will see
yli@yli-hx90g:~$ curl http://192.168.0.163:11434/api/generate -d '{"model": "deepseek-r1:7b", "keep_alive": -1}'
curl: (7) Failed to connect to 192.168.0.163 port 11434 after 3 ms: Connection refused
a known issue of ollama under ubuntu with nvidia cards, sometimes it will lose the access to gpu so turn to cpu.
use following script to restart ollama & nvidia driver so it will work again.
credits to: https://www.reddit.com/r/ollama/comments/1cxx49q/comment/lq6zq31/
This is a complete example on how to stream uploading with undici library.
Somehow following popular results from search are not complete, or lack of description of key secret.
This is my try. It is working with current node v22.13.0. And the key secret is actually the FormData provided by undici is broken in supporting streams.
usage:
git-remote-list-prune
git-remote-prune
git-remove-list-untracked
git-remove-untracked
import datetime | |
import pathlib | |
import sys | |
import threading | |
import re | |
import subprocess | |
from pathlib import Path | |
from zipfile import ZipFile, ZIP_DEFLATED | |
from bottle import request, route, run, static_file |
# Usage: | |
# just copy this function into your google colab notebook, then use it | |
# a working example can be seen in this demo notebook: | |
# https://colab.research.google.com/drive/19Ni0EfOExQmTcrFZh3Z6DxsOM25KULqN?usp=sharing | |
import matplotlib.pyplot as plt | |
from matplotlib import animation, rc | |
def make_animate_train(train_step_fn, animate_setup_fn): | |
""" |
// Colors reference | |
// You can use the following as so: | |
// console.log(colorCode, data); | |
// console.log(`${colorCode}some colorful text string${resetCode} rest of string in normal color`); | |
// | |
// ... and so on. | |
export const reset = "\x1b[0m" | |
export const bright = "\x1b[1m" | |
export const dim = "\x1b[2m" |
export ZSH="$HOME/.oh-my-zsh" | |
ZSH_THEME="powerlevel9k/powerlevel9k" | |
. ~/.zshtheme | |
ENABLE_CORRECTION="true" | |
COMPLETION_WAITING_DOTS="true" | |
plugins=( |
'use strict'; | |
class Abstract { | |
// A static abstract method. | |
static foo() { | |
if (this === Abstract) { | |
// Error Type 2. Abstract methods can not be called directly. | |
throw new TypeError("Can not call static abstract method foo."); | |
} else if (this.foo === Abstract.foo) { | |
// Error Type 3. The child has not implemented this method. | |
throw new TypeError("Please implement static abstract method foo."); |