Unlocking the complex world
@NikoletaGlyn
>>> import arcas
>>> def retrieve_articles(api, records):
... api = api()
... articles = []
... for i in range(repeat):
... parameters = api.parameters_fix(title='python programming language',
... records=10, start=(10 * i) + 1)
... url = api.create_url_search(parameters)
... request = api.make_request(url)
... root = api.get_root(request)
... raw_articles = api.parse(root)
... if raw_articles:
... for raw_article in raw_articles:
... articles.append(api.to_dataframe(raw_article))
... else:
... return articles
... return articles
>>> import pandas as pd
>>> dfs = []
>>> for api in [arcas.Arxiv, arcas.Ieee, arcas.Springer]:
... articles = retrieve_articles(api, records=20)
... if articles:
... dfs.append(pd.concat(articles))
>>> import networkx as nx
>>> central_authors = sorted(nx.degree_centrality(G).items(),
... key=lambda x:x[1], reverse=True)[0:10]
>>> import networkx as nx
>>> central_authors = sorted(nx.betweenness_centrality(G).items(),
... key=lambda x:x[1], reverse=True)[0:10]
>>> import axelrod as axl
>>> players = [axl.Cooperator(), axl. Defector()]
>>> match = axl.Match(players=players, turns=5)
>>> match.play()
[(C, D), (C, D), (C, D), (C, D), (C, D)]
>>> players = [axl.TitForTat(), axl. Defector()]
>>> match = axl.Match(players=players, turns=5)
>>> match.play()
[(C, D), (D, D), (D, D), (D, D), (D, D)]
>>> len(axl.all_strategies)
235
>>> import sympy as sym
>>> import scikit-optimize
$ git clone git@github.com:rasbt/python-machine-learning-book-2nd-edition.git
Vincent Knight, Marc Harper, Nikoleta E. Glynatsi, Owen Campbel (2017) Evolution Reinforces Cooperation with the Emergence of Self-Recognition Mechanisms: an empirical study of the Moran process for the iterated Prisoner's dilemma
>>> import tensorflow
>>> import keras
>>> import axelrod as axl
Nikoleta E. Glynatsi, Vincent Knight, Tamsin E. Lee (2017) An Evolutionary Game Theoretic Model of Rhino Horn Devaluation
@NikoletaGlyn
Nikoleta-v3
nikoleta-v3.github.io