Skip to content

Instantly share code, notes, and snippets.

@cwebber314
cwebber314 / forever_ping_powershell.ps1
Created October 29, 2023 17:50
Use powershell to run connection test on google DNS
Test-Connection 8.8.8.8 -Delay 30 -Count ([int32]::MaxValue) | format-table @{n='TimeStamp';e={Get-Date}},Ping, Source, Address, Latency, Status | Out-File ping.txt
@cwebber314
cwebber314 / index.html
Created October 25, 2023 14:20
ROW Orientation - by section
<div id="app">
<v-app>
<v-main>
<v-container fluid>
<v-row>
<v-col cols=12>
<v-card class="mb-4">
<v-card-title>
Tower Config
</v-card-title>
@cwebber314
cwebber314 / sav2raw.py
Created February 12, 2015 16:38
PSSE .sav file to .raw file
"""
Convert sav file to raw file.
Requires pssepath from:
https://github.com/cwebber314/pssepath
"""
import os.path as osp
import sys
import argparse
import pssepath
@cwebber314
cwebber314 / reportlab_hello.py
Created January 20, 2014 04:34
Reportlab hello world with an image, bulleted list, and enumerated list.
"""
Reportlab sandbox.
"""
from reportlab.lib.enums import TA_JUSTIFY
from reportlab.lib.pagesizes import letter, landscape
from reportlab.lib.enums import TA_JUSTIFY
from reportlab.lib.pagesizes import letter
from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, Image
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
@cwebber314
cwebber314 / PSSE_Environment_debug.md
Last active August 10, 2022 16:33
PSSE Environment Debug Notes

PSSE Environment Debug

Sometimes a PSSE won't open after install. This is almost always caused by an unexpected Python configuration.

If you're struggling with MOD, see the MOD Debug Notes

Debug: Instant close

Behavior:

@cwebber314
cwebber314 / PSSE_MOD_notes.md
Last active August 10, 2022 16:30
Notes on getting PSSE and MOD to play nice with your python environment

PSSE MOD Debug Notes

MOD File Builder often has trouble connecting to the PSSE API if the environment on your machine isn't exactly like PSSE/MOD expects.

This document show some common issues with MOD File Builder install and how to fix them.

If you can't get PSSE to open without MOD, you need to debug that first. Here are some PSSE Debug Notes

The GUI and the Bridge

// Generate a Sankey diagram from a savnw case solve.
// Values are entered by hand, so probably not accurate.
// Loads are not shown so it looks like Kirchoff is violated
// https://sankeymatic.com/build/
//
// Enter Flows between Nodes, like this:
// Source [AMOUNT] Target
MINE G [260] MINE
HYDRO G [600] HYDRO
*******************
Selected Line Name: Tower 1; Circuit 1
*******************
As an aid in setting distance relays, the worst case positive
sequence line impedance, assuming untransposed phases, is:
0.0357 +j 0.1484 Ohms, or 0.1527 Ohms @ 76.47 degrees.
A zone 1 reach set to this value will not overreach the line.
Length: 0.41 miles
Surge impedance: 192.80 ohms Loading: 98.777 MW
*******************
Selected Line Name: Tower 1; Circuit 1
*******************
As an aid in setting distance relays, the worst case positive
sequence line impedance, assuming untransposed phases, is:
0.0357 +j 0.1484 Ohms, or 0.1527 Ohms @ 76.47 degrees.
A zone 1 reach set to this value will not overreach the line.
Length: 0.41 miles
@cwebber314
cwebber314 / message_copy_bot.ts
Last active May 5, 2021 05:01
discord pylon bot to copy messages which match a pattern
// Bot to copy messages which match a pattern from one channel to another
// edit the vars below
var SOURCE_CHANNEL = '830874514241749013'; // #rconlog
var DEST_CHANNEL = '804394923947851796'; // #The-Gulag
var PATTERN1 = 'do_punish';
var PATTERN2 = 'do_kick';
var PATTERN3 = 'do_perma_ban';
var PATTERN4 = 'do_temp_ban';
var PATTERN5 = 'unban';