投稿時間:2022-04-04 10:27:18 RSSフィード2022-04-04 10:00 分まとめ(31件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia News] Amazon.com初の労働組合結成 Amazonは「失望した。異議を申し立てる」 https://www.itmedia.co.jp/news/articles/2204/04/news061.html amazon 2022-04-04 09:42:00
TECH Techable(テッカブル) 「飲酒運転撲滅プロジェクト」始動、AIで飲んだ酒の種類などを推測するシステム開発へ https://techable.jp/archives/176418 三井住友海上火災保険株式会社 2022-04-04 00:00:10
デザイン コリス 商用利用無料! マンガや同人誌用の可読性に優れたモリサワ BIZ UDゴシックの合成フォントがリリース -びぜんアンチック https://coliss.com/articles/build-websites/operation/work/bizen-antique.html 続きを読む 2022-04-04 00:36:31
python Pythonタグが付けられた新着投稿 - Qiita DatabricksでPythonを用いたチャート&グラフの表示 https://qiita.com/taka_yayoi/items/0e5f8097cd6aba4e8349 ピボットテーブルの詳細に関しては右を参照くださいピボットテーブルに対しては、キー、系列グルーピング、値のフィールドを指定することができます。 2022-04-04 09:58:32
Ruby Rubyタグが付けられた新着投稿 - Qiita 【selenium】session not created: This version of ChromeDriver only supports Chrome version XXX https://qiita.com/takao_yamasaki/items/4cc7dd104e24c1e21fe9 今回の場合、SupportsChromeversionと表示されているChromeDriverをダウンロードする。 2022-04-04 09:09:14
AWS AWSタグが付けられた新着投稿 - Qiita AWSにARMプロセッサー環境のOpenShiftをデプロイ https://qiita.com/shin7446/items/4f4be047a882fb644d42 ちなみに、amd用のインストーラでinstallconfigyamlを作成後、ここの値をarmに設定しても正常にOpenShiftをデプロイできません。 2022-04-04 09:52:57
Azure Azureタグが付けられた新着投稿 - Qiita 最終アクセスからの経過時間でデータ管理 on Azure https://qiita.com/coitate/items/4471605c820d5422ee43 参考前提AzureのSubscriptionをもっていることAzurePortal上で基本的な操作が行えることここでは操作手順は書いていないけど、調べながらできればOKAzureCLIを操作できることCloudShellだったり、ローカルだったり設定内容任意のStorageアカウントを作成する。 2022-04-04 09:48:25
Ruby Railsタグが付けられた新着投稿 - Qiita 【selenium】session not created: This version of ChromeDriver only supports Chrome version XXX https://qiita.com/takao_yamasaki/items/4cc7dd104e24c1e21fe9 今回の場合、SupportsChromeversionと表示されているChromeDriverをダウンロードする。 2022-04-04 09:09:14
Ruby Railsタグが付けられた新着投稿 - Qiita railsがアプリを新規作成できないエラーを治す方法 https://qiita.com/Azurite324/items/83d58cfa3d2c6bface62 railsがアプリを新規作成できないエラーを治す方法railsがアプリを新規作成できない原因はホームディレクトリに直接railsアプリをすでに作成していてその状態でフォルダを作って新規作成してもアプリのファイルはすでにあるとして作れないためでした。 2022-04-04 09:02:50
海外TECH DEV Community Pizza Code https://dev.to/besworks/pizza-code-3gc6 Pizza CodeWe ve all heard of Spaghetti Code I d like to discuss a less frequently used term Pizza Code Often thought of as an anti pattern I would like to present an argument for why pizza is actually the best analogy for good web development Parts of a Pizza I have a nickname for any marinara based pasta that gets made in my house Essentially Pizza They re made of all the same things and combine all the same flavors but pizza takes more time and effort Keep in mind that I m talking about using dehydrated store bought pasta here Making your own noodles from scratch does takes time but you ll have to make dough to make noodles anyway so you might as well just make pizza because the end result will be more satisfying The DoughThe dough represents the Browser The platform on which your web app runs There are a few different ways to make dough Thick Thin Gluten Free ーBlink Gecko WebKit etc Each developer has a preference as to which type of dough they prefer but they re all made from the same basic ingredients the WC Standards and all provide essentially the same base on which to build your pizza aka your app The SauceThe sauce would be your CSS But you can t even see the sauce you point out Correct but the true style of a food is in it s taste Each bite is influenced by the flavor of your sauce You can make a pizza without sauce it would be pretty bland but still edible You can serve a web page without CSS too If it s well built it will still get it s point across If not well you probably just tried to pass off spaghetti as pizza You can put any sauce you like on a pizza too There s no real wrong decision here However you still can make a bad sauce Too much salt or not enough overpowering herbs too acidic etc You can use a canned sauce bootstrap tailwind etc but making your own from fresh ingredients adds a richness that you ll never get with an off the shelf solution A well seasoned and balanced flavor can only be achieved through practice and a trained palette The ToppingsEvery pizza needs toppings just as every app needs content Each type of topping has it s own unique characteristics and the way they are prepared can vary What each one brings to the experience can be wildly different Onion and mushrooms are about as similar as lt h gt and lt img gt There are a few typical ingredients you see used frequently but pretty much anything goes in some combination or another However you can definitely overload a pizza with too many toppings or create an unspeakable combo that nobody would ever want to consume HTML is kind of the same way It comes with a set of tried and tested elements that generally get used in predictable ways but the spec also allows for developers to create their own Custom Elements which are prepared ahead of time and used as desired Not all Widgets are created equal though Just as an experienced chef will prepare custom toppings in a delicious and beautiful way a developer needs the right tools and experience to produce elegant efficient Web Components The preparation of the components should be aside from the main app and their use should be as simple as choosing between green bell peppers or feta stuffed serrano just to spice things up a bit Be wary of where you source your toppings though They can make or break your pizza Growing your own vegetables from seeds may not be the right choice for every one but is certainly a valid and rewarding option For most others buying fresh from a farmers market would be the next best alternative Best to avoid heavily processed or frozen options though The same principle applies to Web Components Building standards compliant portable components from scratch has so far been the domain of evangelical developers such as myself and of course the brilliant minds behind the spec But that s what makes this technique so powerful All you need to use a Web Component is basic knowledge of HTML All the behavior is baked right in They work perfectly in most templating engines and you can style them with standard CSS In most cases well documented pre made solutions can be found online and either used as they come or extended with whatever custom functionality you need Watch out for component based libraries frameworks sporting catchy slogans on their plastic packaging or you might end up picking your peppers out of a bag of dehydrated soup stock Stick with components that adhere to the standards and you ll be doing yourself a favor The CheeseA pizza without cheese is not a pizza Period Without it you ve made bruschetta And without the Event Loop you ve made a static document not an app We need the cheese to glue all of our toppings together and we need the Event Loop to tie our elements into a cohesive interface The cheese is reliable It doesn t care what toppings are attached to it You can throw whatever fancy cheese you want on your pizza to suit your taste but adding a UI Framework to your project ultimately does nothing that trusty ole mozzarella can t do without the extra fuss If you ve built your app right each Web Component can co exist in the Event Loop and not interfere with each other but act in concert to make every bite of content a satisfying experience The DeliveryA key part of pizza is the baking process Cook it too fast and it will be an underdone soggy mess Cook it too long and people get impatient and complain that final product tastes burnt Cooking times vary by oven though and your choice of both front and back end architecture will heavily influence your app s ability to respond to requests and render content in a timely fashion When ordering a pizza you expect to wait The anticipation builds as you smell and see the reveal This is all part of the experience In a web app we have the First Contentful Paint and Time to interactive metrics Ideally these should be as fast as possible but as long as the user experience is smooth and satisfying impatience and annoyance can be mitigated Prioritizing Above The Fold content and avoiding Layout Shifts allows your users to be drawn into the experience Strategic use of caching and preloading can make a Multi Page App feel just as responsive as a Single Page App Loading an empty app skeleton and populating it with dozens of chunky render blocking components each with at least one HTTP request and it s own spinning indicator is equally as bad as leaving a user sitting on a blank screen while a monolithic app bundle is downloaded and executed Don t leave your users with a bad taste in their mouth before they ve even taken a bite by being mindful of the Core Web Vitals The SlicesIt can be hard to eat a whole pizza without slicing it but that really depends on the size of the pizza An inch personal pizza would be no problem but a inch extra large party pizza would be significantly harder Pizza and by extension a well developed web app lends itself perfectly to being sliced into any number of portions best suiting your target audience and content distribution This is where pizza trumps pasta The pasta makers all want you to think that their shape of noodle is superior And maybe in certain highly specific situations they re right but all they ve really done is squeeze your perfectly good pizza dough through a noodle factory exposing more surface area for you to hope that your sauce clings to With spaghetti fettuccine jQuery WordPress etc you get a tangled framework to slop your sauce toppings mixture onto Most of it ends up around the edges of the plate and once it s all consumed you re left with a ugly pile of plain noodles With something more bite sized like shells macaroni ReactJS etc you get a homogenized scoop of pasta but every bite feels generic and mushy A golden baked slice of pizza will always have more texture and stability than any pasta could ever hope for You can also showcase individual toppings making your content the star of the show not just background flavor ConclusionThere are as many ways to make pizza as their are Web Development Frameworks It all boils bakes down to whether you want to provide your audience with a hot and ready to stuff into their faces as they drive out of the parking lot a gourmet dining experience or something in between Chew on that when you re writing the recipe for your next app or leave the cooking to the chefs 2022-04-04 00:42:18
海外TECH DEV Community 12 Tips to Self-host Renovate Bot https://dev.to/jerrynsh/12-tips-to-self-host-renovate-bot-446l Tips to Self host Renovate BotUpdating dependencies is boring Despite its importance we always find excuses to avoid updating them in the phrase of “if it ain t broke don t fix it or “there are more important features to work on Over time the maintainability of the projects deteriorates and each update poses ever greater risks So what s the solution Let the robots do our boring job In this article you will learn tips on running a self hosted Renovate bot with GitLab as an example If you re looking for a guide on how to start using Renovate on GitHub I d highly recommend you to read this TL DRWhy use RenovateGetting started on self hosted Renovate GitLab as an example How to run Renovate locallyDebugging Renovate jobs useful Renovate tipsDisclaimer these tips are my own opinions from lessons gathered from hours working Enjoy Why Use RenovateIn short Renovate official doc helps to update project dependencies private or third party automatically How Renovate parses our projects dependency management files such as package json pyproject toml go mod file and raises a pull merge request PR MR with the updated dependencies accordingly Renovate is highly customizable via a simple configuration file config js With rather intuitive configuration settings it also supports a wide range of package managers Today Renovate supports many other Git platforms such as Bitbucket Gitea or even Azure DevOps On top of that it s used by a lot of popular development communities or companies such as Uber GitLab Prisma Netlify etc HighlightThe best part about Renovate is its ability to auto merge PRs MRs That aside the flexibility provided by the packageRules feature packagerules which is used to apply rules to specific dependencies in individual or group is incredibly handy How To Run Self hosted Renovate on GitLabTo run Renovate on self hosted GitLab you ll need a private GitLab project i e repository in the following This bot repository will be used to host GitLab runners which run Renovate for your other projects Next assuming that you already have GitLab runners installed and set up you ll need the following in the bot project Configure the following CI CD variables RENOVATE TOKEN ーGitLab Personal Access Token PAT with scopes read user api and write repository GITHUB COM TOKEN ーGitHub PAT with minimum scope config js NOTE here s a more complex example Example config js from module exports endpoint token gitlab token platform gitlab onboardingConfig extends config base repositories username repo orgname repo gitlab ci yml If you need a more complex example check out this example from the GitLab team Otherwise here s a minimal example do update accordingly image renovate renovate variables LOG LEVEL debugrenovate on schedule tags your gitlab runner tag if any only schedules script renovate RENOVATE EXTRA FLAGSrenovate tags your gitlab runner tag if any except schedules script renovate RENOVATE EXTRA FLAGSLastly you ll need to run Renovate at regular intervals e g every hour using the GitLab project s CI CD Schedules feature Do note that this is different from Renovate s own schedule Check the source for more details Though the steps above should be sufficient How To Run Renovate LocallyWhile I was working with a large repository gt GB for full clone each Renovate job may take hours to complete Having the ability to run Renovate locally saves me a bunch of time when it comes to experimentation and debugging First create a minimum reproducible example MRE repository Then update your config js to target or discover the MRE repository To run Renovate locally It s a lot easier to just use Docker So make sure you ve installed Docker To start you ll need to ensure that these environment variables are being exported in your shell export RENOVATE TOKEN aabbcc GitLab Personal Access token PAT export GITHUB COM TOKEN ccddee GitHub PATNext update your config js accordingly You ll need to update your target repositories accordingly Finally you can run Renovate using the following To grab the latest Renovate version check out Docker hub Do change the following command accordingly docker run rm e LOG LEVEL debug e GITHUB COM TOKEN GITHUB COM TOKEN v path to local config js usr src app config js renovate renovate token RENOVATE TOKEN dry run true With this testing Renovate configuration in a fast feedback loop manner is now possible In case you need more comprehensive logs try setting LOG LEVEL trace instead To perform an actual run update dry run false Useful Renovate Bot Tips General tipsNot sure how to get the most out of Renovate quickly Check out this Renovate bot cheat sheet instead of the verboseness of the official Renovate doc If you are unsure whether Renovate supports a certain functionality always check out their FAQ page first Chances are it s already there To disable updates for a specific package or library simply set enabled false under the respective packageRule packagerules Example Example config jsmodule exports endpoint token gitlab token platform gitlab onboardingConfig extends config base repositories repository john next generation repo packageRules description Disable MAJOR update types matchUpdateTypes major enabled false Need to run some custom task or script after upgrading e g a script that posts messages to Slack Try postUpgradeTasks Keep project specific Renovate configs on the bot repository instead of having renovate json in every other repository For this set onboarding false onboarding under module exports This allows for Renovate related configs to be abstracted away to a single repository only Tips on debugging Renovate jobsWhen it comes to self hosted solutions there s no running away from debugging your own jobs There could be scenarios where you ll need to test connections to your private registry proxy etc Here are a couple of helpful tips Try running Renovate locally to have a faster feedback loop instead of relying on your CI CD pipelines Plus running locally is practically free Use trace LOG LEVEL in case debug doesn t give you enough information In case you re working on some bespoke use cases or facing odd encounters bugs try Google searching with the prefix “site github com renovatebot renovate example In most cases you ll find that there are already others who have filed a similar discussion or issue Dealing with a large repository e g GB in size If you attempt to run Renovate on a large repository you may encounter a SIGTERM signal which can be seen in your Renovate job log due to timeout To cope with this increase the executionTimeout setting executiontimeout in your config js Example config jsmodule exports endpoint executionTimeout minutes token gitlab token platform gitlab onboardingConfig extends config base repositories john large repo doe huge repo Under your GitLab project s CI CD General pipelines settings you may want to increase your job timeout e g hours as Renovate may take a long time on an uncached run on large repositories You may want to set persistRepoData true for faster git fetch between runs Example config jsmodule exports endpoint token gitlab token platform gitlab persistRepoData true onboardingConfig extends config base repositories john repo On some occasions you may run into ERROR Disk space error skipping Here you may want to provision a runner with increased disk size E g if you are using AWS EC try to increase the size of the volume ConclusionOver the past few months I have been using Renovate bot extensively on GitHub and self hosted GitLab Today I am using Renovate on most of my active projects on GitHub to automate dependency updates So far Renovate was able to fit of my use cases Keeping our project dependencies up to date is often overlooked Yet overlooking such work often comes at a great cost The fact that we can leverage Renovate s ability to do such grunt work is quite a blessing I hope this article saves you enough time instead of having you groom through pages of GitHub discussions and issues Thanks for reading This article was originally published on jerrynsh com 2022-04-04 00:38:03
海外TECH DEV Community Creating a Simple Weather App with Python and Flask https://dev.to/cscarpitta/creating-a-simple-weather-app-with-python-and-flask-5bpd Creating a Simple Weather App with Python and FlaskAre you learning Python Practicing Flask And tired of the usual Hello World Well Then this post is for you In this post we will build a weather app in Python using Flask Project Overview ️Flask is a framework for building web applications with Python We will develop a web application that provides the weather forecast for days Flask makes the task of creating a web application relatively simple Our weather app will require no more than lines of Python code and lines of HTML An example ️We need a web server to host our application An example of how our app will work The user will open a browser and navigate to http localhost forecast city London like Tell me the weather forecast for London The web server will receive the request and call our web app to retrieve the weather forecast Finally the web server will send an HTML page containing the weather forecast back to the user The user will receive the HTML page and display the forecast for London in the browser There are many different web servers like NGINX or Apache HTTP Server We will use the Flask s built in server Accessing weather forecast ️You may be wondering where will our weather app get the forecast data from Well there are many different weather services available We will use OpenWeatherMap service It supports different subscription plans We will use the free plan that supports up to calls minute and calls month which are sufficient for the purpose of this tutorial Building the weather app PrerequisitesBefore starting to code we need to install Flask To install Flask we open a terminal and execute the following command pip install flaskThe installation requires few seconds Project StructureWe structure the project as follows ├ーstatic│└ーicons ├ーd png ├ーn png ├ーd png └ー ├ーtemplates│└ーindex html├ーweather py└ーREADME mdIn weather py we will put the Flask application The folder static icons will contain all the icons used to represent the weather conditions For example we will have an icon for Clouds another icon for Sunny and so on templates is a folder containing a single file index html This HTML file only contains an empty table where we will put the weather data Sign up to OpenWeatherMapBefore moving on we need to sign up to OpenWeatherMap Visit and click on the Subscribe button under the Day Hour Forecast section Click on Get API key and complete the registration Then log into OpenWeatherMap website with your credentials and click on My API keys Follow the instrutions to generate a new API key Implementing the Weather AppIn weather py we put the logic that receives user requests and provides weather forecast We need to create a function that retrieves the weather data from OpenWeatherMap API This function is invoked when the user sends an HTTP GET request to our web app for example http localhost forecast city London and returns an HTML page containing the weather forecast From flask package we need to import the Flask class and other functions that we will use later from flask import Flask render template request abort ResponseThen we initialize the Flask application app Flask name We create a function called get weather that will be executed when the user sends an HTTP GET request to the weather app This function will extract the city name from the request of the user It will retrieve the weather for the requested city from OpenWeatherMap Finally an HTML page containing the weather is returned to the user The browser of the user will show the HTML page received from the web server This HTML page contains a table showing the weather conditions for the requested city Let s create the get weather function step by step We define a function get weather that takes no arguments app route forecast methods GET def get weather app route forecast methods GET is a decorator It is a directive that routes the HTTP GET requests made to the http localhost forecast URL to the get weather function In this way when an user navigates to http localhost forecast our Flask web server will execute the get weather function We want that the user specifies the city as an argument of the HTTP GET request Therefore we expect that the HTTP request contains an argument named city We can extract the city from the HTTP request as follows city request args get city It is important to validate the parameters extracted from the HTTP request In our case city is a mandatory argument We need to ensure that the user provided a city If the request does not contain a city i e city is None we return a status code BAD REQUEST and we provide a description that tells the user that the city argument is missing if city is None abort Missing argument city If a city has been provided in the HTTP request we prepare a request for OpenWeatherMap to get the weather forecast The request will contain three parameters q appid and units q is the name of the city for which we want the forecasts appid is your OpenWeatherMap API key data data q request args get city data appid XXXXXXXXX data units metric We use urllib python library to perform the retrieve the forecast from OpenWeatherMap url values urllib parse urlencode data url full url url url values data urllib request urlopen full url Finally we use render template to generate the HTML page containing the results Basically render template takes the template HTML file fills it with the weather data received from OpenWeatherMap and return the generated HTML page to the user Finally the user will display the weather results in the browser resp Response data resp status code return render template index html title Weather App data json loads data read decode utf HTML Template fileThe HTML template file is reported below lt html gt lt head gt lt title gt title lt title gt lt style gt table font family arial sans serif border collapse collapse width td th border px solid dddddd text align left padding px tr nth child even background color dddddd weather display flex flex direction row align items center lt style gt lt head gt lt body gt lt table gt lt tr gt lt th gt Time lt th gt lt th gt Temperature lt th gt lt th gt Humidity lt th gt lt th gt Weather lt th gt lt th gt Wind lt th gt lt tr gt for item in data list lt tr gt lt td gt item dt txt lt td gt lt td gt item main temp °C lt td gt lt td gt item main humidity lt td gt lt td gt lt div id weather gt lt img src static icons item weather icon png gt lt img gt item weather main lt div gt lt td gt lt td gt f item wind speed km h item wind deg deg lt td gt lt tr gt endfor lt table gt lt body gt lt html gt Here is the final result ConclusionIn this blog post we developed a simple weather app using Python and Flask This is a great exercise for Python and Flask beginners If you like this post consider following me on Twitter Credits for the images Weather icons created by iconixar Flaticon 2022-04-04 00:21:15
海外TECH DEV Community Adding Recent Blog Posts to Your GitHub Readme https://dev.to/errorgamer2000/adding-recent-blog-posts-to-your-github-readme-4n11 Adding Recent Blog Posts to Your GitHub ReadmeThis is my first post here I am still learning so If you see any issues with this post please let me know so that I can fix them GitHub is one of the most popular git repository websites hosting a countless number of open source projects Over the years GitHub has grown into a diverse community full of great code created by both solo web development hobbyists like myself and professional teams working for big companies like Facebook Hi there I m ErrorGamer I may reveal my real name in the future but for now I ll remain hidden behind this pseudonym I am a solo web developer working my way through my junior year in high school and I spent the majority of my virtual school year during the COVID pandemic pretty much ignoring my classes using the time to instead teach myself web development For my first blog post I want to share my first REAL JavaScript well really it s TypeScript project with you Okay we get it back to the post already If you have used GitHub before which I m sure you have you have most undoubtedly come across a profile readme before While GitHub allows some level of profile personalization out of the box the profile readme feature allows you to add any content you want to your profile Take my profile for example As you can see I have many different elements that are not a part of the normal GitHub profile Since these readme files provide your potential followers customers or even potential employers with a quick overview of both your activity and your ability you want to put as much relevant content as you can on your readme Just don t make it too long or nobody will take the time to read it Now since you want your customers or employers to see the full extent of your skills there are many tidbits of information that would be perfect to put on your profile including any blog posts that you have made If you are a blogger as well as a developer then this is the perfect article for you Even if you aren t feel free to keep reading I don t mind As I planned to start blogging I stumbled across this idea as I myself was looking to start a blogging presence of my own As I looked around I was able to only find one easy to use GitHub action that would allow me to add a list of my posts to my readme Sadly I was disappointed to discover that this action had little formatting only setting up the posts as a bulleted list of links which was less than appealing to the eye Alright I m lost What is this post really about Okay okay I get it A little much background right So to the point Unable to find a suitable solution I began making one myself The Action itselfI figure I ve kept you long enough by now This action is extremely simple to use all you need to do is give it a simple URL and it does the rest If you want to go ahead and see what it looks like go ahead and look at it on the GitHub Actions Marketplace SetupAs I said this action is very easy to use and there is minimal setup Let s go ahead and start with a basic workflow file name Generate Blog Liston push schedule cron jobs blog runs on ubuntu latest name Fetch and Generate Blog Posts steps This workflow as you may be able to see runs every time you push new code to the repository so if you update the readme it will automatically replace the old blog posts in case you changed the configuration of the action as well as on a set schedule of every hour Now in order for this action to be able to work the action needs to have the ability to read your readme so let s go ahead and add a checkout step to start with Add a new step that consists simply of a uses property steps uses actions checkout vThis will ensure that the repository is fully loaded for the action to run in Now that we are about ready to actually add the step to load our posts there is one last thing that we need our RSS feed Now the URL to your RSS feed will depend on the site that you are blogging on For dev to it is username where you replace username with your username For example my RSS feed URL here would be Configuring the ActionNow we are finally ready to set up the action Let s add another step to our workflow but we will give this one a name steps uses actions checkout v name GitHub Readme Blog Post Action uses ErrorGamer github readme blog post action v with feed urls rss feed Now just replace the rss feed with the URL to your RSS feed You may have noticed that the option we are using is called feed urls rather than feed url Plural not singular That s right you can give multiple URLs for different feeds each of them separated by a comma Final configurationAlmost done hang in there Now that we have added this action to our workflow the action will automatically create all of the images it needs and save them to the folder blog post list output Go ahead Save the file commit it and if you are running a locally cloned repo push your changes Head over to the GitHub website for your repository and open the actions tab You should see your brand new Generate Blog List action showing up there with a little orange circle next to it Wait until the action has finished the circle will become a green checkmark and open up the readme md file Uhhh nothing happened There isn t even the blog post list output folder Well of course nothing happened The action did make the changes to the repo but we have not set up anything to actually save those changes To do that we need one final step a git commit step If you are handy with the git CLI go ahead and do this yourself I however prefer to use stefanzweifel git auto commit action So let s add another step to the workflow steps uses actions checkout v name GitHub Readme Blog Post Action uses ErrorGamer github readme blog post action v with feed urls rss feed name Commit changed files uses stefanzweifel git auto commit action v with commit message Save Generated Blog Posts skip checkout trueThis will save the changed files Go ahead and try this out again committing the changed workflow file and head over to the Actions tab again Once your workflow has finished running head back over to the readme Ugh not again Still no posts on the readme But we are making progress the new folder is there and everything Well yes there is nothing in the readme yet But our workflow is complete and running smoothly we simply have not told it where to put the list of posts Telling the Action Where to Put the PostsNow that our workflow is work ing all that is left is to actually make it put stuff into the readme to do that just slap a couple of comments in it somewhere like so lt blog post list start gt lt blog post list end gt Commit the changes again wait for the workflow to finish and then check the readme OMG IT WORKED Yes congrats you did it you now have a working automatically updated list of posts on your readme Have fun Customizing the ActionThere are a number of different options that you can use with the action Note This table will most likely become out of date as I update the action Head over to the GitHub Repository to see an up to date table Option Name Type Default Value Description feed urls string A comma seperated list of RSS feed URLs to load posts from This is the only required input max posts per url number The maximum number of posts to show for each feed If the number of posts is less than this then all of the posts will be shown position indicator string blog post list The text of the comments that the action uses to inject the images into the README file Everything between the two comments in the form lt position indicator start gt and lt position indicator end gt is replaced Changing this can allow you to use multiple configurations for different feeds by using different markers for each show feed data boolean true Whether or not to show the generated markdown describing the feed which includes the title of the feed the description of the feed the Read More link the last updated date and the post count Each of these can also be individually toggled with the following options This will override any of the specific options so it is better to disable enable them specifically if you want to remove some elements show feed title boolean true Whether or not to show the header containing the title of the feed This will be formatted as an h header An option to customize this header will be in a future update show feed description boolean true Whether or not to show the title of the feed that is provided by the RSS feed show read more boolean true Whether or not to show the Read More link under the feed description show last updated date boolean true Whether or not to show the date and time of the last update of the list show post count boolean true Whether or not to show the number of posts shown and the total number of posts provided by the RSS feed show post date boolean true Whether or not to show the date of each post on the card locale string en The locale of the project This is used purely for formatting the dates of the cards and last update time zone string UTC A valid time zone to use for the last updated date output dir string blog post list output The directory to store the post card images in Must be in the root directory i e no path separators or and cannot include the characters lt gt How It WorksThis action does a little more than just parsing a simple RSS feed It does start with this however and it uses this data as a backup for missing information What it does do is use the link that it receives from the feed to fetch the HTML for the webpage of the blog and then uses The Open Graph protocol to find the preview image for the post as well as the title and description Any of this missing information is taken from the RSS feed if it is there If an image is not found for the post then it is removed from the card Happy coding Please let me know how you feel about this post and anything else you think I should add in the future 2022-04-04 00:13:53
海外TECH DEV Community 100 Days of Swift - Day 4 https://dev.to/davjvo/100-days-of-swift-day-4-1gnm Days of Swift Day Continuation of Hacking With Swift Days of SwiftDay LooooooooopsFor loopsFor loops are done on a python way maybe swift did it first but without the required indentation So if you want to loop through you d do for number in print number PS Discard the underscore is accepted if you don t want need the actual variableWhile loopsNothing fancy to see hereRepeat LoopsBasically do whilesBreaking and skipping in loopsWhile the keyword continue is just your everyday reserved word breaks are really interesting Swift supports something called labeled statements Imagine the following nested loop for option in options for option in options do code here Like in other languages if we use the keyword break it will exit the inner loop only inside a function we could add a return but that s if we are inside a function so how do we exit the parent well you give it a label and then you tell swift to break label name example outerLoop for option in options for option in options break outerLoop Pretty neat in my opinion 2022-04-04 00:09:32
海外TECH DEV Community Backend Architecture https://dev.to/gnomff_65/backend-architecture-2g70 Backend ArchitectureI ve been a backend engineer for a while Like a while Here is an actual picture of me designing my most recent backend architecture It s been my experience that almost all architectures come down to a small set of general patterns In this article I m going to lay out the various patterns what problems they solve and when they are appropriate What is a backend system A backend system is a centralized place where data is processed stored and made available for access Does that sound super general It is But there are some important details in that description For one it s a “centralized place It doesn t happen in your browser or on your phone or inside a random frog It happens on a server somewhere at a location that is well known ie has an address like google com This well known location processes and stores data for example when you send a direct message to someone it goes to a backend system where it gets stored Then later the recipient can see that message by logging into the system and looking at their messages The most critical thing that backend systems do is care for data Imagine you are sending someone a saucy DM and you typed “I never want you to leave but the system mangled your message and what they received was “I want you to leave Or maybe worse your message gets sent times Or it says sent but never was Or it was sent to the wrong person Good backend architecture guarantees that these things will never happen Pictured An architect who takes good care of your dataBackend techniques we re going to cover in this article Synchronous processing Synchronous error handlingAsynchronous processing Synchronous error handlingAsynchronous processing Asynchronous error handlingBroadcasting without guaranteesBroadcasting with guaranteesBatching when and how to do it OverviewAll of the above backend systems are composed of these building blocks System input gt processing stateless service gt sink stateful service where each sink can become the system input for another process Why do we split stateless processing from stateful sinks Because it makes everything much easier Let s talk about what we need to do Safeguard the data by making sure something is always responsible for its safetyHandle all the requests that come to us without overloading and crashing too muchValidate data before accepting itThese things can be shockingly difficult to accomplish especially at scale It s easy to set yourself up for failure like maybe you try to batch requests in your stateless service before putting them into a sink for performance reasons What happens when the service unexpectedly goes down You told the user that you took responsibility for the data but then dropped their baby on the floor before handing it off Poor form Party foul Pictured An architect who batches data in their APIOr maybe you think to yourself this is a small little thing we won t need to worry about scaling We ll just have one server and store state in memory If it gets wiped no big deal the user just gets logged out or whatever Cool cool Now your service is crashing constantly because people are actually using it and you keep running out of memory You re at the biggest server your cloud service provides it s costing an arm and a leg and now you need to redesign your entire system in the middle of a running production outage Not fun Not fun for you and not fun for your users Pictured An architect who did not design for scaleOr maybe you think it s too hard to get the user to provide us with valid data we ll just accept whatever they give us and sort it out later You have just opened yourself up to an absolute world of pain Now every time the user posts some new nonsense data you have to comb through it determine what fields mean what and try to massage it into something you can make sense of This is a special circle of integration hell where nothing works and no one knows why A squishy interface is never OK Pictured A backend engineer manually trying to fix the database because data wasn t properly validatedWe split things out into stateless and stateful services because doing so solves these problems You have guarantees about data integrity You can more easily scale your system when you inevitably need to You have a specific place that is responsible for gatekeeping and rejecting bad data before it gets into storage I cannot overstate this enough the more guarantees you put at the edge of your system the simpler all of your downstream systems will be the fewer bugs you will have and the more people will like you Stateless nessA stateless service provides only one guarantee a request is either processed successfully or it is not If the service dies in the middle of a request the client is guaranteed to know that the request failed The client will not be given a cheery response then find out later that their request was dropped on the floor Stateless services have no memory of what has happened or what requests they did or did not process They don t guarantee that the data will be there later They don t guarantee that you will find love They have one purpose in life and that is handling requests telling you if they succeeded or failed and then immediately forgetting about them They never never take responsibility for the data If something takes responsibility for data it is by definition a stateful service Imagine a stateless service as a bank teller They sit in front of the bank and they provide access to your money data but they don t actually keep your money data in their pockets They take it from you and put it directly into the bank or they take it from the bank and give it to you but they never say Oh I ll just put this in my pocket and put it in the bank later Examples of stateless services are APIs that store nothing Lambda functions Cron jobs and Batch jobs Stateful nessStateful services are quite different they are the bank Stateful services exist to store and protect your data They swaddle it up and care for it making sure it never gets lost or corrupted Your users should never access it directly for the same reason you should never access the bank directly that s what tellers are for Stateful services are of course much more difficult to scale It s easy to get new tellers but it s hard to set up a whole new bank Cloud providers have gotten better about this over time and if you need to do it you should use whatever system your cloud provider has set up If you find that you are scaling a stateful system yourself re evaluate your architecture immediately because you ve done something wrong Or you re in the extreme minority of people who legitimately need to run an unmanaged database In this case may God have mercy on your soul Examples of stateful services are Databases Queues File systems APIs that store requests or logs and External APIs APIs that you transfer ownership of data to Sink Database TerminologyFor the rest of this article the word “database is synonymous with “sink Databases are most commonly used so that s what I ll use in the examples but really anything that takes responsibility for data could be swapped in Architectures Synchronous processing Synchronous error handlingThis is the most common backend architecture It takes some input validates that the input is in the expected shape number between or string less than characters stores data in the sink and then returns a success In the case of failure for example if the provided input was when it was supposed to be less than an error is returned to the caller You might ask where is logging in all this As the provider of the service I want to know when an error happens Thanks for the easy question that I made up for myself to answer You are not limited to a single sink you can write your logs to another database like Elasticsearch or Datadog or some such Something like this Look Ma logs But Tim you say What if Elasticsearch is down but I still want my logs Is ES now a dependency Shouldn t I write to disk just in case The answer is no If you write your logs to disk then this is no longer a stateless service The logs are State with a capital S and your service is now responsible for caretaking them You will lose all of the niceties of a stateless service and are now faced with the complexity of a stateful service In other words don t do it You will be sad Maybe not today and maybe not tomorrow but soon Pictured You being sad because you turned your stateless service into a stateful oneIf indeed you do not wish to be dependent on your sink being always available there are other options open to you Since queues are more reliable than Elasticsearch way more ES goes out more often than a narcoleptic sloth you can always push your logs into a queue something like This is what Kafka was designed for and it works fine BUT you might say Hmm What if my queue goes down I ve just replaced one dependency with another First I must ask you what are your requirements here Is it good enough to just say well when your queue is down the system is down In almost all circumstances you can harden your database and queue such that the likelihood of either of them going down is extremely minimal You can totally hit your SLAs and everything is copacetic This architecture is good and fine and you should use it of the time because it s simple and fine It s fine For real BUT Let s say for the moment that either you have a very sadistic boss or you really do work at a bank or something and any downtime at all is a super big deal You can invert the pattern like this The API in this case ONLY does validation and then puts the request on a queue for actual processing and storage You ll notice this is actually the “Asynchronous processing Synchronous error handling pattern from later in the article The benefit of this architecture is that you ve decoupled “receiving a request from “processing a request Now you ve limited your possible failures to only the gateway into the system The gateway can remain simple and pure with as few dependencies as possible keeping your apparently very intense SLAs nice and safe The tradeoffs are You also won t be able to return the result of your processing synchronously which can sometimes be a deal breaker Splitting and maintaining a separate validation API and processing worker is a lot more work which will make your project manager sad Of course if you would like your system to have uptime I might suggest a different profession Maybe you can author science fiction Getting back to simpler patterns here is another variation the polling system Notice how this is the same pattern as the first it s just that the connection is initiated from your cron task instead of from a client The biggest difference is that you need to provide the method for re processing on failure since the cron task takes on the role of “caller as well as processor There are a couple of ways to address reprocessing You can maintain a “last successful watermark and always get data from after that watermark works great when the data is timestamped or you can provide a way to run the cron manually with a range Always make sure your ingest is idempotent Here s another one where the data source is a queue that we own On failure we put the item back in the queue After enough failures the item goes into a DLQ dead letter queue Failed items like this should be handled manually since they are likely malformed This “Synchronous processing Synchronous error handling architecture is most appropriate when your API can validate and process each request quickly What does quickly mean It means “your users will not complain that it s too slow and your network requests will not timeout What that means will depend on your users and your network architecture but it s usually something between and seconds We ll get to what to do when your processing takes too long next Asynchronous processing Synchronous error handlingAlright so you can t do your processing synchronously because you need to crunch a lot of numbers and it s just going to take far too long like more than seconds Your users will get antsy looking at a spinner and your network gateways will start severing your long held connections because they think you fell asleep at the wheel What do This do Split your validation from your processing That way you can guarantee the client that their request will be fulfilled even if it isn t expressly fulfilled right now Now your queue worker can take its own sweet time fulfilling the request and the client can relax knowing that it s in the works If the queue starts to back up with requests no big deal The queue workers are stateless so they are easy to scale out during the spike and then scale in when the spike is over This architecture is most appropriate when you can validate the request quickly but it will take too much time to process it for the client to wait As mentioned in the previous section this architecture can also be useful for uptime guarantees Asynchronous processing Asynchronous error handlingSometimes the request is so large that you can t validate the request at the same time that you receive it This is usually the case with large files where you need to go through the whole file and determine if the contents are valid In this case our stateless service gateway modifies its “success return value to mean “successfully uploaded You will need another mechanism to tell the client if their file was successfully processed or not The best way to handle this case is to stash the raw file somewhere S or equivalent put a ticket into the work queue then inform the user that the upload is being processed Once the queue worker is finished you can store the results of the processing in the database Then you can notify the user that processing has completed via a queue or just wait for them to poll for status Broadcasting without guaranteesSometimes you need to inform other downstream components that something has happened or some data has been inserted updated This often happens in event driven systems and microservices and is a pretty standard pattern for syncing state across service boundaries It s a perfectly reasonable architecture assuming you are OK with losing events sometimes What happens when the write to the db is successful and the write to the queue fails In order to return an error to the user you d have to have some way of rolling back the change that was made to the DB Not a fun prospect Broadcasting with guaranteesThere is a way to guarantee that events are processed put the events in the database at the same time that you write your actual data to the database as part of a single transaction This is known as the “Outbox Pattern You write both to the standard tables and also an “outbox table in a single transaction It s a fair bit of work on the developers part so only do this if you need to CDC change data capture is very similar but automates the second write reducing the load on the developers BatchingBatching is the practice of bundling up multiple requests to be processed at once It s generally done for performance reasons writing items in a single batch to a database is much faster than writing a single item times We ve said before that you shouldn t batch your items in your API so how should we do it Like this In this architecture the Queue Worker pulls as many items from the queue as you d like to batch at once In this way your API and Queue Worker can remain stateless Your Queue maintains responsibility for your data until the Queue Worker finishes writing the batch at which point it releases the data from the Queue Simple and effective If you find that your queue can t handle a large number of messages or becomes prohibitively expensive with large numbers of messages I m frowning at you SQS then you have chosen the wrong queue for your system If you outgrow SQS switch to Kafka or Kinesis if you hate yourself don t try to half ass it by batching in your API Of course as always if you can use an off the shelf solution like AWS Firehose Less code is more better ConclusionThis has been a whirlwind high level tour of basic architectures There is of course much more to say and many more opinions to sling If you re interested I can provide more detail or go over advanced topics like caching strategies in later articles Let me know what you d like to see in the comments 2022-04-04 00:01:24
海外科学 NYT > Science NASA Stops Launch Rehearsal for Its Giant Moon Rocket https://www.nytimes.com/2022/04/03/science/nasa-moon-sls-rehearsal.html NASA Stops Launch Rehearsal for Its Giant Moon RocketFirst a lightning storm then problems with launch tower fans led to snags with a countdown and propellant loading intended as practice for the rocket s launch 2022-04-04 00:33:50
医療系 内科開業医のお勉強日記 PACMAN-AMIランダム化臨床トライアル:PCSK9阻害剤アリロクマブによる心筋梗塞患者・非梗塞血管における冠動脈プラーク退縮効果 https://kaigyoi.blogspot.com/2022/04/pacman-amipcsk9.html 有害事象はアリロクマブ投与患者のプラセボ投与患者ので発生した結論と知見nbspnbsp急性心筋梗塞患者において高強度スタチン療法に隔週でアリロクマブを皮下投与するとプラセボと比較して週間後に非梗塞関連動脈における冠動脈プラークの退縮が有意に大きくなったAlirocumabがこの集団の臨床転帰を改善するかどうかを理解するために、さらなる研究が必要である。 2022-04-04 00:22:00
金融 ニッセイ基礎研究所 米雇用統計(22年3月)-前月から雇用の伸びは鈍化も、労働市場の堅調な回復持続を確認する結果 https://www.nli-research.co.jp/topics_detail1/id=70721?site=nli 内訳を見ると、失業者数が万人前月万人とマイナス幅が拡大したものの、就業者数が万人前月万人と失業者数の減少幅を大幅に上回る増加となり労働力人口を押し上げた。 2022-04-04 09:34:14
ニュース ジェトロ ビジネスニュース(通商弘報) EU・中国サミット、ロシアのウクライナ侵攻への対応に議論集中 https://www.jetro.go.jp/biznews/2022/04/aaf5f415b7990e4a.html 議論 2022-04-04 00:45:00
ニュース BBC News - Home Price of first class stamps rises to 95p https://www.bbc.co.uk/news/business-60976956?at_medium=RSS&at_campaign=KARANGA costs 2022-04-04 00:15:38
ニュース BBC News - Home Serbia president projected to win second term https://www.bbc.co.uk/news/world-europe-60978097?at_medium=RSS&at_campaign=KARANGA comfortable 2022-04-04 00:46:46
ニュース BBC News - Home Grammys 2022: Red carpet fashion in pictures https://www.bbc.co.uk/news/entertainment-arts-60977867?at_medium=RSS&at_campaign=KARANGA vegas 2022-04-04 00:17:30
北海道 北海道新聞 東証、20円高 午前9時15分現在 https://www.hokkaido-np.co.jp/article/665057/ 日経平均株価 2022-04-04 09:35:00
北海道 北海道新聞 ハンガリー首相が勝利宣言 議会選、オルバン政権続投へ https://www.hokkaido-np.co.jp/article/665056/ 勝利宣言 2022-04-04 09:34:00
北海道 北海道新聞 スリランカ、内閣の大幅刷新へ 経済危機、抗議活動続く https://www.hokkaido-np.co.jp/article/665055/ 閣僚会議 2022-04-04 09:33:00
北海道 北海道新聞 東証再編、新3市場で取引開始 最上位プライム1839社 https://www.hokkaido-np.co.jp/article/665054/ 東京証券取引所 2022-04-04 09:28:00
北海道 北海道新聞 「捕殺に頼らぬ対策を」 人とクマの共存訴え 札幌で熊森協道支部結成祝賀会 https://www.hokkaido-np.co.jp/article/665052/ 自然保護 2022-04-04 09:14:43
北海道 北海道新聞 コンサドーレ金子、チーム救う一撃 6戦連続ドロー https://www.hokkaido-np.co.jp/article/664787/ 同点ゴール 2022-04-04 09:08:07
北海道 北海道新聞 日本ハム宮西誤算、接戦落とす 拙攻続き流れに乗れず https://www.hokkaido-np.co.jp/article/665013/ 勝ち越し 2022-04-04 09:07:10
マーケティング AdverTimes 創業108年の老舗出版社を「卒業」、10年目のスタートアップに「ジョイン」した https://www.advertimes.com/20220404/article380516/ でも、決して速読の技を持っているわけではなく、いたるところで、いろんな人が論評しているから内容を知っているに過ぎない。 2022-04-04 00:30:24
海外TECH reddit Team Liquid vs. Evil Geniuses / LCS 2022 Spring Playoffs - Winners' Bracket Round 1 / Post-Match Discussion https://www.reddit.com/r/leagueoflegends/comments/tvnwj2/team_liquid_vs_evil_geniuses_lcs_2022_spring/ Team Liquid vs Evil Geniuses LCS Spring Playoffs Winners x Bracket Round Post Match DiscussionLCS SPRING PLAYOFFS Official page Leaguepedia Liquipedia Eventvods com New to LoL Evil Geniuses Team Liquid Team Liquid move on to face Thieves Evil Geniuses fall to the lower bracket against FlyQuest EG Leaguepedia Liquipedia Website Twitter Facebook YouTube TL Leaguepedia Liquipedia Website Twitter Facebook YouTube Subreddit MATCH EG vs TL Winner Team Liquid in m Game Breakdown Runes Bans Bans G K T D B EG volibear twisted fate viktor gangplank graves k H O TL zeri nautilus leblanc rakan leona k H I C B C B EG vs TL Impact gnar TOP ornn Bwipo Inspired lee sin JNG viego Santorin jojopyun akali MID ahri Bjergsen Danny xayah BOT jinx Hans sama Vulcan yuumi SUP tahmkench CoreJJ MATCH TL vs EG Winner Evil Geniuses in m Game Breakdown Runes Bans Bans G K T D B TL leblanc nautilus zeri kaisa gnar k M C EG jinx volibear ahri tahmkench rakan k H O H C B TL vs EG Bwipo gragas TOP graves Impact Santorin viego JNG lee sin Inspired Bjergsen viktor MID ryze jojopyun Hans sama xayah BOT miss fortune Danny CoreJJ alistar SUP leona Vulcan MATCH EG vs TL Winner Team Liquid in m Game Breakdown Runes Bans Bans G K T D B EG volibear twisted fate karma ornn miss fortune k H C TL zeri leblanc lee sin viego diana k H HT O EG vs TL Impact kennen TOP graves Bwipo Inspired nocturne JNG jarvan iv Santorin jojopyun ryze MID ahri Bjergsen Danny jinx BOT ashe Hans sama Vulcan leona SUP nautilus CoreJJ MATCH TL vs EG Winner Evil Geniuses in m Game Breakdown Runes Bans Bans G K T D B TL zeri lee sin leblanc viego tryndamere k None EG volibear ahri jinx kalista miss fortune k H C H M O B O TL vs EG Bwipo gangplank TOP ryze Impact Santorin jarvan iv JNG graves Inspired Bjergsen viktor MID lucian jojopyun Hans sama ashe BOT ezreal Danny CoreJJ nautilus SUP leona Vulcan MATCH EG vs TL Winner Team Liquid in m Game Breakdown Runes Bans Bans G K T D B EG volibear ahri twisted fate ornn viktor k H M TL zeri lee sin leblanc diana jarvan iv k O O H M B EG vs TL Impact renekton TOP sion Bwipo Inspired nidalee JNG viego Santorin jojopyun ryze MID veigar Bjergsen Danny aphelios BOT jinx Hans sama Vulcan leona SUP tahmkench CoreJJ This thread was created by the Post Match Team submitted by u Soul Sleepwhale to r leagueoflegends link comments 2022-04-04 00:02:08

コメント

このブログの人気の投稿

投稿時間: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件)