投稿時間:2023-04-17 05:20:45 RSSフィード2023-04-17 05:00 分まとめ(24件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
海外TECH MakeUseOf 5 Methods for Removing Scratches From Your Laptop https://www.makeuseof.com/laptop-scratch-removal-methods/ effective 2023-04-16 19:30:16
海外TECH MakeUseOf Do Random Apps Appear When You Press a Key on Windows? Try These 6 Fixes https://www.makeuseof.com/random-apps-appearing-press-any-key-windows/ bizarre 2023-04-16 19:15:17
海外TECH DEV Community Generating Images from Text with C# and Open AI DALL-E https://dev.to/rmaurodev/generating-images-from-text-with-c-and-open-ai-dall-e-2o7n Generating Images from Text with C and Open AI DALL EWith the use of NET C we can develop a POC Proof of Concept that uses the Open AI DALL E model to generate images from text input In this blog post we will explore the steps to develop a C Console Application using Open AI s DALL E model to generate images from text Also check out my blog with other articles gt What is DALL E from Open AIDALL E can generate images of almost anything from a yellow submarine to a pig with wings It has been trained on a massive dataset of images and textual descriptions allowing it to learn how to generate images from natural language input In this article we will explore how to integrate C with DALL E to generate images using code DALL E Generated Development with CIn this project we re going to use Visual Studio and C with NET to create a Console Application You may need to do some tweaks if you intend to use another NET version Step Console Application and dependenciesLet s create our Console Application with C and NET let s install the dependencies Project Name ConsoleAppOpenAI DALL Edotnet add Microsoft Extensions Httpthese are for loading configuration from JSON filesdotnet add Microsoft Extensions Configurationdotnet add Microsoft Extensions Configuration Jsonthis is optionaldotnet add Microsoft Extensions Configuration UserSecretsCommands to install the dependenciesInstalled Dependencies Step IOpenAIProxy InterfaceWithin this interface we ll expose only the methods to Generate and Download the images from Open AI namespace ConsoleAppOpenAI DALL E HttpServices public interface IOpenAIProxy Send the Prompt Text with and return a list of image URLs Task lt GenerateImageResponse gt GenerateImages GenerateImageRequest prompt CancellationToken cancellation default Download the Image as byte array Task lt byte gt DownloadImage string url IOpenAIProxy cs File Step Generate Image ModelsLet s define our models using records Records simplify the reading since they are only POCO classes namespace ConsoleAppOpenAI DALL E HttpServices public record class GenerateImageRequest string Prompt int N string Size public record class GenerateImageResponse long Created GeneratedImageData Data public record class GeneratedImageData string Url Generate Image Models DTO Step Create an Open AI AccountTo use the OpenAI API we need to create an account on the OpenAI platform The registration process is straightforward and can be completed in a few minutes We just need to visit the OpenAI website at Then click on the Sign Up button in the top right corner Click on the button to start the registration process Step Set up the Configuration File appsettings jsonTo access the DALL E model we ll need to set up the Subscription Id and API key for our application Collect them from these menus Update the appsettings json or secrets json file with the values OpenAi OrganizationId Subscription Id goes here ApiKey API Key goes here Url DALL E Size x N appsettings json fileDon t forget to set Copy to Output Directory as Copy if newer for appsettings json Step Open AI HTTP Service ImplementationCreate a class named OpenAIHttpService with a single constructor receiving IConfiguration and read the configuration we just set in place using ConsoleAppOpenAI DALL E HttpServices using Microsoft Extensions Configuration using System Net Http Headers using System Net Http Json using System Text Json namespace ConsoleAppOpenAI DALL E Services public class OpenAIHttpService IOpenAIProxy readonly HttpClient httpClient readonly string subscriptionId readonly string apiKey public OpenAIHttpService IConfiguration configuration reading settings from the configuration file var openApiUrl configuration OpenAi Url throw new ArgumentException nameof configuration httpClient new HttpClient BaseAddress new Uri openApiUrl subscriptionId configuration OpenAi SubscriptionId apiKey configuration OpenAi ApiKey public async Task lt GenerateImageResponse gt GenerateImages GenerateImageRequest prompt CancellationToken cancellation default throw new NotImplementedException public async Task lt byte gt DownloadImage string url throw new NotImplementedException Next should be the implementation of the GenerateImages method public async Task lt GenerateImageResponse gt GenerateImages GenerateImageRequest prompt CancellationToken cancellation default using var rq new HttpRequestMessage HttpMethod Post v images generations var jsonRequest JsonSerializer Serialize prompt new JsonSerializerOptions PropertyNamingPolicy JsonNamingPolicy CamelCase serialize the content to JSON and set the correct content type rq Content new StringContent jsonRequest rq Content Headers ContentType new MediaTypeHeaderValue application json Including the Authorization Header with API Key var apiKey apiKey rq Headers Authorization new AuthenticationHeaderValue Bearer apiKey Including the Subscription Id Header var subscriptionId subscriptionId rq Headers TryAddWithoutValidation OpenAI Organization subscriptionId var response await httpClient SendAsync rq HttpCompletionOption ResponseHeadersRead cancellation response EnsureSuccessStatusCode var content response Content var jsonResponse await content ReadFromJsonAsync lt GenerateImageResponse gt cancellationToken cancellation return jsonResponse Last the DownloadImage method implementation public async Task lt byte gt DownloadImage string url var buffer await httpClient GetByteArrayAsync url return buffer Step Consuming the APIsBack to Program cs file let s wire everything together and start calling the APIs to generate images using ConsoleAppOpenAI DALL E HttpServices using ConsoleAppOpenAI DALL E Services using Microsoft Extensions Configuration using System Reflection Console WriteLine Starting commandline for DALL E Open AI var config BuildConfig IOpenAIProxy aiClient new OpenAIHttpService config Console WriteLine Type your first Prompt var msg Console ReadLine var nImages int Parse config OpenAi DALL E N var imageSize config OpenAi DALL E Size var prompt new GenerateImageRequest msg nImages imageSize var result await aiClient GenerateImages prompt foreach var item in result Data Console WriteLine item Url var fullPath Path Combine Directory GetCurrentDirectory Guid NewGuid png var img await aiClient DownloadImage item Url await File WriteAllBytesAsync fullPath img Console WriteLine New image saved at fullPath Console WriteLine Press any key to exit Console ReadKey static IConfiguration BuildConfig var dir Directory GetCurrentDirectory var configBuilder new ConfigurationBuilder AddJsonFile Path Combine dir appsettings json optional false AddUserSecrets Assembly GetExecutingAssembly return configBuilder Build With all of this we should have a running POC integrating with DALL E model Generate our very first ImageHere is the output of my first try Prompt Wide and green garden with a lot of flowers with sunflowers and a small dog running aroundTake a look at this beautiful image generated by our application and DALL E DALL E Generated ConclusionIntegrating C with DALL E is a straightforward process that allows us to generate images programmatically By using Open AI s API we can easily send textual descriptions and receive high quality images in response This integration opens up many possibilities such as generating images for data visualization creating custom artwork or automating image creation tasks As DALL E continues to improve we can expect even more exciting applications in the future Source code at Posted at 2023-04-16 19:05:30
海外TECH DEV Community GitHub Slash Commands! https://dev.to/this-is-learning/github-slash-commands-3coh GitHub Slash Commands Wait what Slash commands are available on GitHub I recorded a two minutes video to showcase how it works Just open up a text editor it can be a new issue a new pull request or even a comment and type to see all the available commands A list will appear and you can start typing to filter them The currently available commands are code Inserts a Markdown code block You choose the language details Inserts a collapsible detail area You choose the title and content saved replies Inserts a saved reply You choose from the saved replies for your user account If you add cursor to your saved reply the slash command will place the cursor in that location table Inserts a Markdown table You choose the number of columns and rows template Shows all of the templates in the repository You choose the template to insert This slash command will work for issue templates and a pull request template There s also a tasklist command which inserts a tasklist and only works in an issue description however this one is not available for everyone yet Learn more on the official docs Thanks for reading this article this was a short one but I hope you found it interesting I recently launched my Discord server to talk about Open Source and Web Development feel free to join Do you like my content You might consider subscribing to my YouTube channel It means a lot to me ️You can find it here Feel free to follow me to get notified when new articles are out Leonardo MontiniFollow I talk about Open Source GitHub and Web Development I also run a YouTube channel called DevLeonardo see you there 2023-04-16 19:02:00
Apple AppleInsider - Frontpage News Apple will lay sideloading groundwork in iOS 17 https://appleinsider.com/articles/23/04/16/apple-will-lay-sideloading-groundwork-in-ios-17?utm_medium=rss Apple will lay sideloading groundwork in iOS Apple won t be introducing many features in iOS a report claims but it will be putting in elements to enable the side loading of apps Sideloading may change how you install apps on your iPhoneJune s WWDC will feature Apple s annual updates to its main operating systems with iOS changes being the most watched of them all However for s developer event it seems that iOS s changes will lean more towards regulatory compliance than brand new features Read more 2023-04-16 19:59:32
Apple AppleInsider - Frontpage News Alogic Rapid Power 100W Car Charger review: Two ports, plenty of power https://appleinsider.com/articles/23/04/16/alogic-rapid-power-100w-car-charger-review-two-ports-plenty-of-power?utm_medium=rss Alogic Rapid Power W Car Charger review Two ports plenty of powerThe Alogic Rapid Power W Car Charger provides enough juice to charge your most power intensive gear including your MacBook Pro Alogic Rapid Power Car ChargerNew chargers inside your home have been taking off as users require more ports in general and faster ones We see multi chargers that can output up to W of power at once with four USB C ports Read more 2023-04-16 19:26:14
海外TECH Engadget Google is reportedly developing a new AI-powered search engine https://www.engadget.com/google-is-reportedly-developing-a-new-ai-powered-search-engine-191648736.html?src=rss Google is reportedly developing a new AI powered search engineFacing renewed competition from Microsoft and OpenAI Google is reportedly “racing to build an “all new AI powered search engine According to The New York Times the company is in the early stages of creating a search service that will attempt to anticipate what you want from it in hopes of offering “a far more personalized experience The project has “no clear timetable However knowing that Google is also developing a suite of new AI features for its existing search engine under the codename “Magi Among the features Google is developing is a chatbot that can answer software engineering questions and generate code snippets The company has also experimented with a feature that would allow people to search for music through a chatbot conversation According to The Times the company has assigned more than employees to the redesign Other new additions “in various stages of development include a Chrome feature dubbed Searchalong It would allow a chatbot to scan the webpage you re reading to offer contextual information For example if you were looking for a place to stay on Airbnb you could ask the chatbot to tell you what to see and do near your planned accommodations “GIFI and “Tivoli Tutor another pair of experimental features would allow users to prompt Google Image Search to generate images and converse with a chatbot to learn a new language It s worth noting many of these are features that Google has either demoed in the past or exist on other platforms like Duolingo For instance image generation is already available in Slides Google reportedly plans to announce Magi next month before introducing additional new features sometime in the fall That timing suggests the project will make an appearance at I O The company plans to offer Magi s features to one million people in the US before expanding availability to million users by the end of the year “We ve been bringing AI to Google Search for years to not only dramatically improve the quality of our results but also introduce entirely new ways to search such as Lens and multisearch a Google spokesperson told Engadget when asked about the report “We ve done so in a responsible and helpful way that maintains the high bar we set for delivering quality information Not every brainstorm deck or product idea leads to a launch but as we ve said before we re excited about bringing new AI powered features to Search and will share more details soon Underscoring the importance of Magi for Google Samsung reportedly told the company last month it was considering making Bing the default search on its devices The declaration reportedly sent Google into a “panic The company s search agreement with Samsung is worth approximately billion annually This year its lucrative search agreement with Apple the subject of frequent antitrust scrutiny is also up for renewal This article originally appeared on Engadget at 2023-04-16 19:16:48
医療系 医療介護 CBnews 看護補助者充実のための“人財”と外国人登用の現実性-先が見えない時代の戦略的病院経営(194) https://www.cbnews.jp/news/entry/20230414165737 働き方改革 2023-04-17 05:00:00
ニュース BBC News - Home Racing chiefs condemn Grand National protests https://www.bbc.co.uk/sport/horse-racing/65292791?at_medium=RSS&at_campaign=KARANGA Racing chiefs condemn Grand National protestsThe British Horseracing Authority has robustly condemned the reckless protests at Saturday s Grand National and announces an analysis into the death of three horses at this year s event 2023-04-16 19:30:04
ビジネス ダイヤモンド・オンライン - 新着記事 MARCHを目指せるのに入りやすい「お得な中高一貫校」ランキング【2024入試版・首都圏83校】 - 2024年入試対応!わが子が伸びる中高一貫校&塾&小学校 https://diamond.jp/articles/-/320493 2023-04-17 04:55:00
ビジネス ダイヤモンド・オンライン - 新着記事 DXがヤバい!ITベンダーもコンサルも踊るブームの裏で企業、自治体のシステムに迫る危機 - 企業・銀行・官公庁・ITベンダー・コンサルが大騒ぎ! ヤバいDX 2023 https://diamond.jp/articles/-/321269 銀行 2023-04-17 04:50:00
ビジネス ダイヤモンド・オンライン - 新着記事 60代からの資産運用&死に際のお金のすべて、ボケても寝込んでも安心な「お金の終活」徹底解説 - お金の終活 シニアの資産運用&死に際のお金の管理 https://diamond.jp/articles/-/321232 代からの資産運用死に際のお金のすべて、ボケても寝込んでも安心な「お金の終活」徹底解説お金の終活シニアの資産運用死に際のお金の管理主に代からの資産運用、死ぬまでのお金の管理をどうするかまとまった資金がなければ、長く働くか支出を抑えるのみだから、悩む必要はない。 2023-04-17 04:45:00
ビジネス ダイヤモンド・オンライン - 新着記事 【無料公開】ハイアットリージェンシー東京がチャペル閉鎖!結婚式から撤退の「コロナではない」裏事情 - Diamond Premiumセレクション https://diamond.jp/articles/-/321390 diamond 2023-04-17 04:40:00
ビジネス ダイヤモンド・オンライン - 新着記事 転職はいつがベスト?「売り手市場のとき」ではなかった!正解は… - 転職で幸せになる人、不幸になる人 丸山貴宏 https://diamond.jp/articles/-/321351 転職はいつがベスト「売り手市場のとき」ではなかった正解は…転職で幸せになる人、不幸になる人丸山貴宏「転職するならどのタイミングがよいか」というのは、ビジネスパーソンの多くが抱く疑問である。 2023-04-17 04:35:00
ビジネス ダイヤモンド・オンライン - 新着記事 【八王子市ベスト20】小学校区「教育環境力」ランキング!【偏差値チャート最新版】 - 東京・小学校区「教育環境力」ランキング2022 https://diamond.jp/articles/-/320608 【八王子市ベスト】小学校区「教育環境力」ランキング【偏差値チャート最新版】東京・小学校区「教育環境力」ランキング子どもにとってよりよい教育環境を目指し、入学前に引っ越して小学校区を選ぶ時代になった。 2023-04-17 04:30:00
ビジネス ダイヤモンド・オンライン - 新着記事 「人たらし」は性悪説に立つ?人間関係は“細かいこと”にこそ気をつけよ - 要約の達人 from flier https://diamond.jp/articles/-/321208 「人たらし」は性悪説に立つ人間関係は“細かいことにこそ気をつけよ要約の達人fromflier強烈なタイトルの一冊である。 2023-04-17 04:25:00
ビジネス ダイヤモンド・オンライン - 新着記事 年収が低い会社ランキング2022最新版【従業員の平均年齢40代後半】1位は200万円台 - ニッポンなんでもランキング! https://diamond.jp/articles/-/321379 上場企業 2023-04-17 04:20:00
ビジネス ダイヤモンド・オンライン - 新着記事 年収が低い会社ランキング2022最新版【従業員の平均年齢40代後半・完全版】400万円未満が15社 - ニッポンなんでもランキング! https://diamond.jp/articles/-/321349 上場企業 2023-04-17 04:20:00
ビジネス ダイヤモンド・オンライン - 新着記事 東京への人口一極集中「復活」は本当?報道をうのみにできない理由 - DOL特別レポート https://diamond.jp/articles/-/321137 人口移動 2023-04-17 04:15:00
ビジネス ダイヤモンド・オンライン - 新着記事 「働きがいのある会社」ランキングで見る、女性の働きやすさの条件とは? - 親と子の「就活最前線」 https://diamond.jp/articles/-/321084 placetoworkinstitutejapan 2023-04-17 04:10:00
ビジネス ダイヤモンド・オンライン - 新着記事 脱デフレ時代、ROEの向上で日本株上昇トレンドが始まる - 政策・マーケットラボ https://diamond.jp/articles/-/321355 上げ相場 2023-04-17 04:05:00
ビジネス 東洋経済オンライン 就活生が投票した業界別「人気企業ランキング」 就活生約2万5000人の投票で判明した人気企業は | 就職四季報プラスワン | 東洋経済オンライン https://toyokeizai.net/articles/-/666537?utm_source=rss&utm_medium=http&utm_campaign=link_back 就職四季報 2023-04-17 04:50:00
ビジネス 東洋経済オンライン ハーバード流「値上げで勝つ、負ける」戦略の差 ブランド力がなくても顧客満足度を高める方法 | リーダーシップ・教養・資格・スキル | 東洋経済オンライン https://toyokeizai.net/articles/-/665622?utm_source=rss&utm_medium=http&utm_campaign=link_back 企業努力 2023-04-17 04:40:00
ビジネス 東洋経済オンライン 東武新型特急「スペーシアX」、4編成で攻めの戦略 「一点もの」豪華列車が多い中、毎日数往復運行 | 特急・観光列車 | 東洋経済オンライン https://toyokeizai.net/articles/-/666487?utm_source=rss&utm_medium=http&utm_campaign=link_back 東武鉄道 2023-04-17 04:30: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件)