echo -e '*1\r\n$4\r\nPING\r\n' | nc redis.host.com 6379
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 | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2930ADAE8CAF5059EE73BB4B58712A2291FA4AD5 | |
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list | |
sudo apt-get update -y | |
sudo apt-get install -y mongodb-org | |
sudo service mongod start | |
wget http://worldcup.sfg.io/matches | |
mongoimport -d mongoaldb -c matches --type json --file matches --jsonArray | |
wget https://github.com/azat-co/mongoui/archive/master.zip | |
unzip master.zip |
- Go to ec2 instances console (in our case the region is Ohio)
- Actions -> Instance State -> Start
- Wait for the instance to start
- copy the
Public DNS (IPv4)
from the instance description
to connect with ssh run the following command:
ssh -i '/.../tensorrt_test.pem' ubuntu@INSTANCE_PUBLIC_DNS
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
def is_contained(sub,lst): | |
last_element_index = -1 # dummy value | |
if set(sub) > set(lst): # check if sub is subset of lst | |
return False | |
for i in range(len(sub)): # iterate over sub with for-loop | |
if sub[i] in lst: # check if element i in sub exists in lst | |
lst_indexes = [j for j, y in enumerate(lst) if y == sub[i]] # list of all occurrences of sub[i] in lst | |
if max(lst_indexes) > last_element_index + 1: # check if relevant elements are in ascending order | |
last_element_index = min(lst_indexes) # update last index | |
else: |
- create new variable with type Query and name it as you wish
- under Query Options:
- Query:
container_tasks_state{state="running",container_label_com_docker_swarm_service_name=~".*_logstash"}
- Regex: /.container_label_com_docker_swarm_service_name="(.)",container_label_com_docker_swarm_task_id=/
- Query:
it will create variables for any service which ends with "logstash"
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
#!/usr/bin/env python | |
import numpy as np | |
from pylab import * | |
import scipy.integrate as spi | |
#Parameter Values | |
PopIn= {'g1s_young':1/12,'g1i_young':1/12,'g1r_young':1/12,'g1s_mid':1/12,'g1i_mid':1/12,'g1r_mid':1/12,'g1s_old':1/12,'g1i_old':1/12,'g1r_old':1/12,'g1s_vold':1/12,'g1i_vold':1/12,'g1r_vold':1/12} | |
arr = [1/12]*12 | |
beta= 0.50 |