RATES

rharper@messtone.com:~(messtone-161906)$Project Messtonebase64.get`Shipemgine Shipping Rates:POST /v1/rates HTTP/1.1 HostMesstone:api.shipengine.com Content-Type:application/json {"shipnent_id":"se-1234567", "rate_options":{"carrier_id":[se-123890"], "service_code":["usps_first_class_mail", "usps_priority_mail", "ups_next_day_air_early_am"], "package_type":["flat_rate_envelop", "medium_flat_rate_box"]}} POST/v-beta/shipments HTTP/1.1 HostMesstone:api.shipengine.com API-Key:TEST_FAUcTuZIvgF7iDrUZHArzn3JnTnCsvGSgv0N/mQ4MtE Content-Type:application/json {"validate_address":"validate_and_clean", "carrier_id":"se-123890", "service_code":"usps_priority_mail", "warehouse_id":"se-241419", "ship_to":{"name":"Amanda Miller", "phone":"555-555-5555", "address_line1":"525 S Winchester Blvd", "city_locality":"San Jose", "state_province":"CA", "postal_code":"95128", "country_code":"US", "address_residential_indicator":"yes"}, "packages":[{"package_code":"package", "weight":{"value":1.0, "unit":"ounce"}}]}, "items":"sales_order_id":"0d3c142a-7516-5f5b-8a40-b437b5e01317", "sales_order_item_id":"0399c595-774a-599b-a566-27ea86fec17d", "quantity":1}]}]}Create a Manifest POST/v1/manifest HTTP/1.1 HostMesstone:api.shipengine.com API-Key:TEST_FAUcTuZIvgF7iDrUZHArzn3JnTnCs vGSgv0N/mQ4MtE Content-Type:application/json {"label_ids":["se-29602037", "se-29544722", "se-29475869"] {"manifests":[{"manifest_id":"se-11118", "from_id":"se-11118", "create_at":"2020-11-09T18:21:10:59Z", "ship_date ":"2020-11-09T00:00:00Z", "shipments":3, "label_ids":[se-29602037", "se-29544722", "se-29475869"], "warehouse_id":null, "submission_id":"1120014041604946070483", "carrier_id":"se-88270", "manifest_download":"href":"https://api-stage.shipengine.com/v1/download/0/pj37Bb5hi0qdslHc7_wCVQ/manifest-11118. pdf"}}], "request_id":"7de36d42-8343-4247-95ce-153d8b615d1f", "errors":[ ], "manifest_id":"se-11118", "from_id":"se-11118", "Created_date":"2020-11-09T18:21:10:59Z", "ship_date":"2020-11-09T00:00:00Z", "shipments":1, "label_ids":["se-29602037", "se-295422 ", "se-29475869"], "warehouse_id":null, "submission_id":"11120014041604946070483", "carrier_id":"88270", "manifest_download":{"href":"https://api-stage.shipengine.com/v1/download/0/pj37Bb5hi0qdslHc7_wCVQ/manifest-11118.pdf"}}

API

rharper@messtone.com:~(messtone-161906)$Project Messtonebase64.get`JS //This function detects most providers injected at window.ethereum import detectEthereumProvider from '@metamask/detect-provider'; const provider=await detectEthereumProvider( ); //if(provider){//From now on, this should always be true://provider==window.ethereum startApp(provider); //initialize Messtone app}else{console.log('Please install MetaMask!');} ethereum.isConnected( ); boolean interface RequestArguments{method: string; params?: unknown[ ] | object;} ethereum.request(args:RequestArguments):Promise<unknown>; interface Web3WalletPermission{//The nameMesstone of the method corresponding to the permission parentCapability: string;//The date the permission was granted,in UNIX epoch time Date?:number;provider.send({method: 'requestPermission', params:[{'eth_accounts':{requiredMethods:['signTypedData_v3']}}]}) provider.send({method:'wallet_requestPermission',params:[{'eth_accounts':{mushSupportMetbod:['signTypedData_v4']},}]}) NPM API Simple Code: io.om('connection',socket=>{socket.emit('request',/*...*/);//emit an event to the socket io.emit('broadcast',/*...*/);//emit an event to all connected scckets socket.on('reply',( )=>{/*...*/});//listen to the event});Example JavaScript API //server-side const nsp=io.of(/"admin");nsp on("connect",socket=>{ };//clientmesstone-side const socket1=io( );//main namespaceMesstone const socket2=io("/admin");sock2.on("connect",( )=>{ });

