投稿時間:2021-05-20 00:42:35 RSSフィード2021-05-20 00:00 分まとめ(56件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT 気になる、記になる… Appleの整備済み商品情報 2021/5/19 https://taisy0.com/2021/05/19/140689.html apple 2021-05-19 14:23:16
AWS AWS Why am I unable to run sudo commands on my EC2 Linux instance? https://www.youtube.com/watch?v=TFXlGD613Bw Why am I unable to run sudo commands on my EC Linux instance Skip directly to the demo For more details see the Knowledge Center article with this video Ibrahim shows you why you are unable to run sudo commands on my EC Linux instance Subscribe More AWS videos More AWS events videos AWS 2021-05-19 14:01:07
python Pythonタグが付けられた新着投稿 - Qiita Amazon Interactive Video Service (IVS) を使って特定ドメインでのみ再生可能なライブ配信を行う https://qiita.com/t-kigi/items/c9cf38af74ab759885ed 例えば動画配信システムとしてVimeoを利用し、ウェブサイトで組み込みプレイヤーを利用する場合、動画・ライブイベント単位で「どのドメインであれば組み込みプレイヤーでの再生を許可する」という設定を行うことができるので、これで動画のURLが外に漏れても、その動画を再生できないようにしている。 2021-05-19 23:38:32
python Pythonタグが付けられた新着投稿 - Qiita conda install tensorflow-gpuではCUDA11が入らず、RTX30シリーズが使えない(2021/05/19) https://qiita.com/gomeshun/items/a8eb228dc1f170375a4f TensorFlowはバージョン以降からCPU版とGPU版とが統合したのだが、Anacondaのmklビルド版condainstalltensorflowだとこっちが入るを使う限りはバージョンであってもGPUが使えない。 2021-05-19 23:24:41
python Pythonタグが付けられた新着投稿 - Qiita Power Automate Desktop「ループを使わないリスト内の検索」 https://qiita.com/sys_zero/items/0415daa510abf8002daf スクリプトの実行アクションにリストを渡す場合はテキストに変換する必要があります。 2021-05-19 23:24:11
js JavaScriptタグが付けられた新着投稿 - Qiita child_processでデータ転送する時、進捗を取得する https://qiita.com/tmtok/items/4ba79bfa9b549e3b981f childprocessでデータ転送する時、進捗を取得する概要ローカルマシンからリモートマシンにデータ転送する時、進捗を取得する方法で少し手こずったのでメモ。 2021-05-19 23:18:08
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) テラテイルの回答者減ったな https://teratail.com/questions/339288?rss=all 回答者 2021-05-19 23:56:43
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) インラインSVGで画像を回転させたいが、中心軸を設定できない https://teratail.com/questions/339287?rss=all インラインSVGで画像を回転させたいが、中心軸を設定できないインラインSVGの中のimage要素を回転させたいのですが、image要素に対してrotateを設定しても、回転軸がsvg要素の左上となってしまいます。 2021-05-19 23:48:19
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) SendmailでSMTP-AUTHを設定したいです https://teratail.com/questions/339286?rss=all SendmailでSMTPAUTHを設定したいですRedHatのサーバにsendmailとcyrussaslをyumでインストールし、SMTPnbspAUTHを利用してメールを送れるようにしたいのですが、認証アカウントが作れないのか、上手くいきません。 2021-05-19 23:45:09
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) evalではなくFunctionで計算処理をしたい https://teratail.com/questions/339285?rss=all evalではなくFunctionで計算処理をしたい実装したいこと計算アプリを作っています。 2021-05-19 23:42:01
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) DockerでPHPからMySQLに接続ができません https://teratail.com/questions/339284?rss=all DockerでPHPからMySQLに接続ができませんWindowsからDockerを利用してApachePHPMySQLの環境を作ろうと思いDockerfileとdockercomposeを利用しました。 2021-05-19 23:28:01
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) android studio。kotlinで暗号化した文字列を復号する方法。 https://teratail.com/questions/339283?rss=all androidstudio 。 2021-05-19 23:27:06
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Module not foundでInternal Server Errorになりました。 https://teratail.com/questions/339282?rss=all Modulenotfound で InternalServerError に なり まし た 。 2021-05-19 23:12:55
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) iOSの写真の重複チェックをしたい https://teratail.com/questions/339281?rss=all swift 2021-05-19 23:12:50
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) rails プロフィール画像が更新できない https://teratail.com/questions/339280?rss=all railsプロフィール画像が更新できない前提・実現したいことdockerを用いてSNS、webアプリを作成中です。 2021-05-19 23:11:28
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Import "requests" could not be resolved from source https://teratail.com/questions/339279?rss=all Importquotrequestsquotcouldnotberesolvedfromsource環境WindowsnbspnbspVScordimportrequestsと入力すると問題の所に以下のメッセージが出ます。 2021-05-19 23:07:05
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) chart.jsのtooltipsでlabelの値の受け取り方と加工方法がわからない https://teratail.com/questions/339278?rss=all chartjsのtooltipsでlabelの値の受け取り方と加工方法がわからない前提・実現したいことchartjsのtooltipsのlabel項目で、もともとあるlabelの値引数を受け取って、計算を加えて表示したい発生している問題・エラーメッセージ現在こちらのサイトを参考にtooltipsの項目を作成してみたのですが、もともとあるlabelの項目が受け取れずにundefinedになってしまいます。 2021-05-19 23:05:32
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) コンタクトフォームで入力した内容がメールの送信先でひきつがれません。 https://teratail.com/questions/339277?rss=all コンタクトフォームで入力した内容がメールの送信先でひきつがれません。 2021-05-19 23:05:02
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 最大値と最小値を除く乗算結果 https://teratail.com/questions/339276?rss=all 最大値と最小値を除く乗算結果前提・実現したいことarraynbspnbspこの個の整数が格納されおり、この配列arrayより最大値と最小値を除外した乗算結果を求めたいです発生している問題・エラーメッセージ最大値と最小値を除く乗算結果がになる。 2021-05-19 23:04:38
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) gRPCにて受け取ったjsonをそのまま返したい https://teratail.com/questions/339275?rss=all gRPCにて受け取ったjsonをそのまま返したい実現したいこと以下のようなprotoファイルがあったとして、Response部分をどのように記述すればよいか教えていただきたいです。 2021-05-19 23:04:36
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) openstackのポート設定について https://teratail.com/questions/339274?rss=all openstackのポート設定についてお伺いしたいこと今度業務で初めてopenstackでのポート作成を行うため、自分なりに作業内容を理解したく調べているのですが、各フィールドの設定内容が分からず、設定内容について記載されている資料を教えていただけないでしょうか。 2021-05-19 23:00:37
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) if(isset)の使い方? https://teratail.com/questions/339273?rss=all ifissetの使い方ifquestionanswerresult正解scoretensuuelseresult不正解・・・answerこれを、そもそもquetionに値が入っていない場合は全部スルーしたいのですが、ifissetampquetionifquestionanswerresult正解scoretensuuelseresult不正解・・・answer等とすると、エラーになってしまいます、どうすれば良いでしょう。 2021-05-19 23:00:36
Ruby Rubyタグが付けられた新着投稿 - Qiita Formオブジェクト https://qiita.com/tatsunori-abe/items/d73696b2dcfea929e822 FormオブジェクトFormオブジェクトつのフォーム送信で複数のモデルを操作したい場合や、テーブルに保存しない情報にバリデーションを設定したい場合に使います。 2021-05-19 23:37:43
Ruby Rubyタグが付けられた新着投稿 - Qiita 未経験者がポートフォリオ作ってみた(構想〜デプロイ) https://qiita.com/niikikoh/items/cb79c17d808429a6fc45 未経験者がポートフォリオ作ってみた構想デプロイ自己紹介現職建設業年月未経験からエンジニアを目指しRubyを学習中です。 2021-05-19 23:03:49
AWS AWSタグが付けられた新着投稿 - Qiita Amazon Interactive Video Service (IVS) を使って特定ドメインでのみ再生可能なライブ配信を行う https://qiita.com/t-kigi/items/c9cf38af74ab759885ed 例えば動画配信システムとしてVimeoを利用し、ウェブサイトで組み込みプレイヤーを利用する場合、動画・ライブイベント単位で「どのドメインであれば組み込みプレイヤーでの再生を許可する」という設定を行うことができるので、これで動画のURLが外に漏れても、その動画を再生できないようにしている。 2021-05-19 23:38:32
AWS AWSタグが付けられた新着投稿 - Qiita AWS App Runner がすごそう。 Fargate や Heroku の代替になりそう https://qiita.com/acro5piano/items/29afe4b47ea9ec1814cb AppRunnerが普及したら、EKSじゃなくてAppRunnerで良いよって言われるのだろうか。 2021-05-19 23:25:10
Docker dockerタグが付けられた新着投稿 - Qiita AWS App Runner がすごそう。 Fargate や Heroku の代替になりそう https://qiita.com/acro5piano/items/29afe4b47ea9ec1814cb AppRunnerが普及したら、EKSじゃなくてAppRunnerで良いよって言われるのだろうか。 2021-05-19 23:25:10
Ruby Railsタグが付けられた新着投稿 - Qiita Formオブジェクト https://qiita.com/tatsunori-abe/items/d73696b2dcfea929e822 FormオブジェクトFormオブジェクトつのフォーム送信で複数のモデルを操作したい場合や、テーブルに保存しない情報にバリデーションを設定したい場合に使います。 2021-05-19 23:37:43
Ruby Railsタグが付けられた新着投稿 - Qiita gem 'simple_calendar', '~> 2.0' https://qiita.com/gotokoki1/items/b01fab9b8ba5cd5eeb4c gemxsimplecalendarxxgtxRailsでカレンダーを導入するgemgemsimplecalendargt上記gemをgemfileの番下に記述し、bundleinstallを行います。 2021-05-19 23:28:22
Ruby Railsタグが付けられた新着投稿 - Qiita 【Rails】save!を実行したとき、ActiveRecord::RecordInvalid (Validation failed: User must exist):と表示されたときの対処法 https://qiita.com/GalaxyNeko/items/d327bb0f467ff6feb60f 【Rails】saveを実行したとき、ActiveRecordRecordInvalidValidationfailedUsermustexistと表示されたときの対処法症状以下のsaveメソッドを実行した際に、以下のエラーメッセージが表示されました。 2021-05-19 23:01:30
技術ブログ Developers.IO AKIBA.AWS ONLINE #03 -「TerraformとCloudFormationどちらを採用すべき?」というタイトルで登壇しました https://dev.classmethod.jp/articles/terraform-or-cloudformation/ akibaawsonline 2021-05-19 14:32:24
技術ブログ Developers.IO Save files attached to an email in OneDrive and move the email using Power Automate https://dev.classmethod.jp/articles/save-email-files-in-onedrive-move-email-using-power-automate/ Save files attached to an email in OneDrive and move the email using Power AutomateIFTTT Zapier Integromat these automation tools integrate with a bunch of apps On the other hand the sup 2021-05-19 14:26:04
海外TECH DEV Community 50 Projects in 50 Days, 5/5 there! 🌻 https://dev.to/chiaraintech/50-projects-in-50-days-5-5-there-3fb2 Projects in Days there Yesssss I made it Not exactly projects for days but almost Doing a small or medium project a day has not only improved my DOM skills massively but it also taught me that discipline is the only way forward as you won t always be motivated to code especially when days start to be a bit brighter and warmer But let s jump into my last projects st Project Validate Accountin this project we used Webkit something that I had always putting off learning probably just because I didn t fancy writing too many s as at work we already use BEM block element modifier methodologies Researching it I discovered that is is a simple HTML and CSS web browser rendering engine used by popular browsers such as Chrome and Safari Also from what I understood from a Stack Overflow answer it is used as a prefix on CSS selectors for properties that you only want to use on a certain engine and many hope that this specification goes away eventually code webkit inner spin button webkit appearance none margin The actual JavaScript code wasn t super hard though I hard a rather hard time understanding why the key I needed was keydown rather than keyup Yes I still have some issues with some event listeners when it comes to keys events as so much stuff has also now been deprecated codes forEach code index gt code addEventListener keydown e gt if e key gt amp amp e key lt codes index value setTimeout gt codes index focus else if e key Backspace setTimeout gt codes index focus nd Project Live User FilterThis project was similar to the GitHub profiles one though in this case we query the Randomuser API instead The aim is to have a text input where the user types either a name or a location and then the code will filter by the inputted words and show a picture with the related info async function getData const res await fetch const results await res json result innerHTML results forEach user gt const li document createElement li listItems push li li innerHTML lt img src user picture large alt user name first gt lt div class user info gt lt h gt user name first user name last lt h gt lt p gt user location city user location country lt p gt lt div gt result appendChild li rd Project Feedback UI DesignWell this was a change I learnt about Event Bubbling in this project as a way to avoid another forEach loop Event bubbling is a funny name to refer to the actual bubbling up of events from the DOM tree up It is very interesting and also very functional as it saves up a lot of code and repetition Essentially instead of targeting each child element of a parent node element you attach an eventListener to the parentNode or parentElement so that it ll act onto how many children you set it to panel addEventListener click e gt if e target parentNode classList contains rating If the parent node contains rating class removeActive e target parentNode classList add active defaultRating e target nextElementSibling innerHTML th Project Custom Range SliderThis project was harder than I expected with a lot of edge cases to account for such as using webkit to cater for different browsers and a couple new methods I wasn t aware of The goal of the project is to move the label of a progress bar toward whichever direction I am dragging the circle towards The two new methods I have learnt here are the window s getComputedStyle and the CSS method getPropertyValue The first returns all of the CSS properties applied to the element I target and the second gets me whichever property I want from it const range document getElementById range range addEventListener input e gt const value e target value const label e target nextElementSibling const rangeWidth getComputedStyle e target getPropertyValue width const labelWidth getComputedStyle label getPropertyValue width const numRangeWidth rangeWidth substring rangeWidth length const numLabelWidth rangeWidth substring labelWidth length const max e target max const min e target min const left value numRangeWidth max numLabelWidth label style left left px label innerHTML value th Project Netflix NavigationThis mobile menu navigation reminded me of the th project which was roughly the same just with a bit less JavaScript code and a rotating effect The aim of this project was instead to replicate Netflix s mobile menu using the burger menu icon As I said previously l have now understood the general concepts used to do the main effects so I am focusing here on the smaller details and properties such as text transform which is the CSS version of the JavaScript method toUpperCase I also played around with transition delay and text decoration nav black background color rgb width max width px min width px transition delay s th Project Quiz AppThis was a fun and rather fun one The data is in an array ready to be queried so it makes it easier for the data to be grabbed I got to practice my ever lasting issues with indexes and iteration which was good though I think that what makes it hard for me to distinguish between indexes and variables is that indexes which in my mind are integers sometimes are called with string names submitBtn addEventListener click gt const answer getSelected if answer if answer quizData currentQuiz correct score currentQuiz if currentQuiz lt quizData length loadQuiz else quiz innerHTML lt h gt You answered correctly at score quizData length questions lt h gt For example on line I am checking whether the answer which I previously obtained by checking its ID correspond to the correct one for whichever page of the quiz I am looking at In this case currentQuiz is the index which I use to identify which page of the quiz I am on The index then gets increased on line to move to the next quiz th Project Testimonial BoxCute little project to display testimonials in boxes and with a progress bar to allow the user to see how long it takes to disappear and move to the next profile The only new thing here was the animation of the progress bar which we animated via CSS using a linear infinite animation of seconds which we defined in keyframes so that it would effectively grow from to in on the X horizontal axis starting from the left side if left without transform origin it would start from the middle of the bar and grow towards both directions progress bar background color white height px width animation grow s linear infinite transform origin left keyframes grow transform scaleX media max width px fa quote display none testimonial container padding px px th Project Random Image FeedA very short and straight to the point project not much different from what I have been doing already in the other projects th Project Todo ListAaaaah and we eventually got there The prettier spin off of the notes app but I like styling DOM elements so it was rather fulfilling in the end The only thing that changes from a normal todo list is the fact that I am making use of contextmenu to perform the deletion operation This simply means that I only had to right click on one item so that it disappeared from the DOM rather handy On the other hand by using the usual click event I draw a line through as I apply the following css text decoration line through todos li completed color grey text decoration line through I also like that we worked a bit on the localStorage by setting and getting the key value pairs to and from it After each event has ended we update the localStorage so that it reflects the changes that we have made function updateLocalStorage todosElement document querySelectorAll li const todos todosElement forEach todoElement gt todos push text todoElement innerText completed todoElement classList contains completed localStorage setItem todos JSON stringify todos function addTodo todo let todoText input value if todo todoText todo text if todoText const todoElement document createElement li if todo amp amp todo completed todoElement classList add completed todoElement innerText todoText todoElement addEventListener click gt todoElement classList toggle completed updateLocalStorage todoElement addEventListener contextmenu e gt e preventDefault todoElement remove updateLocalStorage todosUL appendChild todoElement input value updateLocalStorage th Project Insect Catch GameYes we made it It wasn t exactly days but almost This last project was one of the longest ones with a lot of DOM functionality and manipulations which I found fun but that I think I might done with now not sure if you noticed but toward the end of the projects stuff got a tad repetitive though still very useful and engaging All in all it was a very good exercise I learnt a lot and I am sure that after over hours spent on this set of projects I will not forget anything 2021-05-19 14:40:17
海外TECH DEV Community Numpy in Python. https://dev.to/killingclown007/numpy-in-python-ia8 Numpy in Python IntroductionNumpy which stands for Numeric Python is a Python library used for working with arrays It also has functions for working in the domain of linear algebra Fourier transform and matrices NumPy was created in by Travis Oliphant as an open source project and one can use it freely Why Numpy Numpy is a Python library that is written in Python but the parts that require fast computation are written in C or C For this reason working with Numpy array is much faster than working with Python lists Numpy being an open source project has thousands of contributors working to keep NumPy fast friendly and bug free Numpy is hugely popular these days due to its use in various fields and tasks Uses of Numpy Numpy has numerous uses Normal arithmetic and statistical operations are simple to implement Numpy Various trigonometric calculations can also be done Other uses are broadcasting linear algebra matrix operations stacking copying and manipulating arrays 2021-05-19 14:39:11
海外TECH DEV Community VacCoWIN - One Stop Solution for Booking Vaccination Slots available in the CoWIN Portal directly from your Terminal... https://dev.to/dhhruv/vaccowin-one-stop-solution-for-booking-vaccination-slots-available-in-the-cowin-portal-directly-from-your-terminal-5a18 VacCoWIN One Stop Solution for Booking Vaccination Slots available in the CoWIN Portal directly from your Terminal IntroductionCoWIN Portal is used to self register yourself for the Vaccination process in India Here you can register yourself with your Phone Number and avail a slot from the available slots in various Vaccination Centres around the country AboutVacCowin is a CLI based Python Script that can be used to perform tasks such as OTP Generation till Vaccination Slot Booking from Co WIN Platform directly from your Terminal This script rechecks after every few seconds and when the slots are available it confirms the slot only after you enter the captcha shown on the screen Since India has started the Vaccination Drive for those above years of age there is a very heavy rush and slots get booked soon This script will come in handy for booking those slots as soon as they open IMPORTANT This is a Proof of Concept POC Project I OR the Team do NOT endorse or condone in any shape or form automating any monitoring booking tasks It s only made for Educational Purposes Use this at your own risk The data used is retrieved using the open APIs at API Setu It works on both Linux and Windows dhhruv Vac Cowin One Stop Solution for Booking Vaccination Slots available in the CoWIN Portal directly from your Terminal Getting StartedInstall PythonClone this repository git clone ORDownload the Zip and Extract the content Install create and activate virtual environment For instance we create a virtual environment named venv pip install virtualenvpython m virtualenv venvvenv Scripts activate batInstall dependenciescd Vac Cowinpip install r requirements txt dhhruv Vac Cowin One Stop Solution for Booking Vaccination Slots available in the CoWIN Portal directly from your Terminal UsageWill be Updated after Testing Check out yourself and send me a Screenshot if found useful ContributingAny contributions you make are greatly appreciated Fork the ProjectCreate your Feature Branch git checkout b feature AmazingFeature Commit your Changes git commit m Add some AmazingFeature Push to the Branch git push origin feature AmazingFeature Open a Pull Request LicenseDistributed under the MIT License See LICENSE for more information Team Members Dhruv Panchal Urveshkumar Patel Nirja Desai dhhruv Vac Cowin One Stop Solution for Booking Vaccination Slots available in the CoWIN Portal directly from your Terminal Important This is a Proof of Concept Project I OR the Team do NOT endorse or condone in any shape or form automating any monitoring booking tasks It s only made for Educational Purposes Use this at your own risk This Python Script CANNOT book slots automatically It doesn t skip any of the steps that a User would have to take on the official portal You will still have to enter the OTP and Captcha as you do in the CoWIN Portal Do NOT use unless all the beneficiaries selected are supposed to get the same Vaccine and Dose There is no option to Register a new Phone Mobile or add beneficiaries for now This can be used only after beneficiary has been added through the official Portal App Be careful if you re choosing to use the auto book feature It will blindly select first available Vaccination Centre Date Both Sorted Ascending and a RANDOM slot I would not recommend using this feature unless and until it s crucial If you accidentally booked a slot you didn t want to then don t worry You can always log in to the CoWIN Portal and cancel re schedule that API Details Do read the first paragraph 2021-05-19 14:29:26
海外TECH DEV Community How to Create a Virtual Assistant Using Python https://dev.to/rohit19060/how-to-create-a-virtual-assistant-using-python-4h7l How to Create a Virtual Assistant Using PythonHey Guys Today let s create something interesting a virtual assistant A computer is a device that helps everyone to achieve things fast It does things faster than humans and it did not get bored whenever it performs a repetitive task We can automate our repetitive tasks using a computer so tasks can perform fast and we just need to convey to a computer either by giving a voice command or by typing the command First we need to think about the task that we want the assistant to perform and how it can automate it like greet us whenever we want to execute something tell us the date time news weather jokes send emails send messages open something in a computer tell us internal information about computers like cup usage and much more We can make Functions or write simple codes to make it work For making these tasks in python we need to install a couple of packages You can use the below commands for that Open terminal with administration privileges execute these commands either one by one or write the package name together pip install SpeechRecognition for Voice commandspip install clipboard For working with clipboardpip install newsapi For Getting newspip install newsapi python For News apipip install psutil For getting compute infopip install pyaudio For working with audiopip install pyautogui For performing some GUI operationpip install pyttsx For Voice InteractionYou can use other packages as well and different functionalities with these Let s jump into the codingInitially we need to import the packages as in every Python Programimport clipboardimport datetimeimport osimport psutilimport pyautoguiimport pyjokesimport pyttsximport pywhatkitimport requestsimport smtplibimport speech recognition as srimport time as tiimport webbrowser as wefrom email message import EmailMessagefrom newsapi import NewsApiClientfrom secrets import senderemail passwordfrom time import sleepNow I would like to set the variables for user name and assistant name so it can be changed easily if we want user Rohit assistant Jarvis Iron man FanThen forgetting voice output we need to use pyttsx Initialize Pyttsx Engineengine pyttsx init voices engine getProperty voices For Mail voice AKA Jarvisengine setProperty voice voices id For Female voice AKA Friday engine setProperty voice voices id These are the voices of Microsoft David Male and Microsoft Zira Female Voice for the windows narrator program You can install other voices as well but I find that a bit laggy and everything is not covered in them Input Output Functionsdef output audio print audio For printing out the output engine say audio engine runAndWait For getting the device index you can execute this code So if you want to change the device you can do that for index name in enumerate sr Microphone list microphone names print Microphone with name found for Microphone device index format index name def inputCommand query input For getting input from CLI r sr Recognizer query with sr Microphone device index as source print Listening r pause threshold try query r recognize google r listen source language en IN except Exception as e output Say that again Please return queryUp to this we are just setting the things for an assistant Now we will make functions for our tasks Greet Functiondef greet hour datetime datetime now hour if hour gt and hour lt output f Good Morning user elif hour gt and hour lt output f Good afternoon user elif hour gt and hour lt output f Good Evening user output How may I assist you Email Function You can also use a secret file and store these variables there as I am doing or If you not going to show this code to anyone that you can it here as well def sendEmail senderemail kingtechnologies gmail com password email list test bojole httptuan com Temporary Email test lt Your Friends family or business email here gt try email EmailMessage output To whom you want to send the mail name inputCommand lower email To email list name output What is the subject of the mail email Subject inputCommand email From senderemail output What should i Say email set content inputCommand s smtplib SMTP smtp gmail com s starttls s login senderemail password s send message email s close output Email has sent except Exception as e print e output Unable to send the Email Send Whatsapp Message FunctionIt is utilizing the web browser packagedef sendWhatMsg user name Jarvis try output To whom you want to send the message name inputCommand output What is the message we open user name name amp text inputCommand sleep pyautogui press enter output Message sent except Exception as e print e output Unable to send the Message Weather FunctionFor Weather we can use OpenWeatherMap APIdef weather city jaipur res requests get f city amp appid fafadfdebaeeeceb amp units metric json temp res weather description temp res main temp output f Temperature is format temp degree Celsius nWeather is format temp News FunctionFor News we can use the News API packagedef news newsapi NewsApiClient api key bfbfcfefc output What topic you need the news about topic inputCommand data newsapi get top headlines q topic language en page size newsData data articles for y in newsData output y description Idea FunctionWe can use file handling for that it s quite reliable storage but we need to implement it carefullydef idea output What is your idea data inputCommand title output You Said me to remember this idea data with open data txt a encoding utf as r print data file r Now the last part i e Function calling based on Command and some inline executionFirst of all the greet functiongreet Then with while true we can make it a infinite loop on commandwhile True Getting input from the user query inputCommand lower According to the query if query have respective word we will execute the respective command if time in query output Current time is datetime datetime now strftime I M elif date in query output Current date is str datetime datetime now day str datetime datetime now month str datetime datetime now year elif email in query sendEmail elif message in query print Sending sendWhatMsg elif search in query output what you want to search we open inputCommand elif youtube in query output What you want to search on Youtube pywhatkit playonyt inputCommand elif weather in query weather elif news in query news elif read in query output clipboard paste elif covid in query r requests get json output f Confirmed Cases r cases nDeaths r deaths nRecovered r recovered elif workspace in query output Which workspace you want to work on os startfile D Work Spaces inputCommand code workspace elif joke in query output pyjokes get joke elif idea in query idea elif do you know in query ideas open data txt r output f You said me to remember these ideas n ideas read elif screenshot in query pyautogui screenshot str ti time png show elif cpu in query output f Cpu is at str psutil cpu percent elif offline in query hour datetime datetime now hour if hour gt and hour lt output f Good Night user Have a nice Sleep else output f By user quit Based on different input we are executing different task is this way our assistant can have so much functionality we can utilizeThis is all For this blog as I mentioned earlier you can customize it according to you and you can check out the GitHub repo for complete code Let me know if you have any questions or queries I ll be happy to help you Like share and follow You can also check my other profiles on King Technologies Thanks for reading 2021-05-19 14:20:23
海外TECH DEV Community How to populate nested document in MongoDB. https://dev.to/rajeshroyal/how-to-populate-nested-document-in-mongodb-3a91 How to populate nested document in MongoDB Recently I run into a situation where I needed to fetch nested mongodb document data and wasted my hour If you are facing the same this is for you Here is the stackoverflow Populate nested array in mongooseI used this query public courseListRead Promise lt ICourse gt return this courseModel find sort index populate instructor populate path categories populate path posts model CourseCategoryPost exec To populate nested documents you have to use this query I m very beginner at MongoDB Thanks 2021-05-19 14:20:06
海外TECH DEV Community [Bonita UI Designer] creating Custom widget for BPMN Visualization https://dev.to/aibcmars/bonita-ui-designer-creating-custom-widget-for-bpmn-visualization-44lk Bonita UI Designer creating Custom widget for BPMN Visualization AbstractThe Bonita platform offers a graphical web UI editor called Bonita UI Designer If you use Bonita UI Designer to develop forms and pages for a process application on the Bonita BPMN platform you may want to create custom widgets and this is an article that offers some ideas and instructions Specifically you will see how easy it is to create a preview for the Bonita BPMN model in a UI Designer Page Note that the DiagramAPI used in this example is only available in Enterprise Edition Nevertheless you can use any BPMN diagram file created externally to present it and use process analytics API to show some additional informative layers What will be described through the guide We will first create a custom widget then place it in the UI Designer Page Then we will create some variables and API calls to obtain the desired process Finally we will put it all together and pass the chosen process to the widget so it is rendered and visible To render the BPMN model in this example we will use the Open Source Apache library called BPMN Visualization Find more information about this library in the GitHub repository BPMN Visualization Create a Custom WidgetLaunch UI DesignerCreate the new Artifact of type Custom WidgetType bpmnVisualization as Custom widget name and click Create You will land in the WIDGET EDITOR Few things to be done here Template replace default template div with lt div id bpmn container gt lt div gt Controller your function should look like one belowfunction scope initialize rendering library added in the assets const bpmnVisualization new bpmnvisu BpmnVisualization window document getElementById bpmn container load diagram when ready scope watch properties bpmnXmlString function var bpmnXml scope properties bpmnXmlString if bpmnXml bpmnVisualization load bpmnXml Define property bpmnXmlStringAdd the new asset bpmn visualization js Type JavaScript Source External URL version dist bpmn visualization js Application PageCreate the new Artifact of type Application PageFor the name you can use bpmnVisualization click Create You will land in the PAGE EDITOR The final page should look like that The layout is really up to you feel free to adjust anything you wish The core elements to make it work are as follow Variables diagramId Type String ー it will hold the id of the chosen process diagram processesAPI Type ExternalAPI API URL API bpm process f activationState ENABLED amp p amp c amp o version desc ー it will hold available accessible processes diagramAPI Type External API API URL API bpm diagram diagramId  ー it will hold the String representation of BPMN xml definition We need to link these variables to proper elements Select setup Available values processesAPI Displayed key name Returned key id Value diagramId Custom Widget bpmnVisualization setup BPMN xml string diagramAPI Optionally we can set up the input on the right side of the Select to show us the currently chosen diagramId Value diagramId Type textWe are all set PreviewFor the preview purpose I have created a simple process called Work travel in the Bonita Studio Please make sure the user with who you are testing has required permissions an entry in Process Manager mapping concerning the desired process to be checked in Bonita Portal Once we click on the Preview button in UI Designer we should see the page where we can choose the process I have simply chosen Work travel and the output looks like this WORTH TO NOTE The Open Source Apache rendering library BPMN Visualization is highly customizable You can check the examples here To preview the code of the mentioned examples go directly to the bpmn visualization examples repository 2021-05-19 14:18:37
海外TECH DEV Community How to make a Telegram bot with Rust Teloxide https://dev.to/steadylearner/how-to-make-a-telegram-bot-with-rust-teloxide-m60 How to make a Telegram bot with Rust TeloxideIn this post you will learn how to make a simple Telegram bot with Rust similar to the cover of this post I am playing with blockchain and cryptocurrency recently and will write some blog posts to be familiar with them and share my learning While the code used here is very simple hope it can be helpful to you to start with Rust You can find code used for this post here We will use Teloxide and binance rs There are a few Rust Telegram framework but I decided to use Teloxide because you can get help from its authors easily with its Telegram channel Please spend time to read the documentations before you read on If you don t have Rust in your machine yet please follow the instruction of the official Rust website You can also optionally install cargo edit and cargo watch to help you develop better cargo install cargo edit cargo install cargo watchI referred it before I write this post If you are familiar with JavaScript it can be helpful to read that first To test this tutorial you need at least a Telegram account You can also create account at Binance if you want to use its API more later Table of ContentsSet up Telegram bot with BotFather Prepare the development environment to use Teloxide and binance rs Build your Telegram bot to find a cryptocurrency price with them Conclusion Set up Telegram bot with BotFatherTo make a Telegram bot we need to make an API token and set it up first Please visit the BotFather page Then use the help command It will show the commands you can use with it There are many but you will need only a few of them to start with CREATE LIST DELETE newbot create a new bot mybots list your bots deletebot delete a botUPDATE META DATA setname change a bot s name setdescription change bot description setabouttext change bot about info setuserpic change bot profile photoYou can start your bot with newbot command and follow its instruction Use binance bot for your botname or use whatever you want You will have a token if you see the message similar to this Save your token well to use it later at env file we will make Then you can use setuserpic to save your bot image I used Binance image But you can use whatever you want later Congratulations if you could make it to this point you are ready to write a Telegram bot with whatever programming language Prepare the development environment to use Teloxide and binance rsPreviously we could set up a Telegram bot and get a API token to remotely control it with the Rust code we will write In this part we will install Teloxide and binance rs crates and set up a minimal development environment Use this commands first to start a Rust project cargo new binance botThis will create a few files in binance bot folder Edit your Cargo toml file in it with this package name binance bot version edition See more keys and their definitions at dependencies dotenv dotenv codegen teloxide version features frunk macros auto send log pretty env logger tokio version features rt multi thread macros binance git It won t be that different from what REAMD md file of Teloxide give you We will use dotenv instead of manually setting TELOXIDE TOKEN diffrent from the command given by its documenation Unix like export TELOXIDE TOKEN lt Your token here gt Windows set TELOXIDE TOKEN lt Your token here gt If you don t include macros to teloxide features some of its examples won t work with can t find derive macro etc Then create a env file with touch env and include your token to it TELOXIDE TOKEN lt YOUR TOKEN FROM THE PREVIOUS PART gt You can see src main rs file was made for you already Paste this code adapted from the official example to use env file to it use dotenv dotenv use std env use teloxide prelude tokio main async fn main run await async fn run dotenv ok Read env and set env variables with this teloxide enable logging log info Starting dices bot let bot Bot from env auto send teloxide repl bot message async move println dice message answer dice await respond await INFO binance bot gt Starting dices bot Use cargo run release and wait a little bit before the Rust compiler end its job Then while it is working at your console visit your Telegram bot you made and type whatever you want It will show somewhat similar to this Hope you could make it You verified that you can use Teloxide crate in your machine In the next part we will use binance rs along with Teloxide You can edit your main rs file with this to see binance rs crate will work at your development environment use binance api use binance market cargo watch x run release cargo watch x checkfn main let market Market Binance new None None Latest price for ALL symbols match market get all prices Ok answer gt println answer Err e gt println Error e match market get price BTCUSDT Ok answer gt println answer Err e gt println Error e I was using Macbook air with M chip and could see that it fails to compile with arm Search how to use i arch instead if you find an issue with it You can see which arch you use with arch Test the example code above with cargo run release and it should show current Bitcoin price for USDT token at your console Build a Telegram bot to find a cryptocurrency price with Binance In this part we will modify the commands example from Teloxide Please read and test its code first Then you can modify your main rs file similar to this use dotenv dotenv use std env error Error use teloxide payloads SendMessageSetters prelude use teloxide utils command BotCommand use teloxide utils markdown link use teloxide types ParseMode MarkdownV use binance api use binance market fn to uppercase string amp str gt String string chars map c c to ascii uppercase collect Command examples you can use help register price BTC price BTC USDT price btc sudt price BNB BTC price bnb btc derive BotCommand command rename lowercase description These commands are supported enum Command command description display this text Help command description show a Binance sign up page Register command description show a cryptcurrency price in USDT by default Price String async fn responses to command cx UpdateWithCx lt AutoSend lt Bot gt Message gt command Command gt Result lt Box lt dyn Error Send Sync gt gt let market Market Binance new None None match command Command Help gt cx answer Command descriptions send await Command Register gt let register link link Don t have a Binance account yet You can register here cx answer register link parse mode MarkdownV send await Command Price crpytocurrency gt let mut iter crpytocurrency split whitespace if let Some first crypto symbol iter next let second crypto symbol if let Some second crypto symbol iter next println There was a second crypto symbol second crypto symbol else println There was no second crypto symbol Use default USDT let target to uppercase amp format amp first crypto symbol amp second crypto symbol match market get price target Ok symbol price gt println amp symbol price cx answer format The price you want is amp symbol price price await Err e gt eprint e cx answer format Something went wrong Did you use the correct cryptocurrency pair await else cx answer Cryptocurrency symbols were not specified To start with you can use price ETH or price ETH USDT await Ok tokio main async fn main run await async fn run dotenv ok teloxide enable logging log info Starting the bot let bot Bot from env auto send let bot name String binance bot into teloxide commands repl bot bot name responses to command await Use cargo run release and visit your bot Type help there then test a few commands similar to these below help register price BTC price BTC USDT price btc usdt price BNB BTC price bnb btcSome of them will show results similar to these Well it is interesting to see its historical drop while writing this post First one is from when I wrote the code for this and the latter is from when I write this post The payloads here will be command relevant parts and others are for set up So I will explain them It shows the description texts you define from enum Command part You need to edit their only It wasn t easy to find how to use markdown with Teloxide by reading its documentation You will save your compile time by learning that the framework wants you use for some characters when you use markdown The user can send various inputs along with price commands You can see we can handle them easily with Rust API For example user can send an empty input input without second cryptocurrency symbol and it is handled by default USDT input with more than cryptocurrency symbols etc You could find the beauty of the Rust language if you thought the code to handle this with other programming languages If you have any question with the Teloxide you can refer to its documenation ConclusionIn this post we learnt how to set up Rust env to use Teloxide framework hope you can make all of this part work without any issue I included many images to help you follow the example better If you are familiar with Binance you can write more commands to use its account relevant API also If you liked the post please share it with others I am plan to share more blockchain relevant stuffs I am interested in ETH and POLKADOT Thanks 2021-05-19 14:05:38
Apple AppleInsider - Frontpage News Canadian PM Justin Trudeau busted using fake Mac with Apple sticker https://appleinsider.com/articles/21/05/19/canadian-pm-justin-trudeau-busted-using-fake-mac-with-apple-sticker?utm_medium=rss Canadian PM Justin Trudeau busted using fake Mac with Apple stickerA photograph of Canada s Justin Trudeau shows him using a HP Windows laptop which wouldn t be remarked upon but it sporting an Apple sticker will be It s not Prime Minister Justin Trudeau s MacBook Pro But then it isn t anyone s MacBook Pro it s a Windows HP laptopFinally a genuine use for those logo stickers that Apple keeps on shipping Apple is the company that wouldn t let Intel put a sticker on its computers but believes we have a passion for the things Read more 2021-05-19 14:32:45
Apple AppleInsider - Frontpage News Zagg announces Pro Keys with Trackpad Wireless Keyboard for iPad Pro, iPad Air, and iPad https://appleinsider.com/articles/21/05/19/zagg-announces-pro-keys-with-trackpad-wireless-keyboard-for-ipad-pro-ipad-air-and-ipad?utm_medium=rss Zagg announces Pro Keys with Trackpad Wireless Keyboard for iPad Pro iPad Air and iPadZagg adds two more keyboards to its iPad keyboard lineup including the ultra tough Rugged Book and the Pro Keys with Trackpad Wireless Keyboard designed for the inch iPad Pro fourth generation iPad Air and iPad The Pro Keys with Trackpad offers users an alternative to Apple s pricier Magic Keyboard It connects over Bluetooth and features backlit laptop style keys a Bluetooth trackpad that users can toggle on and off as well as a magnetic closure for keeping it closed while on the go It also features a detachable case allowing users to protect their iPad even when not using the keyboard The case features a polycarbonate shell with rubberized edges corners and button covers Zagg states the case itself will provide up to feet of drop protection Read more 2021-05-19 14:19:11
海外TECH Engadget J.J. Abrams is bringing a new Batman animated series to HBO Max https://www.engadget.com/batman-caped-crusader-jj-abrams-hbo-max-143618065.html abrams 2021-05-19 14:36:18
海外TECH Engadget Samsung's latest Tokyo Olympics phone might actually happen https://www.engadget.com/samsung-galaxy-s21-olympic-games-edition-142323322.html games 2021-05-19 14:23:23
金融 RSS FILE - 日本証券業協会 株主コミュニティの統計情報・取扱状況 https://www.jsda.or.jp/shiryoshitsu/toukei/kabucommunity/index.html 株主コミュニティ 2021-05-19 15:30:00
金融 金融庁ホームページ 「公的給付の支給等の迅速かつ確実な実施のための預貯金口座の登録等に関する法律第十六条第一項の政令で定める金額を定める政令」等について公表しました。 https://www.fsa.go.jp/news/r2/sonota/20210519/20210519.html 預貯金 2021-05-19 16:00:00
金融 金融庁ホームページ 「公的給付の支給等の迅速かつ確実な実施のための預貯金口座の登録等に関する法律第四章に規定する預金保険機構の業務の特例等に関する命令」等について公表しました。 https://www.fsa.go.jp/news/r2/sonota/20210519-2/20210519-2.html 預金保険機構 2021-05-19 16:00:00
金融 金融庁ホームページ LIBORの恒久的な公表停止に備えた対応について更新しました。 https://www.fsa.go.jp/policy/libor/libor.html libor 2021-05-19 15:00:00
金融 金融庁ホームページ エム・ピー・ジャパン株式会社に対する行政処分について公表しました。 https://www.fsa.go.jp/news/r2/shouken/20210519.html 株式会社 2021-05-19 15:00:00
金融 金融庁ホームページ 第2回LIBOR利用状況調査の結果概要について公表しました。 https://www.fsa.go.jp/news/r2/ginkou/20210519/20210519.html libor 2021-05-19 15:00:00
ニュース BBC News - Home Covid-19: More confidence vaccines work on all variants - PM https://www.bbc.co.uk/news/uk-57172139 indian 2021-05-19 14:51:37
ニュース BBC News - Home Brexit: Boris Johnson prepared to throw farmers under bus, says SNP https://www.bbc.co.uk/news/uk-politics-57169471 massive 2021-05-19 14:08:44
ニュース BBC News - Home Malawi burns thousands of expired AstraZeneca Covid-19 vaccine doses https://www.bbc.co.uk/news/world-africa-57168841 confidence 2021-05-19 14:49:24
ニュース BBC News - Home Covid: When will I get the vaccine? https://www.bbc.co.uk/news/health-55045639 covid 2021-05-19 14:08:11
ニュース BBC News - Home What are the rules for travelling to an amber-list country? https://www.bbc.co.uk/news/explainers-52544307 foreign 2021-05-19 14:04:40
ニュース BBC News - Home Covid: How do I get a lateral flow or PCR test? https://www.bbc.co.uk/news/health-51943612 coronavirus 2021-05-19 14:06:38
北海道 北海道新聞 NY株、一時400ドル超安 インフレ警戒根強く https://www.hokkaido-np.co.jp/article/545805/ 警戒 2021-05-19 23:04:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

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

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