remove dead files
This commit is contained in:
parent
c368abc371
commit
4b9e207fdc
|
@ -1,33 +0,0 @@
|
|||
import pyaudio
|
||||
|
||||
CHUNK = 4096
|
||||
|
||||
class Microphone:
|
||||
def __init__(self):
|
||||
print('aloha bra')
|
||||
self._pa = pyaudio.PyAudio()
|
||||
|
||||
self._stream = self._pa.open(
|
||||
format = pyaudio.paInt16,
|
||||
channels = 1,
|
||||
rate = 48000,
|
||||
input = True,
|
||||
frames_per_buffer = CHUNK
|
||||
)
|
||||
|
||||
def getFrame(self):
|
||||
frame = self._stream.read(CHUNK)
|
||||
print(len(frame))
|
||||
return frame
|
||||
|
||||
def __del__(self):
|
||||
try:
|
||||
self._stream.stop_stream()
|
||||
self._stream.close()
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
self._pa.terminate()
|
||||
except AttributeError:
|
||||
pass
|
BIN
noimage.jpg
BIN
noimage.jpg
Binary file not shown.
Before Width: | Height: | Size: 9.5 KiB |
|
@ -1,26 +0,0 @@
|
|||
from async import async
|
||||
#~ from logger import logGeneric
|
||||
import socket
|
||||
from ftplib import FTP
|
||||
from io import BytesIO
|
||||
from functools import partial
|
||||
|
||||
def buildUploader(host, port, user, passwd):
|
||||
|
||||
@async(daemon=False)
|
||||
def uploader(filepath, filename, buf):
|
||||
retries = 3
|
||||
ftp = FTP()
|
||||
while retries > 0:
|
||||
try:
|
||||
ftp.connect(host=host, port=port)
|
||||
ftp.login(user=user, passwd=passwd)
|
||||
ftp.cwd(filepath)
|
||||
ftp.storbinary('STOR ' + filename, BytesIO(buf))
|
||||
break
|
||||
except IOError:
|
||||
retries =- 1
|
||||
#~ logGeneric('remoteServer: Failed to upload file. ' + str(retries) + ' retries left...', 0)
|
||||
ftp.quit()
|
||||
|
||||
return uploader
|
Loading…
Reference in New Issue