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 BeautifulSoup import BeautifulSoup | |
body = "<p>Dear Everyone,</p><p>This is a test</p><h1>Test Complete</h1>" | |
plain_text = ' '.join(BeautifulSoup(body).findAll(text=True)) |
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 | |
HOST=対象ホスト名(IPアドレス) | |
USER=ログインユーザ | |
PASS=パスワード | |
TARGET_DIR=バックアップディレクトリ(ファイル) | |
BACKUP_DIR=保存先ディレクトリ | |
expect -c " | |
set timeout -1 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Copyright (c) 2011 Phil Plante <unhappyrobot AT gmail DOT com> | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
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
{ | |
"name": "LEDPatternTest", | |
"description": "Testing WS2801 LED Strip on Intel Edison", | |
"version": "0.0.0", | |
"main": "main.js", | |
"engines": { | |
"node": ">=0.10.0" | |
}, | |
"dependencies": { "mqtt": "^0.3.11" } | |
} |
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
var fs = require('fs'); | |
var filePath = process.argv[2]; | |
var content = null; | |
fs.readFile(filePath, 'utf8', function (err, data) { | |
if (err) { | |
console.log('Error: ' + err); | |
return; | |
} |
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/ruby | |
#require 'csv' | |
require 'axlsx' | |
require 'rexml/document' | |
Component = Struct.new(:item, :ref, :value, :footprint) | |
Order = Struct.new(:item, :value, :footprint, :count) | |
xml_file = File.expand_path(ARGV[0]) |
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
//This is a simple Google Script to fetch the personal balance from the Poloniex website and fill a Google Sheet. | |
//You had to insert you API key and secret where indicated, and use your own Google Sheet address and sheet name. | |
// | |
//If you find this script useful, you can send me a tip on my bitcoin address: 17wzVMssHULq3LcJaESBkiB2cu2L9yCYn1 | |
// | |
function sendHttpPost() { | |
//if you get an error about the nonce number, change it with a greater one as suggested by the debug |
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
// | |
// SysCommand.h | |
// | |
// Created by Brett Renfer on 2/22/12. | |
// | |
#pragma once | |
#include "ofThread.h" | |
class SysCommand : private ofThread |
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 <driver/adc.h> | |
#include <M5Stack.h> | |
const int _bufSize = 128; | |
int _buf[_bufSize]; // adc buffer for suppress speaker noise | |
int _pos = 0; | |
int _old = 0; | |
int _count = 0; | |
int _offset = 0; |
OlderNewer