snow

樱花飞舞

限于喜欢 提交于 2020-01-20 06:43:17
樱花飞舞 思路 混合原型模式生成随机雪花: 颜色 大小 运动方式 位置(x,y) 雪花运动向下掉落, 当雪花超出屏幕, 在页面中随机生成一个新雪花 <!DOCTYPE html> < html lang = "en" > < head > < meta charset = "UTF-8" > < title > Title </ title > < style > *{ margin : 0 ; padding : 0 ;} .snow { position : absolute; top : 0 ; left : 0 ; /*font-size: 80px; color: pink; animation: snow_rotateY 3s linear infinite;*/ animation : 3s linear infinite; } @ keyframes snow_rotate { from { transform : rotate (0deg); } to { transform : rotate (360deg); } } @ keyframes snow_rotateX { from { transform : rotateX (0deg); } to { transform : rotateX (360deg); } } @ keyframes snow

【译】Unity3D Shader 新手教程(2/6) —— 积雪Shader

♀尐吖头ヾ 提交于 2020-01-17 16:12:16
本文为翻译,附上 原文链接 。 转载请注明出处—— polobymulberry-博客园 。 如果你是一个shader编程的新手,并且你想学到下面这些酷炫的技术,我觉得你可以看看这篇教程: 实现一个积雪效果的shader 创建一个具有凹凸纹理的shader 为每个像素修改其对应纹理值 在表面着色器中修改模型的顶点数据 引论 这是我们系列教程的第二部分,我们将在此部分实现些有用的技术。在学习完 第一部分 的所有背景知识后,我们将利用所学的知识实现一个简单的积雪效果的shader。效果如下: 准备工作 我们想做的其实很简单,简单介绍一下: 随着Snow Level(表示积雪的程度,该值越大,积雪越深)的增大,我们将迎着下雪方向的岩石纹理区域都变成Snow Color(雪的颜色) 随着Snow Level的增大,我们想将该岩石模型稍微变大一点,尤其是雪的边缘厚度要增加,这样给人真正的“积”雪效果。 步骤1 – Bumped Diffuse Shader 我们创建一个新的Diffuse shader(默认新建的shader基本都是Diffuse shader),并向其中添加凹凸纹理效果( 来自 猫大 的原话:法线贴图是凸凹贴图(Bump mapping)的一种常见应用,简单说就是在不增加模型多边形数量的前提下,通过渲染暗部和亮部的不同颜色深度,来为原来的贴图和模型增加视觉细节和真实效果

Initialize MPI cluster using Rmpi

坚强是说给别人听的谎言 提交于 2020-01-14 06:22:49
问题 Recently I try to make use of the department cluster to do parallel computing in R . The cluster system is manged by SGE . OpenMPI has been installed and passed the installation test. I submit my query to the cluster via qsub command. In the script, I specify the number of node I want to use via the following command. #PBS -l nodes=2:ppn=24 (two nodes with 24 threads each) Then, mpirun -np 1 R --slave -f test.R I have checked $PBS_NODEFILE afterwards. Two nodes are allocated as I wish. I

R: making cluster in doParallel / snowfall hangs

久未见 提交于 2020-01-13 13:07:02
问题 I've got two servers on a LAN with fresh installs of Centos 6.4 minimal and R 3.0.1. Both computers have doParallel, snow, and snowfall packages installed. The servers can ssh to each other fine. When I attempt to make clusters in either direction, I get a prompt for a password, but after entering the password, it just hangs there indefinately. makePSOCKcluster("192.168.1.1",user="username") How can I troubleshoot this? edit: I also tried calling makePSOCKcluster on the above-mentioned

R: making cluster in doParallel / snowfall hangs

风格不统一 提交于 2020-01-13 13:06:11
问题 I've got two servers on a LAN with fresh installs of Centos 6.4 minimal and R 3.0.1. Both computers have doParallel, snow, and snowfall packages installed. The servers can ssh to each other fine. When I attempt to make clusters in either direction, I get a prompt for a password, but after entering the password, it just hangs there indefinately. makePSOCKcluster("192.168.1.1",user="username") How can I troubleshoot this? edit: I also tried calling makePSOCKcluster on the above-mentioned

R parallel job hangs

拜拜、爱过 提交于 2020-01-05 07:01:50
问题 I am running the snow-test.R script as written on the site: https://hpcf.umbc.edu/other-packages/how-to-run-r-programs-on-maya/ the script is run on a cluster using SLURM with the command: mpirun -np 1 R CMD BATCH --no-save --no-restore snow-test.R out.dat the R version is 3.5.1. Although the script runs and displays the result, it hangs at the end. Thus, I need to kill the process manually from the SLURM queue with scancel command. Also, when I change the R version to 3.4.4 using the same

R parallel job hangs

故事扮演 提交于 2020-01-05 07:00:30
问题 I am running the snow-test.R script as written on the site: https://hpcf.umbc.edu/other-packages/how-to-run-r-programs-on-maya/ the script is run on a cluster using SLURM with the command: mpirun -np 1 R CMD BATCH --no-save --no-restore snow-test.R out.dat the R version is 3.5.1. Although the script runs and displays the result, it hangs at the end. Thus, I need to kill the process manually from the SLURM queue with scancel command. Also, when I change the R version to 3.4.4 using the same

Running raster::stackApply() function in parallel

旧时模样 提交于 2020-01-03 04:45:14
问题 I'm trying to parallelize this example. I have a bunch of rasters that I am trying to aggregate by week of the year. Here is what this looks like in series: # create a raster stack from list of GeoTiffs tifs <- list.files(path = "./inputData/", pattern = "\\.tif$", full.names = TRUE) r <- stack(tifs) # get the date from the names of the layers and extract the week indices <- format(as.Date(names(r), format = "X%Y.%m.%d"), format = "%U") indices <- as.numeric(indices) # calculate weekly means

谁在Mac OS X上监听给定的TCP端口?

倾然丶 夕夏残阳落幕 提交于 2019-12-28 12:21:07
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 在Linux上,我可以使用 netstat -pntl | grep $PORT netstat -pntl | grep $PORT 或 fuser -n tcp $PORT 找出哪个进程(PID)正在侦听指定的TCP端口。 如何在Mac OS X上获得相同的信息? #1楼 在Snow Leopard(OS X 10.6.8)上,运行“ man lsof”将产生: lsof -i 4 -a (实际的手动输入是“ lsof -i 4 -a -p 1234”) 先前的答案在Snow Leopard上不起作用,但是我一直尝试使用'netstat -nlp',直到在pts的答案中看到使用'lsof'为止。 #2楼 您还可以使用: sudo lsof -i -n -P | grep TCP 这适用于小牛。 #3楼 lsof -n -i | awk '{ print $1,$9; }' | sort -u 这显示谁在做什么。 删除-n以查看主机名(慢一点)。 #4楼 这在Mavericks(OSX 10.9.2)中有效。 sudo lsof -nP -iTCP:$PORT -sTCP:LISTEN #5楼 从Snow Leopard(10.6) 到Mojave(10.14)和Catalina(10,15)

Random forest bootstrap training and forest generation

隐身守侯 提交于 2019-12-25 09:17:02
问题 I have a huge training data for random forest (dim: 47600811*9). I want to take multiple (let's say 1000) bootstrapped sample of dimension 10000*9 (taking 9000 negative class and 1000 positive class datapoints in each run) and iteratively generate trees for all of them and then combine all those trees into 1 forest. A rough idea of required code is given below. Can anbody guide me how can I generate random sample with replacement from my actual trainData and optimally generate trees for them