投稿時間:2022-02-18 07:21:13 RSSフィード2022-02-18 07:00 分まとめ(22件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia News] Twitter、DMの特定の会話を画面トップに固定する機能を全ユーザーに提供開始 https://www.itmedia.co.jp/news/articles/2202/18/news067.html itmedianewstwitter 2022-02-18 06:45:00
AWS AWS Mobile Blog NEW in AWS Amplify Flutter version 0.4.0 https://aws.amazon.com/blogs/mobile/new-in-aws-amplify-flutter-version-0-4-0/ NEW in AWS Amplify Flutter version This blog post was written by Abdallah Shaban Senior Product Manager at AWS Amplify and Ashish Nanda Tech Lead at AWS Amplify We are announcing the release of version of the Amplify Flutter library Please use this Github repo to inform the Amplify Flutter team about features or issues or visit the … 2022-02-17 21:17:10
海外TECH MakeUseOf 6 Types of Charts in Google Sheets and How to Use Them Efficiently https://www.makeuseof.com/types-of-charts-google-sheets-charts-how-to-use/ Types of Charts in Google Sheets and How to Use Them EfficientlyGoogle Sheets allows you to create several types of charts in the spreadsheet Learn all the different types of charts and how to use them 2022-02-17 21:45:14
海外TECH MakeUseOf The 10 Best Animal Welfare Websites to Find Helpful Resources https://www.makeuseof.com/best-animal-welfare-websites/ The Best Animal Welfare Websites to Find Helpful ResourcesIf you re looking to learn more about animal welfare here are the ten best websites from reputable organizations to help you find useful resources 2022-02-17 21:30:14
海外TECH MakeUseOf How to Set Up and Configure a Custom DNS Using NextDNS https://www.makeuseof.com/setup-custom-dns-using-nextdns/ activities 2022-02-17 21:15:13
海外TECH DEV Community Ethereum BlockChain Development (2) https://dev.to/yongchanghe/ethereum-development-blog-2-53kk Ethereum BlockChain Development Part Build the test React App and realize making transactions locally using MetaMask Wallet The purpose of building this blog is to write down the detailed operation history and my memo for learning the dApps If you are also interested and want to get hands dirty just follow these steps below and have fun Previous BlogEthereum Development Blog Getting startedPreviously we have deployed the running test network including accounts as well as the smart contract related with Account Our next step is to use metamask to connect to our smart contract account Account We need to install metamask chrome extension then click Get Started Create a Wallet I Agree with Help us improve MetaMask create your own password Remind me later then close the popping Start swapping window and lastly pin MetaMask to your browser Let s click on the pinned MetaMask icon and change networks to Localhost Click on Show hide test networks to show test networks Next copy the Private Key of Account and go back to your MetaMask account and import account by pasting your private key string After clicking Import we will have ETH in current account Next let s switch to terminal window and type npm start command This will open up the React App web Server For me I have already done this step and I answered n to the terminal We can test by opening up a new chrome window and going to localhost npm start Then we open up our code at directory REACT DAPP src App js First import dependencies at top page import useState from react import ethers from ethers import App css import Greeter from artifacts contracts Greeter sol Greeter json Then add variable greeterAddress and assign the deployed contract address to it const greeterAddress xfbdbafecbfdffaa Next we will give users a form to input rewrite their messages in the BlockChain Add this code into function App but right above return function const greeting setGreetingValue useState Next let s create functions requestAccount fetchGreeting and setGreeting that right above return function Annotations have been added amongst lines of codes in case that we want to know specifically what operations we have done async function requestAccount Aims to connect to the Metamask wallet of the user and create a transaction Request users account information from MetaMask wallet This will prompt the user to connect to one of their MetaMask account if they have already connected and return array of their accounts await window ethereum request method eth requestAccounts async function fetchGreeting When Ethereum window is exist Waiting for the MetaMash extension to be connected If MetaMask is not installed on that user s broswer window ethereum will be rejected if typeof window ethereum undefined Create a new provider using Ethers In our case we use WebProvider const provider new ethers providers WebProvider window ethereum When We have the provider instance we can now create contract instance We should pass in greetAddress Greeter abi and provider const contract new ethers Contract greeterAddress Greeter abi provider try Read value from BlockChain and assign it to variable data const data await contract greet Show data to console console log data data catch err console log Error err async function setGreeting To check if users have typed in a greeting If no greeting function stop without writing empty string if greeting return When Ethereum window is exist if typeof window ethereum undefined Wait for the user to go ahead and enable the account to be used await requestAccount Create another new provider using Ethers In our case we use WebProvider const provider new ethers providers WebProvider window ethereum Await to sign a transaction using a signer const signer provider getSigner Create contract instance and pass in contract address abi and signer const contract new ethers Contract greeterAddress Greeter abi signer Passing in greeting variable const transaction await contract setGreeting greeting setGreetingValue Waiting the transaction to be confirmed on the BlockChain await transaction wait Refresh value fetchGreeting Then update return function return lt div className App gt lt header className App header gt lt button onClick fetchGreeting gt Fetch Greeting lt button gt lt button onClick setGreeting gt Set Greeting lt button gt lt input onChange e gt setGreetingValue e target value placeholder Set greeting value greeting gt lt header gt lt div gt As a whole App js import useState from react import ethers from ethers import App css import Greeter from artifacts contracts Greeter sol Greeter json Store the contract Address into variableconst greeterAddress xfbdbafecbfdffaa function App const greeting setGreetingValue useState async function requestAccount Aims to connect to the Metamask wallet of the user and create a transaction Request users account information from MetaMask wallet This will prompt the user to connect to one of their MetaMask account if they have already connected and return array of their accounts await window ethereum request method eth requestAccounts async function fetchGreeting When Ethereum window is exist Waiting for the MetaMash extension to be connected If MetaMask is not installed on that user s browser window ethereum will be rejected if typeof window ethereum undefined Create a new provider using Ethers In our case we use WebProvider const provider new ethers providers WebProvider window ethereum When We have the provider instance we can now create contract instance We should pass in greetAddress Greeter abi and provider const contract new ethers Contract greeterAddress Greeter abi provider try Read value from BlockChain and assign it to variable data const data await contract greet Show data to console console log data data catch err console log Error err async function setGreeting To check if users have typed in a greeting If no greeting function stop without writing empty string if greeting return When Ethereum window is exist if typeof window ethereum undefined Wait for the user to go ahead and enable the account to be used await requestAccount Create another new provider using Ethers In our case we use WebProvider const provider new ethers providers WebProvider window ethereum Await to sign a transaction using a signer const signer provider getSigner Create contract instance and pass in contract address abi and signer const contract new ethers Contract greeterAddress Greeter abi signer Passing in greeting variable const transaction await contract setGreeting greeting setGreetingValue Waiting the transaction to be confirmed on the BlockChain await transaction wait Refresh value fetchGreeting return lt div className App gt lt header className App header gt lt button onClick fetchGreeting gt Fetch Greeting lt button gt lt button onClick setGreeting gt Set Greeting lt button gt lt input onChange e gt setGreetingValue e target value placeholder Set greeting value greeting gt lt header gt lt div gt export default App Lastly let s start the React Server and test our code npm startWe should be able to launch React App test webpage localhost and also be able to make updates to the greeting by signing the contract with MetaMask wallet and spending the fake Ether So Cool References 2022-02-17 21:08:20
海外TECH DEV Community Python Project Setup – Virtual Environments and Package Management https://dev.to/bascodes/python-project-setup-virtual-environments-and-package-management-2gmf Python Project Setup Virtual Environments and Package Management Virtual Environments in PythonVirtual Environments are isolated Python environments that have their own site packages Basically it means that each virtual environment has its own set of dependencies to third party packages usually installed from PyPI Virtual environments are helpful if you develop multiple Python projects on the same machine Also when you distribute your Python code to others or on servers virtual environments come in very handy to reproducibly create the same environment as on your development machine Today we ll learnwhich tools exist to create isolated environmentswhich tools help with package management in Python projects Creating Virtual EnvironmentsThere are two common ways to create virtual environments in Python s ecosystem virtualenv and venv venvvenv is probably the most popular choice for creating virtual environments in Python Since Python venv is part of the standard library and therefore usually available when you have Python installed However Debian based Linux distributions require you to install python venv since their maintainers decided to unbundle this module from the core Python installation To create a virtual environment with venv you can start by typingpython m venv venvThis command creates a directory called venv inside your current folder Now to use this new virtual environment you have to activate it with this command source venv bin activate Use this command on bash venv Scripts activate On WindowsYou can now start your Python interpreter and type gt gt gt import sys gt gt gt sys executable Users bas Code tmp venv bin python gt gt gt for path in sys path print repr path usr local Cellar python Frameworks Python framework Versions lib python zip usr local Cellar python Frameworks Python framework Versions lib python usr local Cellar python Frameworks Python framework Versions lib python lib dynload Users bas Code tmp venv lib python site packages gt gt gt As you can see the Python interpreter you just started is located inside your virtual environment Also the site packages directory where your pip installed packages are located is pointing to a path inside your virtual environment virtualenvvirtualenv works similarly To use it you must first install it via pip pip install virtualenvYou can then use it withpython m virtualenv venvNote that we just changed the name of the module from venv to virtualenv first argument The venv destination folder remains untouched virtualenv will create a similar directory structure as venv did before You need to activate your new virtual environment in exactly the same way as before source venv bin activate On bash virtualenv vs venvYou may wonder what the difference is between the two tools First virtualenv has a longer history It was used in times of Python already Official support for virtual environments has been added to Python not until version via PEP As a third party package virtualenv has the additional advantage of being independent of the system s Python installation and can thus be upgraded independently However the most important benefit of using virtualenv instead of venv is that it allows targeting Python versions other than the system s Python If you have only Python installed you can use virtualenv to create a virtual environment with Python and vice versa of course Not only can you make use of any supported Python version you want but you can also do this without root or Administrator permissions since the installation is done inside your working directory On the other hand the virtual environments created with virtualenv are more complex This is because its cross Python support even Python is still supported makes the discovery of packages and internals a bit more complicated and the bootstrapping process needs to be customized If you are interested in these internals Bernat Gabor s EuroPython talk has these insights covered To sum up venvvirtualenvPROS Official way to create virtual environmentsCleaner directory structureSupports different Python versionsIndependent of system PythonGrace period of two years for deprecated Python versionsCONSslower than virtualenvMore error prone since the virtual env is more complex Installing PackagesNow that we have a working virtual environment with either virtualenv or venv we can start to install the packages we need to install to fulfill our project s dependencies pippip is the de facto standard for installing packages in Python and has been part of the standard library since Python version To install a package you can just typepip install djangopip takes care of finding the package on PyPI and of managing its dependencies In our example we can check which packages have been installed by the command above pip listPackage Version asgiref Django pip setuptools sqlparse As you can see besides Django pip has installed asgiref and sqlparse The most common way to share an environment built with pip is by creating a requirements txt file that looks like this django The problem with pip is that it takes care of installing dependencies but it doesn t take care of them afterwards So for example if you install django with pip it will install sqlparse and asgiref for you However if you uninstall django afterward these two additional packages are kept and not removed Over time you can lose track of the packages which are really needed for your project and those that are just leftovers from previously installed packages This situation especially applies when you migrate from one PyPI module to another one over the lifetime of your project pip also does not differentiate between a development and a production environment So you might want to have access to developer tools such as black or pytest during development Installing those on a production server is at best unnecessary and harmful at worst Also when two third party packages have colliding dependencies pip does not provide a way to resolve these Lastly managing your requirements txt is not taken care of by pip Some developers just use pip freeze gt requirements txt whenever a new dependency has been installed However this is not advisable since it would include the sub dependencies and thus worsening the problems mentioned above pipenvpipenv is a tool created by Kenneth Reitz The most significant difference to pip is that pipenv is designed to keep track of installed packages automatically For that pipenv creates two files Pipfile and Pipfile lock pipenv solves the issues with pip mentioned above Dependency managementInstalling a package automatically updates the Pipfile and the Pipfile lockWhen we install django with pipenv it will install sqlparse and asgiref for us like in pip would do However if we remove django from our requirements pipenv will remove these additional dependencies as well Production Development DependenciesSome dependencies such as linters or testing tools are required in the development environment only That s why pipenv supports the dev flag Packages installed with this flag are not installed when replicating the environment on production systems Virtual Environmentspipenv can also create and manage virtual environments for you In practice this means that you can solely rely on pipenv to create your project environments including installing specified Python versions With the commandpipenv python you can easily create a brand new virtual env with a specified version of Python poetrypoetry is a new and very ambitious package manager for Python Its goal is to provide a solution to all virtual environment and package management issues a developer might run into Interestingly poetry unlike pipenv is not an official package under the umbrella of the Python Packaging Authority However it does rely on a file called pyproject toml instead of Pipfile and Pipfile lock as pipenv does The pyproject toml specifiation has an official status per PEP Also poetry can be used to manage virtual environments and packages and build and publish own Python packages pyproject tomlpoetry relies on the pyproject toml file which looks like this tool poetry name poetry tutorial project tool poetry dependencies python loguru psutil tool poetry dev dependencies pytest build system requires poetry gt build backend poetry masonry api tool poetry scripts run wsgi main This file is the only configuration file poetry uses and includes every information about dependencies build instructions and testing environments Virtual Environments and Skeleton creationThe poetry new projectname command creates a sensible project structure for you projectname├ーREADME md├ーprojectname│└ー init py├ーpyproject toml└ーtests ├ー init py └ーtest projectname pyDependecies can be added withpoetry add djangoThe dev dependency can be used to add a dependency only for the development environment Build and publishpoetry can also take care of building and publishing your packages to PyPI It replaces twine in that sense Here is a good guide on using poetry to package Python projects pip vs pipenv vs poetrypippipenvpoetryPROSProbably most commonly used package installerEasy to use and included in standard libraryOfficial PyPA projectManages dependencies also when uninstalling packagesBuiltin virtual env creationuses the official pyproject toml standardBuiltin virtual env creationCan be used to build and publish packagesCreates a project structureCONSNo reproducable dependency managementDependency documentation is a manual process requirements txt No support for pyproject toml filesLarge project scope not one tool for the job could also be seen as advantage Other Tools Worth Mentioning virtualenvwrappervirtualenvwrapper is a set of extensions to virtualenv The package comes with some handy CLI utilities The most important ones are mkvirtualenv A shortcut to create a virtual env As opposed to venv and virtualenv the virtual environments created by virtualenvwrapper are not placed into the working directory but inside a central directory of your HOME directory A virtual environment is created by mkvirtualenv projectenv workon Because virtualenvwrapper creates virtual environments at a central location activation is done with a workon command No matter what your current working directory is you can run workon projectenv which will automatically pick the right environment from your HOME directory and activates it pyenvpyenv is a tool to manage Python versions Other than the tools we discussed so far it does neither help with managing virtual environments nor package management However pyenv is of course compatible with the other tools pyenv can be a convenient helper for setting up development workstations It is itself not dependent on Python itself so that it can be used to set up different Python installations conveniently and without root Administrator rights To install a specific version of Python type pyenv install To use pyenv in combination with virtual environment managers the pyenv team has created some plugins pyenv virtualenvpyenv virtualenvwrapper Deprecated pyvenvpyvenv not to be confused with pyenv is a script to create virtual environments that used to be shipped with Python It has been deprecated since Python and replaced by python m venv CLISometimes you just want to use a CLI tool from PyPI In this case you don t need a virtual environment for development purposes but only to manage your CLI tools Different CLI tools you use every day have their own dependencies so installing these tools in the system Python can lead to the known problems again Thus it makes sense to create a separate virtual environment for each CLI tool To make this process convenient and manageable there are tools that do just that Create an isolated environment for CLI tools and then run these CLI tools pipxWith pipx you can install a package that exposes a CLI script pipx will automatically create a separate virtual environment for each CLI tool and puts a symlink to a directory called local bin inside your HOME directory To install a CLI tool from PyPI just type pipx install pycowsay installed package pycowsay Python These apps are now globally available pycowsaydone When it s installed you magically have the CLI tool available on your shell and it does not pollute your system s Python packages pycowsay bas codes lt bas codes gt oo w pip runpip run serves the same purpose as pipx The only difference is that pip run doesn t provide a persistent package installation but rather deletes all environments after the tool has been executed pip run q pycowsay m pycowsay bas codes lt bas codes gt oo w If you just want to try a package pip run is a great tool as it does the cleanup for you You can even run an interactive interpreter with an installed package which makes pip run useful not only for CLI tools but also to investigate module packages from PyPI python m pip run q boto gt gt gt import boto 2022-02-17 21:04:02
Apple AppleInsider - Frontpage News January iPhone shipments much higher than average in China, data suggests https://appleinsider.com/articles/22/02/17/january-iphone-shipments-much-higher-than-average-in-china-data-suggests?utm_medium=rss January iPhone shipments much higher than average in China data suggestsApple s iPhone shipments are tracking higher than the typical seasonal average in Mainland China according to new smartphone market data iPhone ProIn a note to investors seen by AppleInsider JP Morgan analyst Samik Chatterjee took a look at the latest smartphone market data for the month of January which was recently released by the China Academy of Information and Communications Technology Read more 2022-02-17 21:54:55
Apple AppleInsider - Frontpage News Apple ceases iOS 15.3 code signing following iOS 15.3.1 launch https://appleinsider.com/articles/22/02/17/apple-ceases-ios-1502-code-signing-following-ios-151-launch?utm_medium=rss Apple ceases iOS code signing following iOS launchOn Thursday Apple stopped signing iOS effectively blocking downgrades for users who are running iOS or later iPhone Pro modelsThe end of code signing for iOS comes about eight days after Apple released iOS to the public Read more 2022-02-17 21:22:57
Apple AppleInsider - Frontpage News Major websites may stop working soon for Firefox and Chrome users https://appleinsider.com/articles/22/02/17/major-websites-may-stop-working-soon-for-firefox-and-chrome-users?utm_medium=rss Major websites may stop working soon for Firefox and Chrome usersMozilla is warning users that when Firefox ーand Google s Chrome ーreach version major websites may no longer identify them properly and not work properly as a result Firefox is currently on version while Chrome is on version Once those are updated to version numbers with three digits Mozilla says there are could be inconsistent problems across an unpredictable range of websites According to Mozilla website servers examine what s called the User Agent in order to determine which browser is being used They then use that information to configure sites so that they display correctly Read more 2022-02-17 21:40:50
海外TECH Engadget Peloton owners can now play a video game while they work out https://www.engadget.com/peloton-lanebreak-videogame-215537833.html?src=rss Peloton owners can now play a video game while they work outPeloton today launched Lanebreak a new series of workouts that mimic a racing game for its connected stationary bike Riders get behind a virtual wheel race down a multi lane highway and gain points for higher levels of output and resistance The fitness company briefly beta tested Lanebreak last July and is now launching the new mode as a software update to all Peloton bikes in the US UK Canada Germany and Australia Unlike the majority of other Peloton workouts there s no instructor on Lanebreak offering encouragement throughout the ride Instead riders can choose from a selection of different pop centric playlists to listen to in the background featuring the likes of David Guetta David Bowie Bruno Mars and Ed Sheeran For Peloton riders who are bored with the usual slate of instructor led classes Lanebreak adds a change of pace It s also the first new program that the fitness company has added to their fitness library in a while following a major expansion in that included barre yoga pilates and strength training classes The fitness company once a darling of the pandemic has now run into financial woes due to a decline in demand Earlier this month Peloton replaced its CEO and laid off roughly percent of its workforce in an effort to streamline its expenses But despite its struggles on Wall Street Peloton s incredibly loyal customer base has a one year retention rate The bikes are a large upfront investment and few Peloton riders want the added hassle of reselling and moving their bike While it s unlikely that Lanebreak will recruit new Peloton riders it ll add some variety to a fitness library that for some seasoned riders has become stale 2022-02-17 21:55:37
海外TECH Engadget Twitter now lets anyone pin DM conversations https://www.engadget.com/twitter-pin-dm-conversations-212045019.html?src=rss Twitter now lets anyone pin DM conversationsYou might be used to pinning text conversations on your phone and now you can pin your Twitter chats in much the same way Twitter s DM conversation pinning is now available to everyone on Android iOS and the web without requiring a Blue subscription The functionality is familiar ーon mobile you just have to slide a favorite conversation to the right and tap button to float it to the top of your inbox You can pin up to six threads this way The expansion comes just a few months after DM conversation pins came to Blue users in November Not that it s a shock however Twitter said it would use Blue to offer early access to features and DM pinning was one of the first This broader release mainly gives a rough sense of how long it might take for Blue first features to reach a general audience While the timing is likely to vary based on the feature the wait for this DM upgrade might just line up with what you d expect The months long interval may have helped Blue members justify their monthly outlay but it wasn t extreme Keep your fave DM convos easily accessible by pinning them You can now pin up to six conversations that will stay at the top of your DM inbox Available on Android iOS and web pic twitter com kIjlzfXLJーTwitter Support TwitterSupport February 2022-02-17 21:20:45
Cisco Cisco Blog Get the Best Network View with Cisco ThousandEyes and ENTEIT Training https://blogs.cisco.com/learning/get-the-best-network-view-with-cisco-thousandeyes-and-enteit-training efficiency 2022-02-17 21:33:35
海外TECH CodeProject Latest Articles Prototype Driven Development (PDD) https://www.codeproject.com/Articles/5324212/Prototype-Driven-Development-PDD quality 2022-02-17 21:21:00
海外TECH WIRED US Agencies Say Russian Hackers Compromised Defense Contractors https://www.wired.com/story/us-says-russian-hackers-compromised-defense-contractors US Agencies Say Russian Hackers Compromised Defense ContractorsKremlin backed cyber actors lurked in the networks for months obtaining sensitive documents related to weapons and infrastructure development 2022-02-17 21:05:00
ニュース @日本経済新聞 電子版 AmazonとVISAがクレジットカードを巡る交渉で「グローバルな合意」。Amazonは手数料の高さを不服としてイギリスでVISAのカードの利用停止を検討していましたが、継続利用できます。 https://t.co/QjSXJ3IFY6 https://twitter.com/nikkei/statuses/1494427970399789056 AmazonとVISAがクレジットカードを巡る交渉で「グローバルな合意」。 2022-02-17 21:46:07
ニュース BBC News - Home Judge rules Donald Trump must testify in New York investigation https://www.bbc.co.uk/news/world-us-canada-60425457?at_medium=RSS&at_campaign=KARANGA donald 2022-02-17 21:29:12
ニュース BBC News - Home England 1-1 Canada: Lionesses held to draw in opening game of Arnold Clark Cup https://www.bbc.co.uk/sport/football/60402710?at_medium=RSS&at_campaign=KARANGA arnold 2022-02-17 21:51:42
ニュース BBC News - Home Canada protests: Action 'imminent' police warn Ottawa protesters https://www.bbc.co.uk/news/world-us-canada-60420470?at_medium=RSS&at_campaign=KARANGA access 2022-02-17 21:23:48
ニュース BBC News - Home Tom Daley completes 4-day homecoming challenge for Comic Relief https://www.bbc.co.uk/news/uk-england-devon-60424835?at_medium=RSS&at_campaign=KARANGA plymouth 2022-02-17 21:38:31
ビジネス 東洋経済オンライン 「高級食パン」ブームに異変、消費マインドを分析 「高級食パン指数」からわかる消費の先行き | 若者のための経済学 | 東洋経済オンライン https://toyokeizai.net/articles/-/510613?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2022-02-18 06:30:00
ビジネス 東洋経済オンライン 三菱商事がミャンマーの天然ガス採掘から撤退へ 技術的・経済的理由だが、人権問題も影響か | アジア諸国 | 東洋経済オンライン https://toyokeizai.net/articles/-/512560?utm_source=rss&utm_medium=http&utm_campaign=link_back 三菱商事 2022-02-18 06:10:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 22:08:45 RSSフィード2021-06-17 22:00 分まとめ(2089件)

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

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