Skip to content

Instantly share code, notes, and snippets.

View anandijain's full-sized avatar
😎

anand jain anandijain

😎
View GitHub Profile
@anandijain
anandijain / chemical_of_the_day_privacy_policy.txt
Created September 1, 2023 18:18
chemical of the day privacy policy
Privacy Policy for "Chemical of the Day"
Last Updated: Fri 1 Sep 2023 11:16:05
Introduction
This Privacy Policy applies to the "Chemical of the Day" service ("the Service") operated by [Your Name or Company]. This document explains what information we collect, how we use it, and your data protection rights.
Information We Collect
Since the Service is not intended for general public use and is a personal project, we do not collect any personal information from users. The Service is open-source and can be reviewed by anyone for transparency.
How We Use Information
As we do not collect any personal information, there is no information to use for other purposes.
@anandijain
anandijain / chemical_of_the_day_tos.txt
Created September 1, 2023 18:16
chemical_of_the_day_tos
Terms of Service for "Chemical of the Day"
Last Updated: Fri 1 Sep 2023 11:16:05
Acceptance of Terms
By accessing and using the "Chemical of the Day" service ("the Service"), you agree to comply with and be bound by these Terms of Service ("Terms"). If you do not agree to these Terms, please do not use the Service.
Changes to Terms
We reserve the right to change, modify, or revise these Terms at any time. Any changes to the Terms will be posted on this page. Your continued use of the Service following the posting of changes constitutes your acceptance of such changes.
User Conduct
You agree not to use the Service for any unlawful purpose or in any way that may harm us or any other users.
@anandijain
anandijain / markdown-details-collapsible.md
Created January 29, 2023 16:47 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

How to

<details>
  <summary>Click me</summary>
  
  ### Heading
  1. Foo
  2. Bar
     * Baz
 * Qux
@anandijain
anandijain / unlabeled_connected_balanced.jl
Created May 28, 2022 04:38
Number of connected unlabeled graphs with n edges
using Graphs, Combinatorics
# [861a8166] Combinatorics v1.0.2
# [86223c79] Graphs v1.7.0
function all_balanced_graphs(n)
S = Set{SimpleGraph}()
all_balanced_graphs!(S, n)
end
function all_balanced_graphs!(S, n)
# [336ed68f] CSV v0.8.5
# [a93c6f00] DataFrames v1.2.2
# [0c46a032] DifferentialEquations v6.18.0
# [961ee093] ModelingToolkit v6.1.0
# [91a5bcdd] Plots v1.20.0
# [ab02a1b2] TableOperations v1.0.0
# [2f01184e] SparseArrays
using ModelingToolkit, LinearAlgebra, DifferentialEquations, Plots, Test
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version2/core" level="3" version="2">
<model metaid="_case00001" id="case00001" name="case00001" timeUnits="time">
<listOfUnitDefinitions>
<unitDefinition id="volume">
<listOfUnits>
<unit kind="litre" exponent="1" scale="0" multiplier="1"/>
</listOfUnits>
</unitDefinition>
<unitDefinition id="substance">
@anandijain
anandijain / s1 -> s1
Created July 26, 2021 21:38
SBMLToolkit currently enforces stoich to be non-zero
<?xml version="1.0" encoding="UTF-8"?>
<!-- Created by COPASI version 4.30 (Build 240) on 2021-07-26 16:51 with libSBML version 5.19.0. -->
<sbml xmlns="http://www.sbml.org/sbml/level2/version4" level="2" version="4">
<model metaid="COPASI0" id="prod_subtrate_same" name="prod_subtrate_same">
<listOfUnitDefinitions>
<unitDefinition id="substance" name="substance">
<listOfUnits>
<unit kind="mole" exponent="1" scale="0" multiplier="1"/>
</listOfUnits>
</unitDefinition>
@anandijain
anandijain / tmappycall.jl
Last active February 28, 2021 11:21
tmap pycall mwe
using SciMLBase, SbmlInterface
# assumes this is cloned: https://github.com/sbmlteam/sbml-test-suite to homedir
path = joinpath(homedir(), "sbml-test-suite/cases/")
function extract_xmls()
dirs = filter(isdir, readdir(path; join=true))
all_dirs = mapreduce(x -> filter(isdir, readdir(x; join=true)), vcat, dirs)
all_files = vcat(readdir.(all_dirs; join=true)...)
filter!(x -> occursin(".xml", x), all_files)
end
@anandijain
anandijain / sbml-test-suite-julia.jl
Last active February 28, 2021 00:11
testing which models from the suite work with SbmlInterface.jl
using SbmlInterface, ModelingToolkit, OrdinaryDiffEq, SciMLBase, DataFrames, DifferentialEquations
using Plots
# assumes this is cloned: https://github.com/sbmlteam/sbml-test-suite
path = joinpath(homedir(), "sbml-test-suite/cases/")
@test isdir(path)
function extract_xmls()
dirs = filter(isdir, readdir(path; join=true))
all_dirs = mapreduce(x -> filter(isdir, readdir(x; join=true)), vcat, dirs)
all_files = vcat(readdir.(all_dirs; join=true)...)
@anandijain
anandijain / dsp_pluto.jl
Created October 10, 2020 01:41
DSP demo with pluto
### A Pluto.jl notebook ###
# v0.12.3
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
local el = $(esc(element))