Skip to content

Instantly share code, notes, and snippets.

@yogeshVU
yogeshVU / stop postgresql 13 on mac
Created September 12, 2024 14:11
stop postgresql 13 on mac
sudo -u postgres pg_ctl -D /Library/PostgreSQL/13/data stop
import modelTestSchema as model
myModel = model.MetadataForEMAContentSandboxV1()
myModel.ParticipantInfo = model.ParticipantInfo()
myModel.ParticipantInfo.Participant = model.Participant(ParticipantID="123",
ParticipantStatus=model.Dropout(Dropout={}))
myModel.Clinical = model.Clinical()
myModel.Clinical.Length_of_current_MDE = 12
myModel.Clinical.No__of_prior_MDEs = 12
@yogeshVU
yogeshVU / testSchema.json
Created October 10, 2023 21:19
test jsonschema
{
"title": "Metadata for EMA Content Sandbox v1",
"type": "object",
"properties": {
"ParticipantInfo": {
"type": "object",
"properties": {
"Participant": {
"title": "Participant",
"type": "object",
# mongodb...
wget -qO - https://www.mongodb.org/static/pgp/server-4.4.asc | sudo apt-key add -
echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update
sudo apt-get install -y mongodb-org
{
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"dim": {
"type": "integer"
},
"nI": {
"type": "integer"
},
def ssort(arr):
print(arr)
for passno in range(len(arr)):
maxLoc = 0
maxNum=arr[0]
for i in range(len(arr)-passno):
if arr[i]> maxNum:
maxNum,maxLoc = arr[i],i
change=True
http://localhost:6267/control/pauseat:2001-07-23 01:00:00 PDT
wget 'http://localhost:6267/control/pauseat=2001-07-23 00:00:00 PDT'
wget http://localhost:6267/control/resume
wget http://localhost:6267/control/shutdown
@yogeshVU
yogeshVU / gridlabd-server.txt
Created July 19, 2018 15:20
gridlabd-server
http://localhost:6267/control/pauseat:2001-07-23 01:00:00 PDT
wget 'http://localhost:6267/control/pauseat=2001-07-23 00:00:00 PDT'
wget http://localhost:6267/control/resume
wget http://localhost:6267/control/shutdown
--------------------------------------------------------------------------------
CPU name: Intel(R) Xeon(R) CPU E5-2620 v4 @ 2.10GHz
CPU type: Intel Xeon Broadwell EN/EP/EX processor
CPU clock: 2.10 GHz
WARNING: PMC4-7 on Intel Broadwell systems requires KERNEL option to work
properly. The KERNEL option is added automatically for PMC4-7.
Be aware that the events also count during kernel execution and may
be higher than expected.
WARNING: PMC4-7 on Intel Broadwell systems requires KERNEL option to work
properly. The KERNEL option is added automatically for PMC4-7.
SHORT CACHE Specific
EVENTSET
FIXC0 INSTR_RETIRED_ANY
FIXC1 CPU_CLK_UNHALTED_CORE
FIXC2 CPU_CLK_UNHALTED_REF
PMC0 L2_TRANS_ALL_REQUESTS
PMC1 L2_RQSTS_MISS
PMC4 MEM_LOAD_UOPS_RETIRED_L3_ALL
PMC5 MEM_LOAD_UOPS_RETIRED_L3_MISS