Skip to content

Instantly share code, notes, and snippets.

View sbenthall's full-sized avatar
🎯
Focusing

Sebastian Benthall sbenthall

🎯
Focusing
View GitHub Profile
# Changes to HARK code to adjust for 0.10.6 changes
## Some functions have been moved from HARK. utilities and HARK.simulation to HARK.distribution
WAS:
from HARK.utilities import approxUniform
NOW:
from HARK.distribution import approxUniform
symbols:
states: [m,p]
controls: [c]
parameters: [β, ρ, R, Γ]
exogenous: []
equations:
transition:
- m = (m(-1)-c(-1))*R + p
VP: linux:linux_kernel, OR: torvalds:linux
Number of torvalds:linux tags: 583
Number of torvalds:linux CPEs: 2355
SCORE is 0.14
VP: canonical:ubuntu_linux, OR: Canonical-kernel:Ubuntu-kernel
Number of Canonical-kernel:Ubuntu-kernel tags: 2619
Number of Canonical-kernel:Ubuntu-kernel CPEs: 59
SCORE is 0.0
VP: opensuse:opensuse, OR: openSUSE:kernel
Number of openSUSE:kernel tags: 3140
import git
import os
import shutil
tmp_dir = "tmp_repo_dir"
def get_tags(org,repo):
shutil.rmtree(tmp_dir)
{'configurations': {'CVE_data_version': '4.0',
'nodes': [{'children': [{'cpe': [{'cpe22Uri': 'cpe:/a:microsoft:edge:-',
'cpe23Uri': 'cpe:2.3:a:microsoft:edge:-:*:*:*:*:*:*:*',
'vulnerable': True}],
'operator': 'OR'},
{'cpe': [{'cpe22Uri': 'cpe:/o:microsoft:windows_10',
'cpe23Uri': 'cpe:2.3:o:microsoft:windows_10:*:*:*:*:*:*:*:*',
'vulnerable': False},
{'cpe22Uri': 'cpe:/o:microsoft:windows_10:1511',
'cpe23Uri': 'cpe:2.3:o:microsoft:windows_10:1511:*:*:*:*:*:*:*',
$ nosetests --with-coverage --cover-package=bigbang
/home/sb/anaconda3/envs/bigbang/lib/python2.7/site-packages/IPython/nbformat.py:13: ShimWarning: The `IPython.nbformat` package has been deprecated since IPython 4.0. You should import from nbformat instead.
"You should import from nbformat instead.", ShimWarning)
/home/sb/anaconda3/envs/bigbang/lib/python2.7/site-packages/nbformat/current.py:19: UserWarning: nbformat.current is deprecated.
- use nbformat for read/write/validate public API
- use nbformat.vX directly to composing notebooks of a particular version
""")
/home/sb/anaconda3/envs/bigbang/lib/python2.7/site-packages/IPython/nbconvert.py:13: ShimWarning: The `IPython.nbconvert` package has been deprecated since IPython 4.0. You should import from nbconvert instead.
(bigbang)sb@arcadia:~/projects/bigbang-tmp/bigbang$ python2 bin/collect_mail.py -f examples/w3c-groups/w3c-current-groups.tsv --archives w3c
/home/sb/projects/bigbang-tmp/bigbang/bigbang/mailman.py:126: UserWarning: No mailing list name found at # Working Groups
warnings.warn("No mailing list name found at %s" % url)
'Getting archive page for # Working Groups'
Traceback (most recent call last):
File "bin/collect_mail.py", line 48, in <module>
main(args)
File "bin/collect_mail.py", line 43, in main
mailman.collect_from_file(args.f, archive_dir=args.archives)
File "/home/sb/projects/bigbang-tmp/bigbang/bigbang/mailman.py", line 115, in collect_from_file
sb@arcadia:~/projects/ionchannel/githubarchive-spark$ vagrant up --provider virtualbox
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'paulovn/spark-base64'...
Progress: 70%There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
Command: ["import", "/home/sb/.vagrant.d/boxes/paulovn-VAGRANTSLASH-spark-base64/1.9.7/virtualbox/box.ovf", "--vsys", "0", "--vmname", "vgr-spark-base64_1494957164966_12643", "--vsys", "0", "--unit", "9", "--disk", "/home/sb/VirtualBox VMs/vgr-spark-base64_1494957164966_12643/box-disk1.vmdk"]
Stderr: 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Interpreting /home/sb/.vagrant.d/boxes/paulovn-VAGRANTSLASH-spark-base64/1.9.7/virtualbox/box.ovf...
package main
import (
"fmt"
"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/core"
)
func main() {
r, _ := git.NewFilesystemRepository(".git")
package main
import (
"fmt"
"gopkg.in/src-d/go-git.v4"
)
func main() {
r, _ := git.NewFilesystemRepository(".git")
_ = r.Clone(&git.CloneOptions{URL: "https://github.com/git-fixtures/tags"})