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
| public class ZTest : ZMonoBehaviour | |
| { | |
| private void _On_zaos_openGalleryVideo() | |
| { | |
| var zActivityCls = new AndroidJavaClass("app.streamstudio.stream.zaos.ZActivity"); | |
| zActivityCls.CallStatic("openGalleryVideo", "mainScript"); | |
| } | |
| public async void openGalleryVideo_Success(string videoPath) | |
| { |
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 os | |
| def rename_files_in_directory(): | |
| for filename in os.listdir('.'): # loop through all the files in the directory | |
| if filename.endswith(".png") and filename.startswith("-"): # check for .png files with the particular pattern | |
| split_name = filename.split('-') # split the filename on the hyphen | |
| if len(split_name) == 3: # check to ensure we have the expected three parts | |
| prefix, old_number, rest = split_name | |
| new_number = str(int(old_number) + 54678).zfill(5) # add 54678 to the old number, convert to string, and pad with zeroes | |
| new_filename = f"{new_number}-{rest}" # assemble the new filename |
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 torch | |
| while True: | |
| print(f"STRESS_START") | |
| a = torch.randn(1024, 1024, dtype=torch.double, device='cuda') | |
| b = torch.randn(1024, 1024, dtype=torch.double, device='cuda') | |
| for i in range(100000): | |
| c = a @ b |
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
| # -*- coding: utf-8 -*- | |
| import cv2 | |
| import gi | |
| import numpy as np | |
| import os | |
| import threading | |
| import time | |
| gi.require_version('GLib', '2.0') | |
| gi.require_version('GObject', '2.0') |
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
| # -*- coding: utf-8 -*- | |
| import maya | |
| import numpy as np | |
| import os | |
| import pandas as pd | |
| import time | |
| from datetime import datetime, timedelta | |
| from enum import Enum, auto |
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
| private val _ps_2_thread_loop = PublishSubject.create<Array<Any>>() | |
| fun _48_2_thread_loop() { | |
| _ps_2_thread_loop | |
| .observeOn(Schedulers.io()) | |
| .map { | |
| val cmd = it[0] as String | |
| when (cmd) { | |
| "cmd0" -> { |
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 Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| var JSON_STR_0 = "{\"method\":\"m0\",\"body\":{\"hello\":\"world\"}}"; ; | |
| var JSON_STR_1 = "{\"method\":\"m1\",\"body\":{\"name\":\"이름\",\"birthYear\":1900}}"; | |
| var jobj = JObject.Parse(JSON_STR_0); | |
| var m = jobj.Value<string>("method"); | |
| var jbody = jobj.GetValue("body"); |
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
| // CoconutNsisPlugin.cpp : Defines the exported functions for the DLL application. | |
| // | |
| #include "stdafx.h" | |
| #include "CoconutNsisPlugin.h" | |
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
| public static void setViewPagerScrollSensitive(ViewPager viewPager, int sensitiveOffset) { | |
| viewPager.setOnTouchListener(new View.OnTouchListener() { | |
| public int _curIdx; | |
| public float _oldX; | |
| public float _oldY; | |
| @Override | |
| public boolean onTouch(View view, MotionEvent motionEvent) { | |
| int action = motionEvent.getAction(); |
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
| private static string _GetPcUniqueKey() | |
| { | |
| if (!string.IsNullOrWhiteSpace(_pcUniqueKey)) | |
| return _pcUniqueKey; | |
| var processorId = ""; | |
| var baseBoardSerialNumber = ""; | |
| var macAddress = ""; |
NewerOlder