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
| import bpy | |
| for obj in bpy.context.scene.objects: | |
| if obj.type == 'ARMATURE': | |
| for bone in obj.data.bones: | |
| bonename = bone.name | |
| if bonename[0] == 'l' and bonename[1].isupper(): | |
| newname = 'L_' + bonename[1:] | |
| print(newname) | |
| bone.name = newname |
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
| logMsg :: Text -> Text -> IO (Rs EntriesWrite) | |
| logMsg logId msg = do | |
| -- ~~~~~ | |
| -- 省略 | |
| -- ~~~~~ | |
| let | |
| entry = logEntry & leTextPayload ?~ msg | |
| ?~ Info -- Network.Google.Logging - LogEntrySeverity -- https://hackage.haskell.org/package/gogol-logging/docs/Network-Google-Logging.html#t:LogEntrySeverity |
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
| import Swifter | |
| let server = HttpServer() | |
| let bundle = Bundle.main | |
| server.GET["/:file"] = { request in | |
| print("request: " + request.path) | |
| let path = NSString.init(string: request.path) | |
| let pathBundle = bundle.path(forResource: path.deletingPathExtension, ofType: path.pathExtension) | |
| if pathBundle == nil { |
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
| import System.IO | |
| import qualified Control.Exception as E | |
| import qualified Data.Text as T | |
| import qualified Data.Text.IO as T | |
| readFileT :: FilePath -> IO T.Text | |
| readFileT fname = do | |
| sjis <- mkTextEncoding "CP932" | |
| readFile' utf8_bom `E.catches` [readTE sjis] | |
| where |
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
| module Imgen | |
| ( Color (..) | |
| , save | |
| ) where | |
| import qualified Data.Vector as V | |
| import Data.Word (Word8) | |
| import Data.ByteString (ByteString) | |
| import Data.ByteString as BS | |
| import Data.Char (ord) |
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
| import SDL | |
| import SDL.Raw.Types (Rect(..)) | |
| import Linear (V4(..)) | |
| import Control.Monad (unless) | |
| import qualified Data.Text as T | |
| main :: IO () | |
| main = do | |
| initializeAll |
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
| #include <SDL.h> | |
| #include <stdio.h> | |
| int main(int argc, char *argv[]) | |
| { | |
| SDL_version compiled; | |
| SDL_VERSION(&compiled); | |
| printf("version: %d.%d.%d\n", compiled.major, compiled.minor, compiled.patch); | |
| const int width = 200; |