Python <-> c++ interface example for multidimensional arrays
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
declare module "obsidian" { | |
interface App { | |
isMobile: boolean; | |
} | |
} | |
// Call this method inside your plugin's `onLoad` function | |
function monkeyPatchConsole(plugin: Plugin) { | |
if (!plugin.app.isMobile) { | |
return; |
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
// SPDX-License-Identifier: MIT | |
// | |
// An async JavaScript Scrypt implementation using Web Cryptography APIs for PBKDF2 | |
// | |
// Copyright © 2014-2018 cryptocoinjs (original implementation) | |
// Copyright © 2016 Richard Moore (asyncronous version) | |
// Copyright © 2019-2022 Ryan Castellucci (WebCrypto version) | |
// | |
// See also: | |
// https://github.com/cryptocoinjs/scryptsy |
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
[General] | |
loglevel = notify | |
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0:0:0/1, ::ffff:128:0:0:0/1 | |
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12 | |
# dns-server = 119.29.29.29,223.5.5.5,114.114.115.115 | |
# external-controller-access = [email protected]:6155 | |
# ipv6 = true | |
// REMEMBER TO CHANGE THE external-controller-access' PASSWORD |
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 graphlab as gl | |
import math | |
import random | |
train = gl.SFrame.read_csv('data/train.csv') | |
test = gl.SFrame.read_csv('data/test.csv') | |
del train['id'] | |
def make_submission(m, test, filename): | |
preds = m.predict_topk(test, output_type='probability', k=9) |
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
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
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
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with | |
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This | |
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise. | |
var gulp = require('gulp'), | |
spawn = require('child_process').spawn, | |
node; | |
/** | |
* $ gulp server | |
* description: launch the server. If there's a server already running, kill it. |
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
#weasel.custom.yaml | |
patch: | |
"preset_color_schemes/Solarized_Lite": | |
author: "五磅兔 [email protected], based on Aben's 曬經石\solarized_Rock, original artwork by ethanschoonover‘s solarized" | |
back_color: 0xe3f6fd #底色 | |
border_color: 0xd5e8ee #边框色 | |
candidate_text_color: 0x837b65 #候选项颜色 | |
comment_text_color: 0xd28b26 #编码提示颜色 | |
hilited_back_color: 0xd5e8ee #编码底色 | |
hilited_candidate_back_color: 0x98a12a #首选项高亮背景色 |
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
# luna_pinyin.custom.yaml | |
# 修改字典名爲 luna_pinyin.kunki | |
# 其對應的用戶詞典名取句點之前部分即 luna_pinyin | |
patch: | |
translator/dictionary: luna_pinyin.kunki |
NewerOlder