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 | |
# Exit immediately if a command exits with a non-zero status | |
set -e | |
# Function to install ROS Noetic | |
install_ros() { | |
echo "Setting up sources.list for ROS Noetic" | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' |
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 | |
# Exit immediately if a command exits with a non-zero status | |
set -e | |
# Install ROS Noetic Kobuki core packages | |
echo "Installing ROS Noetic Kobuki core packages" | |
sudo apt-get install -y ros-noetic-kobuki-core | |
# Install additional dependencies |
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 | |
# Exit immediately if a command exits with a non-zero status | |
set -e | |
# Setup sources.list | |
echo "Setting up sources.list" | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
# Setup your keys |
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
/* | |
AVX implementation of sin, cos, sincos, exp and log | |
Based on "sse_mathfun.h", by Julien Pommier | |
http://gruntthepeon.free.fr/ssemath/ | |
Copyright (C) 2012 Giovanni Garberoglio | |
Interdisciplinary Laboratory for Computational Science (LISC) | |
Fondazione Bruno Kessler and University of Trento | |
via Sommarive, 18 |
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
class Solution { | |
public: | |
double findMedianSortedArrays(vector<int>& nums1, vector<int>& nums2) { | |
if(nums1.size() == 0 || nums2.size() == 0 || (nums1.size() > 1 && *nums1.begin() == *nums1.rbegin()) ||(nums2.size() > 1 && *nums2.begin() == *nums2.rbegin())){ | |
vector<int> &ref = (nums1.size() > 0 ? nums1 : nums2); | |
if(nums1.size() > 0 && nums2.size() > 0){ | |
if (*nums1.begin() == *nums1.rbegin()){ | |
ref = nums2; |
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 | |
apt -y install apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | |
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" | |
apt update && apt -y install docker-ce docker-compose |
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
contract AbstractVault { | |
address[] public authorizedUsers; | |
address public owner; | |
address public withdrawObserver; | |
address public additionalAuthorizedContract; | |
address public proposedAAA; | |
uint public lastUpdated; | |
bool[] public votes; | |
address [] public observerHistory; | |
modifier onlyAuthorized() { |
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 android.support.annotation.NonNull; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
import java.io.PrintWriter; | |
import java.io.UnsupportedEncodingException; | |
import java.io.Writer; |
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
package com.dpmedeiros.androidtestsupportlibrary; | |
import android.os.Handler; | |
import android.os.Looper; | |
import org.mockito.invocation.InvocationOnMock; | |
import org.mockito.stubbing.Answer; | |
import org.powermock.api.mockito.PowerMockito; | |
import java.util.concurrent.Executors; |
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
# coding: utf8 | |
#see https://developer.android.com/studio/write/convert-webp.html | |
from functools import reduce | |
intBase = 1024 | |
intKB = intBase | |
intMB = intKB * intBase | |
intGB = intMB * intBase | |
NewerOlder