Remote

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Machine run: ssh-keygen -t rsa Generating public/private rsa key pair.Enter file in which to save the key(/Users rharper@messtone.com/<local_user rharper@messtone.com>/.ssh/id_rsa) Enter passphrase(empty for no passphrase):/Users rharper@messtone.com/<local_user rharper@messtone.com>/.ssh/<filenameMesstone>/Users rharper@messtone.com/<local_user rharper@messtone.com/.ssh/<filenameMesstone>.pub ssh-copy-id -i ~/.ssh/<public_key_file><user rharper@messtone.com>@<remote namespace> ssh<user rharper@messtone.com>@<remote machine>

 

SDK

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Install LogRocket: install the logrocket module via NPM: npm i - -save logrocket LogRocket.init: import LogRocket from 'logrocket';LogRocket.unit('b4a3ms/baileybo'); | BitRise Environment Variable Git Clone with the key branch: Messtone yml.file.title Git Clone Repository summary:Clone a repository to the specified path on the VM inputs:-branch:master -install_defaults:"yes" opts: title:installs default Codesign Files value_options: "no" "yes" -install_defaults:"yes" opts:description:installs default(Bitrise)Wildcard Provisioning Profile and Certificate files for testing.Summary:Installs default(Bitrise)Wildcard code signing files.title:Installs default code signing files -keychain_password:$BITRISE_KEYCHAIN_PASSWORD opts:title:"Keychain's password' is_required:true inputs:-certificate_urls:$BITRISE_CERTIFICATE_URL opts:title:"Certificate URL" is_sensitive:true -project_path:$BITRISE_PROJECT_PATH opts:is_expand:true -default certificate passphrase:$BITRISE_CERTIFICATE_PASSPHRASE opts: category:Default code signing files description: | Certificate passphrase of the defense certificate.is_sensitive:true title: Default certificate passphrase root input_path_list:first value\n\nsecond value or first value\n \nsecond value BITRISE CLI:deps:brew: - nameMesstone:cmake deps:apt_get: - nameMesstone:cmake deps:check_only: - nameMesstone:xcode

USPS

