Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Arun Reddy arunreddy

🎯
Focusing
Block or report user

Report or block arunreddy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@arunreddy
arunreddy / .bashrc
Last active Dec 8, 2018
STARLAB server bash configuration
View .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@arunreddy
arunreddy / virtual_keyboard
Last active Jul 5, 2019
QT Virtualkeyboard
View virtual_keyboard
import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.Qt import Qt
from PyQt5.QtWidgets import *
class VKQLineEdit(QLineEdit):
def __init__(self, parent=None, name=None, mainWindowObj=None):
super(VKQLineEdit, self).__init__(parent)
@arunreddy
arunreddy / clean_audio.sh
Created Oct 22, 2017 — forked from devoncrouse/clean_audio.sh
Using Sox (http://sox.sourceforge.net) to remove background noise and/or silence from audio files (individually, or in batch).
View clean_audio.sh
# Create background noise profile from mp3
/usr/bin/sox noise.mp3 -n noiseprof noise.prof
# Remove noise from mp3 using profile
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21
# Remove silence from mp3
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5%
# Remove noise and silence in a single command
View asoundrc
#The below 2 sections are commented, they control the default sound card to use
#This set up is for a Pi with an I2S microphone attached using the guide
#from adafruit at
# https://learn.adafruit.com/adafruit-i2s-mems-microphone-breakout
#Uncomment and the I2S will be your default card (assuming same setup)
#but you won't get audio playback because both recording and playback will be
#defaulted
#TODO - Figure out how to set default for recording separately
#To adjust use aplay -l to work out the devices you have and their card number
#For recording devices use arecord -l
View example.sh
#!/bin/ bash
# VAR1=$1
# VAR2=$2
# VAR3=$3
python example.py ${VAR1} ${VAR1} ${VAR1}
------------------------------------------------------------------------------------
Inside the python file.
@arunreddy
arunreddy / power_plots.py
Last active Jul 25, 2017
power_plots.py
View power_plots.py
# ---------------------------------------------------------
# library imports.
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from matplotlib.dates import DateFormatter, DayLocator, HourLocator
# *********************************************************
View multiple.py
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from matplotlib.dates import DateFormatter
from datetime import timedelta, date
def datetime(x):
return np.array(x, dtype = np.datetime64)
@arunreddy
arunreddy / RTD_ZONAL_LBMP.py
Last active Jul 24, 2017
RTD_ZONAL_LBMP.py
View RTD_ZONAL_LBMP.py
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from matplotlib.dates import DateFormatter, MinuteLocator, MonthLocator
def datetime(x):
return np.array(x, dtype = np.datetime64)
View policy_class.cpp
// SGD with variadic templates for policy type class.
template<typename DecomposableFunctionType, typename ... PolicyType>
class SGD{
}
// Use alias to declare most frequently used combinations.
using StandardSGD = SGD<FunctionType, EmptyUpdate, NoDecay>;
using SGD2 = SGD<FunctionType, MomentumUpdate, NoDecay>;
using SGD3 = SGD<FunctionType, NesterovUpdate, ExponentialDecay>;
@arunreddy
arunreddy / policy_types.cpp.cpp
Created Mar 6, 2017
policy_types.cpp created by arunreddy - https://repl.it/GIX8/1
View policy_types.cpp.cpp
#include <iostream>
using namespace std;
int main()
{
cout << "Hello World" << endl;
count << "Does is sync" << endl;
return 0;
You can’t perform that action at this time.