Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am neila on github.
  • I am neila (https://keybase.io/neila) on keybase.
  • I have a public key ASCpch2OctcoPf7JaCn6vUiI5TGuVj2de9dvizWCZi2O1Qo

To claim this, I am signing this object:

import matplotlib.pyplot as plt
import requests
from ratelimit import limits, sleep_and_retry
class SecAPI(object):
SEC_CALL_LIMIT = {'calls': 10, 'seconds': 1}
@staticmethod
@neila
neila / practice.nb
Created November 21, 2020 14:24
learning mathematica
This file has been truncated, but you can view the full file.
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 11.3' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
@neila
neila / matrixencryption.nb
Created November 21, 2020 14:11
text encryption using simple matrix calculations
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 11.3' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
@neila
neila / fieldplotpratice.nb
Created November 21, 2020 14:10
field plots
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 11.3' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
@neila
neila / Chabay_Sherwood_problems.nb
Created November 21, 2020 14:08
charges and fields
(* Content-type: application/vnd.wolfram.mathematica *)
(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)
(* CreatedBy='Mathematica 11.3' *)
(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
@neila
neila / hopfieldnetwork.ipynb
Created December 20, 2019 02:44
Hopfield Network implementation
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@neila
neila / fakedata_generate.ipynb
Created December 9, 2019 16:40
Generate fake data from a sample data, also Benford's law stuff
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import random as rm
import sys
states = ['Ice Cream', "McDonald's", 'Salad', 'Boba', 'Sushi', 'Beer']
def activity_forecast(days,states,input,transmat=None):
# Choose the starting state
if input not in states:
sys.exit('input not valid')
@neila
neila / numericalapproximation.py
Created November 29, 2019 13:53
Newton's method, Trapezoidal method, Euler's method, Runge-Kutta 2, Runge-Kutta 4
import numpy as np
from matplotlib import pyplot as plt
def f(l, a, b, T):
return a*(l**2) - a/l + b*l - b/(l**2) - T
def df(l, a, b):
return 2*a*l + a/(l**2) + b + 2*b/(l**3)
def q1_newton(x0, f, df, a, b, T, n=1):