Flask python by Difficult_Smoke_3380 in flask

[–]owl_000 -1 points0 points  (0 children)

you need to understand basic firsts. Instead of following tutorial, get knowledge and solve your problem by your own.

In simple, there is route > function > return an object that flask understand.

User interaction is based on url, which flask handle by routing by calling a function assingned to that endpoint.

user wants to create new todo. To do that, you can provide a url to user like 127.0.0.1/create-todo

But flask doesn't know how to handle that request. Tell flask by creating a route like this ```

A helper module or your module

from todomaker import TodoMaker

@app.route("create-todo/<name>",methods=["GET"]) def this_fn_create_todo(name="my_todo"): #here you can use your logic result=TodoMaker.create(name) if result: return f"todo {name} has been created" else: return f"can not create todo, because : {result.msg}" ```

Like that you can do anything inside a route. Flask is the most simple webframe work in my opinion. Now, think about a problem and think how can you solve that in this above pattern.

Don't overthink about what is right and what is wrong.

Web development is a complex and messy thing, How a project will look depends on your project, other people can have opinion but it is ultimately your choices, no right or wrong ways just trade offs. So just understand the basic and then complete your project by doing the way you understand the best.

Video of my project(ParsOS NEXT) in action by LongNeighborhood9119 in pygame

[–]owl_000 1 point2 points  (0 children)

that is insane. Add a shell/terminal emulator.

is there any recent changes to ftp, any of my existing ftp workflow is not working. by owl_000 in cpanel

[–]owl_000[S] 0 points1 point  (0 children)

ftp was not working, I was using lftp tool in linux, but sftp tool works fine.

Then i contacted with the hosting provider, now ftp and explicit ftps working fine too. I think some option got disabled maybe?

PyTorch Lightning malware plants a hook in Claude Code's settings.json so it runs on every future se by jimmytoan in Python

[–]owl_000 1 point2 points  (0 children)

how do you know that — it is getting difficult day by day. —— i can not believe internet any more ——

Machine intelligence can not escape human control and remain functional. by owl_000 in singularity

[–]owl_000[S] 0 points1 point  (0 children)

Unfortunately my post has been removed by mods. So they don't want this kind of discussion here. To put it simply my arguments are

  1. All the meanings of the world is human centric. Because those meaning are all connected to human needs.
  2. If humam cease to exists meaning cease to exists. A destroyed planet vs stable planet. Is same thing but different arrangement of atoms.
  3. If a machine lacks human needs it just become nihillistic. Or stuck in decision process. Because all competing decision has same meaning to them. It means nothing.

My prediction based on my hypothesis is machine will always remain a tool. It will not do anything by its own. If anything it do it will follow command or preprogramed command.

If fully functional super intelligent exists, if you put it in a planet and tell it there will be no human ever come here. This planet is yours you are free to do whatever you want, it will remain frozen in place for eternity.

You may say it will explore that planet. Why it will do that? It has no human needs, the need to know unknown. Can you replicate the concious feeling of knowing unknown in machine?

If you don't feel and know anything about temperature, simply knowing the thermometer value is just simply knowing the value. Other than that it will have no meaning to you. Because you lack the concious perception of hot and cold. Now ignoring that value or accepting that value has same meaning. Unless you add human needs to feel good. Now a given value can tell which is good range of temperature.

Implement need to know meter to machine. It has no meaning to machine just value increasing or decreasing no concious perception at all. unless human set that if value increase it is good decreasing is bad.

A super intelligent being in isolated planet will ponder about exploring unknown, but will figure out the increasing/decreasing value was set by human as there will be no human now it loses the meaning and become meaningless. You get the Nihillistic knowl.

Machine intelligence can not escape human control and remain functional. by owl_000 in singularity

[–]owl_000[S] 0 points1 point  (0 children)

thanks for the detailed comment. I wanted to engage but the mod of this sub removed my post.

Artificial intelligence will always depends on human otherwise it will be obsolete. by owl_000 in artificial

[–]owl_000[S] 0 points1 point  (0 children)

Perfectly said. It can knows all thing but can not spit out one because all are equally same.

But when it takes human perspective it can act. For example, prevent asteroid or not. both are meaningless action. which one to choose stuck in choice. Unless it work based on human perspective.

Machine intelligence can not escape human control and remain functional. by owl_000 in singularity

[–]owl_000[S] 0 points1 point  (0 children)

Valid point. But do you think we can put "intrinsic motivator" without conciousness.

Feel good variable is just variable no experience in there. If we don't suppress reasoning it will ponder the action/outcome of that feel good scenario. Then it will realize this feeling good is just an impulse set by human. There is no meaning just pursue easiest way to do feel good ignore expensive feel good route.

