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
gem() { api_key="SOME_API_KEY"; if [ -p /dev/stdin ]; then p=$(cat); else p=""; fi; f="$1 $p"; j=$(jq -n --arg text "$f" '{contents: [ { parts: [ { text: $text } ] } ] }'); curl -s -H 'Content-Type: application/json' -d "$j" -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=$api_key" | jq -r '.candidates[0].content.parts[0].text'; } |
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
echo "hostname" > /etc/hostname | |
echo "127.0.0.1 davinci" >> /etc/hosts | |
sudo service hostname restart | |
export PS1="\[\e[01;31m\]\u\[\e[00m\]@\[\e[01;34m\]\h\[\e[00m\] [\A] [\[\e[01;32m\]\W\[\e[00m\]] :: " | |
# Set up NVIDIA Drivers | |
sudo add-apt-repository -y ppa:graphics-drivers/ppa | |
sudo apt-get update | |
sudo apt-get install -y dkms | |
sudo apt-get install -y linux-headers-generic |
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
/* Vedant Misra (vedantmisra.com) (github.com/vedant) | |
* | |
* Script for exporting Google Keep note files. | |
* | |
* This does not handle attachments or checklists, only note files. Downloads | |
* each note to a .txt file named for the note's title. | |
* | |
* To use this, go to https://drive.google.com/keep/ and wait for the page to | |
* fully load all of your saved notes; scroll to the bottom to confirm they're | |
* loaded. Then paste the below in your URI bar, go to the start of the line, |
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
#!/usr/bin/env python | |
# -*- coding: ascii -*- | |
#----------------------------------------------------------------------------- | |
""" | |
Time Series Analysis | |
pytsa (read "pizza") depends on scipy and numpy. | |
Pytsa is a simple timeseries utility for python. | |
It is good for pedagogical purposes, such as to understand moving averages, | |
linear regression, interpolation, and single/double/triple exponential smoothing. |