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 |
|---|---|---|---|---|---|---|
ditto | ditto-master/train_ditto.py | import os
import argparse
import json
import sys
import torch
import numpy as np
import random
sys.path.insert(0, "Snippext_public")
from ditto_light.dataset import DittoDataset
from ditto_light.summarize import Summarizer
from ditto_light.knowledge import *
from ditto_light.ditto import train
if __name__=="__main__... | 3,355 | 35.086022 | 79 | py |
ditto | ditto-master/run_all_er_magellan.py | import os
import time
datasets = """Dirty/DBLP-ACM
Dirty/DBLP-GoogleScholar
Dirty/iTunes-Amazon
Dirty/Walmart-Amazon
Structured/Amazon-Google
Structured/Beer
Structured/DBLP-ACM
Structured/DBLP-GoogleScholar
Structured/Fodors-Zagats
Structured/iTunes-Amazon
Structured/Walmart-Amazon
Textual/Abt-Buy
Textual/Company""".... | 1,949 | 23.683544 | 80 | py |
ditto | ditto-master/matcher.py | import torch
import torch.nn as nn
import os
import numpy as np
import random
import json
import jsonlines
import csv
import re
import time
import argparse
import sys
import sklearn
import traceback
from torch.utils import data
from tqdm import tqdm
from apex import amp
from scipy.special import softmax
from ditto_li... | 10,842 | 31.175074 | 110 | py |
ditto | ditto-master/run_all_wdc.py | datasets = ["all","computers", "cameras", "shoes", "watches"]
attrs = ['title', 'title_description', 'title_description_brand', 'title_description_brand_specTableContent']
sizes = ["small", "medium", "large", "xlarge"]
import os
import time
gpu_id = 0
for d in datasets:
for attr in attrs:
for size in siz... | 1,267 | 36.294118 | 109 | py |
ditto | ditto-master/run_all_vary_size.py | datasets = """Structured/Amazon-Google
Structured/DBLP-ACM
Structured/DBLP-GoogleScholar
Structured/Walmart-Amazon
Textual/Abt-Buy
Textual/Company""".split('\n')
ops = """swap
append_col
del
swap
swap
del""".split('\n')
lm = "roberta"
epochs = 20
import os
import time
for dataset, op in zip(datasets, ops):
for ... | 1,307 | 26.25 | 77 | py |
ditto | ditto-master/ditto_light/exceptions.py | class ModelNotFoundError(Exception):
def __init__(self, path):
super().__init__("Model {} was not found".format(path))
| 131 | 32 | 63 | py |
ditto | ditto-master/ditto_light/summarize.py | import numpy as np
import csv
import sys
import os
from sklearn.feature_extraction.text import TfidfVectorizer
from collections import Counter
from nltk.corpus import stopwords
from .dataset import get_tokenizer
stopwords = set(stopwords.words('english'))
class Summarizer:
"""To summarize a data entry pair into... | 4,368 | 31.125 | 98 | py |
ditto | ditto-master/ditto_light/augment.py | import json
import random
import numpy as np
class Augmenter(object):
"""Data augmentation operator.
Support both span and attribute level augmentation operators.
"""
def __init__(self):
pass
def augment(self, tokens, labels, op='del'):
""" Performs data augmentation on a sequence... | 10,228 | 37.310861 | 161 | py |
ditto | ditto-master/ditto_light/dataset.py | import torch
from torch.utils import data
from transformers import AutoTokenizer
from .augment import Augmenter
# map lm name to huggingface's pre-trained model names
lm_mp = {'roberta': 'roberta-base',
'distilbert': 'distilbert-base-uncased'}
def get_tokenizer(lm):
if lm in lm_mp:
return AutoT... | 3,634 | 29.805085 | 85 | py |
ditto | ditto-master/ditto_light/knowledge.py | import numpy as np
import csv
import sys
import os
import spacy
from collections import Counter
class DKInjector:
"""Inject domain knowledge to the data entry pairs.
Attributes:
config: the task configuration
name: the injector name
"""
def __init__(self, config, name):
self.c... | 4,977 | 29.919255 | 92 | py |
ditto | ditto-master/ditto_light/ditto.py | import os
import sys
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import random
import numpy as np
import sklearn.metrics as metrics
import argparse
from .dataset import DittoDataset
from torch.utils import data
from transformers import AutoModel, AdamW, get_linear_sch... | 7,593 | 31.592275 | 86 | py |
ditto | ditto-master/ditto_light/__init__.py | 0 | 0 | 0 | py | |
ditto | ditto-master/results_ditto/read_results.py | import os
from tensorflow.python.summary.summary_iterator import summary_iterator
from glob import glob
rank_field = 'f1'
fields = ['t_acc', 't_f1']
runs = glob("*/")
results = {}
def get_latest(events):
best = 0.0
res = events[0]
for event_fn in events:
tm = os.path.getmtime(event_fn)
if tm > best:
... | 1,179 | 20.851852 | 71 | py |
ditto | ditto-master/blocking/blocker.py | import os
import sys
import jsonlines
import pickle
import numpy as np
import argparse
from tqdm import tqdm
sys.path.append("sentence-transformers")
from sentence_transformers import SentenceTransformer
def encode_all(path, input_fn, model, overwrite=False):
"""Encode a collection of entries and output to a fi... | 4,254 | 33.877049 | 97 | py |
ditto | ditto-master/blocking/train_blocker.py | import os
import argparse
import json
import sys
import math
sys.path.insert(0, "sentence-transformers")
from sentence_transformers.readers import InputExample
from sentence_transformers import models, losses
from sentence_transformers import SentencesDataset, LoggingHandler, SentenceTransformer
from sentence_transfo... | 3,755 | 34.433962 | 104 | py |
LiteFlowNet2 | LiteFlowNet2-master/models/testing/test_iter.py | #!/usr/bin/env python
import os, sys
import subprocess
from math import ceil
caffe_bin = 'bin/caffe.bin'
img_size_bin = 'bin/get_image_size'
template = './deploy_MODEL.prototxt' # MODEL = LiteFlowNet2-ft-sintel or LiteFlowNet2-ft-kitti
cnn_model = 'MODEL'
# =========================================================
d... | 4,781 | 31.09396 | 147 | py |
LiteFlowNet2 | LiteFlowNet2-master/models/testing/test_batch.py | #!/usr/bin/env python
import os, sys
import subprocess
from math import ceil
caffe_bin = 'bin/caffe.bin'
img_size_bin = 'bin/get_image_size'
template = './deploy_MODEL.prototxt' # MODEL = LiteFlowNet2-ft-sintel or LiteFlowNet2-ft-kitti
cnn_model = 'MODEL'
# =========================================================
d... | 3,970 | 27.775362 | 108 | py |
LiteFlowNet2 | LiteFlowNet2-master/models/testing/runtime.py | #!/usr/bin/env python
import os, sys
import subprocess
caffe_bin = 'bin/caffe.bin'
# =========================================================
my_dir = os.path.dirname(os.path.realpath(__file__))
os.chdir(my_dir)
if not os.path.isfile(caffe_bin):
print('Caffe tool binaries not found. Did you compile caffe with t... | 674 | 29.681818 | 204 | py |
fuzzymax | fuzzymax-master/setup.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 1,033 | 33.466667 | 80 | py |
fuzzymax | fuzzymax-master/evaluation/conf_intervals.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 4,290 | 29.870504 | 89 | py |
fuzzymax | fuzzymax-master/evaluation/classical.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 2,224 | 29.902778 | 87 | py |
fuzzymax | fuzzymax-master/evaluation/constants.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 1,089 | 44.416667 | 94 | py |
fuzzymax | fuzzymax-master/evaluation/fuzzy_universes.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 3,388 | 31.902913 | 87 | py |
fuzzymax | fuzzymax-master/evaluation/utils.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 6,220 | 32.446237 | 81 | py |
fuzzymax | fuzzymax-master/evaluation/sif.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 4,064 | 29.335821 | 89 | py |
fuzzymax | fuzzymax-master/evaluation/__init__.py | 0 | 0 | 0 | py | |
fuzzymax | fuzzymax-master/evaluation/fuzzy_eval.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 4,384 | 28.829932 | 89 | py |
fuzzymax | fuzzymax-master/evaluation/wmd.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 2,576 | 32.038462 | 87 | py |
fuzzymax | fuzzymax-master/similarity/ablation.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 1,473 | 28.48 | 80 | py |
fuzzymax | fuzzymax-master/similarity/soft_card.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 1,455 | 28.12 | 80 | py |
fuzzymax | fuzzymax-master/similarity/classical.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 1,631 | 31.64 | 80 | py |
fuzzymax | fuzzymax-master/similarity/fuzzy.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 3,551 | 29.886957 | 80 | py |
fuzzymax | fuzzymax-master/similarity/__init__.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 1,376 | 28.934783 | 80 | py |
fuzzymax | fuzzymax-master/similarity/baseline.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 1,155 | 34.030303 | 80 | py |
fuzzymax | fuzzymax-master/senteval/engine.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 2,423 | 36.875 | 108 | py |
fuzzymax | fuzzymax-master/senteval/utils.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 1,786 | 31.490909 | 80 | py |
fuzzymax | fuzzymax-master/senteval/sts.py | # Copyright 2018 Babylon Partners. All Rights Reserved.
#
# 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 la... | 8,419 | 40.477833 | 96 | py |
fuzzymax | fuzzymax-master/senteval/__init__.py | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
from __future__ import absolute_import
from senteval.engine import SE
| 264 | 23.090909 | 61 | py |
LogicLLaMA | LogicLLaMA-main/run_eval.py | from tqdm import tqdm
import torch
from functools import partial
from transformers import GenerationConfig, LlamaForCausalLM, LlamaTokenizer
from peft import PeftModel, prepare_model_for_int8_training
from utils import TranslationDataPreparer, ContinuousCorrectionDataPreparer, make_parent_dirs
from generate import llam... | 6,146 | 32.227027 | 111 | py |
LogicLLaMA | LogicLLaMA-main/generate.py | from transformers import GenerationConfig, LlamaForCausalLM
import torch
from utils import DataPreparer, all_exists
from typing import Dict, Optional, Callable
from functools import partial
def llama_generate(
llama_model: LlamaForCausalLM,
data_preparer: DataPreparer,
input_str: str,
max_new_tokens: ... | 2,327 | 37.8 | 113 | py |
LogicLLaMA | LogicLLaMA-main/fol_parser.py | import json
from os.path import join as joinpath
import os
import re
import nltk
from copy import deepcopy
import numpy as np
from nltk.tree import Tree
from itertools import product, combinations, permutations
from typing import Optional, Union, List, Dict, Callable
from utils import all_exists, has_same_obj_in_list, ... | 20,810 | 33.569767 | 118 | py |
LogicLLaMA | LogicLLaMA-main/sft.py | import json
import os
from typing import List, Optional
import torch
import transformers
from datasets import load_dataset
from utils import all_exists
from functools import partial
from peft import (
LoraConfig,
get_peft_model,
prepare_model_for_int8_training,
get_peft_model_state_dict
)
from transform... | 7,533 | 32.04386 | 108 | py |
LogicLLaMA | LogicLLaMA-main/metrics.py | from dataclasses import dataclass
from typing import List, Optional
import evaluate
from fol_parser import VecRuleEvaluator, parse_text_FOL_to_tree, msplit
from utils import all_exists
@dataclass
class MetricsOutput:
FOL_bleu: float
FOL_LE: float
FOL_true_inputs: Optional[List[str]]
FOL_binded_pred_in... | 2,910 | 33.247059 | 107 | py |
LogicLLaMA | LogicLLaMA-main/utils/data_prep.py | import json
import os
from os.path import join as joinpath
from transformers import LlamaTokenizer
from utils import all_exists, any_exists
from typing import Optional, Dict
class Prompter(object):
def __init__(self, template_folder_path: str):
self.template_dict = {}
for fn in os.listdir(template... | 10,729 | 37.597122 | 138 | py |
LogicLLaMA | LogicLLaMA-main/utils/misc.py | import signal
from typing import Callable
import os
from os.path import join as joinpath
def all_exists(*args):
return all(e is not None for e in args)
def any_exists(*args):
return any(e is not None for e in args)
class FuncTimeOutError(Exception):
pass
def timeout_handler(signum, frame):
raise... | 1,042 | 21.191489 | 61 | py |
LogicLLaMA | LogicLLaMA-main/utils/__init__.py | from .misc import *
from .data_prep import (
Prompter,
TranslationDataPreparer,
CorrectionDataPreparer,
DataPreparer,
ContinuousCorrectionDataPreparer
) | 172 | 20.625 | 36 | py |
LogicLLaMA | LogicLLaMA-main/utils/gpt_requests.py | import json
import fire
import openai
from utils import Prompter, wrap_function_with_timeout, all_exists, make_parent_dirs
from typing import Optional, Dict, List, Union, Callable
from utils import all_exists
import os
from functools import partial
from tqdm import tqdm
folio_5_shot = \
"""
Here are some examples y... | 8,957 | 26.906542 | 167 | py |
big-sleep | big-sleep-main/setup.py | import sys
from setuptools import setup, find_packages
sys.path[0:0] = ['big_sleep']
from version import __version__
setup(
name = 'big-sleep',
packages = find_packages(),
include_package_data = True,
entry_points={
'console_scripts': [
'dream = big_sleep.cli:main',
],
},
version = __version... | 1,080 | 22 | 65 | py |
big-sleep | big-sleep-main/big_sleep/resample.py | """Good differentiable image resampling for PyTorch."""
from functools import update_wrapper
import math
import torch
from torch.nn import functional as F
def sinc(x):
return torch.where(x != 0, torch.sin(math.pi * x) / (math.pi * x), x.new_ones([]))
def lanczos(x, a):
cond = torch.logical_and(-a < x, x ... | 2,062 | 24.7875 | 87 | py |
big-sleep | big-sleep-main/big_sleep/clip.py | from collections import OrderedDict
from typing import Tuple, Union
import torch
import torch.nn.functional as F
from torch import nn
from pathlib import Path
import hashlib
import os
import urllib
import warnings
from typing import Union, List
import torch
from PIL import Image
from torchvision.transforms import Co... | 28,958 | 37.509309 | 178 | py |
big-sleep | big-sleep-main/big_sleep/biggan.py | # this code is a copy from huggingface
# with some minor modifications
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
import json
import copy
import logging
import os
import shutil
import tempfile
from functools import wraps
from hashlib import sha256
import sys
from io import open
imp... | 22,399 | 37.62069 | 119 | py |
big-sleep | big-sleep-main/big_sleep/cli.py | import fire
import random as rnd
from big_sleep import Imagine, version
from pathlib import Path
from .version import __version__;
def train(
text=None,
img=None,
text_min="",
lr = .07,
image_size = 512,
gradient_accumulate_every = 1,
epochs = 20,
iterations = 1050,
save_every = 50... | 1,950 | 24.337662 | 97 | py |
big-sleep | big-sleep-main/big_sleep/version.py | __version__ = '0.9.1'
| 22 | 10.5 | 21 | py |
big-sleep | big-sleep-main/big_sleep/__init__.py | from big_sleep.big_sleep import BigSleep, Imagine
| 50 | 24.5 | 49 | py |
big-sleep | big-sleep-main/big_sleep/ema.py | # Exponential Moving Average (from https://gist.github.com/crowsonkb/76b94d5238272722290734bf4725d204)
"""Exponential moving average for PyTorch. Adapted from
https://www.zijianhu.com/post/pytorch/ema/ by crowsonkb
"""
from copy import deepcopy
import torch
from torch import nn
class EMA(nn.Module):
def __init__... | 2,098 | 37.163636 | 152 | py |
big-sleep | big-sleep-main/big_sleep/big_sleep.py | import os
import sys
import subprocess
import signal
import string
import re
from datetime import datetime
from pathlib import Path
import random
import torch
import torch.nn.functional as F
from torch import nn
from torch.optim import Adam
from torchvision.utils import save_image
import torchvision.transforms as T
f... | 17,794 | 34.167984 | 150 | py |
big-sleep | big-sleep-main/test/multi_prompt_minmax.py | import time
import shutil
import torch
from big_sleep import Imagine
terminate = False
def signal_handling(signum,frame):
global terminate
terminate = True
num_attempts = 4
for attempt in range(num_attempts):
dream = Imagine(
text = "an armchair in the form of pikachu\\an armchair imitating pikac... | 1,085 | 24.255814 | 93 | py |
Quantum | Quantum-master/setup.py | #!/usr/bin/env python
# Copyright (c) 2020 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/licen... | 4,124 | 34.25641 | 116 | py |
Quantum | Quantum-master/paddle_quantum/base.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 4,239 | 29.503597 | 96 | py |
Quantum | Quantum-master/paddle_quantum/qinfo.py | # !/usr/bin/env python3
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 37,558 | 36.076999 | 166 | py |
Quantum | Quantum-master/paddle_quantum/linalg.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 21,674 | 33.133858 | 143 | py |
Quantum | Quantum-master/paddle_quantum/fisher.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 15,686 | 37.637931 | 132 | py |
Quantum | Quantum-master/paddle_quantum/gradtool.py | # !/usr/bin/env python3
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 13,979 | 34.663265 | 137 | py |
Quantum | Quantum-master/paddle_quantum/hamiltonian.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 16,092 | 37.966102 | 174 | py |
Quantum | Quantum-master/paddle_quantum/shadow.py | # !/usr/bin/env python3
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 11,253 | 42.620155 | 141 | py |
Quantum | Quantum-master/paddle_quantum/model.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 34,156 | 41.01353 | 142 | py |
Quantum | Quantum-master/paddle_quantum/dataset.py | # !/usr/bin/env python3
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/license... | 42,500 | 50.021609 | 186 | py |
Quantum | Quantum-master/paddle_quantum/trotter.py | # !/usr/bin/env python3
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 29,353 | 46.575365 | 176 | py |
Quantum | Quantum-master/paddle_quantum/intrinsic.py | # !/usr/bin/env python3
# Copyright (c) 2020 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 16,655 | 36.261745 | 131 | py |
Quantum | Quantum-master/paddle_quantum/__init__.py | # !/usr/bin/env python3
# Copyright (c) 2020 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 1,885 | 29.918033 | 85 | py |
Quantum | Quantum-master/paddle_quantum/visual.py | # !/usr/bin/env python3
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 30,757 | 35.747909 | 177 | py |
Quantum | Quantum-master/paddle_quantum/locc/locc_state.py | # !/usr/bin/env python3
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 4,385 | 33.265625 | 110 | py |
Quantum | Quantum-master/paddle_quantum/locc/locc_party.py | # !/usr/bin/env python3
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 1,169 | 28.25 | 85 | py |
Quantum | Quantum-master/paddle_quantum/locc/locc_net.py | # !/usr/bin/env python3
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 22,009 | 38.444444 | 126 | py |
Quantum | Quantum-master/paddle_quantum/locc/__init__.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 840 | 34.041667 | 85 | py |
Quantum | Quantum-master/paddle_quantum/locc/locc_ansatz.py | # !/usr/bin/env python3
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 28,952 | 36.35871 | 161 | py |
Quantum | Quantum-master/paddle_quantum/VQE/benchmark.py | # !/usr/bin/env python3
# Copyright (c) 2020 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 2,565 | 33.213333 | 103 | py |
Quantum | Quantum-master/paddle_quantum/VQE/Paddle_VQE.py | # !/usr/bin/env python3
# Copyright (c) 2020 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 3,592 | 30.79646 | 105 | py |
Quantum | Quantum-master/paddle_quantum/VQE/chemistrysub.py | # !/usr/bin/env python3
# Copyright (c) 2020 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 4,161 | 39.803922 | 95 | py |
Quantum | Quantum-master/paddle_quantum/VQE/chemistrygen.py | # !/usr/bin/env python3
# Copyright (c) 2020 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 4,122 | 25.6 | 112 | py |
Quantum | Quantum-master/paddle_quantum/VQE/example/main.py | # !/usr/bin/env python3
# Copyright (c) 2020 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 1,772 | 33.764706 | 85 | py |
Quantum | Quantum-master/paddle_quantum/qpp/utils.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 10,752 | 33.687097 | 122 | py |
Quantum | Quantum-master/paddle_quantum/qpp/laurent.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 22,643 | 32.39823 | 133 | py |
Quantum | Quantum-master/paddle_quantum/qpp/angles.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 9,430 | 31.52069 | 130 | py |
Quantum | Quantum-master/paddle_quantum/qpp/__init__.py | # !/usr/bin/env python3
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 773 | 32.652174 | 85 | py |
Quantum | Quantum-master/paddle_quantum/operator/operator.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 7,105 | 38.698324 | 126 | py |
Quantum | Quantum-master/paddle_quantum/operator/__init__.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 767 | 37.4 | 85 | py |
Quantum | Quantum-master/paddle_quantum/QAOA/maxcut.py | # !/usr/bin/env python3
# Copyright (c) 2020 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 3,294 | 32.282828 | 135 | py |
Quantum | Quantum-master/paddle_quantum/QAOA/tsp.py | # !/usr/bin/env python3
# Copyright (c) 2020 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 6,092 | 35.927273 | 135 | py |
Quantum | Quantum-master/paddle_quantum/QAOA/example/main.py | # !/usr/bin/env python3
# Copyright (c) 2020 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 2,211 | 27.727273 | 102 | py |
Quantum | Quantum-master/paddle_quantum/finance/finance.py | # !/usr/bin/env python3
# Copyright (c) 2021 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 14,013 | 38.036212 | 181 | py |
Quantum | Quantum-master/paddle_quantum/finance/qpo.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 4,774 | 39.466102 | 154 | py |
Quantum | Quantum-master/paddle_quantum/finance/__init__.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 952 | 34.296296 | 87 | py |
Quantum | Quantum-master/paddle_quantum/finance/pricing.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 22,649 | 39.591398 | 138 | py |
Quantum | Quantum-master/paddle_quantum/channel/custom.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 2,732 | 32.740741 | 91 | py |
Quantum | Quantum-master/paddle_quantum/channel/base.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 14,631 | 44.30031 | 125 | py |
Quantum | Quantum-master/paddle_quantum/channel/common.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 13,857 | 34.808786 | 117 | py |
Quantum | Quantum-master/paddle_quantum/channel/__init__.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 803 | 32.5 | 85 | py |
Quantum | Quantum-master/paddle_quantum/channel/representation.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 16,840 | 32.348515 | 149 | py |
Quantum | Quantum-master/paddle_quantum/channel/functional/common.py | # !/usr/bin/env python3
# Copyright (c) 2022 Institute for Quantum Computing, Baidu Inc. All Rights Reserved.
#
# 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/lic... | 14,987 | 38.133159 | 128 | py |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.