## Unittests for functions that return only a constant string

I have the following function:

``````def report_issue () -> str:
"" "Used when errors are actually corrected" ""
return (& # 39; Report a problem please? & # 39;
& # 39; (https://github.com/agamm/comeback/issues) & # 39;)
``````

Should I write unittest for this?

Should it look like this?

``````def test_report_issue ():
exptected_string = "Report a problem please?" +
& # 39; (https://github.com/agamm/comeback/issues) & # 39;
assert utils.report_issue () == exptected_string
``````

Thank you!

## algebraic geometry – constant morphism between projective varieties

I am currently working on algebraic geometry and I am stuck at the exercise 7.9 b)

Let $$f: mathbb {P} ^ n to mathbb {P} ^ m$$ to be a morphism
Yes $$n> m$$ then $$f$$ must be constant

I found this old thread here and would like to continue showing that for an affine subset $$mathbb {A} ^ n subset mathbb {P} ^ n$$ we know that morphism $$f$$ restricted on the subset has the form $$f (x) = (f_1 (x), …, f_m (x))$$ for homogeneous $$f_i$$. So, I would like to show what was mentioned in the first comment that the $$V (f_1, …, f_m) setminus {0 }$$ is not empty and I hope in my subset affine.
Could this be a possible solution for this exercise and how can I do it?

## python – InvalidRequest error: Server error: code = 2200 [Invalid query] message = "STRING constant invalid

I am new to Cassandra (with Python) and I am trying to create a table based on a csv file. Here is what the file looks like:

I create the table first

``````query1 = "CREATE TABLE IF NOT EXISTS table1 (artist text, text title,
text length, text sessionId, text itemInSession, PRIMARY KEY (sessionId, title, artist)) "

session.execute (query1)
``````

And then I try to read the file and insert the desired data in the table:

``````file = & # 39; event_datafile_new.csv & # 39;

with open (file, encoding = 'utf8') as f:
for the line in csvreader:
query = "INSERT INTO table1 (artist, title, length, sessionId, itemInSession)"
query = query + "VALUES (% s,% s,% s,% s,% s)"
session.execute (query, (line[0], line[9], line[5], line[8], line[3]))
``````

However, I get the following error:

``````---> 13 session.execute (query, (line[0], line[9], line[5], line[8], line[3]))

/opt/conda/lib/python3.6/site-packages/cassandra/cluster.cpython-36m-x86_64-linux-gnu.so in cassandra.cluster.Session.execute (cassandra / cluster.c: 38536) ()

/opt/conda/lib/python3.6/site-packages/cassandra/cluster.cpython-36m-x86_64-linux-gnu.so in cassandra.cluster.ResponseFuture.result (cassandra / cluster.c: 80834) ()

InvalidRequest: Server error: code = 2200 [Invalid query] message = "Invalid STRING constant (288.9922) for" float "length"
``````

Even when I tried to change the format of "length" to float – and% s to% f in the INSERT statement – it did not work. Does anyone know what could be the problem? If this is not the best stackexchange to ask this question, can you point me to the right one? Thank you so much! 🙂

## coding style – Is a constant name associated with its current value an anti-pattern?

For example, suppose I have a string constant like this:

``````const TITLEBAR_MESSAGE = "Welcome,% USERNAME%!";
``````

I think it's more readable when it's named as

``````const WELCOME_BACK_USERNAME = "Welcome,% USERNAME%!";
``````

because I do not need to go to the TITLEBAR_MESSAGE definition to see what the string context is, I do not need to remember that "TITLEBAR_MESSAGE" is associated with "Welcome back, xxx" currently.

I know it would be less easy to maintain when the channel is changed, because I also have to change its name. But the code is read more than the writing, right? I think this last designation is simpler, so the other members of the team do not need to know what is "TITLEBAR".

Similar cases also appear for color constants:

``````const COLOR_SOME_UI =[32,0,0];
``````

What I think:

``````const COLOR_DEEP_RED =[32,0,0];
``````

is simpler (when there are only a few colors) because no other member of the team needs to know what "SOME_UI" is. So my question is: is a constant name related to its present value an anti-motive?

## differential equations – additional constant in ODE solution using DSolve

