np-services 0.1.49__tar.gz → 0.1.51__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {np_services-0.1.49 → np_services-0.1.51}/PKG-INFO +1 -1
- {np_services-0.1.49 → np_services-0.1.51}/pyproject.toml +1 -1
- {np_services-0.1.49 → np_services-0.1.51}/setup.py +2 -2
- {np_services-0.1.49 → np_services-0.1.51}/src/np_services/__init__.py +1 -0
- {np_services-0.1.49 → np_services-0.1.51}/src/np_services/proxies.py +4 -4
- np_services-0.1.51/src/np_services/resources/__init__.py +0 -0
- np_services-0.1.51/src/np_services/resources/black_wallpaper.ps1 +29 -0
- np_services-0.1.51/src/np_services/resources/grey_wallpaper.ps1 +29 -0
- np_services-0.1.51/src/np_services/stim_computer_theme_changer.py +32 -0
- {np_services-0.1.49 → np_services-0.1.51}/src/np_services/utils.py +1 -1
- {np_services-0.1.49 → np_services-0.1.51}/README.md +0 -0
- {np_services-0.1.49 → np_services-0.1.51}/src/np_services/open_ephys.py +0 -0
- {np_services-0.1.49 → np_services-0.1.51}/src/np_services/protocols.py +0 -0
- /np_services-0.1.49/src/np_services/mvr.py → /np_services-0.1.51/src/np_services/resources/mvr_connector.py +0 -0
- {np_services-0.1.49/src/np_services → np_services-0.1.51/src/np_services/resources}/zro.py +0 -0
- {np_services-0.1.49 → np_services-0.1.51}/src/np_services/sync.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: np-services
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.51
|
|
4
4
|
Summary: Tools for interfacing with devices and services used in Mindscope Neuropixels experiments at the Allen Institute.
|
|
5
5
|
Author: bjhardcastle
|
|
6
6
|
Author-email: ben.hardcastle@alleninstitute.org
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "np-services"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.51"
|
|
4
4
|
description = "Tools for interfacing with devices and services used in Mindscope Neuropixels experiments at the Allen Institute."
|
|
5
5
|
authors = ["bjhardcastle <ben.hardcastle@alleninstitute.org>"]
|
|
6
6
|
readme = "README.md"
|
|
@@ -5,7 +5,7 @@ package_dir = \
|
|
|
5
5
|
{'': 'src'}
|
|
6
6
|
|
|
7
7
|
packages = \
|
|
8
|
-
['np_services']
|
|
8
|
+
['np_services', 'np_services.resources']
|
|
9
9
|
|
|
10
10
|
package_data = \
|
|
11
11
|
{'': ['*']}
|
|
@@ -24,7 +24,7 @@ install_requires = \
|
|
|
24
24
|
|
|
25
25
|
setup_kwargs = {
|
|
26
26
|
'name': 'np-services',
|
|
27
|
-
'version': '0.1.
|
|
27
|
+
'version': '0.1.51',
|
|
28
28
|
'description': 'Tools for interfacing with devices and services used in Mindscope Neuropixels experiments at the Allen Institute.',
|
|
29
29
|
'long_description': '# service usage\n',
|
|
30
30
|
'author': 'bjhardcastle',
|
|
@@ -25,9 +25,9 @@ import pydantic
|
|
|
25
25
|
import yaml
|
|
26
26
|
import pandas as pd
|
|
27
27
|
|
|
28
|
-
import np_services.
|
|
28
|
+
import np_services.resources.mvr_connector as mvr_connector
|
|
29
29
|
import np_services.utils as utils
|
|
30
|
-
import np_services.zro as zro
|
|
30
|
+
import np_services.resources.zro as zro
|
|
31
31
|
from np_services.protocols import *
|
|
32
32
|
|
|
33
33
|
logger = np_logging.getLogger(__name__)
|
|
@@ -907,12 +907,12 @@ class MVR(CamstimSyncShared):
|
|
|
907
907
|
del cls.proxy
|
|
908
908
|
|
|
909
909
|
@classmethod
|
|
910
|
-
def get_proxy(cls) ->
|
|
910
|
+
def get_proxy(cls) -> mvr_connector.MVRConnector:
|
|
911
911
|
with contextlib.suppress(AttributeError):
|
|
912
912
|
return cls.proxy
|
|
913
913
|
cls.ensure_config()
|
|
914
914
|
logger.debug("Creating %s proxy to %s:%s", cls.__name__, cls.host, cls.port)
|
|
915
|
-
cls.proxy =
|
|
915
|
+
cls.proxy = mvr_connector.MVRConnector({"host": cls.host, "port": cls.port})
|
|
916
916
|
cls.proxy._mvr_sock.settimeout(cls.timeout)
|
|
917
917
|
return cls.get_proxy()
|
|
918
918
|
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
#Modify Path to the picture accordingly to reflect your infrastructure
|
|
3
|
+
$imgPath="\\allen\programs\mindscope\workgroups\dynamicrouting\ben\black_wallpaper.bmp"
|
|
4
|
+
$code = @'
|
|
5
|
+
using System.Runtime.InteropServices;
|
|
6
|
+
namespace Win32{
|
|
7
|
+
|
|
8
|
+
public class Wallpaper{
|
|
9
|
+
[DllImport("user32.dll", CharSet=CharSet.Auto)]
|
|
10
|
+
static extern int SystemParametersInfo (int uAction , int uParam , string lpvParam , int fuWinIni) ;
|
|
11
|
+
|
|
12
|
+
public static void SetWallpaper(string thePath){
|
|
13
|
+
SystemParametersInfo(20,0,thePath,3);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
'@
|
|
18
|
+
|
|
19
|
+
add-type $code
|
|
20
|
+
|
|
21
|
+
#Apply the Change on the system
|
|
22
|
+
[Win32.Wallpaper]::SetWallpaper($imgPath)
|
|
23
|
+
|
|
24
|
+
(New-Object -ComObject shell.application).toggleDesktop()
|
|
25
|
+
|
|
26
|
+
#Hide icons on the Desktop
|
|
27
|
+
$Path="HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
|
28
|
+
Set-ItemProperty -Path $Path -Name "HideIcons" -Value 1
|
|
29
|
+
Get-Process "explorer"| Stop-Process
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
#Modify Path to the picture accordingly to reflect your infrastructure
|
|
3
|
+
$imgPath="\\allen\programs\mindscope\workgroups\dynamicrouting\ben\grey_wallpaper.bmp"
|
|
4
|
+
$code = @'
|
|
5
|
+
using System.Runtime.InteropServices;
|
|
6
|
+
namespace Win32{
|
|
7
|
+
|
|
8
|
+
public class Wallpaper{
|
|
9
|
+
[DllImport("user32.dll", CharSet=CharSet.Auto)]
|
|
10
|
+
static extern int SystemParametersInfo (int uAction , int uParam , string lpvParam , int fuWinIni) ;
|
|
11
|
+
|
|
12
|
+
public static void SetWallpaper(string thePath){
|
|
13
|
+
SystemParametersInfo(20,0,thePath,3);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
'@
|
|
18
|
+
|
|
19
|
+
add-type $code
|
|
20
|
+
|
|
21
|
+
#Apply the Change on the system
|
|
22
|
+
[Win32.Wallpaper]::SetWallpaper($imgPath)
|
|
23
|
+
|
|
24
|
+
(New-Object -ComObject shell.application).toggleDesktop()
|
|
25
|
+
|
|
26
|
+
#Hide icons on the Desktop
|
|
27
|
+
$Path="HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
|
|
28
|
+
Set-ItemProperty -Path $Path -Name "HideIcons" -Value 1
|
|
29
|
+
Get-Process "explorer"| Stop-Process
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import pathlib
|
|
2
|
+
from typing import ClassVar
|
|
3
|
+
|
|
4
|
+
import fabric
|
|
5
|
+
import np_config
|
|
6
|
+
|
|
7
|
+
from np_services.proxies import NoCamstim
|
|
8
|
+
|
|
9
|
+
class ThemeSetter(NoCamstim):
|
|
10
|
+
"""Base class for setting the background wallpaper on a remote machine,
|
|
11
|
+
then hiding all desktop icons, hiding the taskbar, minimizing all windows"""
|
|
12
|
+
local_file: ClassVar[str | pathlib.Path]
|
|
13
|
+
remote_file: ClassVar[str | pathlib.Path]
|
|
14
|
+
|
|
15
|
+
extra_args: ClassVar[list[str]] = []
|
|
16
|
+
ssh: ClassVar[fabric.Connection]
|
|
17
|
+
user: ClassVar[str] = 'svc_neuropix'
|
|
18
|
+
password: ClassVar[str] = np_config.fetch('logins')['svc_neuropix']['password']
|
|
19
|
+
|
|
20
|
+
@classmethod
|
|
21
|
+
def initialize(cls):
|
|
22
|
+
with cls.get_ssh() as ssh:
|
|
23
|
+
ssh.put(cls.local_file, cls.remote_file)
|
|
24
|
+
super().initialize()
|
|
25
|
+
|
|
26
|
+
class BlackThemeSetter(ThemeSetter):
|
|
27
|
+
local_file = pathlib.Path(__file__).parent / 'resources' / 'black_wallpaper.ps1'
|
|
28
|
+
remote_file: ClassVar[str | pathlib.Path] = 'c:/users/svc_neuropix/desktop/black_wallpaper.ps1'
|
|
29
|
+
|
|
30
|
+
class GreyThemeSetter(ThemeSetter):
|
|
31
|
+
local_file = pathlib.Path(__file__).parent / 'resources' / 'grey_wallpaper.ps1'
|
|
32
|
+
remote_file: ClassVar[str | pathlib.Path] = 'c:/users/svc_neuropix/desktop/grey_wallpaper.ps1'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|