Skip to content

Instantly share code, notes, and snippets.

View taras-sereda's full-sized avatar
🌊

Taras Sereda taras-sereda

🌊
View GitHub Profile
@taras-sereda
taras-sereda / gpufancontrol.sh
Created November 8, 2024 22:15
NVIDIA fan control from command line
#!/bin/bash
set -eo pipefail
FAN_SPEED=$1
DISPLAY=:1
startx -- ${DISPLAY} &
sleep 1
nvidia-settings -c ${DISPLAY} -a GPUFanControlState=1 -a GPUTargetFanSpeed=${FAN_SPEED}
diff --git a/glow_old.py b/glow_old.py
index 0de2375..5895300 100644
--- a/glow_old.py
+++ b/glow_old.py
@@ -183,7 +183,7 @@ class WaveGlow(torch.nn.Module):
self.n_remaining_channels,
spect.size(2)).normal_()
else:
- audio = torch.cuda.FloatTensor(spect.size(0),
+ audio = torch.FloatTensor(spect.size(0),
#!/usr/bin/env sbcl --script
(defun atoi_itoa (input_str)
(write-to-string (parse-integer input_str :radix 10) :base 10)
)
(defvar erroneous_data "-$%A123")
(print
@taras-sereda
taras-sereda / freqs.cpp
Created February 27, 2017 06:23
word frequency tool
// compile with g++ --std=c++11
// g++ --std=c++11 freqs.cpp -o freqs
#include <iostream>
#include <sstream>
#include <fstream>
#include <regex>
#include <algorithm>
#include <map>