Categories
Ask Engineering Software Engineering

nested for loops to recursion – c++

So, we are learning recursion. I understand the concept of what it is doing in general, but I’m having trouble getting my head around the concept when it comes time to actually implement it. So, I’m trying to rethink my approach to this. I have a function that I was able to get working the […]

Categories
Game Creation Mastering Development

Help flushing out idea for detecting friend from foe [closed]

I need help with flushing out an idea into a game mechanic. There is a goal and there are friendly npcs and enemies. Both are walking toward the goal. However, the player can’t tell friend from foe. The goal is to have the player detect and eliminate the enemies before they reach the goal. I […]

Categories
Mastering Development

Scatter plot does not appear on the foreground on top of contourf plot

My code is the following and I believe should produce a chart where a scatter plot is superimposed on a contourf plot (i.e. appears on the foreground) But that does not happen. import matplotlib.pyplot as plt fig, ax = plt.subplots() ax.scatter(examples[:,0], examples[:, 1]) ax.contourf(x, y, Z) I expected that the scatter plot below would be […]

Categories
Artificial Intelligence (AI) Mastering Development

Sentence Segmentation for “Bullets & Numbering”

I am trying to input text into my word processor to be split into sentences first and then into words. An example paragraph: When the blow was repeated,together with an admonition in childish sentences, he turned over upon his back, and held his paws in a peculiar manner. 1) This a numbered sentence 2) This […]

Categories
Ask Mathematics

Branched coverings of surfaces over an infinite branching locus

So let me start by reviewing my understanding of branched coverings of surfaces in a simple case. If I start with a disk, and two marked points with integer values, say $n$ and $m$ assigned to them, then I can cut the disk along arcs starting at each point, and going to the boundary. This […]

Categories
Development System & Network

Sharing public Wan IP Subnet between 2 locations (Site to Site WAN?)

An ISP has allocated us a /27 to use. We need to use some of the IPs within the /27 in a separate location where the ISP (transit) is a different ISP. Public IP Subnet (/27) <=> Pf Sense (PF A) <= Public Internet => Pf Sense (PF B) <=> Switch (servers) I’m wondering if […]

Categories
Development Docker

Is it wise to delete the default webapps from a Tomcat-based docker image?

I am containerizing an older Java web application with Docker. My Dockerfile pulls an official Tomcat image from Docker Hub (specifically, tomcat:8.5.49-jdk8-openjdk), copies my .WAR file into the webapps/ directory, and copies in some idiosyncratic configuration files and dependencies. It works. Now I know that Tomcat comes out-of-the-box with a few directories under webapps/, including […]

Categories
Development

Bert Embeddings Layer raises `TypeError: unsupported operand type(s) for +: ‘NoneType’ and ‘int’` with BiLSTM

I’ve problems integrating Bert Embeddings Layer in a BiLSTM model for word sense disambiguation task, windows 10 python 3.6.4 tenorflow 1.12 keras 2.2.4 No virtual environments were used PyCharm Professional 2019.2 The whole script import os import yaml import numpy as np from argparse import ArgumentParser import tensorflow as tf import tensorflow_hub as hub from […]

Categories
Development

GradienTape convergence much slower than Keras.model.fit

I am currently trying to get a hold of the TF2.0 api, but as I compared the GradientTape to a regular keras.Model.fit I noticed: It ran slower(probably due to the Eager Execution) It converged much slower (and I am not sure why). +——–+————–+——————+ | Epoch | GradientTape | keras.Model.fit | +——–+————–+——————+ | 1 | 0.905 […]

Categories
Development

How to access data_files specified in setup.py during runtime?

I have created a setup.py for my python project to include a number of .json files during the packaging of my .egg. When I run the command python setup.py install I can see in the output as well as inspecting the .egg itself that the .json were included in the packaging. Here is my setup.py […]