Skip to content

Instantly share code, notes, and snippets.

View zephyrzilla's full-sized avatar
:octocat:
🍔 · 😴 · 👨‍💻 · 🔁

Surajit Dasgupta zephyrzilla

:octocat:
🍔 · 😴 · 👨‍💻 · 🔁
View GitHub Profile
## Imports
from typing import Tuple
import torch
from torch import Module, Tensor
from transformers.models.roberta.modeling_roberta import RobertaPreTrainedModel, RobertaConfig, RobertaModel, RobertaEncoder
from torch.nn import CrossEntropyLoss, CosineEmbeddingLoss
## Function
@zephyrzilla
zephyrzilla / Storing-Images-On-Github.md
Created January 20, 2020 13:11 — forked from joncardasis/Storing-Images-On-Github.md
Storing Images and Demos in your Repo

Storing Images and Demos in your Repo

In this quick walkthough you'll learn how to create a separate branch in your repo to house your screenshots and demo gifs for use in your master's readme.

How to

1. Clone a fresh copy of your repo

In order to prevent any loss of work it is best to clone the repo in a separate location to complete this task.

2. Create a new branch

Create a new branch in your repo by using git checkout --orphan assets

@zephyrzilla
zephyrzilla / olympics-gdp-rio.py
Created August 23, 2016 22:28
Python code to visualize ranking of countries based on their performance in Rio Olympics 2016 and their corresponding GDP
from matplotlib import pyplot as plt
import operator
# Country wise ranking at Rio Olympics 2016, Brazil
# Data scraped off Google: search term "rio olympics 2016"
# Preprocessed and converted to a Python dictionary
rank_olympics_dict = {'Canada': 20, 'Lithuania': 64, 'Ethiopia': 44, 'Argentina': 27, \
'Bahrain': 48, 'Slovenia': 45, 'Germany': 5, 'Spain': 14, 'Netherlands': 11, 'Jamaica': 16, 'United_States': 1, \
'Cote_dIvoire': 51, 'Australia': 10, 'India': 67, 'Azerbaijan': 39, 'Kenya': 15, 'Tajikistan': 54, \
@zephyrzilla
zephyrzilla / springer-free-maths-books.md
Created December 29, 2015 07:18 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of books available for free, here are the direct links