sha256 stringlengths 64 64 | language stringclasses 28
values | size int32 1 491k | lines int32 1 23.2k | content stringlengths 1 200k |
|---|---|---|---|---|
8250a1bc2682e8826ae3d7647ee94059def19643f0034144c9d8e18cf0629ed0 | JavaScript | 39,900 | 2 | /*! tooltipster v4.2.6 */!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(a){return b(a)}):"object"==typeof exports?module.exports=b(require("jquery")):b(jQuery)}(this,function(a){function b(a){this.$container,this.constraints=null,this.__$tooltip,this.__init(a)}function c(b,c){var d=!0;r... |
7b9680116e3ca94982d60005eeaf4665db42e53693eb97c62b77a6c081c2107b | JavaScript | 46,111 | 1,474 | //
// function for_each_node()
//
// this is a small utility function, to replace Javascript's "forEach" funcionality in the case of static node lists.
// Not all browsers do "forEach" correctly for this list type - we've actually seen numerous errors related to this in
// Sentry reports of STRING
//
var for_each_node... |
a7e4c2d91c46f5633adff8d8cac03918a4a502bdcd154372b66698f61ab1e63e | JavaScript | 48,044 | 216 | import {contrasts,names,label,fmt,sci,color,edgeGenes,csvText} from './format.js';
const NS='http://www.w3.org/2000/svg';
function el(tag,cls,text){const n=document.createElement(tag);if(cls)n.className=cls;if(text!==undefined)n.textContent=text;return n;}
function svgNode(tag,attrs={},text){const n=document.createElem... |
243a290ddaa2826eeda5f59dbc2b9283b70e2e660781f827fb87639d7e39f3af | JavaScript | 48,580 | 217 | import {contrasts,names,label,fmt,sci,color,edgeGenes,csvText} from "./format.0a1392e2.js";
const NS='http://www.w3.org/2000/svg';
function el(tag,cls,text){const n=document.createElement(tag);if(cls)n.className=cls;if(text!==undefined)n.textContent=text;return n;}
function svgNode(tag,attrs={},text){const n=document.c... |
e477051150a0a024d6f406bd994fdb281eca563de41327e82190ddc053346b39 | JavaScript | 51,290 | 1,464 | function factory() {
var global;
function initglobal() {
global = this;
if (!global) {
if (typeof window != "undefined") {
global = window;
} else if (typeof self != "undefined") {
global = self;
};
};
};
initglobal();
function erro... |
c8370a2d050359e9d505acc411e6f457a49b21360a21e6cbc9229bad3a767899 | JavaScript | 57,254 | 19 | /*
* jQuery JavaScript Library v1.3.2
* http://jquery.com/
*
* Copyright (c) 2009 John Resig
* Dual licensed under the MIT and GPL licenses.
* http://docs.jquery.com/License
*
* Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
* Revision: 6246
*/
(function(){var l=this,g,y=l.jQuery,p=l.$,o=l.jQuery=l.$=func... |
6e30bb660934053f7d6079c1d45c98aae0a8e8cd8034b34c68f12fd362bc06fd | JavaScript | 57,729 | 1,239 | var uploadBucketName = "kuceyeski-wcm-web-upload";
var bucketRegion = "us-east-1";
var IdentityPoolId = "us-east-1:3d5d591e-9224-4321-a4dc-be72b2558b36";
var uploadFolder = "inputs";
var uploadTimer = null;
var passwordTimerInterval = 1000;
var uploadTimerInterval = 10000;
var uploadStatusSuffix = "_status.png";
var u... |
5aa53525abc5c5200c70b3f6588388f86076cd699284c23cda64e92c372a1548 | JavaScript | 60,010 | 7 | /*!
* Bootstrap v4.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,req... |
2b5dd8590a9ed8ae8773013e31e0b851b4ab8c70d793125ea92730fd6f35ebce | JavaScript | 63,309 | 1,347 | // Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
/// <reference types="cypress" />
context('Multi-object selection', { scrollBehavior: false }, () => {
const taskName = 'Multi-object selection';
const serverFiles = ['images/image_1.jpg', 'images/image_2.jpg', 'images/image_3.jpg'];
... |
1137a7acce2a9ddd5157d7bbfeb3b3b03815ef9632360675d6fc53ce583d6c9b | JavaScript | 63,773 | 1 | $wnd.jsme.runAsyncCallback11('var P0="runCallbacks",Q0="end",R0,S0,T0="West",U0="South",V0="North",W0="First",X0="East",Y0="Before",Z0="After";function $0(a,b){return a>b?a:b}function a1(){a1=z;R0=new RC;S0=new DJ(0,0);SC(R0,Y0);SC(R0,W0);SC(R0,Z0);SC(R0,"Last");SC(R0,Xe);SC(R0,V0);SC(R0,U0);SC(R0,T0);SC(R0,X0)}\nfunct... |
c5a91224fbcbcd96200ff9ddb1516c6666c902853e8fb34592f18a5b78c2449f | JavaScript | 63,882 | 1 | $wnd.jsme.runAsyncCallback11('var P0="runCallbacks",Q0="end",R0,S0,T0="West",U0="South",V0="North",W0="First",X0="East",Y0="Before",Z0="After";function $0(a,b){return a>b?a:b}function a1(){a1=z;R0=new SC;S0=new EJ(0,0);TC(R0,Y0);TC(R0,W0);TC(R0,Z0);TC(R0,"Last");TC(R0,Xe);TC(R0,V0);TC(R0,U0);TC(R0,T0);TC(R0,X0)}\nfunct... |
a5ab2a00a0439854f8787a0dda775dea5377ef4905886505c938941d6854ee4f | JavaScript | 71,037 | 2 | /*! jQuery v3.4.1 -ajax,-ajax/jsonp,-ajax/load,-ajax/parseXML,-ajax/script,-ajax/var/location,-ajax/var/nonce,-ajax/var/rquery,-ajax/xhr,-manipulation/_evalUrl,-event/ajax,-effects,-effects/Tween,-effects/animatedSelector | (c) JS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"ob... |
2cdac6fcf246bdc7bb0f46ec0812a903067ce7e3545a9c1c9e02f359595e549f | JavaScript | 74,761 | 2,532 | /**
* jspsych.js
* Josh de Leeuw
*
* documentation: docs.jspsych.org
*
**/
window.jsPsych = (function() {
var core = {};
//
// private variables
//
// options
var opts = {};
// experiment timeline
var timeline;
// flow control
var global_trial_index = 0;
var current_trial = {};
var curr... |
b513890d95e6d596adf550ac99c679018d6fd49fafaabde895e81c42f99951f5 | JavaScript | 78,053 | 1,990 | // Copyright (C) 2020-2022 Intel Corporation
// Copyright (C) CVAT.ai Corporation
//
// SPDX-License-Identifier: MIT
/// <reference types="cypress" />
/* eslint-disable security/detect-non-literal-regexp */
import { keyCodeN } from './const';
import { decomposeMatrix, convertClasses, toSnakeCase } from './utils';
im... |
b796504d9b1b422f0dc6ccc2d740ac78a8c9e5078cc3934836d39742b1121925 | JavaScript | 82,411 | 166 | /*!
DataTables 1.10.19
©2008-2018 SpryMedia Ltd - datatables.net/license
*/
(function(h){"function"===typeof define&&define.amd?define(["jquery"],function(E){return h(E,window,document)}):"object"===typeof exports?module.exports=function(E,H){E||(E=window);H||(H="undefined"!==typeof window?require("jquery"):require("... |
6b6de0d4db7876d1183a3edb47ebd3bbbf93f153f5de1ba6645049348628109a | JavaScript | 85,659 | 4 | /*! jQuery v2.2.3 | (c) jQuery Foundation | jquery.org/license */
!function(a,b){"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,fun... |
24c7030c50c1045cfefddac2d403f4bb2043b34183f6887f5c88a3e12e0236f9 | JavaScript | 89,666 | 2 | /*! jQuery v3.6.1 | (c) OpenJS Foundation and other contributors | jquery.org/license */
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("unde... |
7d80237cb0c156056172f1da7543d6fce43a86612ce1a338440e96405a5be603 | JavaScript | 103,352 | 29 | "use strict";(()=>{var _i=Object.create;var br=Object.defineProperty;var Ai=Object.getOwnPropertyDescriptor;var Ci=Object.getOwnPropertyNames,Ft=Object.getOwnPropertySymbols,ki=Object.getPrototypeOf,vr=Object.prototype.hasOwnProperty,eo=Object.prototype.propertyIsEnumerable;var Zr=(e,t,r)=>t in e?br(e,t,{enumerable:!0,... |
4dddb2c6a3b583e3eba954f1b89b2a4b1a241cd19a3698d06818b5667aa666ed | JavaScript | 107,932 | 16 | "use strict";(()=>{var Wi=Object.create;var gr=Object.defineProperty;var Vi=Object.getOwnPropertyDescriptor;var Di=Object.getOwnPropertyNames,Vt=Object.getOwnPropertySymbols,zi=Object.getPrototypeOf,yr=Object.prototype.hasOwnProperty,ao=Object.prototype.propertyIsEnumerable;var io=(e,t,r)=>t in e?gr(e,t,{enumerable:!0,... |
c4b89e0e26cf310a126d07f93590e083d544d1eac23f2f40d14f77e005371468 | JavaScript | 123,057 | 1 | var networks={"GONetwork": {"format_version": "1.0", "generated_by": "cytoscape-3.10.3", "target_cytoscapejs_version": "~2.1", "data": {"shared_name": "GONetwork", "name": "GONetwork", "SUID": 1134018, "__Annotations": [], "selected": false}, "elements": {"nodes": [{"data": {"id": "1134283", "Enrichment": 8.23108141549... |
c788e2e41b7fe6f2df05f2d4bb8dbb7b4fc5c42a1759e7666b7b2f7ffca8fd8f | JavaScript | 125,646 | 3,830 | #!/usr/bin/env k8
var paftools_version = '2.31-r1302';
/*****************************
***** Library functions *****
*****************************/
/*******************************
* Command line option parsing *
*******************************/
var getopt = function(args, ostr) {
var oli; // option letter list... |
f31366ce8941ae4ba24c677ddc3fb69b4b37730f0f9eb5f55e8e2ee8921b4b13 | JavaScript | 129,141 | 3,072 | let snapshot = null;
let snapshotIdentity = null;
let selectedAgent = null;
let selectedEdgeKey = null;
let selectedActivityEventKey = null;
let timelineIndex = null;
let followLatest = true;
let graphMode = 'recent';
let isReplaying = false;
let replayTimer = null;
let repla... |
507155b50b4c90f0c0540e734c1ce25f73553c14ee45a21bb16a8b8f41298988 | JavaScript | 146,237 | 1 | (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.ex... |
c04f2423c6a5fdf84cc47775b6cacab47a61ccdf986d781a2f3d3b50f2c4a8b6 | JavaScript | 146,338 | 68 | /*!
* jQuery JavaScript Library v1.7.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
... |
86360d38843c72bbee04edff18d6e758fb96a52430cf8ffeabb8101a0e77b43a | JavaScript | 151,724 | 1 | !function(){function n(n){return n&&(n.ownerDocument||n.document||n).documentElement}function t(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function e(n,t){return t>n?-1:n>t?1:n>=t?0:NaN}function r(n){return null===n?NaN:+n}function i(n){return!isNaN(n)}function u(n){return... |
bfeda54f71bf2ded39ae3328b038be174f0c5b879aa5f509a555227eb7e775f1 | JavaScript | 155,545 | 46 | window.pdocSearch = (function(){
/** elasticlunr - http://weixsong.github.io * Copyright (C) 2017 Oliver Nightingale * Copyright (C) 2017 Wei Song * MIT Licensed */!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=func... |
b6d110097caff89b89fa8e32bf8ea990199935b183a29c16127c608aaf643b9e | JavaScript | 157,204 | 4,371 | // Production steps of ECMA-262, Edition 6, 22.1.2.1
// Référence : https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from
if (!Array.from) {
Array.from = (function () {
var toStr = Object.prototype.toString;
var isCallable = function (fn) {
return typeof fn === 'function' || toStr.call(f... |
625181cf7711c7fabcb67418ba215e69d3547b48798408c6d058b171794dbff7 | JavaScript | 160,041 | 46 | window.pdocSearch = (function(){
/** elasticlunr - http://weixsong.github.io * Copyright (C) 2017 Oliver Nightingale * Copyright (C) 2017 Wei Song * MIT Licensed */!function(){function e(e){if(null===e||"object"!=typeof e)return e;var t=e.constructor();for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var t=func... |
62d3c46ece9a72aaf532a3256f797efa08b8480e6d9b07a791e617430e3cc952 | JavaScript | 161,575 | 4,371 | // Production steps of ECMA-262, Edition 6, 22.1.2.1
// Référence : https://people.mozilla.org/~jorendorff/es6-draft.html#sec-array.from
if (!Array.from) {
Array.from = (function () {
var toStr = Object.prototype.toString;
var isCallable = function (fn) {
return typeof fn === 'function' || toStr.... |
081d79e5e142184180ff8689f500ec2ffeeb847a1b9162e8f50e919f62b42ce7 | JavaScript | 200,000 | 45 | document.addEventListener("DOMContentLoaded", function () {
window.cy = cytoscape({
container : document.getElementById("cy"),
layout : {name: "preset"},
selectionType : "single",
boxSelectionEnabled: false,
pixelRatio : 1,
hid... |
19d09dfc5b1575ed319e35b3fd130d5ea2c20987a8645cb6bb61f69408c567fa | JavaScript | 200,000 | 17 | const F1=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))l(r);new MutationObserver(r=>{for(const n of r)if(n.type==="childList")for(const a of n.addedNodes)a.tagName==="LINK"&&a.rel==="mo... |
1c0dd7836db51de5250e59a6e8f05c21f6c5ee3cfd9627327656b448046f1ff3 | JavaScript | 200,000 | 408 | JSApplet.Inchi ={};
(function(){
var d;d||(d=eval("(function() { try { return JSApplet.Inchi || {} } catch(e) { return {} } })()"));var k={},l;for(l in d)d.hasOwnProperty(l)&&(k[l]=d[l]);var aa=!1,r=!1,ba=!1,ca=!1;
if(d.ENVIRONMENT)if("WEB"===d.ENVIRONMENT)aa=!0;else if("WORKER"===d.ENVIRONMENT)r=!0;else if("NODE"===d.... |
4bcb2405926756ca75ced67a70112b91aa9025605b089b9569b9c3cf646c659e | JavaScript | 200,000 | 1 | var networks={"GONetwork": {"format_version": "1.0", "generated_by": "cytoscape-3.10.3", "target_cytoscapejs_version": "~2.1", "data": {"shared_name": "GONetwork", "name": "GONetwork", "SUID": 653761, "__Annotations": [], "selected": true}, "elements": {"nodes": [{"data": {"id": "654313", "Enrichment": 6.93191419682331... |
77093a119e1a71235aee3d32978abfb518a831a459480c30a16af830309b2ea3 | JavaScript | 200,000 | 7,555 | /*!
* jQuery JavaScript Library v3.3.1
* https://jquery.com/
*
* Includes Sizzle.js
* https://sizzlejs.com/
*
* Copyright JS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2018-01-20T17:24Z
*/
( function( global, factory ) {
"use strict";
if ( t... |
83bb13a7b1cb4d0960b2532bc570ec9e0dec31fde90818dca71deb12a5b27b99 | JavaScript | 200,000 | 1 | jsme.onScriptDownloaded(['var $wnd = $wnd || window.parent;var __gwtModuleFunction = $wnd.jsme;var $sendStats = __gwtModuleFunction.__sendStats;$sendStats(\'moduleStartup\', \'moduleEvalStart\');var $gwt_version = "2.5.1";var $strongName = \'FEB169D74546A3B279D22AE09AFB86BD\';var $doc = $wnd.document;function __gwtStar... |
a16885da363b6f8ae418d25c115cd64703d2140b836d1562cf89766e522118fa | JavaScript | 200,000 | 1 | Search.setIndex({"alltitles": {"1. Create a free Mathworks account:": [[93, "create-a-free-mathworks-account"]], "1. Download MEA-NAP folder from GitHub:": [[94, "download-mea-nap-folder-from-github"]], "1. General parameters": [[3, "general-parameters"]], "1. Launch the GUI": [[90, "launch-the-gui"]], "1. Upload the H... |
b2cdbca8faf145ceb0763c3d8c7fb35c72c120e670332602e4df9611d90b694f | JavaScript | 200,000 | 7 | /**
* plotly.js v1.52.1
* Copyright 2012-2020, Plotly, Inc.
* All rights reserved.
* Licensed under the MIT license
*/
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=t... |
c89b73749001a7d5a0de109dac1f8c474d69a37a921e5457e64bbf8823c92610 | JavaScript | 200,000 | 1 | jsme.onScriptDownloaded(['var $wnd = $wnd || window.parent;var __gwtModuleFunction = $wnd.jsme;var $sendStats = __gwtModuleFunction.__sendStats;$sendStats(\'moduleStartup\', \'moduleEvalStart\');var $gwt_version = "2.5.1";var $strongName = \'870EF2BAB6A388B0F864EB54CB3F82A8\';var $doc = $wnd.document;function __gwtStar... |
cf5d86fa0382d64c4980f39904af2ab6680b8468bd0e8c64a0c162e64261d4c3 | JavaScript | 200,000 | 7,457 | /*!
* jQuery JavaScript Library v1.7.2
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
* Copyright 2011, The Dojo Foundation
* Released under the MIT, BSD, and GPL Licenses.
... |
ed25a3d47d121665160efd6ad168b15ac002507e55e5d31b9c68bae5d556f0b0 | JavaScript | 200,000 | 398 | /*
Highcharts JS v7.1.2 (2019-06-03)
(c) 2009-2018 Torstein Honsi
License: www.highcharts.com/license
*/
(function(O,J){"object"===typeof module&&module.exports?(J["default"]=J,module.exports=O.document?J(O):J):"function"===typeof define&&define.amd?define("highcharts/highcharts",function(){return J(O)}):(O.Highch... |
f2d12eb8355450b1874da53d60686dab26f1e269ea9056a3a94e9df5495d23a5 | JavaScript | 200,000 | 30 | (function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(function () {
return (root.cv = factory());
});
} else if (typeof module === 'object' && module.exports) {
// Node. Does not work with strict CommonJS, but
// only ... |
1cc5a3ae45ee130d02b7b01a08840a09cbb6baa22e111b695bcb61e5316a2ba1 | JavaScript | 200,001 | 1 | !function(){var a={};a.dev=!1,a.tooltip=a.tooltip||{},a.utils=a.utils||{},a.models=a.models||{},a.charts={},a.logs={},a.dom={},"undefined"!=typeof module&&"undefined"!=typeof exports&&"undefined"==typeof d3&&(d3=require("d3")),a.dispatch=d3.dispatch("render_start","render_end"),Function.prototype.bind||(Function.protot... |
fcdd94cc9ebbdfb434d46423841d234c5f41b6a46007decf89e037541e95bc9b | JavaScript | 200,001 | 2 | // https://d3js.org v5.7.0 Copyright 2018 Mike Bostock
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})}(this,function(t){"use strict";function n(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function e(t){var e;return 1===... |
ea19c3fa7af88a1af5d96e2fd569e2dae3473ecdc97efd7098fd00d373b2a5b7 | JavaScript | 200,008 | 32 | /**
* Copyright (c) 2016-2020, The Cytoscape Consortium.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the “Software”), to deal in
* the Software without restriction, including without limitation the rights to
* use, c... |
4bcb3c3300be924f308f87ebb3e721a396dd533e9c269786e09c6140a1c9c8a2 | JavaScript | 201,027 | 26 | /**
* vis-network
* https://visjs.github.io/vis-network/
*
* A dynamic, browser-based visualization library.
*
* @version 0.0.0-no-version
* @date 2021-09-28T12:03:00.413Z
*
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
* @copyright (c) 2017-2019 visjs contributors, https://github.co... |
fed4f0232060d70218d7e4a68684e9801d82dc4ccad46e756a1daf7bde148a52 | JavaScript | 201,027 | 26 | /**
* vis-network
* https://visjs.github.io/vis-network/
*
* A dynamic, browser-based visualization library.
*
* @version 0.0.0-no-version
* @date 2021-09-28T12:03:00.413Z
*
* @copyright (c) 2011-2017 Almende B.V, http://almende.com
* @copyright (c) 2017-2019 visjs contributors, https://github.com/visjs
*... |
91a7bc93b46cd5f4c07bfd95ad4167e61df221969415618461df2674e74f09e2 | Julia | 46 | 3 | module PollenForecasting
end # module Pollen
|
5547180e57ba1f352fcddcc4076a1537f6e5d7f49c97e3a4409cff4c80cedf6e | Julia | 90 | 2 | ENV["JULIA_PKG_USE_CLI_GIT"] = true
ENV["JULIA_PKG_SERVER_REGISTRY_PREFERENCE"] = "eager"
|
b1ddb2b3a6a4311471a2ec48f55f76d125c12ff0c66b7ad3019f6ba06ecbe4d5 | Julia | 115 | 7 | using Microstructure
using Test
@testset "Microstructure.jl" begin
include("test_compartment.jl")
###
end
|
7080a67871973b61838f66305bb43f8160d48839da0022c4755a3df63d1cf8cb | Julia | 152 | 5 | # MSR = Mean Squared Reorientation
function MSR(traj::AbstractVector, q::Int)
return mean(abs2, sum(traj[i:(i+q)]) for i = 1:(length(traj)-q))
end
|
f974d39a393993f74b6a5b701e4a463e41641b05717a498760700267e0cab547 | Julia | 156 | 7 | import Aqua
import ZebrafishHMM2023
using Test: @testset
@testset verbose = true "aqua" begin
Aqua.test_all(ZebrafishHMM2023; ambiguities = false)
end
|
258c65e1bc17c0d0248f232018c1f3dcb1eae882723411b8594f617cee20f754 | Julia | 187 | 10 | using ZebrafishHMM2023: ATol
using Test: @test, @testset
@testset "ATol" begin
@test -0.1 < ATol(1)
@test +0.1 < ATol(1)
@test !(+5 < ATol(1))
@test !(-5 < ATol(1))
end
|
3fd5db5bdb5d54dd6307e7e20794e98a0cbb7c219eb29bedcfbd9f802f8e2315 | Julia | 235 | 14 | # src/LinearRNNforFMRIdigitaltwins.jl
module LinearRNNforFMRIdigitaltwins
include("utils.jl")
include("fmri_common.jl")
include("RC.jl")
include("dmd_utils.jl")
using .Utils
using .FMRICommon
using .ESN
using .DMDUtils
end # module
|
6791aabd96f78c8537017a42ff18d6bdbf99991e924b13f24eaa17742d3bb14b | Julia | 245 | 12 | # Development version
module Microstructure
include("dMRI.jl")
include("values.jl")
include("compartments.jl")
include("models.jl")
include("estimators_mcmc.jl")
include("estimators_nn.jl")
include("threading.jl")
include("diagnostics.jl")
end
|
e0b46e4eb0e948d307ac5671a53573795ca7206fddf50a4c2163a0635a45217e | Julia | 250 | 7 | using Test: @test, @testset
using ZebrafishHMM2023: legoc2021_single_fish_T26_full_obs
@testset "legoc2021_single_fish_T26_full_obs" begin
long_trajs = legoc2021_single_fish_T26_full_obs()
@test length(long_trajs) == 18 # number of fish
end
|
195c05528426039a3901a78097def422ee9b9aa4c339d756a5dc29a269816ece | Julia | 261 | 15 | import Pkg
Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/cossio/CossioJuliaRegistry.git"))
Pkg.Registry.add("General")
Pkg.activate()
Pkg.add([
"CairoMakie",
"Makie",
"MyRegistrator",
"Revise",
])
Pkg.activate(pwd())
Pkg.update()
|
b07516754cd64d5a163ce768d2913a3f4a3de1fd4207751a1e30841bc5206547 | Julia | 263 | 14 | using Pkg
hamster_path = string(@__DIR__)
#Try to update Hamster
try
println("Starting Hamster update...")
Pkg.activate(hamster_path)
Pkg.update()
Pkg.resolve()
catch e
println("There was an error while updating Hamster.")
rethrow(e)
end |
b01e5e4345690d2ae903dbfd48f2ba515ea073ee075824acab6e0640c88beca6 | Julia | 300 | 9 |
prob = NonlinearSolve.IntervalNonlinearProblem((λ, _) -> _find_root_for_artr_sym_f(q1, q2, λ), (lb, ub))
sol = NonlinearSolve.solve(prob, NonlinearSolve.ITP(); abstol = 0.01)
f(u, p) = u * u - 2.0
uspan = (1.0, 2.0) # brackets
prob_int = IntervalNonlinearProblem(f, uspan)
sol = solve(prob_int)
|
d1e01e01d30a87606e31d8d8d0220bddf5a4c4904bdc766f626148ce7e925db4 | Julia | 323 | 11 | conf_path = string(@__DIR__)*"/hconf"
conf = get_config(filename=conf_path)
@testset "Config Read" begin
@test conf("run_def") == true
@test conf("n", "Ga") == 3
@test conf("orbitals", "Ga") == ["sp3dr2", "sp3dr2", "sp3dr2" ,"sp3dr2"]
# test sp_geo=true without spaces
@test conf("sp_geo") == true
... |
c9a33315ea85d7334a915e21a2c9bd88bc346e67280e6f9208cf613a2699dfa1 | Julia | 330 | 10 | using Test: @test
using Test: @testset
using ZebrafishHMM2023: load_behaviour_free_swimming_data
@testset "load_behaviour_free_swimming_data" begin
data = load_behaviour_free_swimming_data(18)
@test data.units["displacements"] == "mm"
@test size(data.bouttime) == (642, 532)
@test data.temperature == "1... |
dffd4f6aa9031d461da0c7188880b8abe587b8e6280ef7fa0567a36eae6874d9 | Julia | 367 | 7 | function simple_PSTH(spk_times,event_times,bin_size, start, stop)
#inputs: - spk_times in sec
# - event
c = [histcounts(spk_times,floor.(event_times[i]+start,digits=2):bin_size:ceil(event_times[i]+stop,digits=2)) for i in 1:length(event_times)]
spk_cnt = sum(c,dims=1)
return spk_... |
0ed3eb56d4c8d8b2999a7f30920eee76a7b9cade4281b1ef065ad953c82c6109 | Julia | 411 | 15 | # COLORS
using ColorSchemes
using BrainRBMjulia: cmap_aseismic
COLORS_FISH = ColorSchemes.Set1_6#[0:0.25:1]
COLOR_TEACHER = "#bf0bb6" # violet eggplant
COLOR_STUDENT = "#0bbf14" # malachite
COLOR_STUDENTb = "#85df8a" # pastel green
CMAP_WEIGHTS = :seismic
CMAP_WEIGHTS_2d = cmap_aseismic()
CMAP_DENSITY = :inferno
CMAP_... |
4cbb6aafa1b3ac7b5b1a6d278f94f61a7a9e394800db8da0984e848449d50a4f | Julia | 522 | 17 | #= A distribution that treats missing data as Pdist(missing) = 1, at inference time,
with the goal of marginalizing over the missing data points. =#
struct DistributionMissingWrapper{D}
dist::D
end
function Base.rand(r::AbstractRNG, d::DistributionMissingWrapper)
return rand(r, d.dist)
end
function DensityInt... |
a1f23bfffd46a656b4a4f8bea993779b700fa042bf083246f4779d3b12a976ff | Julia | 547 | 8 | # ====================
# Structure defaults
# ====================
@configtag rcut Float64 7.0 "Distance beyond which all interactions are neglected."
@configtag rcut_tol Float64 1.0 "offset (zero point) of the cutoff function w.r.t. `rcut`."
@configtag Rmax Int64 1 "maximum magnitude of translation vectors used for pe... |
3ee4879f38689201368226c3a9fa574dd7aa1c778b90f109aeb335bb1cf0bb95 | Julia | 564 | 30 | #!/usr/bin/env julia
include("HHChannels.jl")
using JSON
using Unitful
using Unitful.DefaultSymbols
using Main.HHChannels
scale(quantity, unit) = uconvert(NoUnits, quantity/unit)
radius = 18.8µm/2
area = 4*pi*radius^2
stim = Stim(10ms, 100ms, 0.1nA/area)
ts, vs = run_hh(100ms, stim=stim, sample_dt=0.025ms)
trace ... |
ac78c377e34d68c91073de68dfac04a1acb1c7971db2368d1d5f76a293f9dccc | Julia | 577 | 17 | using ForwardDiff: derivative
using Statistics: middle
using Test: @testset, @test
using ZebrafishHMM2023: _find_root_for_artr_sym_f, _find_root_for_artr_sym_df, _find_root_for_artr_sym_bounds
@testset "find_root_for_artr_sym" begin
q1 = rand(10)
q2 = rand(15)
lb, ub = _find_root_for_artr_sym_bounds(q1, q... |
47b70c33a3006e3222e4197b11eb81a571b020823c5fea530b46c1830bcd7ce5 | Julia | 580 | 12 | module aqua_tests include("aqua.jl") end
module full_trajs_tests include("full_trajs.jl") end
module wolf_artr_tests include("wolf_artr.jl") end
module hmm_artr_3_sym_tests include("hmm_artr_3_sym.jl") end
module hmm_artr_tests include("artr_hmm.jl") end
module artifacts_tests include("artifacts.jl") end
module truncat... |
86d7f6d295b144c3707d37d309ec37a78d7a2d148eaf425fde1c3a410ebf283b | Julia | 617 | 36 | #!/usr/bin/env julia
include("HHChannels.jl")
using JSON
using Unitful
using Unitful.DefaultSymbols
scale(quantity, unit) = uconvert(NoUnits, quantity/unit)
radius = 20µm/2
area = 4*pi*radius^2
sample_dt = 0.025ms
t_end = 100ms
a0 = 0.01mA/cm^2
c = 0.01mA/cm^2
tau = 10ms
ts = collect(0s: sample_dt: t_end)
is = ... |
70aac546ed8e294e619469ccc5482d70f84cccc84584dc8c9398007b53942f60 | Julia | 631 | 17 | #=
Currently baum_welch from HMMs with check_loglikelihood_increasing=false will stop running
whenever logL_evolution[end] - logL_evolution[end - 1] < atol, which can be true even if
the log-likelihood difference is quite large (just because it can be negative).
While we wait for a fix of this issue, we can use the fo... |
3f75c4cd155056ecddd028181d17597e6f8f8142e06a7a48ba4a3dc47e86f99f | Julia | 660 | 13 | @testset "Index maps" begin
# Test 1: Test one ion with multiple orbitals
@test Hamster.get_index_to_ion_orb_map([3]) == [(1, 1), (1, 2), (1, 3)]
# Test 2: Test multiple ions with same number of orbitals
@test Hamster.get_index_to_ion_orb_map([3, 3]) == [(1, 1), (1, 2), (1, 3), (2, 1), (2, 2), (2, 3)]
... |
454af3caad1382302c9a81eecaac8dd1aaa79e3a186c055f0a1c4a846829f6c6 | Julia | 675 | 21 | using Test: @testset, @test
using ZebrafishHMM2023: load_behaviour_free_swimming_data,
behaviour_free_swimming_temperatures,
legoc2021_single_fish_T26_trajs
@testset "NaN are used for padding ($(T)°C)" for T in behaviour_free_swimming_temperatures()
data = load_behaviour_free_swimming_data(T)
for col i... |
41e427fe58a8ce3662562634948b97562d6882e845cd888b344cd2d8e4daf953 | Julia | 690 | 30 | struct SignedGamma
gamma::Gamma{Float64}
positive::Bool
end
function SignedGamma(gamma::Gamma; positive::Bool)
return SignedGamma(gamma, positive)
end
function SignedGamma(α::Real, θ::Real; positive::Bool)
return SignedGamma(Gamma(α, θ); positive)
end
function Base.rand(r::AbstractRNG, d::SignedGamma... |
8b535855ce9abab6e73f53e9c38d732525ffa852e4c244e8f49bd1000d551f43 | Julia | 690 | 14 | using ZebrafishHMM2023: load_behaviour_free_swimming_data, normalize_all!,
normalize_transition_matrix!,
load_behaviour_free_swimming_trajs,
ZebrafishHMM_G3, ZebrafishHMM_G4, ZebrafishHMM_TN03, ZebrafishHMM_TN04, ZebrafishHMM_TN04_Sym,
ZebrafishHMM_TN3, ZebrafishHMM_TN4, markov_equilibrium, stubborness_... |
fd42338fa107549e92e2129037a5396bd7b5af380894d2a8d6d9ff406249931d | Julia | 733 | 27 | using MPI, Hamster, Printf
MPI.Init()
comm = MPI.COMM_WORLD
rank = MPI.Comm_rank(comm)
nranks = MPI.Comm_size(comm)
num_nodes = parse(Int64, get(ENV, "SLURM_JOB_NUM_NODES", "1"))
args = Hamster.parse_commandline(ARGS)
conf = haskey(args, "conf") ? get_config(filename=args["conf"]) : get_config()
for (key, value) in ... |
beed420a37ecaf09e5e95e70834d8e390e03b0c03ee912de21e1547c28690ad7 | Julia | 745 | 9 | # ====================
# HyperOpt defaults
# ====================
@configtag params Vector{String} String[] "hyperparameters to be optimized as [BLOCK_]PARAM." "HyperOpt"
@configtag lowerbounds Vector{Float64} [0.] "lower bounds of the search space." "HyperOpt"
@configtag upperbounds Vector{Float64} [0.] "upper bounds ... |
a2246d79930c9ae77103d7b7e5d1bd5f1259bd8d784dfded496a7e5d6f6a925f | Julia | 755 | 27 | (@main)(args) = main(args)
function main(args)
if isempty(args)
println("Usage: julia launcher.jl path/to/script.jl [exp_min=2.5] [exp_max=6.0] [exp_step=0.5] [threads=6]")
return 1
end
target_script = args[1]
exp_min = length(args) ≥ 2 ? parse(Float64, args[2]) : 2.5
exp_max = len... |
5cfaedffcf87a45b7b38c4a361bc125baf20a2ae0cb6618b9110f312d5c4e0dc | Julia | 770 | 18 | using ZebrafishHMM2023: ZebrafishHMM_G3_Sym_Full, load_full_obs, ATol, normalize_transition_matrix, ZebrafishHMM_G3_Sym_Full_Exp
using HiddenMarkovModels: baum_welch, logdensityof
using Distributions: Gamma, Exponential
using Statistics: mean, std
trajs = load_full_obs(18)
hmm = ZebrafishHMM_G3_Sym_Full_Exp(;
pin... |
82bf9050798b466f0636f4ef183b47c4ecaca43a939385cc130d731a022ab110 | Julia | 775 | 21 | gaas_poscar = string(@__DIR__) * "/../parse/test_files/POSCAR_gaas"
@testset "Basis GaAs" begin
conf = get_empty_config()
set_value!(conf, "orbitals", "Ga", "sp3dr2 sp3dr2 sp3dr2 sp3dr2")
set_value!(conf, "orbitals", "As", "sp3dr2 sp3dr2 sp3dr2 sp3dr2")
set_value!(conf, "n", "Ga", 3)
set_value!(con... |
88fe193e55a3c2b7de79c2f25abd3ad5384c99b2ec015b31a6bfc809a46d461a | Julia | 775 | 30 | notebookpath() = replace(@__FILE__, r"#==#.*" => "")
# addapted from https://discourse.julialang.org/t/pluto-get-current-notebook-file-path/60543/8
# macro figsave(fig, name)
# notebook = __source__.file
# return quote
# println(notebook)
# end
# end
macro toJupiter(b)
toJupiter(String(split(String(__sourc... |
8691b973f5d0f8a7dca662e5daf1a6310c2b135d037235c9a0104ca327b0967b | Julia | 794 | 22 | using Random
using Images
using ImageFiltering
function adjust_image_cm(image, center, target_dim)
img_adj = zeros(UInt16, target_dim)
dim_x, dim_y, dim_z = size(image)
center_x, center_y, center_z = center
dx, dy, dz = round.(Int, target_dim ./ 2)
rg_x = max(center_x - dx + 1, 1):min(center_x + ... |
bb2e1f81358f6d5f3b85a7e866d16cb5217bc0fada3e3dfa2e54d273a46be07c | Julia | 814 | 23 | function simple_raster_units(spk_times, event_time, start, stop)
n_units = size(spk_times, 1)
X = []
Y = []
for u in 1:n_units
ts_in_window = find_spks_in_window(spk_times[u], event_time, start, stop)
units_rows = ones(length(ts_in_window)).*u
append!(X,ts_in_window)
append!(Y,units_rows... |
51885de9d2d8eeeb479cf4d286d901ce286d9609aa74283d09fe03bfa7c803f8 | Julia | 879 | 21 | @testset "Wannier90 parser" begin
path = joinpath(@__DIR__, "test_files")
# Test 1: test real = true (default)
Hr, Rs, deg = Hamster.read_hrdat(joinpath(path, "wannier90_hr.dat"), real=true)
Hr_true = read_from_file(joinpath(path, "Hr_real_true.dat"), type=ComplexF64)
all_correct = map(eachinde... |
5a9345b1f10d74add8b12df398d829f5a5b74dc0bef63686c567ae077cc9b8da | Julia | 889 | 43 | #!/usr/bin/env julia
include("LVAChannels.jl")
using JSON
using Unitful
using Unitful.DefaultSymbols
using Main.LVAChannels
scale(quantity, unit) = uconvert(NoUnits, quantity/unit)
radius = 20µm/2
area = 4*pi*radius^2
current = -0.025nA
stim = Stim(20ms, 150ms, current/area)
ts, vs, m, d, h = run_lva(300ms, param=... |
885e520b96442f483b6045129de356bb1f9826274300b176c0832ee753e3adf4 | Julia | 890 | 17 | # ====================
# Ewald defaults
# ====================
"""
ewald=false
A model to account for long-term electrostatics (Ewald summation) is constructed if a block `Ewald` is present in the config file.
"""
get_ewald(conf::Config)::Bool = haskey(conf.blocks, "Ewald") || (conf("ewald") ≠ "default" ? conf("ew... |
85a50887400983012d9a01582657b6b0987c9da5bb71296d6daad7c0d949268a | Julia | 891 | 23 | test_file_path = string(@__DIR__ ) * "/test_files/"
poscar = Hamster.read_poscar(test_file_path*"POSCAR_gaas")
@testset "Element/Number conversion" begin
@test Hamster.element_to_number("C") isa UInt8
@test Hamster.element_to_number("Ga") == 31
@test Hamster.element_to_number("Si") == 14
@test Hamster.... |
f7acc1e78a4c5a4a47ce335ae1d2b98aaa7ff5502daf7907f8938c940520e875 | Julia | 901 | 27 | @testset "Hamiltonian I/O" begin
H_original = [rand(5,5), sprand(5,5,0.3)] # mix of dense and sparse
vecs_original = rand(3, 5)
write_ham(H_original, vecs_original, comm, rank; space="k")
H_loaded, vecs_loaded = read_ham(comm, rank; space="k")
H_loaded_2, vecs_loaded_2 = read_ham(rank; space=... |
937631ac1be29da854c8c0bf44b398b9e758dea3483fda891f37ad7024a07ef8 | Julia | 940 | 30 | """
soc=false
A model to account for spin-orbit coupling (SOC) is constructed if a block `SOC` is present in the config file.
"""
get_soc(conf::Config)::Bool = haskey(conf.blocks, "SOC") || (conf("soc") ≠ "default" ? conf("soc") : false)
"""
update_soc=true
The `update_soc` tag determines whether the SOC par... |
6cdf8fea7814dad6c5566dd5ed75ac258d29b3fa47a5e8c0526d6970cdd10ff8 | Julia | 957 | 19 | # Example script of using relaxationColor
using PyPlot
using FileIO
include("RelaxationColor.jl") # the location of the julia files from git
fn = "sampleT1map.jld" # A previously stored file containing the Julia variable "sampleT1map",
# ass... |
ea4b9b855c6ec260b3054b425ee376b66b4bdba3c8fc72a8a3becd91a4b1d0f6 | Julia | 973 | 34 | import Random
using Test: @test, @testset
using ZebrafishHMM2023: half_normal_fit, half_normal_loglikelihood
using SpecialFunctions: logerfcx
using Distributions: truncated, Normal, logpdf
using Statistics: mean
@testset "half_normal_loglikelihood" begin
Random.seed!(1)
for _ = 1:10
x = randn(100).^2 ... |
606612dff5de01747263633bfd31f36dc334e1e05e82a59c158c5c9763c4aaa1 | Julia | 985 | 20 | """
**alpha**=0.7*Z
The `alpha::Float` value determines how rapid the orbital overlap for a specific ion type falls off with distance. Defaults to 70% of the core charge.
"""
get_alpha(conf::Config, type)::Float64 = conf("alpha", type) == "default" ? 0.70 * elements[Symbol(type)].number : conf("alpha", type)
"""
**n*... |
e1c24631191d7ee32db490947c4fe37bf7a353793798c70d808dbf0a5139e280 | Julia | 1,013 | 36 | using Documenter
using Hamster
makedocs(
sitename = "Hamster",
modules = [Hamster],
format = Documenter.HTML(;
# Use clean URLs, unless built as a "local" build
prettyurls=get(ENV, "CI", nothing) == "true",
edit_link="master",
size_threshold=nothing, # do not fail build if large HTML outpu... |
9c51546ce26517369683ae6add9a8b431f4df37883c9b1fe8792ef7b458d0f11 | Julia | 1,042 | 29 | using PrecompileTools: @compile_workload, @setup_workload
@setup_workload begin
v = rand(3); w = rand(3); dv = rand(3); dw = rand(3); t = rand(3)
Rs = rand(1:3, 3, 5)
Rs_float = rand(3, 5)
ks = rand(3, 5)
Hrs = Matrix{Float64}[rand(4, 4) for R in 1:5]
Hr_sp = [sprand(4, 4, 0.1) for R in 1:5]
... |
3363cc6325442d7851c22875373527ea9c5b6605296c21df5b0f5781e55ca45c | Julia | 1,058 | 27 | """
soc=false
A model to account for spin-orbit coupling (SOC) is constructed if a block `SOC` is present in the config file.
"""
get_soc(conf::Config)::Bool = haskey(conf.blocks, "SOC") || (conf("soc") ≠ "default" ? conf("soc") : false)
push!(CONFIG_TAGS, ConfigTag{Bool}("soc", conf->get_soc(conf), "activates soc... |
22583f906553d50e99059254ff8311cb56ff3459c4aa9db041981adf3d30c0a6 | Julia | 1,086 | 57 | using Makie
pt_px = 4 / 3
ticklabel = 8
axelabel = 10
title = 12
ticklenght = 3
rasterize = 5
style_publication = Theme(
size=(200, 200),
font="Arial", # ?
fontsize=7 * pt_px,
Axis=(
rightspinevisible=false,
topspinevisible=false,
spinewidth=1 * pt_px,
titlefont=:bold,
titlesize=title * p... |
67186c53c6c6a28b07943d3af2e76052113b7d3d8e4a8b90efc1f9b362f523b1 | Julia | 1,109 | 34 | """
rcut=7.
The parameter `rcut` sets the cut-off radius beyond which all interactions are neglected. A cut-off radius of zero means all interactions are considered.
"""
get_rcut(conf::Config)::Float64 = get(conf, "rcut", 7.0)
"""
rcut_tol=1.
The parameter `rcut_tol` sets a tolerance for the cutoff function.... |
265418fa158bcdac61a2ad1c619612e1b25842004f0120ea1834488ddfe12756 | Julia | 1,148 | 41 | using HDF5
using Plots
# MAIN PATH
ZENODOPATH = "Your/Path/To/Zenodo/Data"
# FIGURE PATH
FIGPATH = "Your/path/to/figures"
# Units and Mice selection for figure
unit_nbs = [257 173 296 278]
mice = ["PL027_20190511-probe0" "216301_20200521-probe0" "PL031_20190524-probe0" "PL054_20191122-probe0"]
r = fill(NaN,4)
b = ... |
2e6e334622801f5a5be25a1f911dddfb2ddec3c306c56f3b6c391326cd1992cc | Julia | 1,152 | 35 | ##
using Pkg
script_dir = @__DIR__ # Get the directory of the current script
project_root = joinpath(script_dir, "..", "..") # Get the path to the parent directory (the project root)
Pkg.activate(project_root) # Activate the project
#Pkg.instantiate() # download all the required packages
using DelimitedFiles
using Sta... |
6e3350c71b444c3621f99617facdada1652e451643701b349ba551acab924af5 | Julia | 1,181 | 34 | #= Build a vector of trajectories. Every NaN splits a trajectory in two =#
# function build_trajectories(dtheta::AbstractMatrix{T}) where {T}
# all_trajs = Vector{Float64}[]
# for n in axes(dtheta, 2)
# column = dtheta[:, n]
# nan_idx = findall(isnan, column)
# if isempty(nan_idx)
# ... |
bd6b16257ad68860ef1e8e9aa9b1a65ad9d9a249c660adc103c66a20ebd59d1e | Julia | 1,186 | 27 | """
**alpha**=0.7*Z
The `alpha::Float` value determines how rapid the orbital overlap for a specific ion type falls off with distance. Defaults to 70% of the core charge.
"""
get_alpha(conf::Config, type)::Float64 = conf("alpha", type) == "default" ? 0.70 * elements[Symbol(type)].number : conf("alpha", type)
"""
**n*... |
c34bbd4beab1c6fcd981fd74c5ea1006b99f08954b93a348794c130e48d23ed2 | Julia | 1,195 | 28 | using Test: @test, @testset
using HiddenMarkovModels: logdensityof, baum_welch, transition_matrix, initial_distribution
using Distributions: Normal, Gamma
using ZebrafishHMM2023: ZebrafishHMM_Elife2020, stubborness_factor,
ZebrafishHMM_Elife2020_Gamma, ZebrafishHMM_G4_Sym,
load_behaviour_free_swimming_trajs, no... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.