Jump to content

Sensei

Senior Members
  • Posts

    7713
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by Sensei

  1. Try this: import requests from PIL import Image # python2.x, use this instead # from StringIO import StringIO # for python3.x, from io import StringIO r = requests.get('https://example.com/image.jpg') i = Image.open(StringIO(r.content)) or from PIL import Image import requests img = Image.open(requests.get('http://example.com/image.jpg', stream = True).raw) img.save('image.jpg')
  2. What kind of help do you need? How to retrieve HTML from a specific URL? Try this: https://www.tutorialspoint.com/downloading-files-from-web-using-python How to analyze HTML and extract links from it? You need to find the src img tags. string.index(), string.find() or regex can be used to do it. https://www.w3schools.com/python/python_regex.asp 'Dictionary' contains key-value pairs. https://docs.python.org/3/tutorial/datastructures.html#dictionaries You can make abstract datatype in custom class with 'keyword', 'url' and 'path' (on local storage), to have more 'values'.
  3. Sensei

    Class of '23

    ..so he looks like usual..
  4. Did you already have Pythagoras' theorem of triangles in math?
  5. Welcome! To "Westworld".. Don't wake up in a "vat"?
  6. Prigozin's second airplane is currently in the middle of the Caspian Sea. At the end of its "trip" to Baku. https://www.planespotters.net/airframe/embraer-erj-135-ra-02748-private/r1m2g6 ps. I'm attaching images because things on the Internet tend to disappear and/or change content all the time..
  7. Flight path in the Flight Radar app: https://www.flightradar24.com/data/aircraft/ra-02795#31b7cbfb ps. Note that "calibrated altitude" is incorrect. It should start with an altitude of 0 ft and a ground speed of 0 kts. Some data are cut, missing or altered.
  8. https://www.google.com/search?q=steam+turbine+efficiency+formula "Multistage (moderate to high pressure ratio) steam turbines have thermodynamic efficiencies that vary from 65 percent for very small (under 1,000 kW) units to over 90 percent for large industrial and utility sized units. Small, single stage steam turbines can have efficiencies as low as 40 percent."
  9. On one (crazy) bookmaking website a month ago I saw bets "how long will Prigozin live. Bet now"..
  10. From what I see $172k/year, will receive Long Haul Truck drivers. https://www.cnbc.com/2023/08/18/ups-drivers-can-earn-as-much-as-172000-without-a-degree.html In the U.S., it is a completely different level due to the size of the country. "Long haul drivers earn $172,000 on average ($122,000 plus $50,000 in benefits)" 122k / 12 = 10166 per month / 49 usd/h = 207h per month / 8h per day = 26 days. Here the truck driver has daily limits on how long he can drive the truck and how long he must rest before he can drive again. 207h / 12h per day = 17 days It seems that a truck driver can't have a real family.. Because how? When you are thousands of miles away, in another state.. https://www.google.com/search?q=airline+pilots+salary "How much do A320 pilots make a year?" "The estimated total pay for a A320 Captain is $104,686 per year in the United States area, with an average salary of $83,161 per year. These numbers represent the median, which is the midpoint of the ranges from our proprietary Total Pay Estimate model and based on salaries collected from our users." https://www.glassdoor.com/Salaries/a320-captain-salary-SRCH_KO0,12.htm (and you have to pay $20-30,000 for training out of your own pocket first)
  11. ..I have not seen Ukrainians with flowers greeting V.V.P. soldiers, either in February 2022 or now..
  12. I lose the content of the edit box if another user wrote a message while I was typing, the forum showed "a new message appeared" and I clicked the button in this pop-up.. Switching to another tab (without scienceforums.net) e.g. Google Translator/Deepl and back is fine. As long as I don't click pop-ups from scienceforums.net, in the middle of edit. I learned to copy and paste long posts "just in case".. ps. @studiot You can always use a keylogger. It will record everything you type anywhere. Then you copy the log from the keylogger and voila. ps2. It does not depend on OS. I am using Linux. It happened on Win7 and Win10 too. ps3. Obviously you used multiple scienceforums.net tabs not back and forward buttons, right? There is only one classical cookie, LocalStorage supercookie and SessionStorage supercookie, with the given name and it is shared by all open tabs. Okay. I clicked F12 in Firefox, then Storage tab, then in Local Storage there is supercookie with name "editorSave.reply-forums/forums-THREAD_NUMBER" and "editorSave.newMessageTo-POST_NUMBER" which are updated in real-time when I type this message. LocalStorage should even survive a computer reset (unless someone has enabled automatic cookie deletion or browser settings).
  13. Hardware is created at the factory. It is extremely hard to copy. Copy is never identical (different physical particles are used). Software is a special case of data. Data that is understandable to a processor (compiled into machine code) or understandable to a language interpreter (interpreted text file). It is extremely easy to make an unlimited number of identical copies. Examples of compiled languages are: C, C++, Examples of interpreted languages are: JavaScript, PHP, Perl, Python, Bash, Basic. Examples of mixed compilation-interpretation (i.e. interpretation by a virtual machine): Java, C# Software communicates with hardware through drivers. They are OS-specific, OS-compliant, small programs that read and write hardware registers. Generic drivers are provided by the developer of the operating system (e.g. Microsoft) (they are usually very limited and/or slow). The proper drivers are provided by the hardware manufacturers by their engineers. Low-level software can ignore drivers and have direct access to hardware. This was especially true in the 1980s-90s, on 8 bit computers with primitive operating systems.
  14. The search engine, after typing a keyword, only searches a previously created database. A crawler is a special server with scripts/programs installed that periodically visits websites and builds a database. How often it visits (downloads) depends on the website. It can range from once a day, to even thousands of times a day. If it is unable to visit the site, this is noted in the database. If it repeats itself frequently (e.g., because you have blocked its IP addresses, or the server is down), it affects the ranking and the ability of new customers to find you by keywords on the Internet. The IP address ranges of Google's crawlers are well known. https://www.google.com/search?q=google+crawler+ip+addresses They are listed on Google's website. https://developers.google.com/search/apis/ipranges/googlebot.json Here's the story of what happened to the guys who blocked Google's robot IP addresses https://support.google.com/webmasters/thread/134144346/block-google-ip-by-mistake-in-server-and-now-getting-indexing-request-rejected-issue?hl=en And general: https://www.google.com/search?q=what+will+happen+if+you+block+google+crawler For legitimate search engines, you can block them in the robots.txt file on the server. This is often done for some special pages that should not be indexed. https://en.wikipedia.org/wiki/Robots.txt (however, 3rd party search engines, hacker's crawlers, can and will ignore it) You can identify the "bad guys" by putting a line in the robots.txt file that disallows some strange path names, and see that they used them. If somebody scanned your server via "nmap", you can identify their IP and block. If somebody tried to connect to ssh 22 port or so, and brute force tried to login to SSH, you can identify their IP and block.
  15. Search engine crawlers use thousands of computers with foreign IP addresses.. If you block them, your e.g. Google rank will drop and you won't get new real customers who searched for you through Google, Bing, DuckDuckGo, etc. Hackers don't use VPNs. They intercept civilian, corporate and government computers and then use them to transfer data. For VPNs you have to pay, give your name, surname, address, credit card details etc. The intercepted computer is free.
  16. ..or you can write a Python script.. #!/bin/python import sys import math args = len( sys.argv ) if( args != 2 ): print( "The required argument is missing!" ) sys.exit( 1 ) v = float( sys.argv[ 1 ] ) c = 299792458.0 # in vacuum #c = 299705000 # in air fin = 10.525e+9 gamma = ( c + v ) / ( c - v ) fout = fin * gamma df = fout - fin print( "Fs", fin ) print( "v", v ) print() print( "Classic:" ) print( "gamma", gamma ) print( "Fo", fout ) print( "dF", df ) print( "dF (short equation)", 2 * v * fin / c ) gamma_sr = ( math.sqrt( gamma ) - 1 ) * 2 + 1 fout_sr = fin * gamma_sr df_sr = fout_sr - fin print() print( "Special Relativity:" ) print( "gamma", gamma_sr ) print( "Fo", fout_sr ) print( "dF", df_sr )
  17. Astronauts use their pee to "flush the toilet", and to drink, and yet they live *) That's true "no waste!".. Maybe it's time to use it in skyscrapers? *) actually, everyone in this world uses e.g. dinosaur piss water..
  18. After using salt water, sediment will build up in the toilet and pipes. https://www.google.com/search?q=saltwater+sediments+in+pipes
  19. @studiot Shouldn't the relativistic Doppler effect formula be used instead of the classical one formula for sound waves? (i.e. sqrt() is needed)
  20. This is what the Crimea bridge looked like from the train on July 30:
  21. It is certainly you.. People tend to down vote obvious nonsense..
  22. ... Bluetooth, its radio waves, are quite harmless.... Your body emits photons with thousands of times more energy than BT.. If someone intentionally made a device out of radioactively contaminated material, it would be a different story. People do things like this from time to time to save or make money.. You eat slightly radioactively contaminated food every day. Vegetables take up radioactive Carbon C-14 carbon from the air. https://en.wikipedia.org/wiki/Carbon-14
  23. So you don't understand what physical units are (was it not in primary school?).. The number of electrons or the atomic number are unitless quantities.. https://en.wikipedia.org/wiki/Dimensionless_quantity Charge, for example, is not a dimensionless/unitless quantity because it is the number of electrons or protons multiplied by the elementary charge. The elementary charge has the unit C = Coulomb. Multiplied by the dimensionless/unitless number of electrons/protons, it still gives the result in Coulombs. Half-life is in the same units as time (seconds, hours, years, billions of years, etc.). In science, it is easy to check whether someone's equation is correct or not, simply by checking whether the units cancel out correctly. If they don't, it is immediately a sign of error.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.