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 pygame | |
import sys, os | |
import numpy as np | |
import time | |
pygame.init() | |
pygame.mixer.init() | |
window_surface = pygame.display.set_mode((800, 600)) | |
def get_sound(level): |
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
from recorder import Recorder | |
import numpy as np | |
import wave | |
import time | |
class basic_recorder(Recorder): | |
def start(self): | |
self.record_stop = False | |
self.cache_wave = [] |
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
/************************************************************************* | |
* ADOBE CONFIDENTIAL | |
* ___________________ | |
* | |
* Copyright 2014 Adobe Inc. | |
* All Rights Reserved. | |
* | |
* NOTICE: Adobe permits you to use, modify, and distribute this file in | |
* accordance with the terms of the Adobe license agreement accompanying | |
* it. If you have received this file from a source other than Adobe, |
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 mp3_2_wav(file): | |
name = os.path.splitext(os.path.basename(file))[0] | |
audio = AudioSegment.from_file(file, format="mp3") | |
#, frame_rate=22050, channels=1, sample_width=2 | |
audio = audio.set_frame_rate(22050) | |
audio = audio.set_channels(1) | |
audio = audio.set_sample_width(2) |
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
exports.westworld_sence = function (location) { | |
basic_location = [parseInt(location.x), parseInt(location.y), parseInt(location.z)]; | |
basic_world = location.world; | |
var location_object = org.bukkit.Location; | |
/** Relative location x y, spawn typeid, spawn, data */ | |
var creation = [ | |
[0, 0, 1, 0], | |
[1, 0, 1, 0], |
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
from socket import socket | |
from multiprocessing.dummy import Pool | |
machine_ip, machine_port = "192.168.20.150", 8899 | |
connect_machine_socket = socket() | |
connect_machine_socket.bind((machine_ip, machine_port)) | |
connect_machine_socket.listen() |
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
from socket import socket | |
from multiprocessing.dummy import Pool | |
import time | |
def wait_client(client_socket, ip_port): | |
try: | |
pag = [] | |
tmp = None | |
while True: |
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 socket | |
import sys | |
host, port = "192.168.43.201", 5000 | |
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
sock.bind((host, port)) | |
sock.listen(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
import os | |
root_dir = "odoo-db-data" | |
for this_dir in os.listdir(root_dir): | |
now_path = "/".join([root_dir, this_dir]) | |
if os.path.isdir(now_path): | |
if len(os.listdir(now_path)) == 0: | |
print (now_path) |
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 pre_execute(function): | |
print("in pre execute") | |
return function() | |
@pre_execute | |
def execute(): | |
print ("hello world") |