Comments (1)
From https://gist.github.com/ines/04b47597eb9d011ade5e77a068389521
import difflib
import wasabi
def diff_strings(a, b):
output = []
matcher = difflib.SequenceMatcher(None, a, b)
for opcode, a0, a1, b0, b1 in matcher.get_opcodes():
if opcode == "equal":
output.append(a[a0:a1])
elif opcode == "insert":
output.append(color(b[b0:b1], fg=16, bg="green"))
elif opcode == "delete":
output.append(color(a[a0:a1], fg=16, bg="red"))
elif opcode == "replace":
output.append(color(b[b0:b1], fg=16, bg="green"))
output.append(color(a[a0:a1], fg=16, bg="red"))
return "".join(output)
print(diff_strings("helloo world", "hello world!"))
from freecad-nativeifc.
Related Issues (20)
- FreeCAD freeze when moving IFC object HOT 9
- Drag & Drop failed - no module named 'ifcopenshell.api.spatial.unassigned_container' HOT 7
- Get rid of the dummy 1x1x1 cube HOT 1
- Handle furniture
- Make boolean objects editable HOT 6
- Installed Addon not working on windows and Linux HOT 15
- Background process for Native IFC? HOT 4
- AttributeError: 'NoneType' object has no attribute 'addObject' HOT 3
- Error Message on opening an IFC Native HOT 5
- <class 'ValueError'>: too many values to unpack (expected 2) HOT 5
- Enhancement Request - move Dialog in Task Area, add Stats window and create a Native IFC feature HOT 6
- import ifcopenshell failed with error "signed with custom identity or adhoc?" on the macOS M1 HOT 1
- Add a Part or PartDesign object to a IFC HOT 5
- Support IFC4.3.2 for infrastructure? HOT 6
- [Issue] Lock an unlocked file with more then one IfcProject inside HOT 2
- [Issue] Document containing an IfcProject and FreeCAD objects HOT 3
- [Issue?] Weired "save-behavior" with new IFC-doc (strict IFC mode)
- aggregate() continues even though get_ifcfile() returns None HOT 2
- Addon is not working on version 0.21.1
- Unable to save IFC file HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freecad-nativeifc.