A decentralized insurance system where all users can receive payments instantly after a cyclone strikes without having to contact centralized companies and obtain confirmation of funds directly into your wallet.
Team Members
Hritwik Tripathi (LIT2019012)
Vineet Kumar (LIT2019032)
Mayank Verma (LIT2019038)
Gautam Patodi (LIT2019019)
Vaibhav Ekka (LCS2019030)
Technology Stack:
Frontend: ReactJs
Oracle: ChainLink
Login: Metamask/Portis
Smart Contracts Framework: Hardhat
Premium Streaming: SuperFluid
Deployment: Görli/Goerli Testnet(Ethereum)
API development: Express and Nodejs
What we Provide:
Apply for insurance against cyclones and hurricanes through our app using your permanent location.
Connect your MetaMask/ Portis wallet to our site
The Chainlink oracles connected to the OpenWeatherAPI fetch the climate conditions of your permanent location and decide the premium amount
SuperFluid starts streaming premium amount to us from your wallet
To opt out, you can stop the stream
Chainlink Alarm Clock schedules weekly checks to check if you are eligible for a payout
Chainlink oracles fetch the current weather conditions for each active user
A fixed amount in DAI is paid to the users eligible.
Run(Steps)
Clone this repository
cd frontend
Install dependencies: yarn install
Run the React app: npm start
Just make sure you are connected to Görli/Goerli Testnet
An embedded web server and web framework for the Leola Programming Language.
Why should you use this?
You probably shouldn’t. There are more robust and feature complete web frameworks out there (Flask, Rails, etc.). If you still feel like using leola-web, please read on. I believe there are some cool features that make developing web sites and/or REST API’s relatively painless and dare I say fun.
Create a WebApp that allows you to bind HTTP request URL’s (i.e., Routes) to functions.
require("lib/web","web")// path to the leola-web.jarvarapp=web:newWebApp({/* The directory in which this application is installed, more percisely, where the application should look for the CSS, JS and HTML files */resourceBase->"./",/* The application context of the REST calls, i.e., http://localhost/[context]/ */context->"api",/* The port that this server will use */
port ->8121,/* Listen for file edits, and reload the application (should only be enabled for development) */
autoReload ->true,})
Binding Routes
All leola-web really does is start an embedded web server (Jetty) and allows you to bind a Leola function to HTTP requests (i.e, a Route). There are two things to consider when binding a Route, 1) the URL path 2) the method type it accepts.
app.route({path->"/api/echo",methods->["GET"]},def(context){// this Route expects a parameter of 'message'varmessage=context.param("message")returnweb:ok().json({echo-> message
})})app.route({path->"/api/{team}/roster",methods->["GET"]},def(context){// use the path parameters from the request, as an example: // GET http://localhost:8121/api/GreenBayPackers/rostervarteam=context.pathParam("team")ifteam=="GreenBayPackers"{returnweb:ok().json({roster->[{name->"Brett Favre",position->"QB"},{name->"Donald Driver",position->"WR"}]})}else{returnweb:notAcceptable().json({message->"No other team matters"})}})
Responses
There are a number of ways to make an HTTP response.
// There are a number of factory methods from the 'web' namespace that map to common used HTTP response // types
web:ok()// 200
web:created()
web:noContent()
web:serverError()// 500
web:status(status)// custom status// These factory methods return a WebResponse which then allows you to construct different payloads:varresponse=web:ok().json({})// accepts map which gets converted to a Json stringresponse.cookie("name","value").header("name"," value").characterEncoding("UTF-8")vartemplateObj={// add values here to be used by the template engine (mustache)}response.template("/ui/index.html",templateObj)// return back the html file (uses mustache as a template engine)//
When things go wrong
When an exception occurs, you can bind a Leola function and handle it by returning a custom response back to the client.
app.errorHandler(def(context,error){returnweb:serverError().json({"error"->toString(error),"message"->"Sorry, there was an internal error"})})
Web Sockets
Web Sockets are pretty hip, leola-web has support for those too. Create a set of callback functions when a WebSocket is initiated.
app.webSocket({// the path to the socket (ws://localhost:8121/api/testSocket)route->"/testSocket",onOpen->def(session){},onClose->def(session,reason){},onMessage->def(session,message){},onError->def(session,exception){}})
Starting the Web Server
Finally, start the web server. This will block, so it should be the last statement of your script.
Boas vindas ao repositório do projeto Trybe Wallet!
Instruções para rodar o projeto no seu computador
ANTES…
O código desse projeto em questão e outros refletem os diferentes níveis de aprendizado ao longo da minha jornada estudante de desenvolvimento web pois estou de vez em quando buscando refatorar códigos dos meus projetos afim de exercitar as boas práticas em CLEAN CODE e ESCALABILIDADE!
An interactive novel experience where every choice matters.
“many a secret lay within the walls.”
“beliefs twisted around their lies, slowly infesting the expanse like a parasite.”
“only a choice can defer this cruel fate from befalling the masses.”
“I hope, for all our sakes, you make that choice, Commander.”
documentation coming later. stay tuned!
POSTSCRIPT
Making a game has always been my dream. From the moment I started programming, I knew I wanted to make one eventually.
But, to my dismay, I lack the skills to do anything but write or program. This has been a major obstacle, forcing me to work on smaller projects such as koulouri or ZRpB.
WHAT LURKS WITHIN is my attempt to shatter that obstacle. All of the skills I’ve learned from my former projects, including my beloved koulouri and every story my precious friends have wrote with me have built up to this moment. Already, it is my biggest project yet (in terms of code), and it will only get bigger.
I may not be able to give you visuals or sound, but I promise to at the very least try and deliver an experience worth your time.
Stay tuned, Commander. Arcallis will soon await your arrival.
PROJECT ALPHA WARNING – PLEASE READ!
WLW is a VERY new project (perhaps even before the Alpha stage), and everything you see is subject to change!
This repository was made public for recordkeeping purposes, and the game is currently in no way stable. I am not responsible for any save data loss or other issues caused by WLW!
This repository is a collection of my cosmos DevOps journey. I’ll be putting my progress, code samples, and experiments in this repository.
Setups
Bdjuno Indexer with Gaia chain: Deploys a blockchain explorer using Docker Compose, which allows for visualization and analysis of blockchain data and other services are setup like Postgres in which bdjuno stores data, hasura graphql, running migrations and updating metadata, etc.
Each scenario directory contains a detailed README file that provides instructions on how to set up and use the Docker Compose configuration for that specific scenario.
Usage
Clone this repository and navigate to the desired scenario directory.
Follow the instructions in the respective README file to start the Docker Compose services.
Access the deployed services or integrate them into your web3 development workflow as needed.
To stop the services, use the appropriate docker-compose down command as mentioned in each scenario’s README file.
A dead-simple CSS boilerplate; it only uses element selectors to standardize styling across
browsers and reduce unnecessary class construction. Think NormalizeCSS or ResetCSS, but
customizable.
How does it work?
The boilerplate provides styling for commonly utilized features: scrollbar, anchors,
form input groups, validation, quote boxes, code, etc. They’re applied with element selectors
only to reduce overhead. Stylesheet propsvar() is used so the boilerplate can be scaled
and customized easily.
Example of :rootprops.
--fontSize: 16px;
--lineHeight: 1.75; /* Keep this number unitless to avoid overlap and inheritance issues. */
--headerFont: 'Geneva';
--bodyFont: 'Arial';
--monoFont: 'Lucida Console';
--font: #000000;
--foreground: #EAEAEA;
--background: #FFFFFF;
...
Example of cross-browser standardization using props.
...
html, body {
padding: 0; /* Remove unnecessary padding. */
margin: 0; /* Remove unnecessary margin. */
}
body {
-webkit-text-size-adjust: 100%; /* Prevent adjustments of font size after orientation changes in iOS. */
/* Default Background */
background-color: var(--background, #FFFFFF);
/* Global Inherited Defaults */
font-family: var(--headerFont, 'Geneva'), 'Helvetica', serif;
font-size: var(--fontSize, 16px);
line-height: var(--lineHeight, 1.75);
color: var(--font, #000000);
}
html:focus, body:focus {
outline: none; /* Remove default agent outline focus from most browsers. */
}
...
StandardCSS is designed to act as a bedrock / foundational layer for new themes and frameworks. If you are building
your stylesheets from scratch and want a customizable cross-browser supported boilerplate, then StandardCSS is for you.
If importing a framework or extending one, then StandardCSS is not for you.
What is included in the Foundation layer?
The foundation layer includes only few groups at the moment. However, there are plans to expand this has HTML and CSS
adopts more commonly built features. However, everything here is fully customizable via props or by messing with their
properties. Yes that also means custom checkbox, radio, quotes and search without any extra HTML markup. CSS handles
it all.
Page Building (Containers)
Headers
Main, Article, Sections
Footers
Content Handling
Header
Paragraph, Span,
Image
Delete, Emphasis, Strong, etc.
Citations
Anchors
Preformatted Text (ex. pre, code, sample)
Quotes and Blockquotes
etc…
Scrollbar (webkit browsers only)
Form Control
Various Inputs
Text, Textarea, Select, Search, Radio, Checkbox, etc.
Input Groups
Validation & Invalidation
Compatability
This HTML boilerplate is designed to work with the latest technology that is accepted by all modern browsers.
As of 7/25/2023, 94% of all users browsers’, according to CanIUse, support everything in document. Except the scrollbar,
as only webkit supported browsers support this.
Accessibility
All styling following the recommendations of W3C or integrates a commonly used browser style agent implementation. Since
all elements being modified are still displayed by default, even if their appearance and aesthetic is overwritten
(ex. checkbox and radio), they still retain the accessible properties.
Licensing
Please see the LICENSE for this project regarding use.
fft.c is the main file and requires 1 to 3 arguments, the
1st is a mono .wav file to play or “mic” if you want to use an external microphone
2nd is the mode 1-4 to for displaying the sound
3nd is optional. If set to “log” displays Bins logarythmically on LED-Strip. If set as something else the frequency spectrum of each time frame should be scaled to 1 for the highest FFT amplitude.
Mode 1 maps each LED a number of bins and displays a color spectrum and the brightness is the amplitude(has to be optimized).
Mode 2 maps each LED a number of bins and the color is the amplitude.
Mode 3 is the same as mode 2 but the base is additional brightness.
Mode 4 displays a snake that always adds the frequency with the highest amplitude to the beginning.
Mode 5 displays the current volume using the number of LEDs. The color is represented by the most domiante frequency
Install and build
#Update system
sudo apt-get update && sudo apt-get upgrade
#Install missing librarys
sudo apt-get install libsndfile1 libsndfile1-dev
#Clone Project
git clone https://github.com/mariusdkm/rpi-fft-led
cd rpi-fft-led
#Build Project
make fft.bin
An example call would be:
sudo ./fft.bin example.wav 4
or
sudo ./fft.bin mic 2
Run the code using sudo since the GPU_FFT code makes use of the GPU, which requires root permissions.
The Langfassung.pdf is the Document I wrote for the Jugend Forscht Contest.
It is in German but goes a bit deeper into how and why I’ve built this Project.
For the spi interface Copyright (c) 2016 penfold42
For the GPU_FFT Copyright (c) 2014 Andrew Holme.
Copyright (c) 2018 mariusdkm
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Softare Foundation, version 2.
This is a Spring Boot Groovy App with Angular Frontend that displays Strava activities and enables you to merge activites into a new one.
How it looks
You can login to Strava with OAuth, no additional credentials required.
As soon as you are authorized, a table view will open, showing your most recent activities. Clicking on a row will show details and a map.
You can select multiple rows/activities with the checkboxes at the left side. Whenever you have 2 or more activities selected, the merge button will become active. Clicking on merge might take some seconds (~8s) before the table is reloaded and shows the new activity. Merged activities get a noticeable pink border.
To get the spec, simply run the Gradle task downloadStravaApi. You can do this either directly in IntelliJ or with ./gradlew downloadStravaApi on command line.
Generate OpenAPI client code
Unfortunately the Groovy support is really poor for Swagger/OpenAPI, so it’s required to generate Java code. But since it is generated code and shall not be touched, it doesn’t really matter.
To generate use the IntelliJ plugin. Simply open build/generated/strava-api-definition/api.json and in the Editor click on the edit button:
And there set the settings as below:
It is important to choose the correct path (according to gradle settings it is src-api) and to set the correct generator version -→ The generator will be downloaded automatically.
OR! just run Gradle task build to get everything properly generated.