This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- a/pt3_dma.c | |
+++ b/pt3_dma.c | |
@@ -428,7 +428,11 @@ | |
page = &dma->ts_info[i]; | |
page->size = PAGE_BLOCK_SIZE; | |
page->data_pos = 0; | |
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0) | |
page->data = pci_alloc_consistent(hwdev, page->size, &page->addr); | |
+#else | |
+ page->data = dma_alloc_coherent(&hwdev->dev, page->size, &page->addr, GFP_KERNEL); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
putStrLn $ show $ map (let fizzBuzz x | 0 == (x `mod` 3) && 0 == (x `mod` 5) = "FizzBuzz" | 0 == (x `mod` 3) = "Fizz" | 0 == (x `mod` 5) = "Buzz" | otherwise = show x in fizzBuzz) [1..100] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import socket | |
import sys | |
def main(): | |
if len(sys.argv) != 2: | |
exit() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import urllib | |
import sys | |
def main(site): | |
url = 'http://api.b.st-hatena.com/entry.count?' | |
count = urllib.urlopen(url + 'url=' + site).read() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import tweepy | |
import argparse | |
def get_oauth(): | |
consumer_key = '11hvAz4jGF7ZDSfeDcg' | |
consumer_secret = 'Q69OTwBdmeTJlaakG9DXx762WYYNgr5V0H2eSocmkM' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import urllib | |
import sys | |
def emotion(keyword): | |
url = 'http://mueki.net/twana/api.php' | |
params = urllib.urlencode({'q':keyword}) | |
response = urllib.urlopen(url, params).read() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import tweepy | |
import sys | |
def get_oauth(): | |
consumer_key = '' | |
consumer_secret = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import sys | |
import os | |
import BeautifulSoup | |
import urllib | |
def search(url): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import tweepy | |
import sys | |
def get_oauth(): | |
consumer_key = '' | |
consumer_secret = '' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import tweepy | |
import sys | |
def get_oauth(): | |
consumer_key = '' | |
consumer_secret = '' |