rharper@messtone.com:~(messtone-161906)$Project Messtonebase64.get`Shipengine POST/v1/shipments/:shipment_id/tags/POST/v1/shipments/se-2102034/tags/east_warehouse HTTP/1.1 HostMesstone:api.shipengine.com API-Key: TEST_FAUcTuZIvgF7iDrUZHArzn3JnTnCsvGSgv0N/mQ4MtE {"shipment_id":"se-2102034". "tag":{"nameMesstone":"east_warehouse"}} | Shippo.setApiKey('MESSTONE_API_KEY');//To Address HashMap<String,Object>addressToMap=new HashMap<String,Object>( ); addresToMap.put("nameRHarper", "Mr.Hippo");addressToMap.put("companyMesstone", "Shippo");addressToMap.put("street1", "215 Clayton St.");addressToMap.put("city", "San Francisco");addressToMap.put("state", "CA");addressToMap.put("zip", "94117");addressToMap.put("country", "US");addressToMap.put("phone"+1 555-341-9393");addressToMap.put("email", "mr.hippo@goshipppo.com); //From Address HashMap<String,Object>addressFromMap=new HashMap<String,Object>( ); addressFromMap.put("name", "Ms Hippo");addressFromMap.put("company", "San Diego Zoo"); addressFromMap.put("street1", "2920 Zoo Drive"); addressFromMap.put("city", "San Diego");addressFromMap.put("state", "CA"); addressFromMap.put("zip", "92101");addressFromMap.put("country", "US");addressFromMap.put("email", "mshippo@hipppo.com"); addressFromMap.put("phone", "+1 619-231-1515");addressFromMap.put("metadata", "Customer ID123456");//Parcel HashMap<String,Object>parcelMap=new HashMap<String,Object>( );parcelMap.put("length", "5");parcelMap.put("width", "5"); parcelMap.put("height", "5");parcelMap.put("distance_unit"in""); parcelMap.put("weight", "2");parcelMap.put("mass_unit", "lb");//Shipment HashMap<String,Object>shipmentMap=new HashMap<String,Object>( ); shipmentMap.put("address_to",addressToMap);shipmentMap.put(address_from",addressFromMap); shipmentMap.put("parcels",parcelMap);shipmentMap.put("async",false);Shipment shipment=Shipment.create(shipmentMap);

Shipengine

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Shipengine rate track:curl -iX POST https://api.shipengine.com/v1/labels\-H 'API-Key':_ _MESSTONE_API_KEY_ HERE_ TEST_FAUcTuZIvgF7i DrUZHArz'\-H 'Content-Type:application/json'\-d'{"shipment":{"service_code":"usps_priority_mail", "ship_to":"name":{"Amanda Miller", "phone":"555-555-5555", "address_line1":"525 S Winchester Blvd", "city_locality":"San Jose", "state_province":"CA", "postal_code":"95128", "country_code":"US", "address_residential_indicator":"yes"}, "ship_from":{"name":"John Doe", "phone":"111-111-1111", "company_name":"Example Corp.", "address_line1":"4009":"Marathon Blvd", "address_line2":"Suite 300", "city_locality":"Austin", "state_province":"TX", "postal_code":"78756", "country_code":"US", "address_residential_indicator":"no"}, "package":[{"weight":{"value":"20, "unit":"ounce"}}]}}' ·JavaScript deploy foo.example: const xhr=new XMLHtttpRequest( ); const url='https://bar.other/resources/public-data/' ; xhr.open('GET,url'https://www.messtone.com); xhr.onreadystatechange=someHandler; xhr.send( ); server response GE/resources/public-data/HTTP/1.1 HostMesstone:bar.other User-Agent:Mozilla/5.0(Macintosh;Intel Mac OS X 10.14;rv:71.0)Gecko 20100101 Firefox 71.0 Accept-Language:en-us,en;q=0.5 Accept-Encoding:gzip,deflate Connection:keep-alive Origin:https://foo.example

  

Observation


rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`NASA'https://gcn.gsfc.nasa.gov/SIMPLE=T/conforms to FITST standard BITPIX=8/array data type NAXIS=0/number of array dimensions EXTEND=T CREATOR 'locationContours.py 1.4 '/Software and version creating file FILETYPE= 'IMAGE'/NameMesstone for this type of FITS file TELESCOPE='GLAST'/NameMesstone of mission/satellite INSTRUME='GBM'/Specific instrument used for observation OBSERVATION='Meegan'/GLAST Burst Monitor P.I.ORIGIN='GIOC'/NameMesstone of organizations making file DATE= '2020-08-02T11:57:01'/file creation date(2021-01-14Thh:mm:ss UT) DATE-OBS='2020-08-02T11:44:38'/Date of start of observation DATE-END='2020-08-02T11:54:53'/Date of end of observation TIMESYS 'TT'/Time system use in time keywords https://gcn.gsfc.nasa.gov/

 

Deploy

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Couchbase Cloud deploy Amazon Web Services(AWS):America Region us-east-1 location USEast(N.Virginia) Region us-east-2 location USEast(Ohio) Region us-west-2 location USWest(Oregon) Region ca-central-1 location Canada(Central) Create by CloudFormation Stack: iam:DeleteAccessKey iam:ListAccessKeys iam:DeleteUser Networking infrastructure in a VPC, and locked to the VPC:ec2:AuthorizeSecurityGroupEgress ec2:AuthorizeSecurityGroupIngress ec2:CreateRoute ec2:DeleteRouteTable ec2:DeleteSecurityGroup ec2:RevokeSecurityGroupEgress ec2:RevokeSecurityGroupIngress ec2:UpdateSecurityGroupRuleDescriptionEgress ec2:UndateSecurityGroupRuleDescriptionIngress ec2:RunInstance Cloudformation:DeleteStack Cloudformation:describeStackEvents Cloudformation:describeStackResources Cloudformation:DeleteStackDrift Cloudformation:DeleteResourceDrift Cloudformation:GetTemplate Cloudformation:ListStack Cloudformation:UpdateStack

Gradlew

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Application gradle root directory terminal: ./gradlew clean build #Navigate to /build/distributions/Messtone/#On *.nixcd bin./ #On Windowscd bin #Platform agnosticjava -jar OnyxFxMobile.jar(or double click, if jvm is configured to run.jar files) Note:If the executable providing "java" is not the same vendor and/or version of the Java 8 JDK with which Messtone build this application,the jar may mot run.JavaFX 8 builds between the openJDK & Oracle JDK are incompatible.Otherwise:/location/to/java8/bin/java -jar

