text...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python2 | |
| r""" | |
| Use via ``pandoc --filter pandoc_filter_math2doublebackslashmath.py`` | |
| to convert math (in any syntax pandoc will recognize) | |
| to \\(..\\) and \\[...\\] syntaxes (``tex_math_double_backslash`` extension). | |
| """ | |
| from pandocfilters import toJSONFilter, Math, RawInline, RawBlock | |
| import sys, json |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>> import yaml # need to install PyYAML | |
| >>> dict_1 = {'a': 0, '1': {1: {'abc': [1, 2, 3, 4, 5, 6], 'efg': [7, 8, 9, 10, 100]}, | |
| 2: {'1': {1: 'abc', 2: 'efg'}, '2': {3: 'abc'}}}, '2': [1, 2, 3, 4, 5, 6]} | |
| >>> print(yaml.safe_dump(dict_1, default_flow_style=False)) | |
| '1': | |
| 1: | |
| abc: | |
| - 1 | |
| - 2 |
haroopad-v0.13.0-x64.deb on lubuntu 14.10. Same problem both in editor preview and Export -> HTML file.
\sqrt{3x-1}+(1+x)^2at the end is rendered as display math. (Same when I tried single dollars with corresponding Preferences option.)- the text that follows it in the paragragh disappeared.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| fr = null; | |
| try { | |
| FileReader fr = new FileReader(file); | |
| try { | |
| BufferedReader br = new BufferedReader(fr); | |
| String line = null; | |
| } finally { | |
| // [I'm not sure swallowing errors here is good but that's an unrelated question -- Beni] | |
| try { | |
| fr.close(); |
Tried to test mail.html, as sent to myself via https://putsmail.com/tests/f742cb78-6229-450f-bfa7-494c2349e859. Copy-pasted into Mailchimp (which give interface to Litmus testing for $3/test). Alas, it seems the Mailchimp editor sanitized(?) it into actual-test.html, stripping out the MathML :-( Results below make more sense now...
Full results at https://rawgit.com/cben/51056286578d837cba46/raw/results.html (16MB of images!)
- MathML didn't render anywhere. Not thunderbird, not Apple Mail / iOS.
I'll have to read www.maths-informatique-jeux.com/blog/frederic/?post/2012/11/14/Writing-mathematics-in-emails again and try to make it work.
[since the source blog doesn't support comments and the margins of a tweet are too narrow]
Hmm, interesting distinction. But I don't see why your way is better than having the CI build the image.
- It is more flexible in allowing me to build the image any ad-hoc way I want, e.g. modify files inside the container and take a snapshot.
But my primary Dev instinct is that I don't want this. The last thing I want in prod is an image I don't have sources for. I'm not thinking in terms "test this image before deploying" but in terms of "test this source code". Which means build an image from Dockerfile in a clean env, test this "clean" image (and yes, push this same image to prod).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python3 | |
| # Caution: this will convert everywhere, including inside <script>...</script> or CDATA sections. | |
| import re, os | |
| def numeric_entities_to_utf8(fname): | |
| s = open(fname, encoding='utf8', newline='').read() | |
| s = re.sub(r'&#([0-9]+);', lambda m: chr(int(m.group(1))), s) | |
| with open(fname, 'w', encoding='utf8', newline='') as f: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| print("Hello, world!") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| class memoize(dict): | |
| def __init__(self, func): | |
| self.func = func | |
| dict.__init__(self) | |
| def __call__(self, *args): | |
| return self[args] | |
| def __missing__(self, key): |
OlderNewer