Skip to content

Instantly share code, notes, and snippets.

View ShayekhBinIslam's full-sized avatar

Shayekh Bin Islam ShayekhBinIslam

  • Dhaka, Bangladesh
View GitHub Profile
@mallamanis
mallamanis / repos.json
Last active December 30, 2022 20:01
MSR 2021 "Fast and Memory-Efficient Neural Code Completion" Dataset
[
"https://github.com/minimaxir/big-list-of-naughty-strings.git",
"https://github.com/shadowsocks/shadowsocks.git",
"https://github.com/littlecodersh/ItChat.git",
"https://github.com/google-research/bert.git",
"https://github.com/0voice/interview_internal_reference.git",
"https://github.com/keon/algorithms.git",
"https://github.com/satwikkansal/wtfpython.git",
"https://github.com/drduh/macOS-Security-and-Privacy-Guide.git",
"https://github.com/google/python-fire.git",
@jessvb
jessvb / .Teaching-Tech-to-Talk.md
Last active May 29, 2023 19:59
Appendix for "Teaching Tech to Talk: K-12 Conversational Artificial Intelligence Literacy Curriculum and Development Tools"

Teaching Tech to Talk: K-12 Conversational Artificial Intelligence Literacy Curriculum and Development Tools

This Gist contains additional information about the studies presented in "Teaching Tech to Talk: K-12 Conversational Artificial Intelligence Literacy Curriculum and Development Tools" at EAAI 2021 (focused on learning outcomes) and "'Alexa, Can I Program You?': Student Perceptions of Conversational Artificial Intelligence Before and After Programming Alexa" at IDC 2021 (focused on student perceptions of Alexa). There is also a video demo of the work.

Contents:

@thomwolf
thomwolf / loading_wikipedia.py
Last active January 18, 2024 14:04
Load full English Wikipedia dataset in HuggingFace nlp library
import os; import psutil; import timeit
from datasets import load_dataset
mem_before = psutil.Process(os.getpid()).memory_info().rss >> 20
wiki = load_dataset("wikipedia", "20200501.en", split='train')
mem_after = psutil.Process(os.getpid()).memory_info().rss >> 20
print(f"RAM memory used: {(mem_after - mem_before)} MB")
s = """batch_size = 1000
for i in range(0, len(wiki), batch_size):
@erogol
erogol / NLL_OHEM.py
Last active January 29, 2023 21:02
Online hard example mining PyTorch
import torch as th
class NLL_OHEM(th.nn.NLLLoss):
""" Online hard example mining.
Needs input from nn.LogSotmax() """
def __init__(self, ratio):
super(NLL_OHEM, self).__init__(None, True)
self.ratio = ratio