Skip to content

Instantly share code, notes, and snippets.

@maticzav
maticzav / main.elm
Created July 10, 2016 09:30
Flatten 2D list in Elm
import List exposing (..)
flatten2D : List (List a) -> List a
flatten2D list =
foldr (++) [] list
-- SAMPLE
flatten2D [[1,2],[3,4],[1,1]] == [1,2,3,4,1,1]
@martimatix
martimatix / clock.elm
Last active August 16, 2021 09:25
Elm Subscription Example - Pause and Resume the clock
import Html exposing (Html, p, label, br, input)
import Html.App as Html
import Html.Attributes exposing (checked)
import Html.Events exposing (onCheck)
import Svg exposing (..)
import Svg.Attributes exposing (..)
import Time exposing (Time, second)
main =
@henry40408
henry40408 / README.md
Last active May 2, 2022 03:41
How to resolve ld: framework not found Pods_Runner?

How to resolve ld: framework not found Pods_Runner?

Environment

  • MacOS Big Sur (11.1)
  • Flutter 1.22.5 / Dart 2.10.4
  • Xcode Version 12.3 (12C33)
  • Cocoapods 1.10.1

Problem

localeIdentifier Description
eu Basque
hr_BA Croatian (Bosnia & Herzegovina)
en_CM English (Cameroon)
en_BI English (Burundi)
en_AE English (United Arab Emirates)
rw_RW Kinyarwanda (Rwanda)
ast Asturian
en_SZ English (Eswatini)
he_IL Hebrew (Israel)
@lydell
lydell / .gitignore
Last active December 28, 2022 04:33
Minify Elm code
node_modules
@mathandy
mathandy / determine-if-svg-path-is-contained-in-other-path-example.py
Created December 10, 2016 04:07
An example of how to determine if an SVG Path is contained in another SVG Path in Python.
"""
An example of how to determine if an svg path is contained in another
svg path in Python.
Note: for discontinuous paths you can use the svgpathtools
Path.continuous_subpaths() method to split a paths into a list of its
continuous subpaths.
"""
from svgpathtools import *
@stakira
stakira / tc_zhangyong1979.txt
Created December 12, 2017 01:09
常用國字標準字體表
常用國字標準字體表 (4808字)
一丁七三下丈上丑丐不丙世丕且丘丞丟並丫中串丸凡丹主乃久么之尹乍乏乎乒乓
乖乘乙九也乞乩乳乾亂了予事二于云井互五亙些亞亟亡交亦亥亨享京亭亮人仁什
仃仆仇仍今介仄以付仔仕他仗代令仙仞仿伉伙伊伕伍伐休伏仲件任仰仳份企位住
佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣作你伯低伶余佝佯依侍佳使佬供例來侃佰
併侈佩佻侖佾侏信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞倌倍倣俯倦倥俸
倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉偺偽停假偃偌做偉健偶偎
偕偵側偷偏倏傢傍傅備傑傀傖傘傭債傲傳僅傾催傷傻傯僧僮僥僖僭僚僕像僑僱億
儀僻僵價儂儈儉儒儘儔儐優償儡儲儷儼兀元允充兄光兇兆先兌克免兔兒兕兗兜兢
@lotem
lotem / default.custom.yaml
Last active January 25, 2024 08:47
在Rime輸入方案選單中添加五筆、雙拼、粵拼、注音,保留你需要的
# default.custom.yaml
# save it to:
# ~/.config/ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
patch:
schema_list:
- schema: luna_pinyin # 朙月拼音
- schema: luna_pinyin_simp # 朙月拼音 简化字模式
@nurdabolatov
nurdabolatov / parallel-processing-large-file-in-python.py
Created May 8, 2021 20:30
Parallel processing large file in Python
# Source: https://nurdabolatov.com/parallel-processing-large-file-in-python
import multiprocessing as mp
import time
import os
def process_line(line):
# Count frequency for every character
counter = {}
| 名称 | Unicode | 符号 |
| ---- | ------- | ---- |
| 间隔号 | 00B7\U+FF0E | ·\. |
| 连接号 | 2013 | – |
| 破折号 | 2014 | —— |
| 引号 | 2018\2019 | ‘’ |
| 引号 | 201C\201D | “” |
| 省略号 | 2026 | …… |
| 顿号 | 3001 | 、 |
| 句号 | 3002 | 。 |