matplotlib scatter plot with different text at each data point

I am trying to make a scatter plot and annotate data points with different numbers from a for example I want to plot y vs x and annotate with corresponding numbers from n.y = [2.56422, 3.77284, 3.52623, 3.51468, 3.02199]z = [0.15, 0.3, 0.45, 0.6, 0.75]n = [58, 651, 393, 203, 123]ax = fig.add_subplot(111)ax1.scatter(z, y, fmt='o')Any ideas?...Read more

sap - "Long" read only text on selection screen

I need to display some information for the user on my selection screen.Best way would be directly on the screen, so no pop-ups. I tried to use parameters with default value and read only but the length is limited.Is there a way to get an information text on the selection screen which is a bit longer?...Read more

text - emacs adding spaces to file

I'm loading a text file into emacs and it is displaying a vertical column of slashes as a big blob of slashes with different spacing for each line. It displays correctly in VIM and notepad++, but not in emacs. What could cause this to happen?emacs display error...Read more

text - Sequence prediction of characters?

I am new to machine learning, so please go easy in case the problem is trivial.I have been given a sequence of observed characters say, ABABBABBB..... (n characters). My goal is to predict the next characters by some "learning" mechanisms. My constraints are that the obeserved characters (training data?) is not too much i.e I have say a sequence of length 6000 to learn the underlying pattermI am quite confused about what strategy to take to solve this problem,my initial bets are:1) some kind of ngram model?2) Neural networks (the likes of LSTM)...Read more

compression - Compressing text using recursive N-Grams

I was just kicking around the idea of breaking up a large group of text into a single integer by using recursive 2-Gram storage until there is only one value left.table pair{ id first_parent_id (points to -> second_parent_id (points to ->}For example, in the following code I have a 11 word sentence (twelve with the period). I could store each word pair in a database ("this" + "is" = ID #1) and then store each set of two wordpairs in the database (1 + 2 = ID #7), and repeat until I get down to only one word set l...Read more

SVG viewBox affecting fill on text elements

I was trying to display some text filled with a pattern but can't find a way to avoid a strange behaviour with the mapping of my pattern.Here is a code sample of the problem :<svg xmlns="" xmlns:xlink="" version="1.1" viewBox="0 0 500 310"> <defs> <linearGradient id = "bgrad" x1 = "0%" y1 = "100%" x2 = "100%" y2 = "0%"> <stop stop-color = "purple" offset = "0%"/> <stop stop-color = "green" offset = "100%"/> </linearG...Read more

Input text reagent component value formatting

I'm trying to format the value of an input "text" reagent component without success. I expected that, after changing the value of the ratom variable, the value of the component will be formatted at re-render.I used cl-format to format number with space thousand separator. I works well at first load, but not after change the price value.Is it possible to format the price value of this example after saving the new value?(ns (:require [reagent.core :as r] [cljs.pprint :refer [cl-format]]))(defonce shoppinglist (r/atom (sor...Read more

How to make SAS import a text file exactly as input, even with ; , "

First of all, I beg your pardon for the lack of my technical english. I'll try to make my self clear with some images.I'm trying to import a text file "as is" to SAS. It looks like this:File sampleIn text:YPJC200,FG;00899;Pesos;0;3500;EDENOR S.A. "B" 1 VOTOTRAD15.9FF;00902;Pesos;0;3000;EDENOR S.A. "B" 1 VOTOIt's a text file delimited with semicolon ";" but in addition it has:Some names has dot "." in it (eg: TRAD15.9FF)Some names has comma "," in it (eg: YPJC200,FG)Column description has doble quotesOf course I'm getting errors or column displa...Read more

Allow text wrap in li menu

I have a menu that I have created with an unordered list. The menu cannot go over 900px wide, so I need my menu li text to sit on top of each other. Without shrinking the text size to 8px, is there a way to 'text-wrap' my menu item so it fits all nicely in the little box?@font-face { font-family: KBDunkTank; src:url(KBDunkTank.ttf)}ul { /* margin: 20px 60px;*/}ul li { display: inline-block; height: 70px; line-height: 70px; width: 130px; margin: 5px 0px 0 0; text-indent: 15px; position: relative;font-family: 'Arial R...Read more

unicode - Best way to convert text files between character sets?

What is the fastest, easiest tool or method to convert text files between character sets?Specifically, I need to convert from UTF-8 to ISO-8859-15 and vice versa.Everything goes: one-liners in your favorite scripting language, command-line tools or other utilities for OS, web sites, etc.Best solutions so far:On Linux/UNIX/OS X/cygwin:Gnu iconv suggested by Troels Arvin is best used as a filter. It seems to be universally available. Example:$ iconv -f UTF-8 -t ISO-8859-15 in.txt > out.txtAs pointed out by Ben, there is an online converter usi...Read more

Kivy text input and output

I am new to Python (ver. 3.6.1) and have just started using Kivy as my GUI. What I want to do is to create a command line in Kivy which lets the user type in a command, processes the command and then outputs what needs to be output in the same text "box". It should work exactly like a Windows commmand line, but it has to be a part of the Kivy interface. The closest I ever got to that was using the kivy.uixTextInput, however, I have no idea how to fetch the user input and then how to print to that text box the output. Please help, I am strugglin...Read more

dynamic - ImageMagick best fit text within rectangle?

I have an image like this, with a rectangle at specific coordinates:(for illustratory purposes I put the coordinates of the rectangle and its size and center in there)Now I want to render some text with ImageMagick, so that it fits exactly within the rectangle.If it's a very short (narrow) string, the rectangle's height will be the limiting factor:On the other hand with a long (wide) string, the rectangle's width will determine the size:In either case, independent of how short or long the text is, I would like to print it in one line (i.e. no w...Read more