首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 苹果进军蛋白质折叠:SimpleFold 使用体验

    .shape == coords2.shape N = coords1.shape[0] dists = np.linalg.norm(coords1 - coords2, axis=1 : 如果提供,用于计算更精确的局部环境 """ if all_coords1 is None: all_coords1 = coords1 if all_coords2 dist_mat1 = cdist(coords1, coords1) dist_mat2 = cdist(coords2, coords2) # 定义接触 contacts1 ) - 1): # 简化版本:仅基于CA坐标估算 v1 = coords[i] - coords[i-1] v2 = coords[i+1] - coords ) """ return min(len(coords1), len(coords2)) / max(len(coords1), len(coords2)) * 100 # ======

    14710编辑于 2026-04-17
  • 来自专栏csdn_blog

    Python贪吃蛇小游戏_完整源码免费分享

    draw_snake(screen, snake_coords) draw_food(screen, food) draw_score(screen, len(snake_coords) 画贪吃蛇的函数 #将贪吃蛇画出来 def draw_snake(screen, snake_coords): for coord in snake_coords: x = coord['x'] * {'x': snake_coords[HEAD]['x'], 'y': snake_coords[HEAD]['y'] - 1} elif direction == DOWN: == RIGHT: newHead = {'x': snake_coords[HEAD]['x'] + 1, 'y': snake_coords[HEAD]['y']} snake_coords.insert snake_coords[HEAD]['x'] == map_width or snake_coords[HEAD]['y'] == -1 or \ snake_coords[HEAD]['y'

    1.7K20发布于 2020-09-22
  • 来自专栏图像处理与模式识别研究所

    BRIEF关键点匹配

    translation=(0,-100))#图像仿射 img2=transform.warp(img1,affine_trans) img3=transform.rotate(img1,25)#图像旋转 coords1 ,coords2,coords3=corner_harris(img1),corner_harris(img2),corner_harris(img3)#Harris角点检测 coords1[coords1 >0.01*coords1.max()]=1#阈值 coords2[coords2>0.01*coords2.max()]=1#阈值 coords3[coords3>0.01*coords3.max() ]=1#阈值 keypoints1=corner_peaks(coords1,min_distance=5)#计算Harris角点 keypoints2=corner_peaks(coords2,min_distance =5)#计算Harris角点 keypoints3=corner_peaks(coords3,min_distance=5)#计算Harris角点 extractor=BRIEF() extractor.extract

    46420编辑于 2022-05-28
  • 来自专栏完美Excel

    使用Matplotlib创建动画

    (r, step): coords = [] t = 0 while t < 2 * math.pi: coords.append((r*math.cos(t),r*math.sin (t))) t += step return coords coords = circle_coords(1.5, 0.1) 代码运行后,coords内的结果如下图2所示。 图2 步骤1:创建一个静态图表 为坐标系coords中的第一组(x,y)坐标创建一个带有红点的图表。 fig, ax = plt.subplots() ax.scatter(x=coords[0][0],y=coords[0][1],c='red', marker = 'o') 此代码在(1.5,0)处创建一个红点 [i][0],y=coords[i][1], c='red', marker='o') ax.set_xlim([0,2]) ax.set_ylim([-0.5,2]) 结果如下图4所示。

    2.1K20编辑于 2022-04-13
  • 来自专栏站长的编程笔记

    【说站】python中Harris角点检测

     = []     for i in index:         if allowed_locations[coords[i,0],coords[i,1]] == 1:             filtered_coords.append (coords[i])             allowed_locations[(coords[i,0]-min_dist):(coords[i,0]+min_dist),                          (coords[i,1]-min_dist):(coords[i,1]+min_dist)] = 0          return filtered_coords           def plot_harris_points (image)     plot([p[1] for p in filtered_coords],                 [p[0] for p in filtered_coords],'*' =Harris_Detector.get_harris_points(harrisim) Harris_Detector.plot_harris_points(im,filtered_coords) 以上就是

    76480编辑于 2022-11-23
  • 来自专栏跟牛老师一起学WEBGIS

    Node实现切片的拼接和地图的导出

    * @return {*} */ toLonLat(coords) { return proj4('EPSG:3857', 'EPSG:4326', coords) } = this.fromLonLat(lonLat) const x = (coords[0] - topLeft[0]) / res const y = (topLeft[1] - coords extent || tileUtil.isInExtent(extent, coords)) { const [x, y] = tileUtil.project(extent, z, coords : coordinates.map(coords => { return tileUtil.project(extent, z, coords) }) } = _coordinates.map(coords => { return tileUtil.project(extent, z, coords) })

    1.2K20编辑于 2022-09-21
  • 来自专栏菜鸟小栈

    [Cocos Creator] 制作简版消消乐(四):实现消除算法

    : Coordinate[]) { this.coords = coords; this.updateType(); } /** * 更新类型 this.commonCoord : this.coords[0]; // 关键坐标 // 收集数量 for (let i = 0; i < this.coords.length if (this.coords[i].x === keyCoord.x) { if (this.coords[i].y > keyCoord.y) * @param coords 坐标集 * @param commonCoord 共同坐标 */ public merge(coords: Coordinate[ coords[i].compare(commonCoord)) this.coords.push(coords[i]); } this.commonCoord

    4.4K32发布于 2020-07-10
  • 来自专栏Cordova封装H5 APP

    Cordova插件之获取当前定位

    ; 成功回调函数: var onSuccess = function(position) { alert('纬度: ' + position.coords.latitude + '\n' + '经度: ' + position.coords.longitude + '\n ' + '海拔: ' + position.coords.altitude + '\n' + '水平精度: ' + position.coords.accuracy + '\n' + '垂直精度: ' + position.coords.altitudeAccuracy '速度: ' + position.coords.speed + '\n' + '时间戳: '

    75220编辑于 2022-03-06
  • 来自专栏Super 前端

    map&area标签实现图片热点区域点击

    /images/map&area_1.png" alt="大宗商品图" /> <map name="commodities"> <area shape="rect" coords="0,0,128,106 name=sweetpotato" target="_blank" alt="红薯" /> <area shape="rect" coords="128,106,256,212" href="https name=cherry" target="_blank" alt="车厘子" /> <area shape="rect" coords="256,106,386,212" href="https:/ <area shape="" coords=""> 定义一个可点击区域。 shape:热点形状。 coords:详细说明 shape 坐标。

    1.4K10编辑于 2023-03-06
  • 来自专栏iOS开发笔记

    cordova插件- Geolocation

    'Altitude: ' + position.coords.altitude + '\n' + 'Accuracy: ' + position.coords.accuracy + '\n' + 'Altitude Accuracy: ' + position.coords.altitudeAccuracy + '\n' + 'Heading: ' + position.coords.heading + '\n' + 'Speed: ' + position.coords.speed + '\n' + 'Timestamp: ' + '
    ' + 'Longitude: ' + position.coords.longitude + '
    ' +

    1.3K70发布于 2018-03-30
  • 一键生成眨眼照片,人脸识别图片眨眼生成器,基于python神经学开发

    = [p[0] for p in eye_points] y_coords = [p[1] for p in eye_points] x_min, x_max = min(x_coords), max(x_coords) y_min, y_max = min(y_coords), max(y_coords) padding for face in faces: landmarks = self.get_landmarks(image, face) left_eye, left_coords [1]:left_coords[3], left_coords[0]:left_coords[2]] = left_blink frame[right_coords[1]: right_coords[3], right_coords[0]:right_coords[2]] = right_blink frames.append(frame)

    92210编辑于 2025-07-02
  • 来自专栏叶子陪你玩编程

    pygame 贪吃蛇无边界版本源代码

    [0]['x']-1,'y':snake_coords[0]['y'] } if direction == right: new_head = {'x': snake_coords [0]['x']+1, 'y': snake_coords[0]['y']} # 增加蛇头 snake_coords.insert(0,new_head) # 删除蛇尾 snake_coords.pop() # 检测是否吃到食物 if snake_coords[0]['x'] == food_x and snake_coords[0]['y'] == food_y elif snake_coords[0]['y'] >= HEIGHT//CELLSIZE: snake_coords[0]['y'] = 0 elif snake_coords CELLSIZE: snake_coords[0]['x'] = 0 # 检测是否头有碰到身体 if snake_coords[0] in snake_coords[3:

    61920发布于 2021-09-15
  • 来自专栏生信菜鸟团

    R tips:使用ggplot2绘制空间坐标图

    <- arrow::read_parquet('cell_boundaries.parquet') range(coords_xenium$vertex_x) range(coords_xenium $vertex_y) # subset cells coords_xenium_sub <- coords_xenium %>% dplyr::filter( image_wh_ratio <- diff(range(coords_xenium p_xenium_boundary <- coords_xenium_sub %>% read_parquet('cells.parquet') range(coords_xenium2$x_centroid) range(coords_xenium2$y_centroid) coords_xenium_sub2 <- coords_xenium2 %>% dplyr::filter( x_centroid > 3000,

    60010编辑于 2024-12-09
  • 来自专栏跟牛老师一起学WEBGIS

    mapboxGL测量实现

    '起点' : getLength(coords); var marker = new mapboxgl.Marker(option) .setLngLat(coords) = [_e.lngLat.lng, _e.lngLat.lat]; addMeasureRes(coords); addPoint(coords); points.push (coords); } }); map.on('mousemove', function (_e) { if(isMeasure) { var coords = [ = [_e.lngLat.lng, _e.lngLat.lat]; points.push(coords); addPoint(coords); } }); ]; points.push(coords); isMeasure = false; ele.innerHTML = getArea(coords); tooltip.setLngLat

    1.2K50发布于 2020-04-22
  • 来自专栏移动机器人

    MyCobot机械臂头部智能规划路线(四)

    (2)get_coords()函数功能:获取此时机械臂头部的空间坐标以及当前姿态。 我们执行一下get_coords获取一下此时的坐标数据:coords = mc.get_coords()print(coords)如下图: 这个值与我们传递的值不一样,主要原因是这是机器内部误差,这个值接近我们传递的数值 ([59.9, -65.8, 250.7, -50.99, 83.14, -52.42], 80, 1) 机械臂变成了这个样子,让我们再取一下机械臂的坐标:coords = mc.get_coords( )print(coords)我们得到的坐标为:[59.5, -66.0, 251.1, -49.56, 83.14, -50.92]如下图。 = mc.get_coords()print(coords)# 智能规划路线,让头部以线性的方式到达[59.9,-65.8,250.7]这个坐标,以及保持[-50.99,83.14,-52.42]这个姿态

    58600编辑于 2022-10-10
  • 来自专栏生信菜鸟团

    R tips:使用最近邻算法进行空间浸润带的计算

    = boundary_coords_df, # tumor_boundary_coords, radius = radius, mpp = 1, = 0] %>% unique # infiltration area coords <- tumor_area_1[points_idx, ] coords ) for(i in rev(seq_along(coords_tumor_infiltration_ls))){ name <- names(coords_tumor_infiltration_ls )[i] if(i == 1){ coords_tumor_infiltration_ls2[[name]] <- coords_tumor_infiltration_ls[[1]] present_df } # 获得浸润带 ---------- coords_tumor_infiltration_df <- coords_tumor_infiltration_ls2

    47200编辑于 2025-02-18
  • 来自专栏跟牛老师一起学WEBGIS

    地图上覆盖物压盖的优化

    , 4662347.84], level: 1 }, { id: 3, coords: [11760366.56, 4662347.84 ], level: 3 }, { id: 4, coords: [12760366.56, 4662347.84], level: 2 }, { id: 5, coords: [12760366.56, 4662347.84], level: 1 ); const pixel2 = map.getPixelFromCoordinate(p2.coords); // 判断两个点的屏幕距离是否小于图标大小:小于,是 = that.clusterData[index].p.coords; const pixel = map.getPixelFromCoordinate(coords);

    1.5K20发布于 2020-02-20
  • 来自专栏机器学习炼丹术

    pytorch实现 | Deformable ConvNet 可变卷积 | CVPR | 2017

    = coords.size(1) # coords = torch.clamp(coords, 0, input_size - 1) coords = torch.cat((torch.clamp )), 2) assert (coords.size(1) == n_coords) coords_lt = coords.floor().long() coords_rb = coords.ceil().long() coords_lb = torch.stack([coords_lt[..., 0], coords_rb[..., 1]], 2) coords_rt (input, coords_rb.detach()) vals_lb = _get_vals_by_coords(input, coords_lb.detach()) vals_rt = _get_vals_by_coords(input, coords_rt.detach()) coords_offset_lt = coords - coords_lt.type(coords.data.type

    3.3K11发布于 2021-01-05
  • 来自专栏气python风雨

    你爱我还是他 | xarray2024.11.0版本如何读取GRIB数据

    =extra_coords, 701 coords_as_attributes=coords_as_attributes, 702 cache_geo_coords =extra_coords, 123 coords_as_attributes=coords_as_attributes, 124 cache_geo_coords , coords_as_attributes, cache_geo_coords) 713 fbks.append(fbk) 714 error_message =extra_coords, 701 coords_as_attributes=coords_as_attributes, 702 cache_geo_coords =extra_coords, 123 coords_as_attributes=coords_as_attributes, 124 cache_geo_coords

    64110编辑于 2025-01-22
  • 来自专栏AI研习社

    支招 | 如何用 TensorLayer 做目标检测的数据增强

    im_resize, coords = tl.prepro.obj_box_imresize(image, coords=ann_list[idx][1], size=[300, 200 =True, interp='bicubic') im, clas, coords = tl.prepro.obj_box_crop(im, clas, coords =True) im, clas, coords = tl.prepro.obj_box_shift(im, clas, coords, wrg=0.1, hrg=0.1 =True, is_random=True) im, clas, coords = tl.prepro.obj_box_crop(im, clas, coords, wrg return im, [clas, coords] ? 原图 ? 随机处理后 ? 原图 ? 随机处理后 ? 原图 ? 随机处理后 ? 处理前 ?

    60830发布于 2019-09-19
领券