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
=ПСТР(ЯЧЕЙКА("filename";A1);НАЙТИ("]";ЯЧЕЙКА("filename";A1))+1;255) |
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
const axios = require("axios"); | |
async function getLastRecord(indexID) { | |
const response = await axios.get("http://iss.moex.com/iss/history/engines/stock/markets/index/securities/" + indexID + ".json?limit=1"); | |
const lastRecord = response.data["history.cursor"]["data"][0][1]; | |
return lastRecord; | |
} | |
async function getDataAsync(indexID) { | |
const lastRecord = await getLastRecord(indexID); |
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
from math import sqrt, ceil | |
def solve(room_number): | |
s = room_number | |
square_float = 1/2*((sqrt(3)*sqrt(3888*s**2-1)+108*s)**(1/3)/3**(2/3) + 1/(3**(1/3)*(sqrt(3)*sqrt(3888*s**2-1)+108*s)**(1/3)) - 1) | |
level_float = (1/2)*(1+square_float)*square_float | |
square = ceil(square_float) | |
level = ceil(level_float) | |
approx_position = level_float - level + 1 | |
position = round(approx_position / (1/square)) | |
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
library(readr) | |
library(stringr) | |
library(dplyr) | |
library(ggplot2) | |
library(lubridate) | |
library(glmnet) | |
library(purrr) | |
library(tidyr) | |
train_gender <- read_csv("./data/customers_gender_train.csv", col_types = "ci") |
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/local/cuda/lib64 |
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
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64" | |
export CUDA_HOME=/usr/local/cuda |
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 grub-reboot 2 | |
reboot |
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
space <- function(x, ...) {format(x, ..., big.mark = " ", scientific = FALSE, trim = TRUE)} |
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
multGaussian = function(X) { | |
#Number of rows | |
m <- nrow(X) | |
#Column means | |
mu <- colMeans(X) | |
#Number of columns |
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
pca_var <- function(X, percent) { | |
#Normalize data before start | |
X = scale(X) | |
#Covariance matrix | |
Sigma = (1 / nrow(X)) * t(X) %*% X | |
#Singular value decomposition of covariance matrix | |
Sigma_svd <- svd(Sigma) | |