Skip to content

Instantly share code, notes, and snippets.

"""
following is requirements.txt
============
starlette
sqlalchemy
databases[sqlite]
uvicorn
imia
passlib
sqlalchemy_utils
@jeetu7
jeetu7 / idris_doc_2.html
Created May 1, 2020 15:49
anchored lines of idris source code
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!--
generated by Pygments <https://pygments.org/>
Copyright 2006-2019 by the Pygments team.
Licensed under the BSD license, see LICENSE for details.
-->
<html>
<head>
<title></title>
@jeetu7
jeetu7 / idris_doc_1.html
Created April 20, 2020 18:40
html output with line numbers
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!--
generated by Pygments <https://pygments.org/>
Copyright 2006-2019 by the Pygments team.
Licensed under the BSD license, see LICENSE for details.
-->
<html>
<head>
<title></title>
@jeetu7
jeetu7 / gist:3023939d09c182e8d78659174a08f7ac
Created April 17, 2020 10:20
html created by pygment library
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!--
generated by Pygments <https://pygments.org/>
Copyright 2006-2019 by the Pygments team.
Licensed under the BSD license, see LICENSE for details.
-->
<html>
<head>
<title></title>
module Main
import Data.List
mySum : List Double -> Double
mySum [] = 0
mySum (x :: xs) = x + mySum xs
ms : List Double
ms = [1.0, 2.0, 3.0]
@jeetu7
jeetu7 / trycast.idr
Created April 14, 2020 17:07
casting trial in idris2
module Main
x1 : Int
x1 = 2
doubleToInt : Double -> Int
doubleToInt y = cast y
x2 : Double
@jeetu7
jeetu7 / mywrite.idr
Created April 11, 2020 10:27
write file idris2
module Main
import System.File
main : IO ()
main = do myFile <- openFile "out_string.txt" WriteTruncate
case myFile of
Right c => fPutStr myFile "Alpha Beta"
Left err => printLn err
closeFile myFile
@jeetu7
jeetu7 / ChartModule.js
Created July 17, 2016 13:55
mesa ChartModule.js for upgrading to v2 of Chart.js. I am not able to go any further.
// This function creates the Chart widget. If updating the Chart.js library
// shipped with mesa, check the compatibility and modify the function as
// required.
//
// Chart.js version: 2.1.6
// input arguments:
// series: Data to be plotted
// canvas_width: the width of the html5 canvas
// canvas_height: the height of the html5 canvas
var ChartModule = function(series, canvas_width, canvas_height) {
@jeetu7
jeetu7 / model.py
Created July 12, 2012 17:51
model file
class Material(DeclarativeBase):
__tablename__ = 'materials'
id = Column(Integer, primary_key=True)
Name = Column(Unicode(50), nullable=False)
voltage = Column(Float(10), nullable=True)
vol_1 = Column(Float(10), nullable=True)
vol_1_ref = Column(Unicode(10), nullable=True)