Skip to content

Instantly share code, notes, and snippets.

View zunayed-arp's full-sized avatar
🎯
Focusing

Zunayed Patwary zunayed-arp

🎯
Focusing
View GitHub Profile
@leouieda
leouieda / plot_wav.py
Created February 17, 2014 01:33
Python code to plot a .wav file
# Load the required libraries:
# * scipy
# * numpy
# * matplotlib
from scipy.io import wavfile
from matplotlib import pyplot as plt
import numpy as np
# Load the data and calculate the time of each sample
samplerate, data = wavfile.read('Clapping.wav')
@pokisin
pokisin / Uninstall.md
Last active June 8, 2024 07:53
Uninstall git, ubuntu

Uninstall git

To remove just git package itself from Ubuntu 14.04 execute on terminal:

$ sudo apt-get remove git

Uninstall git and it's dependent packages

To remove the git package and any other dependant package which are no longer needed from Ubuntu Trusty.

$ sudo apt-get remove --auto-remove git
@jayspeidell
jayspeidell / kaggle_download.py
Last active July 18, 2023 12:23
Sample script to download Kaggle files
# Info on how to get your api key (kaggle.json) here: https://github.com/Kaggle/kaggle-api#api-credentials
!pip install kaggle
api_token = {"username":"USERNAME","key":"API_KEY"}
import json
import zipfile
import os
with open('/content/.kaggle/kaggle.json', 'w') as file:
json.dump(api_token, file)
!chmod 600 /content/.kaggle/kaggle.json
!kaggle config path -p /content
@rg3915
rg3915 / django_orm_optimization_cheat_sheet.py
Last active August 26, 2023 15:51 — forked from levidyrek/django_orm_optimization_cheat_sheet.py
Django ORM optimization cheat sheet
"""
Django ORM Optimization Tips
Caveats:
* Only use optimizations that obfuscate the code if you need to.
* Not all of these tips are hard and fast rules.
* Use your judgement to determine what improvements are appropriate for your code.
"""
# ---------------------------------------------------------------------------