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
''' | |
Due to recent events, I've made this script to help you get to know me better. | |
Please run the script to find out more. | |
''' | |
import base64 | |
# pip install pillow | |
# pip install requests | |
from PIL import Image, ImageDraw, ImageFont | |
import numpy as np | |
import requests |
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 | |
import pygame | |
import time | |
import random | |
from joblib import load | |
pygame.init() | |
# Run on either ubuntu or Powershell, don't use wsl2 as it's not supported |
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 python3 | |
# pip install pyaudio | |
import pyaudio | |
import struct | |
import math | |
FORMAT = pyaudio.paInt16 | |
CHANNELS = 2 | |
RATE = 44100 |
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
set nocompatible " required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 matplotlib.pyplot as mpplt | |
import matplotlib.gridspec as gridspec | |
import numpy | |
figure = mpplt.figure(figsize=(11, 10)) | |
gs = gridspec.GridSpec(3, 12) | |
plt = figure.add_subplot(gs[0, :]) | |
plt.hlines(3, -10, 10, color='red') | |
plt.hlines(-3, -10, 10, color='red') |
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 | |
wget -q -O - "http://www.macmillandictionary.com/dictionary/british/$1" | grep -P -o "<span class=\"DEFINITION\">(.*?)</span>" | grep -Po '(?<=href=")[^"]*' | grep -Po '=.*?$' | cut -d = -f 2 | awk '{printf "%s ",$1}' |
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
# font color : green | |
color='\e[0;32m' | |
# font color : white | |
NC='\e[0m' | |
getquote(){ | |
num_online_quotes=9999 | |
rand_online=$[ ( $RANDOM % $num_online_quotes ) + 1 ] | |
quote=$(wget -q -O - "http://www.quotationspage.com/quote/$rand_online.html" | |
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 | |
for ip in 192.168.1.{1..254}; do | |
ping -c 1 -W 1 $ip | grep "64 bytes" & | |
done |
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
def prime(n): | |
for i in range(3,n): | |
if 2**(i-1)%i==1: | |
print i |
NewerOlder