Skip to content

Instantly share code, notes, and snippets.

View keitaoouchi's full-sized avatar

Keita Oouchi keitaoouchi

  • kakaku.com
  • Tokyo
View GitHub Profile
@sawadyrr5
sawadyrr5 / gist:8933663e9cd1232468ac37b8d02bed14
Created March 26, 2020 14:00
UFOキャッチャーからXBRLをダウンロード&パースするクラスを作った

この記事について

Pythonでファンダメンタル投資のデータを集められないものかと思い, 調べてみたらUFOキャッチャーからXBRLをダウンロードしていろいろやっている記事がいくつか見つかりましたが, どれもスクラッチで面倒そうだなぁと思ったのでXBRLをサクッと取得&解析できるモジュールを作ってみました. 作ってみたばかりなのでおかしいところがあればご連絡いただけるとうれしいです.

1. インストール

Gitリポジトリからインストールします.

sawadyrr5/UfoDataReader

@niwatako
niwatako / CodePiece.txt
Created June 19, 2018 11:57
会社休むために実装するSiri shortcuts #roppongiswift #CodePiece
### @yoyokkTT 会社休むために実装するSiri shortcuts
YahooでWWDC前夜祭の動画を取ってホテルで編集してExtendedに送りました。
プログラミングに限らずなにか作るのが好きでMaker Faire Tokyo出たりしています。
WWDC2018でのSiriの進化と、ショートカットのNSUserActivityやIntentでの実装を紹介したいです。
30ページ以上あるので何らかの方法で共有できればと思います。
Siriから直接アプリを呼ぶことが可能になりました。
shortcutアプリも追加される。
@gpeal
gpeal / SimpleDemo.kt
Last active August 28, 2018 17:54
Airbnb MvRx Early Look
data class SimpleDemoState(val listing: Async<Listing> = Uninitialized)
class SimpleDemoViewModel(override val initialState: SimpleDemoState) : MvRxViewModel<SimpleDemoState>() {
init {
fetchListing()
}
private fun fetchListing() {
// This automatically fires off a request and maps its response to Async<Listing>
// which is a sealed class and can be: Unitialized, Loading, Success, and Fail.
name download_total
AFNetworking 61983241
Fabric 50998892
Crashlytics 49667729
SDWebImage 45471101
Alamofire 42097177
CocoaLumberjack 36071914
Bolts 35294870
FirebaseInstanceID 30277793
FirebaseAnalytics 30254593
@shunirr
shunirr / criminal_jc.md
Last active September 23, 2024 07:46
女子中学生チケット詐欺事件

criminal_jc

@rokugasenpai
rokugasenpai / how_to_download_streaming_jp.md
Last active December 17, 2023 09:50
各ストリーミング配信のダウンロード方法(要curl・ffmpeg・rtmpdump・chrome・limechat・wireshark)

ツイキャス

@andymatuschak
andymatuschak / States-v3.md
Last active November 14, 2024 18:33
A composable pattern for pure state machines with effects (draft v3)

A composable pattern for pure state machines with effects

State machines are everywhere in interactive systems, but they're rarely defined clearly and explicitly. Given some big blob of code including implicit state machines, which transitions are possible and under what conditions? What effects take place on what transitions?

There are existing design patterns for state machines, but all the patterns I've seen complect side effects with the structure of the state machine itself. Instances of these patterns are difficult to test without mocking, and they end up with more dependencies. Worse, the classic patterns compose poorly: hierarchical state machines are typically not straightforward extensions. The functional programming world has solutions, but they don't transpose neatly enough to be broadly usable in mainstream languages.

Here I present a composable pattern for pure state machiness with effects,

@AliSoftware
AliSoftware / Coordinator.swift
Last active July 10, 2022 14:32
Coordinators & StateMachine - Concept
struct Coordinator {
let window: UIWindow
let navCtrl: UINavigationController?
func start() {
presentWelcomeScreen()
}
private func presentWelcomeScreen() {
let vc = WelcomeScreenViewController() // Instanciate from code, XIB, Storyboard, whatever your jam is
@ktx2207
ktx2207 / Git_ファイルの履歴を完全に削除する.md
Last active February 17, 2024 05:32
Git ファイルの履歴を完全に削除する

Git ファイルの履歴を完全に削除する

秘密鍵など誤ってコミットしてしまった場合に履歴を完全に削除する手順
参考:6.4 Git のさまざまなツール - 歴史の書き換え

動作確認用にブランチを作成して試す

$ git checkout -b clean-key-file

動作確認用にブランチでgit filter-branchを実行

@nicklockwood
nicklockwood / Hacking UIView Animation Blocks.md
Last active August 24, 2024 17:08
This article was originally written for objc.io issue 12, but didn't make the cut. It was intended to be read in the context of the other articles, so if you aren't familiar with concepts such as CALayer property animations and the role of actionForKey:, read the articles in that issue first.

Hacking UIView animation blocks for fun and profit

In this article, I'm going to explore a way that we can create views that implement custom Core Animation property animations in a natural way.

As we know, layers in iOS come in two flavours: Backing layers and hosted layers. The only difference between them is that the view acts as the layer delegate for its backing layer, but not for any hosted sublayers.

In order to implement the UIView transactional animation blocks, UIView disables all animations by default and then re-enables them individually as required. It does this using the actionForLayer:forKey: method.

Somewhat strangely, UIView doesn't enable animations for every property that CALayer does by default. A notable example is the layer.contents property, which is animatable by default for a hosted layer, but cannot be animated using a UIView animation block.