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 | |
| import numpy as np | |
| context = bpy.context | |
| ob = context.object | |
| cursor = context.scene.cursor | |
| vs = [ob.matrix_world @ v.co for v in ob.data.vertices] | |
| vs = [cursor.matrix.inverted() @ v for v in vs] | |
| arr = np.array(vs) |
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
| :%s/\c=?utf-8?B?\([^?]\+\)?=/\=blob2str(base64_decode(submatch(1)))[0]/g |
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
| def collatz_gen(n): | |
| yield n | |
| while n > 1: | |
| if n % 2 == 0: | |
| n = n // 2 | |
| else: | |
| n = n * 3 + 1 | |
| yield n | |
| #print(list(collatz_gen(6)) == [6, 3, 10, 5, 16, 8, 4, 2, 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
| Types: deb deb-src | |
| #URIs: http://jp.archive.ubuntu.com/ubuntu | |
| #URIs: https://ftp.jaist.ac.jp/pub/Linux/ubuntu | |
| URIs: https://ftp.udx.icscoe.jp/Linux/ubuntu | |
| Suites: noble noble-updates noble-backports | |
| Components: main restricted universe multiverse | |
| Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg | |
| Types: deb deb-src | |
| URIs: https://security.ubuntu.com/ubuntu |
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
| [Unit] | |
| Description=Redmine Puma Server | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| User=foo | |
| WorkingDirectory=/home/foo/redmine | |
| Environment=RAILS_RELATIVE_URL_ROOT=/redmine | |
| ExecStart=/usr/bin/bundle exec puma -b tcp://127.0.0.1:3000 -e production -w 3 --preload |
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
| [Unit] | |
| Description=Redmine Unicorn Server | |
| After=network.target | |
| [Service] | |
| Type=simple | |
| User=foo | |
| WorkingDirectory=/home/foo/redmine | |
| ExecStart=/usr/bin/bundle exec unicorn_rails --listen=127.0.0.1:3000 --env=production --path=/redmine | |
| Restart=always |
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
| on run argv | |
| do shell script "~/bin/run-usdview" | |
| end run | |
| on open objects | |
| do shell script "~/bin/run-usdview " & quoted form of POSIX path of (item 1 of objects) | |
| end open |
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
| @echo off | |
| pushd %~dp0 | |
| rem git fetch origin | |
| rem git merge FETCH_HEAD | |
| rem pause | |
| cd src | |
| call .\msvc2022.bat x64 |
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 | |
| context = bpy.context | |
| base_ob = bpy.data.objects['Suzanne1'] # ソフトボディを設定したメッシュ | |
| target_ob = bpy.data.objects['Suzanne2'] # base_obをリンク複製してモディファイアはすべて消したもの | |
| target_ob.vertex_groups.clear() | |
| vg_names = [] | |
| num_vertices = len(target_ob.data.vertices) | |
| for i, v in enumerate(target_ob.data.vertices): |
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
| func add(_ x: Int) -> ((Int) -> Int) { | |
| return { (_ y: Int) -> Int in | |
| return x + y | |
| } | |
| } | |
| add(1)(2) == 3 |
NewerOlder