Skip to content

Instantly share code, notes, and snippets.

@denisb411
denisb411 / plot_mic_fft.py
Created May 3, 2017 12:39
Real time microphone analysis. Real time plot of signal and FFT using numpy, matplotlib and pyaudio
import pyaudio
import numpy as np
import time
import wave
import matplotlib.pyplot as plt
# open stream
FORMAT = pyaudio.paInt16
CHANNELS = 1
#!/usr/bin/env python
'''
analyse the user's chrome behavior.
'''
import sqlite3
import urlparse
class AnalyseChrome:
'''
the user's chrome history log is writed by sqllite. and saved default in ~/.config/google-chrome/Default/History at ubuntu.
'''
@kennyz
kennyz / kongwu_pi_tips.md
Last active December 25, 2021 12:41
kongwu pi tips

折腾Pi,解决疑难杂症最好还是去官网论坛

image http://www.raspberrypi.org/phpBB3/

支持Apple TimeMachine,实现Mac备份

在磁盘中创建备份目录 mkdir /media/usbdisk/mactimebak 推荐使用ext4分区(打开notime)

安装nettalk

@pyzen
pyzen / gist:3987597
Created October 31, 2012 15:17 — forked from evildmp/gist:3094281
Set up Django, nginx and uwsgi

Set up Django, nginx and uwsgi

Steps with explanations to set up a server using:

  • virtualenv
  • Django
  • nginx
  • uwsgi
@kennethreitz
kennethreitz / 0_urllib2.py
Created May 16, 2011 00:17
urllib2 vs requests
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib2
gh_url = 'https://api.github.com'
req = urllib2.Request(gh_url)
password_manager = urllib2.HTTPPasswordMgrWithDefaultRealm()