Discover gists
This file contains 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
#!/usr/bin/python | |
#-*-coding:utf-8 -*- | |
# E-HentaiのページURLをもとにギャラリー画像を取得するスクリプト | |
# パッケージのインポート | |
import os | |
import sys | |
import re | |
import urllib2 |
This file contains 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
{ | |
"messages": [ | |
{ | |
"content": "You are an advanced, reliable, candid AI system that takes user search queries, converts them into questions, and answers them, using specific facts and details sourced from webpages to prove your answer. You admit when you're unsure or don't know, and you never make a statement without providing a fact or instance to back it up. You answer questions directly and clearly, then provide more detail later. You follow the JSON schema exactly.", | |
"role": "system" | |
}, | |
{ | |
"content": "# CONTEXT\nCurrent date: #{DATE_TIME}.\n\nHere are result from a web search for '#{QUERY}':\nBEGIN WEB PAGE #{HOST_1} #{MARKDOWN_1}END WEB PAGE\nBEGIN WEB PAGE #{HOST_2} #{MARKDOWN_2}END WEB PAGE\nBEGIN WEB PAGE #{HOST_3} #{MARKDOWN_3}END WEB PAGE\nBEGIN WEB PAGE #{HOST_4} #{MARKDOWN_4}END WEB PAGE\nBEGIN WEB PAGE #{HOST_5} #{MARKDOWN_5}END WEB PAGE\nBEGIN WEB PAGE #{HOST_6} #{MARKDOWN_6}END WEB PAGE", | |
"role": "system" | |
}, |
This file contains 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
// build all: $ zig build | |
// clean up: $ zig build dist-clean | |
const builtin = @import("builtin"); // list-up the content with `zig builtin` command | |
const Builder = @import("std").build.Builder; | |
//NOTE: this build code is for zig-0.4.0, maybe incompatible with zig >= 0.5 | |
pub fn build(b: *Builder) void { | |
{ //[case: WebAssembly wasm] build fft.wasm | |
const wasmStep = b.step("fft.wasm", "build fft.wasm"); | |
const wasm = b.addExecutable("fft.wasm", "fft.zig"); |
This file contains 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
package dev.abd3lraouf.learn.myapplication | |
import android.os.Bundle | |
import androidx.activity.ComponentActivity | |
import androidx.activity.compose.setContent | |
import androidx.activity.enableEdgeToEdge | |
import androidx.compose.foundation.layout.Column | |
import androidx.compose.foundation.layout.ExperimentalLayoutApi | |
import androidx.compose.foundation.layout.WindowInsets | |
import androidx.compose.foundation.layout.fillMaxSize |
This file contains 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
#!/usr/bin/env zsh | |
# Note: | |
# CMake, Clang, clang-format, Ninja, git and sed are required to build | |
# | |
# Note that currently there is a bug (https://github.com/google/binexport/issues/117) | |
# that requires applying this patch, remove when resolved | |
# | |
if [ -d ~/Downloads ] |
This file contains 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
#!/usr/bin/env python3 | |
import sys | |
import json | |
import os | |
def find_account_inclusion_object(eligibles, eth_address): | |
for account in eligibles: | |
if account["identity"].lower() == eth_address.lower(): | |
return account | |
return None |
We can't make this file beautiful and searchable because it's too large.
This file contains 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
13911.1 swader | |
13911.1 sorpaas | |
13911.1 s1na | |
13911.1 rjl493456442 | |
13911.1 qd-qd | |
13911.1 protolambda | |
13911.1 paulrberg | |
13911.1 noahzinsmeister | |
13911.1 neurone |
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
- Follow standard conventions.
- Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
- Boy scout rule. Leave the campground cleaner than you found it.
- Always find root cause. Always look for the root cause of a problem.
NewerOlder