Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View chuongmep's full-sized avatar
👋
Loading...

Chuong Ho chuongmep

👋
Loading...
View GitHub Profile
void Main()
{
int[][] adj = new int[][] {
new int[] {0, 10, 15, 10, 20},
new int[] {10, 0, 35, 20, 25},
new int[] {15, 35, 0, 30, 10},
new int[] {50, 60, 30, 0, 10},
new int[] {20, 25, 10, 10, 0}
};
using System;
using System.Collections.Generic;
using ParquetSharp;
void Main()
{
SaveToParquet();
}
public static void SaveToParquet()
{
var objectIds = new Entity[3];
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{
"Type": "AutodeskCommonCamera",
"Version": 1,
"UnitsToMetersScaleFactor": 0.30480000000000002,
"WorldUpDirection": [
0,
0,
1
],
"WorldFrontDirection": [
public string RemoveSpecialCharacters( string str)
{
StringBuilder sb = new StringBuilder();
foreach (char c in str)
{
if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') ||
(c >= 'a' && c <= 'z') || c == '_' || c == '-' || c == '.' || c==' ')
{
sb.Append(c);
}
import clr
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
import time
import pyautogui
# define the duration of the automation (in seconds)
duration = 6 * 60 * 60 # 3 hours
# define the interval between clicks (in seconds)
interval = 6
# calculate the number of clicks required
num_clicks = duration // interval
string assPath = Assembly.GetExecutingAssembly().Location;
string? dirPath = Path.GetDirectoryName(Path.GetFullPath(assPath)) ?? null;
AppDomain.CurrentDomain.AssemblyResolve += (sender, args) =>
{
var assemblyName = new AssemblyName(args.Name);
if (!string.IsNullOrEmpty(dirPath))
{
var assemblyPath = Path.Combine(dirPath, assemblyName.Name + ".dll");
if (File.Exists(assemblyPath) == false) return null;
var assembly = Assembly.LoadFrom(assemblyPath);
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.