Skip to content

Instantly share code, notes, and snippets.

View takuya's full-sized avatar

takuya@mori takuya

  • Osaka City Univ
  • Osaka,Japan
View GitHub Profile
@takuya
takuya / nhk_news_web_video.py
Last active October 1, 2021 02:25
nhk がiframe をnoscriptに入れちゃったので対応
#!/usr/bin/env python
#
from lxml import html
from urllib.request import urlopen
from urllib.request import Request
from urllib.parse import urlparse
from urllib.parse import urljoin
import re, json, os, shlex, argparse, subprocess
<html>
<head>
<script src="https://unpkg.com/vue"></script>
<style media="screen">
.done{
text-decoration: line-through;
}
</style>
</head>
<body>
##
require 'selenium'
require 'selenium-webdriver'
require 'pry'
class Selenium::WebDriver::Driver
#!/usr/bin/env osascript -l JavaScript
ObjC.import('stdlib')
ObjC.import('Cocoa')
function create_note_attachment( file_path ){
nsStr = $.NSString.alloc.initWithUTF8String(file_path);
name = nsStr.lastPathComponent.UTF8String;
file_path = nsStr.stringByStandardizingPath.UTF8String;
#!/usr/bin/env python
import urllib,urllib.request
import lxml.html
from io import StringIO, BytesIO
import json
import re
import subprocess
import os
import tempfile
This file has been truncated, but you can view the full file.
html = ''
html +='<dl>';
html +='<dt> 10%</dt><dd><audio controls src="data:audio/mp4;base64,AAAAGGZ0eXBNNEEgAAACAGlzb21pc28yAAAACGZyZWUAAm31bWRhdN4EAABsaWJmYWFjIDEuMjgAAEIAkyAEMgBHIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAIQBJkAIZACOAISBNaAIZACOAIUz+//xVqXZkubLlS5TSoJfsAAAAAHFdmLuP9z9fJKRboQAAAECRNbG3IJWQv/XHV5yA9U+iZfcvb+5ftv8V5nzYHdPSPB879U/AfPu6/vfwwI/AfvHN9R/KPEeB8pq+egAABhQAYuBsxc02bBFN1pFBXpd+ubj3L0YtjRGlQAM5h5nqffMeBj+b+5/Mvc/+z8Z8Ft9L8WAB2nVcvS/d4f7/uOP7v3OH3v4+l/X1WhltAAAAAAAAAAAALMPDFluxK4gfS9dHDE9mpu0J7hcexlVTmKe4weWQAAGOURN/C6/flfEro5U8DP77idHr/x/Q0+P1enzAAAK7OhLlWN+78vLPv6emfV/w/P+E9vwnnGwAAgBAD4gDzAO1AepAPtqU5k2ZNp0mi+5UnsAAAAAZBp+nWx+PxwvHUEhhAAAAAA/N/HDhA8KHhA8IEIvzv0f0H0X6I/z/y38uAB+R/D9n8T/3PiAvP+////v/tf3vbfwAAB3oA/IfhfkPwv9/+QAAAAABSgCecopH+AAAAAAAB+Pd4KkBwpwDRnOv9n3Du/5YAB8a/73dP/VAAAAAAAAAoANB7frCkicdgAAAAAAAAAAAdV5OF0m1SYKy
"""
Django settings for defautl_login project.
Generated by 'django-admin startproject' using Django 1.10.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
<?php
$cnt = 10000;
$st = microtime(true);
foreach( range(0,$cnt) as $idx ){
$list = range(0,1000);
foreach ( $list as $i=> $e ) {
$e = strtotime("+$e day");
<?php
$cnt = 10000;
$st = microtime(true);
Match   Introduces a conditional block.  If all of the criteria on the Match line are satisfied, the key‐
         words on the following lines override those set in the global section of the config file, until
         either another Match line or the end of the file.  If a keyword appears in multiple Match blocks
         that are satisified, only the first instance of the keyword is applied.

         The arguments to Match are one or more criteria-pattern pairs or the single token All which matches
         all criteria.  The available criteria are User, Group, Host, LocalAddress, LocalPort, and Address.
         The match patterns may consist of single entries or comma-separated lists and may use the wildcard
         and negation operators described in the PATTERNS section of ssh_config(5).