repo stringlengths 2 99 | file stringlengths 13 225 | code stringlengths 0 18.3M | file_length int64 0 18.3M | avg_line_length float64 0 1.36M | max_line_length int64 0 4.26M | extension_type stringclasses 1
value |
|---|---|---|---|---|---|---|
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/win7_sp1_x86_BBA98F40_vtypes.py | ntkrnlmp_types = {
'_CONFIGURATION_COMPONENT_DATA' : [ 0x34, {
'Parent' : [ 0x0, ['pointer', ['_CONFIGURATION_COMPONENT_DATA']]],
'Child' : [ 0x4, ['pointer', ['_CONFIGURATION_COMPONENT_DATA']]],
'Sibling' : [ 0x8, ['pointer', ['_CONFIGURATION_COMPONENT_DATA']]],
'ComponentEntry' : [ 0xc, ['_CONFIGURA... | 476,793 | 52.917675 | 1,943 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/windows.py | # Volatility
# Copyright (c) 2008-2013 Volatility Foundation
# Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu>
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free... | 51,949 | 36.481962 | 217 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/win10_x64_15063_vtypes.py | ntkrnlmp_types = {
'LIST_ENTRY64' : [ 0x10, {
'Flink' : [ 0x0, ['unsigned long long']],
'Blink' : [ 0x8, ['unsigned long long']],
} ],
'LIST_ENTRY32' : [ 0x8, {
'Flink' : [ 0x0, ['unsigned long']],
'Blink' : [ 0x4, ['unsigned long']],
} ],
'_PS_MITIGATION_OPTIONS_MAP' : [ 0x10, {
'Map' : [ 0x0... | 799,585 | 56.264628 | 2,425 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/win10_x64_16299_vtypes.py | ntkrnlmp_types = {
'LIST_ENTRY64' : [ 0x10, {
'Flink' : [ 0x0, ['unsigned long long']],
'Blink' : [ 0x8, ['unsigned long long']],
} ],
'LIST_ENTRY32' : [ 0x8, {
'Flink' : [ 0x0, ['unsigned long']],
'Blink' : [ 0x4, ['unsigned long']],
} ],
'_PS_MITIGATION_OPTIONS_MAP' : [ 0x10, {
'Map' : [ 0x0... | 822,702 | 56.579997 | 2,533 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/win2003_sp2_x64_vtypes.py | ntkrnlmp_types = {
'LIST_ENTRY64' : [ 0x10, {
'Flink' : [ 0x0, ['unsigned long long']],
'Blink' : [ 0x8, ['unsigned long long']],
} ],
'LIST_ENTRY32' : [ 0x8, {
'Flink' : [ 0x0, ['unsigned long']],
'Blink' : [ 0x4, ['unsigned long']],
} ],
'__unnamed_1015' : [ 0x8, {
'LowPart' : [ 0x0, ['unsig... | 337,862 | 52.518612 | 1,428 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/__init__.py | 0 | 0 | 0 | py | |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/vista_sp0_x64_syscalls.py | # Volatility
# Copyright (c) 2008-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your o... | 43,656 | 35.199834 | 70 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/vista_sp0_x86_syscalls.py | # Volatility
# Copyright (c) 2008-2013 Volatility Foundation
# Copyright (c) 2011 Michael Hale Ligh <michael.hale@gmail.com>
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softw... | 43,492 | 35.335004 | 70 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/win10_x64_DD08DD42_vtypes.py | ntkrnlmp_types = {
'LIST_ENTRY64' : [ 0x10, {
'Flink' : [ 0x0, ['unsigned long long']],
'Blink' : [ 0x8, ['unsigned long long']],
} ],
'LIST_ENTRY32' : [ 0x8, {
'Flink' : [ 0x0, ['unsigned long']],
'Blink' : [ 0x4, ['unsigned long']],
} ],
'_KUSER_SHARED_DATA' : [ 0x708, {
'TickCountLowDepreca... | 777,337 | 55.822953 | 2,356 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/win10_x64_17134_vtypes.py | ntkrnlmp_10_types = {
'LIST_ENTRY64' : [ 0x10, {
'Flink' : [ 0x0, ['unsigned long long']],
'Blink' : [ 0x8, ['unsigned long long']],
} ],
'LIST_ENTRY32' : [ 0x8, {
'Flink' : [ 0x0, ['unsigned long']],
'Blink' : [ 0x4, ['unsigned long']],
} ],
'_PS_MITIGATION_OPTIONS_MAP' : [ 0x10, {
'Map' : [ ... | 905,332 | 56.852451 | 2,600 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/win2003_sp2_x86_vtypes.py | ntkrnlmp_types = {
'LIST_ENTRY64' : [ 0x10, {
'Flink' : [ 0x0, ['unsigned long long']],
'Blink' : [ 0x8, ['unsigned long long']],
} ],
'LIST_ENTRY32' : [ 0x8, {
'Flink' : [ 0x0, ['unsigned long']],
'Blink' : [ 0x4, ['unsigned long']],
} ],
'__unnamed_100d' : [ 0x8, {
'LowPart' : [ 0x0, ['unsig... | 305,608 | 51.564327 | 1,427 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/win7_sp0_x64_vtypes.py | ntkrnlmp_types = {
'_ARBITER_INTERFACE' : [ 0x30, {
'Size' : [ 0x0, ['unsigned short']],
'Version' : [ 0x2, ['unsigned short']],
'Context' : [ 0x8, ['pointer64', ['void']]],
'InterfaceReference' : [ 0x10, ['pointer64', ['void']]],
'InterfaceDereference' : [ 0x18, ['pointer64', ['void']]],
'Arb... | 502,855 | 53.999016 | 1,944 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/win8_kdbg.py | # Volatility
# Copyright (c) 2008-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License Version 2 as
# published by the Free Software Foundation. You may not use, modify or
# distribu... | 12,116 | 38.469055 | 108 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/win10_x86_44B89EEA_vtypes.py | ntkrpamp_types = {
'LIST_ENTRY64' : [ 0x10, {
'Flink' : [ 0x0, ['unsigned long long']],
'Blink' : [ 0x8, ['unsigned long long']],
} ],
'LIST_ENTRY32' : [ 0x8, {
'Flink' : [ 0x0, ['unsigned long']],
'Blink' : [ 0x4, ['unsigned long']],
} ],
'_KUSER_SHARED_DATA' : [ 0x708, {
'TickCountLowDepreca... | 711,533 | 54.727914 | 2,240 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/win8_sp0_x86_syscalls.py | syscalls = [
[
'NtWorkerFactoryWorkerReady', # 0x0
'NtYieldExecution', # 0x1
'NtWriteVirtualMemory', # 0x2
'NtWriteRequestData', # 0x3
'NtWriteFileGather', # 0x4
'NtWriteFile', # 0x5
'NtWaitLowEventPair', # 0x6
'NtWaitHighEventPair', # 0x7
'NtWaitForWorkViaWorkerFactory', # 0x8
... | 53,714 | 36.827465 | 74 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/win10_x64_vtypes.py | ntkrnlmp_types = {
'LIST_ENTRY64' : [ 0x10, {
'Flink' : [ 0x0, ['unsigned long long']],
'Blink' : [ 0x8, ['unsigned long long']],
} ],
'LIST_ENTRY32' : [ 0x8, {
'Flink' : [ 0x0, ['unsigned long']],
'Blink' : [ 0x4, ['unsigned long']],
} ],
'_KUSER_SHARED_DATA' : [ 0x708, {
'TickCountLowDepreca... | 744,052 | 55.560471 | 2,241 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/xp.py | # Volatility
# Copyright (c) 2008-2013 Volatility Foundation
# Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu>
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free... | 2,503 | 35.289855 | 132 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/overlays/windows/vista_sp2_x64_vtypes.py | ntkrnlmp_types = {
'_PNP_DEVICE_EVENT_ENTRY' : [ 0x90, {
'ListEntry' : [ 0x0, ['_LIST_ENTRY']],
'Argument' : [ 0x10, ['unsigned long']],
'CallerEvent' : [ 0x18, ['pointer64', ['_KEVENT']]],
'Callback' : [ 0x20, ['pointer64', ['void']]],
'Context' : [ 0x28, ['pointer64', ['void']]],
'VetoType' ... | 460,435 | 53.911866 | 1,767 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/crash.py | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
# Copyright (C) 2005,2006,2007 4tphi Research
#
# Authors:
# {npetroni,awalters}@4tphi.net (Nick Petroni and AAron Walters)
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the... | 3,033 | 31.978261 | 109 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/crashbmp.py | # Volatility
# Copyright (C) 2014 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License Version 2 as
# published by the Free Software Foundation. You may not use, modify or
# distribute th... | 5,375 | 43.429752 | 114 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/ieee1394.py | # Volatility
#
# Authors:
# Mike Auty <mike.auty@gmail.com>
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your op... | 9,319 | 37.833333 | 115 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/vmware.py | # VMware snapshot file parser
# Copyright (C) 2012 Nir Izraeli (nirizr at gmail dot com)
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of ... | 10,557 | 38.841509 | 139 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/elfcoredump.py | # Volatility
# Copyright (C) 2007-2014 Volatility Foundation
#
# Authors:
# phil@teuwen.org (Philippe Teuwen)
# espen@mrfjo.org (Espen Fjellvaer Olsen)
# justincapella@gmail.com (Justin Capella)
# michael.ligh@mnin.org (Michael Ligh)
#
# This file is part of Volatility.
#
# Volatility is free software; you can redist... | 5,422 | 36.4 | 122 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/arm.py | # Volatility
#
# Authors:
# attc - atcuno@gmail.com
# Joe Sylve - joe.sylve@gmail.com
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the... | 6,220 | 35.594118 | 124 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/intel.py | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
# Copyright (C) 2004,2005,2006 4tphi Research
#
# Authors:
# {npetroni,awalters}@4tphi.net (Nick Petroni and AAron Walters)
# Michael Cohen <scudette@users.sourceforge.net>
# Mike Auty <mike.auty@gmail.com>
#
# This file is part of Volatility.
#
# Volatility ... | 12,296 | 35.707463 | 129 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/hibernate.py | # Volatility
#
# Copyright (c) 2008-2013 Volatility Foundation
# Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu>
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Fr... | 12,141 | 33.890805 | 111 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/vmem.py | # Volatility
#
# Authors:
# Sebastien Bourdon-Richard
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or (at
# your option) any later version.
#
# This program... | 4,855 | 37.848 | 88 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/standard.py | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
# Copyright (C) 2004,2005,2006 4tphi Research
#
# Authors:
# {npetroni,awalters}@4tphi.net (Nick Petroni and AAron Walters)
# Michael Cohen <scudette@users.sourceforge.net>
# Mike Auty <mike.auty@gmail.com>
#
# This file is part of Volatility.
#
# Volatility ... | 5,438 | 35.75 | 134 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/paged.py | # Volatility
# Copyright (c) 2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option... | 7,257 | 35.84264 | 205 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/macho.py | # Volatility
#
# Authors:
# Mike Auty
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later versio... | 3,042 | 30.697917 | 115 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/__init__.py | 0 | 0 | 0 | py | |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/amd64.py | # Volatility
# Copyright (C) 2013 Volatility Foundation
#
# Authors:
# Mike Auty
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the Lice... | 13,881 | 35.057143 | 129 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/lime.py | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# Authors:
# attc - atcuno@gmail.com
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either ve... | 3,185 | 33.630435 | 141 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/pmemaddressspace.py | #!/usr/bin/python
from __future__ import print_function
import volatility.addrspace as addrspace
import urllib
import socket
import struct
import sys
class PMemAddressSpace(addrspace.AbstractRunBasedMemory):
def __init__(self, base, config, **kwargs):
'''
Initializes the address space with volatil... | 3,205 | 29.826923 | 89 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/hpak.py | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your o... | 4,585 | 35.396825 | 88 | py |
pyrebox | pyrebox-master/volatility/volatility/plugins/addrspaces/osxpmemelf.py | # Volatility
# Copyright (C) 2007-2014 Volatility Foundation
#
# Authors:
# phil@teuwen.org (Philippe Teuwen)
# espen@mrfjo.org (Espen Fjellvaer Olsen)
# justincapella@gmail.com (Justin Capella)
# michael.ligh@mnin.org (Michael Ligh)
#
# This file is part of Volatility.
#
# Volatility is free software; you can redist... | 2,601 | 35.138889 | 113 | py |
pyrebox | pyrebox-master/volatility/volatility/renderers/dot.py | from volatility import debug
from volatility.renderers.basic import Renderer
__author__ = 'mike'
class DotRenderer(Renderer):
def __init__(self, renderers_func, config):
self._config = config
self._columns = None
self._text_cell_renderers_func = renderers_func
self._text_cell_rende... | 1,613 | 41.473684 | 111 | py |
pyrebox | pyrebox-master/volatility/volatility/renderers/xlsx.py | from volatility import debug
from volatility.renderers.basic import Renderer
__author__ = "gleeda"
try:
from openpyxl.workbook import Workbook
from openpyxl.writer.excel import ExcelWriter
from openpyxl.cell import get_column_letter
from openpyxl.styles import Color, Fill, Style, PatternFill, Border, ... | 1,857 | 36.918367 | 116 | py |
pyrebox | pyrebox-master/volatility/volatility/renderers/html.py | import StringIO
from volatility.renderers.basic import Renderer
try:
import ujson as json
except ImportError:
import json
__author__ = 'mike'
class HTMLRenderer(Renderer):
def __init__(self):
pass
def render(self, outfd, data):
"""Renders the treegrid to HTML"""
column_title... | 2,358 | 44.365385 | 154 | py |
pyrebox | pyrebox-master/volatility/volatility/renderers/text.py | import math
import sys
from volatility import renderers
from volatility.fmtspec import FormatSpec
from volatility.renderers import ColumnSortKey
from volatility.renderers.basic import Address, Address64, Hex, Renderer
__author__ = 'mike'
class CellRenderer(object):
"""Class to handle rendering of a particular cel... | 7,779 | 37.325123 | 125 | py |
pyrebox | pyrebox-master/volatility/volatility/renderers/__init__.py | """Renderers
Renderers display the unified output format in some manner (be it text or file or graphical output"""
import collections
import types
Column = collections.namedtuple('Column', ['index', 'name', 'type'])
class TreePopulationError(StandardError):
"""Exception class for accessing functions on an parti... | 12,151 | 41.638596 | 129 | py |
pyrebox | pyrebox-master/volatility/volatility/renderers/sqlite.py | # Volatility
# Copyright (C) 2008-2015 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your o... | 3,488 | 41.54878 | 126 | py |
pyrebox | pyrebox-master/volatility/volatility/renderers/basic.py | __author__ = 'mike'
import volatility.utils as utils
class Bytes(bytes):
"""String class to allow us to encode binary data"""
def __new__(cls, data):
if data == None:
return str.__new__(cls, "-")
return str.__new__(cls, data.encode("hex"))
class Address(long):
"""Integer class... | 978 | 26.971429 | 89 | py |
DXY-COVID-19-Data | DXY-COVID-19-Data-master/script.py | """
@ProjectName: DXY-2019-nCoV-Crawler
@FileName: script.py
@Author: Jiabao Lin
@Date: 2020/1/31
"""
from github3 import login
from dotenv import load_dotenv
from pymongo import MongoClient
import os
import json
import time
import logging
import datetime
import pandas as pd
# Load environment parameters
load_dotenv(... | 8,066 | 33.922078 | 153 | py |
pytorch_convNd | pytorch_convNd-master/main.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from convNd import convNd
import time
import matplotlib.pyplot as plt
import sys
torch.backends.cudnn.deterministic = True
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
print(f'Python version: {sys.version}')
print(f'Pytorch ... | 3,193 | 27.265487 | 85 | py |
pytorch_convNd | pytorch_convNd-master/convNd.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from typing import Tuple, Callable
import math
class convNd(nn.Module):
"""Some Information about convNd"""
def __init__(self,in_channels: int,
out_channels: int,
num_dims: int,
kernel_size: Tu... | 10,228 | 45.076577 | 157 | py |
pytorch_convNd | pytorch_convNd-master/mainNd.py | import torch
import torch.nn as nn
import torch.nn.functional as F
from convNd import convNd
import time
import matplotlib.pyplot as plt
torch.backends.cudnn.deterministic = True
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# Define 4D tensor to test on
inChans = 1
outChans = 1
x = torch.ones... | 1,553 | 26.263158 | 72 | py |
Sparse-GD | Sparse-GD-main/tflip_vs_eps.py | import robustlib as rl
import matplotlib.pyplot as plt
trials_rsm3 = 10
figsize=(8,4)
fontname='serif'
fsize=20
fpad=10
d_rsm3, k_rsm3, m_rsm3 = 10, 1, 5000
nItrs_rsm3 = 200
eps_bounds_rsm3 = (0.01, 0.5, 0.01)
model_rsm3 = rl.TailFlipModel()
keys_rsm3 = [rl.Oracle, rl.RME_sp, rl.NP_sp, rl.ransacGaussianMean, rl.GDAl... | 1,279 | 39 | 237 | py |
Sparse-GD | Sparse-GD-main/gd.py | import robustlib as rl
import matplotlib.pyplot as plt
trials_rsm3 = 10
figsize=(8,4)
fontname='serif'
fsize=20
fpad=10
d_rsm3, eps_rsm3, m_rsm3 = 300, 0.1, 5000
nItrs_rsm3 = 200
k_bounds_rsm3 = (1, 100, 5)
model_rsm3 = rl.TailFlipModel()
keys_rsm3 = [rl.Oracle, rl.RME_sp, rl.NP_sp, rl.ransacGaussianMean, rl.GDAlgs]... | 1,263 | 38.5 | 233 | py |
Sparse-GD | Sparse-GD-main/lhiding_vs_m.py | import robustlib as rl
import matplotlib.pyplot as plt
trials_rsm3 = 10
figsize=(8,4)
fontname='serif'
fsize=20
fpad=10
d_rsm3, k_rsm3, eps_rsm3 = 1000, 40, 0.1
nItrs_rsm3 = 200
m_bounds_rsm3 = (1000, 13000, 1000)
model_rsm3 = rl.BimodalModel()
keys_rsm3 = [rl.Oracle, rl.RME_sp, rl.NP_sp, rl.ransacGaussianMean, rl.... | 1,276 | 40.193548 | 233 | py |
Sparse-GD | Sparse-GD-main/lhiding_vs_k.py | import robustlib as rl
import matplotlib.pyplot as plt
trials_rsm3 = 10
figsize=(8,4)
fontname='serif'
fsize=20
fpad=10
d_rsm3, eps_rsm3, m_rsm3 = 300, 0.1, 5000
nItrs_rsm3 = 200
k_bounds_rsm3 = (1, 200, 20)
model_rsm3 = rl.BimodalModel()
keys_rsm3 = [rl.Oracle, rl.RME_sp, rl.NP_sp, rl.ransacGaussianMean, rl.GDAlgs]... | 1,270 | 38.71875 | 233 | py |
Sparse-GD | Sparse-GD-main/tflip_vs_k.py | import robustlib as rl
import matplotlib.pyplot as plt
trials_rsm3 = 10
figsize=(8,4)
fontname='serif'
fsize=20
fpad=10
d_rsm3, eps_rsm3, m_rsm3 = 300, 0.1, 5000
nItrs_rsm3 = 200
k_bounds_rsm3 = (1, 100, 5)
model_rsm3 = rl.TailFlipModel()
keys_rsm3 = [rl.Oracle, rl.RME_sp, rl.NP_sp, rl.ransacGaussianMean, rl.GDAlgs]... | 1,264 | 38.53125 | 233 | py |
Sparse-GD | Sparse-GD-main/que_vs_m.py | import robustlib as rl
import matplotlib.pyplot as plt
trials_rsm3 = 10
figsize=(8,4)
fontname='serif'
fsize=20
fpad=10
d_rsm3, k_rsm3, eps_rsm3 = 1000, 40, 0.1
nItrs_rsm3 = 200
m_bounds_rsm3 = (1000, 13000, 1000)
model_rsm3 = rl.QUESyntheticModel()
keys_rsm3 = [rl.Oracle, rl.RME_sp, rl.NP_sp, rl.ransacGaussianMean... | 1,278 | 38.96875 | 233 | py |
Sparse-GD | Sparse-GD-main/robustlib.py | import numpy as np
import scipy
import copy
from scipy import special
from scipy.sparse import coo_matrix
from numpy import linalg as LA
from scipy.sparse.linalg import LinearOperator, eigs
from scipy.sparse import spdiags
from scipy.sparse.linalg import norm as sparse_norm
from scipy.linalg import eigh
import matplotl... | 41,962 | 32.597278 | 233 | py |
Sparse-GD | Sparse-GD-main/constant_vs_m.py | import robustlib as rl
import matplotlib.pyplot as plt
trials_rsm3 = 10
figsize=(8,4)
fontname='serif'
fsize=20
fpad=10
d_rsm3, k_rsm3, eps_rsm3 = 300, 10, 0.1
nItrs_rsm3 = 200
m_bounds_rsm3 = (5, 350, 25)
model_rsm3 = rl.DenseNoiseModel(-2)
keys_rsm3 = [rl.Oracle, rl.RME_sp, rl.NP_sp, rl.ransacGaussianMean, rl.GDA... | 1,282 | 39.09375 | 233 | py |
Sparse-GD | Sparse-GD-main/PythonPathSPCA.py | #!/usr/bin/env python
from scipy import array,real,dot,column_stack,row_stack,append
import numpy
import time
ra = numpy.random
la = numpy.linalg
def PathSPCA(A,k):
M,N=A.shape
# Loop through variables
As=((A*A).sum(axis=0));
vmax=As.max();
vp=As.argmax();
subset=[vp];
vars=[];
res=su... | 1,356 | 20.887097 | 83 | py |
Sparse-GD | Sparse-GD-main/pca.py | import numpy as np
import scipy
import robustlib as rl
import importlib as il
from scipy import special
from numpy import linalg as LA
import matplotlib.pyplot as plt
fsize = 20
fpad = 10
figsize = (8,4)
fontname = 'serif'
keys_pca1 = [rl.RSPCAb, rl.RSPCAdense, rl.GDPCA]
d_pca1, k_pca1, eps_pca1, mass_pca1 = 200, 4,... | 1,582 | 32.680851 | 237 | py |
Sparse-GD | Sparse-GD-main/pca_vs_k.py | import numpy as np
import scipy
import robustlib as rl
import importlib as il
from scipy import special
from numpy import linalg as LA
import matplotlib.pyplot as plt
fsize = 20
fpad = 10
figsize = (8,4)
fontname = 'serif'
keys_pca2 = [rl.RSPCAb, rl.RSPCAdense, rl.GDPCA]
d_pca2, eps_pca2, mass_pca2, m_pca2 = 300, 0... | 1,396 | 30.75 | 237 | py |
Sparse-GD | Sparse-GD-main/constant_vs_k.py | import robustlib as rl
import matplotlib.pyplot as plt
trials_rsm3 = 10
figsize=(8,4)
fontname='serif'
fsize=20
fpad=10
d_rsm3, eps_rsm3, m_rsm3 = 300, 0.1, 5000
nItrs_rsm3 = 200
k_bounds_rsm3 = (1, 100, 5)
model_rsm3 = rl.DenseNoiseModel(-2)
keys_rsm3 = [rl.Oracle, rl.RME_sp, rl.NP_sp, rl.ransacGaussianMean, rl.GDA... | 1,282 | 39.09375 | 233 | py |
Sparse-GD | Sparse-GD-main/tflip_vs_m.py | import robustlib as rl
import matplotlib.pyplot as plt
trials_rsm3 = 10
figsize=(8,4)
fontname='serif'
fsize=20
fpad=10
d_rsm3, k_rsm3, eps_rsm3 = 10, 1, 0.1
nItrs_rsm3 = 200
m_bounds_rsm3 = (2, 12000, 100)
model_rsm3 = rl.TailFlipModel()
keys_rsm3 = [rl.Oracle, rl.RME_sp, rl.NP_sp, rl.ransacGaussianMean, rl.GDAlgs... | 1,273 | 38.8125 | 233 | py |
Sparse-GD | Sparse-GD-main/que_vs_k.py | import robustlib as rl
import matplotlib.pyplot as plt
trials_rsm3 = 10
figsize=(8,4)
fontname='serif'
fsize=20
fpad=10
d_rsm3, eps_rsm3, m_rsm3 = 300, 0.1, 5000
nItrs_rsm3 = 200
k_bounds_rsm3 = (1, 200, 20)
model_rsm3 = rl.QUESyntheticModel()
keys_rsm3 = [rl.Oracle, rl.RME_sp, rl.NP_sp, rl.ransacGaussianMean, rl.GD... | 1,271 | 38.75 | 233 | py |
Sparse-GD | Sparse-GD-main/PathSPCA/PythonPathSPCA.py | #!/usr/bin/env python
from scipy import array,real,dot,column_stack,row_stack,append
import numpy
ra = numpy.random
la = numpy.linalg
def PathSPCA(A,k):
M,N=A.shape
# Loop through variables
As=((A*A).sum(axis=0));vmax=As.max();vp=As.argmax();subset=[vp];
vars=[];res=subset;rhos=[(A[:,vp]*A[:,vp]).sum()... | 1,252 | 28.139535 | 83 | py |
left-factorial | left-factorial-master/range/ntt/run.py | import subprocess, sys, os, math
from time import sleep
max_cores = 12
def getmem(pid):
""" returns current memory used by given pid in megabytes """
proc = subprocess.Popen("ps -p %d -o rss" % pid, shell=True, stdout=subprocess.PIPE)
return float(proc.communicate()[0].split()[-1]) / 1024.0
def run(t... | 1,700 | 26 | 88 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/setup.py | from setuptools import setup
setup(
name="improved-diffusion",
py_modules=["improved_diffusion"],
install_requires=["blobfile>=1.0.5", "torch", "tqdm"],
)
| 168 | 20.125 | 58 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/rpe.py | import numpy as np
import torch.nn as nn
import torch.nn.functional as F
import torch as th
from .nn import zero_module, normalization, checkpoint
class RPENet(nn.Module):
def __init__(self, channels, num_heads, time_embed_dim):
super().__init__()
self.embed_distances = nn.Linear(3, channels)
... | 7,700 | 43.258621 | 145 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/frechet_video_distance.py | # Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 11,237 | 36.211921 | 142 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/resample.py | from abc import ABC, abstractmethod
import numpy as np
import torch as th
import torch.distributed as dist
def create_named_schedule_sampler(name, diffusion):
"""
Create a ScheduleSampler from a library of pre-defined samplers.
:param name: the name of the sampler.
:param diffusion: the diffusion ob... | 5,689 | 35.709677 | 87 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/carla_regressor.py | from email.mime import base
import os
from pathlib import Path
import argparse
import numpy as np
import torch as th
from torchvision import transforms
import torchvision
import torch.nn as nn
import torch.optim as optim
from torch.optim import lr_scheduler
import copy
import wandb
from improved_diffusion.script_util ... | 11,511 | 35.546032 | 132 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/losses.py | """
Helpers for various likelihood-based losses. These are ported from the original
Ho et al. diffusion models codebase:
https://github.com/hojonathanho/diffusion/blob/1e0dceb3b3495bbe19116a5e1b3596cd0706c543/diffusion_tf/utils.py
"""
import numpy as np
import torch as th
def normal_kl(mean1, logvar1, mean2, logvar... | 2,534 | 31.5 | 109 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/rng_util.py | import random
import torch as th
import numpy as np
def set_random_seed(seed):
random.seed(seed)
th.manual_seed(seed+1)
th.cuda.manual_seed_all(seed+2)
np.random.seed(seed+3)
def get_random_state():
return {
"python": random.getstate(),
"torch": th.get_rng_state(),
"cuda"... | 1,449 | 20.969697 | 48 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/test_util.py | import os
from filelock import FileLock
from pathlib import Path
import torch as th
import numpy as np
from PIL import Image
import imageio
class Protect(FileLock):
""" Given a file path, this class will create a lock file and prevent race conditions
using a FileLock. The FileLock path is automatically in... | 4,757 | 41.864865 | 162 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/logger.py | """
Logger copied from OpenAI baselines to avoid extra RL-based dependencies:
https://github.com/openai/baselines/blob/ea25b9e8b234e6ee1bca43083f8f3cf974143998/baselines/logger.py
"""
import os
import os.path as osp
import json
import time
import tempfile
import warnings
from collections import defaultdict
from contex... | 3,313 | 33.884211 | 132 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/video_datasets.py | import os
import numpy as np
import torch as th
from torch.utils.data import DataLoader, Dataset
from torchvision.transforms import ToTensor
from pathlib import Path
import shutil
from mpi4py import MPI
from .test_util import Protect
video_data_paths_dict = {
"minerl": "datasets/minerl_navigate-torch",
... | 9,109 | 38.267241 | 150 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/sampling_schemes.py | import numpy as np
import torch as th
try:
import lpips
class LpipsEmbedder(lpips.LPIPS):
""" Similar to lpips.LPIPS, but takes a single batch of images and returns an embedding
such that the LPIPS distance between two images is the squared distance between these embeddings.
... | 18,909 | 46.393484 | 224 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/nn.py | """
Various utilities for neural networks.
"""
import math
import torch as th
import torch.nn as nn
# PyTorch 1.7 has SiLU, but we support PyTorch 1.5.
class SiLU(nn.Module):
def forward(self, x):
return x * th.sigmoid(x)
class GroupNorm32(nn.GroupNorm):
def forward(self, x):
return super(... | 5,087 | 28.410405 | 88 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/fp16_util.py | """
Helpers to train with 16-bit precision.
"""
import torch.nn as nn
from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
def convert_module_to_f16(l):
"""
Convert primitive modules to float16.
"""
if isinstance(l, (nn.Conv1d, nn.Conv2d, nn.Conv3d)):
l.weight.data = l.we... | 2,282 | 28.649351 | 114 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/unet.py | from abc import abstractmethod
import math
import numpy as np
import torch as th
import torch.nn as nn
import torch.nn.functional as F
from .fp16_util import convert_module_to_f16, convert_module_to_f32
from .nn import (
SiLU,
conv_nd,
linear,
avg_pool_nd,
zero_module,
normalization,
time... | 18,242 | 36.004057 | 149 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/script_util.py | import argparse
from . import gaussian_diffusion as gd
from .respace import SpacedDiffusion, space_timesteps
from .unet import UNetVideoModel
def model_and_diffusion_defaults():
"""
Defaults for image training.
"""
return dict(
image_size=64,
num_channels=128,
num_res_blocks=... | 5,285 | 25.43 | 88 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/gaussian_diffusion.py | """
This code started out as a PyTorch port of Ho et al's diffusion models:
https://github.com/hojonathanho/diffusion/blob/1e0dceb3b3495bbe19116a5e1b3596cd0706c543/diffusion_tf/diffusion_utils_2.py
Docstrings have been added, as well as DDIM sampling and a new collection of beta schedules.
"""
import enum
import math... | 35,019 | 38.304153 | 129 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/__init__.py | """
Codebase for "Improved Denoising Diffusion Probabilistic Models".
"""
| 74 | 17.75 | 65 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/train_util.py | import copy
import functools
import os
import wandb
import blobfile as bf
import glob
from pathlib import Path
from time import time
import numpy as np
import torch as th
import torch.distributed as dist
from torch.nn.parallel.distributed import DistributedDataParallel as DDP
from torch.optim import AdamW
from . impo... | 20,596 | 38.685934 | 129 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/respace.py | import numpy as np
import torch as th
from .gaussian_diffusion import GaussianDiffusion
def space_timesteps(num_timesteps, section_counts):
"""
Create a list of timesteps to use from an original diffusion process,
given the number of timesteps we want to take from equally-sized portions
of the origin... | 4,953 | 38.951613 | 85 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/improved_diffusion/dist_util.py | """
Helpers for distributed training.
"""
import io
import os
import socket
import blobfile as bf
from mpi4py import MPI
import torch as th
import torch.distributed as dist
# Change this to reflect your cluster layout.
# The GPU for a given rank is (rank % GPUS_PER_NODE).
GPUS_PER_NODE = 8
SETUP_RETRY_COUNT = 3
d... | 1,956 | 22.578313 | 77 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/scripts/video_make_mp4.py | import torch as th
import numpy as np
from argparse import ArgumentParser
from pathlib import Path
import uuid
import argparse
import json
from improved_diffusion.video_datasets import get_test_dataset
from improved_diffusion.test_util import mark_as_observed, tensor2gif, tensor2mp4
from improved_diffusion.script_util... | 2,986 | 40.486111 | 137 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/scripts/video_fvd.py | import torch as th
import numpy as np
import argparse
import os
from pathlib import Path
import json
from collections import defaultdict
import tensorflow.compat.v1 as tf
# Metrics
from improved_diffusion.video_datasets import get_test_dataset
import improved_diffusion.frechet_video_distance as fvd
from improved_diffu... | 5,468 | 44.198347 | 134 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/scripts/carla_regressor_train.py | from improved_diffusion.carla_regressor import train
train() | 61 | 19.666667 | 52 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/scripts/video_train.py | """
Train a diffusion model on images.
"""
import os
import sys
import argparse
import wandb
import torch.distributed as dist
from improved_diffusion import dist_util
from improved_diffusion.video_datasets import load_data, default_T_dict, default_image_size_dict
from improved_diffusion.resample import create_named_s... | 4,890 | 31.177632 | 122 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/scripts/video_to_world_coords.py | import argparse
from pathlib import Path
import random
import numpy as np
import torch as th
from improved_diffusion.carla_regressor import load_classifier_regressor_like_paper, predict_coords, base_data_transform
from improved_diffusion.test_util import Protect, get_model_results_path, get_eval_run_identifier
if __... | 2,552 | 46.277778 | 134 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/scripts/video_sample.py | """
Generate a large batch of image samples from a model and save them as a large
numpy array. This can be used to produce samples for FID evaluation.
"""
import argparse
from operator import is_
import os
import json
from pathlib import Path
from PIL import Image
import numpy as np
import torch as th
from improved_... | 12,061 | 48.03252 | 230 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/datasets/minerl.py | import tensorflow as tf
import tensorflow_datasets as tfds
import minerl_navigate
import os
import numpy as np
from pathlib import Path
if __name__ == "__main__":
data_dir = Path(os.path.dirname(os.path.abspath(__file__)))
orig_dataset = 'minerl_navigate'
torch_dataset_path = data_dir / f'{orig_dataset}-t... | 804 | 31.2 | 93 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/datasets/mazes.py | """gqn_mazes dataset."""
"""This implementation is based on https://github.com/saeidnp/cwvae/blob/master/datasets/gqn_mazes/gqn_mazes.py and
https://github.com/iShohei220/torch-gqn/blob/c0156c72f4e63ca6523ab8d9a6f6b3ce9e0e391d/dataset/convert2torch.py"""
import tensorflow as tf
import tensorflow_datasets as tfds
i... | 3,718 | 32.504505 | 450 | py |
flexible-video-diffusion-modeling | flexible-video-diffusion-modeling-main/datasets/carla/make_train_test_split.py | import argparse
import glob
import os
from pathlib import Path
parser = argparse.ArgumentParser()
parser.add_argument('--dir', type=str, required=True, help='Directory containing all train/test videos.')
args = parser.parse_args()
files = glob.glob(os.path.join(args.dir, 'video_*.pt'))
indexed = {}
for p in files:
... | 897 | 25.411765 | 105 | py |
dbcsr | dbcsr-master/.cmake-format.py | # flake8: noqa
with section("format"):
separate_ctrl_name_with_space = True
| 80 | 19.25 | 40 | py |
dbcsr | dbcsr-master/src/acc/opencl/smm/tune_multiply.py | #!/usr/bin/env python3
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. ... | 30,992 | 39.408083 | 104 | py |
dbcsr | dbcsr-master/src/acc/libsmm_acc/generate_parameters.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. ... | 5,692 | 36.20915 | 120 | py |
dbcsr | dbcsr-master/src/acc/libsmm_acc/generate_kernels.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. ... | 5,823 | 40.6 | 100 | py |
dbcsr | dbcsr-master/src/acc/libsmm_acc/tune/tune_merge.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. ... | 3,209 | 39.632911 | 100 | py |
dbcsr | dbcsr-master/src/acc/libsmm_acc/tune/tune_collect.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. ... | 5,011 | 32.413333 | 100 | py |
dbcsr | dbcsr-master/src/acc/libsmm_acc/tune/tune_submit.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. ... | 4,299 | 37.053097 | 120 | py |
dbcsr | dbcsr-master/src/acc/libsmm_acc/tune/tune_setup.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
####################################################################################################
# Copyright (C) by the DBCSR developers group - All rights reserved #
# This file is part of the DBCSR library. ... | 18,123 | 34.46771 | 126 | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.