TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #208 · 29 јан.

Ранее мы уже говорили о том, как выполнить какой-либо код перед открытием интерактивной консоли. Расскажу еще один способ! На самом деле, даже запустив интерпретатор в обычном режиме с выполнением скрипта из файла вы можете в любом месте активировать интерактивный режим. Или даже несколько по очереди. За это отвечает модуль code. Как это может пригодиться? 🔸 Вам не хватает pdb и хочется больше "власти" 🔸 Нужно запросить у юзера данные в достаточно сложном виде. В этом случае можно попросить его создать что ему надо и сохранить в определённую переменную, с которой потом и работать. 🔸 Нужна изолированная среда для выполнения каких-либо действий. 🔸 Просто забавы ради😁 Запускается консоль очень просто import code ic = code.InteractiveConsole() try: ic.interact() except SystemExit: pass Выход обратно на предыдущий уровень происходит как обычно, вызов функции exit() или клавиши Ctrl+D(Ctrl+Z для Windows). Я набросал простой пример с некоторым функционалом 🔹 Меняются символы приглашения 🔹 В неймспейсы добавляются дополнительные объекты 🔹 Считается время, проведённое в интерактивном режиме 🔹 Скрипт просит юзера заполнить переменную и по выходу распечатывает её значение Код здесь ↗️ Для запуска сохраните код в файл и запускайте как обычный скрипт. python my_console.py Для быстрого запуска можно сделать отдельный алиас alias py="python3 /home/username/my_console.py" #tricks#source

Резултати

Пронајдени 2 слични објави

Пребарај: #opt

当前筛选 #opt清除筛选
🎺星空瞭望

@panguliaowang · Post #18347 · 26.05.2020 г., 00:33

#留学生 20200525 普要拿留学生"开刀"? OPT和H1B或受重大限制 5月24日最新消息!川普真的要对留学生"动手了",若新政策获批,数十万留学生将受重大影响... OPT,H1B 将受重大限制 美国华尔街日报以及Vox最新新闻,指出,川普可能会在数周内对留学生OPT及H1B做重大限制。这些限制很有可能是: #OPT: 暂停或缩短新的OPT签发,禁止留学生进入某些行业应聘; #H1B: 暂停或缩短新的H1B签证,H1B从三年签证变一年签证。 随后,福布斯,彭博社都立刻跟进了此条新闻。可以初步预测,近期留学生毕业后的身份及就业,或受重大影响。 1B拒绝率30%, 20万H1B恐丢身份首先,已经初现困境端倪的是H1B申请和就业:今年的H1B签证拒绝率高达30%!如果不幸地成为那百分之30%,届时很有可能面临工签没批准,学生签证身份也已经过期的两难境地。 这还没完,有幸运儿好不容易找着工作,也受疫情影响恐怕要失业了。找到工作也出问题就在4月22日,川普政府发布一项总统令,暂停大多数新移民入境至少60天,并下令进行30天审查,以建议对临时签证持有人实行新的限制 万维

MessageInABottle

@mib_messageinabottle · Post #6992 · 27.05.2024 г., 19:03

ICC CASE AGAINST URSULA Von Der LEYEN - FOR COMPLICITY IN WAR CRIMES AND CRIMES AGAINST HUMANITY IN GAZA Today the International Criminal Court (#ICC) has been officially called to investigate Ursula von der Leyen for #complicity in acts of #Genocide. Reasonable grounds exist to believe that the unconditional support of the president of the #European Commission to #Israel – #military, #economic, #diplomatic and #political – has enabled #WarCrimes and the ongoing genocide in #Gaza. – A communication is submitted today to the Office of the Prosecutor of the International Criminal Court (ICC), setting forth in detail, through facts and evidence, that there are reasonable grounds to believe that the current president of the European Commission, Mrs. Ursula von der Leyen, a national of Germany, is complicit in a number of violations of international humanitarian law, amounting to crimes within the jurisdiction of the ICC, committed by the Israeli armed forces (#IDF) against #Palestinian civilians in the #Occupied Palestinian Territory (#OPT), including the #Gaza Strip. This communication, endorsed by various human rights groups and prominent academics and experts in international criminal law, calls the Prosecutor to initiate investigations on the basis of the information provided against Mrs. Ursula von der Leyen. The communication documents in detail the fact that Mrs. Ursula von der Leyen personally is criminally responsible and liable for punishment for some of the war crimes, #CrimesAgainstHumanity and #genocide having been committed (and still being committed) by the Israeli armed forces in the #OPT, to the extent that she has aided, abetted and otherwise assisted in the commission or attempted commission of such crimes, including providing the means for its commission, in the meaning of Article 25(3)(c) of the #RomeStatute of the #ICC. MRS. VON DER LEYEN ENJOYS NO FUNCTIONAL IMMUNITY BEFORE THE ICC BY VIRTUE OF ARTICLE 27 OF THE ROME STATUTE.