static spinlock_t spinlock;
spin_lock_init(&spinlock);
spin_lock(&spinlock);
...
spin_unlock(&spinlock);
This file contains hidden or 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
| # from dataclass import KindleSSConfig, read_config | |
| # from wxdialog import SimpleDialog, Icon | |
| # from WindowInfo import * | |
| from typing import TypeVar | |
| import dataclasses | |
| import configparser | |
| import os.path as osp | |
| # | |
| # dataclass.py |
This file contains hidden or 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 python3 | |
| # -*- coding: utf-8 -*- | |
| import sys, os, struct, glob | |
| from argparse import ArgumentParser | |
| def main(args): | |
| # search files | |
| set_owp = set() | |
| for file_owp in args.files_owp: |
This file contains hidden or 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/perl | |
| use strict; | |
| use warnings; | |
| use autodie; | |
| use Encode qw(encode decode); | |
| use LWP::Simple; | |
| use File::Spec; | |
| use Time::HiRes; | |
| use Term::ReadKey; |
This file contains hidden or 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/perl | |
| # | |
| # 【概要】 | |
| # 画像ダウンロードスクリプト | |
| # http://www.bobx.com/dark/lovepop.html | |
| use strict; | |
| use warnings; | |
| use autodie; | |
| use utf8; |
This file contains hidden or 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
| import sys | |
| import os | |
| import requests | |
| from time import sleep | |
| from random import random | |
| def download(url, to_path='.'): | |
| print('download: %s ... ' % url, end='') | |
| file_name = os.path.join(to_path, url.split('/')[-1]) | |
| if os.path.isfile(file_name) and os.path.getsize(file_name) > 0: |