Skip to content

Instantly share code, notes, and snippets.

Avatar
💬
Promote Open Source AEC To Next Level

Chuong Ho chuongmep

💬
Promote Open Source AEC To Next Level
View GitHub Profile
View PipeAngleAxis.dyn
{
"Uuid": "f5aaaa57-5af0-4afc-8e7d-f31488266d8e",
"IsCustomNode": false,
"Description": "",
"Name": "PipeAngleAxis",
"ElementResolver": {
"ResolutionMap": {}
},
"Inputs": [],
"Outputs": [],
View VectorAngleAxisChangedVector2.dyn
{
"Uuid": "566461d1-cf9f-46bf-ad39-972c2548937d",
"IsCustomNode": false,
"Description": "",
"Name": "VectorAngleAxisChangedVector2",
"ElementResolver": {
"ResolutionMap": {
"Math": {
"Key": "DSCore.Math",
"Value": "DSCoreNodes.dll"
View VectorAngleAxis.dyn
{
"Uuid": "ae6cce42-a991-401d-8914-6b4734887fe2",
"IsCustomNode": false,
"Description": "",
"Name": "VectorAngleAxis",
"ElementResolver": {
"ResolutionMap": {
"Math": {
"Key": "DSCore.Math",
"Value": "DSCoreNodes.dll"
View BruteforceAssignment.cs
using System;
void Main()
{
// define the cost matrix
int[,] costMatrix = {{17, 10, 21},
{15, 12, 19},
{13, 10, 17}};
int numRows = costMatrix.GetLength(0);
int numCols = costMatrix.GetLength(1);
View BruteForceMethod.cs
void Main()
{
// Example cost matrix
int[,] matrix = {{7, 0, 8},
{15, 2, 7},
{5, 3, 5}};
int n = matrix.GetLength(0);
int[] permutation = new int[n];
for (int i = 0; i < n; i++)
View comparetwopoint.cs
void Main()
{
double x1 = 10;
double y1 = 10;
double z1 = 10;
double x2 = 10;
double y2 = 10;
double z2 = 10;
var point1 = new ComparePoint(x1,y1,z1);
View sortbystringnum.py
A = ["element1","Alement 5", "Clement3", "Blement 4", "element 2"]
# regex sort string by alphabet last number increase
A = sorted(A, key=lambda x: (re.findall(r'\D+', x)[-1], int(re.findall(r'\d+', x)[-1])))
OUT = A
View getnavisuser.cs
Autodesk.Internal.InfoCenter.InfoToolbar autodeskInformaton =ComponentManager.InfoCenterToolBar;
for(int i = 0; i < autodeskInformaton.Items.Count; i++)
{
if(autodeskInformaton.Items[i] is Autodesk.Internal.InfoCenter.WebServicesLoginButton)
{
string autodeskID = ((autodeskInformaton.Items[i] as Autodesk.Internal.InfoCenter.WebServicesLoginButton)!).Text;
Trace.WriteLine(autodeskID);
}
}
View Tensorflow_macm1.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View fixdetach.cs
string pattern = @"_detached.*";
string replacement = "";
Regex rgx = new Regex(pattern);
fileName = rgx.Replace(fileName, replacement);
if (fileName.EndsWith(".rvt")) fileName = fileName.Replace(".rvt", String.Empty);
Source_File_Rvt = filename;