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 | |
# Check if at least one argument is provided | |
if [ "$#" -lt 1 ]; then | |
echo "Usage: $0 <image> [--report-file <file>] [--verbose]" | |
exit 1 | |
fi | |
# Parse arguments | |
IMAGE="" |
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
from collections import namedtuple | |
import contextlib | |
import json | |
import llama_cpp | |
import logging | |
import math | |
import multiprocessing as mp | |
import numpy as np | |
import optuna | |
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
vram llama3.1:8b-instruct-q8_0 --verbose | |
VERBOSE: Default fits value from sysctl: 40.0 GB | |
VERBOSE: Quant value for llama3.1:8b-instruct-q8_0: Q8_0 | |
VERBOSE: VRAM nth for llama3.1:8b-instruct-q8_0: 131072 | |
VERBOSE: Running gollama -vram for llama3.1:8b-instruct-q8_0 with fits=40.0 GB | |
VERBOSE: VRAM output header, labels, and rows gathered | |
VERBOSE: Quant row: | Q8_0 | 8.50 | 9.1 | 10.9 | 13.4(12.4,11.9) | 18.4(16.4,15.4) | 28.3(24.3,22.3) | 48.2(40.2,36.2) | | |
VERBOSE: Max A: 28.3 at 64K | |
VERBOSE: Max B: 24.3 at 64K | |
VERBOSE: Max C: 36.2 at 128K |
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
a = 1 | |
function f(x) { | |
return x + a | |
} | |
@pure function g(x) { | |
return x + a | |
} | |
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
//2. Remove duplicate characters from a string (ABCdeABCfg -> ABCdefg) | |
/* build a string by ensuring that it does not already have letters in before adding */ | |
function dedup (dupped) { | |
deduped = '' // start with an empty string | |
dupped | |
.split('') // get an array of letters from the input | |
.forEach(l => { // for every letter in the array | |
if(deduped.indexOf(l) === -1) // if the string we are building does not contain it | |
deduped += l // add it (only once) |
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
/* I was not happy with my original version ... but I couldn't quiet grasp what was meant by combination. I now think of it as an "ordered combination". You must keep an index to get the set prescribed. This took me a while to realize and then more time to code and debug. */ | |
const flatten = list => list.reduce( | |
(a, b) => a.concat(Array.isArray(b) ? flatten(b) : b), [] | |
) | |
class IndexedSubstring { | |
constructor ({string, index}) { | |
this.string = string | |
this.index = index | |
} |
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
function splitAllWays(result, left, right){ | |
result.push(left.concat(right)); | |
if (right.length > 1){ | |
for(var i = 1; i < right.length; i++){ | |
splitAllWays(result, left.concat(right.substring(0, i)), right.substring(i)); | |
} | |
} | |
return result; | |
}; |
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
{ | |
"-KbvAXsd8EC4Ig12gsRR": { | |
"department": "CMST", | |
"description": "A study of web design, tools, and technology principles. The goal is to plan and produce a professional website. Topics include Internet protocols; usability; accessibility; and social, ethical, and legal issues related to website production. Focus is on Extensible HyperText Markup Language (XHTML) and cascading style sheets (CSS).", | |
"equivalencies": [ | |
{ | |
"department": "CAPP", | |
"number": "385" | |
} | |
], |
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
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const CopyWebpackPlugin = require('copy-webpack-plugin'); | |
const BUILD_DIR = 'build' | |
module.exports = { | |
entry: './scripts/webpack_loader.js', | |
output: { | |
path: BUILD_DIR + '/scripts', | |
filename: "bundle.js" |
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
const gulp = require('gulp') | |
const plumber = require('gulp-plumber') | |
const rename = require('gulp-rename') | |
const autoprefixer = require('gulp-autoprefixer') | |
const babel = require('gulp-babel') | |
const concat = require('gulp-concat') | |
const sass = require('gulp-sass') | |
const browserSync = require('browser-sync') | |
const clean = require('gulp-clean') | |
const sourcemaps = require('gulp-sourcemaps'); |
NewerOlder