This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################################################################################## | |
# ParallelForLoopTest | |
# | |
# Connectivity | |
# * TTL4 [output] -> MSOX2024A Channel 1 (trigger) | |
# * TTL7 [output] -> MSOX2024A Channel 2 | |
# * Urukul0_ch0 [output] -> MSOX2024A Channel 3 | |
# | |
# Description | |
# * Depending on the order of operations the TTL pulses can silently fail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from artiq.experiment import * | |
class SetDDSProfile(object): | |
def __init__(self, device, frequency, amplitude, phase, switch_state): | |
self._device = device | |
self._ftw = self._device.frequency_to_ftw(frequency) | |
self._asf = self._device.amplitude_to_asf(amplitude) | |
self._pow = self._device.turns_to_pow(phase) | |
self._sw = switch_state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################################################################################## | |
# ParallelForLoopTest | |
# | |
# Connectivity | |
# * TTL4 [output] -> MSOX2024A Channel 1 (trigger) | |
# * TTL7 [output] -> MSOX2024A Channel 2 | |
# | |
# Description | |
# | |
######################################################################################################################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\n\$ ' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" local syntax file - set colors on a per-machine basis: | |
" vim: tw=0 ts=4 sw=4 | |
" Vim color file | |
" Maintainer: mebert | |
" Last Change: 2018 Sept 26 | |
hi clear | |
set background=dark | |
if exists("syntax_on") | |
syntax reset |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
colorscheme mebert | |
set nu | |
map <F10> :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' | |
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" | |
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from artiq.experiment import * | |
class LED(EnvExperiment): | |
def build(self): | |
self.setattr_device("core") | |
self.setattr_device("led0") | |
self.setattr_device("led1") | |
@kernel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is an example device database that needs to be adapted to your setup. | |
# The list of devices here is not exhaustive. | |
core_addr = "192.168.1.150" | |
device_db = { | |
"core": { | |
"type": "local", | |
"module": "artiq.coredevice.core", | |
"class": "Core", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def answer(map, git_gud=True): | |
"""Find the shortest path in a binary 2D map where a wall can be removed. | |
The algorithm uses a modified Dijstra's algorithm to find the shortest path | |
from the start vertex (0,0) to the end vertex (w-1,h-1) in a 2D binary map. | |
A single wall can be removed from the map to make the shortest path, if | |
necessary. The first wall in any path can be ignored easily, but if a wall | |
is necessary to be removed for a valid solution to exist the simple | |
algorithm does not remember the minimum path that does not pass through a | |
wall to arrive at the mandatory wall vertex. Therefore we modify the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from artiq.experiment import * | |
import numpy as np | |
class DDSTest(EnvExperiment): | |
def build(self): | |
self.setattr_device("core") | |
self.setattr_device("core_dma") | |
self.setattr_device("led0") | |
self.setattr_device("ttl4") |
NewerOlder