投稿時間:2023-07-04 01:16:59 RSSフィード2023-07-04 01:00 分まとめ(19件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
python Pythonタグが付けられた新着投稿 - Qiita Fletを初めて使って、躓いたことなど https://qiita.com/konpeito_morimori/items/db99b3af2f6ed2e19e87 mobile 2023-07-04 00:56:41
python Pythonタグが付けられた新着投稿 - Qiita 四則計算の数学記号をPython演算子に瞬時に置き換える方法 https://qiita.com/akiba_burari/items/59860575005c877e7203 記号 2023-07-04 00:38:30
python Pythonタグが付けられた新着投稿 - Qiita Python の unittest の mock https://qiita.com/satamame/items/1c56e7ff3fc7b2986003 unittest 2023-07-04 00:09:10
海外TECH MakeUseOf What Makes Bitcoin Scarce? Why Does Bitcoin Have Value? https://www.makeuseof.com/what-makes-bitcoin-scarce/ owners 2023-07-03 15:15:19
海外TECH MakeUseOf Best Smart Home Deals Ahead of Prime Day https://www.makeuseof.com/amazon-prime-day-smart-home-deals/ smart 2023-07-03 15:10:54
海外TECH DEV Community Understand OAuth in 3 minutes https://dev.to/philip-ainberger/understand-oauth-in-3-minutes-ham Understand OAuth in minutesThe term OAuth is likely a term on every developer s mind But how do you break down this concept to someone just starting their coding journey or even to someone who isn t involved in development at all Here s my attempt to explain it What is OAuth OAuth which stands for Open Authorization is a standard protocol that allows third party applications to access user data without exposing their password Imagine using your university ID to check out a library book You re not giving the librarian your login details just proof that you re a student The librarian doesn t see your grades or tuition details just confirms you re allowed to borrow books How Does OAuth Work Think of when you log into a new app and it asks if you want to log in using your Google account Once you click yes you re redirected to a Google sign in page Here s where OAuth comes into play You input your Google credentials this is authentication proving who you are but instead of giving these credentials back to the original app Google sends back a token This token is like a temporary key giving the app permission to access specific information from your Google account for a set amount of time For a visual explanation I ve found the following diagram particularly helpful Why is OAuth Important OAuth plays an essential role in enhancing user experience and security By using OAuth users don t have to remember another set of credentials and the application doesn t have to manage secure storage of user passwords Plus users can control which information they want to share and can revoke access at any time OAuth in a NutshellTo put it simply OAuth is like a digital passport In the realm of web security it serves as a safe and efficient way to give applications the ability to communicate with each other using tokens instead of sharing sensitive information like passwords Remember OAuth isn t about gaining access but about giving limited access to third party services without exposing user credentials It s like giving the keys to your car but not your house Summing UpGrasping the concept of OAuth is crucial in the modern landscape of web development and security It s all about protecting user data while providing the flexibility of interconnected services By understanding and implementing OAuth we can offer a secure and streamlined user experience As with any security strategy the way you implement OAuth will depend on your specific application s needs and the level of security it requires As always you are welcome to share your thoughts 2023-07-03 15:40:45
海外TECH DEV Community Bandit Level 1 Level 2 https://dev.to/christianpaez/bandit-level-1-level-2-19hk Bandit Level Level IntroductionBandit is the third level of the OverTheWire Bandit wargame In this level we will learn how to handle special characters in filenames and how to read the contents of a file that has a hyphen in its name By completing this level we will gain access to the password for the next level StepsOpen your terminal application Enter the following command to ssh into the remote server ssh bandit bandit labs overthewire org p You will be prompted to enter a password Enter the password from the previous level NHSXQwcBdpmTEzibvBHMMHvVXjL and hit enter You are now connected to the remote server and are able to execute commands Enter the following command to search for files with a hyphen in their name find home name gt dev nullThe output should show the path to the file with a hyphen in its name In this case the path is home bandit Enter the following command to read the contents of the file cat home bandit The output should show the password for the next level rRGizSaXMkRTbCNQoXTcYZWUlgzi Congratulations You have successfully completed Bandit and gained access to the password for the next level ConclusionIn this level we learned how to handle special characters in filenames and how to read the contents of a file that has a hyphen in its name These are important skills to have when working with files in Linux command line and mastering them will be useful for solving future levels in the OverTheWire Bandit wargame 2023-07-03 15:32:54
海外TECH DEV Community Setup SSL for YSQL in Yugabyte manually https://dev.to/yugabyte/setup-ssl-for-ysql-in-yugabyte-manually-7hd Setup SSL for YSQL in Yugabyte manuallyThis is blogpost providing a quick and dirty way of enabling SSL for clients connecting to YSQL alias the postgres compatible API in YugabyteDB If you need to do this in an official way you should use Yugabyte Anywhere Create certificatesThe creation of certificates is done using the openssl executable This is an executable that is normally available on any linux system and on any Mac The way SSL works using openssl is that a so called keypair is needed for encryption and decryption You can create a key file alias private key at will and you can create a CSR certificate signing request at will but to make your CSR usable as a certificate it must be signed by a CA certificate authority For quickly creating test certificates you can create a dummy certificate authority for yourself Obviously certificates signed by this dummy authority are not accepted as official certificates Certificate AuthorityThe creation of a CA is quite simple Create the CA key file openssl genrsa out test ca keyCreate the CA certificate file openssl req new x key test ca key out test ca crtThere are some questions asked for test purposes you can just leave these blank except for the common name use localhost Server key and CSRThe creation of the server certificate files is also simple Create server key file openssl genrsa out test server keyCreate the server CSR file openssl req new key test server key out test server csrThere are some question asked here too which are the same questions as the CA creation because both are about a public key certificate If there is a hostname used the common name should match the hostname used This does create the CSR the certificate signing request Sign the CSRThe last step is to use the CA files to sign the server CSR openssl x req in test server csr CA test ca crt CAkey test ca key CAcreateserial out test server crtThat s it Now you got a number of files The test ca crt file which is the CA certificate which sometimes is needed when the CA needs to be provided for server certificate validation The test server key file which is the private key file If this file is made available the SSL security is compromised The test server crt file which is the public certificate file Plus The test ca key file which is the private key of the certificate authority This file is only needed for signing The test ca srl file which contains the serial number of signed certificates needed for a real CA to keep track of serials The test server csr which contains the signing request This file can be reused when the certificate crt expires Enable SSL for YugabyteDB YSQL postgres API To enable SSL for YugabyteDB YSQL there are two steps that need to be done Put the needed files in a place and file format where the tablet server process can find these Actually enable SSL for client to server encryption optionally for test Allow unencrypted connections alongside encrypted connections Put the certificate SSL files in place assuming the Yugabyte tablet server process is started with the user yugabyte and it s home directory is home yugabyte mkdir certscp test ca crt certs ca crtcp test server key certs node keycp test server crt certs node crtchmod certsThere is something to say here the names of the key and certificate file is taken from the general parameter that controls on which address or addresses the tablet server is listening rpc bind addresses In the above situation it was set to which means all addresses Enable SSL and point the tablet server to the filesTo enable client to server SSL set the following tablet server setting use client to server encryption trueTo point the tablet server to the certificate files certs for client dir home yugabyte certs Enable unencrypted traffic alongside encrypted trafficTo allow unencrypted traffic as well as encrypted traffic add the following line to the tablet server flag file ysql hba conf csv host all all all trust In a real life situation this is very likely not a good idea but for test and testing this is or can be very useful Read the documentation for more configuration options such as configuring special unencrypted access for backup for example 2023-07-03 15:23:45
海外TECH DEV Community ChatGPT Vs Bard: Which is better for coding? https://dev.to/soumyadeepdey/chatgpt-vs-bard-which-is-better-for-coding-355j ChatGPT Vs Bard Which is better for coding ChatGPT and Bard What s the difference The biggest difference between ChatGPT and Bard is the Large Language Models LLMs they are powered by ChatGPT uses the Generative Pre trained Transformer GPT while Bard uses the Language Model for Dialogue Applications LaMBDA Also ChatGPT is developed by OpenAI while Bard was built by Google In terms of capabilities both do very similar things Programmers can use ChatGPT for Suggestions Both models can suggest the correct syntax and parameters for functions and other code constructs Completion It can complete code that you have started writing Debugging It can help you identify errors and problems in your code Explanation It can explain the code that it generates or code you input Both ChatGPT and Bard have undergone extensive training on vast datasets that include sources such as Common Crawl Wikipedia books articles documents and internet content However Bard diverges in that it specifically incorporates conversations and dialogues extracted from the web whereas ChatGPT s training data consists primarily of scraped general content It s important to note that both ChatGPT and Bard are still in the developmental phase although Bard may be further along in its development compared to ChatGPT To understand the practical implications of these differences let s examine how they perform when tested against each other Testing ChatGPT and Bard against each otherWe chose seven categories to test the chatbots against each other based on what we felt were the most relevant code generation problem solving refactoring code debugging assistance third party plugins UI extension ease of use and cost Let s preface this by saying this is not a rigorous scientific comparison but rather a handful of tests mixed with our hands on experience to date Code generationThe bread and butter of what we want it for right For this we fed in the following prompt Write a function in python that returns a list of prime numbers Bard s coding attempt def get prime numbers n Returns a list of prime numbers up to n primes for i in range n is prime True for j in range i if i j is prime False break if is prime primes append i return primesdef main Prints a list of prime numbers primes get prime numbers print primes if name main main Looks solid but does it work In our experience chatbots can sometimes create code that doesn t run even going as far as to invent functions That s one reason having AI generated code in production with no human oversight would be very bad So let s test it out and see ChatGPT s coding attempt def generate primes n primes sieve True n for current in range n if sieve current primes append current for multiple in range current n current sieve multiple False return primes Generate first prime numbers The th prime number is so we set the limit to to make sure we get at least primesprimes generate primes print primes When we run the same prompt by ChatGPT this code defines a function generate primes n that takes an integer n as input and returns a list of all prime numbers up to n It uses the Sieve of Eratosthenes algorithm to generate the primes Both of these produced a functional result ChatGPT s example is better in this case since it s cleaner and has much less code Also it interpreted our vague prompt correctly However this is only one use case it s known that chatbots will vary a lot in their response depending on the language they are using With less common or documented languages having more errors or the complexity of the query So let s see how Bard and ChatGPT handle different use cases Winner ChatGPT Problem SolvingLet s see how of these LLMs handle a problem Rather than just asking them to write a generic function let s throw a programming problem at them from Leetcode Write JavaScript code that enhances all arrays such that you can call the array last method on any array and it will return the last element If there are no elements in the array it should return ChatGPT s problem solving Here s how you would do it in JavaScript Array prototype last function if this length return else return this this length In this code Array prototype last adds a new method called last to the Array prototype object This ensures that all arrays will have this method this refers to the array object on which the last method is being called this length gives the number of elements in the array If the array is empty this length the method returns Otherwise the method returns the last element of the array this this length Here is how you would use it let array console log array last prints array console log array last prints Remember that extending built in JavaScript objects like Array is generally not recommended as it can lead to conflicts if the JavaScript environment like a browser or Node js adds a method with the same name This is generally called monkey patching and is usually avoided in production grade code But for quick and dirty hacks or to understand how JavaScript works it s a fun tool to useNot only does ChatGPT solve the problem but it explains the problem Neat Let s run the code through leetcode and see if it actually passes the tests though It looks like ChatGPT solved the problem on the first try Now it s time for Bard to step up to the plate Bard s problem solving Sure here is the JavaScript code that enhances all arrays such that you can call the array last method on any array and it will return the last element If there are no elements in the array it should return Define a new method on the Array prototypeArray prototype last function If the array is empty return if this length return Otherwise return the last element return this this length Here is an example of how to use the array last method const array Get the last element of the arrayconst lastElement array last Print the last element of the arrayconsole log lastElement Okay so we didn t get as thorough an explanation from Bard about how the code works However it s nearly identical when you compare what ChatGPT and Bard produced Were they looking at each other s homework Naturally we can t take Bard s word at it so we run the test through Leetcode and It works Which is to be expected given the answer was nearly identical to ChatGPT s When it comes to problem solving it s a tough call between the two While they produce nearly identical results ChatGPT explains the code much better for you which is pretty good for actually learning how to fish instead of having ChatGPT just fish for you This has been our overall experience with using ChatGPT not only do you get a possible solution for your problem but ChatGPT walks you through it a bit more Winner ChatGPT Debugging assistanceBugs are part of life Let s throw an obviously flawed bit of code at both tools and see how well it picks it up See if you can spot it before ChatGPT and Bard do Here s the prompt we used Debug the following code that has an error Provide code that fixes possible errors with it def calculate average numbers total for number in numbers total number average total len numbers return averageChatGPT s debugging attempt All right ChatGPT has given us back a response saying we need to add some logic to prevent a ZeroDivision error It gives an option for doing so and explains the problem Now it s Bard s turn Bard s debugging attempt Bard found the same problem with the function that ChatGPT did But once again Bard has given a much more detailed explanation It outlines possible errors explains how to fix them tells us how to use the function and what the output would be Whew For debugging we ve found in general that Bard is much more thorough in its answers and explanations There have been times where we ve found ChatGPT has discovered bugs better but by and large Bard provides clearer examples to the user Bard wins this one and so we re tied Can one of them break the stalemate Winner Bard Third party plugins amp UI extensionsBy connecting a third party plugin to an LLM we can extend their capabilities in some wild ways letting them run code in the chat conversation or integrate with apps like Zapier ChatGPT offers over plugins to its premium subscribers as a beta feature right now And here s an example of Bard s plugin store Well I can t show you anything because it doesn t exist It is rumored to be on the roadmap but there s no timeframe as of yet If you don t want to use the web interface both ChatGPT and Bard offer an API However Bard s API is still limited to invite only so we didn t get to test it ChatGPT s API however is very thorough and complete ChatGPT also has an official mobile app which is surprisingly useable and quite handy while ideating For this one we have to give the point to ChatGPT due to Bard either not having the features yet or hiding them behind an invite list Winner ChatGPT CostCostAny tool needs to have a section on how much it costs right ChatGPT has both a free and premium version called ChatGPT Plus billed at a month Premium subscribers get access to real time internet searching features plugins better answers from the GPT model faster response times priority access to new features and access during peak times In comparison Bard is free to everyone who has access Getting this access requires a personal Google Account that you manage on your own or a Google workspace account for which your admin has enabled access to Bard with Which can be a bit disappointing if they haven t It s likely Bard will be commercialized at some point but given it s free vs freemium right now Bard wins by default Winner Bard Conclusion ChatGPT wins out but both tools are useful ChatGPT wins overall but in practice both of these tools should be a part of your arsenal Here are some key points to keep in mind as a developer using these tools The base version of ChatGPT is a LLM only which means the information can be out of date Bard uses both LLM and search data This is going to change fairly soon with ChatGPT implementing “Search with Bing into its free offering ChatGPT is generally better for generating documentationBard creates more thorough explanations of code most of the timeBard limits the length of the conversation ChatGPT only limits requests over time GPT Remember that even if you re using these tools it s important to understand the code you re working with Don t become too reliant on them because the results are not guaranteed to be accurate at any point Till next time happy coding 2023-07-03 15:14:40
Apple AppleInsider - Frontpage News Daily deals: 52% off Apple Watch, Amazon Fire HD 10 $75, $40 off Apple TV, more https://appleinsider.com/articles/23/07/03/daily-deals-52-off-apple-watch-amazon-fire-hd-10-75-40-off-apple-tv-more?utm_medium=rss Daily deals off Apple Watch Amazon Fire HD off Apple TV moreToday s hottest deals include off a HP Pavilion Plus laptop off a pack of iPhone fast chargers off a roborock S robot vacuum and mop off an LG XBOOM Go portable wireless Bluetooth speaker and more Get an Apple Watch Series for The AppleInsider team combs the web for stellar deals at online retailers to create a list of unbeatable discounts on popular tech products including discounts on Apple products TVs accessories and other gadgets We share our top finds daily to help you save money Read more 2023-07-03 15:56:37
Apple AppleInsider - Frontpage News Humane announces its wearable communicator will be named 'Humane Ai Pin' https://appleinsider.com/articles/23/07/03/humane-announces-its-wearable-communicator-will-be-named-humane-ai-pin?utm_medium=rss Humane announces its wearable communicator will be named x Humane Ai Pin x Humane a company established by former Apple executives has revealed the name of its wearable Star Trek style communicator that it first showed off in April Humane founders Imran Chaudhri and Bethany BongiornoAfter that sneak peek of its product in April Humane has now unveiled the name of it called the Humane Ai Pin It will formally launch to the public later in Read more 2023-07-03 15:30:52
海外TECH WIRED 28 Best Fourth of July Sales: Couches, Bidets, and TVs https://www.wired.com/story/fourth-of-july-sales-2023/ sleek 2023-07-03 15:46:00
金融 ◇◇ 保険デイリーニュース ◇◇(損保担当者必携!) 保険デイリーニュース(07/04) http://www.yanaharu.com/ins/?p=5247 地震保険 2023-07-03 15:43:38
ニュース BBC News - Home New fuel-finder scheme to help drivers cut costs https://www.bbc.co.uk/news/business-66085232?at_medium=RSS&at_campaign=KARANGA competition 2023-07-03 15:18:26
ニュース BBC News - Home France riots ease as mayors hold anti-violence rally https://www.bbc.co.uk/news/world-europe-66084677?at_medium=RSS&at_campaign=KARANGA violence 2023-07-03 15:35:40
ニュース BBC News - Home Backlash expected over bill banning boycotts of Israel goods https://www.bbc.co.uk/news/uk-politics-66086671?at_medium=RSS&at_campaign=KARANGA foreign 2023-07-03 15:11:57
ニュース BBC News - Home Nathan Collins: Brentford agree £23m deal for Wolverhampton Wanderers defender https://www.bbc.co.uk/sport/football/66084067?at_medium=RSS&at_campaign=KARANGA wanderers 2023-07-03 15:44:18
ニュース BBC News - Home False posts about French riots spread online https://www.bbc.co.uk/news/world-europe-66081671?at_medium=RSS&at_campaign=KARANGA media 2023-07-03 15:26:18
ビジネス ダイヤモンド・オンライン - 新着記事 メタの中国再参入、ザッカーバーグ氏が足かせか - WSJ発 https://diamond.jp/articles/-/325571 足かせ 2023-07-04 00:13:00

コメント

このブログの人気の投稿

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

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

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)