Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

basic.py 963 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
  1. #!/usr/bin/env python
  2. # coding: utf-8
  3. # # 基本知识
  4. # In[1]:
  5. get_ipython().run_line_magic('reload_ext', 'autoreload')
  6. get_ipython().run_line_magic('autoreload', '2')
  7. get_ipython().run_line_magic('matplotlib', 'inline')
  8. # In[2]:
  9. import numpy as np
  10. import pandas as pd
  11. import matplotlib.pyplot as plt
  12. from pathlib import Path
  13. Path.ls = lambda x:list(x.iterdir())
  14. # In[3]:
  15. import jpype, math, random
  16. import os, sys
  17. from jpype import *
  18. # In[4]:
  19. try :
  20. jarLocation = "/home/fsf/software/inforDynamics-dist-1.5/infodynamics.jar"
  21. jpype.startJVM(jpype.getDefaultJVMPath(), "-ea", "-Djava.class.path=" + jarLocation)
  22. except:
  23. print("JVM has already started !")
  24. # In[5]:
  25. sys.path.append('../../srcs')
  26. # In[6]:
  27. from jidt.data import example1, example2
  28. # In[7]:
  29. x,y = example2(length=3000,noise_level=[0.1,0.1])
  30. # In[8]:
  31. fig, ax = plt.subplots(1,1,figsize=(8,3))
  32. ax.plot(x,label='x')
  33. ax.plot(y,label='y')
  34. ax.legend()
  35. plt.show()
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...