Skip to content

Instantly share code, notes, and snippets.

View chck's full-sized avatar
🏠
Working from home

chck chck

🏠
Working from home
View GitHub Profile
@gabe565
gabe565 / change-arc-icon.md
Last active July 4, 2024 12:31
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon on macOS.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy
@eileen-code4fun
eileen-code4fun / cifar10_hpt.yaml
Last active February 18, 2023 00:15
CIFAR10 HPT Config
studySpec:
metrics:
# Correspond to the metrics we use the hypertune library to report.
- metricId: val_accuracy
goal: MAXIMIZE
parameters:
# Correspond to the command line argument our Python code expects.
- parameterId: dropout_rate
doubleValueSpec:
minValue: 0.01
@lantrix
lantrix / brew-downgrade.sh
Last active May 10, 2023 08:04
Install an older version with Brew as @ Jan 2021
# remove latest
brew uninstall terraform
# create a local tap for old version - The brew tap-new <org>/<repo> does not have to be an actual repo.
brew tap-new lantrix/an-older-terraform
#extract old version forumla
brew extract --version 0.13.5 terraform lantrix/an-older-terraform
# Install old formula
@satetsu888
satetsu888 / modify.py
Created November 28, 2020 14:00
ポケモンシールホルダーキャンペーン用の工作
from mitmproxy import http
SCRIPT = '''
<script>
const constraints = {
audio: false,
video: {
width: 150,
height: 300,
facingMode: "environment"
@mceachen
mceachen / LICENSE.md
Created October 28, 2019 05:53
TypeScript implementation of Optional/Some/None

MIT License

Copyright (c) 2016-2019 Matthew McEachen

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:

@mpppk
mpppk / clean_architecture.md
Last active July 2, 2024 01:58
クリーンアーキテクチャ完全に理解した

2020/5/31追記: 自分用のメモに書いていたつもりだったのですが、たくさんのスターを頂けてとても嬉しいです。
と同時に、書きかけで中途半端な状態のドキュメントをご覧いただくことになっており、大変心苦しく思っています。

このドキュメントを完成させるために、今後以下のような更新を予定しています。

  • TODO部分を埋める
  • 書籍を基にした理論・原則パートと、実装例パートを分割
    • 現在は4層のレイヤそれぞれごとに原則の確認→実装時の課題リスト→実装例という構成ですが、同じリポジトリへの言及箇所がバラバラになってしまう問題がありました。更新後は、実装時の課題リストを全て洗い出した後にまとめて実装を確認する構成とする予定です。

2021/1/22追記:

@vikramsoni2
vikramsoni2 / parallel_bars_progress_apply.py
Created April 9, 2019 23:58
tqdm progress_apply on multiprocessing, showing parallel progress bars.
import numpy as np
import pandas as pd
from multiprocessing import cpu_count, Pool, current_process
from functools import partial
from tqdm import tqdm
def split_df_by_group(_df, entity, chunks):
df_split=[]
entities = _df[entity].unique()
for i in range(chunks): df_split.append(_df[_df[entity].isin(entities[i::chunks])].copy())
@chezou
chezou / backspace_stats_2.ipynb
Created January 28, 2019 15:36
backspace_stats_2.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

AVAからJestへの移行

大枠の書き方

テストケースの定義

AVAのtest('コメント', () => {/* テスト内容 */});という書き方(xUnit形式)はJestでも可能です。AVAではimport test from 'ava';という感じでtest関数をインポートしていましたが、Jestではグローバル変数として定義されているのでインポートは不要です。test関数だけでなく、Jestが提供するAPIは全てグローバル変数で定義されているので、importせずに参照できます。

@mizchi
mizchi / predict-frontend.md
Last active May 12, 2023 03:43
React のユーザーから見た今後のフロントエンドの予想

この記事は議論のたたき台で、ポジショントークや、偏見にまみれています。

今のフロントエンドの分類

  • 古典的なサーバーサイド WAF への +α の味付け
  • 大規模なクライアントアプリケーション管理のための SPA
  • SEO / SSR を考慮した Node ヘヴィーな環境

他、提唱されてるパターン