This file contains hidden or 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
| M = matrix(c(10,10,1,3, 10,8,1,3, 8,11,1,3, 1,1,1,3, 20,20,2,3, 11,11,13,3), nrow=6, ncol=4) | |
| require(scales) | |
| apply(M, 1, rescale) | |
| akmeans(M, min.k = 2) | |
| Z = akmeans(M,d.metric=2,ths3=0.8,mode=3, min.k = 2) | |
| Z[cluster] |
This file contains hidden or 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
| int rc; char *stringValue; | |
| Tcl_Obj *command = Tcl_NewObj(); | |
| Tcl_IncrRefCount(command); | |
| Now add the command name | |
| Tcl_ListObjAddElement(0,command,Tcl_NewStringObj("command-name",-1)); |
This file contains hidden or 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 <sys/socket.h> | |
| #include <net/bpf.h> | |
| #include <net/if.h> | |
| #include <net/ethernet.h> | |
| #include <errno.h> | |
| #include <fcntl.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdio.h> |
This file contains hidden or 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 <sys/socket.h> | |
| #include <net/bpf.h> | |
| #include <net/if.h> | |
| #include <net/ethernet.h> | |
| #include <errno.h> | |
| #include <fcntl.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <stdio.h> |
This file contains hidden or 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
| ../src/openocd -f interface/stlink-v2.cfg -f target/stm32f1x.cfg | |
| telnet localhost 4444 | |
| reset halt | |
| first time: stm32f1x unlock 0 | |
| flash write_image erase /data/blue/openmc3/opencm3-cppcomp/test1.bin 0x08000000 |
This file contains hidden or 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
| echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages | |
| #modprobe uio_pci_generic | |
| #./usertools/dpdk-devbind.py -s | |
| #./usertools/dpdk-devbind.py -b uio_pci_generic 0000:02:00.0 | |
| modprobe uio | |
| insmod build/kmod/igb_uio.ko | |
| ./usertools/dpdk-devbind.py -b igb_uio 0000:02:00.0 |
This file contains hidden or 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 main | |
| import ( | |
| "syscall" | |
| "time" | |
| "os/exec" | |
| "fmt" | |
| "os" | |
| ) |
This file contains hidden or 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
| mkdir demo | |
| echo "test" >demo/hello.txt | |
| ./ostree/ostree --repo=repo init --mode=archive | |
| ./ostree/ostree --repo=repo commit --branch=foo demo | |
| ./ostree/ostree --repo=repo refs | |
| ./ostree/ostree --repo=repo ls foo | |
| ./ostree/ostree-trivial-httpd -P 9999 ./repo |
This file contains hidden or 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 centos7 - accessiable via 192.168.99.20 (or change bellow) | |
| yum install -y docker | |
| systemctl start docker | |
| systemctl enable docker | |
| >> setup docker http proxy https://docs.docker.com/config/daemon/systemd/ | |
| cat <<EOF > /etc/yum.repos.d/kubernetes.repo | |
| [kubernetes] |
This file contains hidden or 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://github.com/intel/multus-cni/blob/master/images/multus-daemonset.yml | |
| [root@kube1 ~]# cat /etc/cni/net.d/00-multus.conf | |
| { | |
| "name": "multus-cni-network", | |
| "type": "multus", | |
| "delegates": [ | |
| { | |
| "bridge":"kube-bridge", | |
| "ipam":{ |