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
!pip install llama-index |
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
from dateutil.parser import parse | |
from bs4 import BeautifulSoup | |
BLOG_TITLE = <ブログ名> | |
EXPORTED = <エクスポートファイル名> | |
class MtArticle(): | |
def __init__(self): | |
self.title = None | |
self.date = None |
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
remove control = Super_L | |
keycode 37 = Mode_switch | |
keycode 31 = i I Up Up | |
keycode 44 = j J Left Left | |
keycode 45 = k K Down Down | |
keycode 46 = l L Right Right⏎ |
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
#! /bin/bash | |
for file in toconvert/* | |
do | |
filename=`pwd`/$file | |
basename=`echo $filename | sed 's/.*toconvert\/\(.*\)\.[^\.]*$/\1/'` | |
targetname=`pwd`/converted/$basename'.mp4' | |
ffmpeg -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -i $filename -loglevel error -c:v h264_vaapi $targetname -y | |
done | |
echo 'done' |
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
#! /bin/bash | |
mkdir ~/tmp | |
cd ~/tmp | |
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz | |
tar -xvf yasm-1.3.0.tar.gz | |
cd yasm-1.3.0/ | |
make && sudo make install | |
cd ~/tmp |
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
#include <stdio.h> | |
#include <string> | |
#include <eosiolib/eosio.hpp> | |
#include <eosiolib/crypto.h> | |
using namespace eosio; | |
class Hashtest : public contract { | |
public: |
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
pragma solidity ^0.4.23; | |
import "github.com/oraclize/ethereum-api/oraclizeAPI.sol"; | |
contract OracleTest is usingOraclize { | |
bool public isTrue; | |
event NewOraclizeQuery(string _description); | |
event NewOracleResultCount(bool _isTrue); |
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
const wait = true; | |
const success = false; | |
const promise2 = new Promise((res, rej) => { | |
if (success) { | |
setTimeout(res, 1000, 2) | |
} else { | |
rej(3) | |
} | |
}); |
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
import sys | |
from lark import Lark, Transformer | |
class Calculator(Transformer): | |
def addition(self, items): | |
return items[0] + items[1] | |
def substraction(self, items): | |
return items[0] - items[1] |
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
require 'json' | |
module Middlewares | |
class Mentekun | |
CONFIG = { | |
users: { | |
read: [ | |
{ methods: [:get], path: '/api/users' }, | |
{ methods: [:get], path: %r{/api/users/\d+} }, |
NewerOlder