Skip to content

Instantly share code, notes, and snippets.

View msoftware's full-sized avatar

Michael jentsch msoftware

View GitHub Profile
#
# Copyright 2024 by Michael Jentsch
#
# https://www.jentsch.io/vorteile-der-batch-textgenerierung-gegenuber-der-sequenziellen-generierung-mehrerer-texte/
#
import torch
import time
from transformers import AutoTokenizer, AutoModelForCausalLM, StoppingCriteria, BitsAndBytesConfig
#
# Copyright 2024 by Michael Jentsch
#
# https://www.jentsch.io/vorteile-der-batch-textgenerierung-gegenuber-der-sequenziellen-generierung-mehrerer-texte/
#
import torch
import time
from transformers import AutoTokenizer, AutoModelForCausalLM, StoppingCriteria, BitsAndBytesConfig
@msoftware
msoftware / torch_memory_usage.ipynb
Created March 17, 2024 11:29
torch_memory_usage.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
$fn=50;
d1=2.8;
d2=4;
tol=0.1;
difference () {
union () {
translate ([0,0,(d1+d2)/2]) cube([50,13,d1+d2],center=true);
@msoftware
msoftware / androidx-class-mapping.csv
Created November 14, 2019 13:20 — forked from alexjlockwood/androidx-class-mapping.csv
Android X migration script
android.support.v7.widget.util.SortedListAdapterCallback androidx.recyclerview.widget.SortedListAdapterCallback
android.support.v7.widget.helper.ItemTouchUIUtilImpl androidx.recyclerview.widget.ItemTouchUIUtilImpl
android.support.v7.widget.helper.ItemTouchUIUtil androidx.recyclerview.widget.ItemTouchUIUtil
android.support.v7.widget.helper.ItemTouchHelper androidx.recyclerview.widget.ItemTouchHelper
android.support.v7.widget.WithHint androidx.appcompat.widget.WithHint
android.support.v7.widget.ViewUtils androidx.appcompat.widget.ViewUtils
android.support.v7.widget.ViewStubCompat androidx.appcompat.widget.ViewStubCompat
android.support.v7.widget.ViewInfoStore androidx.recyclerview.widget.ViewInfoStore
android.support.v7.widget.ViewBoundsCheck androidx.recyclerview.widget.ViewBoundsCheck
android.support.v7.widget.VectorEnabledTintResources androidx.appcompat.widget.VectorEnabledTintResources
04bf84b1951e2125bf066488a32fa91fb207472e521a2cabe987e4d9b0c85051f5660169e9d75bb9a8927efa1ce0cf131607f83249799b6066a16b459154e38492
@msoftware
msoftware / PressReleaseBoilerplate.md
Created August 30, 2017 07:26 — forked from ttscoff/PressReleaseBoilerplate.md
Simplistic press release boilerplate for apps
FOR IMMEDIATE RELEASE

## AppName vX.X does something interesting

AppName vX.X is on the App Store now, and features the following very interesting feature. This is a summary, so I'm focusing on the lead. Just something to make me want to read the rest. Done.

City, State/Country - [Company/Developer] has released AppName vX.X, available in the Mac App Store. AppName is/does [broad, general strokes]. [A few more specific points about who it's for and why it's of benefit to them].

New features!
@msoftware
msoftware / LineThroughTextView.java
Last active August 29, 2015 14:27 — forked from TheReprator/LineThroughTextView.java
A simple line through text view. ie. ----------------- Hello, World --------------
package views;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Build;
import android.text.TextUtils;
import android.content.Context;
import android.text.Editable;
import android.text.Spannable;
import android.text.TextWatcher;
import android.text.style.RelativeSizeSpan;
import android.util.AttributeSet;
import android.widget.EditText;
public class TitledEditText extends EditText implements TextWatcher{
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- RED -->
<color name="red_50">#FFEBEE</color>
<color name="red_100">#FFCDD2</color>
<color name="red_200">#EF9A9A</color>
<color name="red_300">#E57373</color>
<color name="red_400">#EF5350</color>
<color name="red_500">#F44336</color>