Install Multiple Python Versions for Specific Project
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
| http { | |
| log_format bodylog '$remote_addr - $remote_user [$time_local] ' | |
| '"$request" $status $body_bytes_sent ' | |
| '"$http_referer" "$http_user_agent" $request_time ' | |
| '<"$request_body" >"$resp_body"'; | |
| lua_need_request_body on; | |
| set $resp_body ""; | |
| body_filter_by_lua ' |
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
| input { | |
| generator { | |
| lines => [ | |
| "line 1", | |
| "line a" | |
| ] | |
| count => 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
| require "java" | |
| require "rubygems" | |
| require "sequel" | |
| require "sqljdbc4.jar" #this files path may need to be relevate to file location | |
| DB = Sequel.connect( | |
| :adapter => "jdbc", | |
| :url => "jdbc:sqlserver://doric-server5;database=ADCData_Doric;integratedSecurity=true" | |
| # This is using integrated security, might want to pass username and password | |
| # More Info at http://sequel.rubyforge.org/rdoc/files/doc/opening_databases_rdoc.html |
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
| # run this command in the root web directory | |
| find . -type d -exec touch {}/index.html \; |
When running FastAPI app, all the logs in console are from Uvicorn and they do not have timestamp and other useful information. As Uvicorn applies python logging module, we can override Uvicorn logging formatter by applying a new logging configuration.
Meanwhile, it's able to unify the your endpoints logging with the Uvicorn logging by configuring all of them in the config file log_conf.yaml.
Before overriding:
uvicorn main:app --reload
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
| # one or the other, NOT both | |
| [url "https://github"] | |
| insteadOf = git://github | |
| # or | |
| [url "[email protected]:"] | |
| insteadOf = git://github |
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
| sudo apt install -y curl build-essential libgmp-dev libmpfr-dev libmpc-dev | |
| mkdir /tmp/$$ && cd /tmp/$$ | |
| curl -s https://ftp.gnu.org/gnu/gcc/gcc-10.3.0/gcc-10.3.0.tar.xz | tar xJ | |
| mkdir build && cd build | |
| ../gcc-10.3.0/configure --prefix=$HOME/gcc10 \ | |
| --disable-dependency-tracking \ | |
| --disable-nls \ | |
| --disable-multilib \ | |
| --enable-default-pie \ | |
| --enable-languages=c,c++ |
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
| # llama.cpp server, CLI, and DLL build (CPU inference only) | |
| # | |
| # llama.cpp is an amazing project, but its build system is poor and | |
| # growing worse. It's never properly built llama.dll under any compiler, | |
| # and DLL builds have been unsupported by w64dk for some time. This | |
| # makefile is a replacement build system that produces llama.dll, | |
| # llama-server.exe, and llama-cli.exe using w64dk. No source file changes | |
| # are needed. | |
| # | |
| # The DLL exports the public API and no more, and is readily usable as a |
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 qwen3:30b-a3b-q8_0 | |
| TEMPLATE """{{- if .Messages }} | |
| {{- if or .System .Tools }}<|im_start|>system | |
| {{- if .System }} | |
| {{ .System }} | |
| {{- end }} | |
| {{- if .Tools }} | |
| # Tools |