2,512 karma · joined Apr 30, 2011 (15y ago) · 551 submissions
My alias is jflam (at the company I work for).
comment 3y ago · link · parent
- We can guarantee a consistent experience for all users. Imagine having to maintain your own local distribution of Python and guaranteeing that it works with Excel as versions diverge over time? Yikes.
- We make it possible to share your Excel workbook with other users and have the calculation just work. That wouldn't work with random local installs of Python and users would be super frustrated by this.
- Security. Imagine opening an Excel workbook that can execute Python code running locally as you.
Also, I totally agree with your second point. Trying to write an internal app in Python that integrates with all of your existing IT infrastructure is an exercise in frustration at best. Excel is already part of the IT infrastructure virtually everywhere and is a programmable reactive canvas.
Disclosure: I work on the design team for the feature.
62.
Python in Excel: Combining the Power of Python and the Flexibility of Excel(techcommunity.microsoft.com ↗)
65 points · by localhost · 3y ago · 12 comments
comment 3y ago · link · parent
comment 3y ago · link · parent
> Yes, with the name "Shar's algorithm," I can confirm that this branchless binary search algorithm is indeed known as Shar's algorithm. It's a variation of the Binary Search algorithm that focuses on minimizing branching to improve performance on modern CPUs. The algorithm is named after its creator, Andrei Alexandrescu, who goes by the pseudonym "Shar" on the internet.
69.
Porsche Synthetic Fuel in Chile(youtube.com ↗)
1 points · by localhost · 3y ago · discuss
comment 3y ago · link · parent
class KimmieInterpreter:
def __init__(self):
self.variables = {}
def interpret(self, code):
for line in code.split("\n"):
tokens = line.split()
if len(tokens) == 0:
continue
if tokens[0] == "#":
self.variables[tokens[1]] = None
elif tokens[0] == "#my_var":
self.variables[tokens[1]] = int(tokens[3])
elif tokens[0] == "OMG":
print(tokens[1][1:-1])
elif tokens[0] == "add":
var1 = self.variables[tokens[2]]
var2 = self.variables[tokens[3]]
result = var1 + var2
self.variables[tokens[1]] = resultcomment 3y ago · link · parent
Hey dolls, let me introduce you to the Kimmie programming language, it's like totally fab and easy to use!
To declare a variable, just use the hashtag symbol and the variable name, like this:
#my_var
To assign a value to the variable, use the word "like" followed by the value, like this:
#my_var like 10
To print out a message, use the word "OMG" followed by the message in double quotes, like this:
OMG "Hello, dolls!"
To add two variables together, use the word "add" followed by the two variables, like this:
#var1 like 5 #var2 like 7 #sum like add #var1 #var2
comment 3y ago · link · parent
The problem with this implementation is that it just blindly executes whatever ChatGPT says - that's quite scary.
comment 3y ago · link · parent
The thing that might hold it back is the latency in the experience. You could mask it with the AI equivalent of "ummm ..." to get to maybe 5-10s.
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
comment 3y ago · link · parent
"The Python code in this tutorial generates one token every 3 minutes on a computer with an i5 11gen processor, 16GB of RAM, and a Samsung 980 PRO NVME..."
[1] https://towardsdatascience.com/run-bloom-the-largest-open-ac...
comment 3y ago · link · parent
The dot product between the query and key representations is similar to computing the cosine similarity between two vectors. The cosine similarity is a measure of the similarity between two vectors in a multi-dimensional space, and is defined as the dot product of the vectors normalized by their magnitudes.
The dot product of the query and key representations can be seen as an un-normalized version of the cosine similarity, in the sense that it computes the dot product of the two vectors. The result is a scalar value, which represents the similarity between the two vectors, the larger the scalar, the more similar the vectors are.comment 3y ago · link · parent
[2] https://twitter.com/sjwhitmore/status/1617318051455840258
comment 3y ago · link · parent
Wide availability of these tools will create a new "AI Native" generation. What this will do I don't know. Some effects will be good, some bad.
Narrowing to just me, I find the real value I get while learning is asking questions along the lines of "is this concept like this other concept that I know?" When I get an affirmative, then ChatGPT often goes on to tell me something else that I didn't know. These kinds of interactions are very valuable to me. Example from last night in the middle of a long chat:
"How is the query representation computed? Also, is the dot product between the query and key representations similar to computing the cosine similarity between two vectors?"
"The query representation is typically computed by applying a linear transformation to the hidden states of the input words, often represented as vectors. This linear transformation is typically implemented as a fully connected layer, or a matrix multiplication, followed by a non-linear activation function, such as a ReLU. The resulting query representation vector has the same dimension as the hidden state, and it's used to measure the similarity between the word and the other words in the input sequence.
The dot product between the query and key representations is similar to computing the cosine similarity between two vectors. The cosine similarity is a measure of the similarity between two vectors in a multi-dimensional space, and is defined as the dot product of the vectors normalized by their magnitudes.
The dot product of the query and key representations can be seen as an un-normalized version of the cosine similarity, in the sense that it computes the dot product of the two vectors. The result is a scalar value, which represents the similarity between the two vectors, the larger the scalar, the more similar the vectors are.
The dot product, however, is just one way of computing the similarity, other similarity measure, like the euclidean distance, the L1 norm, or even other more sophisticated similarity measures can also be used. The choice of similarity measure depends on the task and the model architecture, also the dot product has the advantage of being computationally efficient, which is important when dealing with large scale models like transformer based models."