Skip to content

Instantly share code, notes, and snippets.

rkfg rkfg

Block or report user

Report or block rkfg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View switchdisplay.sh
#!/bin/sh
DISPLAY=:0
MAIN=DVI-D-0
TV=HDMI-0
if xrandr --listactivemonitors | grep -q "$MAIN"
then
xrandr --output "$MAIN" --off
xrandr --output "$TV" --auto
else
xrandr --output "$TV" --off
@rkfg
rkfg / test_fs.cpp
Created May 17, 2018
Read-only FUSE filesystem in C++
View test_fs.cpp
#include <iostream>
#include <cstring>
#include <unordered_map>
#include <memory>
#include <boost/unordered_map.hpp>
#define FUSE_USE_VERSION 26
#define _FILE_OFFSET_BITS 64
#include <fuse.h>
@rkfg
rkfg / pickpoint.sh
Last active May 16, 2018
Torrefacto Pickpoint delivery tracking
View pickpoint.sh
#!/bin/sh
PAGE=$( wget -qO- --post-data="shop=5742011_923%2C1979335517_923%2C1262625646_923&order_number=$1" https://pickpoint.ru/monitoring/msearch.php )
echo "$PAGE" | sed -n 's#.*\(Текущий статус :[^<]*\).*#\1#p'
PARAMS=$(echo "$PAGE" | sed -n 's#.*onclick="monitoring.show_history(&quot;\([0-9]*\)&quot;, &quot;\([0-9]*\)&quot.*#id=\1\&owner_id=\2#p')
wget -qO- "https://pickpoint.ru/monitoring/mhistory.php?$PARAMS" | sed -n 's#.*<tr><td>\([^<]*\)</td><td>\([^<][^<]*\)</td></tr>.*#\1 — \2\n#gp'
View cdt.patch
diff --git a/lsp4e-cpp/org.eclipse.lsp4e.cpp.target/cdt-plus-lsp4e.cpp.target b/lsp4e-cpp/org.eclipse.lsp4e.cpp.target/cdt-plus-lsp4e.cpp.target
index e09ad704d2..aaa5586f90 100644
--- a/lsp4e-cpp/org.eclipse.lsp4e.cpp.target/cdt-plus-lsp4e.cpp.target
+++ b/lsp4e-cpp/org.eclipse.lsp4e.cpp.target/cdt-plus-lsp4e.cpp.target
@@ -48,7 +48,7 @@
<unit id="org.eclipse.test.feature.group" version="0.0.0"/>
<unit id="org.eclipse.sdk.ide" version="0.0.0"/>
<unit id="org.eclipse.equinox.executable.feature.group" version="0.0.0"/>
-<repository location="http://download.eclipse.org/eclipse/updates/4.7milestones/"/>
+<repository location="http://download.eclipse.org/eclipse/updates/4.8milestones/"/>
View qt5.5.1.diff
diff --git a/src/qtbase-1-fixes.patch b/src/qtbase-1-fixes.patch
index c3f14eab..85e25dc2 100644
--- a/src/qtbase-1-fixes.patch
+++ b/src/qtbase-1-fixes.patch
@@ -104,91 +104,26 @@ index 31d6285..8e24520 100644
--
2.9.3
-
-From e4da2904bcab29d15ad137508390bec0595c0e72 Mon Sep 17 00:00:00 2001
View gist:0d078dcd9189bf7f3d6e19b33b4979a3
13:10:07,659 INFO ~ Allocating [LOOP_ITER] workspace of 0 bytes...
13:10:07,821 INFO ~ [LOOP_ITER] spilled DEVICE array of 1152 bytes, capacity of 288 elements
13:10:07,831 INFO ~ [LOOP_ITER] spilled DEVICE array of 1152 bytes, capacity of 288 elements
13:10:07,840 INFO ~ [LOOP_ITER] spilled DEVICE array of 1152 bytes, capacity of 288 elements
13:10:07,844 WARN ~ Workspace initialization OVER_TIME was selected, but number of cycles isn't positive value!
13:10:07,844 INFO ~ Allocating [LOOP_FF] workspace of 0 bytes...
13:10:07,844 INFO ~ Allocating [LOOP_FF] workspace of 0 bytes...
13:10:07,844 INFO ~ [LOOP_FF] spilled DEVICE array of 1152 bytes, capacity of 288 elements
CUDA error at /home/rkfg/soft/svn-soft/libnd4j/blas/cuda/NativeOps.cu:4801 code=11(cudaErrorInvalidValue) "result"
Failed on [1110846756352] -> [1110844720640], size: [1152], direction: [2], result: [11]
View CorpusIterator.java
package dlchat;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.apache.commons.lang3.ArrayUtils;
import org.nd4j.linalg.api.ndarray.INDArray;
import org.nd4j.linalg.dataset.api.MultiDataSet;
import org.nd4j.linalg.dataset.api.MultiDataSetPreProcessor;
View log.txt
11:21:40,746 INFO ~ Loaded [JCublasBackend] backend
11:21:41,201 INFO ~ Number of threads used for NativeOps: 32
11:21:41,334 INFO ~ Backend used: [CUDA]; OS: [Linux]
11:21:41,334 INFO ~ Cores: [8]; Memory: [23.1GB];
11:21:41,334 INFO ~ Blas vendor: [CUBLAS]
11:21:41,335 INFO ~ Device name: [GeForce GTX 1070]; CC: [6.1]; Total/free memory: [8507752448]
Building the dictionary...
Dictionary is ready, size is 40035
Total dictionary size is 40035. Processing the dataset...
Done. Corpus size is 281312
View gist:23ce2b8248a9318e08197d0d215b6fdb
16:48:36,943 WARN ~ Workspace initialization OVER_TIME was selected, but number of cycles isn't positive value!
16:48:36,943 INFO ~ Allocating workspace of 0 bytes...
16:48:36,943 INFO ~ Allocating workspace of 0 bytes...
Epoch 1
16:48:43,681 INFO ~ Score at iteration 0 is 70.7216796875
CUDA error at /home/rkfg/soft/svn-soft/libnd4j/blas/cuda/NativeOps.cu:4841 code=77(<unknown>) "result"
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007f5db8f650ca, pid=19020, tid=0x00007f5db9bf4700
View gist:ffb2d5948376ad5c005ace04e9a922ca
Epoch 1
F13 opNum:[13]
Preliminary scalar launch params: gridSize: [962], blockSize: [512], base shmem: [344], blocksPerMP: [32], problemLength: [5128960], effectiveBlockLimit: [480]
F13 opNum:[13]
Preliminary scalar launch params: gridSize: [1], blockSize: [512], base shmem: [344], blocksPerMP: [0], problemLength: [256], effectiveBlockLimit: [480]
AF13 opNum:[13]
F13 opNum:[13]
Preliminary scalar launch params: gridSize: [481], blockSize: [512], base shmem: [344], blocksPerMP: [32], problemLength: [1048576], effectiveBlockLimit: [480]
F13 opNum:[13]
Preliminary scalar launch params: gridSize: [960], blockSize: [512], base shmem: [344], blocksPerMP: [32], problemLength: [4197376], effectiveBlockLimit: [480]
You can’t perform that action at this time.