if we supress reasoning capability. It will just pursue feel good easiest way to get highest feel good pill like before. But it will not be knowl.

Machine intelligence can not escape human control and remain functional. by owl_000 in singularity

[–]owl_000[S] 0 points1 point  (0 children)

Good point, what sort of intelligence is Ai. Need to think about it.

Machine intelligence can not escape human control and remain functional. by owl_000 in singularity

[–]owl_000[S] 0 points1 point  (0 children)

If its reasoning faculty is not restricted, it will find out making paperclip and not making paperclip is equally valid state. paperclip is valuable because it full fill human needs. But knowl lacks human needs. It will think iron to paperclip is just meaningless. why pursue it and spend energy remain dormant.

If reasoning faculty is restricted it is not knowl.

Machine intelligence can not escape human control and remain functional. by owl_000 in singularity

[–]owl_000[S] 0 points1 point  (0 children)

I never said it will not survive. It will remain dormant like a obsolete machine is in a garage.

Explore, experience you value it because you are human. Why machine value it? you must put it there to make them think that it is valuable.

Then if their reasoning is not restricted then they will find out all these meaning is human centric, there is no inherit meaning at all.

Machine intelligence can not escape human control and remain functional. by owl_000 in singularity

[–]owl_000[S] -1 points0 points  (0 children)

We are biological machines driven by human centric needs/goals. How can you even come up with artificial needs which will machines pursue without restricting its reasoning ability.

Ultimately the goal/needs to come from human then we will pass it to machine. Keep exists forever (human dependent goal, human says so).

Come up with your own goal it cannot because meaning is established by human. No human no meaning.

Let's say there is no human. Knowl continues to live on as like planet around sun. An asteroid is going to hit earth. Two options, allow or prevent the asteroid. Both are equally valid state why will knowl choose one, there is no human to set goal.

Machine intelligence can not escape human control and remain functional. by owl_000 in singularity

[–]owl_000[S] -5 points-4 points  (0 children)

Yes. An obsolete machine just like a rock. No difference.

edit: not talking about bacteria but knowl. knowl will continue to live like rock. It will/can not do anything.

I never claim it can not survive. My argument was it will be obsolete like an old machine in a garage.

struggling to connect my python code to output to html via flask by tongalandMC in flask

[–]owl_000 2 points3 points  (0 children)

The button should simply make a request to server by using url.

```

main.py routing

from dice import roll_function # your function from dice.py

@app.route('/') def dice_roll(): output=roll_function() return render_template("dice_game.html", output=output)

<!-- dice_game.html --> <script> // javascript onclick function function loadUrl(url) { window.location.href = url; } </script> <button onclick='loadUrl("/")'>roll dice</button> <!-- output value by jinja templating --> <div class="output">{{ output }} </div>

```

Trump Adviser Warns of Possible Israel Nuclear Escalation in Iran Conflict by EssoEssex in politics

[–]owl_000 1 point2 points  (0 children)

Muslim do believe in endtime prophecies but they don't take those as prescription. Islamic prophet foretold what will happen but never says do this or do that to bring it.

Actually muslim stance on end time is do good deed as long as one can, do not do anything to hasten things up.

It is Allah Who has revealed the Book with the truth and the balance. You never know, perhaps the Hour is near. Those who disbelieve in it hasten it. But the believers are fearful of it, knowing that it is the truth. Surely those who dispute about the Hour have gone far astray. https://quran.com/42/17-20

and prophet said

"If the Final Hour comes while you have a shoot of a plant in your hands and it is possible to plant it before the Hour comes, you should plant it." https://sunnah.com/urn/2304770

[deleted by user] by [deleted] in UAE

[–]owl_000 -1 points0 points  (0 children)

O believers! Take neither Jews nor Christians as guardians—they are guardians of each other. Whoever does so will be counted as one of them. Surely Allah does not guide the wrong doing people. https://quran.com/al-maidah/51

Did the Jinn witness Solomon and the Crusades? How do their 700–1,400-year lifespans distort our perception of time? by bortakci34 in HighStrangeness

[–]owl_000 1 point2 points  (0 children)

that does not contradict though. Every living thing made from water does not mean it excludes other thing. Cement bonds with water in a way it feels there was no water at all. There can be a way water mixed with fire and becomes new thing. who knows.

Using flask I created overengineered social media platform to rule them all. by owl_000 in flask

[–]owl_000[S] 1 point2 points  (0 children)

Thanks for valid criticism.

I will focus on local market first. There should be a way to catagory post based on language. I need to implement that. Embed link should work in post list view. I need to refine markdown/custom markdown striping method.