This file contains 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
git submodule add https://github.com/google/ukey2 third_party/ukey2 | |
git submodule add https://github.com/protocolbuffers/protobuf third_party/protobuf | |
git submodule add https://github.com/google/googletest third_party/gtest | |
git submodule add https://github.com/abseil/abseil-cpp third_party/absl | |
git submodule add https://github.com/aappleby/smhasher third_party/smhasher | |
git submodule add https://chromium.googlesource.com/chromium/tools/depot_tools.git third_party/depot_tools |
This file contains 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 mobly import base_test | |
from mobly import signals | |
from mobly import test_runner | |
from mobly.controllers import android_device | |
class HelloWorldTest(base_test.BaseTestClass): | |
def setup_class(self): | |
# Registering android_device controller module declares the test's |
This file contains 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
* Enabling Bluetooth in VirtualBox | |
https://scribles.net/enabling-bluetooth-in-virtualbox/ | |
* Configure ubuntu 16.04 as Bluetooth A2DP Sink, i.e. Play Songs from mobile and listen on laptop-desktop speaker over Bluetooth – Lynxbee | |
https://www.lynxbee.com/configure-ubuntu-16-04-as-bluetooth-a2dp-sink-i-e-play-songs-from-mobile-and-listen-on-laptop-desktop-speaker-over-bluetooth/ | |
* BluetoothUser-a2dp - Debian Wiki | |
https://wiki.debian.org/BluetoothUser/a2dp | |
* Bluetooth Class of Device List In Binary And Hexadecimal | |
https://www.question-defense.com/tools/class-of-device-bluetooth-cod-list-in-binary-and-hex | |
* Bluetooth Audio Receiver - A2DP Sink with Raspberry Pi – { the code ninja } | |
https://thecodeninja.net/2016/06/bluetooth-audio-receiver-a2dp-sink-with-raspberry-pi/ |
This file contains 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
Install the Windows Subsystem for Linux | |
WSL is available only in 64-bit versions of Windows 10 from version 1607. | |
It is also available in Windows Server 2019. | |
Before installing any Linux distros for WSL, | |
you must ensure that the "Windows Subsystem for Linux" optional feature is enabled: | |
Open PowerShell as Administrator and run: | |
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux | |
Restart your computer when prompted. | |
https://docs.microsoft.com/zh-tw/windows/wsl/install-win10 | |
https://docs.microsoft.com/en-us/powershell/module/dism/enable-windowsoptionalfeature?view=win10-ps |
This file contains 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
* Show all commits from specific company | |
git log --pretty=format:"%h %Cblue%ad%Creset %ae %Cgreen%s%Creset" --author=google.com | |
* Show info about remote | |
git remote show origin |
This file contains 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
#https://superuser.com/questions/1174124/turn-on-mobile-hotspot-on-startup-windows-10 | |
$a = [Windows.Networking.NetworkOperators.NetworkOperatorTetheringManager, Windows.Networking.NetworkOperators, ContentType=WindowsRuntime]::CreateFromConnectionProfile( | |
[Windows.Networking.Connectivity.NetworkInformation, Windows.Networking.Connectivity, ContentType=WindowsRuntime]::GetInternetConnectionProfile() | |
) | |
$a.StartTetheringAsync() # to start the Mobile hotspot | |
#$a.StopTetheringAsync() # to stop the Mobile hotspot |
This file contains 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
* Yocto Project Quick Build | |
https://www.yoctoproject.org/docs/2.7.1/brief-yoctoprojectqs/brief-yoctoprojectqs.html | |
* meta-raspberrypi | |
http://git.yoctoproject.org/cgit.cgi/meta-raspberrypi/about/?h=warrior | |
* Building Raspberry Pi Systems with Yocto | |
https://jumpnowtek.com/rpi/Raspberry-Pi-Systems-with-Yocto.html | |
* coldnew.github.io: | |
https://coldnew.github.io/c3e8558e/ | |
https://coldnew.github.io/64f655a5/ | |
* Useful bitbake commands |
This file contains 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 collections | |
c = collections.Counter() # a new, empty counter | |
c = collections.Counter('gallahad') # a new counter from an iterable | |
c = collections.Counter({'red': 4, 'blue': 2}) # a new counter from a mapping | |
c = collections.Counter(cats=4, dogs=8) # a new counter from keyword args | |
c = collections.Counter(['eggs', 'ham', 'ham', 'chicken']) | |
n = c['bacon'] # count of a missing element is zero | |
c['sausage'] = 0 # counter entry with a zero count | |
del c['sausage'] # del actually removes the entry | |
print(list(c.elements())) # elements repeating each as many times as its count. |
This file contains 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
''' | |
Arithmetic Binary Tree | |
Hi, here's your problem today. This problem was recently asked by Apple: | |
You are given a binary tree representation of an arithmetic expression. In this tree, each leaf is an integer value,, and a non-leaf node is one of the four operations: '+', '-', '*', or '/'. | |
Write a function that takes this tree and evaluates the expression. | |
Example: |
This file contains 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
''' | |
Witness of The Tall People | |
Hi, here's your problem today. This problem was recently asked by Google: | |
There are n people lined up, and each have a height represented as an integer. A murder has happened right in front of them, and only people who are taller than everyone in front of them are able to see what has happened. How many witnesses are there? | |
Example: | |
Input: [3, 6, 3, 4, 1] | |
Output: 3 |
NewerOlder