Better HN
topnewbestaskshowjobs
Log inSign up

localhost

2,512 karma · joined Apr 30, 2011 (15y ago) · 551 submissions

I work on making Python more awesome across the company, now including Excel!

My alias is jflam (at the company I work for).

Submissions

comment 3y ago · link · parent

There are few key reasons for running in a hypervisor isolated container on Azure with no access to the Internet:

- 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

A satellite in orbit uses the energy imparted by the gravitational force of the Earth to stay in orbit (and very little to no drag depending on the altitude).

comment 3y ago · link · parent

Many of the research grants are funded from public tax dollars

comment 3y ago · link · parent

Porsche for one - don't know of others.

comment 3y ago · link · parent

It's under experimental features or something like that. I just enabled Bard access for myself yesterday.

comment 3y ago · link · parent

I'd love to have something that could create daily summaries of private Twitter lists that I use to track developments in AI. The audio part would be great to consume during my re-emerging commute to the office. I would imagine this would be a pretty cool thing to have for any information worker as well. The difference is that this would be for an audience of 1.

comment 3y ago · link · parent

I asked GPT-4 to explain it to me, and asked if it could identify the algorithm. It didn't do a good job here (returned name of function). But when I told it that it was also called "Shar's algorithm", it immediately identified the author as Andrei Alexandrescu who apparently goes by the pseudonym Shar as well.

> 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

While not a fix for this problem, a nice form of insurance is a Lithium Ion jump start battery[1]. I'm amazed that a hand-held battery can discharge fast enough to jump start my car, but ... it works great.

[1] https://www.amazon.com/dp/B0B55RFM1Z

comment 3y ago · link · parent

While I don't remember to use it (too much AI in too many tools!) Warp has this feature as well "Warp AI". This is what it told me for the demo scenario:

  ffmpeg -i input.mp4 -i watermark.png -filter_complex "overlay=10:10" output.mp4
Bunch of descriptive words too.

comment 3y ago · link · parent

I did an experiment where I got ChatGPT to rewrite headlines in neutral tone based on the content of the article. Works great. What you want is a great idea!

comment 3y ago · link · parent

I copied the response verbatim. I also did a follow-up where it wrote the interpreter as well:

    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]] = result

comment 3y ago · link · parent

Since I have the world's greatest creative assistant handy, here's what GPT-4 thinks a Kim Kardashian language would look like:

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

This is how few-shot prompting works and it dramatically improves the quality of the results.

comment 3y ago · link · parent

This is a good idea that you could likely build out using just embeddings and performing semantic search over them. ChatGPT could be relegated to a role of translating intent into semantic searches and refining the output. You could even imagine fine-tuning an existing LLM to do this as well given a large enough corpus of examples.

The problem with this implementation is that it just blindly executes whatever ChatGPT says - that's quite scary.

comment 3y ago · link · parent

I think it would be quite a bit more interesting if you could converse with the model. The back and forth "is this paper about foo related to this other paper about bar?" would probably be a better way of getting at the interconnections. This should be doable now.

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

There's a guy on YouTube (wfh - Work From Hype) who has a channel devoted to these kinds of things: https://www.youtube.com/channel/UCcCYTCDxsMl84_btikjY40Q

comment 3y ago · link · parent

This is a much better link than the GH repo - it contains examples and the docs. https://motioncanvas.io/

comment 3y ago · link · parent

If you change the goal from "I wrote a book" to "I published a book and made money off of it", it's really no different than fronting the money to pay for people to write and illustrate the book, right? I tend to think about AIs these days as being tools for converting intent into action. Kind of like people.

comment 3y ago · link · parent

I'm a big fan of Lilex and use it currently: https://github.com/mishamyrt/Lilex. I think it looks quite a bit like Inconsolata which I used to use a long time ago.

comment 3y ago · link · parent

Relevant to this discussion is the Toolformer paper that was just released today from Meta AI. To me the exciting result from the paper is that it appears that much smaller models can be used to translate human intent into actions: https://arxiv.org/abs/2302.04761

comment 3y ago · link · parent

The key to getting good results with Large Language Models is to combine them with another tool. For example, a human with a search engine produces more accurate results than a human alone. In this spirit, I chained together GPT 3.5 and a search engine and asked GPT 3.5 to return a list of search terms for an answer from ChatGPT and fed them to Google to get a list of citations. I call this "Citations Needed":

https://twitter.com/john_lam/status/1614778632794443776

comment 3y ago · link · parent

I suspect that there is going to be a push to the extremes in dev work. You will either need to be effective as a generalist who uses AI powered tools to rapidly build systems out of current libraries, or you need to be a specialist who maintains and builds those libraries (or those AI tools). Not all libraries are equal of course - I think foundational libraries, e.g., sqlite will draw the specialists. But the "middleware" libraries? I wonder if the AI tools will obsolete those.

comment 3y ago · link · parent

GPT3 is ~175B parameters. At float16 precision, that's 350GB of weights. BLOOM-176B is about the same size. Here's one person's experience; a token is ~0.75 words.

"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 attention mechanism in transformer models also uses this trick - just dot product. I learned this during a long conversation with ChatGPT the other night - an excerpt of its reply to me:

  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

I was playing around doing the same thing today but using Pinecone [1] as a vector store. Some other folks were experimenting with building key-value stores at the Scale AI hackathon this weekend [2]

[1] https://www.pinecone.io/

[2] https://twitter.com/sjwhitmore/status/1617318051455840258

comment 3y ago · link · parent

The author of this paper runs the inference team at OpenAI. So I would imagine that this is a record of her experiments without necessarily revealing which ones they're actually using in production.

comment 3y ago · link · parent

But wouldn't you need to integrate Python into Excel for this to work?

comment 3y ago · link · parent

Humans tend to not like change, particularly in institutions that are themselves resistant to change. Education today is very much like the education in the early 1900s - designed to educate a compliant workforce who would work in factories. Neat rows of desks lined up before an authority.

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."

12345
19