What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-11 11:44:01
basic chatbot code huggingface
from transformers import AutoModelForCausalLM, AutoTokenizer import torch tokenizer = AutoTokenizer.from_pretrained("microsoft/DialoGPT-large") model = AutoModelForCausalLM.from_pretrained("microsoft/DialoGPT-large") # Let's chat fo... Add solution -
Other 2021-09-11 05:47:02
android round double to 2 decimal
String.format("%.2f", d) Add solution -
Other 2021-09-10 22:34:02
get unadjusted stock data
from datetime import datetime import json from urllib.parse import urlencode from urllib.request import urlopen def gethistory(symbol, start=None, end=None): # Return 3 tuples (quotes, dividends and splits) with data from start # to end datetimes ... Add solution -
-
-
Python 2021-09-10 16:23:02
calculator python
#Store number variables for the two numbers num1 = input('Enter first number: ') num2 = input('Enter second number: ') #the sum of the two numbers variable sum = float(num1) + float(num2) sum2 = float(num1) - float(num2) sum3 = float(num1) * float(num2)... Add solution