This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Gist ID | |
| GIST_ID="${FARMER_WAS_REPLACED_GIST_ID}" | |
| # Save0 ใใฃใฌใฏใใชใฎใใน | |
| SAVE_DIR="/Users/${USER}/Library/Application Support/com.TheFarmerWasReplaced.TheFarmerWasReplaced/Saves/Save0" | |
| cd "$SAVE_DIR" || exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class A | |
| def initialize | |
| @tmp = 1 | |
| end | |
| def to_s | |
| "#{@tmp}" | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- BigQueryใฎSQL | |
| WITH moj_surface1 AS ( | |
| SELECT * | |
| FROM unnest([ | |
| STRUCT('202404' AS var,'43443-3300-22.zip' AS `filename`,'F000000001' AS surface_id,'C000000199' AS curve_id,50 AS num), | |
| ('202404','43443-3300-22.zip','F000000001','C000000200',51), | |
| ('202404','43443-3300-22.zip','F000000001','C000000201',52), | |
| ('202404','43443-3300-22.zip','F000000001','C000000202',53), | |
| ('202404','43443-3300-22.zip','F000000001','C000000203',54), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from contextlib import contextmanager | |
| @contextmanager | |
| def hoge(): | |
| try: | |
| print("start") | |
| yield "Hello, " | |
| finally: | |
| print("end") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aaaa=['ใใใใใใใใใใใใใใใใใใใใใใใใใใใ','ใใใใใใใใใใใใใใใใใใใใใใใใใใใ','ใใใใใใใใใใใใใใใใใใใใใใใใใใใ','ใใใใใใใใใใใใใใใใใใใใใใใใใใใ','ใใใใใใใใใใใใใใใใใใใใใใใใใใใ','ใใใใใใใใใใใใใใใใใใใใใใใใใใใ','ใใใใใใใใใใใใใใใใใใใใใใใใใใใ','ใใใใใใใใใใใใใใใใใใใใใใใใใใใ','ใใใใใใใใใใใใใใใใใใใใใใใใใใใ','ใใใใใใใใใใใใใใใใใใใใใใใใใใใ','ใใใใใใใใใใใใใใใใใใใใใใใใใใใ','ใใใใใใใใใใใใใใใใใใใใใใใใใใใ','ใใใใใใใใใใใใใใใใใใใใใใใใใใใ','ใใใใใใใใใใใใใใใใใใใใใใใใใใใ'] | |
| print(aaaa) | |
| #=> SyntaxError: Non-UTF-8 code starting with '\xe3' in file /Users/yancya/piyo.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="ja"> | |
| <head> | |
| <title>ใซใฌใผใฎใฌใทใ</title> | |
| </head> | |
| <body> | |
| <article> | |
| <h1>ใซใฌใผใฎใฌใทใ</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WITH teams AS ( | |
| SELECT 1 AS id | |
| , 'yancya-club' AS name) | |
| , members AS ( | |
| SELECT 1 AS id | |
| , 'yancya' AS name | |
| , 1 AS team_id) | |
| SELECT * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| WITH a AS ( | |
| SELECT 1 AS n UNION SELECT 2 AS n | |
| ), b AS ( | |
| SELECT 2 AS n UNION SELECT 3 AS n | |
| ), t AS ( | |
| SELECT a.n AS n, b.n AS b_n, COUNT(b.n) OVER() AS b_count | |
| FROM a LEFT OUTER JOIN b USING(n) | |
| ) | |
| SELECT n | |
| FROM t |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TEMP FUNCTION safe_check(queens ARRAY<STRUCT<x INT64, y INT64>>) RETURNS BOOLEAN AS (( | |
| SELECT COUNT(x) = COUNT(DISTINCT x) AND | |
| COUNT(y) = COUNT(DISTINCT y) AND | |
| COUNT(x+y) = COUNT(DISTINCT x+y) AND | |
| COUNT(x-y) = COUNT(DISTINCT x-y) | |
| FROM UNNEST(queens) | |
| )); | |
| CREATE TEMP FUNCTION print_queen(x INT64) RETURNS STRING AS ( | |
| (SELECT COALESCE(STRING_AGG('.', ''), '') FROM UNNEST(GENERATE_ARRAY(1, x-1))) || |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Key = ['a','b','c'] | |
| type Value = [string, number, boolean] | |
| type Obj = {a: string, b: number, c: boolean}; | |
| const keys: Key = ['a','b','c']; | |
| const values: Value = ['a', 1, true]; | |
| const object: Obj = keys.reduce((acc, key, index) => { | |
| acc[key] = values[index]; | |
| return acc; | |
| }, {}) as Obj; |
NewerOlder