This guide walks you through routing Claude Code to NVIDIA NIM using a local proxy server.
Before starting, ensure you have uv installed on your system to manage Python tools.
| #' num_bkts should be a non-zero integer | |
| #' col should contain numeric values | |
| equi_bucket <- function(col, num_bkts){ | |
| if(!is.numeric(col)){ | |
| warning("Values passed to Equibucket are not numeric") | |
| return(NA) | |
| } | |
| xmin = min(col, na.rm = TRUE) | |
| eps = 1/(num_bkts-1) |
| plot_pax_wrap <- function(df, num_pax){ | |
| pax_rows <- round(sqrt(num_pax), -1) | |
| pax_cols <- as.integer(num_pax/pax_rows) | |
| df2 <- arrange(df, -Rev) | |
| curr_pax <- 1 | |
| for (py in 1:pax_cols){ | |
| for (px in 1:pax_rows){ | |
| if (curr_pax <= num_pax){ | |
| df2[curr_pax, 'plot_col'] = px |
| import json | |
| from wordcloud import WordCloud | |
| import matplotlib.pyplot as plt | |
| with open('data/trump_tweets/condensed_2018.json') as f: | |
| data = json.load(f) | |
| type(data), len(data) |
| w, h = 800, 800 | |
| def setup(): | |
| size(w, h) | |
| stroke(0, 0, 250) # blue | |
| num_steps = 200 | |
| step = TWO_PI / num_steps |
| w, h = 1000, 800 | |
| class Ball(object): | |
| def __init__(self,_id, _x, _y, _vx=0, _vy=0, _dir='UP'): | |
| self.x, self.y = _x, _y | |
| self.vx, self.vy = _vx, _vy | |
| self.id = _id | |
| self.dir = _dir #'UP', 'DOWN', "RIGHT", "LEFT" | |
| self.av = 0 |
| # The noise value was calculated at each pixel, | |
| # using Processing’s built-in noise function. | |
| # This value was scaled up (by a factor of 10 to 100) and rounded, | |
| # yielding an integer for every pixel in the frame. | |
| # Colors were designated based on this number using a switch. | |
| # Finally, a point/dot was drawn at each pixel, in the assigned color. | |
| # The greater the scaling factor, the thinner and more numerous the noise bands. | |
| # Creates a 2D List of 0's, nCols x nRows large |
| class Ball(object): | |
| def __init__(self,_id, _x, _y, _vx=0, _vy=0): | |
| self.x, self.y = _x, _y | |
| self.vx, self.vy = _vx, _vy | |
| self.id = _id | |
| #store the starting coords of each ball. For relaunching. | |
| self.startx, self.starty = _x, _y | |
| self.active = False | |
| radius = 100 | |
| def setup(): | |
| size(800, 600) | |
| background(255) | |
| smooth() | |
| noStroke() | |
| fill(0, 0, 200) | |
| frameRate(100) | |
| import pandas as pd | |
| def print_songs_found(songs_column, clue_words): | |
| for song in songs_column: | |
| try: | |
| songwords = [x.lower() for x in song.split()] | |
| #print(songwords) | |
| if all(word in clue_words for word in songwords): | |
| print(songwords) | |
| except: |