投稿時間:2022-01-11 00:31:29 RSSフィード2022-01-11 00:00 分まとめ(33件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ボタンを押すことで表示させる https://teratail.com/questions/377538?rss=all ボタンを押すことで表示させる英語の並べ替えをしたいのですが、以下のソースで「解答を見る」というボタンを押すことで解答が表示されるようにしたいのですが、問題では文章の先頭が小文字でピリオドない状態で回答するのですが答え合わせの時は、先頭の文字を大文字にしてピリオドも付けたいです。 2022-01-10 23:49:15
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) numpyのリスト生成の際,小数点以下が異様に長くなります. https://teratail.com/questions/377537?rss=all anparangeforiinaprinti 2022-01-10 23:31:33
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) pythonで取得する現在時刻が8分間ずれる原因 https://teratail.com/questions/377536?rss=all pythonで取得する現在時刻が分間ずれる原因前提・実現したいことpythonで現在時刻を取得する必要がありJSTを指定して取得しているのですが、現在時刻と取得した時刻とで分間のずれが生じています。 2022-01-10 23:31:16
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 可変のmultipleChoiceFieldをHTMLでloopを使わずに表示する方法 https://teratail.com/questions/377535?rss=all 一応動きはするのですが、POSTした際に何も返ってきません。 2022-01-10 23:29:57
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Golangでの正規表現 https://teratail.com/questions/377534?rss=all azdazd 2022-01-10 23:15:45
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ジェネリックなインターフェースの「IHoge<IHoge<int>>」の意味が分かりません https://teratail.com/questions/377533?rss=all ジェネリックなインターフェースの「IHogeltIHogeltintgtgt」の意味が分かりませんCのインターフェースを勉強している時にとあるコードを見つけたのですが、意味がよくわからなかったので質問させて頂きました。 2022-01-10 23:07:11
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) VSCode:Pythonフォーマッターの配列の自動調整を無効にしたい https://teratail.com/questions/377532?rss=all VSCodePythonフォーマッターの配列の自動調整を無効にしたい配列の並びもフォーマッターが自動調整する機能を無効にしたい下記のように数値を配列で入力しているケースで、数値がチェックしやすいように入力しています。 2022-01-10 23:03:46
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【Ruby】破壊的メソッドに関する疑問 https://teratail.com/questions/377531?rss=all 【Ruby】破壊的メソッドに関する疑問【Ruby】破壊的メソッドによる変更Rubyを学習していて、以下のコードについて質問があります。 2022-01-10 23:02:34
Ruby Rubyタグが付けられた新着投稿 - Qiita 変数の後ろにカンマがついている https://qiita.com/daichan8020/items/1156e6a323eea6d4275d 変数の後ろにカンマがついている変数の後ろにカンマがついている問題があったので備忘録として記しておきますmainrb変数の後ろにカンマを付けるapartitionampoddpagtカンマを付けないbpartitionampoddpbgtカンマを後ろに付けることで多重代入になる。 2022-01-10 23:36:35
AWS AWSタグが付けられた新着投稿 - Qiita aws ds パイプライン構築時考慮事項のメモ https://qiita.com/htj/items/7c69f62e637484ea85a4 awsdsパイプライン構築時考慮事項のメモ粒度をそろえるのが難しいので表形式でメモ。 2022-01-10 23:03:43
Docker dockerタグが付けられた新着投稿 - Qiita OpenFaaSでmydns.jpのIPアドレス更新を行うfunctionを作成する https://qiita.com/iqustechtips/items/f9d472ec4cb8482d172f OpenFaaSでmydnsjpのIPアドレス更新を行うfunctionを作成する前提OpenFaaS環境の構築は終わっているものとするfaascliでfunctionイメージの雛形を作成するfaasclitemplatepullfaasclinewmydnsupdatelangdockerfileFoldermydnsupdatecreatedFunctioncreatedinfoldermydnsupdateStackfilewrittenmydnsupdateyml認証情報用Secret作成公式ではfaascli経由で作成とあるが、gatewayやloginを指定する必要があり煩雑なためkubectlを使用して作成kubectlcreatesecretgenericmydnsusernamefromliteralmydnsusernameusernamenopenfaasfnkubectlcreatesecretgenericmydnspasswordfromliteralmydnspasswordpasswordnopenfaasfnコマンド作成実行するdockerimageはalpineなのでbashはないので、ashを指定する。 2022-01-10 23:19:07
技術ブログ Developers.IO Amazon Athenaで地理空間関数を使ってみた https://dev.classmethod.jp/articles/using-geospatial-functions-in-amazon-athena/ amazon 2022-01-10 14:54:40
海外TECH Ars Technica All hail the Ariane 5 rocket, which doubled the Webb telescope’s lifetime https://arstechnica.com/?p=1824763 lifetime 2022-01-10 14:48:36
海外TECH MakeUseOf 5 Effective Tips for Managing Overlapping Tasks https://www.makeuseof.com/effective-tips-managing-overlapping-tasks/ increase 2022-01-10 14:46:40
海外TECH MakeUseOf Adobe Premiere Pro vs. DaVinci Resolve: Which Is the Ultimate Video Editor? https://www.makeuseof.com/adobe-premiere-pro-vs-davinci-resolve/ Adobe Premiere Pro vs DaVinci Resolve Which Is the Ultimate Video Editor Wondering what to choose between Adobe Premiere Pro and DaVinci Resolve Take a look at this comparison and decide which editor will suit your needs 2022-01-10 14:30:26
海外TECH MakeUseOf CES 2022: The 10 Best New Products That Caught Our Eye https://www.makeuseof.com/ces-2022-best-new-products/ caught 2022-01-10 14:30:25
海外TECH DEV Community How has your relationship with complexity changed over time? https://dev.to/ben/how-has-your-relationship-with-complexity-changed-over-time-1emd Detail Nothing 2022-01-10 14:40:47
海外TECH DEV Community Running Spring Boot App and PostgreSQL in single container https://dev.to/tolgee_i18n/running-spring-boot-app-and-postgresql-in-single-container-en4 Running Spring Boot App and PostgreSQL in single containerWhen developing self hosted open source service which meant to be used by as many users as possible you would probably want to provide a simple way how run your service It should preferably work without any configuration so users can get it working as fast as possible The simplest way to achieve this with Docker is running a Docker image with docker run command When your application needs database system to store its data you have basically two options Using multiple containers one for the application and one for DB Or you can go with embedding the DB service in the the same container with application For deploying the application to the cloud I recommend running it in multiple containers or use database managed by your cloud provider In Tolgee we use Kubernetes for deploying our Application container and DigitalOcean s managed PostgreSQL DB so we don t have to worry about the database cluster But for users who want to self host it themselves we also want to provide the simple docker run way which is going to work right away without setting up a database system or any other services It just has to run Now ‍ ️‍ ️So if you would like to run Tolgee you can do it simply by running this command docker run v tolgee data data p tolgee tolgeeBefore we supported H and Postgres databases at the same time We used H database as a default since H doesn t need to be run as external service It is just Java library which can store the data in memory or in filesystem However H db doesn t satisfy our needs anymore so we have to drop its support ‍ ️OK but we want to keep the ability to run it in single container so how to do that Tolgee is implemented in Kotlin which is JVM language so we need JDK to run it So we need to somehow combine JDK and PostgreSQL images and then find a way how to run both of the services in the same container properly Getting the Postgres DB to our JDK container To create our Docker image we are using Dockerfile based on openjdk jdk alpine image So first thing we have to do is add a PostgreSQL DB to this image to have both JDK and Postgres prepared To do so I found official Postgres image sources and used their code to create my own image containing JDK and Postgres Basically I just took their Dockerfile and docker entrypoint sh and replaced the FROM alpine with FROM openjdk jdk alpine Thats it Now we have Postgres and JDK in the same image HERE is the Docker image source Running multiple services in a single container ‍ ️Second the harder part is to actually run the services in single container There are multiple options according to Docker documentation how to achieve this Creating a script running the services bin bash Start the first process my first process amp Start the second process my second process amp Wait for any process to exitwait n Exit with status of process that exited firstexit This basically runs all the services and if one exits the whole container exits as well This is cool but this is not optimal since we want to wait for Postgres to be started before running the appconfigure whether the database service is enabled or not so user can use their own external PostgresSo we would have to modify this script a lot or find a better solution Luckily there are some Supervisor 🥸Supervisor is a tool which can run and manage multiple services It has a lot of features like redirecting stdout and stderr managing how many times the services should try to start or whether should service be restarted when exited This is all cool but I found few drawbacks trying to get it working with Supervisor There is no option telling Supervisor to run service only if specific environment variable is set so I would have to write a script for itThere is no way how to tell Supervisor to exit when one of managed services exits The supervisor is still running even after all services exited which is in contrary with Docker philosophy Containers should be managed by Docker and Docker should control whether services are restarted or not Letting the Spring Boot App to start the PostgreSQL serverFinally I decided to do it a similar way as GitLab does it I am letting the Spring Boot App to run the Postgres server while creating the DataSource bean So the Spring Boot App is in charge of managing the DB HERE you can find the relevant code Configuration PostgresAutoStartConfiguration kt First I created a configuration which is conditional on property tolgee postgres autostart enabled This Configuration creates a DataSource bean manually And before this bean is returned it uses my PostgresRunner to run the Postgres DB The runner PostgresRunner kt This class handles the actual running of the Postgres executable It does this It runs the Postgres initialization script which is taken from Postgres official Docker image codeIt starts a new thread which is redirecting Postgres output to Logger methodsIt waits until Postgres is ready by trying to open Socket on Postgres portIt has preDestroy method annotated with PreDestroy annotation which stops Postgres when Spring Application exits So that s it This is how you can Embed Postgres into your application code TL DRWhen you develop self hosted service you would like to provide a simple way how to run it without complicated configuration stepsSo you want like to embed DB and Application into same container to enable users to run in with docker run commandFirst you have to create Docker image which is able to run your Application JDK in our case and contains also DB to store your data PostgreSQL in our case Then you have to find a way to start both of the services in the single containerThe best way I came up with is to run manage the PostgreSQL with the Java Application so I can turn it on or of using externalized configurationTolgee is an open source solution for software localization It saves developer s time Go to Tolgee io and have fun 2022-01-10 14:16:55
海外TECH DEV Community AWS VPC IPAM Tutorial - The Better Terraform Way (7 Steps Faster) https://dev.to/aws-builders/aws-vpc-ipam-tutorial-the-better-terraform-way-7-steps-faster-4d6b AWS VPC IPAM Tutorial The Better Terraform Way Steps Faster In my previous post covering the basics of AWS VPC IPAM I promised some Terraform code samples My Terraform code sample will be based on the AWS VPC IPAM tutorial from the official documentation As you can already see from the title the Terraform way is steps shorter than the official tutorial and undoubtedly better The Better Terraform Way Step Clone Github repositoryFrom your terminal run git clone Change your current directory to the cloned code with cd aws vpc ipam terraform tutorial Step Terraform ApplyNote This step assumes you already have your AWS credentials set up and Terraform installed As of this point of writing you will require Terraform version or higher From your terminal run terraform apply Review the Terraform planned changes before you type yes If you are using the default values you should expect a plan consisting of to add to change to destroy After applying the changes head over to your AWS console to view what you ve created Step Terraform DestroyNote This step may take up to minutes to complete From testing this seems to be caused by the pool CIDR assignment requiring some time to detect that the test VPC is deleted before allowing you to unassign the CIDR From your terminal run terraform destroy Review the Terraform planned changes before you type yes If you are using the default values you should expect a plan consisting of to add to change to destroy That concludes the AWS VPC IPAM tutorial the better Terraform way Next we will walkthrough the code to give you an understanding of what you just created and destroyed Bonus Code WalkthroughIn this section I ll walkthrough my code and describe my thought processes VariablesIn the variables tf file you can see where the variables are defined The default values follows the tutorial but I ve put them as variables to give you the option to define them yourselves in your tfvars file if you choose to do so Otherwise the default values will work variable region type string description The AWS Region that the resources will be created in Will also be included as part of the IPAM operating region default us east variable ipam operating regions type list string description Additional AWS VPC IPAM operating regions You can only create VPCs from a pool whose locale matches this variable Duplicate values will be removed default us west variable top level pool cidr type string description The top level IPAM pool CIDR Currently only supports a single CIDR default The variables are pretty self explanatory from the description I ve added From here on all the code can be found in main tf Service Linked Roleresource aws iam service linked role ipam aws service name ipam amazonaws com description Service Linked Role for AWS VPC IP Address Manager I ve chosen to follow the tutorial without using AWS Organizations and hence the service linked IAM role needs to be created for VPC IPAM to automatically discover resources to monitor There is nothing fancy here IPAM and it s operating regionsThe IPAM construct requires you to define its operating region One of the operating region must include the AWS provider block region in this case it s defined as var region locals deduplicated region list toset concat var region var ipam operating regions The deduplicated region list local variable ensures that the list of regions that you pass into IPAM does not have any duplication which might cause an error when creating the IPAM To learn more about the toset function in the Terraform documentation resource aws vpc ipam tutorial description my ipam dynamic operating regions for each local deduplicated region list content region name operating regions value depends on aws iam service linked role ipam Here local deduplicated region list is passed into the operating systems configuration block as a dynamic block Another interesting point is the depends on meta argument to create a dependency between the service linked role and IPAM This allows the IPAM to be deleted before the service link role is deleted From testing letting Terraform perform this deletion without depends on actually causes an error as it deletes the service linked role and IPAM in parallel Top level Pool and CIDR assignmentAlong with the creation of the IPAM a default private and public scope is created as well and can be reference via the IPAM Terraform resource s attributes To understand more about what a scope is do check out my previous post covering the basics of AWS VPC IPAM resource aws vpc ipam pool top level description top level pool address family ipv ipam scope id aws vpc ipam tutorial private default scope id provision CIDR to the top level poolresource aws vpc ipam pool cidr top level ipam pool id aws vpc ipam pool top level id cidr var top level pool cidr if following the tutorial The top level pool will be created in the IPAM s private scope The var top level pool cidr variable follows the tutorial with You may set a different CIDR as long as it as a netmask of above Sub level Pool and CIDR assignmentFor this part I further improved on the tutorial of simply creating just regional sub level pool Using the for each meta argument the resource taps on local deduplicated region list local variable again to create multiple regional pools according to the region list you ve set resource aws vpc ipam pool regional for each local deduplicated region list description each key pool address family ipv ipam scope id aws vpc ipam tutorial private default scope id locale each key source ipam pool id aws vpc ipam pool top level id resource aws vpc ipam pool cidr regional for each for index region in tolist local deduplicated region list region gt index ipam pool id aws vpc ipam pool regional each key id cidr cidrsubnet var top level pool cidr each value For the CIDR assignment for these regional pools I had to convert the toset transformed local deduplicated region list to a list again The purpose was to allow the for expression to properly retrieve the index of each region The code snippet below should help you visualize how the for expression looks like for the default values us east us west With that each key would iterate through the key the regions and each value would be the corresponding index in the list The reason why we needed the index value is to generate the sub level pool CIDR dynamically from the top level pool CIDR var top level pool cidr using the cidrsubnet Terraform function In short the cidrsubnet function slices up a CIDR according to the values you pass into it VPC to testFinally we ve reached the end of the code sample We will create a test VPC in the AWS provider region defined in var region In the tutorial they ve manually assigned a direct CIDR block to this VPC which seems ludicrous because it doesn t showcase the strength of an IPAM managed VPC resource aws vpc tutorial ipv ipam pool id aws vpc ipam pool regional var region id ipv netmask length depends on aws vpc ipam pool cidr regional In my Terraform code we ve chosen to test the new attributes added in AWS provider version which for as long as I can remember removes the cidr block attribute requirement of being mandatory cidr block is now optional if you have the ipv ipam pool id and ipv netmask length attributes For my example I ve requested a CIDR of netmask length from the regional sub level pool It should achieve the same results as the tutorial as long as you are using the default values ClosingI had a blast writing this short Terraform code sample for AWS VPC IPAM If there is anything you feel I could ve done better please reach out to me Hope you have learnt something 2022-01-10 14:06:01
海外TECH DEV Community Use Python+AWS Create Sentiment Analysis Tool https://dev.to/leifengflying/use-pythonaws-create-sentiment-analysis-tool-3lnj Use Python AWS Create Sentiment Analysis Tool Hi Today I will share my experience to you It s about Use Python And Amazon Comprehend and I also use Lambda Api Gateway togather build the toolPython Stage I will put my code in this stage Notice I use Qtdesigner and PYUIC coding utf Form implementation generated from reading ui file ui Created by PyQt UI code generator WARNING Any manual changes made to this file will be lost when pyuic is run again Do not edit this file unless you know what you are doing import sysimport openpyxlfrom PyQt import QtCore QtGui QtWidgetsfrom PyQt QtWidgets import QFileDialog QWidgetfrom PyQt QtWidgets import QApplicationimport requestsimport jsonimport datetimeimport ctypesimport images Change Task manager iconctypes windll shell SetCurrentProcessExplicitAppUserModelID myappid filename Waiting analysis file nameflag analysis flagclass About page QWidget def init self super About page self init self resize self setWindowTitle About icon QtGui QIcon icon addPixmap QtGui QPixmap Image ico QtGui QIcon Normal self setWindowIcon icon self label QtWidgets QLabel self self label setGeometry QtCore QRect self label setObjectName label self label QtWidgets QLabel self self label setGeometry QtCore QRect self label setObjectName label self label QtWidgets QLabel self self label setGeometry QtCore QRect self label setObjectName label self label QtWidgets QLabel self self label setGeometry QtCore QRect self label setObjectName label self retranslateUi self QtCore QMetaObject connectSlotsByName self def retranslateUi self About page translate QtCore QCoreApplication translate self setWindowTitle translate Form About self label setText translate Form Copyright ownership T UniStar self label setText translate Form User Lei Feng self label setText translate Form Powered by self label setText translate Form u lt a href style color ff gt lt b gt Amazon Web Services Inc lt b gt lt a gt self label setOpenExternalLinks True class Ui Form object def setupUi self Form Form setObjectName Form Form resize Form setFixedSize QtCore QSize Form setMaximumSize QtCore QSize icon QtGui QIcon icon addPixmap QtGui QPixmap Image ico QtGui QIcon Normal Form setWindowIcon icon self label QtWidgets QLabel Form self label setGeometry QtCore QRect font QtGui QFont font setFamily Arial font setPointSize self label setFont font self label setObjectName label self label QtWidgets QLabel Form self label setGeometry QtCore QRect font QtGui QFont font setFamily Arial font setPointSize self label setFont font self label setObjectName label self pushButton QtWidgets QPushButton Form self pushButton setGeometry QtCore QRect self pushButton setObjectName pushButton self pushButton clicked connect self RealTime analysis self textEdit QtWidgets QTextEdit Form self textEdit setGeometry QtCore QRect self textEdit setObjectName textEdit self label QtWidgets QLabel Form self label setGeometry QtCore QRect font QtGui QFont font setFamily Arial font setPointSize self label setFont font self label setObjectName label self label QtWidgets QLabel Form self label setGeometry QtCore QRect font QtGui QFont font setFamily Arial font setPointSize self label setFont font self label setObjectName label self pushButton QtWidgets QPushButton Form self pushButton setGeometry QtCore QRect self pushButton setObjectName pushButton self pushButton clicked connect self multWordsAy self label QtWidgets QLabel Form self label setGeometry QtCore QRect font QtGui QFont font setFamily Arial font setPointSize font setBold True font setWeight self label setFont font self label setObjectName label self label QtWidgets QLabel Form self label setGeometry QtCore QRect font QtGui QFont font setFamily Arial font setPointSize font setBold True font setWeight self label setFont font self label setObjectName label self label QtWidgets QLabel Form self label setGeometry QtCore QRect font QtGui QFont font setFamily Arial font setPointSize font setBold False font setWeight self label setFont font self label setObjectName label self label QtWidgets QLabel Form self label setGeometry QtCore QRect font QtGui QFont font setFamily Arial font setPointSize font setBold False font setWeight self label setFont font self label setObjectName label self label QtWidgets QLabel Form self label setGeometry QtCore QRect self label setObjectName label self textBrowser QtWidgets QTextBrowser Form self textBrowser setGeometry QtCore QRect self textBrowser setObjectName textBrowser self lineEdit QtWidgets QLineEdit Form self lineEdit setGeometry QtCore QRect self lineEdit setObjectName lineEdit self lineEdit setEnabled False self pushButton QtWidgets QPushButton Form self pushButton setGeometry QtCore QRect self pushButton setObjectName pushButton self pushButton clicked connect self openFile self label QtWidgets QLabel Form self label setGeometry QtCore QRect self label setObjectName label self label QtWidgets QLabel Form self label setGeometry QtCore QRect self label setObjectName label self label QtWidgets QLabel Form self label setGeometry QtCore QRect self label setObjectName label self textEdit QtWidgets QTextEdit Form self textEdit setGeometry QtCore QRect self textEdit setObjectName textEdit self textEdit setEnabled False self textEdit QtWidgets QTextEdit Form self textEdit setGeometry QtCore QRect self textEdit setObjectName textEdit self textEdit setEnabled False self textEdit QtWidgets QTextEdit Form self textEdit setGeometry QtCore QRect self textEdit setObjectName textEdit self textEdit setEnabled False self pushButton QtWidgets QPushButton Form self pushButton setGeometry QtCore QRect self pushButton setObjectName pushButton self pushButton clicked connect self open About page self retranslateUi Form QtCore QMetaObject connectSlotsByName Form def retranslateUi self Form translate QtCore QCoreApplication translate Form setWindowTitle translate Form Sentiment Analysis System self label setText translate Form Sentiment Analysis System self label setText translate Form Please follow the stage work self pushButton setText translate Form Start Single words Analysis self textEdit setHtml translate Form lt DOCTYPE HTML PUBLIC WC DTD HTML EN gt n lt html gt lt head gt lt meta name qrichtext content gt lt style type text css gt n p li white space pre wrap n lt style gt lt head gt lt body style font family SimSun font size pt font weight font style normal gt n lt p style margin top px margin bottom px margin left px margin right px qt block indent text indent px gt lt span style font style italic gt Please Input Need Analysis words lt span gt lt p gt lt body gt lt html gt self label setText translate Form Single Words Analysis self label setText translate Form More Words Analysis Only support XLSX format self pushButton setText translate Form Start More Words Analysis self label setText translate Form Stage 、Format head self label setText translate Form Stage 、Choose File self label setText translate Form ↓ self label setText translate Form ↓ self label setText translate Form The First head is Text、Positive、Negative、Neutral、Emotion judgment、Language self pushButton setText translate Form Choose File self label setText translate Form Positive self label setText translate Form Negative self label setText translate Form Emotion Judgment self pushButton setText translate Form About def RealTime analysis self stat words self textEdit toPlainText print stat words print data url payload json dumps Text stat words headers Content Type application json RTResponse requests request POST url headers headers data payload RTRp text RTResponse text RT Positive json loads RTRp text body SentimentScore Positive RT Negative json loads RTRp text body SentimentScore Negative RT Neutral json loads RTRp text body SentimentScore Neutral print float str json loads RTRp text body SentimentScore Positive self textEdit setText RT Positive self textEdit setText RT Negative if RT Positive gt RT Negative and RT Positive gt RT Neutral self textEdit setText str float RT Positive self textEdit setText str float RT Negative self textEdit setText Postive elif RT Positive lt RT Negative and RT Neutral lt RT Negative self textEdit setText str float RT Positive self textEdit setText str float RT Negative self textEdit setText Negative else self textEdit setText str float RT Positive self textEdit setText str RT Negative self textEdit setText Neutral print RTRp text def openFile self openFileName QFileDialog getOpenFileName None Choose File Excel files xlsx print openFileName openF openFileName split global filename filename openFileName name openF len openF self lineEdit setText str name def stopAnalysis self self pushButton setText Start More Words Analysis self pushButton clicked disconnect self stopAnalysis self pushButton clicked connect self multWordsAy self textBrowser append Stopped by user datetime datetime now strftime Y m d H M S global flag flag return def multWordsAy self Check file exist global flag flag import os if not os path exists filename self textBrowser append This file not exist return self pushButton setText Stop Analysis self textBrowser append Start Analysis datetime datetime now strftime Y m d H M S self pushButton clicked disconnect self multWordsAy self pushButton clicked connect self stopAnalysis def getMultResult text senment words text print stat words print data url mult payload json dumps Text senment words headers Content Type application json multResponse requests request POST url headers headers data mult payload mult resp text multResponse text mu Positive json loads mult resp text body SentimentScore Positive mu Negative json loads mult resp text body SentimentScore Negative mu Neutral json loads mult resp text body SentimentScore Neutral LanguageCode json loads mult resp text LanguageCode return mu Positive mu Negative mu Neutral LanguageCode book openpyxl load workbook filename sheet book get sheet by name book get sheet names rows sheet max row showText Read file successful amount str rows records waiting analysis。。。 nCurrent Time datetime datetime now strftime Y m d H M S self textBrowser append showText if sheet cell value Text or sheet cell value Positive or sheet cell value Negative or sheet cell value Negative or sheet cell value Emotion judgment or sheet cell value Language self textBrowser append The execl not stand format return for i in range rows detectWords sheet cell i value detectResult getMultResult detectWords self textBrowser append f Analysising i Record Current Time datetime datetime now strftime Y m d H M S print f Analysising i Record Current Time datetime datetime now strftime Y m d H M S sheet cell i detectResult sheet cell i detectResult sheet cell i detectResult sheet cell i detectResult if detectResult gt detectResult and detectResult gt detectResult sheet cell i Positive elif detectResult gt detectResult and detectResult gt detectResult sheet cell i Negative else sheet cell i Neutral QApplication processEvents book save filename self textBrowser append Analysis ended self textBrowser append str rows Records analysis done self pushButton setText Strat Analysis self pushButton clicked disconnect self stopAnalysis self pushButton clicked connect self multWordsAy def open About page self self about form About page self about form show if name main app QtWidgets QApplication sys argv widget QtWidgets QMainWindow widget setFixedSize widget width widget height ban max ui Ui Form ui setupUi widget widget showMaximized sys exit app exec Lambda And Api Gateway Stage Notice You need give right IAMHere is the Lambda Codeimport jsonimport botocomprehend boto client service name comprehend region name ap def lambda handler event context TODO implement LanguageCode comprehend detect dominant language Text event Text comprehend sentiment comprehend detect sentiment Text event Text LanguageCode LanguageCode Languages LanguageCode print LanguageCode return statusCode body comprehend sentiment LanguageCode LanguageCode Languages LanguageCode This is Apigateway When you finished You need deploy it and use postman to test The Final display 2022-01-10 14:02:31
海外TECH DEV Community How I switched from PHP to Node.js https://dev.to/bornfightcompany/how-i-switched-from-php-to-nodejs-2bhf How I switched from PHP to Node jsI ve been a PHP developer for a couple of years now and I love PHP However I believe that learning other programming languages can only make you a better developer That is why I decided to tackle the fun new world of Node js note maybe not so new but bear with me I am a PHP developer after all After my first node js for beginners courses google search I realized I m missing some basics and that there is a lot that I ll have to tackle There are millions of tutorials out there and it all can be a bit overwhelming when you re starting to learn something new I wanted this to be as simple as possible so I picked my favorite for each category JavaScriptNode js is a JavaScript runtime If you don t know what runtime is at the moment just ignore it for a while Node js is JavaScript insert something That means you ll have to learn JavaScript Learn JavaScriptThis was a documentation that proved as the most useful to me It covers the basics as well as some advanced concepts I had a hard time switching to async and in my opinion this documentation explains it so that you can sufficiently understand how JavaScript utilizes asynchronous programming TypeScriptUse TypeScript I won t even explain why just use it TypeScript is JavaScript with some added functionalities like you ve guessed it types Learn TypeScriptOfficial docs are concise and they should give you an idea what are the differences between using TypeScript to JavaScript But like I said it s actually JavaScript so while learning JavaScript you re also learning TypeScript Node jsAnd finally we are here Now you ll learn what is a runtime or V and what Node js actually is Learn Node jsThese are official docs and they are great While you can find a lot of free or paid courses on the internet I really think these docs should be more than enough to understand what can be done with Node js ExtraLearn a Node js framework I ve had the opportunity to work with Nest js and I really liked it Lots of people use Express js so that is another possibility Learn Nest jsNest js also has great official docs Keep in mindWhile writing this article I realized most of my favorites are official docs Maybe that is something we all should remember taking courses is great there are a bunch of helpful resources and people out there and we should take advantage of it However when learning something completely new stick to the basics and RTFM If you are wondering what to do next do something that excites you with your new set of skills If you can t come up with an idea for a personal project google project ideas for backend Find something that sounds interesting and happy coding 2022-01-10 14:00:57
Apple AppleInsider - Frontpage News Take-Two Interactive announces $12.7B deal to acquire Zynga https://appleinsider.com/articles/22/01/10/take-two-interactive-announces-127b-deal-to-acquire-zynga?utm_medium=rss Take Two Interactive announces B deal to acquire ZyngaGaming giant Take Two Interactive has announced that it will acquire mobile gaming company Zynga in a billion deal that could be one of the industry s largest Zynga bannerThe cash and stock deal which the companies expect to close in the first quarter of will make Take Two Interactive one of the largest publisher of mobile game Read more 2022-01-10 14:57:18
Apple AppleInsider - Frontpage News The HomeKit Insider podcast: Special CES 2022 edition https://appleinsider.com/articles/22/01/10/the-homekit-insider-podcast-special-ces-2022-edition?utm_medium=rss The HomeKit Insider podcast Special CES editionOn the latest episode of HomeKit Insider we come to you from CES in Las Vegas to discuss the new products that have been released including the Wemo smart video doorbell the Eve floodlight cam and more This week we are talking about all things CES We spent the week in Las Vegas going hands on with many of the new HomeKit enabled products to make their debut Read more 2022-01-10 14:35:25
Apple AppleInsider - Frontpage News Peru's Interbank briefly announces Apple Pay support, then pulls it https://appleinsider.com/articles/22/01/10/perus-interbank-briefly-announces-apple-pay-support-then-pulls-it?utm_medium=rss Peru x s Interbank briefly announces Apple Pay support then pulls itPeru s Interbank appeared to be the latest bank to support Apple Pay ーbefore it pulled all signs of the announcement Screengrab from the removed videoFollowing its launch in Azerbaijan Colombia and Costa Rica in November Apple Pay was announced as being available to certain users in Peru Eight years after Apple Pay launched in the US the country s Interbank had officially announced initial support for it Read more 2022-01-10 14:09:38
海外TECH Engadget Apple's AirTags are cheaper than usual in Woot's latest one-day sale https://www.engadget.com/apples-airtags-are-cheaper-than-usual-in-woots-latest-one-day-sale-140954425.html?src=rss Apple x s AirTags are cheaper than usual in Woot x s latest one day saleAirTags are some of the most affordable Apple gadgets you can get which is probably why deep discounts on them are hard to come by Last week we saw one of the trackers drop to and a four pack fall to on Amazon but Woot s latest flash sale makes the bundle even cheaper Today only you can get a four pack of AirTags for which is five percent off its normal price Woot s dropped the price to as low as in the past but that all time low happened during the holiday shopping season making it unlikely to come back around anytime soon Buy AirTags pack at Woot Much like Tile devices and other Bluetooth trackers AirTags are designed to help you keep track of your stuff The coin sized gadget can slip into your wallet or backpack or attach to a holder that you can clip to your keys allowing you to keep track of your things using the Find My app on your iOS device When you do misplace something you can force the AirTag to emit a chime or if you have an ultra wideband supporting iPhone the Precision Finding feature can lead you directly to your missing stuff using directions on your phone s screen And if you re not the in vicinity of your belongings anymore you can check out the AirTag s last location in the Find My app and even turn on Lost Mode which will ping you when the AirTag gets detected by the network again Keep in mind that you ll have to be an iPhone user to get the most out of AirTags Apple recently released an app that allows Android users to see if an AirTag is nearby but its goal is detection privacy and returning the lost AirTag to its rightful owner Also we recommend checking out Woot s return policy before buying because it is much different from that of its parent company Amazon Follow EngadgetDeals on Twitter for the latest tech deals and buying advice 2022-01-10 14:09:54
海外TECH The Apache Software Foundation Blog The Apache Weekly News Round-up: week ending 7 January 2022 https://blogs.apache.org/foundation/entry/the-apache-weekly-news-round8 The Apache Weekly News Round up week ending January Welcome We hope that you have had a festive holiday season and are excited to kick off the new year Here s what happened over the past week Apache in By The Digits nbsp nbsp a look at the achievements from the Apache Community over the past months nbsp Summary and stats at nbsp Video highlights nbsp The Apache Month in Review highlights of what we ve accomplished over the past month nbsp December ASF Board nbsp management and oversight of the business affairs of the corporation in accordance with the Foundation s bylaws nbsp Next Board Meeting January Board calendar and minutes nbsp ASF Infrastructure nbsp our distributed team on three continents keeps the ASF s infrastructure running around the clock nbsp M weekly checks yield uptime at Performance checks across different service components spread over more than machines in data centers around the world View the ASF s Infrastructure Uptime site to see the most recent averages Apache Code Snapshot nbsp Over the past week Apache Committers changed lines of code over commits Top contributors in order are Jean Baptiste Onofré Gary Gregory Mark Thomas Harikrishna Patnala and Claus Ibsen nbsp Apache Project Announcements nbsp the latest updates by category Big Data nbsp Apache Avro released nbsp nbsp CVE Possible DOS vulnerabilities in C Avro SDK Enterprise Processes Automation ERP nbsp Apache OFBiz releasedIntegration nbsp Apache Camel LTS released nbsp Mail nbsp Apache James released nbsp nbsp nbsp CVE STARTTLS command injection IMAP and POP nbsp nbsp nbsp CVE IMAP vulnerable to a ReDoS nbsp nbsp nbsp CVE IMAP parsing Denial Of Service nbsp nbsp nbsp CVE Sieve file storage vulnerable to path traversal attacks nbsp Network Client nbsp Apache Guacamole released nbsp Apache MINA FTPServer released Web Frameworks nbsp Apache Struts released nbsp Apache Portals released nbsp nbsp CVE XSS in V Demo Portlet nbsp nbsp CVE XSS vulnerability in the JSP version of the Pluto Applicant MVCBean CDI portlet nbsp nbsp CVE XSS vulnerability in the MVCBean JSP portlet maven archetype Did You Know nbsp Did you know that in individuals new to the ASF contributed to Apache projects and initiatives nbsp Did you know that Apache Druid is frequently used for AdTech data nbsp Did you know that PulsarSummit Asia will be held online on January Apache Community Notices nbsp Watch quot Trillions and Trillions Served quot the documentary on the ASF nbsp full feature nbsp min quot Apache Everywhere quot min quot Why Apache quot min nbsp “Apache Innovation min nbsp nbsp ASF Annual Report FY nbsp Press release nbsp and nbsp Report nbsp PDF nbsp The Apache Way to nbsp Sustainable Open Source Success nbsp nbsp nbsp Foundation Reports and Statements nbsp Presentations from s ApacheCon Asia and ApacheCon Home are available on the nbsp ASF YouTube channel nbsp quot Success at Apache quot focuses on the people and processes behind why the ASF quot just works quot nbsp nbsp Inside Infra the new interview series with members of the ASF infrastructure team meet nbsp nbsp nbsp Chris Thistlethwaite nbsp nbsp nbsp Drew Foulks nbsp nbsp nbsp Greg Stein Part I nbsp nbsp nbsp nbsp Part II nbsp nbsp and Part III nbsp nbsp nbsp Daniel Gruno Part I nbsp nbsp and Part II nbsp nbsp nbsp nbsp Gavin McDonald Part I nbsp nbsp and Part II nbsp nbsp nbsp nbsp Andrew Wetmore Part I nbsp nbsp and Part II nbsp nbsp nbsp Chris Lambertus Part I nbsp nbsp nbsp and Part II nbsp nbsp Follow the ASF on social media nbsp TheASF on Twitter nbsp and nbsp The ASF page LinkedIn nbsp nbsp Follow the nbsp Apache Community on Facebook nbsp and nbsp Twitter nbsp nbsp Are your software solutions Powered by Apache nbsp Download amp use our quot Powered By quot logos Stay updated about The ASFFor real time updates sign up for Apache related news by sending mail to announce subscribe apache org and follow TheASF on Twitter For a broader spectrum from the Apache community nbsp nbsp provides an aggregate of Project activities as well as the personal blogs and tweets of select ASF Committers 2022-01-10 14:38:23
Linux OMG! Ubuntu! Linux Kernel 5.16 Released with Gaming Boost, Nintendo Joy-Con Drivers + More https://www.omgubuntu.co.uk/2022/01/new-features-in-linux-kernel-5-16-release Linux Kernel Released with Gaming Boost Nintendo Joy Con Drivers MoreThe Linux Kernel just received its major update of the year ーand if you re a gamer it s a corker Linus Torvalds announced the availability of Linux kernel exactly where he always announces it the Linux kernel mailing list The Linux release was delayed by week or so due to the appearance of a red suited bearded fellow something Torvalds notes in his announcement where he quips “we had that extra week due to the holidays and it s not like we had lots of last minute things that needed to be sorted out So what s new Well Linux introduces a This post Linux Kernel Released with Gaming Boost Nintendo Joy Con Drivers More is from OMG Ubuntu Do not reproduce elsewhere without permission 2022-01-10 14:50:28
ニュース BBC News - Home Ikea cuts sick pay for unvaccinated staff forced to self-isolate https://www.bbc.co.uk/news/business-59930206?at_medium=RSS&at_campaign=KARANGA absences 2022-01-10 14:22:15
ニュース BBC News - Home Cladding: Developers told to act on lower-height buildings https://www.bbc.co.uk/news/business-59935333?at_medium=RSS&at_campaign=KARANGA action 2022-01-10 14:38:42
ニュース BBC News - Home Barry Bennell: Men lose case against Manchester City over abuse https://www.bbc.co.uk/news/uk-england-manchester-59934051?at_medium=RSS&at_campaign=KARANGA scout 2022-01-10 14:24:21
ニュース BBC News - Home Djokovic 'focused' on playing Australian Open after visa cancellation overturned https://www.bbc.co.uk/sport/tennis/59938953?at_medium=RSS&at_campaign=KARANGA Djokovic x focused x on playing Australian Open after visa cancellation overturnedNovak Djokovic says he is focused on playing in the Australian Open next week after winning a court battle that overturned his visa cancellation 2022-01-10 14:31:03
北海道 北海道新聞 NY円、115円前半 https://www.hokkaido-np.co.jp/article/631883/ 外国為替市場 2022-01-10 23:04:00
北海道 北海道新聞 成人式後に飲酒運転か、男逮捕 埼玉・入間、はかま姿で https://www.hokkaido-np.co.jp/article/631882/ 埼玉県入間市 2022-01-10 23:04: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件)