Below are simplified examples of how you might apply digital watermarking in any ML models (open source or proprietary) using PyTorch (though the general concepts apply to TensorFlow or any other framework). Each example is kept intentionally small to illustrate the idea without overwhelming detail.
import com.google.auth.oauth2.GoogleCredentials; | |
import com.google.cloud.storage.Blob; | |
import com.google.cloud.storage.Bucket; | |
import com.google.firebase.FirebaseApp; | |
import com.google.firebase.FirebaseOptions; | |
import com.google.firebase.cloud.StorageClient; | |
import lombok.Data; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.context.event.ApplicationReadyEvent; | |
import org.springframework.boot.context.properties.ConfigurationProperties; |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
[Rust] is a novel systems programming language, designed for writing and maintaining large-scale, ultra-reliable software in the domains where typically only C and C++ are appropriate. It is the only production programming language in the world that is memory safe - meaning Rust software does not segfault - but does not have a garbage collector or rely on reference counting, and that makes it suitable for writing all kinds of software. It is also arguably the fastest programming language in the world. And with a focus on developer
/** | |
* Fancy ID generator that creates 20-character string identifiers with the following properties: | |
* | |
* 1. They're based on timestamp so that they sort *after* any existing ids. | |
* 2. They contain 72-bits of random data after the timestamp so that IDs won't collide with other clients' IDs. | |
* 3. They sort *lexicographically* (so the timestamp is converted to characters that will sort properly). | |
* 4. They're monotonically increasing. Even if you generate more than one in the same timestamp, the | |
* latter ones will sort after the former ones. We do this by using the previous random bits | |
* but "incrementing" them by 1 (only in the case of a timestamp collision). | |
*/ |
import UIKit | |
extension UIImage { | |
// colorize image with given tint color | |
// this is similar to Photoshop's "Color" layer blend mode | |
// this is perfect for non-greyscale source images, and images that have both highlights and shadows that should be preserved | |
// white will stay white and black will stay black as the lightness of the image is preserved | |
func tint(tintColor: UIColor) -> UIImage { | |
Most active GitHub users (git.io/top)
The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Sun, 17 Mar 2013 12:08:02 GMT till Mon, 17 Mar 2014 12:08:02 GMT.
Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:
githubUsers
.filter((user) -> user.followers > 251)
alert = (s) -> console.log s | |
createResult = (state, symbol, direction) -> | |
nextState: state | |
writeSymbol: symbol | |
moveTo: direction | |
toString: () -> [this.nextState, this.writeSymbol, this.moveTo].join ", " | |
createRule = (state, symbol, result) -> | |
inState: state |
alert = (s) -> console.log s | |
createResult = (state, symbol, direction) -> | |
nextState: state | |
writeSymbol: symbol | |
moveTo: direction | |
toString: () -> [this.nextState, this.writeSymbol, this.moveTo].join ", " | |
createRule = (state, symbol, result) -> | |
inState: state |