- conversationId: acfa33fb-d353-4ca0-8fb2-23867ea4514c
- endpoint: openAI
- title: Python Text Token Counting
- exportAt: 19:29:58 GMT-0400 (Eastern Daylight Time)
- endpoint: openAI
- presetId: null
- model: gpt-4
# This code can be executed in selenium via a javascript executor. It will change the source of an image that uses a blob to a data url instead | |
# You will need to supply the ID of the image tag, or change to code to look it up some other way. | |
# This line needs changed / passed in | |
var image = document.getElementById(YOUR_IMAGE_ID); | |
var blobUrl = image.src; | |
var xhr = new XMLHttpRequest; | |
xhr.responseType = 'blob'; |
3 Ajani's Pridemate (M19) 5 | |
10 Plains (M19) 261 | |
1 Isolated Chapel (DAR) 241 | |
2 Legion Lieutenant (RIX) 163 | |
10 Swamp (M19) 269 | |
2 Skymarch Bloodletter (XLN) 124 | |
2 Inspiring Cleric (XLN) 16 | |
3 Call to the Feast (XLN) 219 | |
2 Epicure of Blood (M19) 95 | |
1 Herald of Faith (M19) 13 |
4 Ghitu Lavarunner (DAR) 127 | |
4 Wizard's Lightning (DAR) 152 | |
4 Fanatical Firebrand (RIX) 101 | |
3 Lightning Strike (XLN) 149 | |
21 Mountain (RIX) 195 | |
4 Shock (M19) 156 | |
4 Viashino Pyromancer (M19) 166 | |
3 Goblin Chainwhirler (DAR) 129 | |
1 Risk Factor (GRN) 113 | |
4 Skewer the Critics (RNA) 115 |
1 Conclave Guildmage (GRN) 162 | |
4 Sunpetal Grove (XLN) 257 | |
2 Leonin Warleader (M19) 23 | |
2 Divine Visitation (GRN) 10 | |
11 Plains (RIX) 192 | |
8 Forest (RIX) 196 | |
3 Ajani's Welcome (M19) 6 | |
4 Impassioned Orator (RNA) 12 | |
3 Ixalan's Binding (XLN) 17 | |
2 Healer's Hawk (GRN) 14 |
1 Conclave Guildmage (GRN) 162 | |
4 Sunpetal Grove (XLN) 257 | |
2 Leonin Warleader (M19) 23 | |
2 Divine Visitation (GRN) 10 | |
11 Plains (RIX) 192 | |
8 Forest (RIX) 196 | |
2 Talons of Wildwood (M19) 202 | |
3 Ajani's Welcome (M19) 6 | |
2 Impassioned Orator (RNA) 12 | |
3 Ixalan's Binding (XLN) 17 |
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require 'json' | |
require 'yaml' | |
require 'pry' | |
def remove_backgrounds(features) | |
features.each do |feature| | |
scenarios = feature['elements'] |
<?xml version="1.0" encoding="UTF-8"?> | |
<XCUIElementTypeApplication type="XCUIElementTypeApplication" name="Marketing" label="Marketing" enabled="true" visible="true" x="0" y="0" width="768" height="1024"> | |
<XCUIElementTypeWindow type="XCUIElementTypeWindow" enabled="true" visible="true" x="0" y="0" width="768" height="1024"> | |
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="768" height="1024"> | |
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="768" height="1024"> | |
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="768" height="1024"> | |
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="768" height="64"/> | |
<XCUIElementTypeOther type="XCUIElementTypeOther" enabled="true" visible="false" x="0" y="0" width="320" height="1024"> | |
<XCUIElementTypeNavigationBar type="XCUIElement |
# frozen_string_literal: true | |
require 'cpt_hook' | |
require 'page-object/accessors' | |
# Rubocop has problems with metaprogramming. | |
module PageObject | |
module Platforms | |
module Watir | |
# |
# Monkey patching PageObject to add to the DSL like this works | |
module PageObject | |
module Accessors | |
def text_field_hooked(name, identifier={:index => 0}, &block) | |
standard_methods(name, identifier, 'text_field_for', &block) | |
define_method(name) do | |
self.send("#{name}_element").value | |
end | |
define_method("#{name}=") do |value| | |
self.send("#{name}_element").value = value |