Skip to content

Instantly share code, notes, and snippets.

import cv2
import os
import pydicom
inputdir = './train/'
outdir = './png/'
#os.mkdir(outdir)
test_list = [ f for f in os.listdir(inputdir)]
let window;
let iframe;
window = () {
iframe.postMessage({
// process
parent.postMessage({})
});
}
@paladin3895
paladin3895 / eyewiki.crawler.py
Last active April 11, 2020 08:39
eyewiki.crawler.py
import scrapy
import re
class Crawler(scrapy.Spider):
name = 'crawler'
start_urls = ['https://eyewiki.org/Main_Page']
base_url = 'https://eyewiki.org/'
def parse(self, response):
SET_SELECTOR = '.CategoryTreeSection'
@paladin3895
paladin3895 / vietnamese-telex_utf-8.vim
Created December 12, 2019 03:10 — forked from tungd/vietnamese-telex_utf-8.vim
Vietnamese TELEX keymap for vim
" Vim Keymap file for vietnamese through the Telex method
" Maintainer: Tung Dao <[email protected]>
" Last Change: 30 Aug 2011
scriptencoding utf-8
let b:keymap_name = "vietnamese"
loadkeymap
a a
### Keybase proof
I hereby claim:
* I am paladin3895 on github.
* I am duydatyds (https://keybase.io/duydatyds) on keybase.
* I have a public key ASAvADmwax_Bhuo8vYZgnE1OUHIy8iNZM0Pj4w95V_I8uwo
To claim this, I am signing this object:
@paladin3895
paladin3895 / doi2bib.py
Created July 4, 2017 03:02 — forked from jrsmith3/doi2bib.py
Python method to access crossref.org DOI bibtex metadata resolver
import requests
def doi2bib(doi):
"""
Return a bibTeX string of metadata for a given DOI.
"""
url = "http://dx.doi.org/" + doi
headers = {"accept": "application/x-bibtex"}
@paladin3895
paladin3895 / part1.md
Created October 18, 2016 04:53 — forked from smschauhan/part1.md
rCharts - demo

rCharts in rCloud

This is a demo of using rCharts along with rCloud. It requires installation of rCharts >= 0.4.2 and the latest version of rCloud.

Our first step is to load rCharts and set the appropriate options so that the charts are rendered as inline iframes.

library(rCharts)
options(
process.stdin.resume();
process.stdin.setEncoding('utf8');
var input_stdin = "";
var input_stdin_array = "";
var input_currentline = 0;
process.stdin.on('data', function (data) {
input_stdin += data;
});