Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@hwada
hwada / init.el
Created September 19, 2022 23:41
;; package管理
(eval-and-compile
(when (or load-file-name byte-compile-current-file)
(setq user-emacs-directory
(expand-file-name
(file-name-directory (or load-file-name byte-compile-current-file))))))
(eval-and-compile
(customize-set-variable
'package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
@hwada
hwada / .xyzzy
Created September 9, 2022 00:52
;キーバインド設定
(global-set-key #\Home 'beginning-of-virtual-line)
(global-set-key #\End 'end-of-virtual-line)
(global-set-key #\S-Home 'selection-beginning-of-virtual-line)
(global-set-key #\S-End 'selection-end-of-virtual-line)
(global-set-key #\C-Home 'beginning-of-buffer )
(global-set-key #\C-End 'end-of-buffer)
(global-set-key #\M-Right 'next-buffer)
(global-set-key #\M-Left 'previous-buffer)
#%%
import pandas as pd
df = pd.read_csv('https://www.city.yokohama.lg.jp/city-info/koho-kocho/koho/topics/corona-data.files/141003_yokohama_covid19_patients.csv', encoding='UTF-8')
#%%
import datetime
weeks = [0] * 8
output = []
dates = pd.to_datetime(df['公表日'])
function parseTime(text) {
{
const match = /(\d\d?)時(\d\d?)分/.exec(text);
if (match && match.length === 3) {
return [match[1], match[2]];
}
}
{
const match = /(\d\d?)時/.exec(text);
if (match && match.length === 2) {
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.12.0" />
</ItemGroup>
#coding:utf-8
import csv
from janome.tokenizer import Tokenizer
from wordcloud import WordCloud
from collections import defaultdict
import datetime
exclude_words = [u'これ', u'こと', u'そう', u'それ', u'ところ', u'みたい', u'よう', u'さん',
'http', 'https', 'www', 'to', 'htn', 'co', 'com', 'jp', 'ly', 'tw', 'RT', 'tinyurl', 'Bookmarking']
@hwada
hwada / say.cs
Last active April 17, 2018 14:48
using GoogleCast;
using GoogleCast.Channels;
using GoogleCast.Models.Media;
using System.Linq;
using System.Threading.Tasks;
namespace SayGoogleHome
{
class Program
{
namespace CaptureSaver
{
class Program
{
[STAThread]
static void Main(string[] args)
{
if(args.Length == 0) { return; }
var img = Clipboard.GetImage();
#include "stdafx.h"
#include "gtest/gtest.h"
#pragma comment(lib, "gtestd.lib")
int Factorial(int n) {
int result = 1;
for (int i = 1; i <= n; i++) {
result *= i;
}
public static class StringExtensions
{
public static string Join<T>(this T[] self, string separator)
{
return string.Join(separator, self.Select(x => x.ToString()).ToArray());
}
}