This guide walks you through setting up an air-gapped LLM environment using LM Studio inside a VirtualBox VM running Ubuntu, from scratch.
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
# Name of your CUDA source file (without extension) | |
TARGET=my_cuda_program | |
SRC=$(TARGET).cu | |
# Output binary name | |
OUT=$(TARGET).out | |
# Supported GPU architectures | |
ARCHS=70 75 80 86 89 90 |
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 ts from 'typescript' | |
import { readFile, stat, unlink, writeFile } from 'fs/promises' | |
import * as path from 'path' | |
import { faker } from '@faker-js/faker' | |
interface Column { | |
columnType: string | |
default?: any | |
fakeMethod?: string // Optional custom faker method | |
} |
##Question 1
So, you're on the right track, which is great! And I can see what's tripping you up here.
It's what's happening when you click the button and the .onclick
function is run. So let's run through this a bit.
When you're going through for loop, each time around, you create a function that will run when the button is clicked.
And there's the trick, that function won't be executed UNTIL the button is clicked. So I want you to look at the code
inside that function and tell me what all of the values would be when that function is executed after you click it.
[PAUSE....] ... maybe get the right or the wrong answer
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
# | |
# I didn't take the time to implement floyd's algorithm, I just used a dirty "has this been visited before" scheme. | |
# | |
# It felt like cheating anyway since Floyd's (allegedly Floyd's?) algorithm is on the | |
# page in Python and this isn't really just a "can you convert python to ruby" challenge | |
# | |
# But I also hadn't read about that algorithm before, so thanks for the interesting read!! | |
# |
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 'rubygems' | |
require 'mechanize' | |
require 'byebug' | |
a = Mechanize.new { |agent| | |
agent.user_agent_alias = 'Mac Safari' | |
key = 'JSESSIONID' | |
value = '3a70858e14aca4f6aac9ec59d95d13d86e0b4e755b40b67bb56f96f27fbf05b2.e3qSc3iTc34Oe3iNaO0' | |
cookie = Mechanize::Cookie.new(key, value) |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "trusty64" | |
config.vm.network "private_network", ip: "192.168.50.4" |
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
# Original unrefactored code: | |
class CreditCard | |
#initialize | |
def initialize(card_number) | |
raise ArgumentError.new("Card nunber must be 16 digits long") if card_number.to_s.length != 16 | |
@card_number = cardNumber | |
end | |
#convert a string card number to Luhn Algorithm | |
def luhnConvert(card_number) |
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
class BoggleBoard | |
def initialize (board) | |
@board = board | |
end | |
def create_word(*coords) | |
coords.map { |coord| @board[coord.first][coord.last]}.join("") | |
end | |
def get_row(row) |