Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am spartee on github.
  • I am sparty (https://keybase.io/sparty) on keybase.
  • I have a public key ASAf7ZlJDvnN-DdwyxTjeeBxvtlOgOcc4ufN__1FUE8DtQo

To claim this, I am signing this object:

@Spartee
Spartee / Toml.chpl
Last active July 11, 2017 22:02
An interface for the Toml library written in chapel.
/*
Chapel's Library for `Tom's Obvious, Minimal Language (TOML) <https://github.com/toml-lang/toml>`_.
This module provides support for parsing and writing toml files.
Will list a few example use-cases once interface is finalized.
Node is a placeholder name for the data structure that holds the parsed toml.
Could be named something else more related to toml? e.g. -> tomlTable
*/
module SomeAnimals {
class Animal {
var animalType: string;
}
class Bird: Animal {
proc init(aType: string) {
this.animalType = aType;
}
! This file was written by the model and records the non-default parameters used at run-time.
! === module MOM ===
ENABLE_THERMODYNAMICS = False ! [Boolean] default = True
! If true, Temperature and salinity are used as state
! variables.
ADIABATIC = True ! [Boolean] default = False
! There are no diapycnal mass fluxes if ADIABATIC is
! true. This assumes that KD = KDML = 0.0 and that
! there is no buoyancy forcing, but makes the model
"MOM Experiment"
1 1 1 0 0 0
"ocean_snap_5day", 5,"days", 1,"days", "time"
"ocean_mean_5day", 5,"days", 1,"days", "time"
"ocean_mean_month", 1,"months", 1,"days", "time"
"ocean_mean_annual", 12,"months", 1,"days", "time"
#"prog_%4yr_%3dy", 5,"days",1,"days","Time",365,"days"
#"ave_prog_%4yr_%3dy", 5,"days",1,"days","Time",365,"days"
netcdf ocean_mean_annual {
dimensions:
xh = 44 ;
yh = 40 ;
time = UNLIMITED ; // (0 currently)
nv = 2 ;
zl = 2 ;
xq = 44 ;
yq = 40 ;
variables:
NOTE from PE 0: MPP_DOMAINS_SET_STACK_SIZE: stack size set to 32768.
&MPP_IO_NML
HEADER_BUFFER_VAL= 16384,
GLOBAL_FIELD_ON_ROOT_PE=T,
IO_CLOCKS_ON=F,
SHUFFLE= 0,
DEFLATE_LEVEL= -1,
CF_COMPLIANCE=F,
/
NOTE from PE 0: MPP_IO_SET_STACK_SIZE: stack size set to 131072.
netcdf ocean_mean_month {
dimensions:
xh = 44 ;
yh = 40 ;
time = UNLIMITED ; // (0 currently)
nv = 2 ;
zl = 2 ;
xq = 44 ;
yq = 40 ;
variables:

Internship Prep

To Read

1. Best Practices https://github.com/chapel-lang/chapel/tree/master/doc/rst/developer/bestPractices
   - ContributorInfo.rst - good info for PR's 
   - GitCheatsheet.rst - Git info
  • TestSystem.rst - how to use start_test system(important!)
@Spartee
Spartee / sentence_transformers_ex.py
Created August 11, 2022 19:06
Example of using sentence_transformers
from sentence_transformers import SentenceTransformer
model = SentenceTransformer('sentence-transformers/all-MiniLM-L6-v2')
sentences = [
"That is a very happy Person",
"That is a Happy Dog",
"Today is a sunny day"
]
embeddings = model.encode(sentences)