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
const uniq = require('lodash/uniq'); | |
function permutations(n, colors, arr) { | |
if (!n) return [arr]; | |
if (!arr) arr = []; | |
let ret = []; | |
for (let i = 0; i < colors; i++) ret = ret.concat(permutations(n - 1, colors, arr.concat([i]))); | |
return ret; | |
} |
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
/* eslint-disable react/prop-types */ | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import ReactTestUtils from 'react-dom/test-utils'; | |
import FastScrollComponent from './FastScrollComponent'; | |
describe('<FastScrollComponent>', function() { | |
const setupComponent = ({ cacheWhenNotVisible = false, height = 100 }) => { | |
// eslint-disable-line react/prop-types | |
const rowHeight = 25; |
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 rosbag | |
with rosbag.Bag('output.bag', 'w') as outbag: | |
for topic, msg, t in rosbag.Bag('input.bag').read_messages(): | |
outbag.write(topic, msg, t) |
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
#!/bin/bash | |
set -Eeuxo pipefail | |
# Install youtube-dl | |
curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /tmp/youtube-dl | |
chmod a+rx /tmp/youtube-dl | |
# Create /tmp/print-missing-youtube.sh script. | |
echo '#!/bin/bash' > /tmp/print-missing-youtube.sh |
OlderNewer