IonRed

u/IonRed


r/fakeid•

TNF UT is still not here, ordered in early December. Have practically lost hope at this point, have submitted multiple tickets, 2 of which were never responded too (before ticket system went down). Really hope I get it although I doubt it.

114

r/learnpython•

Hey guys,

I need to build some logic into my python engine where it does not stop after a computation is ran but circles back around, runs another GET request to the endpoint and does the computation, etc again. What is the best way to go about doing this?

I assume one way to do this would be a while loop and if it does not = true then return to top. But sense there is no goto in python I am not sure how to go about setting this up.

here is a paste bin with the current code (NOTE: get requets, etc are commented out for the time being)

http://pastebin.com/UZ2Xc0mR

122

r/learnpython•

Hey guys, here is what I am trying to accomplish.

I have the following data set:

Array[1] = ['1', '7', '5', '3', '10', '15']
Array[2] = ['1', '7', '5', '3', '10', '23']

basically what I am trying to accomplish is to match the object in array[1] to array[2] so in this example there are 5 objects that match, so it should return 5.

These objects will always change and the length of the arrays will be anywhere from 50-100 objects per array.

What is the best way to go about doing this?

218

r/cpp_questions•

hey guys, I am trying to return integers from a vector intersection I set up to give me the number of matching elements in two strings.

that works, now what I want to do is also return the actual integers that matched.

How can I take this code:

vector<string> intersection(vector<string> &v1, vector<string> &v2)
{
  vector<string> v3;

  sort(v1.begin(), v1.end());
  sort(v2.begin(), v2.end());

  set_intersection(v1.begin(),v1.end(),v2.begin(),v2.end(),back_inserter(v3));

  return v3;
}

int match_array()
{
  std::vector<string> v1 root.get<int>("user_length", 0);
  std::vector<string> v2 ro
26

r/cpp_questions•

Hey guys, I wanted to not just run some architecture by you but also ask a question. I will start with the architecture.

Engine: The Engine is laid out into a few parts, the first being a data manager that receives the data, determines which area in the code-base it needs to go to and sends it there; second being a computation engine, takes in the data, does some vector based matching, division on string integers and outputs a percentage to be sent away; Third being a recommendation engine, which pulls in a lot of user_data, runs some function and outputs a JSON array that is sent away and used for recommending certain items.

The data is pulled in through REST calls to a Redis API we built

110

r/cpp_questions•

Hey guys, I am trying to do the following:

  1. Match each integer in array[a] to array[b], return the integers that match and do nothing with the ones that do not.

for example:

array[a] = [1, 7, 10, 16, 18, 24, 67, 15]
array[b] = [1, 7, 10, 36, 276, 15, 24]

between array [a] and [b] 5 integers match: output that number as the result.

if anyone can help with this that would be great. Also note these arrays are not sorted and they will change everytime, thus are not const.

Thanks!

25

You've reached the end of this feed.