Skip to content

Instantly share code, notes, and snippets.

View keizer619's full-sized avatar

Tharik Kanaka keizer619

View GitHub Profile
@keizer619
keizer619 / hello_world.bal
Created August 17, 2023 08:45
Let's write the Hello World program in Ballerina. To run this sample, place the source code in a file named hello_world.bal and use the bal run command.
import ballerina/io;
public function main() {
io:println("Hello, World!");
}
@keizer619
keizer619 / sample.json
Created March 24, 2022 16:38
Sample student json
{"_id":0,"name":"aimee Zank","scores":[{"score":1.463179736705023,"type":"exam"},{"score":11.78273309957772,"type":"quiz"},{"score":35.8740349954354,"type":"homework"}]}
{"_id":1,"name":"Aurelia Menendez","scores":[{"score":60.06045071030959,"type":"exam"},{"score":52.79790691903873,"type":"quiz"},{"score":71.76133439165544,"type":"homework"}]}
{"_id":2,"name":"Corliss Zuk","scores":[{"score":67.03077096065002,"type":"exam"},{"score":6.301851677835235,"type":"quiz"},{"score":66.28344683278382,"type":"homework"}]}
{"_id":3,"name":"Bao Ziglar","scores":[{"score":71.64343899778332,"type":"exam"},{"score":24.80221293650313,"type":"quiz"},{"score":42.26147058804812,"type":"homework"}]}
{"_id":4,"name":"Zachary Langlais","scores":[{"score":78.68385091304332,"type":"exam"},{"score":90.2963101368042,"type":"quiz"},{"score":34.41620148042529,"type":"homework"}]}
{"_id":5,"name":"Wilburn Spiess","scores":[{"score":44.87186330181261,"type":"exam"},{"score":25.72395114668016,"type":"quiz"},{"score":63.42288310628662,"typ
{
"legends": [
{
"fill": "color",
"title": "Legend",
"offset": 0,
"properties": {
"symbols": {
"fillOpacity": {"value": 0.5},
"stroke": {"value": "transparent"}
{
"width": 500,
"height": 200,
"padding": {"top": 10, "left": 30, "bottom": 30, "right": 10},
"data": [
{
"name": "table",
"values": [
{"x": 1, "y": 28, "z" : 13}, {"x": 2, "y": 55, "z" : 21},
{"x": 3, "y": 43, "z" : 52}, {"x": 4, "y": 91, "z" : 12}
{
"width": 400,
"height": 200,
"padding": {"top": 10, "left": 30, "bottom": 20, "right": 10},
"data": [
{
"name": "table",
"values": [
{"category":"A", "amount":28},