An article that I said that the solution of the ODE
$$– frac { left ( frac { pi k} {a} right) ^ 2 Y (y)} {G_y} + frac {Y & # 39; (y)} {G_x} + frac {8 theta} { pi k} = 0$$
is
$$Y = A sinh left ( frac {k pi mu} {a} y right) + B cosh left ( frac {k pi mu} {a} y right) + frac {8 theta} {( pi k) ^ 3} a ^ 2$$
or $$mu = sqrt { frac {G_x} {G_y}}$$ and $$a$$, $$G_y$$, $$G_x$$, $$theta$$ and $$k$$ are constants. When I enter this code in Mathematica

``````ode = Y & # 39;[y]/ Gx - 1 / Gy ((k [Pi]) / a) ^ 2 Y[y] + 8 /[Pi] [Theta]/ k == 0;
FullSimplify[Resolution[Odey[DSolve[Odey[Résolution[odeY[DSolve[odeY[y], y]]
``````

I understand that

``````{{Y[y]-> (8 a ^ 2 Gy [Theta]) / (k ^ 3 [Pi]^ 3) + E ^ ((Sqrt[Gx] k[Pi] y) / (a ​​Sqrt[Gy])) C[1]+ E ^ (- ((Sqrt[Gx] k[Pi] y) / (a ​​Sqrt[Gy]))) C[2]}}
``````

or
$$Y = frac {8 a ^ 2 G_y theta} { pi ^ 3 k ^ 3} + c_1 exp left ( frac { pi sqrt {G_x} ky} {a sqrt {G_y} } right) + c_2 exp left (- frac { pi sqrt {G_x} ky} {a sqrt {G_y}} right)$$
Why is there an extra $$G_y$$ in the $$frac {8 a ^ 2 G_y theta} { pi ^ 3 k ^ 3}$$ term?

## Are there lambda-calculus functions that always produce booleans, but are not constant functions?

In labmda calculation, true = $$lambda x, y.x$$ and fake = $$lambda x, y.y$$.

Is there a term $$f$$ as for any other term $$x$$, $$f x$$ normalize to true or false $$f$$ Does not have the same output for all inputs?

## python – incremental shift recovery and constant limit

I have the following algorithm to retrieve data using limit and offset.
I wonder if it's ok?

Perhaps there is a classic way to extract data in a loop using the chaul + offset method?

``````async def get_alerts_in_range (
self, date_start: str, date_end: str, offset = 0, limit = 100
):
in truth:
if len (alerts)> = limit:
Pause

# IDs only of elastic search
ids = wait elastic_search.search_by_range (date_start, date_end,
offset, limit)
if not ids:
Pause

offset + = len (ids)

# Getting the list of dynamo table alert objects by their identifiers
in_range = wait dynamo_db.batch_get_ids (ids)
for alert in inrange:
if len (alerts) <limit and control (alert):
``````

I want to return a list of `alerts` it will pass `check`(it will return true / false) method and no more `limit`

## graphics – Constant disk size on GeoGraphics Image

I'd like to know how to generate a constant disk size on a GeoGraphics image. Currently, my code looks like this:

``````Module[
{(* Module Inputs *)
circleRadius = Quantity[15, "NauticalMiles"],
}
(* Function of the module using these entries *)
GeoGraphics[{
Thickness[.003],
Red,
Geopath[{GeoPosition[{38.884724, -74.422294}], GeoPosition[{35.192252, -74.922013}], GeoPosition[{26.763382, -77.037353}]}],
Darker[Cyan],
Geopath[{GeoPosition[city1], GeoPosition[{38.884724,  -74.422294}]}],
Geopath[{GeoPosition[city2], GeoPosition[{26.763382,  -77.037353}]}],
Black,
Disk[GeoPosition[city1].25],
Disk[GeoPosition[city2].25],
FaceForm[Darker[Gray]],
(* Code that traces the polygon[]from each continent *)
}
GeoBackground -> None,
Image size -> {1000, 1000},
GeoCenter -> GeoPosition[city2],
GeoRange -> {{20., 45.}, {-85., -65.}},
GeoProjection -> "Equirectangular"
]]
``````

CircleRadius is not used but I have tried using GeoDisk as a ray, but regardless of the settings, it is opaque on the map and I want a black disk. The problems I encounter using only the `Disk[]` the function is that between different maps, it is resized when the only parameter I change is `GeoRange` to focus on a different coordinate range, as shown below.

Small disc:

Largest disk size:

My question is: is there a way to set the same size of disk / line thickness between cards? Or is there a way to have `GeoDisk` display as fully visible instead of the transparent color that appears?

That's what I mean by not entirely visible:

Or is it totally impossible and I should play with the `.25` Disc size until they appear more or less the same size between the cards?

Thank you in advance for your help!

## Help me! "Invalid captcha" constant error message | NewProxyLists

I've been trying for days to register on a site, but when I enter a username and password, and the captcha and I click Submit, a message "Invalid captcha" error message is displayed. But I am certain to have put the correct captcha, and I have tried it more than a hundred times. My question is, has anyone ever experienced this ?, and what did you do to get around it? I've tried a different browser thinking that it might solve the problem, but that's not the case. I tried to contact the owners of the site, but it turned out that to send a message to the site owner, I also had to fill a captcha before sending the message, and the same error invalid captcha was occurring. What should I do next?

I need urgent answers, I really need to complete my registration on this site

## Theory of complexity – If \$ mathcal {P} = mathcal {NP} \$ then what could be constant?

It is common knowledge that $$mathcal {P} = mathcal {NP}$$ or $$mathcal {P}! = mathcal {NP}$$ is always open and nobody knows the right answer.

Suppose that in the future, someone brings proof that $$mathcal {P} = mathcal {NP}$$. Which means that there is a polynomial time algorithm for $$mathcal {NP -}$$ Difficult problems. In this worst case scenario, is it natural to assume that the constant associated with this polynomial time algorithm for $$mathcal {NP -}$$ Difficult issues will be huge?

Question: Si $$mathcal {P} = mathcal {NP}$$ then the polynomial time algorithms of $$mathcal {NP -}$$ The difficult problems will have a huge constant? Is this true and if so why is it?

Let me define the "huge constant". An algorithm with polynomial execution time $$mathcal {O} (n ^ c)$$ there is a hidden constant, I speak of this constant.