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
GalaxyDataset
GalaxyDataset-master/evaluationMetrics.py
0
0
0
py
GalaxyDataset
GalaxyDataset-master/preprocess.py
# -*- coding: utf-8 -*- import torch import torch.utils.data as Data import numpy as np from torchvision import datasets, transforms import argparse import os import random import yaml import downloadData def load_npy(path): # npy file: [[imgs, label], [imgs, label]...., [imgs, label]] # when allow_pickle=True...
1,436
29.574468
107
py
GalaxyDataset
GalaxyDataset-master/digitfive/custom.py
from PIL import Image, ImageEnhance, ImageOps, ImageFilter import numpy as np import random class GaussianBlur(object): def __init__(self, sigma=None): if sigma is None: sigma = [.1, 2.] self.sigma = sigma def __call__(self, x): sigma = random.uniform(self.sigma[0], sel...
6,520
48.030075
138
py
GalaxyDataset
GalaxyDataset-master/digitfive/femnist.py
from torchvision.datasets import MNIST, utils from PIL import Image import os.path import torch class FEMNIST(MNIST): """ This dataset is derived from the Leaf repository (https://github.com/TalwalkarLab/leaf) pre-processing of the Extended MNIST dataset, grouping examples by writer. Details about Lea...
3,128
36.25
110
py
GalaxyDataset
GalaxyDataset-master/digitfive/usps.py
import scipy.io as scio import numpy as np from PIL import Image import os import os.path import torch import torchvision from torchvision import datasets, transforms from torchvision.datasets import MNIST, utils from torch.utils.data import DataLoader, Dataset # dataFile = 'usps_28x28.mat' # data = scio.loadmat(dataF...
5,890
30.502674
215
py
GalaxyDataset
GalaxyDataset-master/digitfive/svhn.py
import scipy.io as scio import numpy as np from PIL import Image import os import os.path import torch import torchvision from torchvision import datasets, transforms from torchvision.datasets import MNIST, utils from torch.utils.data import DataLoader, Dataset # dataFile = 'svhn_train_32x32.mat' # data = scio.loadmat...
5,699
29.15873
215
py
GalaxyDataset
GalaxyDataset-master/digitfive/syn.py
import scipy.io as scio import numpy as np from PIL import Image import os import os.path import torch import torchvision from torchvision import datasets, transforms from torchvision.datasets import MNIST, utils from torch.utils.data import DataLoader, Dataset # dataFile = 'syn_number.mat' # data = scio.loadmat(dataF...
5,471
30.630058
215
py
GalaxyDataset
GalaxyDataset-master/digitfive/mnistm.py
import scipy.io as scio import numpy as np from PIL import Image import os import os.path import torch import torchvision from torchvision import datasets, transforms from torchvision.datasets import MNIST, utils from torch.utils.data import DataLoader, Dataset # dataFile = 'mnistm_with_label.mat' # data = scio.loadma...
5,512
29.97191
215
py
GalaxyDataset
GalaxyDataset-master/digitfive/SubPolicy.py
class SubPolicy(object): def __init__(self, p1, operation1, magnitude_idx1, p2, operation2, magnitude_idx2, fillcolor=(128, 128, 128)): ranges = { "shearX": np.linspace(0, 0.3, 10), "shearY": np.linspace(0, 0.3, 10), "translateX": np.linspace(0, 150 / 331, 10), ...
2,048
54.378378
138
py
GalaxyDataset
GalaxyDataset-master/digitfive/mnist.py
import scipy.io as scio import numpy as np from PIL import Image import os import os.path import torch import torchvision from torchvision import datasets, transforms from torchvision.datasets import MNIST, utils from torch.utils.data import DataLoader, Dataset # dataFile = 'mnist_data.mat' # data = scio.loadmat(data...
5,753
30.966667
215
py
skimulator
skimulator-master/setup.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
4,810
36.007692
79
py
skimulator
skimulator-master/test/projskim.py
import os import numpy import healpy as heal from numpy import linalg as LA from netCDF4 import Dataset import params as p import skimulator.const as const import skimulator.rw_data as rw import matplotlib.pyplot as plt theta1 = const.theta1 theta0 = const.theta0 gamma0 = const.gamma0 # - In parameter file ## TODO -...
8,525
32.046512
108
py
skimulator
skimulator-master/test/params2.py
# -----------------------# # Files and directories # -----------------------# ## -- Get the user home directory from os.path import expanduser import os import math home = expanduser("~") + '/src/' # ------ Directory that contains orbit file: dir_setup = os.path.join(home, 'skimulator', 'data') # ------ Directory that ...
5,776
37.771812
79
py
skimulator
skimulator-master/test/mod_diag.py
import numpy import netCDF4 import os import sys import glob import pickle import matplotlib matplotlib.use('Agg') from matplotlib import pyplot import cartopy import skimulator.rw_data as rw # Initialize color listcolor = ['c', 'y', 'b', 'g', 'k', 'r', 'c', 'y'] projection = cartopy.crs.PlateCarree() transform = car...
19,253
38.374233
94
py
skimulator
skimulator-master/test/mod_plot.py
import numpy import netCDF4 import os import sys import glob import matplotlib matplotlib.use('Agg') from matplotlib import pyplot import cartopy import skimulator.rw_data as rw # Initialize color listcolor = ['c', 'y', 'b', 'g', 'k', 'r', 'c', 'y'] projection = cartopy.crs.PlateCarree() transform = cartopy.crs.Plate...
6,884
35.428571
80
py
skimulator
skimulator-master/test/plot_grid.py
import mod_plot import params as p import numpy import glob import os # Initialize variables indatadir = p.outdatadir config = p.config modelbox = p.modelbox #modelbox = [-5, 5, 75, 85] #modelbox = [-65, 55, 40, 45] modelbox[0] = numpy.mod(modelbox[0] + 180.0, 360.0) - 180.0 modelbox[1] = numpy.mod(modelbox[1] + 180....
828
26.633333
64
py
skimulator
skimulator-master/test/diag_l2b.py
import numpy import mod_diag import glob import os import matplotlib import json import sys if len(sys.argv) < 1: print('Provide json file for diagnostics') sys.exit(1) file_param = sys.argv[1] with open(file_param, 'r') as f: params = json.load(f) modelbox = params['l2b']['modelbox'] config = params['l2b...
1,499
32.333333
83
py
skimulator
skimulator-master/test/diags_l2d.py
import numpy from matplotlib import pyplot import netCDF4 import glob import os import scipy.signal from scipy.fftpack import fft def cpsd1d(hh1=None, hh2=None, dx=1.,tap=0.05, detrend=True): hh1 = hh1 - numpy.mean(hh1) hh2 = hh2 - numpy.mean(hh2) nx = numpy.shape(hh1)[0] if detrend: hh1 =...
10,114
38.666667
90
py
skimulator
skimulator-master/test/diags_l2c.py
import numpy from matplotlib import pyplot import netCDF4 import glob import os import sys import json import scipy.signal from scipy.fftpack import fft def cpsd1d(hh1=None, hh2=None, dx=1.,tap=0.05, detrend=True): hh1 = hh1 - numpy.mean(hh1) hh2 = hh2 - numpy.mean(hh2) nx = numpy.shape(hh1)[0] if...
23,170
41.282847
101
py
skimulator
skimulator-master/example/params_example_8beams.py
# -----------------------# # Files and directories # -----------------------# ## -- Get the user home directory from os.path import expanduser import os import math home = expanduser("~") # ------ Name of the configuration (to build output files names) # 8 beams, 45 azimuths, 1024 pulses and cycle length of 37 ms con...
7,726
36.692683
80
py
skimulator
skimulator-master/example/params_example_6beams.py
# -----------------------# # Files and directories # -----------------------# ## -- Get the user home directory from os.path import expanduser import os import math home = expanduser("~") # ------ Name of the configuration (to build output files names) #config="WW3_EQ_metop_2018_6a" # 6 beams, 60 azimuths, 512 pulses...
8,115
36.229358
80
py
skimulator
skimulator-master/example/params_example_8beams_ogcm.py
# -----------------------# # Files and directories # -----------------------# ## -- Get the user home directory from os.path import expanduser import os import math home = expanduser("~") # ------ Name of the configuration (to build output files names) # 8 beams, 45 azimuths, 1024 pulses and cycle length of 37 ms conf...
7,411
35.875622
80
py
skimulator
skimulator-master/example/params_stream.py
# -----------------------# # Files and directories # -----------------------# ## -- Get the user home directory from os.path import expanduser import os import math home = expanduser("~") + '/src/' # ------ Name of the configuration (to build output files names) # 8 beams, 45 azimuths, 1024 pulses and cycle length of...
7,742
37.142857
80
py
skimulator
skimulator-master/skimulator/const.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
1,840
29.683333
75
py
skimulator
skimulator-master/skimulator/mod_parallel.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
7,515
31.257511
79
py
skimulator
skimulator-master/skimulator/fitspline2d.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
6,754
37.6
106
py
skimulator
skimulator-master/skimulator/build_swath.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
21,162
42.455852
83
py
skimulator
skimulator-master/skimulator/run_simulator.py
'''Main program: Usage: run_simulator(file_param) \n If no param file is specified, the default one is exemple/params_exemple.txt \n In the first part of the program, model coordinates are read and the SKIM swath is computing accordingly. \n The SKIM grid parameters are saved in netcdf files, if you don't want to reco...
15,674
39.29563
79
py
skimulator
skimulator-master/skimulator/cli.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
5,891
31.196721
77
py
skimulator
skimulator-master/skimulator/regridding_l2d.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
29,349
38.715832
87
py
skimulator
skimulator-master/skimulator/regridding.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
26,773
41.633758
109
py
skimulator
skimulator-master/skimulator/mod_run.py
'''Module to create one beam data: \n \n Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at ...
20,831
43.8
79
py
skimulator
skimulator-master/skimulator/grid_check.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
7,140
30.879464
116
py
skimulator
skimulator-master/skimulator/__init__.py
# ======================================================================= # General Documentation """Utilities for SKIM Science Simulator for the ocean Some useful online help commands for the package: * help(skimulator): Help for the package. A list of all modules in this package ...
3,814
31.887931
78
py
skimulator
skimulator-master/skimulator/spline.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
6,038
25.603524
74
py
skimulator
skimulator-master/skimulator/rw_data.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
48,046
42.246625
83
py
skimulator
skimulator-master/skimulator/mod_tools.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
11,664
36.149682
134
py
skimulator
skimulator-master/skimulator/error/wet_troposphere.py
# Copyright (c) 2020 CNES/JPL # # All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """ Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator is free software: you can redistribute it and/or modify it under the terms of t...
12,414
41.958478
79
py
skimulator
skimulator-master/skimulator/error/rain.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
4,964
38.094488
79
py
skimulator
skimulator-master/skimulator/error/instrument.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
6,800
39.96988
79
py
skimulator
skimulator-master/skimulator/error/dsigma.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
4,605
36.754098
80
py
skimulator
skimulator-master/skimulator/error/utils.py
# Copyright (c) 2020 CNES/JPL # # All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """ Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator is free software: you can redistribute it and/or modify it under the terms of t...
7,169
34.147059
76
py
skimulator
skimulator-master/skimulator/error/altimeter.py
# Copyright (c) 2020 CNES/JPL # # All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """ Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator is free software: you can redistribute it and/or modify it under the terms of t...
2,323
33.686567
79
py
skimulator
skimulator-master/skimulator/error/simulate_spectrum.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
13,999
43.444444
105
py
skimulator
skimulator-master/skimulator/error/wave_doppler.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
10,280
38.694981
79
py
skimulator
skimulator-master/skimulator/error/__init__.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
917
35.72
68
py
skimulator
skimulator-master/skimulator/error/attitude.py
""" Copyright (C) 2017-2021 OceanDataLab This file is part of skiMulator. skimulator 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 3 of the License, or (at your option) any later version. skimul...
6,582
38.419162
80
py
skimulator
skimulator-master/skimulator/error/generator.py
# Copyright (c) 2020 CNES/JPL # # All rights reserved. Use of this source code is governed by a # BSD-style license that can be found in the LICENSE file. """ Copyright (C) 2017-2021 OceanDataLab This file is part of skimulator. skimulator is free software: you can redistribute it and/or modify it under the terms of t...
9,631
42.981735
80
py
skimulator
skimulator-master/doc/source/conf.py
# -*- coding: utf-8 -*- # # S4 documentation build configuration file, created by # sphinx-quickstart on Thu Jul 10 16:54:19 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
10,718
30.342105
80
py
skimulator
skimulator-master/doc/source/params.py
# -----------------------# # Files and directories # -----------------------# ## -- Get the user home directory from os.path import expanduser import os import math home = expanduser("~") # ------ Name of the configuration (to build output files names) config = [yourconfig] # ------ Directory that contains orbit file...
7,779
38.492386
89
py
skimulator
skimulator-master/doc/images/code_image/Fig4.py
''' FIG. 4: Radial currents and instrumental noise. ''' import netCDF4 import numpy import matplotlib matplotlib.use('Agg') from matplotlib import pyplot import skimulator.rw_data as rw import glob import cartopy import os # Initialize color listcolor = ['c', 'y', 'b', 'g', 'k', 'r', 'c', 'y'] # List files indata...
2,193
30.797101
74
py
skimulator
skimulator-master/doc/images/code_image/Fig6.py
''' FIG. 4: Radial currents and instrumental noise. ''' import netCDF4 import numpy import matplotlib matplotlib.use('Agg') from matplotlib import pyplot import skimulator.rw_data as rw import glob import cartopy import os # Initialize color listcolor = ['c', 'y', 'b', 'g', 'k', 'r', 'c', 'y'] # List files indata...
2,216
31.130435
74
py
skimulator
skimulator-master/doc/images/code_image/Fig2.py
''' FIG. 2: scheme of the SKIM geometry with 4 beams at 12 degrees and 1 beam at 6 degree and 5 beams at 12 degrees and 2 beams at 6 degree. ''' import netCDF4 import numpy import matplotlib matplotlib.use('Agg') from matplotlib import pyplot import skimulator.rw_data as rw import glob import cartopy import os # I...
3,290
35.164835
139
py
skimulator
skimulator-master/doc/images/code_image/Fig3.py
''' FIG. 3: Model interpolated currents and the corresponding radial currents. ''' import netCDF4 import numpy import matplotlib matplotlib.use('Agg') from matplotlib import pyplot import skimulator.rw_data as rw import glob import cartopy import os # Initialize color listcolor = ['c', 'y', 'b', 'g', 'k', 'r', 'c'...
3,784
32.794643
78
py
skimulator
skimulator-master/doc/images/code_image/Fig1.py
''' FIG. 1: 5-day worth of SKIM simulated data in a global configuration with the science orbit. ''' import netCDF4 import numpy import matplotlib matplotlib.use('Agg') from matplotlib import pyplot import skimulator.rw_data as rw import glob import cartopy import os # List files outdatadir = '/tmp/key' outdatadir = ...
1,647
31.96
92
py
skimulator
skimulator-master/doc/images/code_image/Fig5.py
''' FIG. 4: Radial currents and instrumental noise. ''' import netCDF4 import numpy import matplotlib matplotlib.use('Agg') from matplotlib import pyplot import skimulator.rw_data as rw import glob import cartopy import os # Initialize color listcolor = ['c', 'y', 'b', 'g', 'k', 'r', 'c', 'y'] # List files indata...
2,199
30.884058
74
py
CompositionSpaceNFDI
CompositionSpaceNFDI-main/setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ compositionspace : add licence and such """ from setuptools import setup, find_packages, Extension with open('README.md') as readme_file: readme = readme_file.read() setup_requirements = ['pytest-runner', ] test_requirements = ['pytest>=3', ] setup( author=...
1,643
29.444444
80
py
CompositionSpaceNFDI
CompositionSpaceNFDI-main/compositionspace/datautils.py
import pandas as pd import re import os import yaml from tqdm.notebook import tqdm import matplotlib.pyplot as plt import numpy as np import pickle import time import h5py import warnings import compositionspace.paraprobe_transcoder as paraprobe_transcoder #really check this! pd.options.mode.chained_assignment = None...
19,133
34.108257
151
py
CompositionSpaceNFDI
CompositionSpaceNFDI-main/compositionspace/segmentation.py
from compositionspace.datautils import DataPreparation from compositionspace.models import get_model from sklearn.decomposition import PCA from sklearn.mixture import GaussianMixture import json import h5py import numpy as np import pandas as pd import matplotlib.pylab as plt from tqdm.notebook import tqdm import os f...
10,121
35.541516
106
py
CompositionSpaceNFDI
CompositionSpaceNFDI-main/compositionspace/paraprobe_transcoder.py
# -*- coding: utf-8 -*- """ Reader for the APSuite6/IVAS4 *.APT file format MK::GPLV3, 03/09/2020, Markus K\"uhbach, m.kuehbach@mpie.de """ import numpy as np #https://www.python-kurs.eu/numpy_dtype.php class APTFileBranches(): def __init__(self): self.dict_kwnsect = { 1: 'tof', 2: 'pulse', 3: 'freq', 4...
26,191
50.66075
161
py
CompositionSpaceNFDI
CompositionSpaceNFDI-main/compositionspace/models.py
from ast import Raise from sklearn.ensemble import RandomForestClassifier from sklearn.mixture import GaussianMixture from sklearn.cluster import DBSCAN def get_model(ml_params): """ get machine learning model for clustering """ model_name = ml_params["name"] model_params = ml_params[model_name] ...
1,067
37.142857
144
py
CompositionSpaceNFDI
CompositionSpaceNFDI-main/compositionspace/__init__.py
0
0
0
py
CompositionSpaceNFDI
CompositionSpaceNFDI-main/compositionspace/postprocessing.py
import pandas as pd import os from tqdm.notebook import tqdm import matplotlib.pyplot as plt import numpy as np import h5py from sklearn.cluster import DBSCAN from pyevtk.hl import pointsToVTK from pyevtk.hl import gridToVTK import yaml class DataPostprocess: def __init__(self, inputfile): if isin...
5,481
38.157143
126
py
CompositionSpaceNFDI
CompositionSpaceNFDI-main/tests/test_read_files.py
import pytest import numpy as np import os import sys from compositionspace.datautils import DataPreparation def test_file_rrng(): data = DataPreparation("tests/experiment_params.yaml") datarrng = data.get_rrng("tests/data/R31_06365-v02.rrng") assert datarrng[0]["name"].values[0] == "C" def test_file_p...
1,213
31.810811
61
py
CompositionSpaceNFDI
CompositionSpaceNFDI-main/docs/source/conf.py
# Configuration file for the Sphinx documentation builder. # # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master...
1,349
23.545455
83
py
fuzzyJoiner
fuzzyJoiner-master/build_model.py
from random import shuffle import pickle import numpy as np # import pandas import tensorflow as tf import random as random import json from keras import backend as K from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.layers import Dense, Input, Flatten, ...
25,195
37.118003
249
py
fuzzyJoiner
fuzzyJoiner-master/preloaded_runner.py
import pickle import numpy as np import tensorflow as tf import random as random import json from keras import backend as K #from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.layers import Input, Lambda, GRU from keras.layers import Embedding from kera...
17,465
35.848101
139
py
fuzzyJoiner
fuzzyJoiner-master/parse_additive.py
0
0
0
py
fuzzyJoiner
fuzzyJoiner-master/Levenstien_Rule_Based.py
from sys import argv import string import Levenshtein import statistics from names_cleanser import NameDataCleanser, CompanyDataCleanser def read_entities(filepath): entities = [] with open(filepath, 'r', encoding='utf8') as fl: for line in fl: entities.append(line) return entities ...
8,910
37.409483
120
py
fuzzyJoiner
fuzzyJoiner-master/names_cleanser.py
import re import argparse import Levenshtein from nltk import bigrams from os import listdir from os.path import isfile, join from difflib import SequenceMatcher # from sklearn.metrics import jaccard_similarity_score class GenericDataCleanser(object): name_reject_set = frozenset(['father of', '(', 'author of', '...
15,807
37.462287
188
py
fuzzyJoiner
fuzzyJoiner-master/random_test_selecter.py
from sys import argv from random import shuffle input_file = open(argv[1], 'r') output_file = open(argv[2], 'w') lines = input_file.readlines() shuffle(lines) lines = lines[-int(argv[3]):] for line in lines: output_file.write(line) input_file.close() output_file.close()
272
21.75
32
py
fuzzyJoiner
fuzzyJoiner-master/old/TripletLossFacenetLSTM.py
import numpy as np import random as random # """ # The below is necessary in Python 3.2.3 onwards to # have reproducible behavior for certain hash-based operations. # See these references for further details: # https://docs.python.org/3.4/using/cmdline.html#envvar-PYTHONHASHSEED # https://github.com/keras-team/keras/is...
21,712
37.227113
167
py
fuzzyJoiner
fuzzyJoiner-master/old/matcher_functions.py
import sqlalchemy from sqlalchemy.sql import select from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey def connect(user, password, db, host='localhost', port=5432): '''Returns a connection and a metadata object''' # We connect with the help of the PostgreSQL URL # postgresql://feder...
8,149
37.809524
114
py
fuzzyJoiner
fuzzyJoiner-master/old/TripletLossFacenetLSTM-8.20.18.py
import numpy as np import pandas import tensorflow as tf import random as random import json from keras import backend as K from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.layers import Dense, Input, Flatten, Dropout, Lambda, GRU, Activation from keras...
21,235
36.061082
163
py
fuzzyJoiner
fuzzyJoiner-master/old/ANNBasedSampleSelection.py
import Named_Entity_Recognition_Modified from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from embeddings import KazumaCharEmbedding from annoy import AnnoyIndex from matcher_functions import connect import argparse import numpy as np from keras.layers import Embeddi...
6,038
32.181319
138
py
fuzzyJoiner
fuzzyJoiner-master/old/TripletLossFacenetLSTM-angular.py
import numpy as np import tensorflow as tf import random as random # import cntk as C # """ # The below is necessary in Python 3.2.3 onwards to # have reproducible behavior for certain hash-based operations. # See these references for further details: # https://docs.python.org/3.4/using/cmdline.html#envvar-PYTHONHASHSE...
21,847
37.329825
167
py
fuzzyJoiner
fuzzyJoiner-master/old/Triplet_Iteration.py
from sys import argv from keras import backend as K from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.layers import Dense, Input, Flatten, Dropout, Lambda from keras.layers import Conv1D, MaxPooling1D, Embedding from keras.models import Model, model_fr...
14,236
37.374663
199
py
fuzzyJoiner
fuzzyJoiner-master/old/ContrastiveLossLSTM-8.20.18.py
import numpy as np import pandas import tensorflow as tf import random as random import json from keras import backend as K from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.layers import Dense, Input, Flatten, Dropout, Lambda, GRU, Activation from keras...
19,575
35.86629
163
py
fuzzyJoiner
fuzzyJoiner-master/old/seq2seq.py
'''Sequence to sequence example in Keras (character-level). This script demonstrates how to implement a basic character-level sequence-to-sequence model. We apply it to translating short English sentences into short French sentences, character-by-character. Note that it is fairly unusual to do character-level machine t...
9,104
40.013514
79
py
fuzzyJoiner
fuzzyJoiner-master/old/matcher.py
#using tutorial https://suhas.org/sqlalchemy-tutorial/ from sys import argv from matcher_functions import * #establish connection to database con, meta = connect(argv[1], argv[2], argv[3]) #load pairs from database aliases = get_aliases(con, meta) #create dictionaries assingning serial numbers to names and names from s...
1,840
62.482759
152
py
fuzzyJoiner
fuzzyJoiner-master/old/cleanser.py
from sys import argv from os import listdir from os.path import isfile, join if __name__ == '__main__': parser = argparse.ArgumentParser( description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) parser.add_argument('-f', dest="input_file or directory", help="file to cleanse ...
1,994
38.9
130
py
fuzzyJoiner
fuzzyJoiner-master/old/image_join3.py
0
0
0
py
fuzzyJoiner
fuzzyJoiner-master/old/matcher_class.py
from matcher_functions import load_good_buckets, create_double_num_dicts, connect, get_aliases class matcher(object): def __init__(self, user, password, database, test_pairs, bucket_number): con, meta = connect(user, password, database) num_to_word, word_to_num = create_double_num_dicts(get_aliases(...
1,366
46.137931
105
py
fuzzyJoiner
fuzzyJoiner-master/old/Named_Entity_Recognition_Modified.py
""" This code is modified from https://github.com/fchollet/keras/blob/master/examples/pretrained_word_embeddings.py and ttps://github.com/fchollet/keras/blob/master/examples/ for our own purposes """ from __future__ import absolute_import from __future__ import print_function import numpy as np from matcher_functio...
23,976
36.289269
258
py
fuzzyJoiner
fuzzyJoiner-master/old/Named_Entity_Recognition.py
""" This code is modified from https://github.com/fchollet/keras/blob/master/examples/pretrained_word_embeddings.py and ttps://github.com/fchollet/keras/blob/master/examples/ for our own purposes """ from __future__ import absolute_import from __future__ import print_function import numpy as np from matcher_functio...
19,852
31.176661
254
py
fuzzyJoiner
fuzzyJoiner-master/old/face_vgg.py
0
0
0
py
fuzzyJoiner
fuzzyJoiner-master/old/TripletLossFacenetLSTM-modified.py
import numpy as np import tensorflow as tf import random as random # import cntk as C # """ # The below is necessary in Python 3.2.3 onwards to # have reproducible behavior for certain hash-based operations. # See these references for further details: # https://docs.python.org/3.4/using/cmdline.html#envvar-PYTHONHASHSE...
21,841
37.319298
167
py
fuzzyJoiner
fuzzyJoiner-master/old/ANNCharacteristics.py
import numpy as np import pandas import tensorflow as tf import random as random import json from keras import backend as K from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.layers import Dense, Input, Flatten, Dropout, Lambda, GRU, Activation from keras...
19,558
35.355019
134
py
fuzzyJoiner
fuzzyJoiner-master/old/TripletLossFacenet.py
from sys import argv from keras import backend as K from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.layers import Dense, Input, Flatten, Dropout, Lambda, LSTM from keras.layers import Conv1D, MaxPooling1D, Embedding from keras.models import Model, mo...
12,095
37.893891
199
py
fuzzyJoiner
fuzzyJoiner-master/old/TripletLossFacenetLSTM-8.31.18.py
from random import shuffle import numpy as np import pandas import tensorflow as tf import random as random import json from keras import backend as K from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.layers import Dense, Input, Flatten, Dropout, Lambda...
22,999
35.624204
163
py
fuzzyJoiner
fuzzyJoiner-master/old/image_join2.py
0
0
0
py
fuzzyJoiner
fuzzyJoiner-master/old/seq2seqTriplet.py
'''Sequence to sequence example in Keras (character-level). This script demonstrates how to implement a basic character-level sequence-to-sequence model. We apply it to translating short English sentences into short French sentences, character-by-character. Note that it is fairly unusual to do character-level machine t...
9,670
39.634454
106
py
fuzzyJoiner
fuzzyJoiner-master/old/image_join.py
0
0
0
py
fuzzyJoiner
fuzzyJoiner-master/old/TripletLossFacenetLSTM_hpo.py
import numpy as np import pandas import tensorflow as tf import random as random import json from keras import backend as K from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.layers import Dense, Input, Flatten, Dropout, Lambda, GRU, Activation from keras...
19,474
35.88447
163
py
fuzzyJoiner
fuzzyJoiner-master/old/TripletLossFacenetLSTM-schroffloss.py
import numpy as np import tensorflow as tf import random as random # import cntk as C # """ # The below is necessary in Python 3.2.3 onwards to # have reproducible behavior for certain hash-based operations. # See these references for further details: # https://docs.python.org/3.4/using/cmdline.html#envvar-PYTHONHASHSE...
21,846
37.463028
167
py
fuzzyJoiner
fuzzyJoiner-master/old/file_parser.py
from sys import argv onlyfiles = [f for f in listdir(args[1]) if isfile(join(args[1], f))] for file_path in onlyfiles: input_file = open(args[1] + "/" + file_path, encoding='utf-8') output_file = open(argv[2] + "/" + file_path, "w", encoding='utf-8') write_line = False for line in input_file: if write_line: it...
460
31.928571
69
py
fuzzyJoiner
fuzzyJoiner-master/old/TripletLossFacenetLSTM-8.29.18.py
import numpy as np import pandas import tensorflow as tf import random as random import json from keras import backend as K from keras.preprocessing.text import Tokenizer from keras.preprocessing.sequence import pad_sequences from keras.layers import Dense, Input, Flatten, Dropout, Lambda, GRU, Activation from keras...
21,235
36.061082
163
py
smt
smt-master/setup.py
""" Author: Dr. John T. Hwang <hwangjt@umich.edu> Dr. Mohamed A. Bouhlel <mbouhlel@umich.edu> Remi Lafage <remi.lafage@onera.fr> Lucas Alber <lucasd.alber@gmail.com> This package is distributed under New BSD license. """ from setuptools import setup, Extension import sys import numpy as np from...
3,762
29.346774
87
py
smt
smt-master/smt/__init__.py
__version__ = "2.0"
20
9.5
19
py
smt
smt-master/smt/examples/run_examples.py
""" Author: Dr. Mohamed A. Bouhlel <mbouhlel@umich> Dr. John T. Hwang <hwangjt@umich.edu> This package is distributed under New BSD license. """ import numpy as np from scipy import linalg from smt.utils import compute_rms_error from smt.problems import Sphere, NdimRobotArm from smt.sampling_methods import L...
21,474
30.259098
173
py