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

Резултати

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

Пребарај: #ds

当前筛选 #ds清除筛选
MAJOR | Премиум авто

@the_major_ru · Post #1184 · 17.03.2026 г., 11:53

Французский автопром не теряет надежды на успех. Renault в ближайшие годы обещает показать 22 новые модели, для Европы и Латинской Америки - и там и там маленькие гибриды. Премиальное подразделение Citroen - DS идет другим путем и собирается конкурировать с BMW и MB с помощью нового DS No8. Это электромобиль весом 2,2 тонны, мощностью 241-375 лс и разгоном за 5,4 - 7,8 секунд. Немцы делают ставку на мощность и инженерные решения, китайцы на электронику. Французы на дизайн. Значит считают DS No8 красивым. И правда красивый - 👍 Скорее нет - 👎 #ds

Hashtags

Am Neumarkt 😱

@amneumarkt · Post #313 · 20.01.2022 г., 07:39

#ds Deepnote supports Great Expectations (GE) now. I ran their template notebook: https://deepnote.com/project/Reduce-Pipeline-Debt-With-Great-Expectations-mLT9DFCQSpW4kUBAzzdhBw/%2Fnotebook.ipynb/#00000-e170fae0-7e06-4a7a-85f3-343584ec4b94

Hashtags

Am Neumarkt 😱

@amneumarkt · Post #300 · 02.12.2021 г., 10:36

#DS Just in case you are also struggling with Python packages on Apple M1 Macs I am using the third option: anaconda + miniforge. https://www.anaconda.com/blog/apple-silicon-transition

Hashtags

Am Neumarkt 😱

@amneumarkt · Post #253 · 26.08.2021 г., 10:05

#DS Hullman J, Gelman A. Designing for interactive exploratory data analysis requires theories of graphical inference. Harvard Data Science Review. 2021. doi:10.1162/99608f92.3ab8a587 https://hdsr.mitpress.mit.edu/pub/w075glo6/release/2 Creating visualizations seems to be a creative task. At least for entry-level visualization tasks, we follow our hearts and build whatever is needed. However, visualizations are made for different purposes. Some visualizations are simply explorations and for us to get some feelings on the data. Some others are built for the validation of hypotheses. These are very different things. Confirmation of an idea using charts is usually hard. In most cases, we need statistical tests to (dis)prove a hypothesis instead of just looking at the charts. Thus, visualizations become a tool to help us formulate a good question. However, not everyone is using charts as hints only. Instead, many use charts to conclude. As a result, even experienced analysts draw spurious conclusions. These so-called insights are not going to be too solid. The visual analysis seems to be an adversarial game between humans and the visualizations. There are many different models for this process. A crude and probably stupid model can be illustrated through an example of analysis by the histogram of a variable. The histogram looks like a bell. It is symmetric. It is centered at 10 with an FWHM of 2.6. I guess this is a Gaussian distribution with a mean 10 and sigma 1. This is the posterior p(model | chart). Imagine a curve like what was just guessed on top of the original curve. Would my guess and the actual curve overlap with each other? If not, what do we have to adjust? Do we need to introduce another parameter? Guess the parameter of the new distribution model and compare it with the actual curve again. The above process is very similar to a repetitive Bayesian inference. Though, the actual analysis may be much more complicated as the analysts would carrier a lot of prior knowledge about the generating process of the data. Through this example, we see that integrating explorations with preliminary model building as Confirmatory Data Analysis may bring in more confidence in drawing insights from charts. On the other hand, including complicated statistical models leads to misinterpretations since not everyone is familiar with statistical hypothesis testing. So the complexity has to be balanced.

Hashtags

Am Neumarkt 😱

@amneumarkt · Post #247 · 29.07.2021 г., 21:38

#DS This is an interesting report by anaconda. We can kind of confirm from this that Python is still the king of languages for data science. SQL is right following Python. Quote from the report: > Between March 2020 to February 2021, the pandemic economic period, we saw 4.6 billion package downloads, a 48% increase from the previous year. We have no data for other languages so no predictions can be made but it is interesting to see Python growing so fast. The roadblocks different data professionals facing are quite different. If the professional is a cloud engineer or mlops, then they do not mention that skills gap in the organization that many times. But for data scientists/analysts, skills gaps (e.g., data engineering, docker, k8s) is mentioned a lot. This might be related to the cases when the organization doesn't even have cloud engineers/ops or mlops. See the next message for the PDF file. https://www.anaconda.com/state-of-data-science-2021

Hashtags

Am Neumarkt 😱

@amneumarkt · Post #232 · 25.05.2021 г., 07:33

#DS This paper serves as a good introduction to the declarative data analytics tools. Declarative analytics performs data analysis using a declarative syntax instead of functions for specific algorithms. Using declarative syntax, one can “describe what you want the program to achieve rather than how to achieve it”. To be declarative, the declarative language has to be specific on the tasks. With this, we can only turn the knobs of some predefined model. To me, this is a deal-breaker. Anyways, this paper is still a good read. Makrynioti N, Vassalos V. Declarative Data Analytics: A Survey. IEEE Trans Knowl Data Eng. 2021;33: 2392–2411. doi:10.1109/TKDE.2019.2958084 http://dx.doi.org/10.1109/TKDE.2019.2958084

Hashtags

Am Neumarkt 😱

@amneumarkt · Post #231 · 21.05.2021 г., 05:13

#DS https://octo.github.com/projects/flat-data Hmmm, so they gave it a name. I've built so many projects using this approach. I started building such data repos using CI/CD services way before github actions was born. Of course github actions made it much easier. One of them is the EU covid data tracking project ( https://github.com/covid19-eu-zh/covid19-eu-data ). It's been running for more than a year with very little maintenance. Some covid projects even copied our EU covid data tracking setup. I actually built a system (https://dataherb.github.io) to pull such github actions based data scraping repos together.

Hashtags

123•••67
ПретходнаСтраница 1 од 7Следна