PrismML představilo Ternary Bonsai 2.5 27B, kompaktní jazykový model zaměřený na programování a práci s nástroji. V podstatě se jedná o extrémně komprimovanou variantu open-weight modelu Qwen3.8 27B do ternární kvantizace (1,76 bitu na váhu), takže zabírá přibližně pouze 5,9 GB. Váhy jsou dostupné na Hugging face pod licencí Apache 2.0.
Na Slovensku vyvolala politický rozruch influencerka Lívie Pavlíková, která na svých sítích zveřejnila video ze hry Grand Theft Auto VI, v němž její postava střílí na duhovou vlajku. Poslanci Progresivného Slovenska na ni v reakci podali trestní oznámení s odvoláním se na hypotetické riziko eskalace nenávisti vůči sexuálním menšinám. Hnutí Republika ji naopak jmenovalo předsedkyní své nově vzniklé mládežnické organizace Mladá
… více »Zdravím, nejde mi rozchodit v Python 2.7.* a GTK+ (gi.repository) DnD mezi dvěma iconview, netuší někdo, kde by mohl být problém?
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from gi.repository import Gtk, Gdk
from gi.repository.GdkPixbuf import Pixbuf
(TARGET_ENTRY_TEXT, TARGET_ENTRY_PIXBUF) = range(2)
(COLUMN_TEXT, COLUMN_PIXBUF) = range(2)
DRAG_ACTION = Gdk.DragAction.COPY
icons = ["gtk-cut", "gtk-paste", "gtk-copy"]
win = Gtk.Window()
content = Gtk.VBox()
#source view
liststore = Gtk.ListStore(Pixbuf, str)
sourceview = Gtk.IconView.new()
sourceview.set_model(liststore)
sourceview.set_pixbuf_column(0)
sourceview.set_text_column(1)
sourceview.enable_model_drag_source(Gdk.ModifierType.BUTTON1_MASK, [],
DRAG_ACTION)
def on_drag_data_get( widget, drag_context, data, info, time):
selected_path = self.get_selected_items()[0]
selected_iter = self.get_model().get_iter(selected_path)
print widget.get_model().get_iter(selected_iter, 1)
sourceview.connect("drag-data-get", on_drag_data_get)
for icon in icons:
pixbuf = Gtk.IconTheme.get_default().load_icon(icon, 64, 0)
liststore.append([pixbuf, "Label"])
content.add(sourceview)
#target view
targetstore = Gtk.ListStore(Pixbuf, str)
targetstore.append([Gtk.IconTheme.get_default().load_icon("gtk-save", 64,0), "X"])
targetview = Gtk.IconView.new()
targetview.set_model(targetstore)
targetview.set_pixbuf_column(0)
targetview.set_text_column(1)
targetview.drag_dest_set(Gtk.DestDefaults.ALL, [], DRAG_ACTION)
def on_drag_data_received(self, widget, drag_context, x,y, data,info, time):
text = data.get_text()
print("Received text: %s" % text)
targetview.connect("drag-data-received", on_drag_data_received)
content.add(targetview)
win.add(content)
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from gi.repository import Gtk, Gdk
from gi.repository.GdkPixbuf import Pixbuf
(TARGET_ENTRY_TEXT, TARGET_ENTRY_PIXBUF) = range(2)
(COLUMN_TEXT, COLUMN_PIXBUF) = range(2)
DRAG_ACTION = Gdk.DragAction.COPY
icons = ["gtk-cut", "gtk-paste", "gtk-copy"]
win = Gtk.Window()
content = Gtk.VBox()
#source view
liststore = Gtk.ListStore(Pixbuf, str)
sourceview = Gtk.IconView.new()
sourceview.set_model(liststore)
sourceview.set_pixbuf_column(0)
sourceview.set_text_column(1)
sourceview.enable_model_drag_source(Gdk.ModifierType.BUTTON1_MASK, [],
DRAG_ACTION)
def on_drag_data_get( widget, drag_context, data, info, time):
selected_path = self.get_selected_items()[0]
selected_iter = self.get_model().get_iter(selected_path)
print widget.get_model().get_iter(selected_iter, 1)
sourceview.connect("drag-data-get", on_drag_data_get)
for icon in icons:
pixbuf = Gtk.IconTheme.get_default().load_icon(icon, 64, 0)
liststore.append([pixbuf, "Label"])
content.add(sourceview)
#target view
targetstore = Gtk.ListStore(Pixbuf, str)
targetstore.append([Gtk.IconTheme.get_default().load_icon("gtk-save", 64,0), "X"])
targetview = Gtk.IconView.new()
targetview.set_model(targetstore)
targetview.set_pixbuf_column(0)
targetview.set_text_column(1)
targetview.drag_dest_set(Gtk.DestDefaults.ALL, [], DRAG_ACTION)
def on_drag_data_received(self, widget, drag_context, x,y, data,info, time):
text = data.get_text()
print("Received text: %s" % text)
targetview.connect("drag-data-received", on_drag_data_received)
content.add(targetview)
win.add(content)
win.connect("delete-event", Gtk.main_quit)
win.show_all()
Gtk.main()
Tiskni
Sdílej: