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
import numpy as np | |
def run(input_file, step=0.1, iterations=1): | |
n = 0 # Number of nodes. | |
m = 0 # Number of voltage sources. | |
components = [] # List of all components found in the netlist. | |
node_res_dic = {} # Dictionary of resistances where key is the node number and the resistance is the value. | |
res_node_dic = {} # Dictionary of resistances where key is the resistance and the node number is the value. |
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
import ast | |
def encode(input_file, output_file): | |
payloads = [x.rstrip() for x in open(input_file)] | |
# Append char count | |
payloads_with_char_count = [] | |
for pl in payloads: | |
payload_with_char_count = str(len(pl) + 2) + pl | |
payloads_with_char_count.append(payload_with_char_count) |
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
""" | |
Render an image of the "text mass" per minute per day of logs. Horizontal | |
minutes against vertical days. The color of each pixel represents the relative | |
text mass for that time slice (that minute). | |
http://gnusha.org/logs/graphs/300-days-anycolor-heatmap-cropped-sorted.png | |
1440 minutes/day | |
2555 days | |
1440 * 2555 |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"log" | |
"os" | |
"strings" | |
) |