Skip to content

Instantly share code, notes, and snippets.

View tmeits's full-sized avatar
🌄
nature narture

tmeits tmeits

🌄
nature narture
  • enthusiast programmer
  • Russia
View GitHub Profile
@tmeits
tmeits / kvrt.md
Created August 14, 2025 07:56
KVRT для linux

«Касперский» выпустил бесплатный инструмент для Linux Kaspersky Virus Removal Tool

Данная утилита может работать в консольном режиме, что позволяет ее использовать для проверки файлов на веб-серверах. С ее помощью вы можете обнаружить вредоносные файлы webshell, которые созданы злоумышленниками с использованием уязвимостей приложения. Вредоносные файлы могут сохраняться в каталогах даже после установки обновлений CMS, а так же могут быть перенесены на новый хостинг вместе с резервной копией, создаваемой штатными средствами CMS.

Поддерживаются следующие операционные системы:

  • Linux Mint 19.2 и выше.
  • openSUSE Leap 15.0 и выше.
  • Oracle Linux 7.3 и выше.
  • Red Hat Enterprise Linux 6.7 и выше.
@tmeits
tmeits / theme-inari.R
Last active January 18, 2020 10:36
Making a plot with a vibrant orange theme and pomological theme
# http://lenkiefer.com/2019/09/23/theme-inari/
# https://www.garrickadenbuie.com/project/ggpomological/
@tmeits
tmeits / theme_complete_bw.R
Created January 18, 2020 09:52
ggplot theme theme_complete_bw
theme_complete_bw <- function(base_size = 12) {
structure(list(
axis.line = theme_blank(),
axis.text.x = theme_text(size = base_size * 0.8 , lineheight = 0.9, colour = "black", vjust = 1),
axis.text.y = theme_text(size = base_size * 0.8, lineheight = 0.9, colour = "black", hjust = 1),
axis.ticks = theme_segment(colour = "black"),
axis.title.x = theme_text(size = base_size, vjust = 0.5),
axis.title.y = theme_text(size = base_size, angle = 90, vjust = 0.5),
axis.ticks.length = unit(0.15, "cm"),
axis.ticks.margin = unit(0.1, "cm"),
@tmeits
tmeits / README.md
Created January 11, 2020 17:48 — forked from jslefche/README.md
ggplot2: theme_black()

Black theme for ggplot2

This is an additional theme for ggplot2 that generates an inverse black and white color scheme.

Example

ggplot(mtcars, aes(wt, mpg)) + geom_point()
# Add theme_black()
ggplot(mtcars, aes(wt, mpg)) + geom_point(color = "white") + theme_black()
@tmeits
tmeits / interpolate.R
Created December 9, 2019 06:56 — forked from andrie/interpolate.R
Interpolation and smoothing functions in R
# Generate data in the form of a sine wave
set.seed(1)
n <- 1e3
dat <- data.frame(
x = 1:n,
y = sin(seq(0, 5*pi, length.out = n)) + rnorm(n=n, mean = 0, sd=0.1)
)
approxData <- data.frame(
parameters <- structure(list(
T_min = 10, T_opt1 = 9, T_opt2 = 23, T_max = 33,
W_min = 0.01, W_opt1 = 0.375, W_opt2 = 0.5, W_max = 0.625,
W_0 = 0.2, k1 = 0.45, k2 = 0.14, k3 = 0.095, PMax = 40, rd = 0.005,
a1 = 2, a2 = 0.0145, vcr = 0.05, vcrDayCount = 2, lr = 650,
T_temperatureSumToStartGrow = 90, T_periodToSumTemperature = 10),
.Names = c("T_min",
"T_opt1", "T_opt2", "T_max", "W_min", "W_opt1", "W_opt2", "W_max",
"W_0", "k1", "k2", "k3", "PMax", "rd", "a1", "a2", "vcr", "vcrDayCount",
"lr", "T_temperatureSumToStartGrow", "T_periodToSumTemperature"
@tmeits
tmeits / LSTM.R
Created November 4, 2017 07:54 — forked from mick001/LSTM.R
set.seed(1)
# define some functions
## convert integer to binary
i2b <- function(integer, length=8)
as.numeric(intToBits(integer))[1:length]
## apply
int2bin <- function(integer, length=8)
@tmeits
tmeits / rnn_example.R
Created November 4, 2017 07:52 — forked from mick001/rnn_example.R
Sine wave prediction with recurrent neural networks in R. Full article at: https://firsttimeprogrammer.blogspot.com/2016/08/plain-vanilla-recurrent-neural-networks.html
# Clear workspace
rm(list=ls())
# Load libraries
require(rnn)
# Set seed for reproducibility purposes
set.seed(10)
# Set frequency
@tmeits
tmeits / keras_prediction.py
Created October 28, 2017 16:46 — forked from hnykda/keras_prediction.py
Predicting sequences of vectors (regression) in Keras using RNN - LSTM (danielhnyk.cz)
import pandas as pd
from random import random
flow = (list(range(1,10,1)) + list(range(10,1,-1)))*100
pdata = pd.DataFrame({"a":flow, "b":flow})
pdata.b = pdata.b.shift(9)
data = pdata.iloc[10:] * random() # some noise
import numpy as np
@tmeits
tmeits / mlp.py
Created October 28, 2017 15:28 — forked from Ogaday/mlp.py
Regression on toy data using Keras
# Python 3.5
import numpy as np
import matplotlib.pyplot as plt
from keras.models import Sequential
from keras.layers.core import Dense, Activation
from keras.optimizers import SGD
from sklearn.metrics import mean_squared_error