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
close all; clear; clc; | |
color_raw=0:0.05:1; | |
RGB_Lift_raw=(0:0.05:2).'; | |
Ncolor = length(color_raw); vcolor=ones(1,Ncolor); | |
NLift = length(RGB_Lift_raw); vLift = ones(NLift,1); | |
color = vLift * color_raw; | |
RGB_Lift = RGB_Lift_raw * vcolor; |
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 win32gui | |
import win32api | |
dc = win32gui.GetDC(0) | |
red = win32api.RGB(255, 0, 0) | |
x = 3030 | |
y= 100 | |
# for k in range(100): | |
# win32gui.SetPixel(dc, x, y+k, red) # draw red at 0,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
import win32com.client, win32ui | |
class ExcelControl: | |
def __init__(self): | |
# Initialize Excel app | |
self.excel = win32com.client.Dispatch("Excel.Application") | |
self.excel.Visible=True | |
def Openfile(self): | |
# open file |
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 speech_recognition | |
recognizer = speech_recognition.Recognizer() | |
with speech_recognition.Microphone() as src: | |
try: | |
audio = recognizer.adjust_for_ambient_noise(src) | |
print("Threshold Value After calibration:" + str(recognizer.energy_threshold)) | |
print("Please speak:") | |
audio = recognizer.listen(src) |
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 speech_recognition | |
with speech_recognition.Microphone() as src: | |
audio = speech_recognition.Recognizer().listen(src) | |
print("Listening...") | |
with open('recordedaudio.wav','wb') as f: | |
f.write(audio.get_wav_data()) |
NewerOlder