#How to use this?
This file contains hidden or 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
| import json | |
| from pathlib import Path | |
| cves_dir = Path('cves/2025') | |
| severity_count = {'CRITICAL': 0, 'HIGH': 0, 'MEDIUM': 0, 'LOW': 0, 'UNKNOWN': 0} | |
| total = 0 | |
| for json_file in cves_dir.rglob('*.json'): | |
| total += 1 | |
| try: |
This file contains hidden or 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
| import math | |
| import numpy as np | |
| def logsumexp(a, b): | |
| """Stable log(exp(a) + exp(b))""" | |
| m = np.maximum(a, b) | |
| return m + np.log(np.exp(a - m) + np.exp(b - m)) |
This file contains hidden or 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
| ;;; packages.el --- latexsub layer packages file for Spacemacs. | |
| ;; | |
| ;; Copyright (c) 2012-2018 Sylvain Benner & Contributors | |
| ;; | |
| ;; Author: Adrià Garriga Alonso <adria@k9> | |
| ;; | |
| ;; This file is not part of GNU Emacs. | |
| ;; | |
| ;;; License: GPLv3 |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| import abc | |
| import torch | |
| from gpytorch.distributions import MultivariateNormal | |
| from gpytorch.lazy import CholLazyTensor | |
| from gpytorch.variational._variational_distribution import \ | |
| _VariationalDistribution |
This file contains hidden or 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
| fdsf |
This file contains hidden or 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
| <mujoco model="inverted pendulum"> | |
| <compiler inertiafromgeom="true"/> | |
| <default> | |
| <joint pos="0 0 0" armature="0" damping="0" frictionloss="0" limited="true"/> | |
| <geom pos="0 0 0" contype="0" conaffinity="0" friction="0 0 0" | |
| rgba="0.7 0.7 0 1"/> | |
| <tendon/> | |
| <motor ctrlrange="-1 1" ctrllimited="true"/> | |
| </default> | |
| <option gravity="0 0 -9.81" integrator="RK4" timestep="0.02"/> |
This file contains hidden or 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
| #include<stdio.h> | |
| void f(char*b){while(*b){if(*b=='"'||*b=='\\')putchar('\\');if(*b=='\n') printf("\\n"),b++; else putchar(*b++);}} | |
| void g(char *c){printf("%s", c); putchar('"'); f(c); printf("\");}\n");} | |
| int main(){g("#include<stdio.h>\nvoid f(char*b){while(*b){if(*b=='\"'||*b=='\\\\')putchar('\\\\');if(*b=='\\n') printf(\"\\\\n\"),b++; else putchar(*b++);}}\nvoid g(char *c){printf(\"%s\", c); putchar('\"'); f(c); printf(\"\\\");}\\n\");}\nint main(){g(");} |
This file contains hidden or 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
| #!/usr/bin/env python2 | |
| import tensorflow as tf | |
| import numpy as np | |
| import time | |
| # Hyperparameters | |
| learning_rate = 1e-1 | |
| n_hidden = 100 | |
| seq_length = 25 | |
| n_show = 2500 // seq_length |
This file contains hidden or 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
| (setv test | |
| (let [[a 5] | |
| [b 7]] | |
| (print a b))) | |
| (print (type test)) |
NewerOlder