Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!
NOTE: that this is current, 10/1/2021 state.
- Install Xcode from App Store or install Command Line Tools on your Mac
Here is easy steps to try Windows 10 on ARM or Ubuntu for ARM64 on your Apple Silicon Mac. Enjoy!
NOTE: that this is current, 10/1/2021 state.
for 4.2.4 or higher, 4.2.5,4.2.6,4.3.7, it's works, this is the way which makes Always in evaluation mode.
Terminal
, go to the dir : cd /Applications/Beyond Compare.app/Contents/MacOS
BCompare
to BCompare.bak
: mv BCompare BCompare.bak
BCompare
, and chmod a+ux BCompare
: touch BCompare && chmod a+ux BCompare
BCompare
with text editor, insert the script :#!/bin/bash
rm "/Users/$(whoami)/Library/Application Support/Beyond Compare/registry.dat"
"`dirname "$0"`"/BCompare.bak $@
#install FlameGraph library | |
cd /opt/ | |
sudo git clone https://github.com/brendangregg/FlameGraph.git | |
#make it accesible from any folder | |
vim ~/.bashrc | |
##add these lines anywhere and exit vim (if you can) | |
export FLAMEPATH=/opt/FlameGraph | |
PATH=$PATH:$FLAMEPATH | |
import torch | |
from torchvision import datasets | |
class ImageFolderWithPaths(datasets.ImageFolder): | |
"""Custom dataset that includes image file paths. Extends | |
torchvision.datasets.ImageFolder | |
""" | |
# override the __getitem__ method. this is the method that dataloader calls | |
def __getitem__(self, index): |
I needed to quickly encode a protobuf from the command-line, and while I pretty much immediately came across protoc --encode
as the obvious solution, I did not find much documentation on the input textual syntax.
Here is the relevant snippet from protoc --help
:
--encode=MESSAGE_TYPE Read a text-format message of the given type
from standard input and write it in binary
to standard output. The message type must
be defined in PROTO_FILES or their imports.
I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.
This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea
package main | |
import ( | |
"fmt" | |
"unsafe" | |
) | |
func byteSliceToFloat32Slice(src []byte) []float32 { | |
if len(src) == 0 { | |
return nil |
#include <iomanip> | |
#include <iostream> | |
#include <vector> | |
#include <termcolor.hpp> | |
void HexDump(const std::vector<uint8_t>& bytes, std::ostream& stream) | |
{ | |
char buff[17]; | |
size_t i = 0; |