Replace all instances of
begin
statement
end until conditionwith
| # Sample usage | |
| MRuby::CrossBuild.new('emscripten') do |conf| | |
| toolchain :emscripten | |
| # conf.gem :github => 'mattn/mruby-onig-regexp' | |
| # conf.gem :github => 'take-cheeze/mruby-marshal' | |
| conf.gembox 'default' | |
| conf.cc do |cc| | |
| cc.flags = [ENV['CFLAGS'] || %w()] | |
| cc.compile_options = "%{flags} -O3 -MMD -o %{outfile} -c %{infile} -I$HOME/dev/onig/src" |
| From e36e2760f2c168c179a35cc8bf7a4103ce523f61 Mon Sep 17 00:00:00 2001 | |
| From: Rob Lyman <[email protected]> | |
| Date: Sat, 20 Jan 2018 13:52:04 -0600 | |
| Subject: [PATCH 1/2] Updated support for integer division behavior | |
| This adds an adapted fix to give conditional integer division support, | |
| based on the environment variable MRB_INTEGER_DIVISION. This adapts from | |
| the previous fix to the latest stable mRuby branch, taking into | |
| account their new MRB_WITHOUT_FLOAT environment variable. |
| present | thrid_person | continuous | past | |
|---|---|---|---|---|
| abandon | abandons | abandoning | abandoned | |
| abase | abases | abasing | abased | |
| abate | abates | abating | abated | |
| abbreviate | abbreviates | abbreviating | abbreviated | |
| abdicate | abdicates | abdicating | abdicated | |
| abduct | abducts | abducting | abducted | |
| abet | abets | abetting | abetted | |
| abhor | abhors | abhorring | abhorred | |
| abide | abode | abided | abides |
| import xml.etree.ElementTree as ET | |
| tree = ET.parse('xmlsdev.xml') | |
| root = tree.getroot() | |
| with open('corrected', 'w', encoding='utf-8') as file: | |
| i = 0 | |
| for sentence in root.iter('sentence'): | |
| for child in sentence.findall('del'): | |
| tail = child.tail | |
| child.clear() |
| # NOTE: Currently this prints the diff for the second data element and exits | |
| import nltk | |
| import xml.etree.ElementTree as ET | |
| import copy | |
| import difflib | |
| tree = ET.parse('xmlsdev.xml') | |
| root = tree.getroot() |
| import nltk | |
| import xml.etree.ElementTree as ET | |
| import copy | |
| import difflib | |
| tree = ET.parse('xmlsdev.xml') | |
| root = tree.getroot() | |
| def xml_stringify(node): | |
| return "".join(node.itertext()) |
| #!/bin/bash | |
| if [[ -n $1 ]] | |
| then | |
| UNAME=$1 | |
| else | |
| read -p 'Username: ' UNAME | |
| [[ -z $UNAME ]] && exit 1 | |
| fi |
| from os import listdir | |
| from os.path import isfile, join | |
| from PIL import Image | |
| mypath = '.' | |
| onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f)) and '.jpg' in f] | |
| MAX_DIM = 800 | |
| for path in onlyfiles: |