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
// Place your key bindings in this file to override the defaultsauto[] | |
[ | |
{ | |
"key": "ctrl+k", | |
"command": "git.stage", | |
"when": "workbench.scm.active" | |
}, | |
{ | |
"key": "ctrl+j", | |
"command": "git.unstage", |
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 mitmproxy import http | |
SCRIPT = ''' | |
<script> | |
const constraints = { | |
audio: false, | |
video: { | |
width: 150, | |
height: 300, | |
facingMode: "environment" |
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
require 'json' | |
results = {} | |
ActiveRecord::Base.connection.tables.each do |table_name| | |
klass = table_name.classify.safe_constantize | |
next unless klass | |
results[table_name] = {} |
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 ortoolpy import set_partition | |
import itertools | |
import sys | |
import random | |
LOW_LIMIT = 5000 | |
LOW_LIMIT2 = 3000 | |
FILE_NAME = 'data.txt' | |
def calc_weight(combination): |
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
require 'nokogiri' | |
require 'open-uri' | |
base_url = 'https://amaten.jp/exhibitions/past_gifts?page=%s&type=amazon' | |
last_line = 0; | |
current_line = 0; | |
page = 1; | |
loop do |
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
use strict; | |
use warnings; | |
use Test::More; | |
use Data::Dumper; | |
use Capture::Tiny qw/ capture /; | |
subtest script1 => sub { | |
io_test('script1.pl', "<abc> <xyz>\nhoge<abc>piyo<xyz>", "piyo\n"); | |
io_test('script1.pl', "<abc> <ijk>\n<abc>xxxx<ijk>yyyyyy<abc>zzz<ijk>", "xxxx\nzzz\n"); |
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; | |
my $input = $ARGV[0]; | |
# temporary | |
# TODO 切り取る |