Skip to content

Instantly share code, notes, and snippets.

Ali Asad imAliAsad

Block or report user

Report or block imAliAsad

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@imAliAsad
imAliAsad / command.py
Last active Nov 22, 2018
Important commands for machine learning
View command.py
p5 generate -b projectName
Use ServerName = (LocalDb)\MSSQLLocalDB
@imAliAsad
imAliAsad / tensorflowConfig.py
Created Nov 20, 2018
Tensorflow configuration
View tensorflowConfig.py
import tensorflow as tf
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'
@imAliAsad
imAliAsad / SelectionSquare.cs
Created Nov 6, 2018
Create a rectangle selection behavior in unity like in strategy games
View SelectionSquare.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
namespace Tutorial
{
public class SelectionSquare : MonoBehaviour
{
public Camera Camera;
[SerializeField]
@imAliAsad
imAliAsad / GamepadFlycam.cs
Last active Nov 6, 2018
Use gamepad controller to fly free camera in gameview. This is the improved and customized script of Unity's ExtendedFlycam script
View GamepadFlycam.cs
using System;
using UnityEngine;
using System.Collections;
public class GamepadFlycam : MonoBehaviour
{
public float cameraSensitivity = 90;
@imAliAsad
imAliAsad / GamepadFlycam.cs
Created Nov 1, 2018
Use gamepad controller to fly free camera in gameview. This is the improved and customized script of Unity's ExtendedFlycam script
View GamepadFlycam.cs
using System;
using UnityEngine;
using System.Collections;
public class GamepadFlycam : MonoBehaviour
{
public float cameraSensitivity = 90;
@imAliAsad
imAliAsad / ElementsInView.cs
Last active Jun 3, 2018
Get all elements in active view - Revit api C#
View ElementsInView.cs
FilteredElementCollector allElementsInView = new FilteredElementCollector(document, document.ActiveView.Id);
IList elementsInView = (IList)allElementsInView.ToElements();
@imAliAsad
imAliAsad / Configuration.cs
Created Apr 1, 2018
Window service that will copy all updated files from a network drive and paste it into a local drive
View Configuration.cs
public static class Configuration
{
public static readonly string ArchcorpAddinFolderPath = @"O:\IT\4th Door\Ali Asad\Projects\Revit Addins\Test Archcorp Addins\";
public static readonly string AutodeskRevitAddinFolderPath = $"C:\\Users\\{Environment.UserName}\\AppData\\Roaming\\Autodesk\\Revit\\Addins\\";
public static readonly List<string> AutodeskVersion = new List<string> { @"2015\", @"2017\", @"2018\", @"2019\" };
public static readonly string DeleteAddinNamePrefix = "delete_";
}
@imAliAsad
imAliAsad / Win32Api.cs
Created Mar 25, 2018 — forked from teocomi/Win32Api.cs
Run Revit commands using Win32 API
View Win32Api.cs
/// <summary>
/// Run Revit commands using Win32 API
/// </summary>
public class Win32Api
{
[DllImport("user32.dll")]
private static extern IntPtr GetForegroundWindow();
[DllImport("user32.dll")]
static extern bool SetFocus(IntPtr hWnd);
@imAliAsad
imAliAsad / App.cs
Created Feb 21, 2018
Create a button in a custom ribbon in Revit and add the functionality to enable/disable the revit addin button
View App.cs
class App : IExternalApplication
{
public static PushButton Pushbutton { get; set; }
public Result OnStartup(UIControlledApplication application)
{
OnButtonCreate(application);
return Result.Succeeded;
}
@imAliAsad
imAliAsad / FParameterData.cs
Last active Mar 4, 2018
Read and export all parameter data of a family
View FParameterData.cs
public class FParameterData
{
public string Family { get; set; }
public string BuiltinParameter { get; set; }
public string ParameterType { get; set; }
public string ParameterName { get; set; }
public string ParameterValue { get; set; }
public string ParameterGroup { get; set; }
public string BuiltinGroup { get; set; }
You can’t perform that action at this time.