Skip to content

Instantly share code, notes, and snippets.

View Yevgnen's full-sized avatar
🔥

Yevgnen Yevgnen

🔥
View GitHub Profile
@jdtsmith
jdtsmith / eglot-booster.el
Last active February 16, 2024 18:17
eglot-booster: boost eglot with emacs-lsp-booster. ****NOTE: USE THIS PACKAGE INSTEAD: https://github.com/jdtsmith/eglot-booster
;;; eglot-booster.el --- boost eglot using emacs-lsp-booster -*- lexical-binding: t; -*-
;; Copyright (C) 2024 J.D. Smith
;;; Commentary:
;; **UPDATE** This has been superseded by the following package:
;; https://github.com/jdtsmith/eglot-booster
;;
;; Boost eglot with emacs-lsp-booster.
;; 1. Download a recent emacs-lsp-booster from
@brendanzab
brendanzab / gist:d41c3ae485d66c07178749eaeeb9e5f7
Last active July 19, 2023 04:28
My personal list of Rust grievances (September 2021)

September 2022:

This has spread to a far wider audience than I had anticipated - probably my fault for using a title that is in hindsight catnip for link aggregators. I wrote this back in 2021 just as a bunch of personal thoughts of my experiences using Rust over the years (not always well thought through), and don't intend on trying to push them further, outside of personal experiments and projects.

Managing a living language is challenging and difficult work, and I am grateful for all the hard work that the Rust community and contributors put in given the difficult constraints they work within. Many of the things I listed below are not new, and there's been plenty of difficult discussions about many of them over the years, and some are being worked on or postponed, or rejected for various good reasons. For more thoughts, please see my comment below.

My personal list of Rust gr

@rfeinman
rfeinman / build_pytorch_openmp_mkl_macOS.sh
Last active March 20, 2022 16:15
Build PyTorch with MKL & OpenMP threading on macOS
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# This install used the following development environment:
# - We have installed xcode command line tools
# - We have installed cmake via homebrew (my version is 3.20.2)
# - We have created a fresh conda environment "pytorch-dev" and installed
# python=3.8 and all of the packages from pytorch/README.md except cmake
# (including the torch.distributed deps)
# - We have copied the relevant OpenMP header files into a fresh directory at ~/openmp
# - We have cloned the pytorch github repo to ~/pytorch
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

About variadics in Rust

This is an analysis of how variadic generics could be added to Rust. It's not a proposal so much as a summary of existing work, and a toolbox for creating an eventual proposal.

Introduction

Variadic generics (aka variadic templates, or variadic tuples), are an often-requested feature that would enable traits, functions and data structures to be generic over a variable number of types.

To give a quick example, a Rust function with variadic generics might look like this:

@yanickxia
yanickxia / anync.rs
Created September 4, 2020 10:05
Rust Async
#![allow(unused)]
use {
futures::{
future::{BoxFuture, FutureExt},
task::{ArcWake, waker_ref},
},
std::{
future::Future,
pin::Pin,
@omry
omry / config.yaml
Created June 11, 2020 09:34
Hydra flask example
server:
host: 127.0.0.1
port: 8081
app:
username: ${env:USER}
flask:
ENV: production
DEBUG: false
from simpletransformers.language_modeling import LanguageModelingModel
import logging
logging.basicConfig(level=logging.INFO)
transformers_logger = logging.getLogger("transformers")
transformers_logger.setLevel(logging.WARNING)
train_args = {
from simpletransformers.language_modeling import LanguageModelingModel
import logging
logging.basicConfig(level=logging.INFO)
transformers_logger = logging.getLogger("transformers")
transformers_logger.setLevel(logging.WARNING)
train_args = {
"reprocess_input_data": True,
"""
BiLSTM-CRF的PyTorch教学实现,矩阵化版本,含详尽注释和举例
参考
- PyTorch官方教学代码: https://pytorch.org/tutorials/beginner/nlp/advanced_tutorial.html
- 矩阵化推导: https://zhuanlan.zhihu.com/p/44042528
- BiLSTM-CRF原文: https://arxiv.org/pdf/1508.01991v1.pdf
by 虎哥@知乎 koyo922@.qq.com 2019/12/16
"""
import torch