python |
Pythonタグが付けられた新着投稿 - Qiita |
CmdStanPyがColab上でも動いてほしい |
https://qiita.com/yaminabeworks/items/c96bc4b9172b1a24c293
|
https |
2022-06-18 19:55:57 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
時系列データ解析でよく使うsliding windowをつくってみた。 |
https://qiita.com/Omaam/items/378b713dccbe71a1ff39
|
短時間フーリエ変換 |
2022-06-18 19:06:21 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
CSharp使いがJavaScriptへ乗り換えるためのクイックガイド |
https://qiita.com/TomK/items/c60e5d1572b1db44f25f
|
csharp |
2022-06-18 19:47:04 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
JavaScriptの学習ログ |
https://qiita.com/a_jengineer/items/b11b76bb4cc9e358af70
|
htmlcssjavascript |
2022-06-18 19:24:47 |
海外TECH |
MakeUseOf |
How to Update to the Latest Raspberry Pi OS |
https://www.makeuseof.com/tag/raspberry-pi-update-raspbian-os/
|
raspberry |
2022-06-18 10:30:14 |
海外TECH |
DEV Community |
GNU/Linux üzerinde Microsoft fontlarının kullanımı |
https://dev.to/aciklab/gnulinux-uzerinde-microsoft-fontlarinin-kullanimi-16ic
|
GNU Linux üzerinde Microsoft fontlarının kullanımıÖzellikle arayüz sistemlerinde GNU Linux dağıtımlarındaki en önemli sorun muhtemelen ofis belgelerinde kayma ve taşma sorunlarıolarak görülebilir Bunun bir nedeni Microsoft Office ve diğer Ofis uygulamalarıolduğu kadar sistemde yer almayan fontlardan dolayıfont değişimi sonrasındaki kaymalar olarak düşünebiliriz Oysa ki Microsoft un çoğu fontunun kullanımıiçin bir problem bulunmamaktadır Fakat tabi ki fontlar tamamen özgür lisanslarla lisanslanmadığıiçin detaylıkullanım için lisans sözleşmesini okumak gerekmektedir Microsoft TrueType core fontlarıÖzellikle Microsoft sistemlerde çok kullanılan fontlar Microsoft tarafından yılında “Core fonts for the Web projesi olarak Web üzerinden kullanılabilmesine yönelik kullanıma başlanmıştır Tabi ki bu proje özgür lisanslarla değil sahipli fontlara sahip Ayrıca Microsoft bu projesini yılında lisans şartlarıyla ilgili problemlerden dolayıkapatmış Sahipli lisanslara sahip bu fontlar aşağıdaki gibi listelenebilir Andale MonoArial BlackArial Bold Italic Bold Italic Comic Sans MS Bold Courier New Bold Italic Bold Italic Georgia Bold Italic Bold Italic ImpactTimes New Roman Bold Italic Bold Italic Trebuchet Bold Italic Bold Italic Verdana Bold Italic Bold Italic Webdings ttf mscorefonts installer paketiGNU Linux sistemlerde ki özellikle Debian tabanlısistemlerde bu fontların indirilebilmesini sağlayan bir paket ttf mscorefonts installer olarak isimlendirilmektedir Bu paketin içerisinde yukarıda bahsedilen fontların internet üzerinden indirilmesini sağlayan bir betik bulunmaktadır Dolayısıyla internet erişimi olmayan bir ortamda paket çalışmamaktadır Bu fontlar exe olarak sourceforge sitesinde bir repo altında bulunmakta fakat indirildikten sonra TTF formatına çevrilmekte ve sonrasında işletim sistemi üzerindeki usr share fonts truetype msttcorefonts klasörüne taşınmaktadır Font özgürlüğüÖzellikle Times New Roman Arial ve Courier fontlarıiçin özgür çeşitleri yapılmıştır Bunun için fonts liberation isimli paket kullanılmaktadır İsimlendirme olarak “Liberation ismiyle ve Mono Sans ve Serif tiplerini barındırmaktadır |
2022-06-18 10:21:11 |
海外TECH |
DEV Community |
DSA: Sorting like a boss with JS |
https://dev.to/ale3oula/dsa-sorting-like-a-boss-with-js-42om
|
DSA Sorting like a boss with JSOne of the most common operations in programming is sorting a collection Generally this is a costly operation for most algorithms as sorting has the notion of comparing every element with each other We will see which algorithms overcome this with divide and conquer techniques and how the simpler linear sorting algorithms are implemented We will also discuss the complexity of each algorithm Table of ContentsBubble SortSelection SortInsertion SortMerge SortQuick SortOther sorting algorithms Bubble Sort Bubble sort is a very simply sorting algorithm This algorithm doesn t have particular use cases other than have an introduction to the sorting algorithms for education purposes Bubble Sort algorithm loops through an array and compares two adjacent elements Depending a condition we determine if we require to switch the elements In this way it is bubbling up the maximum value to the end of the array For each pair we compare if the first element is greater than the second then the two elements are swapped Otherwise we continue with the next pair of elements PseudocodeLook at each adjacent pair If two adjacent elements are not in order Swap them and set swap counter to falsy value Time complexityBubble sort is not an ideal sorting algorithm From the pseudocode we see that we have to compare pairs This leads us to think we will have one nested loop A nested loop makes our time complexity O n² In the best case scenario the array is already sorted With a small optimisation in the algorithm we can reach a best case of O n if the array is already sorted Implementationconst bubbleSort arr gt if arr return for let i i lt arr length i for let j j lt arr length i j if arr j gt arr j const temp arr j arr j arr j arr j temp return arr Optimizationconst bubbleSort arr gt let swapped for let i i lt arr length i swapped false for let j j lt arr length i j if arr j gt arr j const temp arr j arr j arr j arr j temp swapped true if swapped false break return arr Selection Sort One more algorithm that is used for educational purposes is Selection sort The selection sort algorithm sorts an array by repeatedly finding the minimum element or maximum depending the order from the unsorted part and putting it at the beginning In every iteration the minimum or maximum element from the unsorted subarray is picked and moved to the sorted subarray PseudocodeRepeat in the unsorted array Search the unsorted data to find the smallest value Swap the smallest value with the first unsorted element Time ComplexityThis search algorithm compares elements in an array to the first element When it finds the smaller of the two elements it swaps it to the first position The algorithm repeats this pattern until the array is sorted We can see again that we will need two nested loops to achieve that as we require comparison of pairs That makes our complexity O n² Implementationconst selectionSort arr gt for let i i lt arr length i let min i for let j i j lt arr length j if arr min gt arr j min j if arr min lt arr i let temp arr i arr i arr min arr min temp return arr Insertion Sort Insertion sort is a sorting algorithm that works similar to how you sort playing cards in your hands Weird eh The array is virtually split into a sorted and an unsorted part Values from the unsorted part are picked and placed at the correct position in the sorted part Insertion sort is efficient for small data values or almost sorted arrays The algorithm is simple We iterate through the array we pick an element from the unsorted part and we insert it to the correct place PseudocodeThe first element of the array is sorted Repeat to the unsorted part of the array Find the position of the next unsorted item Insert into the sorted position by shifting elements Time complexityIn worst case the array is sorted with the opposite order And we have to compare and insert in the appropriate position all the elements That will be a O n² Implementationconst insertionSort arr gt for let i i lt arr length i if arr i lt arr arr unshift arr splice i else for let j j lt i j if arr i gt arr j amp amp arr i lt arr j arr splice j arr splice i return arr Merge Sort Merge sort is using the divide and conquer technique We will have a mergeSort function that partitions the array and a merge function that merge the partitions The main algorithm of merge sort divides the input array into two halves and calls itself with the two halves This recursion continues until we reach granular components that are sorted Then we proceed with merging these individual pieces into one result array Pseudocode•Find the mid element of the array mid Math floor array length •Splice the array in left and right parts•Call merge sort on left mid •Call merge sort on mid right •Continue until left is less than right•Then call merge function to perform a merge of the arrays Time ComplexityMerge sort is a complicated algorithm Dividing the algorithm into halves gives us a great time complexity of O nlogn We need an auxiliary result array and this results in a space complexity of O n Implementationconst mergeSort arr gt if arr length return arr const middle Math floor arr length const left arr slice middle const right arr slice middle return merge mergeSort left mergeSort right const merge left right gt let arr Break out of loop if any one of the array gets empty while left length amp amp right length if left lt right arr push left shift else arr push right shift return arr left right Quick Sort QuickSort is a Divide and Conquer sorting algorithm It s much faster than linear sorting algorithms Quick sort is a comparison sorting algorithm meaning that the sorting occurs by iterating through the array and comparing two defined values to a pivot This pivot determines how to partition the collection We have different ways to pick the pivot value and this can affect the complexity of the algorithm PseudocodeWhile the collection is unsorted Pick a pivot Partition the array All values smaller than pivot to the left and larger to the right Perform pivot and partition on the left and the right partition Time complexityThe performance of this algorithm heavily depends on the pivot If you always choose the first element as a pivot and we have an already sorted array the quicksort will try to sort it Choosing the first element as a pivot will make the call stack really long This worst case can reach a complexity of O n² The average case though with a performant pivot is O nlogn const quickSort arr low high gt if low lt high const pi partition arr low high quickSort arr low pi quickSort arr pi high return arr const partition arr low high gt const pivot arr high let i low for let j low j lt high j If current element is smaller than the pivot if arr j lt pivot i swap arr i j swap arr i high return i const swap arr i j gt let temp arr i arr i arr j arr j temp Other sorting algorithms Other famous sorting algorithms are Heap SortHeap sort is a comparison based sorting technique based on Binary Heap data structure It is similar to selection sort algorithm where we first find the minimum element and place it at the beginning We repeat the same process for the remaining elements Time complexity O N log N Counting SortCounting sort is a sorting technique based on keys between a specific range It works by counting the number of objects that are having distinct key values Then do arithmetic to calculate the position of each object in the output sequence Time complexity O n Radix SortThe idea of Radix Sort is to do digit by digit sort starting from least significant digit to most significant digit Radix sort uses counting sort as a subroutine to sort Bucket SortBucket sort is mainly useful when input is uniformly distributed over a range For example when we want to sort a large set of floating point numbers which are in range from to and are uniformly distributed across the range |
2022-06-18 10:06:17 |
海外TECH |
Engadget |
Lawmakers ask Google to stop steering people seeking abortion to anti-abortion sites |
https://www.engadget.com/lawmakers-google-anti-abortion-sites-104344695.html?src=rss
|
Lawmakers ask Google to stop steering people seeking abortion to anti abortion sitesA group of Democratic lawmakers led by Sen Mark Warner D Va and Rep Elissa Slotkin is urging Google to quot crack down on manipulative search results quot that lead people seeking abortions to anti abortion clinics In a letter addressed to Alphabet CEO Sundar Pichai the lawmakers reference a study conducted by US nonprofit group Center for Countering Digital Hate CCDH The organization found that in Google search results for queries such as quot abortion clinics near me quot and quot abortion pill quot ーspecifically in states with trigger laws that would ban the procedure the moment Roe v Wade is overturned ーpoints to crisis pregnancy centers that oppose abortion instead quot Directing women towards fake clinics that traffic in misinformation and don t provide comprehensive health services is dangerous to women s health and undermines the integrity of Google s search results quot the lawmakers wrote CCDH also found that percent of results on Google Maps for the same search terms lead people to anti abortion clinics The lawmakers argue in the letter that Google should not be displaying those results for users searching for abortion and that if the company s search results must continue showing them they should at least be properly labeled In addition CCDH found that percent of ads displayed at the top of Google search results are for crisis pregnancy centers Google added a disclaimer for those ads quot albeit one that appears in small font and is easily missed quot the lawmakers note after getting flak for them a few years ago quot The prevalence of these misleading ads marks what appears to be a concerning reversal from Google s pledge in to take down ads from crisis pregnancy centers that engage in overt deception of women seeking out abortion information online quot the letter reads Warner Slotkin and the letter s other signees are asking Google what it plans to do to limit the appearance of anti abortion clinics when users are explicitly searching for abortion services And if Google chooses not to take action to prevent them from appearing in results the group is asking whether Google would add user friendly disclaimers clarifying whether the clinic is or isn t providing abortion services You can read the whole letter below NEW RepSlotkin and I are leading a group of lawmakers to push on the Google CEO to crack down on manipulative search results that lead to scammy “crisis pregnancy centers It s time for them to limit or label results and ads that lead to fake abortion clinics pic twitter com LlkTueIQPーMark Warner MarkWarner June A Supreme Court draft obtained by Politico in May showed that SCOTUS justices have voted to reverse Roe v Wade the landmark case that protected the federal rights to abortion across the country Senator Ron Wyden and other Democratic lawmakers also previously asked Google to stop collecting and keeping users location data They said the information could be used against people who ve had or are seeking abortions in states with trigger laws nbsp |
2022-06-18 10:43:44 |
海外ニュース |
Japan Times latest articles |
Bitcoin falls below $20,000 for the first time since 2020 |
https://www.japantimes.co.jp/news/2022/06/18/business/tech/bitcoin-cryptocurrencies-fall-20000/
|
Bitcoin falls below for the first time since A toxic mix of bad news cycles and higher interest rates has been deleterious to riskier assets like crypto contributing to a roughly slide |
2022-06-18 19:04:31 |
海外ニュース |
Japan Times latest articles |
Olympic ace Yoshinobu Yamamoto throws season’s fourth no-hitter |
https://www.japantimes.co.jp/sports/2022/06/18/baseball/japanese-baseball/yoshinobu-yamamoto-no-hitter-orix-buffaloes/
|
japanese |
2022-06-18 19:10:33 |
ニュース |
BBC News - Home |
Migrants: Some due for removal from the UK could be electronically tagged |
https://www.bbc.co.uk/news/uk-61849433?at_medium=RSS&at_campaign=KARANGA
|
rwanda |
2022-06-18 10:36:19 |
ニュース |
BBC News - Home |
US Open: Rory McIlroy 'excited to be in the mix' entering final two rounds |
https://www.bbc.co.uk/sport/golf/61851271?at_medium=RSS&at_campaign=KARANGA
|
US Open Rory McIlroy x excited to be in the mix x entering final two roundsNorthern Ireland s Rory McIlroy believes he is in a good position to challenge over the final two rounds of the US Open |
2022-06-18 10:27:34 |
ニュース |
BBC News - Home |
Katherine Brunt: England bowler retires from Test cricket |
https://www.bbc.co.uk/sport/cricket/61852031?at_medium=RSS&at_campaign=KARANGA
|
white |
2022-06-18 10:42:31 |
サブカルネタ |
ラーブロ |
大阪牛肉ラーメン わだ 南海難波本店@難波 |
http://ra-blog.net/modules/rssc/single_feed.php?fid=200228
|
twitter |
2022-06-18 11:05:24 |
コメント
コメントを投稿