Tag:distance

  • The practice of K-means clustering algorithm in tensorflow

    Time:2020-4-3

    Original address: here Google recently opened its second-generation artificial intelligence and numerical computing library tensorflow. Tensorflow is developed by the Google brain team and can run flexibly on multiple platforms, including GPU platforms and mobile devices. The core of tensorflow is to use the so-called data flow. You can refer to the knowledge about genetic […]

  • Get the head distance and left distance of rolling

    Time:2020-4-3

    In JS, you often use the small functions that need to get the distance between the head and the left. Here you can encapsulate them and call them directly later: function scroll() { if(window.pageYOffset !== null){ return { top: window.pageYOffset, left: window.pageXOffset } }else if(document.compatMode === “CSS1Compat”){ // W3C return { top: document.documentElement.scrollTop, left: document.documentElement.scrollLeft […]

  • Using react to make a slide show component

    Time:2020-3-29

    Jianghu rules ~ no picture, no truth, first picture! This is a slide carousel component of the exhibition list. Click the left and right buttons to slide left and right. Each time, you can slide a specified number of lines of content. My front-end rookies, big guys light spray whine Let’s share the code Because […]

  • PostgreSQL calculates distance based on latitude and longitude

    Time:2020-3-23

    backgroundThe distance between the city and the scenic spot has been calculated before. The algorithm is strongly calculated by the formula in hive. This time, the coordinate distance between the scenic spot and the county (District) has been calculated. Therefore, the way of calculating the distance has been investigated. It is found that the extension […]

  • Fcos and the difference between fcos and faster r-cnn

    Time:2020-3-23

    Retinaet, SSD, yorov3, fast r-cnn, etc. are all anchor based detectors, which require predefined anchor boxes for training. Fcos is a kind of detector of anchor free and proposal free, that is, it doesn’t need predefined anchor boxes for training, so it saves computing resources. According to my understanding, the differences between fcos and faster […]

  • New year’s day, draw a fireworks with canvas

    Time:2020-3-16

    The Spring Festival is coming soon. I plan to bury a new year’s blessing + fireworks egg in the background. The project is based on react + typescript, so it is finally encapsulated as a component, which can be displayed after the opening time is set. directory structure The directory structure is roughly as followsWe […]

  • Similarity measurement

    Time:2020-2-21

    Similarity measurement Author: kailugaji blog Park http://www.cnblogs.com/kailugaji/ 1. Norm based measurement 1.1 L1Norm Manhattan distance 1.2 L2Norm Euclidean distance 1.3 L∞Norm – Chebyshev distance 1.4 LpNorm Minkowski distance 1.5 L2,1norm 2. Measurement based on covariance 2.1 Mahalanobis distance 2.2 correlation distance 3. Measurement based on amplitude 3.1 cosine similarity 3.2 tonimoto coefficient 4. Jaccard Distance […]

  • CSS to achieve the progress effect of scroll bar

    Time:2020-1-19

    How to know the current scrolling distance of the user and inform the progress bar? Imagine: what if the page scrolling and progress bar are integrated?Use linear gradients to achieve: .body{ position: relative; padding: 50px; line-height: 30px; width: 600px; height: 1200px; background-image: linear-gradient(to right top,#ffcc00 50%,#eee 50%); background-size: 100% calc(100% – 100vh + 5px); background-repeat: […]

  • Leetcode 1320. Minimum distance of two finger input – leetcode weekly match 171 5310 – Python dynamic return

    Time:2020-1-17

    Title Link English Title Bank title Title Description The layout of the two finger input method customized keyboard on the XY plane is shown in the figure above, where each capital English letter is located at a certain coordinate, such as a letterALocated in coordinates(0,0)LettersBLocated in coordinates(0,1)LettersPLocated in coordinates(2,3)And lettersZLocated in coordinates(4,1)。 Give you a […]

  • Develop a simple running app with weex 300 lines of code

    Time:2020-1-12

    Weex, as it aims, A set of cross platform development scheme for building high-performance and scalable native applications What weex brings to you is undoubtedly the improvement of client development efficiency. We can run on three platforms of web, Android and IOS through a set of code. Recently, I tried to develop lbs related applications […]

  • [machine learning practice] calculate pair wise distances of two matrices

    Time:2020-1-11

    Each row in a matrix is a sample. To calculate the distance between two matrix samples, i.e. pair wise distances, you can use the function in sklearn or SciPy to facilitate calculation. sklearn: sklearn.metrics.pairwise_distances SciPy: scipy.spatial.distance’matrix (for p-norm) or scipy.spatial.distance.cdist (all commonly used distance metrics) Compare the running time of the three: (calculate the Euclidean […]

  • Mobile custom scroll bar

    Time:2020-1-8

    In the development of mobile terminal, in order to prevent the click through behavior, we sometimes block the default behavior of the browser. At this time, we need to customize the required browser behavior. This article introduces the scroll bar of the customized browser. Default behavior of mobile browser The default behavior of browser m […]