The document provides instructions on setting up development environments for data analysis and visualization with Python and Node.js. It discusses installing essential packages like NumPy, SciPy, and Pandas for Python, and Express and Three.js for Node.js. It also provides examples of basic data analysis and visualization techniques using Matplotlib and Plotly in Python, and Three.js in a Node.js application.
이 책은 BIM 표준과 구현이란 제목으로 출판하려했던 내용 중 일부입니다. 2013 년에 시작했었는 데, 함께 하기로 한 분들이 너무 바쁜 상황이라, 거의 8 년 이상 묵혀둔 내용이 되어 버렸습니다.
지금은 미국에서 책을 정리할 시간적 여유도 약간 생겼고, 이 내용을 필요한 분들도 있을 듯하여 eBook으로 정리해 공유합니다. 일부 URL은 너무 오래되어, 최대한 확인해 갱신하였습니다. 이 책의 내용은 제가 예전에 관심을 두고 직접 연구 및 개발했던 부분입니다.
이 책은 BIM 개발과 관련된 아래 내용을 주로 다루고 있으니 참고하시길 바랍니다. 아직도 이 글에서 사용된 기술은 계속 유지관리되고 있으니 활용 가능하시리라 생각합니다.
개방형 BIM 모델에 대한 구조 해석
오픈소스 이용하는 방법
BIM 정보추출, 협업, 가시화 개발 절차 및 방법
BIM 지식 서비스 개발
이 책은 BIM 표준과 구현이란 제목으로 출판하려했던 내용 중 일부입니다. 2013 년에 시작했었는 데, 함께 하기로 한 분들이 너무 바쁜 상황이라, 거의 8 년 이상 묵혀둔 내용이 되어 버렸습니다.
지금은 미국에서 책을 정리할 시간적 여유도 약간 생겼고, 이 내용을 필요한 분들도 있을 듯하여 eBook으로 정리해 공유합니다. 일부 URL은 너무 오래되어, 최대한 확인해 갱신하였습니다. 이 책의 내용은 제가 예전에 관심을 두고 직접 연구 및 개발했던 부분입니다.
이 책은 BIM 개발과 관련된 아래 내용을 주로 다루고 있으니 참고하시길 바랍니다. 아직도 이 글에서 사용된 기술은 계속 유지관리되고 있으니 활용 가능하시리라 생각합니다.
개방형 BIM 모델에 대한 구조 해석
오픈소스 이용하는 방법
BIM 정보추출, 협업, 가시화 개발 절차 및 방법
BIM 지식 서비스 개발
Lecture 5 in the 2022 COMP 4010 lecture series. This lecture is about AR prototyping tools and techniques. The lecture was given by Mark Billinghurst from University of South Australia in 2022.
2019년 8월 7일 COEX에서 개최된 '새로운 위치기준 포럼 2019'에서 발표한 자료입니다.
요약: 본 발표에서는 CAD/BIM/GIS의 통합과 관련한 최근 동향을 살펴보고 실제 사례 중심으로 현장에서 겪은 경험들을 공유한다. CAD/BIM/GIS의 통합시도는 OGC, buildingSmart 같은 관련 국제 표준화기구, AutoDesk, ESRI, Bentley 등과 같은 산업계, 그리고 오픈소스 진영의 참여 속에 활발하게 진행되고 있다. CAD/BIM/GIS 통합은 태생적, 기술적, 문화적 차이로 인해 쉽지 않은 과정이다. 성공적인 CAD/BIM/GIS 통합을 위해서는 기술적 통합 자체보다는 통합을 통해 얻고자 하는 혜택과 가치에 집중해야 한다. 구체적 통합 방향으로 목적에 맞는 데이터 활용, 상호운용성을 위한 표준 준수, 데이터 생애주기에 대한 이해, 타 2D/3D/4D 데이터 및 시스템과의 융복합, 분석 및 시뮬레이션 구현 등을 제시한다.
Advanced Methods for User Evaluation in AR/VR StudiesMark Billinghurst
Guest lecture on advanced methods of user evaluation in AR/VR studies. Given by Mark Billinghurst as part of the ARIVE lecture series hosted at the University of Otago. The lecture was given on August 26th 2021.
Lecture 5 in the 2022 COMP 4010 lecture series. This lecture is about AR prototyping tools and techniques. The lecture was given by Mark Billinghurst from University of South Australia in 2022.
2019년 8월 7일 COEX에서 개최된 '새로운 위치기준 포럼 2019'에서 발표한 자료입니다.
요약: 본 발표에서는 CAD/BIM/GIS의 통합과 관련한 최근 동향을 살펴보고 실제 사례 중심으로 현장에서 겪은 경험들을 공유한다. CAD/BIM/GIS의 통합시도는 OGC, buildingSmart 같은 관련 국제 표준화기구, AutoDesk, ESRI, Bentley 등과 같은 산업계, 그리고 오픈소스 진영의 참여 속에 활발하게 진행되고 있다. CAD/BIM/GIS 통합은 태생적, 기술적, 문화적 차이로 인해 쉽지 않은 과정이다. 성공적인 CAD/BIM/GIS 통합을 위해서는 기술적 통합 자체보다는 통합을 통해 얻고자 하는 혜택과 가치에 집중해야 한다. 구체적 통합 방향으로 목적에 맞는 데이터 활용, 상호운용성을 위한 표준 준수, 데이터 생애주기에 대한 이해, 타 2D/3D/4D 데이터 및 시스템과의 융복합, 분석 및 시뮬레이션 구현 등을 제시한다.
Advanced Methods for User Evaluation in AR/VR StudiesMark Billinghurst
Guest lecture on advanced methods of user evaluation in AR/VR studies. Given by Mark Billinghurst as part of the ARIVE lecture series hosted at the University of Otago. The lecture was given on August 26th 2021.
Using the code below- I need help with creating code for the following.pdfacteleshoppe
Using the code below, I need help with creating code for the following:
1) Write Python code to plot the images from the first epoch. Take a screenshot of the images
from the first epoch.
2) Write Python code to plot the images from the last epoch. Take a screenshot of the images
from the last epoch.
#Step 1: Import the required Python libraries:
import numpy as np
import matplotlib.pyplot as plt
import keras
from keras.layers import Input, Dense, Reshape, Flatten, Dropout
from keras.layers import BatchNormalization, Activation, ZeroPadding2D
from keras.layers import LeakyReLU
from keras.layers.convolutional import UpSampling2D, Conv2D
from keras.models import Sequential, Model
from keras.optimizers import Adam,SGD
from keras.datasets import cifar10
#Step 2: Load the data.
#Loading the CIFAR10 data
(X, y), (_, _) = keras.datasets.cifar10.load_data()
#Selecting a single class of images
#The number was randomly chosen and any number
#between 1 and 10 can be chosen
X = X[y.flatten() == 8]
#Step 3: Define parameters to be used in later processes.
#Defining the Input shape
image_shape = (32, 32, 3)
latent_dimensions = 100
#Step 4: Define a utility function to build the generator.
def build_generator():
model = Sequential()
#Building the input layer
model.add(Dense(128 * 8 * 8, activation="relu",
input_dim=latent_dimensions))
model.add(Reshape((8, 8, 128)))
model.add(UpSampling2D())
model.add(Conv2D(128, kernel_size=3, padding="same"))
model.add(BatchNormalization(momentum=0.78))
model.add(Activation("relu"))
model.add(UpSampling2D())
model.add(Conv2D(64, kernel_size=3, padding="same"))
model.add(BatchNormalization(momentum=0.78))
model.add(Activation("relu"))
model.add(Conv2D(3, kernel_size=3, padding="same"))
model.add(Activation("tanh"))
#Generating the output image
noise = Input(shape=(latent_dimensions,))
image = model(noise)
return Model(noise, image)
#Step 5: Define a utility function to build the discriminator.
def build_discriminator():
#Building the convolutional layers
#to classify whether an image is real or fake
model = Sequential()
model.add(Conv2D(32, kernel_size=3, strides=2,
input_shape=image_shape, padding="same"))
model.add(LeakyReLU(alpha=0.2))
model.add(Dropout(0.25))
model.add(Conv2D(64, kernel_size=3, strides=2, padding="same"))
model.add(ZeroPadding2D(padding=((0,1),(0,1))))
model.add(BatchNormalization(momentum=0.82))
model.add(LeakyReLU(alpha=0.25))
model.add(Dropout(0.25))
model.add(Conv2D(128, kernel_size=3, strides=2, padding="same"))
model.add(BatchNormalization(momentum=0.82))
model.add(LeakyReLU(alpha=0.2))
model.add(Dropout(0.25))
model.add(Conv2D(256, kernel_size=3, strides=1, padding="same"))
model.add(BatchNormalization(momentum=0.8))
model.add(LeakyReLU(alpha=0.25))
model.add(Dropout(0.25))
#Building the output layer
model.add(Flatten())
model.add(Dense(1, activation='sigmoid'))
image = Input(shape=image_shape)
validity = model(image)
return Model(image, validity)
#Step 6: Define a utility function to display th.
Need helping adding to the code below to plot the images from the firs.pdfactexerode
Need helping adding to the code below to plot the images from the first epoch. Thanks
#Step 1: Import the required Python libraries:
import numpy as np
import matplotlib.pyplot as plt
import keras
from keras.layers import Input, Dense, Reshape, Flatten, Dropout
from keras.layers import BatchNormalization, Activation, ZeroPadding2D
from keras.layers import LeakyReLU
from keras.layers.convolutional import UpSampling2D, Conv2D
from keras.models import Sequential, Model
from keras.optimizers import Adam,SGD
from keras.datasets import cifar10
#Step 2: Load the data.
#Loading the CIFAR10 data
(X, y), (_, _) = keras.datasets.cifar10.load_data()
#Selecting a single class of images
#The number was randomly chosen and any number
#between 1 and 10 can be chosen
X = X[y.flatten() == 8]
#Step 3: Define parameters to be used in later processes.
#Defining the Input shape
image_shape = (32, 32, 3)
latent_dimensions = 100
#Step 4: Define a utility function to build the generator.
def build_generator():
model = Sequential()
#Building the input layer
model.add(Dense(128 * 8 * 8, activation="relu",
input_dim=latent_dimensions))
model.add(Reshape((8, 8, 128)))
model.add(UpSampling2D())
model.add(Conv2D(128, kernel_size=3, padding="same"))
model.add(BatchNormalization(momentum=0.78))
model.add(Activation("relu"))
model.add(UpSampling2D())
model.add(Conv2D(64, kernel_size=3, padding="same"))
model.add(BatchNormalization(momentum=0.78))
model.add(Activation("relu"))
model.add(Conv2D(3, kernel_size=3, padding="same"))
model.add(Activation("tanh"))
#Generating the output image
noise = Input(shape=(latent_dimensions,))
image = model(noise)
return Model(noise, image)
#Step 5: Define a utility function to build the discriminator.
def build_discriminator():
#Building the convolutional layers
#to classify whether an image is real or fake
model = Sequential()
model.add(Conv2D(32, kernel_size=3, strides=2,
input_shape=image_shape, padding="same"))
model.add(LeakyReLU(alpha=0.2))
model.add(Dropout(0.25))
model.add(Conv2D(64, kernel_size=3, strides=2, padding="same"))
model.add(ZeroPadding2D(padding=((0,1),(0,1))))
model.add(BatchNormalization(momentum=0.82))
model.add(LeakyReLU(alpha=0.25))
model.add(Dropout(0.25))
model.add(Conv2D(128, kernel_size=3, strides=2, padding="same"))
model.add(BatchNormalization(momentum=0.82))
model.add(LeakyReLU(alpha=0.2))
model.add(Dropout(0.25))
model.add(Conv2D(256, kernel_size=3, strides=1, padding="same"))
model.add(BatchNormalization(momentum=0.8))
model.add(LeakyReLU(alpha=0.25))
model.add(Dropout(0.25))
#Building the output layer
model.add(Flatten())
model.add(Dense(1, activation='sigmoid'))
image = Input(shape=image_shape)
validity = model(image)
return Model(image, validity)
#Step 6: Define a utility function to display the generated images.
def display_images():
r, c = 4,4
noise = np.random.normal(0, 1, (r * c,latent_dimensions))
generated_images = generator.predict(noise)
#Scaling the generated images
generated_images = 0.5 * genera.
Wprowadzenie do technologii Big Data / Intro to Big Data EcosystemSages
Introduction to Hadoop Map Reduce, Pig, Hive and Ambari technologies.
Workshop deck prepared and presented on September 5th 2015 by Radosław Stankiewicz.
During that the day participants had also the possibility to go through prepared tutorials and test their analysis on real cluster.
오픈소스로 쉽게 따라해보는 Unreal과 IoT 연계 및 개발 방법 소개.pdfTae wook kang
이 소품은 메타버스 구현이란 제목으로 출판하려했던 내용 중 일부입니다. 2021년에 시작했었는 데, 함께 하기로 한 분들이 너무 바쁜 상황이라, 거의 2년 이상 묵혀둔 내용이 되어 버렸습니다.
이 내용을 필요한 분들도 있을 듯하여 eBook으로 정리해 공유합니다. 일부 URL은 너무 오래되어, 최대한 확인해 갱신하였습니다. 이 책은 메타버스나 디지털트윈을 언리얼과 같은 게임엔진으로 개발할 때, IoT와 어떻게 연결해야 하는 지에 대한 기본적인 방법을 다루고 있습니다. 이런 목적에서 내용은 복잡한 부분은 최대한 제거하고, 목적에만 충실히 구현하였습니다.
참고로, 여기에 사용된 언리얼 버전은 Unreal 4입니다(설치 링크 - https://unreal-engine.en.uptodown.com/windows). 그럼에도 이 글에서 사용된 기술은 계속 유지관리되고 있으니 활용 가능하시리라 생각합니다.
언리얼 게임엔진 기반 외부 센서 연결 및 데이터 교환 방법
아두이노 사용방법
간단한 Node.js 서버 개발
IoT 기반 디지털 트윈 및 메타버스 구현
오픈소스 및 하드웨어 사용법
사례 소개
이 소품에 설명된 코드는 아래 링크에서 다운로드 받을 수 있습니다.
링크 - https://github.com/mac999/UnrealSensingCube
몇몇 개발 화면 캡쳐 이미지 화질이 나쁘나 소스를 참고해 보시면 도움이 되실 겁니다.
인공지능 기반 미디어아트 최신 기술, 동향 및 사례를 공유합니다. 특히, 딥러닝을 이용한 예술과 관련된 기술을 확인하고, 관련 작품들을 살펴보겠습니다. 이 세미나는 한전아트센터에서 진행하는 2019년 오픈 미디어아트 전시 세미나(2월 10일 오후 2시)의 하나로 기획되었습니다.
전시 링크 - https://vmspace.com/news/news_view.html?base_seq=NDM5
이 슬라이드는 빌딩스마트 빔포럼에서 발표한 건설 스타트업과 오픈소스에 대한 내용입니다. 건설 스타트업에서 사용하는 다양한 기술에 얼마나 많은 오픈소스가 영향을 미치고 있으며, 오픈소스로 인한 생태계가 건설 비지니스에 어떤 가치를 만들어나가는 지 나눔합니다. 아울러, 선진 오픈소스 생태계에서 우리가 생각해 봐야할 부분을 나눔합니다.
이 글은 블록체인과 건설 분야 유스케이스에 대해 간략히 요약한 자료입니다. 기존 4차 산업혁명과 건설의 관계에 대한 발표 내용을 바탕으로 블록체인 부분만 요약하였습니다.
블록체인 개념, 주요 구성요소, 암호화, 해쉬, 건설 분야 적용 사례 등을 언급하고 있습니다. 스마트시티, BIM, COBie, IoT 등 서비스 토큰, 스마트 건설 계약 및 컨텐츠 형상 무결성 보장 등에 적용 시도되고 있는 상황입니다. 다만, 아직 정책적 기술적인 안전성은 아직 이슈가 있습니다.
이 슬라이드는 4차산업혁명과 건설, 그리고 블록체인에 대한 내용입니다. 건설 관점에서 이런 기술들이 어떻게 서로 엮이고, 새로운 가치를 만들어내는 지를 확인해 봅니다. 블록체인은 스마트 계약의 기반이되며, 다양한 서비스 토큰을 통해, 스마트 건설의 부가가치를 담아 이해당사자들 사이를 전달할 것입니다.
건설 관점에서 블록체인을 이용하기 위해, 블록체인의 기본 개념부터 스마트계약, 토큰 및 ICO를 개발하는 방법을 설명합니다. 아울러, 비트코인과 같은 블록체인의 실행 메커니즘을 구체적으로 다루고 있습니다. 이 자료에 포함된 링크를 통해 좀더 상세한 내용을 확인할 수 있습니다.
Case Study about BIM on GIS platform development project with the standard modelTae wook kang
To realize BIM on GIS technology for productivity of AEC industry, we should have some questions like these.
Questions
• What is the benefit from the fusion
between BIM and GIS as the viewpoint of
the public sector
• What do we should do first?
• What is the barrier to realize it?
• How to develop it?
Research and try to
• find the useful use-cases
• define the technology and the organization
including people etc
• survey the issues and define the considerations
• collaborate and research it with the institutes and
the industries
- 2013.5
도시 인프라 공간정보 데이터 커넥션-통합 기술 표준화를 위한 ISO TC211 19166 개발 이야기 Tae wook kang
이 슬라이드는 도시 인프라 공간정보 데이터 커넥션-통합 기술 표준화를 위한 ISO TC211 19166 개요에 대한 이야기입니다. 도시 인프라 공간정보는 건축정보모델(BIM. Building Information Modeling), GIS의 공간정보모델(Geo-spatial Information Model), 유스케이스 별로 발전된 시스템(예. 시설물 에너지 관리 등)으로 발전되어 왔습니다. 최근 스마트 시티, 무인 자율차와 같은 공간정보가 필요한 상황이 되어, 이기종 데이터 소스의 통합이 필요해 졌지요. 디지털 트랜스포메이션에서 데이터 간 연결-통합-전달은 필수적일 겁니다. 이 슬라이드는 이와 관련 ISO/TC211이 접근하는 표준화 방법의 하나를 보여줍니다. 이 표준이 국제표준까지 될지는 모르겠지만, 개인적으로는 특정 R&D 성과를 반듯이 반영해야 하는 것이 아니기에, 포장하거나 무리하지 않고, 자유롭게 워킹그룹 사람들과 의견교환하며 최소 비용으로만 취미처럼 진행하고 있습니다. 이 표준은 2014년부터 지금까지 진행중이며, 이 자료는 2018.5.28. ISO TC211 덴마크 코펜하겐 회의에서 발표한 자료입니다.
메이커 시티가 무엇인지, 어떤 배경에서 진행되고 있는 지에 대해 설명합니다. 메이커 시티의 바탕이 되는 메이커 운동 참여를 통한 경험을 나눔하고, 이를 통해, 국내 메이커 생태계가 발전하려면 어떤 문제를 해결해야 할 지를 질문합니다. 마지막으로 메이커가 되는 작은 방법을 나눔합니다.
06-04-2024 - NYC Tech Week - Discussion on Vector Databases, Unstructured Data and AI
Discussion on Vector Databases, Unstructured Data and AI
https://www.meetup.com/unstructured-data-meetup-new-york/
This meetup is for people working in unstructured data. Speakers will come present about related topics such as vector databases, LLMs, and managing data at scale. The intended audience of this group includes roles like machine learning engineers, data scientists, data engineers, software engineers, and PMs.This meetup was formerly Milvus Meetup, and is sponsored by Zilliz maintainers of Milvus.
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Subhajit Sahu
Abstract — Levelwise PageRank is an alternative method of PageRank computation which decomposes the input graph into a directed acyclic block-graph of strongly connected components, and processes them in topological order, one level at a time. This enables calculation for ranks in a distributed fashion without per-iteration communication, unlike the standard method where all vertices are processed in each iteration. It however comes with a precondition of the absence of dead ends in the input graph. Here, the native non-distributed performance of Levelwise PageRank was compared against Monolithic PageRank on a CPU as well as a GPU. To ensure a fair comparison, Monolithic PageRank was also performed on a graph where vertices were split by components. Results indicate that Levelwise PageRank is about as fast as Monolithic PageRank on the CPU, but quite a bit slower on the GPU. Slowdown on the GPU is likely caused by a large submission of small workloads, and expected to be non-issue when the computation is performed on massive graphs.
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...John Andrews
SlideShare Description for "Chatty Kathy - UNC Bootcamp Final Project Presentation"
Title: Chatty Kathy: Enhancing Physical Activity Among Older Adults
Description:
Discover how Chatty Kathy, an innovative project developed at the UNC Bootcamp, aims to tackle the challenge of low physical activity among older adults. Our AI-driven solution uses peer interaction to boost and sustain exercise levels, significantly improving health outcomes. This presentation covers our problem statement, the rationale behind Chatty Kathy, synthetic data and persona creation, model performance metrics, a visual demonstration of the project, and potential future developments. Join us for an insightful Q&A session to explore the potential of this groundbreaking project.
Project Team: Jay Requarth, Jana Avery, John Andrews, Dr. Dick Davis II, Nee Buntoum, Nam Yeongjin & Mat Nicholas
Unleashing the Power of Data_ Choosing a Trusted Analytics Platform.pdfEnterprise Wired
In this guide, we'll explore the key considerations and features to look for when choosing a Trusted analytics platform that meets your organization's needs and delivers actionable intelligence you can trust.
The Building Blocks of QuestDB, a Time Series Databasejavier ramirez
Talk Delivered at Valencia Codes Meetup 2024-06.
Traditionally, databases have treated timestamps just as another data type. However, when performing real-time analytics, timestamps should be first class citizens and we need rich time semantics to get the most out of our data. We also need to deal with ever growing datasets while keeping performant, which is as fun as it sounds.
It is no wonder time-series databases are now more popular than ever before. Join me in this session to learn about the internal architecture and building blocks of QuestDB, an open source time-series database designed for speed. We will also review a history of some of the changes we have gone over the past two years to deal with late and unordered data, non-blocking writes, read-replicas, or faster batch ingestion.
5. 개발 환경 필수 설치
Python 설치 (아래 링크 클릭해 설치)
import sys
sys.executable
Command 터미널(명령창)에서 python 실행 후 아래 명령어 입력해, 설치 여부 확인
https://www.python.org/downloads/
6. 개발 환경 필수 설치
pip install numpy scipy matplotlib pandas pygame
Command 창에서 아래 명령 실행해 라이브러리 패키지 설치
7. 개발 환경 필수 설치
Git 설치
https://git-scm.com/downloads
8. 개발 환경 필수 설치
Node 설치
https://nodejs.org/en/download/
9. 개발 환경 필수 설치
coding editor 설치
https://www.sublimetext.com/3
10. 개발 환경 옵션 설치
Vscode 설치
https://code.visualstudio.com/download
12. 개발 환경 옵션 설치
Anaconda 설치
https://www.anaconda.com/products/distribution
13. 개발 환경 옵션 설치
Welcome To Colaboratory - Google Research
14. Python
print("Hello, World!")
if 5 > 2:
print("Five is greater than two!")
x = 5
y = "Hello, World!"
def my_function():
print("Hello from a function")
my_function()
29. Data Analysis
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure(figsize=(4,4))
ax = fig.add_subplot(111, projection='3d')
ax.scatter(2,3,4) # plot the point (2,3,4) on the figure
plt.show()
https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.figure.html
https://www.statology.org/fig-add-subplot/
30. Data Analysis
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
x = np.linspace(-4 * np.pi, 4 * np.pi, 50)
y = np.linspace(-4 * np.pi, 4 * np.pi, 50)
z = x**2 + y**2
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot(x,y,z)
plt.show()
31. Data Analysis
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
np.random.seed(42)
xs = np.random.random(100)*10 + 20
ys = np.random.random(100)*5 + 7
zs = np.random.random(100)*15 + 50
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(xs,ys,zs)
plt.show()
32. Data Analysis
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
np.random.seed(42)
ages = np.random.randint(low = 8, high = 30, size=35)
heights = np.random.randint(130, 195, 35)
weights = np.random.randint(30, 160, 35)
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(xs = heights, ys = weights, zs = ages)
ax.set_title("Age-wise body weight-height distribution")
ax.set_xlabel("Height (cm)")
ax.set_ylabel("Weight (kg)")
ax.set_zlabel("Age (years)")
plt.show()
34. Data Analysis
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy as np
from scipy.stats import multivariate_normal
X = np.linspace(-5,5,50)
Y = np.linspace(-5,5,50)
X, Y = np.meshgrid(X,Y)
X_mean = 0; Y_mean = 0
X_var = 5; Y_var = 8
pos = np.empty(X.shape+(2,))
pos[:,:,0]=X
pos[:,:,1]=Y
rv = multivariate_normal([X_mean, Y_mean],[[X_var, 0], [0, Y_var]])
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(X, Y, rv.pdf(pos), cmap="plasma")
plt.show()
35. Data Analysis
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
from matplotlib import cm
from matplotlib.ticker import LinearLocator, FormatStrFormatter
import numpy as np
fig = plt.figure()
ax = fig.gca(projection='3d')
# Make data.
X = np.arange(-5, 5, 0.25)
Y = np.arange(-5, 5, 0.25)
X, Y = np.meshgrid(X, Y)
R = np.sqrt(X**2 + Y**2)
Z = np.sin(R)
# Plot the surface.
surf = ax.plot_surface(X, Y, Z, cmap=cm.coolwarm,
linewidth=0, antialiased=False)
# Customize the z axis.
ax.set_zlim(-1.01, 1.01)
ax.zaxis.set_major_locator(LinearLocator(10))
ax.zaxis.set_major_formatter(FormatStrFormatter('%.02f'))
# Add a color bar which maps values to colors.
fig.colorbar(surf, shrink=0.5, aspect=5)
plt.show()
49. javascript
let input;
if (input === undefined) {
doThis();
} else {
doThat();
}
const n = null;
console.log(n * 32); // Will log 0 to the
console
foo(); // "bar"
/* Function declaration */
function foo() {
console.log('bar');
}
50. javascript
class Car {
constructor(name, year) {
this.name = name;
this.year = year;
}
age() {
let date = new Date();
return date.getFullYear() - this.year;
}
}
let myCar = new Car("Ford", 2014);
document.getElementById("demo").innerHTML =
"My car is " + myCar.age() + " years old.";