Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Mostafa El Ayoubi MostafaElAyoubi

🎯
Focusing
  • Data Shapes | Orkestra
  • Paris
  • Twitter @data_shapes
View GitHub Profile
View ModificationTracker - parametersnapshot
#Copyright (c) mostafa el ayoubi , 2016
#Data-Shapes www.data-shapes.net , elayoubi.mostafa@gmail.com
#This code was inspired by Jeremy Tammik @Jeremytammik
def parametersnapshot(x):
parameters = x.Parameters
paramnames = [p.Definition.Name for p in parameters]
#Sorting is important because the parameters are queried in random order.
#We need to make sure the snapshots are ordered in the same way so we can compare them.
sortedindex = sorted(range(len(paramnames)), key = lambda k : paramnames[k])
View ModificationTracker - getvertices
#Copyright (c) mostafa el ayoubi , 2016
#Data-Shapes www.data-shapes.net , elayoubi.mostafa@gmail.com
#This code was inspired by Jeremy Tammik @Jeremytammik
def flatten(container):
for i in container:
if isinstance(i, (list,tuple)):
for j in flatten(i):
yield j
else:
@MostafaElAyoubi
MostafaElAyoubi / UI.MultipleInputForm++
Last active Jan 31, 2017
code for customizable form creation with dynamo, Data-Shapes package
View UI.MultipleInputForm++
#Copyright (c) mostafa el ayoubi , 2016
#Data-Shapes www.data-shapes.net , elayoubi.mostafa@gmail.com
import clr
try:
clr.AddReference('System.Windows.Forms')
clr.AddReference('System.Drawing')
from System.Drawing import Point , Size , Graphics, Bitmap, Image, Font, FontStyle, Icon, Color
from System.Windows.Forms import Application, Button, Form, Label, ColumnHeader, TextBox, CheckBox, FolderBrowserDialog, OpenFileDialog, DialogResult, ComboBox, FormBorderStyle, ListView, ListViewItem , SortOrder, Panel, ImageLayout, GroupBox
@MostafaElAyoubi
MostafaElAyoubi / UI.MultipleInputForm Updated
Last active Jan 4, 2017
UI.MultipleInputForm Updated
View UI.MultipleInputForm Updated
#Copyright (c) mostafa el ayoubi , 2016
#Data-Shapes www.data-shapes.net , elayoubi.mostafa@gmail.com
import clr
clr.AddReference('System.Windows.Forms')
clr.AddReference('System.Drawing')
from System.Drawing import Point
from System.Windows.Forms import Application, Button, Form, Label, TextBox, CheckBox, FolderBrowserDialog, OpenFileDialog, DialogResult, ComboBox, FormBorderStyle
from System.Collections.Generic import *
View UI.MultipleInputForm
#Copyright (c) mostafa el ayoubi , 2016
#Data-Shapes www.data-shapes.net , elayoubi.mostafa@gmail.com
import clr
clr.AddReference('System.Windows.Forms')
clr.AddReference('System.Drawing')
from System.Drawing import Point
from System.Windows.Forms import Application, Button, Form, Label, TextBox, CheckBox, FolderBrowserDialog, OpenFileDialog, DialogResult
class MultiTextBoxForm(Form):
View Bounce on link category
View Bounce on link