# Install TOR and some other needed dependencies:
sudo apt-get install -y tor curl netcat
# Stop service (if running):
/etc/init.d/tor stop
# Create torrc file
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
#!/bin/bash | |
# Check if JAVA_HOME is set. If so then use it. | |
if [ -n "$JAVA_HOME" ]; then | |
JAVA_CMD="$JAVA_HOME/bin/java" | |
else | |
JAVA_CMD="java" | |
fi | |
# Check for java command existence |
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
:: ======================================== | |
:: BUILD LLAMA.CPP WITH OPENBLAS ON WINDOWS | |
:: ======================================== | |
set BASE_DIR=c:\bin | |
mkdir %BASE_DIR% | |
mkdir c:\tmp | |
cd c:\tmp |
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
:: Install JDK & add to path - https://www.oracle.com/java/technologies/downloads/ | |
:: Install Maven & add to path - https://maven.apache.org/download.cgi | |
:: Install Cmake & add to path - https://cmake.org/download/ | |
:: Install w64devkit & add to path - https://github.com/skeeto/w64devkit/releases | |
:: Install Windows SDK - https://developer.microsoft.com/en-us/windows/downloads/sdk-archive/ | |
set W64DEVKIT=c:\bin\w64devkit | |
set JAVA_HOME=c:\java\jdk-11.0.16.1 | |
set PATH=%JAVA_HOME%\bin;%W64DEVKIT%\bin;%PATH% |
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
BUILD (See https://github.com/jmorganca/ollama/blob/main/docs/development.md) | |
============================================================================= | |
:: Downloaded golang 1.21 from https://go.dev/dl/go1.21.6.windows-amd64.zip and add to PATH | |
:: Downloaded mingw64 and installed in \bin\mingw64 | |
c:\bin\mingw64\env.bat | |
cd %USERPROFILE% | |
git pull https://github.com/jmorganca/ollama | |
cd ollama |
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 org.json.JSONArray; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import java.io.BufferedInputStream; | |
import java.io.BufferedReader; | |
import java.io.DataOutputStream; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.InputStream; |
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
// It requires jsoup.jar (from https://jsoup.org/download) in the classpath | |
// It needs to parameters on command line: | |
// 1. The github url to be downloaded | |
// 2. The local directory where the downloaded files should be stored | |
import org.jsoup.Connection; | |
import org.jsoup.Jsoup; | |
import org.jsoup.helper.Validate; | |
import org.jsoup.nodes.Document; | |
import org.jsoup.nodes.Element; |
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 java.io.*; | |
import java.net.*; | |
import java.nio.charset.StandardCharsets; | |
import java.nio.file.*; | |
import java.text.*; | |
import java.time.*; | |
import java.time.format.DateTimeFormatter; | |
import java.util.Date; | |
import java.util.concurrent.*; |
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
# Install OS tools needed for the build | |
sudo apt-get -y update | |
sudo apt-get install -y build-essential cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev ant default-jdk | |
# Detect the default java home and set the env var for it | |
export JAVA_HOME=$(java -XshowSettings:properties -version 2>&1 > /dev/null | awk -F' ' '/java.home/ {print $3}') | |
export ANT_HOME=/usr/bin/ant | |
git clone https://github.com/opencv/opencv | |
cd opencv/ |
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 java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.io.Reader; | |
import java.net.URL; | |
import java.security.KeyManagementException; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.cert.X509Certificate; | |
import javax.net.ssl.HostnameVerifier; |
NewerOlder