Skip to content

Instantly share code, notes, and snippets.

View vikrum's full-sized avatar
🎯
Focusing

vikrum vikrum

🎯
Focusing
View GitHub Profile
@vikrum
vikrum / ping.11.sh
Last active September 1, 2023 17:00
ping.11.sh
#!/bin/bash
# <xbar.title>ping</xbar.title>
# <xbar.version>v1.1</xbar.version>
# <xbar.author>Trung Đinh Quang, Grant Sherrick and Kent Karlsson</xbar.author>
# <xbar.author.github>thealmightygrant</xbar.author.github>
# <xbar.desc>Sends pings to a range of sites to determine network latency</xbar.desc>
# <xbar.image>http://i.imgur.com/lk3iGat.png?1</xbar.image>
# <xbar.dependencies>ping</xbar.dependencies>
# MIT License
#
# Copyright (c) April 2023 Vikrum Nijjar
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@vikrum
vikrum / pun-whisperer.py
Last active May 2, 2023 16:51
If we can't use AI for terrible dad jokes and puns then what's the point?
# Infinite loop, record 30 sec from mic, transcribe, gpt3.5-turbo to tell a terrible dad joke/pun
# brew install portaudio ffmpeg
# pip install -r requirements.txt
import pyaudio
import wave
from pydub import AudioSegment
import openai
import os
@vikrum
vikrum / README.md
Last active May 28, 2021 20:00
Gold Fig blog code snippets

Gold Fig blog post queries, code snippets, and examples.

@vikrum
vikrum / oss-business-models.md
Last active March 29, 2021 21:20
Open Source/Open Core business model blog posts 2013-2020
"query": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"gte": "now/m-1m",
"lt": "now/m"
}
}
a4b
accessanalyzer
acm
acm-pca
alexaforbusiness
amplify
api
apigateway
apigatewaymanagementapi
apigatewayv2
@vikrum
vikrum / index.html
Created September 18, 2017 17:59
HTML stub
<!DOCTYPE html>
<html lang="en">
<head>
<title>title</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href=".css">
<script src=".js"></script>
</head>
<body>
” ﱞ”
” ﱞ “
ˇ˛ ^¸
@vikrum
vikrum / 401k
Last active January 18, 2017 18:27
Quantopian 401K simplified SPY model; front loaded (4 pay cycles) VS throughout year (26 pay cycles) of $27k
def initialize(context):
# Reference to SPY
context.spy = sid(8554)
schedule_function(buySpread, date_rules.week_start(), time_rules.market_open())
def buyFront(context, data):
weekno = get_datetime('US/Eastern').isocalendar()[1]
# Invest in first 4 pay cycles
if (weekno % 2 == 0) and (weekno <=8):
if data.can_trade(context.spy):