IT |
気になる、記になる… |
Microsoft、「HoloLens 3」の開発は設計段階 |
https://taisy0.com/2021/05/15/140472.html
|
holole |
2021-05-15 08:34:38 |
TECH |
Techable(テッカブル) |
OkazzのGenerative ArtをNFTとして販売する「Okazz’s Generative Art NFT」 |
https://techable.jp/archives/154596
|
generativeart |
2021-05-15 08:00:21 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
Pythonでデータの挙動を見やすくする可視化ツールを作成してみた(分類編) |
https://qiita.com/c60evaporator/items/43866a42e09daebb5cc0
|
※クロスバリデーションの指定法は後述します分割クロスバリデーションclassplotclassseparatorplotmodelpetalwidthpetallengthspeciesiriscvdisplaycvindices次元特徴量の場合、個目を一定間隔で分割し、分割された区間の中央値を使用した予測値で決定境界を、分割された区間内のデータで散布図をプロットします次元特徴量の場合も、縦横に分割してプロット可能です。 |
2021-05-15 17:51:54 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
Python boot camp by Dr.Angela day14 |
https://qiita.com/Shellyhackinglab/items/2ae42d25f34b2b97c4e6
|
PythonbootcampbyDrAngeladayMissiongtgtHigherLowerProgramAとBどちらの方がinstagramのfollower数が多いか、勝ち抜き戦をするゲーム。 |
2021-05-15 17:50:14 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
Pythonでヌメロンを作ってみた |
https://qiita.com/kyo3/items/0b5d02c311aa398b967e
|
最後の処理は、eatカウントと入力した桁数が一致した場合、勝利フラグをtrueにして、while文を抜けることができます。 |
2021-05-15 17:11:25 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Unity パッケージマネージャーエラー |
https://teratail.com/questions/338458?rss=all
|
Unityパッケージマネージャーエラー調べてみたのですが解決方法も原因もわからず質問いたしました。 |
2021-05-15 17:49:28 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
親画面の印刷範囲にならずに子画面の範囲のみ印刷できるようにしたい |
https://teratail.com/questions/338457?rss=all
|
親画面の印刷範囲にならずに子画面の範囲のみ印刷できるようにしたい仕事で抱えている問題で、ソースコードはお見せることができず、解決までいかなくても何かヒント得られたらと思います。 |
2021-05-15 17:43:06 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Nodejsでipを変えてパケットを送信する |
https://teratail.com/questions/338456?rss=all
|
Nodejsでipを変えてパケットを送信するNodejsでipを変更してパケットを送りたいです。 |
2021-05-15 17:37:33 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
gitの追跡を外さずにディレクトリ名を変更したい |
https://teratail.com/questions/338455?rss=all
|
gitの追跡を外さずにディレクトリ名を変更したいわからないこと追跡を維持したままディレクトリ名を変更したいと考えております。 |
2021-05-15 17:36:19 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
unicornと疎通できているか確認したい。 |
https://teratail.com/questions/338454?rss=all
|
unicornと疎通できているか確認したい。 |
2021-05-15 17:26:28 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
sessionをActionCableで送信したメッセージ内で使用する方法 |
https://teratail.com/questions/338453?rss=all
|
sessionをActionCableで送信したメッセージ内で使用する方法ActionCableで送信したメッセージの中で、sessionを使いたいのですが、認識されていません。 |
2021-05-15 17:19:39 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
glfwGetTime();関数を使ってフレームレートを固定する方法が知りたい。 |
https://teratail.com/questions/338452?rss=all
|
glfwGetTime関数を使ってフレームレートを固定する方法が知りたい。 |
2021-05-15 17:05:06 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
webpack問題(Rails 6.1.3.2) |
https://teratail.com/questions/338451?rss=all
|
webpack問題Rails知りたいこと先日Railsのバージョンを最新にしたことにより、コンフリクトが起きて、railsnbsps等のコマンドでエラーが出るようになりました。 |
2021-05-15 17:04:07 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
user以外で本人を見分ける |
https://teratail.com/questions/338450?rss=all
|
現状 |
2021-05-15 17:04:07 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Cupyを実行したときに「NVRTCError: NVRTC_ERROR_COMPILATION (6)」が起きます |
https://teratail.com/questions/338449?rss=all
|
Cupyを実行したときに「NVRTCErrorNVRTCERRORCOMPILATION」が起きます前提・実現したいこと「QuadronbspK」にnvidia社のCUDAnbsptoolkitnbspをインストールし、pythonにてCupyを実行したときエラーメッセージが表示されました。 |
2021-05-15 17:01:57 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
ransackを使う |
https://qiita.com/yuukinakamura0925/items/3d174268b9231053cfad
|
|
2021-05-15 17:39:53 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
CentOS6.xでAmazon EFSとの通信経路をTLS暗号化した時のメモ |
https://qiita.com/nakamura_trinet_co_jp/items/7a87100d281e54b1da00
|
コンパイルに必要なパッケージのインストールyumyinstallgccgitmakenksutilsrpmbuildzlibdevelopensslのインストールsharedライブラリは作成せずアーカイブのみ作成します。 |
2021-05-15 17:49:35 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
【AWS】S3とRoute53についてまとめてみた |
https://qiita.com/Ryo9597/items/6d89595840a659b646cb
|
それではRouteでセカンダリの設定を行いますルートコンソールで「Route」と検索→左ペイン内の「ホストゾーン」を選択→「awslessontk」を選択フェイルオーバーに変更します。 |
2021-05-15 17:38:07 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
ransackを使う |
https://qiita.com/yuukinakamura0925/items/3d174268b9231053cfad
|
|
2021-05-15 17:39:53 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
[ActiveStorage]画像複数枚投稿のエラー |
https://qiita.com/takuo_maeda/items/c6a9f753b995c804c028
|
環境RailsActivestorageRubypDevise現在写真投稿機能にプレビュー機能を追加が終わり、続いて複数枚投稿機能を実装中です。 |
2021-05-15 17:22:15 |
技術ブログ |
Developers.IO |
【AWS CDK】API Gateway と Cognito で Client Credentials Grant による認証を試してみた |
https://dev.classmethod.jp/articles/cognito-client-credentials-by-cdk/
|
apigateway |
2021-05-15 08:38:34 |
技術ブログ |
Developers.IO |
【レポート】AI と機械学習を使ったビジネス課題の解決方法 #AWS-03 #AWSSummit |
https://dev.classmethod.jp/articles/awssummit-2021-aws-03/
|
awsawssummit |
2021-05-15 08:02:31 |
海外TECH |
DEV Community |
Creating Complex Animations using CSS Keyframes (video) |
https://dev.to/thenerdydev/creating-complex-animations-using-css-keyframes-37ib
|
Creating Complex Animations using CSS Keyframes video In this video we will learn how we can create complex animations using CSS Keyframes We will make use of the keyframes CSS rule to define the percentage of time through a timing sequence Follow me on Twitter Instagram |
2021-05-15 08:22:34 |
海外TECH |
DEV Community |
Understanding CSS Transitions (video) |
https://dev.to/thenerdydev/understanding-css-transitions-mm8
|
Understanding CSS Transitions video In this video we will learn about CSS Transitions in great detail Follow me on Twitter Instagram |
2021-05-15 08:21:34 |
海外TECH |
DEV Community |
Django Models Anti Patterns |
https://dev.to/thearjun/django-models-anti-patterns-1ma1
|
Django Models Anti PatternsHello pals While working with Django we all write code that does the job but some code may be performing excessive computations or operations that we are unaware of These operations may be ineffective and or counterproductive in practice Here I am going to mention some anti patterns in Django models A Using len queryset instead of queryset count The queryset in Django are lazily evaluated which means that records in database aren t read from database until we interact with the data len queryset performs the count of database records by Python interpreter in application level For doing so all the records should be fetched from the database at first which is computationally heavy operation Whereas queryset count calculates the count at the database level and just returns the count For a model Post from django db import modelsclass Post models Model author models CharField max length title models CharField max length content models TextField If we use len queryset it handles the calculation like SELECT FROM post which returns a list of records queryset and then python interpreter calculates the length of queryset which is similar to list data structure Imagine the waste in downloading many records only to check the length and throw them away at the end But if we need the records after reading the length then len queryset can be valid If we use queryset count it handles the calculation like SELECT COUNT FROM post at database level It makes the code execution quicker and improves database performance B Using queryset count instead of queryset exists While we kept praising the use of queryset count to check the length of a queryset using it may be performance heavy if we want to check the existence of the queryset For the same model Post when we want to check if there are any post written by author Arjun we may do something like posts by arjun Queryset Post objects filter author iexact Arjun if posts by arjun count gt print Arjun writes posts here else print Arjun doesnt write posts here The posts by arjun count performs an SQL operation that scans every row in a database table But if we are just interested in If Arjun writes posts here or not then more efficient code will be posts by arjun Queryset Post objects filter author iexact Arjun if posts by arjun exists print Arjun writes posts here else print Arjun doesnt write posts here posts by arjun exists returns a bool expression that finds out if at least one result exists or not It simply reads a single record in the most optimized way removing ordering clearing any user defined select related or distinct methods Also checking existence truthiness of queryset like this is inefficient posts by arjun Queryset Post objects filter author iexact Arjun if posts by arjun print Arjun writes posts here else print Arjun doesnt write posts here This does the fine job in checking if there are any posts by Arjun or not but is computationally heavy for larger no of records Hence use of queryset exists is encouraged for checking existence truthiness of querysets C Using signals excessivelyDjango signals are great for triggering jobs based on events But it has some valid cases and they shouldn t be used excessively Think of any alternative for signals within your codebase brainstorm on its substitution and try to place signals logic in your models itself if possible They are not executed asynchronously There is no background thread or worker to execute them If you want some background worker to do your job for you try using celery As signals are spread over separate files if you re working on a larger project they can be harder to trace for someone who is a fresh joiner to the company and that s not great Although django debug toolbar does some help in tracing the triggered signals Let s create a scenario where we want to keep the record of Post writings in a separate model PostWritings class PostWritings models Model author models CharField max length unique True posts written models PositiveIntegerField default If we want to automatically update the PostWritings record for a use based on records created on Post model there are ways to achieve the task with without signals A With Signalsfrom django db models signals import post savefrom django db models import Ffrom django dispatch import receiverfrom models import Post receiver sender Post post save def post writing handler sender instance created kwargs if created writing created PostWritings objects get or create author instance author writing update posts written F posts written B Without SignalsWe need to override the save method for Post model from django db import modelsfrom django db models import Fclass Post models Model author models CharField max length title models CharField max length content models TextField def save self args kwargs Overridden method author self author if self id writing created PostWritings objects get or create author author writing update posts written F posts written super Post self save args kwargs As the same job can be accomplished without signals the code can be easily traced and prevent unnecessary event triggers If someone feels about not having readability on save method here breaking up code is always great Let s do that from django db import modelsfrom django db models import Fclass Post models Model author models CharField max length title models CharField max length content models TextField def update post writing self created False author None if author is not None and craeted writing created PostWritings objects get or create author author writing update posts written F posts written def save self args kwargs Overridden method author self author created self id is None super Post self save args kwargs self update post writing created author Looks like we ve learned how to mitigate some Django Model Anti Patterns For now thank you everyone for having me here I ll be continuing with more stuffs about Django very soon You can also find me on GitHub Till then keep coding |
2021-05-15 08:17:44 |
Apple |
AppleInsider - Frontpage News |
How to make a QR code on your iPhone to connect guests to your Wi-Fi |
https://appleinsider.com/articles/21/05/14/how-to-make-a-qr-code-to-connect-guests-to-your-wi-fi?utm_medium=rss
|
How to make a QR code on your iPhone to connect guests to your Wi FiRather than have a guest select your Wi Fi network and then enter a fiddly password just make them a QR code their iPhone can read Here s how to do it Give your guests a QR code and they can instantly log on to your Wi Fi networkYou wouldn t want to put a QR code for accessing your network up on street corners like a lost cat photo Yet when someone you trust comes to your house giving them your Wi Fi password is as important as showing them where the restroom is ーif fiddlier Read more |
2021-05-15 08:32:08 |
海外科学 |
NYT > Science |
What We Know About China’s Mars Rover Zhurong Landing |
https://www.nytimes.com/2021/05/14/science/china-mars.html
|
competition |
2021-05-15 08:46:43 |
海外ニュース |
Japan Times latest articles |
Pandemic to be ‘far more deadly’ this year, WHO warns |
https://www.japantimes.co.jp/news/2021/05/15/world/who-2021-coronavirus-warning/
|
variants |
2021-05-15 18:52:57 |
海外ニュース |
Japan Times latest articles |
Businesses hope tougher COVID-19 measures will speed return to normal |
https://www.japantimes.co.jp/news/2021/05/15/business/economy-business/japan-emergency-economy-coronavirus/
|
Businesses hope tougher COVID measures will speed return to normalSome businesses have lamented the delay in implementing the new restrictions criticizing the central government for a lack of foresight |
2021-05-15 18:14:12 |
海外ニュース |
Japan Times latest articles |
Japan secures extra Pfizer vaccine doses for 25 million people |
https://www.japantimes.co.jp/news/2021/05/15/national/pfizer-vaccines-japan/
|
Japan secures extra Pfizer vaccine doses for million peopleCombining the additional million doses under the deal with the million under its previous Pfizer contract Japan will be able to inoculate |
2021-05-15 18:05:31 |
海外ニュース |
Japan Times latest articles |
Sip, snack and stand in style at No. 502 |
https://www.japantimes.co.jp/life/2021/05/15/food/sip-snack-no-502-wine-bar/
|
stores |
2021-05-15 19:00:00 |
海外ニュース |
Japan Times latest articles |
Pioneering composer Terry Riley finds himself comfortably marooned in Japan |
https://www.japantimes.co.jp/culture/2021/05/15/music/composer-terry-riley-japan/
|
stravinsky |
2021-05-15 19:00:13 |
海外ニュース |
Japan Times latest articles |
Ransomware is a national security threat. Treat it like one. |
https://www.japantimes.co.jp/opinion/2021/05/15/editorials/ransomware-is-a-national-security-threat/
|
Ransomware is a national security threat Treat it like one In the Colonial Pipeline attack the perpetrator was identified as a cybercriminal group called DarkSide which admitted its involvement but said it did not want |
2021-05-15 19:00:27 |
ニュース |
BBC News - Home |
Covid: Get the jab plea as Army deployed in hotspots |
https://www.bbc.co.uk/news/uk-57126318
|
indian |
2021-05-15 08:28:37 |
ニュース |
BBC News - Home |
Israel-Gaza violence: US envoy arrives for de-escalation talks |
https://www.bbc.co.uk/news/world-middle-east-57125479
|
casualties |
2021-05-15 08:35:07 |
北海道 |
北海道新聞 |
大型店に土日休業要請 道方針 札幌など重点地域 緊急事態16日発令 |
https://www.hokkaido-np.co.jp/article/544155/
|
緊急事態 |
2021-05-15 17:18:04 |
北海道 |
北海道新聞 |
函館在住3人感染 新型コロナ |
https://www.hokkaido-np.co.jp/article/544193/
|
釧路市 |
2021-05-15 17:15:00 |
北海道 |
北海道新聞 |
トライアスロン、小田倉真16位 横浜大会、五輪最有力 |
https://www.hokkaido-np.co.jp/article/544190/
|
世界シリーズ |
2021-05-15 17:12:00 |
北海道 |
北海道新聞 |
将棋、西山女王が4連覇に王手 マイナビ女子オープン第3局 |
https://www.hokkaido-np.co.jp/article/544189/
|
連覇 |
2021-05-15 17:12:00 |
北海道 |
北海道新聞 |
妊婦にワクチン「メリット大」 新型コロナで学会 |
https://www.hokkaido-np.co.jp/article/544188/
|
日本産科婦人科学会 |
2021-05-15 17:12:00 |
北海道 |
北海道新聞 |
道内2人死亡、566人感染 新型コロナ 札幌は344人 |
https://www.hokkaido-np.co.jp/article/544165/
|
新型コロナウイルス |
2021-05-15 17:09:56 |
北海道 |
北海道新聞 |
マンダム、38年ぶりロゴ刷新 「M」や笑顔をイメージ |
https://www.hokkaido-np.co.jp/article/544187/
|
化粧品メーカー |
2021-05-15 17:02:00 |
北海道 |
北海道新聞 |
浅草の三社祭、静かな初夏の訪れ コロナで名物みこし中止 |
https://www.hokkaido-np.co.jp/article/544186/
|
東京都台東区 |
2021-05-15 17:02:00 |
コメント
コメントを投稿