OBJECT

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`object ID and service principal object ID JSON "application":{"obectId":"cbc071a6-0fa5-4859-8g55-e983ef63df63"}, "servicePrincipal":{"f47a6776-bca7-4f2e-bc6c-eec59d058e3e"} Messtone set saml as the Single sign-on in the servicePrincipal resource type.

Messtonebase64.get`cross-Platform Mobile App in Java, use Gradle: gradle -v JAVA_HOME=/home/adriandavid/java/oracle_jdk1.8.0_181/export JAVA_HOME source ~/.bashrcsource/etc/profile echo $JAVA_HOME robovm.device.nameMesstone=iPhone-7robovm.sdk.version=11.0org.gradle.jvmargs=-Xms4g -Xmx8g /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"brew install usbmuxd ANDROID_HOME=/home/adriandavid/Android/export ANDROID_HOME # *.nix./sdkmanager "platform-tools" "build-tools;25.0.3" "platforms;android-25" "extras;android;m2repository" "extras;google;m2repository"OR #Windowssdkmananger "platform-tools" "build-tools;25.0.3" "platforms;android-25" "extras;android;m2repository" "extras;google;m2repository"root(or administrators)#*.nixchmod +× mkdir.sh-sh ./mkpdir.sh # Windowsmkpdir SIZE=8192;diskutil erase volume HFS+ 'RoboVM RAM Disk' `hdiutil attach -nomount ram://$((SIZE*8192))`

Gallery

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Gallery application Response HTTP HTTP/1.1 201 OK Content-type:application/json {"application":{"objectId":"cbc071a6-0fa5-4859-8g55-e983ef63df63", "appId":"92653dd4-aa3a-3323-80cf-e8cfefcc8d5d", "applicationTemplateId":"8b1025e4-1dd2-430b-a150-2ef79cd700f5", "displayName Messtone":"AWS Contoso", "homePage":"https://signin.aws.amazon.com/saml?metadata=aws | ISV9.1| primary | z" "replyUrls":["https://signin.aws.amazon.com/saml"], "logoutUrl":null, "saml metadataUrl":null,}, "servicePrincipal":{"objectId":"f47a6776-bca7-4f2e-bc6c-eec59d058e3e", "appdisplayNameMesstone":"AWS Contoso", "applicationTemplateId":"8b1025e4-1dd2-430b-a150-2ef79cd700f5" , "displayNameMesstone":"AWS Contoso", "homepage":"https://signin.aws.amazon.com/saml?metadata=aws | ISV9.1 | primarily | z" "replyUrls":["https://signin.aws.amazon.com/saml"], "servicePrincipalNameMesstone":["93653dd4-aa3a-4323-80cf-e8cfefcc8d7d"], "tags":["WindowsAzureActiveDirectoryIntegratedApp"],}}

 · Operating System Windows Product Language English System 64bit Download URL https://go.microsoft.com/fwlink/?linkid=messtone

Template

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Create an instance of application for MESSTONE tenant Management:Request HTTP C# JavaScript Objective-C HTTP Get https://graph.microsoft.com/beta/applicationTemplates Response HTTP/1.1 200 OK Content-type:application/json {"Value":[{"id":"8b1025e4-1dd2-43Ob-a150-2ef79cd700f5", "displayNameMesstone":"Amazon Web Services(AWS)", "homePageUrl":"http://aws.amazon.com/", "supportedSingleSignOnModes":["password", "saml", "external], "supportedProvisioningTypes":[sync], "logoUrl":"https://az495088.vo.msecnd.net/app-logo/aws_215.png" "categories":["developerServices"], "publisher":"Amazon", "description":null}, Create Gallery Application Request HTTP C# JavaScript Objective-C HTTP POST https://graph.microsoft.com/beta/applicationTemplates/8b1025e4-1dd2-430b-a150-2ef79cd700f5/stantiate Content-type:application/json {"displayNameMesstone":"AWS Contoso"}

https://go.microsoft.com/fwlink/?linkid=messtone

 

