Skip to content

Instantly share code, notes, and snippets.

@t0mk
t0mk / seg2.py
Created January 20, 2021 12:29
Segment Averaging Python code
View seg2.py
#!/usr/bin/env python3
import os
import sys
from math import sqrt
import numpy as np
import io
def read_training(d):
@t0mk
t0mk / pricePerSpotCPU.py
Last active January 20, 2020 15:40
Prints data about Spot Maket prices in Packet API: facility, plan, price per hour, number of CPU, price per CPU hour
View pricePerSpotCPU.py
#!/usr/bin/env python3
import os
import sys
import requests
apiToken = os.environ["PACKET_API_TOKEN"]
assert(len(apiToken))
apiUrl = "https://api.packet.net"
headers = {"X-Auth-Token": apiToken}
View coreos_run_container.tf
locals {
project_id = "408b7fd3-0df2-4837-b0df-65aaf09f642a"
ud = <<EOS
#cloud-config
coreos:
units:
- name: "docker-prometheus-node-exporter.service"
command: "start"
content: |
[Unit]
@t0mk
t0mk / main.tf
Created February 27, 2019 14:13
packet bgp with count
View main.tf
variable "bgp_password" {
type = "string"
default = "955dB0b81Ef"
}
variable "worker_count" {
type = "string"
default = "2"
@t0mk
t0mk / fff.md
Created November 22, 2017 14:17
rrr
View fff.md

fff

fds f sdf sdf sd fsd f sf ds

@t0mk
t0mk / Vagrantfile
Last active December 22, 2015 21:39
Vagrantfile for vagrant-openstack provider
View Vagrantfile
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
# to spawn a vm in Openstack (tested in Folsom)
# - source openrc.sh and fill your password
# - $ vagrant plugin install vagrant-openstack
# - $ export VAGRANT_DEFAULT_PROVIDER=openstack
# - edit this Vagrant file
# $ vagrant up
View gist:ce14b1e11c1c0229972b
! 9/21/2015, 11:16:19 AM https://www.facebook.com/
www.facebook.com###stream_pagelet
! 9/21/2015, 11:16:36 AM https://www.facebook.com/
www.facebook.com###u_jsonp_9_1
! 9/21/2015, 11:16:50 AM https://www.facebook.com/
www.facebook.com###blueBarNAXAnchor > .__wu.clearfix._uaw > ._fmc > ._2gyi > ._2gyj
@t0mk
t0mk / apps.fact
Created August 31, 2015 12:43
apps fact
View apps.fact
#!/home/core/bin/python
APP_PATH = '/apps'
CONFIG = 'config.yml'
import os
import yaml
import json
import subprocess
View gist:ba4a976953b9360555af
ssh-dss AAAAB3NzaC1kc3MAAACBAIqQWAYfwOYRouaFEPAjtQIDDvQMMni4IUS69f6gQRl6CoHBJHYXpqgaeK3HeYOLYdGtYIfy6UMuGie0W1JAXMsIDYBpuHHYed0Kou18MNiLpwihR0lKd0kM11UwPvirexLelr3RtUVTR1VQ4DvceBFCUtXFE323F8Ln0scnjhUjAAAAFQCJ/Wh36uhh/jcT66DqKgKsy4mh0wAAAIBKgPr3SfVSCyc7HG8ed4F+utjblW39sXSEQJifbjGmWB9lFu/vcAiYYGqrmZqqJl9AhK7buZ2PcbqMVL4swAeV7SQqGHf7VhDHlaaNR6sVbnDbiTMTBjq1H4SJkihK9JcIBaYakhppyLMVKb2La6BDrZPwGuZsv6ZSHXy2ESZobAAAAIBGjgIlhL+FkLZulIVVeUkaPDIp4OvKEQRiPNSU6RtZl4u5Relk4oj8bzRV6GlFnxfuzg3o/xQacMijCllSWTSBB6lrZ7G6A2QraLeoHZoubExhtcZnH5K8ekVm02Di4sS3EhGcnZ1oUSg4vzxMn73biZBAfS6/VfpjKufSLAybng== tomk@Tomass-MacBook-Pro.local