AWS |
AWS Partner Network (APN) Blog |
IAM 10th Anniversary: Top Recommendations for Working with IAM from Our AWS Heroes – Part 1 |
https://aws.amazon.com/blogs/apn/iam-10th-anniversary-top-recommendations-for-working-with-iam-from-our-aws-heroes-part-1/
|
IAM th Anniversary Top Recommendations for Working with IAM from Our AWS Heroes Part This year marks the th anniversary of AWS Identity and Access Management IAM which is essential in securing your applications and your AWS environment as a whole To help you get the most out of this critical AWS service we are excited to share a blog series featuring top recommendations for using IAM from AWS Heroes and APN Ambassadors who will share recommendations which are driven from personal experiences using a service that s foundational for the security of AWS customers |
2021-05-04 16:00:52 |
AWS |
AWS Big Data Blog |
Use Grok patterns in AWS Glue to process streaming data into Amazon Elasticsearch Service |
https://aws.amazon.com/blogs/big-data/use-grok-patterns-in-aws-glue-to-process-streaming-data-into-amazon-elasticsearch-service/
|
Use Grok patterns in AWS Glue to process streaming data into Amazon Elasticsearch ServiceRecently we launched AWS Glue custom connectors for Amazon Elasticsearch Service Amazon ES which provides the capability to ingest data into Amazon ES with just a few clicks You can now use Amazon ES as a data store for your extract transform and load ETL jobs using AWS Glue and AWS Glue Studio This integration … |
2021-05-04 16:43:19 |
AWS |
AWS Security Blog |
IAM makes it easier for you to manage permissions for AWS services accessing your resources |
https://aws.amazon.com/blogs/security/iam-makes-it-easier-to-manage-permissions-for-aws-services-accessing-resources/
|
IAM makes it easier for you to manage permissions for AWS services accessing your resourcesAmazon Web Services AWS customers are storing an unprecedented amount of data on AWS for a range of use cases including data lakes and analytics machine learning and enterprise applications Customers secure their data by implementing data security controls including identity and access management network security and encryption For non public sensitive data customers want to … |
2021-05-04 16:05:19 |
AWS |
AWS Security Blog |
IAM makes it easier for you to manage permissions for AWS services accessing your resources |
https://aws.amazon.com/blogs/security/iam-makes-it-easier-to-manage-permissions-for-aws-services-accessing-resources/
|
IAM makes it easier for you to manage permissions for AWS services accessing your resourcesAmazon Web Services AWS customers are storing an unprecedented amount of data on AWS for a range of use cases including data lakes and analytics machine learning and enterprise applications Customers secure their data by implementing data security controls including identity and access management network security and encryption For non public sensitive data customers want to … |
2021-05-04 16:05:19 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
export default createStore<*, *, *>( ) の <*, *, *> の意味を知りたい |
https://teratail.com/questions/336623?rss=all
|
exportdefaultcreateStoreltgtのltgtの意味を知りたい前提・実現したいこと現在ReactReduxを勉強しています。 |
2021-05-05 01:48:27 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
iterrows()メソッドを使って、Null値で条件分岐処理したい |
https://teratail.com/questions/336622?rss=all
|
iterrowsメソッドを使って、Null値で条件分岐処理したいNull値の入ったデータに対してiterrowsを使って行ごとに条件分岐を行い、rateの列に、Null値が無い時は計算を、Null値がある時はを代入したいです。 |
2021-05-05 01:46:22 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
右下の画像を左下に移動ができないです。。。 |
https://teratail.com/questions/336621?rss=all
|
右下の画像を左下に移動ができないです。 |
2021-05-05 01:38:45 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
google map apiをhttpリファラ制限有りで動作させたい |
https://teratail.com/questions/336620?rss=all
|
googlemapapiをhttpリファラ制限有りで動作させたい前提googlenbspmapnbspapiを使い駐車場を貸し借りするアプリを作成しています。 |
2021-05-05 01:25:40 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
ボタンクリックでグラフにデータを受け渡したい |
https://teratail.com/questions/336619?rss=all
|
ドロップダウンを作ってその中のボタンをクリックすることでグラフにデータを呼び出したいと思っています。 |
2021-05-05 01:22:25 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
rubyにてirbを立ち上げた状態で日本語が文字化けします。 |
https://teratail.com/questions/336618?rss=all
|
alxdarwinhomebrewnbspgffb |
2021-05-05 01:20:21 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
【本番環境】【備忘録】rails db:create RAILS_ENV=production でrails aborted! Mysql2::Error::ConnectionError: Access denied for user 'root'@'localhost' (using password: NO)とエラーが出る問題の対処法 |
https://qiita.com/asami___t/items/8d126507b9f3351f9d4f
|
どうして・・・・・結論ローカル環境ではなく、「本番環境EC」にてconfigdatabaseymlを開き、パスワードを記載すると解決しますローカル環境にてdatabaseymlを編集していたので、本番環境への影響がなく、全く意味のないことをしていたようです。 |
2021-05-05 01:37:05 |
海外TECH |
Ars Technica |
Goodbye again, Flash—Microsoft makes removal from Windows 10 mandatory |
https://arstechnica.com/?p=1762277
|
adobe |
2021-05-04 16:15:18 |
海外TECH |
Ars Technica |
How the next Patent Office director could shape the patent system |
https://arstechnica.com/?p=1761779
|
nominees |
2021-05-04 16:05:53 |
海外TECH |
DEV Community |
Auto-populate your Github readme with data fetched from a remote notion database. |
https://dev.to/devorein/auto-populate-your-github-readme-with-data-fetched-from-a-remote-notion-database-2ca9
|
Auto populate your Github readme with data fetched from a remote notion database Hello everyone This article will share how I managed to auto populate a Github readme learned section using data fetched from a remote notion database using a GitHub action that I created using Typescript Github Steps In Repository File Add the following content to your README md What I have learned so far lt START SECTION learn gt lt END SECTION learn gt Configure the workflowname Github Readme Updater on workflow dispatch schedule cron Runs Every Dayjobs update learn name Update learn section runs on ubuntu latest steps name Fetching Repository Contents uses actions checkout main name Learn Section Updater uses devorein github readme learn section notion master with database id cebcadbeffeab token v secrets NOTION TOKEN V Required only if your database is privateTIP You can test out using this template that I ve created just for this purpose In your notion account Create a full page databaseNOTE Your database must maintain the following structure schema Get the id of the database Add it in the workflow filewith database id cebcadbeffeab Follow the rest of the steps only if your database is not public if its public you don t need to set the token v To make your database publicNavigate to the database in your notion accountClick on Share at the top right cornerClick on the Share to Web button Get your notion token vNOTE By no means should you share or expose your notion token v If you feel like you ve done so accidentally immediately log out from that account in all of your devices Follow the steps below to obtain your token v Open up the dev tools of your preferred browser Go to the Application gt Cookies section There you ll find a token v cookie NOTE Its highly recommended to store your token v as a github secret rather than pasting it in your workflow file Create a github secret to store token vnavigate to the url USERNAME gt lt REPO NAME gt settings secrets actionsClick on New repository secretYou can name your secret as anything you wantPaste the token v value in the Value textareaUse the secret in your workflow filewith token v secrets NOTION TOKEN V The secret was named NOTION TOKEN V OutcomeIf you follow all the steps properly your readme should look something like this Hope this was helpful to you That s all from me for now The code for the Github action is here Feel free to submit a pull request or open a new issue contributions are highly appreciated and more than welcome Thank you for reading |
2021-05-04 16:44:16 |
海外TECH |
DEV Community |
Join Us For the First DEV Community Bug Smash! |
https://dev.to/devteam/join-us-for-the-first-dev-community-bug-smash-3plm
|
Join Us For the First DEV Community Bug Smash Team Forem is excited to share the news of our first community Bug Smash Join us for this DEV wide collaboration that s all about improving the Forem repository encouraging more contributions from the community and having fun in the process Details What is it The DEV Community Bug Smash challenges members of our community to resolve one or several of our predetermined bugs in the Forem codebase here in exchange for open source community involvement a limited edition profile badge for eligible contributions and a sticker pack When is Bug Smash Our first Bug Smash will be running today May through May We plan to assess the overall experience at the end of the month with the intention of doing this again in the future or possibly extending the event immediately Who can participate Bug Smash is open to anyone in our community who would like to participate We added the general bug smash label to all eligible issues however we ve broken a handful of them into two different categories below to help you select the bug that makes the most sense for your experience level Where will I be smashing bugs In the Forem repository For Bug Smash you ll be tackling issues labeled with you guessed it bug smash in our repo click here to see the full list We ve captured a handful of these issues below under “Examples of Eligible Bugs Any issue not labeled with bug smash is not part of the DEV Community Bug Smash Why should I participate So many reasons The DEV Community Bug Smash is a great way for you to get more practice with tackling issues in GitHub if you re a newer developer If you have more experience this initiative is a fantastic opportunity to help a community you know and love DEV while lending a hand to the Forem engineering team on issues that they might not have the capacity to work on at the moment The best part We ll be awarding limited edition DEV profile badges and a sticker pack to anyone who submits a bug smash PR that gets approved TL DR Greener GitHub contribution history community camaraderie and cool rewards How to Participate Step by StepPlease read our Contributing to Forem guide for contribution guidelines rules and etiquette related to working in our codebase Also please revisit our code of conduct for overall expectations on how to treat one another Claim an issue labeled bug smash based on your experience level by commenting on it You will be notified by our team with a confirmation if you ve been assigned to that issue If the issue is already taken we reply with a suggestion of a different one for you to tackleOnce you are assigned a bug create a pull request PR don t forget to link to the original issue After you ve submitted a pull request PR for your assigned bug you ll be notified by our team if it was approved Once it s approved please use this template to write a reflection post about the bug you smashed right here on DEV Find another post on DEV labeled devbugsmash and leave a comment or a question Keep it encouraging kind and collaborative After you ve completed steps we ll reach out with details on getting your sticker pack We will also award badges at this time Note We will only be awarding one badge and one sticker pack per participant regardless of how many bugs you smash Thanks in advance for your patience following the publication of your Bug Smash post on DEV The Forem engineering team is small but mighty and it will take focused time on their behalf to review Bug Smash PRs Examples of Eligible BugsHere is an incomplete preview of the bugs you can smash Good first issue bugsHere are a few issues that are perfect for early career developers and people learning to code HTML is stripped from runkit source joelnet posted on Nov Describe the bugHTML is incorrectly stripped from runkit code blocks To ReproduceClick WRITE A POST Paste into body runkit const ValueViewerSymbol require runkit value viewer const myCustomObject ValueViewerSymbol title My First Viewer HTML lt marquee gt Hello World lt marquee gt endrunkit Click SAVE POSTSee code in runkit incorrectly translated into const ValueViewerSymbol require runkit value viewer const myCustomObject ValueViewerSymbol title My First Viewer HTML Hello World Expected behaviorCode was expected to keep lt marquee gt tags Additional InfoI can trick the parser by encoding my HTML This works runkit const ValueViewerSymbol require runkit value viewer const atob require atob lite const myCustomObject ValueViewerSymbol title My First Viewer HTML atob PGhcnFZWU SGVsbGsIFdvcmxkITwvbWFycXVlZT endrunkit Strangely enough this does not work runkit const ValueViewerSymbol require runkit value viewer const myCustomObject ValueViewerSymbol title My First Viewer HTML lt m a r q u e e gt H e l l o W o r l d lt m a r q u e e gt join endrunkit as it incorrectly results in this const ValueViewerSymbol require runkit value viewer const myCustomObject ValueViewerSymbol title My First Viewer HTML H e l l o W o r l d join View on GitHub Code blocks get breaks added between each line abraham posted on Jan Describe the bugCode blocks sometimes get breaks lt br gt added between each line You can see it in the one codeblock on A month of Flutter a look back It appears to be related to having headers following the code blocks To ReproduceGo to create a new post enter the following markdown and hit preview function hello console log hello function goodbye console log goodbye headerExpected behaviorThe code blocks should not have any blank lines between each line of code ScreenshotsCorrect display when header is not included Incorrect display when header is included Desktop please complete the following information OS Ubuntu Browsers Chrome Firefox Additional contextThe broken display only appears to happen when a header follows the code blocks If I move it between or before the code blocks the breaks don t happen I m using v of the editor and have not tested with v View on GitHub Modal appears under the navbar aurelieverrot posted on Mar Describe the bugThe modal triggered by the three dots on the left of an article appears stuck under the navbar of the website it is not readable entirely To ReproduceAfter submitting an article but before publishing Click on the three dots on the top left of the article The modal will show up but a part of it is hidden behind the navbarExpected behaviorThe modal should appear entirely to see all the links It can appear under the navbar or on top of it ScreenshotsDesktop please complete the following information OS version MacOS Catalina Browser version Chrome Version Official Build x Additional contextbutton id article show more button View on GitHub General bugsIf you have more experience with software development and working in GitHub here are a few issues you might want to take a look at Tag taggings count are not always updated correctly rhymes posted on Mar Describe the bugEach tag has an associated taggings count which contains the number of items they are associated with in our case either articles or listings The problem lies in the fact that some of these counts are incorrect in the DB I found this out by playing with the Tags API which returns tags sorted by taggings count in descending orderFor example archlinux according to the API is the third most used tag but it s very unlikely that is true Its tag page lists articles and even taking into account all listings it might have been used in it doesn t add up shows that devops is more popular than showdev but devops page contains articles showdev page contains Again I don t think there are enough listings tagged with devops to account for the differenceThus the bug This counter is managed by automatically by the acts as taggable on gem Expected behaviorI d expect the counter to reflect the correct number of items that have been tagged with it I see two possible explanations there s an error in our setup in respect to the usage guideit has something to do with tag aliasing there s a bug in the gem itself I found a few issue tickets that might point us in this direction View on GitHub Error in date display on comment corentinbettiol posted on Apr Describe the bugDate tag on a comment is Apr but on hover the text is Tuesday April In HTML datetime content is T Z To ReproduceHover date of this comment Expected behaviorDate on tag amp on hover should be the same ScreenshotsDesktop please complete the following information OS XubuntuBrowser FirefoxVersion View on GitHub Follow back button has no text in notification at times sivaraam posted on Feb Describe the bugWhen someone follows me I get a notification with a Follow back button in it But in some cases the button has no text in it As a consequence it s not clear what the button does To ReproduceGo to Notifications Find a USER followed you notificationIf the FOLLOW BACK text in the button in visible refresh and check Note I realise these aren t ideal steps to reproduce the issue but unfortunately that s all I have I m not sure about the exact cases for which the text is visible and for which the text is not But I ll be glad to provide information if needed Expected behaviorThe FOLLOW BACK text should always be visible in the button For me it s visible only at random times The probability of the button having no text is higher ScreenshotsDesktop please complete the following information OS WindowsBrowser Firefox ChromeVersion View on GitHub Incomplete surrogate key cache invalidation logic benhalpern posted on Mar Currently we user surrogate keys to determine when certain endpoints should have their caches cleared such as an article API endpoint like this set surrogate key header Article table key articles map amp record key And then we call article purge which magically makes any endpoint with that article s record key have its edge cache expire More on surrogate keys The issue with the above logic is that a new article which should become part of that endpoint will not flush its cache if created So it will not show up on that endpoint until another article which fits within the above articles is purged This makes it kind of random to find out when it will be included article purge is a magic method to create a purge ping which uses the appropriate surrogate header A solution for this could be a surrogate key like this set surrogate key header Article table key tag index endpoint tag articles map amp record key and then we make a specific purge call when a new article should purge it like purge tag index endpoint tag when an article is created Our current situation isn t causing any radically wrong behavior and the random purging is working okay but we should look into this as we go about bigger changes here View on GitHub Error when submitting a comment on a recently deleted post adamkdean posted on Mar Describe the bugFollowed a link from an email attempted to respond to a comment received error There was an error in your markdown undefined method id for nil NilClass comment not posted To ReproduceFollow link from an email attempt to respond to a comment Expected behaviorComment is posted ScreenshotsDesktop please complete the following information OS MacOS Browser Chrome View on GitHub Runkit indentation in the first line of a block iksemot posted on Nov Describe the bugFirst line in the block of text cannot be indented To ReproduceCreate a new postAdd following content make sure all lines are indented runkit console log BAD CODE console log OK CODE BAD COMMENT OK COMMENT endrunkit Save the postExpected behaviorAll lines in RunKit embed should be indented ScreenshotsDesktop please complete the following information OS Windows ProBrowser OperaVersion Additional context View on GitHub users profile photos are not showing on the dockerized installation abdellani posted on Nov Describe the bugAfter following the installation with docker guide and accessing the locally hosted application users profile photos weren t showing up web Cannot render console from Allowed networks web GET uploads user profile image aaba d f c abafac png completed with Not Found in msweb Cannot render console from Allowed networks web GET serviceworker js completed with Not Modified in msTo Reproduce Follow the installation with docker guide Access Expected behaviorScreenshots Desktop please complete the following information OS Ubuntu Browser firefoxVersion Smartphone please complete the following information Device OS Browser Version Additional context View on GitHub Left To Right Override invisible unicode chars anuraghazra posted on Nov Describe the bugLooks like currently we can create posts with U D LEFT TO RIGHT OVERRIDE and other Invisible unicode charactersHere s the posthashtags To ReproduceCopy U D unicode characterCreate a new post and set title to U D characterSame with hastags Canonical URL amp Series Expected behaviorShould not allow those invisible unicode charactersScreenshotsDesktop please complete the following information OS Windows bitBrowser ChromeVersion Additional contextI also copy pasted characters from here View on GitHub Keep getting notifications on previous email address javitruhlar posted on Nov Describe the bugIf you change the email address in your profile you keep getting email notifications on your previous address even after you have confirmed the new oneTo ReproduceGo to Settings gt Profile Under User section change the emailOpen email sent to new address and click confirm my account See error gt Keep getting email notifications on previous addressExpected behaviorAfter confirmation of new email address all email notifications should be sent to that address and not to the previous oneDesktop please complete the following information OS version Linux Mint Browser version bit View on GitHub Themes aka Dark Mode not respected on first page loads kallmanation posted on Jan Describe the bugWhen first opening Dev to on both mobile amp desktop or when first visiting a new area going to the dashboard from the homepage starting a new post the default theme is shown This persists for a few page refreshes before my selected theme night theme is shown To ReproduceOpen a private incognito browser windowLog inThe default theme is shown instead of the one in settings Expected behaviorThe theme selected in settings would show after logging in ScreenshotsFirst screen after logging in Settings page It was always set to Night Theme pre login Desktop please complete the following information OS version macOS Catalina Browser version Vivaldi Stable channel x Smartphone please complete the following information Device Samsung Note OS version Android Browser version Chrome View on GitHub Unable to load Comment Subscription component ludwiczakpawel posted on Feb Describe the bugIt s been happening quite often recently for me but I can t really tell how exactly this should be reproduced It does work after refreshing the page but then when I go to another post it s broken again Also this is what s happening in the console To ReproduceSee above Expected behaviorFo this component to work properly ScreenshotsSee above Desktop please complete the following information n aSmartphone please complete the following information n a View on GitHub Comment box not shrinking on submit LinkTwenty posted on Apr Describe the bugComment boxes grow as you type but when you press submit they stay the size they were when they had content To ReproduceGo to a postWrite a long commentPost the commentSee the comment box is still large Expected behaviourI d expect the comment box the shrink back down to it s original size ScreenshotsDesktop please complete the following information OS version Window Browser version Chrome Additional contextAnother small bug that doesn t really cause any harm View on GitHub Refactor search chat channels endpoint atsmith posted on Apr In we refactored how search chat channels works by essentially removing search functionality and turning it into more of a filter As noted in the PR You ll notice I left everything in the Search namespace the route the controller and the service naming I originally started removing chat channels from search all together since this behaves more like a filter than a search However I discovered there are some JS components that are using this endpoint as an index I started refactoring everything but it quickly got out of hand and out of scope for what this PR is intended to address I also realized it may actually be nice to leave everything in the search namespace so that when we re do the search for Connect in the future it s a smoother experience With that said since we have the ChatChannelsController and the ChatChannelMembershipsController each with index actions I think the right move would be to move those JS components to them so we don t have multiple controllers performing the same actions This issue is to essentially update all the JS components on the frontend to use a newly refactored endpoint that lives in a more appropriate spot i e ChatChannelMembershipsController or ChatChannelsController than the SearchController Once this issue is complete the chat channels action should no longer exist in the SearchController and instead a new endpoint should be able to take care of any filtering and indexing being done by the JS components View on GitHub For the full list click here We are so excited to see your contributions Our team thanks you for your collaboration and commitment to improving our repository If you re new to making pull requests here are a few resources we recommend you check out Git Cheat Sheet by chrissiemhrkGit and GitHub for Beginners by tracycssYour First Open Source Pull Request a Walkthrough by healeycodesP S With only a few exceptions the Forem team is pro real world physical bugs and we don t condone smashing them TakeSpidersOutside |
2021-05-04 16:38:56 |
海外TECH |
DEV Community |
How to implement a Discord bot (in NodeJS) that requires new members to introduce themselves |
https://dev.to/martinsos/how-to-implement-a-discord-bot-in-nodejs-that-requires-new-members-to-introduce-themselves-926
|
How to implement a Discord bot in NodeJS that requires new members to introduce themselvesAt Wasp we have a Discord server for our community where we talk with people interested in and using Wasp Waspeteers In the beginning we knew everybody in the community by their name but as it started growing we had a lot of people joining that never wrote anything and the community started feeling less homey less intimate This was when we decided to make it required for the new members to introduce themselves to gain access to the community We knew that with this kind of barrier we would probably lose some potential new Waspeteers but those that would go through it would be more engaged and better integrated We found no other way to accomplish this automatically but to implement our own Discord bot In this post I will describe in detail how we did it High level approachWe want the following when a new user comes to our Discord server they should be able to access only public channels like rules contributing and most importantly introductions where they could introduce themselves Once they introduced themselves in the introductions channel they would get access to the rest of the channels Left what Guest sees Right what Waspeteer sees In Discord access control is performed via roles There are two ways to accomplish what we need Adding a role that grants access When they join they have no roles Once they introduce themselves they are granted a role e g Member or Waspeteer that is required to access the rest of the server Removing a role that forbids access When they join they are automatically assigned a role Guest for which we configured the non public channels to deny access Once they introduce themselves the role Guest gets removed and they gain access to the rest of the server We decided to go with the second approach since it means we don t have to assign all the existing members with a new role From now on we will be talking about how to get this second approach working To get this going we need to do the following Create role Guest Ensure that the Guest role has permissions to access only public channels One convenient way to go about this is to disable View Channels permission for the role Guest at the level of Category so it propagates to all the channels in it instead of doing it for every single channel Once you are done use the See server as a role feature of Discord to confirm that you set the permissions as you wanted Automatically inform new members that they must introduce themselves in the introductions channel with intro lt text about me gt to gain access to the rest of the server This can be done via Discord s Welcome Screen feature or via one of the many existing Discord bots out there offering this functionality Automatically assign the Guest role to a new member when they join the server Automatically remove the Guest role when a member introduces themselves in the public introductions channel Points and are relatively straight forward For the automatic assignment of the role when a new member joins the server since Discord doesn t support this directly you will need a bot to do it Luckily many bots allow you to auto assign roles when new members join and I ended up using MEE for this I set it up so that when a new member joins they are immediately assigned a Guest role However for the remove or assign the role on a message in a specific channel the situation is more complicated I couldn t find a single bot out there that supports this The closest I got was with Carl Bot and its tags feature which allows you to write custom code but in the end it turned out to be too restrictive to accomplish this Therefore I ended up implementing our own bot Wasp Bot that does this Implementing a Discord Bot NodeJS I decided to implement a bot in NodeJS since it is easy to get started quickly and there is a good Discord library I will describe how to create it step by step below but here is the final code of the bot if you want to skip ahead Defining bot on Discord and adding it to your server Before we even start implementing the bot we will tell Discord about it first in order to obtain the neccessary credentials that we will use in our code and we will add the bot to our server There are many tutorials already on how to do this so I will keep it short Go to Discord Developer Portal create a new Application gt I named it Wasp Go to the Bot part of Application Settings and add a new bot I named it WaspBot On the Bot page of your freshly created bot there is a TOKEN part gt create a mental note about it we will need this later when running our bot Go to the OAuth part of Application Settings Here we will define which permissions our bot will have This is done by checking the permissions we want to give it and then following the URL that will be generated based on our choices Check the bot under the SCOPES section Scroll down further to find the BOT PERMISSIONS section There check the Manage Roles View Channels Read Message History and Send Messages Under the SCOPES section above you will see a URL Copy it into the browser and follow the steps to add the bot to your server Creating a basic bot in NodeJSIn a directory where your code will be create a new npm project with npm init gt set the entry point to bot js instead of index js This will result in a package json file being generated We will need one important dependency discord js to make it easy to work with Discord s API Add it with npm install S discord js Now create bot js file next to package json with following content const Discord require discord js const BOT TOKEN process env BOT TOKENconst bot new Discord Client bot login BOT TOKEN bot on ready function evt console log Logged in as bot user tag This is it RunDISCORD BOT lt TOKEN OF YOUR DISCORD BOT gt node bot jsand you should see output about successful login in my case it was Logged in as WaspBot Detecting a valid introduction from a memberNOTE For the following part I was using Discord js docs to figure out how to do it so if you need more details on a specific step check them out Now is the moment to define exactly how we want the introduction process to go So let s say that the correct way for new members to introduce themselves is by sending a message to the introductions channel that starts with intro and follows with at least characters of text to ensure the introduction is not too short intro makes it easy for our bot to know when to act in Discord bot commands often start with lt something gt Let s add the needed code to bot js const INTRODUCTIONS CHANNEL ID lt YOU WILL HAVE TO FIND THIS ON DISCORD SERVER gt bot on message async msg gt if msg content startsWith intro if msg channel id toString INTRODUCTIONS CHANNEL ID const introductionsChannelName msg guild channels resolve INTRODUCTIONS CHANNEL ID name return msg reply Please use intro command in the introductionsChannelName channel const introMsg msg content substring intro length trim const minMsgLength if introMsg length lt minMsgLength return msg reply Please write introduction at least minMsgLength characters long return msg reply Yay successful introduction One thing to notice is that you will have to obtain the ID of the introductions channel and paste it in your code where I put the placeholder above You can find out this ID by going to your Discord server in the Discord app right clicking on the introductions channel and clicking on Copy ID For this to work you will first have to enable the Developer Mode under User Settings gt Advanced Removing the Guest role upon successful introductionWhat is missing is removing the Guest role upon successful introduction so let s do that const INTRODUCTIONS CHANNEL ID lt YOU WILL HAVE TO FIND THIS ON DISCORD SERVER gt const GUEST ROLE ID lt YOU WILL HAVE TO FIND THIS ON DISCORD SERVER gt bot on message async msg gt if msg content startsWith intro if msg channel id toString INTRODUCTIONS CHANNEL ID const introductionsChannelName msg guild channels resolve INTRODUCTIONS CHANNEL ID name return msg reply Please use intro command in the introductionsChannelName channel const introMsg msg content substring intro length trim const minMsgLength if introMsg length lt minMsgLength return msg reply Please write introduction at least minMsgLength characters long const member msg guild member msg author try if member roles cache get GUEST ROLE ID await member roles remove GUEST ROLE ID return msg reply Nice getting to know you You are no longer a guest and have full access welcome catch error return msg reply Error error Same as with the ID of the introductions channel now you will also need to find out the ID of the Guest role which you should have created at some point You can do it by finding it in the server settings under the list of roles right clicking on it and then Copy ID This is it You can now run the bot withDISCORD BOT lt TOKEN OF YOUR DISCORD BOT gt node bot jsand if you assign yourself a Guest role on the Discord server and then type intro Hi this is my introduction I am happy to be here in the introductions channel you should see yourself getting full access together with an appropriate message from your bot Deploying the botWhile there are many ways to deploy the Discord bot I will shortly describe how we did it via Heroku We created a Heroku app wasp discord bot and set up the Automatic deploys feature on Heroku to automatically deploy every push to the production branch our bot is on Github On Heroku we set the environment variable DISCORD BOT to the token of our bot Finally we added Procfile file to our project worker node bot jsThat is it On every push to the production branch our bot gets deployed |
2021-05-04 16:30:37 |
海外TECH |
DEV Community |
Turn a Jupyter Notebook into a Web App |
https://dev.to/meredydd/turn-a-jupyter-notebook-into-a-web-app-lj3
|
Turn a Jupyter Notebook into a Web AppLet s say you re a data scientist and you ve been asked to solve a problem Of course what you really want is to build an interactive tool so your colleagues can solve the problem themselves In this tutorial I ll show you how to take a machine learning model in a Jupyter notebook and turn it into a web application using the Anvil Uplink Here s what we ll do Set up a Jupyter notebookConnect it to an Anvil appMake a user interface Setting up the Jupyter NotebookWe ll start with a pre existing Jupyter Notebook containing a classification model that distinguishes between cats and dogs You give it an image and it scores it as cat or dog Thanks to Uysim Ty for sharing it on Kaggle Connecting to the UplinkWe ll use the Anvil Uplink to connect a Jupyter Notebook to Anvil It s a library you can pip install on your computer or wherever your Notebook is running It allows you to call functions in your Jupyter Notebook from your Anvil appcall functions in your Anvil app from your Juypter Notebook store data in your Anvil app from your Jupyter Notebook use the Anvil server library inside your Jupyter NotebookIt works for any Python process this happens to be a Jupyter Notebook but it could be an ordinary Python script a Flask app even the Python REPL To connect our notebook we ll first need to enable the Uplink in the Anvil IDE This gives us a key that we can then use in our code We then need to pip install the Uplink library on the machine the Jupyter Notebook is running on pip install anvil uplinkBy adding the following lines to our Jupyter notebook we can connect it to our Anvil app import anvil serveranvil server connect lt YOUR UPLINK KEY gt Now we can do anything in our Jupyter Notebook that we can do in an Anvil Server Module call Anvil server functions store data in Data Tables and define server functions to be called from other parts of the app Loading an image into the NotebookWe ll load an image into the Jupyter Notebook by making an anvil server callable function in the Jupyter Notebook It will classify the input image as either a cat or a dog import anvil media anvil server callabledef classify image file with anvil media TempFile file as filename img load img filename We re passing the image in as an Anvil Media object which we then write to a temporary file The load img function loads the file into Pillow a Python imaging library Then we can do a bit of post processing of the image to get it into a format that the model likes Inside the classify image function img img resize resample PIL Image BICUBIC arr img to array img arr np expand dims arr axis arr Then we can just pass it into our model and return the result Inside the classify image function score model predict arr return dog if score lt else cat float score Building a User InterfaceWe can drag and drop components to create a User Interface It consists of a FileLoader to upload the images an Image to display them and a Label to display the classification Making the UI call the NotebookNow we need to write some Python code that runs in the browser so the app responds when an image is loaded in We can define an event handler that triggers when the FileLoader gets a new file def file loader change self file event args This method is called when a new file is loaded into this FileLoader result score anvil server call classify image file self result lbl text s f result score self image source fileThe first line calls the classify image function in the Jupyter Notebook passing in the image file Then we display the result cat or dog and the score to completely dog or completely cat We also put the image file into the Image component so that the user can see their cat or dog or other cat or dog like image and decide if they agree with the result Your app is already published at a private URL but we can give it a public URL You can check out this finished app at Check out the whole tutorial |
2021-05-04 16:14:27 |
海外TECH |
DEV Community |
CCS: Writing |
https://dev.to/newrelic/ccs-writing-keo
|
CCS Writing Content Creation Series WritingHello and welcome to this week s Content Creation Series Today we will be talking about one of my favorite ways to create content…Writing A little of storytelling here I have always loved to write My first win was in second grade when my teacher liked too much a little story I wrote that she typed it made questions about it and shared with the class I was thrilled I never stop writing but nothing serious or public I got internet access in I have been blogging mostly to myself just for the joy of writing In the end I started to learn how to code and in the summer of I went to Codeland where I watched a talk by Ali Spittel about blogging and it inspired me to start writing on Dev to If you go see my profile there you can clearly see my evolution as a writer and how I started gaining confidence Slowly but surely And like Ali inspired me that summer I want to do the same for you Why write I will be honest with you here I don t remember much about that talk LOL But I remember it inspired me and made me start writing what helped me to be where I am today In the beginning I started writing just to record my journey and MAYBE make some friends Now I write to help and motivate people to share what I know and still my journey We talked about WHY create content on the first post of this series so now let s focus on why to write It is probably the simplest content creation format to get started on thinking about time consumed and resources needed You can share with lots of people that can read it on their pace easily take notes of what they want to read again later You don t have to expose yourself as much as in other formats Writing is also the most accessible way to create content So overall if you want to create content but are not sure where to start I would recommend start here Let s write What to write about and writing formatsThe question is…What can I write about There are already blog posts about EVERYTHING out there Yes that is true But don t underestimate how your experience your “voice and your writing style can make things unique and help other people Let s brainstorm here What do you already know What You Want to learn about Why What problems have you solved How did you do it What questions do you have Answering these questions will give you a few topics to work with Here is my current list for you to have a better view It can be a tutorial or a list of lessons learned or just straightforward storytelling My first blog post was more like a personal journal entry were I talked about my life as a programming student Nowadays I write more technical content focused on my audience entry level devs and women in tech My writing process Let s talk about the writing process While it is different for everyone there are some steps that can benefit most writers I will share with you MY process and I hope this will help you to come up with yours I have a board on notion where I keep track of my writings The first column is for ideas Every time I think about a topic that could become a good blog post I write that there The second column is for posts In Process followed by In Review Posted and Syndicated In Process is for posts I have started Outlining and maybe even writing I have an Outlining template that I use every time I start a new post It contains the elements I want my post to have Intro What will this post be about Sections and Usually I have main points and each section covers one Conclusion Here I summarized all of the above into a sentence or two Call to action What do I want the reader to do next For me it usually is to have them come watch me on Twitch In Review are posts that are finished but need to be checked On this step I also created a cover using Canva com run my article on and make it more readable using markup language editor After I am happy with the steps above I post it then move it to the Posted column on my board The last step is Syndicating my posts What does that mean Usually after weeks I posted something I re post it with a canonical link on another platform like Dev to ChecklistSo here are in a checklist the steps I take for each blog post Get an idea from my list of ideas Outline the post writing each heading I want it to have Starting writing the post with the headings as guidelines After I am done writing I create a cover on Canva com Use to check spelling working count and make sure my writing is clear Next I use to format it to make it easier to read It is time to post After weeks or so re post in on dev to or therelicans com using a canonical link Conclusion and a Challenge Here you have it How I write my posts why I do it and all the tips I can give you to get started writing great content I have a challenge for you Choose a topic you are comfortable with maybe your journey into tech Write about it and post it here on therelicans com Once you are done share it with me so I can review for you and give you advice on how and where to improve As always please follow me on Twitch and come hang out with me I stream every day and on Co working Fridays you can see me writing my posts LIVE XOXO Pachi C |
2021-05-04 16:08:36 |
Apple |
AppleInsider - Frontpage News |
Former Apple employee denies he leaked trade secrets to media |
https://appleinsider.com/articles/21/05/04/former-apple-employee-denies-he-leaked-trade-secrets-to-media?utm_medium=rss
|
Former Apple employee denies he leaked trade secrets to mediaA former employee of Apple sued for allegedly leaking information to an unnamed publication has responded denying in a court filing that he disseminated trade secrets in exchange for favorable coverage of a start up he had invested in In March documents were made public accusing Simon Lancaster a former materials lead at Apple of accessing data outside of his job s scope then selling it on to a media outlet Lancaster was said in the lawsuit to have used his seniority to gain access to trade secrets which he then allegedly traded for benefits from the publication Lancaster s lawyers filed a response to Apple s lawsuit on Monday denying Apple s allegations against him in the document provided to the U S District Court for the Northern District of California San Francisco Division The response spotted by Nicholas Ciarelli denies the vast majority of Apple s claims in its lawsuit Read more |
2021-05-04 16:54:23 |
Apple |
AppleInsider - Frontpage News |
Claris launches Claris Connect service for Apple School Manager |
https://appleinsider.com/articles/21/05/04/claris-launches-claris-connect-service-for-apple-school-manager?utm_medium=rss
|
Claris launches Claris Connect service for Apple School ManagerApple subsidiary Claris has launched its Claris Connect service for Apple School Manager making it easier for educational institutions to access Apple services and technology Credit AppleThe Claris Connect service which initially launched in is designed to help companies combine data from multiple sources in a single interface Read more |
2021-05-04 16:37:09 |
海外TECH |
Engadget |
Will Smith's next YouTube series is all about how he got fit |
https://www.engadget.com/will-smith-youtube-original-best-shape-of-my-life-163635921.html
|
youtube |
2021-05-04 16:36:35 |
海外TECH |
Engadget |
Bentley's first EV will be an SUV built on Audi's Project Artemis |
https://www.engadget.com/bentley-suv-ev-160038435.html
|
adrian |
2021-05-04 16:00:38 |
Docker |
Docker Blog |
Community Rooms at DockerCon LIVE 2021 |
https://www.docker.com/blog/community-rooms-at-dockercon-live-2021/
|
Community Rooms at DockerCon LIVE The Docker community spans the four corners of the world To celebrate the global nature of our community at DockerCon this year we ve created something new Community Rooms Building on the learnings of our “regional rooms experiment during our last Community All Hands Community Rooms are virtual spaces that DockerCon attendees will be able to join The post Community Rooms at DockerCon LIVE appeared first on Docker Blog |
2021-05-04 16:04:57 |
Cisco |
Cisco Blog |
Native or Open-source Data Models? Use Both for Software-Defined Enterprise Networks. |
https://blogs.cisco.com/networking/native-or-open-source-data-models-use-both-for-software-defined-enterprise-networks
|
Native or Open source Data Models Use Both for Software Defined Enterprise Networks Why using a mixed schema approach using native and open source data models is possible and makes sense for enterprise networking programmability and automation |
2021-05-04 16:54:26 |
海外TECH |
CodeProject Latest Articles |
GFX Part 4: The ILI9341 Display Driver and JPEG Support |
https://www.codeproject.com/Articles/5301711/GFX-Part-4-The-ILI9341-Display-Driver-and-JPEG-Sup
|
jpegs |
2021-05-04 16:09:00 |
海外ニュース |
Japan Times latest articles |
Reaching ‘herd immunity’ is unlikely in the U.S., experts now believe |
https://www.japantimes.co.jp/news/2021/05/04/world/herd-immunity-coronavirus-vaccinations-us/
|
Reaching herd immunity is unlikely in the U S experts now believeNew variants and persistent hesitancy about vaccines will keep the goal out of reach The virus is here to stay but vaccinating the most vulnerable |
2021-05-05 02:55:14 |
海外ニュース |
Japan Times latest articles |
Japan feared U.S. military would take control of Fukushima response in 2011 |
https://www.japantimes.co.jp/news/2021/05/04/national/fukushima-us-cooperation/
|
Japan feared U S military would take control of Fukushima response in The U S military s move to form a joint support force led by the commander of the Pacific Fleet in the wake of the disaster triggered |
2021-05-05 02:19:34 |
海外ニュース |
Japan Times latest articles |
More than 60% in Japan say gender equality remains elusive, survey finds |
https://www.japantimes.co.jp/news/2021/05/04/national/gender-equality-poll/
|
More than in Japan say gender equality remains elusive survey findsOver of all respondents said men are given preferential treatment in the realm of politics and in connection with social norms according to the |
2021-05-05 01:48:43 |
海外ニュース |
Japan Times latest articles |
Samsung windfall gives richest South Korean woman $7 billion fortune |
https://www.japantimes.co.jp/news/2021/05/04/business/samsung-billionaire-windfall/
|
assets |
2021-05-05 01:38:15 |
海外ニュース |
Japan Times latest articles |
Shohei Ohtani hits homer after skipping pitching start against Rays |
https://www.japantimes.co.jp/sports/2021/05/04/baseball/mlb/ohtani-9th-home-run/
|
Shohei Ohtani hits homer after skipping pitching start against RaysThe two way phenom who finished tied for the MLB home run lead may still pitch later in the series according to Angels manager Joe Maddon |
2021-05-05 01:28:51 |
ニュース |
BBC News - Home |
Abbie Quinnen reveals 'horrible' Instagram abuse over burns |
https://www.bbc.co.uk/news/uk-56971201
|
media |
2021-05-04 16:48:10 |
ニュース |
BBC News - Home |
Meghan Markle writes children's book inspired by Harry and Archie |
https://www.bbc.co.uk/news/entertainment-arts-56978021
|
father |
2021-05-04 16:35:28 |
ニュース |
BBC News - Home |
Covid-19: Care home residents can go on outdoor trips without isolating |
https://www.bbc.co.uk/news/uk-56977779
|
trips |
2021-05-04 16:36:33 |
GCP |
Cloud Blog |
Retire your tech debt: Move vSphere 5.5+ to Google Cloud VMware Engine |
https://cloud.google.com/blog/products/cloud-migration/how-to-retire-your-tech/
|
Retire your tech debt Move vSphere to Google Cloud VMware EngineIt can happen so easily You get a little behind on your payments Then you start falling farther and farther behind until it becomes almost impossible to dig yourself out of debt Tech debt that is IT incurs a lot of tech debt when it comes to keeping up infrastructure most IT departments are already running as lean as they possibly can Many VMware shops are in a particularly tough spot especially if they re still running on vSphere If that describes you it s time to ask yourself how you intend to get out of this tech debt General support for vSphere ended back in September and technical guidance one year later General support for ended in March support for ends November of this year and even the end of general support for vSphere is only a couple of years away November If you re still running vSphere moving to vSphere is the right thing to do But doing so is hard if you ve fallen into a deep tech debt hole Traditionally it means moving all your outdated vSphere systems through all the interim releases until you ve migrated all your systems to the latest version That involves upgrading hardware software and licenses as well as all the additional work that goes along with the upgrades Then as soon as you re done the next upgrade cycle is already upon you Making the task even more daunting VMware HCXーthe company s application mobility serviceーwill also stop supporting soon making migration even more complicated If this paints an unsightly picture don t despair You have the opportunity right now to easily retire your technical debt and be debt free from here on out by migrating to Google Cloud VMware Engine And you can migrate before you have to upgrade to the next vSphere release just to get migration support Not only will you still be able to migrate to vSphere using HCX but even better you don t have to do the digging yourself The cloud breaks the cycle of debtIf the effort and resources required to move was too steep a price before now it s a viable option with Google Cloud VMware Engine With cloud based infrastructure you can not only migrate to the latest release of vSphere but you can also take your workloadーlock stock and barrelーout of your data center and put it into Google Cloud Moving to Google Cloud VMware Engine makes the migration task fast and simple Never again will you have to deal with spreadsheets to track how many watts of cooling you need for your data center buy additional equipment or manage upgrades Migrating to the cloud is also the first step toward getting out of the business of managing your data center and into embracing an OpEx subscription model And you can begin moving workloads to the cloud in increments without having to worry about all the nuances ーit s all done for you Work in a familiar environment and expand your toolsetOne of the biggest benefits of Google Cloud VMware Engine is that it offers the same familiar VMware experience you have now All the applications running on vSphere can immediately run on a private cloud in Google Cloud VMware Engine with no changes You ll now be running on the latest release of vSphere and when VMware releases patches updates and upgrades Google Cloud keeps the infrastructure up to date for you And as a VMware administrator you can use the same tools that you re familiar with on premises Migration doesn t have to be a long arduous processGoogle Cloud VMware Engine allows you to leverage your existing virtualized infrastructure to make migration fast and easy Use familiar VMware tools to migrate your on premises vSphere applications to vSphere in your own private cloud while maintaining continuity with all your existing tools policies and processes It takes only a few clicks see our demo video Make sure you have your prerequisites enable the Google Cloud VMware Engine API and follow these steps Enable the VMware Engine node quota and assign at least three nodes to create your private cloud Set your roles and permissions Access the Google Cloud VMware Engine portal Click Create a private cloud This is fast ーonly about minutes Select the number of nodes a minimum of three Enter a CIDR range for the VMware management network Enter a CIDR range for the HCX deployment network Review your settings Click Create Connect an on prem network to your VMware Engine private cloud or connect using a point to site VPN connection Google Cloud VMware Engine supports multi region networking with VPC global routing which allows VPC subnets to be deployed in any region worldwide greatly simplifying networking When you use VMware HCX to migrate VMs from your on premises environment to Google Cloud VMware Engine VMware HCX abstracts vSphere resources running both on prem and in the cloud and presents them to applications as one continuous resource to create a hybrid infrastructure By partnering with Google Cloud you can erase your tech debt and get out of the time consuming resource draining business of data center management Then once your VMware based workloads are running on Google Cloud VMware Engine you can start modernizing your applications with Google Cloud services including AI ML low cost storage and disaster recovery solutions Check out the variety of pricing options for the service from pre pay with discounts up to to pay as you go and annual commitments Related ArticleZero footprint DR solution with Google Cloud VMware Engine and ActifioLearn how to use Actifio data management software plus Google Cloud VMware Engine to create a dynamic low cost DR site in the cloud Read Article |
2021-05-04 16:30:00 |
コメント
コメントを投稿