sudo apt-get update sudo apt-get upgrade ubuntu-drivers devices sudo ubuntu-drivers autoinstall
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
#!/bin/sh | |
max=90 | |
while true | |
do | |
battery_percentage=`acpi -b | egrep 'Charging|Full'|grep -v 'Discharging' | grep -P -o '[0-9]+(?=%)'`; | |
if [ "$battery_percentage" -gt "$max" ] | |
then | |
echo $battery_percentage | |
notify-send 'Laptop Battery Charged' "Please Disconnect Laptop Battery is charged" |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# I am using this to monitor my cpu's temperature in the top bar of my os | |
# I have tested the script on Ubuntu 15.10 with Python 2.7.10 | |
# Update: I used to require acpi but then found a simpler way | |
import sys,time,re,commands,os | |
from gi.repository import Gtk, GLib |
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
#!/bin/bash | |
# | |
# This is sp, the command-line Spotify controller. It talks to a running | |
# instance of the Spotify Linux client over dbus, providing an interface not | |
# unlike mpc. | |
# | |
# Put differently, it allows you to control Spotify without leaving the comfort | |
# of your command line, and without a custom client or Premium subscription. | |
# |
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
absl-py==0.7.1 | |
astor==0.8.0 | |
atomicwrites==1.3.0 | |
attrs==19.3.0 | |
backcall==0.1.0 | |
beautifulsoup4==4.8.1 | |
bleach==3.1.0 | |
blis==0.4.1 | |
boto==2.49.0 | |
boto3==1.10.0 |
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
#!/usr/bin/env python | |
# Unity indicator for dolar/real currency | |
# Author: Caio Almeida <caiosba@gmail.com> | |
# 05 Jul 2016 | |
import gobject | |
import gtk | |
import appindicator | |
import os, sys | |
import time |
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
#!/bin/bash | |
# install CUDA Toolkit v8.0 | |
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network)) | |
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb" | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG} | |
sudo dpkg -i ${CUDA_REPO_PKG} | |
sudo apt-get update | |
sudo apt-get -y install cuda |
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
# Requirements | |
# certifi==2018.11.29 | |
# chardet==3.0.4 | |
# datefinder==0.6.1 | |
# EasyProcess==0.2.5 | |
# emoji==0.5.1 | |
# idna==2.8 | |
# nltk==3.4 | |
# pendulum==2.0.4 | |
# PySocks==1.6.8 |
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 re | |
import datetime | |
import pendulum | |
import datefinder | |
def review_date_cal(sentence): | |
date_value = "NAN" | |
now = pendulum.now() | |
if 'ago' in sentence: | |
if 'day' in sentence: | |
value = " ".join(re.findall("[0-9]+", sentence)) |
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 cv2 | |
#reading the image | |
image = cv2.imread("000001.jpg") | |
edged = cv2.Canny(image, 10, 250) | |
#cv2.imshow("Edges", edged) | |
#cv2.waitKey(0) | |
#applying closing function | |
kernel = cv2.getStructuringElement(cv2.MORPH_RECT, (30, 30)) | |
closed = cv2.morphologyEx(edged, cv2.MORPH_CLOSE, kernel) |