I hereby claim:
- I am jasmarc on github.
- I am jmarcell (https://keybase.io/jmarcell) on keybase.
- I have a public key ASCgnjrWJQ9JMOa89ZBcmLLlCdeGWpj_fJgR4AQQVToiLwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#! /usr/bin/env ruby | |
# 1. Save this file as "make_webpages.command" | |
# 2. chmod a+x+r make_webpages.command | |
# 3. Place make_webpages.command in folder full of pictures | |
# 4. Double-click make_webpages.command | |
extensions = "png,PNG,jpg,JPG,gif" | |
working_dir = File.dirname($0) | |
pictures = Dir.glob("#{working_dir}/*.{#{extensions}}") |
entries = Entry.all :limit => 20, :abstractText.not => nil | |
corpus = Lda::Corpus.new | |
entries.each do |entry| | |
doc = Lda::TextDocument.new(corpus, entry.abstractText) | |
corpus.add_document(doc) | |
end | |
lda = Lda::Lda.new(corpus) # create an Lda object for training | |
lda.em("random") # run EM algorithm using random starting points |
require 'rubygems' | |
require 'datamapper' | |
require 'pp' | |
class Author | |
include DataMapper::Resource | |
property :id, Serial | |
property :name, String | |
has n, :entries, :through => Resource | |
has n, :friendships, :child_key => [ :source_id ] |
using Put.Usings.Here; | |
namespace Your.Namespace.Here | |
{ | |
public class CommonPolicyDeclarationWrapper : BaseWrapper | |
{ | |
private CommonPolicyDeclaration _commonPolicyDeclaration; | |
internal CommonPolicyDeclarationWrapper(CommonPolicyDeclaration commonPolicyDeclaration) | |
{ | |
_commonPolicyDeclaration = commonPolicyDeclaration; |
using Put.Usings.Here; | |
namespace Your.Namespace.Here | |
{ | |
public class CommonPolicyDeclaration | |
{ | |
public string Description { get; set; } | |
public int StatusCode { get; set; } | |
} | |
} |
require 'yaml' | |
class String | |
def to_camel | |
parts = self.scan(/[A-Z]*[a-z]*/) | |
parts.first.downcase! | |
parts.join | |
end | |
end |
require 'yaml' | |
def top(clazz) | |
<<EOF | |
using Put.Usings.Here; | |
namespace Your.Namespace.Here | |
{ | |
public class #{clazz} | |
{ |
CommonPolicyDeclaration: | |
Description: string | |
StatusCode: int | |
# PolicyForm | |
PolicyForm: | |
PolicyFormId: int | |
Document: RuleBasedDoc | |
FieldValues: IList<FieldValue> |