This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> | |
<xs:element name="Building"> | |
<xs:complexType> | |
<xs:sequence> | |
<xs:element name="Name" type="xs:string"/> | |
<xs:element name="Address" type="xs:string"/> | |
<xs:element name="FloorCount" type="xs:positiveInteger"/> | |
</xs:sequence> | |
</xs:complexType> | |
</xs:element> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pip install pyrevit | |
import clr | |
clr.AddReference('RevitAPI') | |
import Autodeskfrom Autodesk.Revit.DB | |
import *import pyrevitfrom pyrevit | |
import revit | |
revit.doc = __revit__.ActiveUIDocument.Document |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dotbimpy as bim | |
# Create a new BIM modelmodel = bim.BIMModel() | |
# Add elements to the modelwall = bim.Wall() | |
wall.name = "Wall 1"wall.length = 5000wall.height = 3000# Add the wall to the modelmodel.add_element(wall) | |
# Save the model as a .bim filemodel.save("output.bim") | |
print("Model file generated successfully!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Import necessary libraries | |
# pip install dynamo-python | |
import dynamo | |
session = dynamo.Session() | |
# Define the number of employees and desired area per employee for each space | |
num_employees = { | |
'desks': 50, | |
'kitchen': 20, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Import necessary libraries | |
# Define the number of employees and desired area per employee for each space | |
num_employees = { | |
'desks': 50, | |
'kitchen': 20, | |
'bathrooms': 35, | |
'phone_booths': 10, | |
'mothers_room': 5, | |
'reception': 15, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import http.client | |
import json | |
conn = http.client.HTTPSConnection("api.gateway.attomdata.com") | |
headers = { | |
'accept': "application/json", | |
'apikey': "xxx", | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
class Characters(): | |
def __init__(self, weight, player, winphrase, losephrase): | |
self.weight = weight | |
self.player = player | |
self.winphrase = winphrase | |
self.losephrase = losephrase | |
def __str__(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$appkey = 'x3LTwBxAzd21ZTjtLeBI3C0JM'; | |
$url='https://data.cityofnewyork.us/api/id/hzhn-3cmt.json?$limit=5000&$$app_token=$appkey'; | |
$url = "https://data.cityofnewyork.us/api/id/hzhn-3cmt.json"; | |
// Initialize a CURL session. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Procore_API{ | |
private $client_id; | |
private $client_secret; | |
public function __construct() { | |
$general_settings = (array) get_option( 'procore_api_settings' ); | |
$this->client_id = $general_settings["client_id"]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
echo ':: Installing repo key' | |
wget http://repo.ajenti.org/debian/key -O- | apt-key add - | |
echo ':: Adding repo entry' |