TGTGInsightтелеграм анализLIVE / telegram public index
← Такты, стеки, два колеса

TGINSIGHT SIMILAR POSTS

Намери подобно съдържание

Изходен канал @clockstackwheels · Post #227 · 20.02

Допустим, вы разработчик, и вам от пользователя приходит строка user-agent с описанием того, каким браузером он пользуется. В этой строке будет что-то типа такого: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36 И вы хотите из неё узнать мажорную версию Chrome, то есть вытащить число 51. Что вы сделаете? Можно, конечно, написать свой парсер, но я уверен, многие воспользуются регулярными выражениями. Я бы воспользовался. Какое выражение сюда подходит? С виду кажется, что вот такое: /Chrome\/(\d\d)\./g Мы ищем слово Chrome и слэш, затем ловим в группу две цифры, после которых стоит точка. Так? По крайней мере, мышление достаточного количества разработчиков именно таково. Зачастую программистам не хватает умения отойти от техзадания на уровень вещественной сути того, с чем они работают. На самом деле число 51 это версия. Версия будет увеличиваться со временем. «Марти, где твоё четырёхмерное воображение?» Если уже прошло 50 версий, то и следующие 50 не за горами, число станет трёхзначным, регулярка или парсер, сделанные под двухзначные числа, перестанут работать. Трехзначная версия Chrome и Firefox приближается уже сейчас. И да, в них падает куча функций на сайтах, включая крупные корпорации: Yahoo, Bethesda, HBO и бог знает сколько сайтов поменьше. Чисто из-за цифры. Это уже назвали «Проблема сотой версии» по аналогии с «Проблемой 2000 года» (программисты записывали год двумя цифрами, 2000 стал неотличим от 1900). К чему это я? Полезно задумываться о физическом воплощении того, что вы представляете в своей программе. Ваш код должен описывать не столько требования заказчика, сколько законы, по которым существует этот объект в реальном мире. #dev

Hashtags

Резултати

Намерени 4 подобни публикации

Търсене: #pyflakes

当前筛选 #pyflakes清除筛选
djangoproject

@djangoproject · Post #299 · 17.04.2017 г., 07:54

https://pypi.python.org/pypi/pyflakes A simple program which checks Python source files for #errors. #Pyflakes analyzes programs and detects various errors. It works by parsing the source file, not importing it, so it is safe to use on modules with side effects. It’s also much faster. Pyflakes is also faster than Pylint or Pychecker. This is largely because Pyflakes only examines the syntax tree of each file individually. As a consequence, Pyflakes is more limited in the types of things it can check. #test

djangoproject

@djangoproject · Post #336 · 09.05.2017 г., 05:24

https://dzone.com/articles/pyflakes-passive-checker There are several code #analysis tools for Python. The most well known is pylint. Then there’s pychecker and now we’re moving on to #pyflakes. The pyflakes project is a part of something known as the Divmod Project. Pyflakes doesn’t actually execute the code it checks, unlike #pychecker. Of course, #pylint also doesn’t execute the code. Regardless, we’ll take a quick look at it and see how pyflakes works and if it’s better than the competition.

djangoproject

@djangoproject · Post #425 · 28.08.2017 г., 03:37

#AI#Artificial_Intelligence #aiohttp #AngularJS #API #AWS #asyncio #audio #automated_testing #automation #atexit #BeeWare #button #client #concurrency #Coroutine #cron #curl #data_analysis #data_mining #data_processing #database #Deep_Learning #Debian #decorator #dict #dispatch #django #django_cms #dropdownbox #Docker #event #Firefox #form #Generator #GeoDjango #git #Google #GPU #Gym #learn #Image_processing #intelligence #input #IOT #lambda #learn #lists #machine_learning #Magenta #map #Metaprogramming #Micro_services #mind #monitoring #MongoDB #Mozilla #Multipart #multi_touch_apps #multiprocessing #Nodes #NoSQL #numeric_computation #numerical #NumPy #OAuth #object_serialization #OCR #overloading #package #parallel #pipeline #protocols #PostGIS #pyAudioAnalysis #pycon #Pyflakes #PyInstaller #PySide #PyTorch #pytest #python #Pyvideo_archives #Qt #React #Redis #random #request #REST #satellite #scrapy #scikit_learn #SciPy #searching #submit #selectbox #Selenium #serialization #server #socket #task #telegram #TensorFlow #test #text_boxes #text #tuples #unicode #Universe #Unix #urllib #upload #Web

djangoproject

@djangoproject · Post #513 · 30.11.2017 г., 22:00

#AI#Artificial_Intelligence #AJAX #aiohttp #Anaconda #AngularJS #API #Atom #AWS #asyncio (#Asynchronous) #audio #automated_testing #automation #atexit #BeeWare #Big_Data #bitcoin #blockchain #Bluemix #Brython #button #Celery #client #class #classmethod #concurrency #Coroutine #cron #CSS #curl #data_analysis #data_mining #data_processing #database #Deep_Learning#deep_learning #Debian #decorator #deploy #dict #dispatch #django #django_cms #Django_REST_Framework #dropdownbox #Docker #event #Firefox #Flask #form #functions #Generator #GeoDjango #git #Google #GPU #GUI #Gym #host #HTML #httplib #learn #Image_processing #intelligence #input #Instagram #IOT #iPython #Jupyter #lambda #learn #License #Linux #lists #machine_learning #Magenta #map #Matplotlib #Metaprogramming #Micro_services #Micropython #mind #monitoring #MongoDB #modules #Mozilla #Multipart #multi_touch_apps #multiprocessing #Nodes #NoSQL #numeric_computation #numerical #NumPy #network #neural_network #OAuth #object_serialization #OCR #overloading #package #parallel #pipeline #protocols #PostGIS #pyAudioAnalysis #pycon #Pyflakes #PyInstaller #PyPI #PyQt #PySide #PyTorch #pytest #python #Pyvideo_archives #Qt #Raspberry_Pi #React #Redis #random #request #Regular_Expressions (#re) #REST #RSS #satellite #scikit_learn #SciPy #scrapy #searching #selectbox #Selenium #serialization #server #sessions #single_responsibility_principle #socket #Spark #str #submit #task #telegram #template #TensorFlow #test #text_boxes #text #tuples #unicode #Universe #Unix #unit_test #urllib #upload #uWSGI #Web #WSGI