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
# repo1 | |
# | repo2 | |
git subtree split --prefix repo2 --branch repo2_update --onto origin/master | |
git subtree push --prefix repo2 <repo2_url> repo2_update | |
cd ~/repo2 # (NOT the subtree) | |
git fetch origin | |
git checkout repo2_update | |
git rebase origin/master | |
git push --force origin repo2_update |
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 functools | |
import time | |
from typing import Any, Callable | |
import pandas | |
def df_cache(f: Callable[..., Any]) -> Callable[..., Any]: | |
functools.wraps(f) |
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 timeit | |
import numpy | |
def _encode(msg): | |
# simple but slow | |
ones = numpy.array(msg) == 1 | |
encoded = [] | |
offset = 0 | |
while True: |
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 queue | |
class Node: | |
def __init__(self, name): | |
self._name = name | |
self._children = [] | |
self.visited = False | |
@property |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 rospy | |
import numpy as np | |
import std_msgs.msg | |
from rx import Observable | |
class TopicObservable(object): | |
def __init__(self, topic_name, topic_type, max_msgs=None): | |
self._topic_name = topic_name |
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
version: 2 | |
jobs: | |
# vm jobs | |
machine: | |
machine: true | |
steps: | |
- run: | | |
echo $SLEEP | |
date |
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
2018-05-09 09:19:56,646 INFO [25778] (deoplete.logging) --- Deoplete Log Start --- | |
2018-05-09 09:19:56,648 INFO [25778] (deoplete.logging) NVIM v0.3.0-1209-gebb1acb3c, Python 3.5.2, neovim client 0.2.6 | |
2018-05-09 09:19:56,659 DEBUG [25778] (deoplete.core) Process 0: /home/ryo/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/source/base.py | |
2018-05-09 09:19:56,660 DEBUG [25778] (deoplete.core) Process 1: /home/ryo/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/source/file.py | |
2018-05-09 09:19:56,660 DEBUG [25778] (deoplete.core) Process 2: /home/ryo/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/source/dictionary.py | |
2018-05-09 09:19:56,660 DEBUG [25778] (deoplete.core) Process 3: /home/ryo/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/source/buffer.py | |
2018-05-09 09:19:56,660 DEBUG [25778] (deoplete.core) Process 0: /home/ryo/.vim/plugged/deoplete.nvim/rplugin/python3/deoplete/source/around.py | |
2018-05-09 09:19:56,660 DEBUG [25778] (deoplete.core) Process 1: /home/ryo/. |
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
#include <vector> | |
#include <iostream> | |
// library code | |
template<class T> | |
double internal_pose(const T& data) { | |
std::cout << "not implemented error" << std::endl; | |
} | |
class Element { |
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 time import sleep, time | |
from multiprocessing import Process, Manager | |
def hardware_io(action, shared_dict): | |
write_duration = 1.2 | |
read_duration = 0.4 | |
sleep(write_duration) # mock write (put action) | |
sleep(read_duration) # mock read (get state) | |
shared_dict['state'] = time() |
NewerOlder