投稿時間:2021-11-20 23:22:57 RSSフィード2021-11-20 23:00 分まとめ(24件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita カメラの下絵を読み込んでレンダリング解像度を設定するアドオン https://qiita.com/yukimituki11/items/ab22cf55fb28a912e033 カメラの下絵を読み込んでレンダリング解像度を設定するアドオンBlender以降にはカメラビューで画像を下絵として表示する機能があります下絵にカメラの構図を合わせてレンダリングするといった場合下絵とレンダリングの解像度を合わせるという操作が必要になることがあるので画像の読み込みからレンダリング解像度の設定まで行うアドオンを作ってみました。 2021-11-20 22:42:16
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) WordPressないでhtmlを書くと鑑賞してしまう。 https://teratail.com/questions/370280?rss=all WordPressないでhtmlを書くと鑑賞してしまう。 2021-11-20 23:00:05
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Python for文 最後だけ表示させる文を変える https://teratail.com/questions/370279?rss=all Pythonfor文最後だけ表示させる文を変える前提・実現したいこと英単語を確認するプログラムを作成しようと思っています。 2021-11-20 22:59:45
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) nextjs 画面遷移時jsonデータを渡したい https://teratail.com/questions/370278?rss=all nextjs、Reactにて画面遷移したタイミングでjsonデータを渡したいのですが方法がわかりません。 2021-11-20 22:58:14
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) VSCodeで候補の優先順位 https://teratail.com/questions/370277?rss=all 先頭が同じ候補から出てくる様には出来ないのでしょうかスニペットを作成すると言うのも思ったのですが、沢山作成しなくてはならないので良い方法があれば教えて下さい。 2021-11-20 22:29:13
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【Excel VBA】Worksheet_Change内で、先頭と末尾にシート保護解除→保護を設定すると1004エラーが発生してしまう https://teratail.com/questions/370276?rss=all 【ExcelVBA】WorksheetChange内で、先頭と末尾にシート保護解除→保護を設定するとエラーが発生してしまう問題点イベントプロシージャーWorksheetChangeにおいて、下記の順番で処理を行うとエラーが起きてまう。 2021-11-20 22:16:29
AWS AWSタグが付けられた新着投稿 - Qiita インフラのコード化ツール Pulumi のインストール for Windows https://qiita.com/saito-h/items/9546737b92e3486fc532 エラーがなければ、AWSコンソール上からSに移動して確認します。 2021-11-20 22:08:49
Git Gitタグが付けられた新着投稿 - Qiita 【API開発】git addしたら「error: 'backend/' does not have a commit checked out fatal: adding files failed」となった https://qiita.com/horitomoyuki/items/58e4490afc1fcfb66be8 【API開発】gitaddしたら「errorxbackendxdoesnothaveacommitcheckedoutfataladdingfilesfailed」となった問題railsとVueを使った開発で、git管理したく、gitaddをしたところ、errorbackenddoesnothaveacommitcheckedoutfataladdingfilesfailedとなった。 2021-11-20 22:22:11
海外TECH Ars Technica A grim milestone: I maxed out the number of spammy addresses Gmail can block https://arstechnica.com/?p=1814550 google 2021-11-20 13:30:11
海外TECH DEV Community Introduction à FastAPI (Python) https://dev.to/ericlecodeur/introduction-a-fastapi-python-5mf Introduction àFastAPI Python Voici une série d articles qui vous permettra de créer une API en Python avec FastAPI Je vais publier un nouvel article environ au deux jours et petit àpetit vous apprendrez tout ce qu il y a àsavoir sur FastAPIPour ne rien manquer suivez moi sur twitter Qu est ce que FastAPI FastAPI est un framework web Python qui permet de créer rapidement des API de haute performance Pourquoi FastAPI Avant FastAPI il existait déjàplusieurs façon de créer des API avec Python Notamment avec Django Rest Framework et Flask Alors pourquoi FastAPI Voici la liste des principaux avantages de FastAPI Très rapide La performance est supérieur àDjango et Flask et est même comparable aux performances de NodeJS et GORapide àcoder Créer des API à fois plus rapidementFacile Facile àutiliser et àapprendreAnnotation de Type Type hints Facilite la validation permet l auto complétion et facilite le debuggingDocumentation automatique FastAPI génère la documentation en format Swagger UI et ReDoc automatiquement Pre requisPour commencer àcoder avec FastAPI vous devez avoir une base en programmation avec le language Python Vous devez également vous assurer que vous avez une version àjour de Python version ou Àpartir du terminal taper cette commande pour connaitre la version de Python installésur votre machine python versionou python versionSi vous n avez pas Python ou une version antérieur à vous pouvez obtenir la dernière version de Python le site officiel Éditeur de codePour ce tutoriel je vais utiliser Visual Studio Code Il vous sera plus facile de me suivre avec cet éditeur mais ce n est vraiment pas une obligation Enfin si vous utilisévscode assurez vous que l extension Python est bel et bien installé Création de l environnement virtuelLorsque l on travaille sur un projet Python on est amenéàtravailler avec plusieurs librairies comme FastAPI Flask ou Django etc Selon la date de création du projet Il est possible par exemple que la librairie FastAPI ne soit pas exactement au même no de version dans les autres projets Comment faire pour permettre àchaque projet d avoir sa propre version de Python et ses propres versions de librairies Nous allons utiliser les environnements virtuels Un environment virtuel permet d installer Python et des librairies python dans un dossier projet sans que cela n affecte les autres dossiers projets Python met àvotre disposition un système qui permet de créer des environnements virtuels Une fois l environnement crééet activé toutes les librairies installées pourront être utiliséseulement dans l environnement auquel ils appartiennent Comment créer un environnement virtuelNormalement nous plaçons un environnement virtuel dans le dossier du projet Créer et accéder àun dossier pour notre projet mkdir fastapi tuto cd fastapi tutoÀpartir de ce dossier vous pouvez maintenant créer l environnement virtuel qui sera attachéau projet python m venv envIci on lance python avec l option module venv env est le nom que l on donne ànotre environnement virtuel Une fois l environnement virtuelle créévous pouvez l activer MacOS Linux source env bin activateWindows env Scripts activate batVoilàc est tout Vous avez maintenant un environnement virtuel Python créépour votre projet Normalement le terminal vous indiquera que votre environnement est activéen affichant son nom Ànoter que pour désactiver l environnement virtuel vous devez exécuter desactivatePour le reste du tutoriel assurez vous que l environnement virtuel est activéavant de lancer toutes commandes dans le terminal Installation de FastAPIÀpartir du dossier fastapi tuto et avec l environnement virtuel activéexécuter la commande d installation suivante npm install fastapi all Cette commande va installer FastAPI et également installécertaine dépendances optionnelles comme le serveur local uvicorn pour tester FastAPi sur votre machine Une fois ces librairies installées vous pouvez lancer votre éditeur de code ouvert sur le dossier en cours code Cette commande va lancer Visual Studio Code ouvert sur le dossier en cours Rappel Qu est ce qu un API  API signifie Interface de programmation d applications Bref c est un programme qui peut être utilisépar un autre programme afin de permettre aux applications de dialoguer entre elles Une API permet au serveur et au client de communiquer entre eux et d échanger des information et des données Les données échangéle sont en format texte structuré JSON Les échanges se font sous forme de requêtes et réponses Par exemple le navigateur client application frontend fait une requête spécifique a un serveur GET www example com products Le serveur peut il savoir comment gérer cette requête  Il ne le peut pas Il ne saura pas quoi faire de la requête C est pourquoi nous devons créer une API Il s agit d une application serveur qui déterminera comment répondre aux différentes requêtes concernant une ressource spécifique Reprenons le dernier exemple de requête GET www example com products Le client désire obtenir les informations du produit no Pour répondre àcette requête nous pourrions créer un API qui permettrait de rechercher le produit dans une base de données et renvoyer cette réponse au client en format texte structuré JSON id name iPhone qty price Différent type de requêtesNotez que toutes les requêtes aux serveurs sont effectuées via des actions HTTP Voici les actions HTTP les plus couramment utilisésGET Les requêtes GET sont utilisées que pour récupérer des données POST Les requêtes POST sont utilisées pour envoyer des données PUT  Les requêtes PUT sont utilisées pour modifier des données PATCH Les requêtes PATCH sont utilisées pour modifier partiellement des données DELETE Les requêtes DELETE sont utilisées pour supprimer les données indiquées Lorsque nous traitons avec une ressource Par exemple Produit Chaque action sur la ressource Produit a sa propre routeVoici un exemple de route pour chacune des actions HTTP  Create  POST www example com Read  GET www example com products Update  PUT www example com products Destroy  DELETE www example com products La façon de nommer ces routes n est pas un hasard c est en faite une convention qui est suivit par la plupart des développeurs Votre premier APIFini la théorie voyons maintenant comment créer votre premier APIÀpartir de l éditeur de code créer un fichier nommé first api py Saisir ce codefrom fastapi import FastAPIapp FastAPI app get home def index return message Hello World app FastAPI permet de créer une instance de FastAPILe décorateur app get permet de spécifier le chemin url et l action HTTP GET de notre api La fonction index sera exécutéchaque fois qu un utilisateur visitera le chemin URL spécifiépar le décorateur app get soit dans ce cas ci le path home Ànoter que le nom de la fonction index pourrait être n importe quel nom C est selon votre préférence Pour lancer le serveur et tester votre premier API saisir dans le terminal uvicorn first api app reloaduvicorn est le serveur local Il prend comme paramètre le nom du fichier le nom de l instance FastAPIL option ーreload va relancer le serveur àchaque modification du fichier sourceVous pouvez donc ensuite visiter homeLa réponse suivante s affichera message Hello World Bravo Vous venez de créer votre premier APIDernier point Le path que vous avez créépointe sur home Comment faire pour qu il pointe sur le root path soit Il faut utiliser seulement un back slash app get Le back slash utiliséseul signifie root path ConclusionC est tout pour aujourd hui suivez moi sur twitter afin d être aviséde la parution du prochain article d ici deux jours 2021-11-20 13:39:37
海外TECH DEV Community Monitoring your Flask application using OpenTelemetry https://dev.to/signoz/monitoring-your-flask-application-using-opentelemetry-2l2o Monitoring your Flask application using OpenTelemetryIn this article we will use OpenTelemetry to instrument a sample Flask app Flask is one of the most popular web application frameworks of Python It consists of Werkzeug WSGI toolkit and Jinja template engine Instrumentation is one of the biggest challenge engineering teams face when starting out with observability Instrumenting a distributed application architecture is not easy Applications now have distributed services as well as distributed teams that might be using multiple programming languages and numerous frameworks and libraries OpenTelemetry is the leading open source standard that is solving the problem of instrumentation It is currently an incubating project under the Cloud Native Computing Foundation It is a set of tools APIs and SDKs used to instrument applications to create and manage telemetry data Logs metrics and traces It aims to make telemetry data logs metrics and traces a built in feature of cloud native software applications Why use OpenTelemetry As might be clear by now that OpenTelemetry helps you to generate telemetry data You still need a backend to analyze store and visualize that data By design OpenTelemetry is vendor agnostic And that s one of the biggest advantages of using OpenTelemetry It can export data in multiple formats which you can send to a backend of your choice In this article we will use SigNoz as a backend SigNoz is an open source APM that can be used for both metrics and distributed tracing Let s get started and see how to use OpenTelemetry for a Flask application Running a Flask application with OpenTelemetryOpenTelemetry is a set of tools APIs and SDKs used to instrument applications to create and manage telemetry data logs metrics and traces Installing SigNozYou can get started with SigNoz using just three commands at your terminal if you have Docker installed You can install Docker from its official website git clone https github com SigNoz signoz gitcd signoz deploy install shYou will have an option to choose between ClickHouse or Kafka Druid as a storage option Trying out SigNoz with ClickHouse database takes less than GB of memory and for this tutorial we will use that option When you are done installing SigNoz you can access the UI at  http localhost The application list shown in the dashboard is from a sample app called HOT R O D that comes bundled with the SigNoz installation package SigNoz Dashboard Getting a sample Flask applicationPrerequisitesPython or newerDownload the latest version of Python MongoDBBelow are the download links for different OS MacOSLinuxWindowsRunning sample Flask appWe will be using the Flask app at this Github repo Clone sample Flask app repository and go to the root folder git clone https github com SigNoz sample flask app git cd sample flask appCheck if the app is running python app pyYou can now access the UI of the app on your local host http localhost Sample flask application running on local host Instrumenting the Flask application with OpenTelemetryOpentelemetry Python instrumentation installationThe app folder contains a file called requirements txt which contains all the necessary requirements to set up OpenTelemetry Python instrumentation Make sure your path is updated to the root directory of your sample app and run the following command pip install r requirements txtIf it hangs while installing grpcio during pip install opentelemetry exporter otlp then follow below steps as suggested in this stackoverflow link pip install upgrade pippython m pip install upgrade setuptoolspip install no cache dir force reinstall Iv grpcioInstall application specific packagesThis step is required to install packages specific to the application Make sure to run this command in the root directory of your installed application This command figures out which instrumentation packages the user might want to install and installs it for them opentelemetry bootstrap action installPassing the necessary environment variablesYou re almost done In the last step you just need to configure a few environment variables for your OTLP exporters Environment variables that need to be configured SERVICE NAME   application service name you can name it as you like ENDPOINT ADDRESS OTLP gRPC collector endpoint address IP of SigNoz After taking care of these environment variables you only need to run your instrumented application Accomplish all these by using the following command at your terminal OTEL RESOURCE ATTRIBUTES service name flaskApp OTEL METRICS EXPORTER none OTEL EXPORTER OTLP ENDPOINT http lt IP of SigNoz gt opentelemetry instrument python app pyIp of SigNoz can be replaced with localhost in this case Hence the final command becomes OTEL RESOURCE ATTRIBUTES service name flaskApp OTEL METRICS EXPORTER none OTEL EXPORTER OTLP ENDPOINT http localhost opentelemetry instrument python app pyAnd congratulations You have now instrumented your flask application with OpenTelemetry Below you can find your Flask app in the list of applications being monitored on SigNoz dashboard Flask app in the list of applications monitored by SigNoz Open source tool to visualize telemetry dataSigNoz makes it easy to visualize metrics and traces captured through OpenTelemetry instrumentation SigNoz comes with out of box RED metrics charts and visualization RED metrics stands for Rate of requestsError rate of requestsDuration taken by requestsMeasure things like application latency requests per sec error percentage and see your top endpoints with SigNoz You can then choose a particular timestamp where latency is high to drill down to traces around that timestamp View of traces at a particular timestampYou can use flamegraphs to exactly identify the issue causing the latency View of traces at a particular timestampYou can also build custom metrics dashboard for your infrastructure You can also build a custom metrics dashboard for your infrastructure ConclusionOpenTelemetry makes it very convenient to instrument your Flask application You can then use an open source APM tool like SigNoz to analyze the performance of your app As SigNoz offers a full stack observability tool you don t have to use multiple tools for your monitoring needs You can try out SigNoz by visiting its GitHub repo If you have any questions or need any help in setting things up join our slack community and ping us in help channel If you want to read more about SigNoz Golang Aplication Monitoring with OpenTelemetry and SigNozOpenTelemetry collector complete guide 2021-11-20 13:03:32
海外科学 NYT > Science When Can the Covid Masks Finally Come Off? https://www.nytimes.com/2021/11/20/health/coronavirus-masks-mandates.html experts 2021-11-20 13:59:22
海外科学 NYT > Science C.D.C. Endorses Covid Vaccine Booster Shots for All Adults https://www.nytimes.com/2021/11/19/health/covid-boosters-cdc.html C D C Endorses Covid Vaccine Booster Shots for All AdultsAs infections rise Americans over will be permitted to get extra doses But it s not clear boosters really are needed by so many people or that the shots will turn back the pandemic 2021-11-20 13:57:53
金融 ニュース - 保険市場TIMES 損保ジャパンら、ICTツールを活用した健康二次被害予防の実証事業を開始 https://www.hokende.com/news/blog/entry/2021/11/20/230000 2021-11-20 23:00:00
ニュース BBC News - Home Tesla drivers left unable to start their cars after outage https://www.bbc.co.uk/news/technology-59357306?at_medium=RSS&at_campaign=KARANGA carmaker 2021-11-20 13:09:40
ニュース BBC News - Home Migrant crossings: Minister to lead review after record journey numbers https://www.bbc.co.uk/news/uk-59357991?at_medium=RSS&at_campaign=KARANGA channel 2021-11-20 13:47:15
ニュース BBC News - Home Rolls-Royce says its all-electric aircraft 'is world's fastest' https://www.bbc.co.uk/news/uk-england-derbyshire-59359263?at_medium=RSS&at_campaign=KARANGA innovation 2021-11-20 13:03:38
ニュース BBC News - Home Scotland hit by second earthquake in a week with Highland tremor https://www.bbc.co.uk/news/uk-scotland-highlands-islands-59359543?at_medium=RSS&at_campaign=KARANGA highlands 2021-11-20 13:30:25
ニュース BBC News - Home Man City thrash Aston Villa in WSL to ease pressure on boss Taylor https://www.bbc.co.uk/sport/football/59271429?at_medium=RSS&at_campaign=KARANGA aston 2021-11-20 13:42:39
LifeHuck ライフハッカー[日本版] 暗記カードを自動生成してくれる『RemNote』は心強い独学ツール【今日のライフハックツール】 https://www.lifehacker.jp/2021/11/246117lht-remnote.html remnote 2021-11-20 22:05:00
北海道 北海道新聞 花巻東などが準々決勝へ 明治神宮野球大会が開幕 https://www.hokkaido-np.co.jp/article/613954/ 明治神宮野球大会 2021-11-20 22:18:06
北海道 北海道新聞 雪不足、スキー場やきもき オープン延期相次ぐ ゴルフ場は営業延長 https://www.hokkaido-np.co.jp/article/613983/ 雪不足 2021-11-20 22:10:25
北海道 北海道新聞 株主優待物購入巡る詐欺容疑 会社代表ら逮捕、4億円超 https://www.hokkaido-np.co.jp/article/613969/ 株主優待 2021-11-20 22:10:04
北海道 北海道新聞 小樽・オーンズがトップ開業 例年より気温高め、人工造雪機が威力 https://www.hokkaido-np.co.jp/article/613984/ 高め 2021-11-20 22:05:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)