from tensorflow.python.keras.utils import to_categorical
# Create a list of words and convert them to indices
words = ["I", "like", "cats"]
word_ids = [word2index[w] for w in words]
print(word_ids)
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 8 columns, instead of 5 in line 6.
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
| Name Vendor Architecture Repository Boards Manager URL Repository Data Folder Branch Name Notes | |
| Adafruit AVR Boards adafruit avr https://github.com/adafruit/Adafruit_Arduino_Boards https://adafruit.github.io/arduino-board-index/package_adafruit_index.json / master | |
| Adafruit nRF52 adafruit nrf52 https://github.com/adafruit/Adafruit_nRF52_Arduino https://adafruit.github.io/arduino-board-index/package_adafruit_index.json / master | |
| Adafruit SAMD Boards adafruit samd https://github.com/adafruit/ArduinoCore-samd https://adafruit.github.io/arduino-board-index/package_adafruit_index.json / master | |
| Adafruit TeeOnArdu TeeOnArdu avr https://github.com/adafruit/TeeOnArdu https://adafruit.github.io/arduino-board-index/package_adafruit_index.json / master | |
| Adafruit WICED adafruit wiced https://github.com/adafruit/Adafruit_WICED_Arduino https://adafruit.github.io/arduino-board-index/package_adafruit_index.json / master | |
| Adelino AVR Boards adelino avr https://github.com/neoautus/Adelino http://cdn.adelino.cc/downloads/packag |
Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma
You can get the list of supported formats with:
ffmpeg -formats
Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:
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
| test |
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
| /* | |
| * Arduino Wireless Communication Tutorial | |
| * Example 1 - Receiver Code | |
| * | |
| * Library: TMRh20/RF24, https://github.com/tmrh20/RF24/ | |
| */ | |
| #include <SPI.h> | |
| #include <nRF24L01.h> | |
| #include <RF24.h> | |
| RF24 radio(7, 8); // CE, CSN |
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
| #!/usr/bin/env python | |
| import RPi.GPIO as GPIO # RPi.GPIO can be referred as GPIO from now | |
| import time | |
| ledPin = 22 # pin22 | |
| def setup(): | |
| GPIO.setmode(GPIO.BOARD) # GPIO Numbering of Pins | |
| GPIO.setup(ledPin, GPIO.OUT) # Set ledPin as output | |
| GPIO.output(ledPin, GPIO.LOW) # Set ledPin to LOW to turn Off the LED |
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
| # Specifies intentionally untracked files to ignore when using Git | |
| # http://git-scm.com/docs/gitignore | |
| *~ | |
| *.sw[mnpcod] | |
| *.log | |
| *.tmp | |
| *.tmp.* | |
| log.txt | |
| *.sublime-project |
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
| <?php | |
| $urls = array(); | |
| $videos = array(); | |
| // vimeo test | |
| $urls[] = 'http://vimeo.com/6271487'; | |
| $urls[] = 'http://vimeo.com/68546202'; | |
| // youtube test |
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
| /* | |
| * The MySensors Arduino library handles the wireless radio link and protocol | |
| * between your home built sensors/actuators and HA controller of choice. | |
| * The sensors forms a self healing radio network with optional repeaters. Each | |
| * repeater and gateway builds a routing tables in RAM or EEPROM which keeps track of the | |
| * network topology allowing messages to be routed to nodes. | |
| * | |
| * Created by Henrik Ekblad <henrik.ekblad@mysensors.org> | |
| * Copyright (C) 2013-2015 Sensnology AB | |
| * Full contributor list: https://github.com/mysensors/Arduino/graphs/contributors |
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
| *The gate resistor: a bit of theory* | |
| When cruyising the internet for Triac switches, you may have come across a large diversion | |
| in the value of the gate resistor value. My choice usually is to take the lowest value that | |
| will still protect the gate and the optocoupler. Reader Mali Lagunas did some research in | |
| the theory behind the criteria to choose the value of the gate resistor. | |
| Which i will copy below: | |
| The resistor when placed in this circuit, will have two main effects: | |
| a) It will limit/provide the current going into the gate of the triac (I_{GT}) |