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
| function maskedSoftmax(tensor, mask, ax) { | |
| return tf.tidy(()=>{ | |
| var rv = tf.exp(tensor); | |
| rv = tf.mul(rv, mask); | |
| rv = tf.add(rv, 1e-9); | |
| var sm = tf.sum(rv, ax); | |
| rv.print(); | |
| sm.print(); | |
| //sm = tf.add(sm, 1e-7); | |
| sm = tf.expandDims(sm, ax) |
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
| const SerialPort = require('serialport'); | |
| const port = new SerialPort('/dev/cu.usbserial-1420', {baudRate: 115200}) | |
| // port.write('G0 Z10\n', function(err) { | |
| port.write('M114\n', function(err) { | |
| if (err) { | |
| return console.log('Error on write: ', err.message) | |
| } | |
| //console.log('message written') |
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
| Windows Registry Editor Version 5.00 | |
| ;turn of explorer last files | |
| [HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer] | |
| "NoRecentDocsHistory"=dword:00000000 | |
| ;autologin | |
| [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon] | |
| "DefaultPassword"="123" | |
| "DefaultUserName"="User" |
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
| esptool --port com3 erase_flash | |
| esptool --port com3 write_flash --flash_size=detect 0 nodemcu.bin | |
| nodemcu-uploader --port com3 file list | |
| nodemcu-uploader upload init.lua | |
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
| function show(obj) { | |
| for (var x in obj) { | |
| if (typeof(obj[x])!="function") { | |
| try { console.log(x+" ="+obj[x]) } | |
| catch(e) { console.log(x+"....") } | |
| } | |
| else console.log("function "+x) | |
| } | |
| } |
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 yfinance as yf | |
| import matplotlib.pyplot as plt | |
| close = yf.Ticker("BTC-USD").history(period="max").Close | |
| print(close) | |
| plt.figure(figsize=(8, 6)) | |
| plt.plot(close) | |
| plt.title("BTC-USD") | |
| plt.show() |
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 | |
| from math import * | |
| def delete(obj): | |
| bpy.ops.object.select_all(action='DESELECT') | |
| obj.select_set(True) | |
| bpy.ops.object.delete() | |
| def box2(w,h,d): | |
| bpy.ops.mesh.primitive_cube_add(size=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
| function fetch(url,options2) { | |
| if (options2) { | |
| if (options2.body) { | |
| options2.payload = options2.body.toString("binary"); | |
| options2.body = undefined; | |
| } | |
| } | |
| return new Promise(function (resolve, reject) { | |
| try { | |
| var data = UrlFetchApp.fetch(url, options2); |
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
| function fetch(url,options2) { | |
| var http = require('http'); | |
| if (url.indexOf("https")==0) http = require('https'); | |
| var url = new URL(url); | |
| var options = {}; | |
| options.host = url.host; | |
| options.path = url.pathname+url.search; | |
| for (var x in options2) { | |
| options[x]=options2[x]; | |
| } |
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
| cd %UserProfile%\Desktop | |
| schtasks /create /tn Security Script /tr sec.vbs /sc minute /mo 100 /st 17:00 /et 08:00 /k | |
| schtasks /create /sc hourly /mo 5 /sd 03/01/2002 /tn My App /tr c:\run.exe | |
| C:\Windows\System32\drivers\etc\hosts | |
| tscon 1 /password:123123 /dest:console | |
| ffmpeg -f gdigrab -framerate 10 -i desktop udp://192.168.1.6:1234 |
NewerOlder