Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
#!perl -w | |
=head1 NAME | |
pl2py.pl | |
=head1 DESCRIPTION | |
Attempts to convert perl scripts to python with the awesome power of regular expressions. |
import torch | |
def projected_gradient_descent(model, x, y, loss_fn, num_steps, step_size, step_norm, eps, eps_norm, | |
clamp=(0,1), y_target=None): | |
"""Performs the projected gradient descent attack on a batch of images.""" | |
x_adv = x.clone().detach().requires_grad_(True).to(x.device) | |
targeted = y_target is not None | |
num_channels = x.shape[1] | |
for i in range(num_steps): |
from transformers import AutoTokenizer, T5ForConditionalGeneration | |
# Model Init | |
n_gpu = 8 | |
tokenizer = AutoTokenizer.from_pretrained("google/flan-ul2") | |
model = T5ForConditionalGeneration.from_pretrained("google/flan-ul2") | |
heads_per_gpu = len(model.encoder.block) // n_gpu | |
device_map = { | |
gpu: list( | |
range( |
<body onload="brython()"> | |
<h1>Get a joke</h1> | |
<button id="joke-btn">Get Joke</button> | |
<div id="joke" class="card">Click the "get joke" button</div> | |
<!-- Ajax call --> | |
<script type="text/python" id="script3"> | |
from browser import document, ajax |