python |
Pythonタグが付けられた新着投稿 - Qiita |
Pythonで一つのディレクトリに一気に複数フォルダを作成する方法 |
https://qiita.com/irohas_gawr/items/d3b2ce049d0727416098
|
irohas |
2022-05-14 18:10:44 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
CodePipelineの構築からデプロイまでの導線をIaC化 |
https://qiita.com/TomoyukiSugiyama/items/ccab03464c51210a6952
|
awswellarchitected |
2022-05-14 18:58:52 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
【MySQL】MySQLのパスワードハッシュ作成時(SELECT PASSWORD)のエラー対処(ERROR 1064 (42000): You have an error in your SQL syntax) |
https://qiita.com/masato930/items/5fbb5ff0a64960140d6a
|
【MySQL】MySQLのパスワードハッシュ作成時SELECTPASSWORDのエラー対処ERRORYouhaveanerrorinyourSQLsyntaxはじめにDockerの上に作成したMySQLのコンテナの中でselectpasswordを実行したところ、Syntaxエラーが表示されて処理ができませんでした。 |
2022-05-14 18:07:28 |
Git |
Gitタグが付けられた新着投稿 - Qiita |
久々にAndroid開発する人のlinter導入ログ |
https://qiita.com/mickie895/items/5baef2a08ebb53b89137
|
android |
2022-05-14 18:22:56 |
技術ブログ |
Developers.IO |
Azure ADテナント削除時にエンタープライズアプリケーションの削除をPowerShellで実行 |
https://dev.classmethod.jp/articles/azure-ad-tenant-delete-enterprise-applications-powershell/
|
azure |
2022-05-14 09:05:34 |
海外TECH |
DEV Community |
Tips to use "sed" command |
https://dev.to/mxglt/tips-to-use-sed-command-448n
|
Tips to use quot sed quot commandWhen we used the sed command in our pipeline we had some surprises and took a little bit of times to understand our issue So here is some tips that I learned from these searches Change every occurrence in a fileAs said in the title the following command will change every occcurrence of AAAA by BBBB in the file json file sed i s AAAA BBBB g file json Change first occurrence of each lineHere is the biggest issue that we had Without the g at the end of the replace option the following command will only replace the first occurrence of AAAA in each line sed i s AAAA BBBB file json Change first occurrenceThe following command is to replace the first occurrence of Apple by Banana But this replacement will only occur between the index and the first occurrence of Apple sed Apple s Apple Banana input filenameSo you can easily customize it to replace the first occurrence of Apple after a particular index or specific words I hope it will help you |
2022-05-14 09:50:44 |
海外TECH |
DEV Community |
Simple Serverless Scheduler |
https://dev.to/aws-builders/simple-serverless-scheduler-25c7
|
Simple Serverless SchedulerWhen I was working on the license key management solution for my application CloudPouch I had to face the deferred cancelation of paid subscriptions problem When a user cancels his her subscription for some reason the license key must work until the end of the current billing period Since the use case is not complicated I decided to solve it as simple as possible using the available Serverless services following the principles of architecture controlled architecture Serverless schedulerThe topic of the serverless scheduler has been appearing fairly regularly for years In my opinion this is a repetitive problem that AWS should provide us with a managed solution Discussions in the AWS Community Builders Slack channel have not brought any effects and we still need to implement it by ourselves Fortunately AWS provides several primitives that you can use while building your own scheduler The most popular options are DynamoDB TTLCRON in EventBridge used to be in CloudWatch StepFunctions Selection of a solution for a business problemThe solutions mentioned above differ significantly from each other Foremost they offer different accuracy of operation delay in terms of the period between the designated and the actual time of calling For example for Dynamodb TTL it can be up to hours While using CRON in EventBridge we can invoke a Lambda function every minute Huge difference right This is the most important functional characteristic because it directly affects the implementation of business requirements In numerous instances it is difficult to imagine business stakeholders accepting a two day hold up in a response to a user action Other characteristics that we can describe these solutions are also important For many the maximum number of scheduled actions will be as important as accuracy Another feature will be the maximum time to postpone the action in the future And of course whether the action is cyclical or one off Going further one cannot forget about the cost of running and the level of complexity of the solution directly affecting the time of implementation Taking all these characteristics into account it quickly turns out that there are many options and the final solution depends on the requirements Business caseThe CloudPouch tool is a desktop application for analysis and optimization of the AWS cloud costs It is available in the subscription model for a small monthly or annual fee Each customer has the opportunity to cancel their subscription at any time In such case the license key must be valid until the end of the current billing period for which the fee has already been charged Take a look at t time point presented in the diagram The mechanism must work analogously for annual subscriptions Selection of the solutionGiven the business requirements and the characteristics of AWS services I decided to choose a solution that will be the easiest to implement and use It was a classic architectural trade off because the simplicity of implementation was obtained at the cost of accuracy Choosing the Dynamodb TTL Time to Live mechanism turned out to be the best in this case because Accuracy delay is not the most important for me in the worst case scenario my customer will receive extra days of subscription for free I do not need cyclical calls a particular license can be canceled only onceIt s simple to implement the DynamoDB table itself and its stream are all you needIt is in line with the Event Driven Architecture AWS will automatically trigger scheduled action in the future push instead of pull approach Allows you to easily check which licenses are to be canceled in the future just view the elements in the DynamoDB tableis the cheapest although with my scale every solution would be free Implementation of the solutionThe solution is very simple and consists of a Lambda function and a DynamoDB table with a stream In response to the cancelation of a subscription performed by the user an event is sent to the eventBus in the EventBridge Thanks to the defined rules this event is redirected to the Lambda function Scheduler in the real solution other components consume this event as well The Lambda function Scheduler saves in the Scheduling table information about the license to be canceled This element record has a basic structure it consists of information that allows you to identify the license in the table Paidlicenses and the time when this is going to happen The cancelation date is saved in the Unix time format under the attribute specified in the configuration of the DynamoDB table I called this attribute ttl it was defined in CloudFormation definition of the table at line SchedulingTable Type AWS DynamoDB Table Properties AttributeDefinitions AttributeName PK AttributeType S KeySchema AttributeName PK KeyType HASH TimeToLiveSpecification ttl definition AttributeName ttl Enabled true BillingMode PAY PER REQUEST TableName Scheduling StreamSpecification StreamViewType OLD IMAGEWhen using Node js JavaScript pay attention to the ttl calculation It must be provided in seconds and not milliseconds Hence the division by Math floor new Date cancelationDateAsString getTime How does it workThe AWS DynamoDB service constantly monitors our table and when the ttl value is older than the current time it will delete the element For the whole solution to make sense we must react to the deletion events of elements We do it with a stream which triggers the DeactivatePaidLicense function The payload sent to this function contains all the data of the element that was previously stored in the Scheduling table thanks to which the function knows which license to cancel by making the appropriate update in the table PaidLicenses The connection between the stream and the Lambda function is defined in the serverless yml functions deactivatePaidLicense handler src deactivatePaidLicense function handler description Deactivate license upon Paddle event events stream type dynamodb arn GetAtt SchedulingTable StreamArn maximumRetryAttempts batchSize filterPatterns eventName REMOVE I used a filter here thanks to which the function will be called only as a result of removing the element from the table In this way we transfer logic from our code to the configuration of the AWS infrastructure which is of course the best practice Note The Scheduling table is an independent table that only stores scheduled cancelations I didn t use the single table design approach here so I don t have to worry about removals of other entity types Solution in actionMy cursory tests have shown that the DynamoDB in the us east region deletes the elements with a delay of to minutes after a designated time in the ttl attribute It is much faster than over mentioned hours limit but still may not be acceptable for many solutions In addition I want to highlight that while those are typical delay times we have no guarantee that they will always be like that My observations coincide with tests carried out by Yan Cui some time ago In summary I must conclude that minimal time spent on implementation delivered a fully functional solution that meets my business needs amp is easy to operate And that s what I was aiming for |
2022-05-14 09:29:32 |
北海道 |
北海道新聞 |
<苫小牧ローカルチェーンの底力>3 三星=菓子、パン、ケーキ まちの原風景を銘菓に |
https://www.hokkaido-np.co.jp/article/680442/
|
苫小牧市糸井 |
2022-05-14 18:18:41 |
北海道 |
北海道新聞 |
D2―9神(14日) 中野2ラン2発で阪神快勝 |
https://www.hokkaido-np.co.jp/article/680787/
|
阪神 |
2022-05-14 18:09:00 |
北海道 |
北海道新聞 |
J1、名古屋が7戦ぶり白星 FC東京は3連敗 |
https://www.hokkaido-np.co.jp/article/680786/
|
豊田スタジアム |
2022-05-14 18:09:00 |
北海道 |
北海道新聞 |
東京で新たに3799人感染 新型コロナ、10人死亡 |
https://www.hokkaido-np.co.jp/article/680784/
|
新型コロナウイルス |
2022-05-14 18:01:00 |
ビジネス |
東洋経済オンライン |
いよいよ「すべてのバブル」が崩壊しかかっている ウォーホール「モンロー250億円落札」の意味 | 新競馬好きエコノミストの市場深読み劇場 | 東洋経済オンライン |
https://toyokeizai.net/articles/-/589208?utm_source=rss&utm_medium=http&utm_campaign=link_back
|
市場関係者 |
2022-05-14 18:30:00 |
海外TECH |
reddit |
G2 Esports vs. Evil Geniuses / MSI 2022 - Group C / Post-Match Discussion |
https://www.reddit.com/r/leagueoflegends/comments/updu4g/g2_esports_vs_evil_geniuses_msi_2022_group_c/
|
G Esports vs Evil Geniuses MSI Group C Post Match DiscussionMSI Official page Leaguepedia Liquipedia Eventvods com New to LoL G Esports Evil Geniuses G Leaguepedia Liquipedia Website Twitter Facebook YouTube Subreddit EG Leaguepedia Liquipedia Website Twitter Facebook YouTube MATCH G vs EG Winner G Esports in m Bans Bans G K T D B G Twisted fate Zeri Leblanc Kaisa Xayah k H I I I B EG Ahri Lucian Pyke Galio Akali k M HT H I G vs EG Broken Blade Gnar TOP Gangplank Impact Jankos Wukong JNG Lillia Inspired caPs Sylas MID Tryndamere jojopyun Flakked Ezreal BOT Tristana Danny Targamas Rakan SUP Leona Vulcan This thread was created by the Post Match Team submitted by u Vexis to r leagueoflegends link comments |
2022-05-14 09:44:09 |
コメント
コメントを投稿