Skip to content

Instantly share code, notes, and snippets.

View latticetower's full-sized avatar

Tanya Malygina latticetower

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Hakky54
Hakky54 / openssl_commands.md
Last active May 3, 2024 03:14 — forked from p3t3r67x0/openssl_commands.md
Some list of openssl commands for check and verify your keys

OpenSSL 🔐

Install

Install the OpenSSL on Debian based systems

sudo apt-get install openssl
@raulqf
raulqf / Install_OpenCV4_CUDA11_CUDNN8.md
Last active May 6, 2024 09:25
How to install OpenCV 4.5 with CUDA 11.2 in Ubuntu 22.04

How to install OpenCV 4.5.2 with CUDA 11.2 and CUDNN 8.2 in Ubuntu 22.04

First of all install update and upgrade your system:

    $ sudo apt update
    $ sudo apt upgrade

Then, install required libraries:

@oguiza
oguiza / Multivariate Time Series Classification - LSST.ipynb
Last active April 2, 2024 00:01
UCR_Time_Series_Classification_Univariate_Datasets.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# Python implementation of the EXP3 (Exponential weight for Exploration and Exploitation)
# algorithm for solving adversarial bandit problems. Based on the original paper:
# http://rob.schapire.net/papers/AuerCeFrSc01.pdf
import numpy as np
import time
np.random.seed(12345)
n_arms = 4
@maxpagels
maxpagels / df_to_vw.py
Last active October 11, 2021 17:28
Convert Pandas dataframe and/or CSV contents to Vowpal Wabbit-compatible regression & classification input
import math
import types
from pandas.api.types import is_string_dtype
from pandas.api.types import is_numeric_dtype
from tqdm import tqdm
def df_to_vw_regression(df, filepath='in.txt', sample_weights=None, columns=None, target=None, namespace='namespace'):
if columns is None:
columns = df.columns.tolist()
@mkocabas
mkocabas / nms_pytorch.py
Created June 1, 2018 04:56
Pytorch NMS implementation
import torch
# Original author: Francisco Massa:
# https://github.com/fmassa/object-detection.torch
# Ported to PyTorch by Max deGroot (02/01/2017)
def nms(boxes, scores, overlap=0.5, top_k=200):
"""Apply non-maximum suppression at test time to avoid detecting too many
overlapping bounding boxes for a given object.
Args:
boxes: (tensor) The location preds for the img, Shape: [num_priors,4].
@Cartexius
Cartexius / install_gtest_ubuntu.md
Last active March 29, 2024 10:11
Install gtest in Ubuntu
@Yegorov
Yegorov / ya.py
Created January 13, 2018 16:08
Download file from Yandex.Disk through share link
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# https://toster.ru/q/72866
# How to
# wget http://gist.github.com/...
# chmod +x ya.py
# ./ya.py download_url path/to/directory
import os, sys, json
@kairess
kairess / lcnn29_keras.py
Last active December 17, 2018 14:23
Light CNN 29 for Keras (Original code for pytorch, https://github.com/AlfredXiangWu/LightCNN)
def conv2d_bn(x, filters, kernel_size, strides=1, padding='same', activation='relu', use_bias=False, name=None):
x = Conv2D(filters, kernel_size, strides=strides, padding=padding, use_bias=use_bias, kernel_initializer='he_normal', name=name)(x)
if not use_bias:
bn_axis = 1 if K.image_data_format() == 'channels_first' else 3
bn_name = None if name is None else name + '_bn'
x = BatchNormalization(axis=bn_axis, scale=False, name=bn_name)(x)
return x
def mfm(x):
shape = K.int_shape(x)