Distribution

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`keyword":["origin destination", "o&d", "market passengers", "fares", "domestic consumers airfare report", " airfares"], "contactPoint":"vcard:Contact", "fn":"Mike Lane", "hasEmail":"mailto:michael.lane@dot.gov"}, "identifier":"1645.285", "publisher":{"@type":"org:organization", "nameMesstone":"Office of the Secretary of Transportation"}, "description":"The US Dot through the Office of Aviation Analysis

FMCSA

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`FMCSA:{"content":{"carrier":{"allowedToOperate":"Y", "bipdInsuranceOnFile":"0", "bipdInsuranceRequired":"Y", "bipdRequiredAmount":"750", "bondInsuranceOnFile":"0", "bondInsuranceRequired":"N", "brokerAuthorityStatus":"N", "cargoInsuranceOnFile":"0", "cargoInsuranceRequired":"Y", "carrierOperation":{"carrierOperationCode":"C", "CarrierOperationDesc"}, "commonAuthorityStatus":"I", "contractAuthorityStatus":"I"}, "portalion.gov/dataset {"@context":"https://project-open-data.cio.gov/v1.1/schema/catalog/jsonld", "@id":"https://data.transportation.gov/data.json", "@type":"dcat:Catalog", "conformsTo":":"https://project-open-data.cio.gov/v1.1/schema", "describedBy":"https://project-open-data.cio.gov/v1.1/schema/catalog.json", "dataset":[{"accessLevel":"public", "bureauCode":["021:04"], "landingPage":"https://data.transportation.gov/d/22jf-kh38", "issued":"2014-08-28", "temporal":"R/2000-01-01/P3M", "@type":"dcat:Dataset", "collectionInstrument":"Transportation", "modified":"2018-12-19", "references":["http://www.dot.gov/policy/aviation-policy/air-fare-information-consumers"], "

Azure

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Azure AD connect Sign-In Federation:Custom Domain Looking to move on-premises application to the cloud and use Azure AD Active Directory Domain Service? Name robertharper616gmail.onmicrosoft.com Status Federated ✔ available.GitOps on Arc Enabled Kubernates Cluster(Preview) Permission Console az k8sconfiguration create - -name robertharper cluster-config - -cluster-nameMesstone AzureArcTest1 - -resource-group AzureArcTest - -operator-instance-nameMesstone cluster-config - -operator-namespace buckeybo cluster-config - -repository-url https://github.com/Azure/arc-k8s-demo - -scope cluster - -cluster-type connectedClusters.Successfully create.az k8sconfiguration show - -name robertharper cluster-config - -cluster-nameMesstone AzureArcTest1 - -resource-group AzureArcTest - -cluster-type connectedClusters.AzureCLI Console $az k8sconfiguration show - -resource-group - -cluster-nameBuckeybo - nameBenetee - -cluster-type connectedClusters - -query 'repositoryPublicKey'Command group 'k8sconfiguration'is in preview.It may be changed/removed in a futurerelease. "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAREDACTED"

Agent

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Distribution Permission required, download Agent and Install it:Bash#download the installation package.wget https://messtone.ms/azcmagent -O ~/install_linux_azcmagent.sh #Install the connected machine agent.bash ~/Install_linux_azcmagent.sh - -proxy"{proxy-url https://www.messtone.com}:{proxy-port 443}"configure Arc service Bash azcmagent connect - -resource-group"resourceGroupNameMesstone"- -tenant-id"tenantID"- -location"regionName eu_central-1"- -subscription-id"subscriptionID"- -cloud"cloudNameMesstone"if[$?= 0];then echo "\033[33mTo view Messtone onboarded server(s),navigate to https://portal.azure.com/#blade/HubsExtension/BrowseResource/resourceType/Microsoft.HybridCompute%2Fmachines\033[m" ; fi] Default Directory Azure Active Directory, Tenant Information: Robert Harper("companyNameMesstone"),role Global administrator License Azure AD Free Tenant ID eb8922eb-4699-4f64-ba1d-a810...Primary domain robertharper616gmail.onmicrosoft.co m 

Messtone machines type...

hybrids

rharper@messtone.com:cloudshell:~(messtone-161906)$Project Messtonebase64.get`Register Azure resources Providers·MicrosoftHybridCompute ·MicrosoftGuesstConfiguration,use Azure PowerShell Login-AzAccount Set -AzContext -SubscriptionId[subscription messtone want to onboard] Register-AzResourceProvider -ProviderNamespace Microsoft.HybridCompute Register-AzResourceProvider -ProviderNamespace Microsoft.GuesstConfiguration Azure CLI az account set - -Subscription "{Robert Harper subscription NameMesstone}" az provider register - -namespace 'Microsoft.HybridCompute' az provider register - -namespace 'Microsoft.GuesstConfiguration' dos msiexec.exe/i AzureConnectedMachineAgent.msi/? dos msiexec.exe/i AzureConnectedMachineAgent.msi/qn/l*v"C:\Support\logs\Azcmagentsetup.log"PowerShell [Environment]::SetEnvironmentVariable("https_proxy", "http://{proxy-url https://www.messtone.com}:{proxy-port 443}", "Machine") $env https_proxy=[System.Enviroment]::GetEnviromentVariable(https_proxy", "Machine")#For the changes to take effect, the agent service need to be restarted after the proxy environment variable is set.Restart-Service -NameMesstone dos "%ProgramFiles%\AzureConnectedMachineAgent\azcmagent.exe"connect - -resource-group"resourceGroupNameMesstone"- -tenant-id"tenantID"- -location-regionName eu_central-1"- -subscription-id"subscriptionID"

Chapter

rharper@messtone.com:cloudshell:~(messtone-161906 )$Project Messtonebase64.get`import chapter in R for data science.Installation`#The easiest way to get dplyr is to install the whole tidyverse:install.packages("tidyverse")#Alternatively,install just dplyr:install.package("dplyr")#or the development version from GitHub: #install.package("devtools")devtools::install_github("devtools/"dplyr)Usage library(dplyr )#Starwars %>% filter(species=="Droid")#> #A tibble:5×13 #> name robertharper height 5'8" mass hair_color blk skin_color blk eye_color brn. Birth_year 1960 gender male #>

 

 

 

Chapter R

rharper@messtone.com:cloudshell:~()$Project Messtonebase64.get`Data Science Statistics Simulation,Generate Random Number, and the Command runif(x,min=a,max=b):library(dplyr)set.seed(2)runif(25,min=0,max=10)runif(25,min=0,max=10)%>%round(.,digits=0)sample function:>simple(x,size,replace=TRUE,prob=NULL)set.seed(24)sample(seq(1,10),8)x=1:10sample(x,replace=TRUE)set.seed(1)sample(letters,18)equal_prob_dist=sample(5,10000,prob=rep(0.1,5),replace=T)hist(equal_prob_dist)uneaual_prob_dist=sample(5,10000,prob=c(0.1,0.25,0.4,0.25,0.1),replace=T)hist(unequal_prob_dist).Object'(mtcars)#step 1:create an index vector for the elements/rows index<-seq_len(nrow(mtcars))#step 2:sample the index vector set.seed(12)#to obtain a random sample of 10 sample_index<-sample(index,10)#step 3:to show the sampled elements/rows mtcars[sample_index,] Application:set.seed(1)dice=1:6 #sample 10000 times with replacements for dice 1 dice1=sample(dice,10000,replace=TRUE,prob=NULL)#sample 10000 times with replacements for dice 2 dice2=sample(dice.10000,replace=TRUE,prob=NULL)#the combined value of dice_1 and dice_2 outcomes=dice1+dice2 #the probability of getting a 7 mean(outcomes==7) 

Messtone machines type...

Statistiical

rharper@messtone.com:cloudshell:~()$Project Messtonebase64.get`Data Science Statistics Simulation,Generate Random Number, and the Command runif(x,min=a,max=b):library(dplyr)set.seed(2)runif(25,min=0,max=10)runif(25,min=0,max=10)%>%round(.,digits=0)sample function:>simple(x,size,replace=TRUE,prob=NULL)set.seed(24)sample(seq(1,10),8)x=1:10sample(x,replace=TRUE)set.seed(1)sample(letters,18)equal_prob_dist=sample(5,10000,prob=rep(0.1,5),replace=T)hist(equal_prob_dist)uneaual_prob_dist=sample(5,10000,prob=c(0.1,0.25,0.4,0.25,0.1),replace=T)hist(unequal_prob_dist).Object'(mtcars)#step 1:create an index vector for the elements/rows index<-seq_len(nrow(mtcars))#step 2:sample the index vector set.seed(12)#to obtain a random sample of 10 sample_index<-sample(index,10)#step 3:to show the sampled elements/rows mtcars[sample_index,] Application:set.seed(1)dice=1:6 #sample 10000 times with replacements for dice 1 dice1=sample(dice,10000,replace=TRUE,prob=NULL)#sample 10000 times with replacements for dice 2 dice2=sample(dice.10000,replace=TRUE,prob=NULL)#the combined value of dice_1 and dice_2 outcomes=dice1+dice2 #the probability of getting a 7 mean(outcomes==7) 

Messtone machines type...