Skip to content

Instantly share code, notes, and snippets.

https://colab.research.google.com/drive/1Ff9X-bh3F_sYyDluTnVeFmisUTpy1RHn#scrollTo=512c6d47
https://github.com/maria-violaris/quantum-paradoxes/blob/main/quantum-zeno-effect.ipynb
https://docs.google.com/presentation/d/1S1xOXbZSntJ1qCf0CXHNG3mdGDtZ5IyrxqNdrC8fHsg/edit?usp=sharing
@ahmed2m
ahmed2m / dispatch.py
Last active December 7, 2022 23:19 — forked from ciiqr/dispatch.sh
github actions, repository_dispatch with client_payload
import requests
user="user"
repo="repo"
token="token"
url = f"https://api.github.com/repos/{user}/{repo}/dispatches"
payload = {"event_type": "awesomeness", "client_payload": {"foo": "bar"}}
header = {"Accept": "application/vnd.github.everest-preview+json", "Authorization": f"token {token}"}
resp = requests.post(url=url, headers=header, json=payload)
@ahmed2m
ahmed2m / react-native-file-upload.js
Created June 18, 2020 22:04 — forked from nandorojo/react-native-file-upload.js
Upload a file to your server using react native / expo.
/*
IF YOU WANT TO UPLOAD ONE FILE, USE THE CODE BELOW.
SEE THE BOTTOM OF THE GIST TO SEE HOW TO UPLOAD MULTIPLE FILES.
HERE'S AN EXAMPLE SOMEONE MADE USING CLOUDINARY: https://gist.github.com/jamielob/5c1a5dc84e50e4507b71299d993dffec
*/
@ahmed2m
ahmed2m / dataset.json
Created October 5, 2019 09:33
Learning to Automatically Solve Algebra Word Problems, https://homes.cs.washington.edu/~lsz/papers/kazb-acl14.pdf
[
{
"iIndex": 2598,
"sQuestion": "A writing workshop enrolls novelists and poets in a ratio of 5 to 3. There are 24 people at the workshop. How many novelists are there? How many poets are there?",
"lEquations": [
"3.0*novelists=5.0*poets",
"novelists+poets=24.0"
],
"lSolutions": [
15.0,
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# This line configures matplotlib to show figures embedded in the notebook, \n",
"# instead of poping up a new window. More about that later. \n",
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"from scipy.optimize import linprog\n",
"from scipy.optimize import Bounds\n",
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# This line configures matplotlib to show figures embedded in the notebook, \n",
"# instead of poping up a new window. More about that later. \n",
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# This line configures matplotlib to show figures embedded in the notebook, \n",
"# instead of poping up a new window. More about that later. \n",