[TOC]
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from pandas import DataFrame, Series
# Variables | |
PYTHON = python3.12 | |
VENV = .venv | |
PIP = $(VENV)/bin/pip | |
PYTHON_BIN = $(VENV)/bin/python | |
ISORT = $(VENV)/bin/isort | |
BLACK = $(VENV)/bin/black | |
MYPY = $(VENV)/bin/mypy | |
PYTEST = $(VENV)/bin/pytest |
# Variables | |
PYTHON = python3.12 | |
VENV = .venv | |
PIP = $(VENV)/bin/pip | |
PYTHON_BIN = $(VENV)/bin/python | |
ISORT = $(VENV)/bin/isort | |
BLACK = $(VENV)/bin/black | |
MYPY = $(VENV)/bin/mypy | |
PYTEST = $(VENV)/bin/pytest |
from selenium.common.exceptions import NoSuchElementException, ElementClickInterceptedException | |
from selenium import webdriver | |
import time | |
import pandas as pd | |
def get_jobs(keyword, num_jobs, verbose): | |
'''Gathers jobs as a dataframe, scraped from Glassdoor''' | |
# Initializing the webdriver |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" Install vim plug if not installed | |
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' | |
if empty(glob(data_dir . '/autoload/plug.vim')) | |
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' | |
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
endif |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" Install vim plug if not installed | |
let data_dir = has('nvim') ? stdpath('data') . '/site' : '~/.vim' | |
if empty(glob(data_dir . '/autoload/plug.vim')) | |
silent execute '!curl -fLo '.data_dir.'/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' | |
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
endif |
defmodule GFLOPS do | |
def calculate do | |
num_iterations = 1_000_000_000 | |
start_time = :erlang.monotonic_time() | |
for _ <- 1..num_iterations do | |
# Perform a double-precision floating point operation | |
_ = 1.0 + 1.0 | |
end | |
end_time = :erlang.monotonic_time() |
set editing-mode vi | |
# vi settings | |
$if mode=vi | |
set keymap vi-insert | |
"kj" # remap escape | |
$endif |
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. | |
# Initialization code that may require console input (password prompts, [y/n] | |
# confirmations, etc.) must go above this block; everything else may go below. | |
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
fi | |
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH |
import hashlib | |
# Get user input | |
key = input("Enter key: ") | |
num_shards = int(input("Enter number of shard databases: ")) | |
# Hash the key | |
hashed_key = hashlib.sha256(key.encode()).hexdigest() | |
# Convert the hash to an integer |