sudo apt-get update sudo apt-get upgrade ubuntu-drivers devices sudo ubuntu-drivers autoinstall
This file contains hidden or 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 hidden or 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 <[email protected]> | |
# 05 Jul 2016 | |
import gobject | |
import gtk | |
import appindicator | |
import os, sys | |
import time |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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) |
This file contains hidden or 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 random | |
random.seed(1000) | |
keys = 'KUL_EAT' | |
old_list =['KUL_EAT_0','KUL_EAT_1','KUL_EAT_2','KUL_EAT_3','KUL_EAT_4','KUL_EAT_5','KUL_EAT_6','KUL_EAT_7','KUL_EAT_8','KUL_EAT_9','KUL_EAT_10','KUL_EAT_11','KUL_EAT_12','KUL_EAT_13','KUL_EAT_14','KUL_EAT_15', 'KUL_EAT_43'] | |
pool = random.sample(range(50), 40) | |
def randomGenerator(keys,pool,old_list): | |
''' |
This file contains hidden or 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
entitiesWindows1252 = ( | |
8364, # 0x80 0x20AC EURO SIGN | |
65533, # 0x81 UNDEFINED | |
8218, # 0x82 0x201A SINGLE LOW-9 QUOTATION MARK | |
402, # 0x83 0x0192 LATIN SMALL LETTER F WITH HOOK | |
8222, # 0x84 0x201E DOUBLE LOW-9 QUOTATION MARK | |
8230, # 0x85 0x2026 HORIZONTAL ELLIPSIS | |
8224, # 0x86 0x2020 DAGGER | |
8225, # 0x87 0x2021 DOUBLE DAGGER | |
710, # 0x88 0x02C6 MODIFIER LETTER CIRCUMFLEX ACCENT |