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
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 |
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
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): |
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:
- Appendix A contains code snippets from the "cookbook" conversational AI skill developed in MIT App Inventor.
- [Appendix B](https://gist.github.com/jessvb/1cd959e32415a6ad4389761c49b54bbf#appendix-b-workshop-curriculum---activities-and-p
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
[ | |
"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", |