Skip to content

Instantly share code, notes, and snippets.

View buddypia's full-sized avatar

Buddypia buddypia

View GitHub Profile
@buddypia
buddypia / url_summary.ipynb
Created December 4, 2023 08:21
url_summary.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@buddypia
buddypia / langchain_search.ipynb
Created December 4, 2023 06:15
langchain_search.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@buddypia
buddypia / text_summary.ipynb
Created December 4, 2023 05:29
text_summary.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@buddypia
buddypia / uniqlo_mask.py
Created December 8, 2021 05:02
Uniqloでエアリズムマスクが購入可能かどうかチェックするスクリプト(Mac用、購入可能通知)
import urllib.request #ライブラリをインポートします
from bs4 import BeautifulSoup
import threading
import os
class UniqloMask:
"""
Uniqloエアリズムマスクの購入ボタン監視のスクレイピングクラス
"""
def __init__(self, url):
@buddypia
buddypia / test.js
Created November 13, 2021 04:26
JSONのプロパティを再帰的にnullに初期化する関数
const json = JSON.parse('{"id":"vhUfi3t31goA","string":"root","number":1,"arrayString":["string1","string2"],"arrayNumber":[1,2],"object":{"childId":"boihF33gS3","childString":"child","childNumber":1,"childArrayString":["child_string1","child_string2"],"childArrayNumber":[1,2]}}');
SetNullRecursiveAllProperties(json);
function SetNullRecursiveAllProperties(obj) {
for (var property in obj) {
if (obj.hasOwnProperty(property) && typeof obj[property] === 'object') {
SetNullRecursiveAllProperties(obj[property]);
}
else if (obj.hasOwnProperty(property)) {
@buddypia
buddypia / main.dart
Created November 10, 2021 04:10
SliverAppBarのVariation2
// https://stackoverflow.com/questions/63231817/custom-flexiblespacebar-widget/63407374#63407374
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(MyApp());
}
@buddypia
buddypia / main.dart
Created November 10, 2021 04:09
SliverAppBarのVariation1
// https://stackoverflow.com/questions/50909791/flutter-change-text-when-flexiblespacebar-is-collapsed/63407889#63407889
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
void main() {
runApp(MyApp());
}
@buddypia
buddypia / distributive.py
Created November 9, 2020 04:52
분배법칙
import sys
result_str = ''
for val1 in sys.argv[1].split():
for val2 in sys.argv[2].split():
result_str += val1 + '*' + val2
result_str += '+'
if result_str[-1] == '+':
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
<% if content_for?(:title) %><%= yield(:title) %> | <%= Settings.service_name %>
<% else %><%= Settings.service_name %>
<% end %></title>
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" charset="UTF-8">
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',