Coder Social home page Coder Social logo

fast-tsp's Introduction

πŸ‘‹ Hi, I'm SΓΈren - aka shmulvad

About Me

  • πŸ€– Working as a Data Scientist at Singapore Pools
  • πŸ“š Master of Computing from NUS, BSc from @diku-dk
  • 🧠 My field of specialization is artificial intelligence
  • πŸ‘¨β€πŸ« I enjoy sharing my knowledge with others
  • πŸ‘¨β€πŸ’» I love to build my own stuff

Connect with me:

Linkedin: shmulvad Website: shmulvad.com Instagram: shmulvad StackOverflow: shmulvad Twitter: shmulvad Email: shmulvad



πŸ“• Latest Blog Posts:
πŸ€– Coding stats:

NOTE: Doesn't track coding at work or work done in environments such as Jupyter Notebooks.

Code Time

I'm a Night πŸ¦‰

🌞 Morning                475 commits         β–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   08.43 % 
πŸŒ† Daytime                1538 commits        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   27.30 % 
πŸŒƒ Evening                2200 commits        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   39.06 % 
πŸŒ™ Night                  1420 commits        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   25.21 % 

πŸ“Š This Week I Spent My Time On

πŸ’¬ Programming Languages: 
Python                   4 hrs 7 mins        β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   43.70 % 
Other                    2 hrs 34 mins       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   27.35 % 
YAML                     30 mins             β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   05.45 % 
JavaScript               24 mins             β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   04.32 % 
TypeScript               22 mins             β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   04.01 % 

πŸ”₯ Editors: 
VS Code                  6 hrs 52 mins       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘   72.93 % 
Zsh                      2 hrs 32 mins       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   27.05 % 
Sublime Text             0 secs              β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   00.02 % 

πŸ±β€πŸ’» Projects: 
km24-core                8 hrs 33 mins       β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–‘β–‘   90.83 % 
company-scrapers         27 mins             β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   04.89 % 
dmarc-analyse            12 mins             β–ˆβ–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   02.15 % 
faktanet                 11 mins             β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   01.96 % 
overvaagning-admin       0 secs              β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘β–‘   00.15 % 

Last Updated on 16/07/2024 18:45:16 UTC

πŸ˜‡ My GitHub stats:
shmulvad's Github Stats

fast-tsp's People

Contributors

dependabot[bot] avatar shmulvad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

notquitenull

fast-tsp's Issues

Include MIT license for reverse_tour

As highlighted in estan/tsp#3 (comment), there is an issue with the reverse_tour code which is copied from https://github.com/estan/tsp:

fast-tsp/src/tsp.h

Lines 198 to 212 in 5f76216

// Copied reverse method from: https://github.com/estan/tsp/blob/master/tsp.cpp
void reverse_tour(uint_fast16_t n, Tour& tour, uint_fast16_t start, uint_fast16_t end, uint_fast16_t* position) {
uint_fast16_t num_swaps = (((start <= end ? end - start : (end + n) - start) + 1) / 2);
uint_fast16_t i = start;
uint_fast16_t j = end;
while (num_swaps--) {
std::swap(tour[i], tour[j]);
position[tour[i]] = i;
position[tour[j]] = j;
i = (i + 1) % n;
j = ((j + n) - 1) % n;
}
}

estan/tsp uses a MIT license, so the copyright and permission notice needs to be included somewhere.

Code breaks for ints larger than 16-bits

I am attempting to use this module to find a tsp traverse for a set of float data. Since the module only accepts lists of lists of ints, I converted my data to this form and multiplied all my data by a larger scalar to help preserve some of the precision before casting to an int. I was getting crashes any time I multiplied by too large a number, but smaller scalars worked fine.

So I manually narrowed down the number which caused a crash and found it to be anything >= 65536. This is the smallest unsigned int number that cannot be represented by 16-bits. It also appears to crash on any negative number. Leading me to the conclusion that this module does not work for signed ints or int values larger than 16 bits, which is a very annoying restriction considering it also must use ints and cannot read numpy arrays.

Building wheel error

When trying to pip install as instructed, I get the following building wheel error:

\src\tsp.h(216): error C2131: expression did not evaluate to a constant
\src\tsp.h(216): note: failure was caused by a read of a variable outside its lifetime
\src\tsp.h(216): note: see usage of 'n'
\src\tsp.h(218): error C3863: array type 'bool [n]' is not assignable
\src\tsp.h(223): error C3863: array type 'bool [n]' is not assignable
\src\tsp.h(234): error C3863: array type 'bool [n]' is not assignable

OS: Windows 10 64bit
Python: 3.8
Visual Studio 17 2022 x64 v143
fast-tsp: 0.1.0

Full log:
fast-tsp build wheel error.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.