text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
import pytest
import numpy as np
from zodipy._functions import blackbody_emission, interplanetary_temperature
TEMPERATURE = 30
TEMPERATURE_ARRAY = np.array([31,45,53])
R = 3
R_ARRAY = np.array([4, 5.3, 6])
DELTA = 0.324
FREQUENCY = 549 * 1e9
def test_blackbody_emission_value():
"""Tests that return value."""
... | {"hexsha": "6449367be674895576a85f0e7265e1fe7d6d430d", "size": 2295, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_functions.py", "max_stars_repo_name": "MetinSa/zodipy", "max_stars_repo_head_hexsha": "44725b106d8f09412b24667caedc6c8fa081f786", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# Copyright 2020 Zhi Huang. All rights reserved
# Created on Wed Feb 19 13:20:25 2020
# Author: Zhi Huang, Purdue University
#
# This is a concise version rewrite from sklearn_decomposition_nmf.
#
# The original code came with the following disclaimer:
#
# This software is provided "as-is". There are no expressed or ... | {"hexsha": "0765d1446b26e0f958da4c86db74637b44175ffa", "size": 20893, "ext": "py", "lang": "Python", "max_stars_repo_path": "biolearns/decomposition/_nmf.py", "max_stars_repo_name": "huangzhii/biolearns", "max_stars_repo_head_hexsha": "95d58d55690e550fff94730f34ed7c0fb96f12af", "max_stars_repo_licenses": ["MIT"], "max_... |
#!/usr/bin/python3
from datetime import datetime
import sys
import numpy
PKTS=300
slip=2
try:
if sys.argv[1]:
fileName = sys.argv[1]
except IndexError:
print("Using default file name.")
fileName = 'loglistener.txt'
f = open(fileName,"r")
#f.close()
def test():
list=[]
summ=0
first=0
txcounter=0... | {"hexsha": "5e5bb65fba345722ec7237ed640a2109d19f9d1b", "size": 3833, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/sock/latency.py", "max_stars_repo_name": "iliar-rabet/dao-projection", "max_stars_repo_head_hexsha": "e24a00ba29ce92f37bfbcb2595713f2764cd8e9d", "max_stars_repo_licenses": ["BSD-3-Clause"... |
[GOAL]
X : Scheme
⊢ T0Space ↑↑X.toPresheafedSpace
[PROOFSTEP]
refine' T0Space.of_open_cover fun x => _
[GOAL]
X : Scheme
x : ↑↑X.toPresheafedSpace
⊢ ∃ s, x ∈ s ∧ IsOpen s ∧ T0Space ↑s
[PROOFSTEP]
obtain ⟨U, R, ⟨e⟩⟩ := X.local_affine x
[GOAL]
case intro.intro.intro
X : Scheme
x : ↑↑X.toPresheafedSpace
U : OpenNhds x
R :... | {"mathlib_filename": "Mathlib.AlgebraicGeometry.Properties", "llama_tokens": 45231} |
import os,sys
from os.path import dirname, realpath
sys.path.append(dirname(dirname(realpath(__file__))))
import pickle
import numpy as np
import PIL.Image
import dnnlib
import dnnlib.tflib as tflib
import config
import operator
import argparse
url_ffhq = 'https://drive.google.com/uc?id=1MEGjdvVpUsu1jB4zrXZN7Y4... | {"hexsha": "216097e311b7e6bb3d72aef60333f5227e0dfb1e", "size": 1870, "ext": "py", "lang": "Python", "max_stars_repo_path": "pggan/sampling/draw_from_latent.py", "max_stars_repo_name": "VITA-Group/BlackBoxGANCollapse", "max_stars_repo_head_hexsha": "e52afab99e8b2e08a92aab86d84d53db77aa8c75", "max_stars_repo_licenses": [... |
"""
Utility functions
"""
import rastercube
import numpy as np
import os
import errno
from datetime import datetime
import calendar
import cPickle as pickle
import pkg_resources
import atexit
# Cleanup tmpdir used by asset_fname on interpreter exit
atexit.register(lambda: pkg_resources.cleanup_resources())
def asset... | {"hexsha": "0ad065d3086d66c8db71b97519264066c47398db", "size": 4895, "ext": "py", "lang": "Python", "max_stars_repo_path": "rastercube/utils.py", "max_stars_repo_name": "terrai/rastercube", "max_stars_repo_head_hexsha": "c8c6214fd682f72e94df4979f5d737cea4778617", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1... |
import numpy as np
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
def input_point(objectx,atloc, lonloc, sizex, colorx, alphax):
'''
- Our function to draw a specific x and y on a map
- This function need a m-object from basemap to b... | {"hexsha": "f819dcfa3b8362ca72424e3709155df6675ef338", "size": 805, "ext": "py", "lang": "Python", "max_stars_repo_path": "Project_files/Part5_Improving_the_plots/input_point_function.py", "max_stars_repo_name": "Ghasak/Geographical_Basemap", "max_stars_repo_head_hexsha": "80e9555da46f1a0227f345dc29b60ed7cbe1f5ec", "ma... |
# -*- coding: utf-8 -*-
import os
import datetime as dt
import numpy as np
import pandas as pd
from log import LogHandler
from src.data.tdx.setting import tdx_dir, MARKET2TDX_CODE, MARKET_DIR, PERIOD_DIR, PERIOD_EXT
log = LogHandler(os.path.basename('tdx.hq.log'))
def int2date(x):
year = int(x / 2048) + 2004
... | {"hexsha": "ca2106dd4f2b15108e5c38234b2c3f88cd09853a", "size": 4998, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/tdx/hq.py", "max_stars_repo_name": "newlyedward/datascinece", "max_stars_repo_head_hexsha": "2a6148511832552991e115cb468ba4cc1db24353", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
#!/usr/bin/env python
# coding: utf-8
import numpy as np
import os
import pickle
import pprint
import time
import pyross
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
#from matplotlib import rc;
#postFigFileName = 'figPostHistos_pop1e8.pdf'
#trajFigFileName = 'figTraj_pop1e8.pdf'
#mapFigFileName ... | {"hexsha": "1736ac060cd4dbc9cd8ac98fe90cda2090653edc", "size": 5833, "ext": "py", "lang": "Python", "max_stars_repo_path": "SimpleTestModel/figs_quality.py", "max_stars_repo_name": "rljack2002/infExampleCovidEW", "max_stars_repo_head_hexsha": "351e0605c80a51a2cd285136d7a05d969ac6c6fd", "max_stars_repo_licenses": ["MIT"... |
from pytorch_pretrained_bert import BertTokenizer, BertModel
from keras.preprocessing.sequence import pad_sequences
import torch
import numpy as np
class BertWrapper:
def __init__(self, model_string='bert-base-multilingual-cased'):
self.model_string = model_string
self.tokenizer = BertTokenizer.f... | {"hexsha": "1d41389539f38781f1d31d5ead3341cd0aa4007f", "size": 3181, "ext": "py", "lang": "Python", "max_stars_repo_path": "semeval2020/language_models/bertwrapper.py", "max_stars_repo_name": "DavidRother/semeval2020-task1", "max_stars_repo_head_hexsha": "715f82afb8b282669d59ff610b63714d19db4618", "max_stars_repo_licen... |
import numpy as np
from scipy.integrate import odeint
import matplotlib.pyplot as plt
#N Population Size
N = 1000
#Initial conditions and vector
I0 = 1
R0 = 0
S0 = 999
initial = S0, I0, R0
#time
t = np.linspace(0, 200, 200)
#SIR model
def SIRmodel(v, t, N, beta, gamma):
"""Determines three differential equations ... | {"hexsha": "da5e338c2683df72499a3bef99e2a335aa614b2b", "size": 2285, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignment_2/question2.py", "max_stars_repo_name": "jpas3/CTA200", "max_stars_repo_head_hexsha": "231b22c476638be63da945d24d0de8ddaaaf702f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# -*- coding: utf-8 -*-
"""
Navigation toolbar for matplotlib widgets
"""
import numpy as np
from PyQt5.QtCore import QObject
from PyQt5.QtCore import QPoint
from PyQt5.QtCore import QSize
from PyQt5.QtCore import QVariant
from PyQt5.QtCore import Qt
from PyQt5.QtCore import pyqtSignal
from PyQt5.QtCore import pyqtSl... | {"hexsha": "d7a95031b2d8ddd722de89408d743c3d8afc74dc", "size": 29262, "ext": "py", "lang": "Python", "max_stars_repo_path": "mpl4qt/widgets/mpltoolbar.py", "max_stars_repo_name": "archman/python-mpl4qt", "max_stars_repo_head_hexsha": "f84fefb95113492407899206269ff82b609279b2", "max_stars_repo_licenses": ["MIT"], "max_s... |
\documentclass[simplex.tex]{subfiles}
% NO NEED TO INPUT PREAMBLES HERE
% packages are inherited; you can compile this on its own
\onlyinsubfile{
\title{NeuroData SIMPLEX Report: Subfile}
}
\begin{document}
\onlyinsubfile{
\maketitle
\thispagestyle{empty}
The following report documents the progress made by the labs ... | {"hexsha": "07ab8b88b6c9732f3716fec59a527e33d021e503", "size": 2855, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Reporting/reports/2016-12Q4/multiscaleNetworkTest.tex", "max_stars_repo_name": "openconnectome/SIMPLEX_Q2", "max_stars_repo_head_hexsha": "f10a6c4b9548670f9bf8e177914aa8d25fa1230b", "max_stars_repo_... |
import logging
import pickle
from functools import partial
import det3d.core.sampler.preprocess as prep
import numpy as np
import torch
from det3d.core.anchor.anchor_generator import (
AnchorGeneratorRange,
AnchorGeneratorStride,
BevAnchorGeneratorRange,
)
from det3d.core.bbox import region_similarity
from... | {"hexsha": "2925130b43dd80debb9328f74d59b03e476b8eb9", "size": 15031, "ext": "py", "lang": "Python", "max_stars_repo_path": "det3d/builder.py", "max_stars_repo_name": "Lelin-HUNUST/VISTA", "max_stars_repo_head_hexsha": "7bf34132d719cb0e5e803b92cd15451df58a9a5d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 47... |
import numpy as np
import polars as pl
import talib
from talib import abstract
from talib.test_data import series, assert_np_arrays_equal
def test_MOM():
values = pl.Series([90.0,88.0,89.0])
result = talib.MOM(values, timeperiod=1)
assert isinstance(result, pl.Series)
assert_np_arrays_equal(result.to_... | {"hexsha": "60f390e80f83e3b774cf84d7080d63fe70191f03", "size": 3074, "ext": "py", "lang": "Python", "max_stars_repo_path": "talib/test_polars.py", "max_stars_repo_name": "aberja/ta-lib", "max_stars_repo_head_hexsha": "75fbfa86824b675ac03b7e30aaa2eaade8a817cc", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_cou... |
# Tetris square class
import pygame
# import numpy
class Square:
def __init__(self, pygame_screen, color, column, row):
self.pygame_screen = pygame_screen
self.color = color
# self.grid_coordinates = (col, row)
self.row = row
self.column = column
self.screen_coordin... | {"hexsha": "5939743b5d9ac31f77b6830d511c0c7276e1bb5a", "size": 1322, "ext": "py", "lang": "Python", "max_stars_repo_path": "Square.py", "max_stars_repo_name": "palu3492/tetris-game-new", "max_stars_repo_head_hexsha": "b3c980dacefe0ab53f1a4ad474e5319966ecb781", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null... |
import pandas as pd
import seaborn
from bokeh.plotting import figure, show, output_notebook
from bokeh.models import ColumnDataSource, FactorRange, CategoricalAxis, HoverTool
from numpy import nan
import os
file_path = os.path.dirname(os.path.abspath(__file__))
palette = seaborn.color_palette("GnBu", 2).as_hex()*10
... | {"hexsha": "a25dac758f3ed0935ff3628d4a82897c18a1a2f0", "size": 2329, "ext": "py", "lang": "Python", "max_stars_repo_path": "app/features_checklist.py", "max_stars_repo_name": "jannettim/MCDM", "max_stars_repo_head_hexsha": "cc1ade5a53e844cd7e23055a2811173e2e6d08ce", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
import os
from pandas import DataFrame as df
import numpy as np
import json
from sklearn.preprocessing import minmax_scale
data_config = json.load(open("data_config.json", "r"))
def get_dataframe():
csv_dir = data_config["csv_dir"]
data_initialized = False
for f in os.listdir(csv_dir):
csv_filepa... | {"hexsha": "c7dbd3e4a155f6e3a3acef00a048606974c2e90e", "size": 4091, "ext": "py", "lang": "Python", "max_stars_repo_path": "smart_alarm_repo_main/smart_alarm/sensehawk_smart_alarm_local/smart_alarm/main/sensehawk_scada_lstm_tut/dataset_create_lstm_scada.py", "max_stars_repo_name": "codersupreme99101/SmartAlarm", "max_s... |
import os
import struct
import redis
import numpy as np
from yolact import Yolact
from utils.augmentations import FastBaseTransform
from utils.functions import SavePath
from layers.output_utils import postprocess
from data import cfg, set_cfg
import torch
import torch.backends.cudnn as cudnn
# Detection
trained_m... | {"hexsha": "a87b0623e5454026d32d1922ff317668a1860f95", "size": 3373, "ext": "py", "lang": "Python", "max_stars_repo_path": "Modules/yolact/server.py", "max_stars_repo_name": "NikAbba/video_tracking", "max_stars_repo_head_hexsha": "c624a9d3596befa4a941e4ff4092b9545bfdd28d", "max_stars_repo_licenses": ["Apache-2.0"], "ma... |
// Copyright (c) 2017-2019 The QuantisNet Core developers
// Copyright (c) 2014-2017 The Dash Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "spork.h"
#include "base58.h"
#include "chainparams.h"
#incl... | {"hexsha": "6000c7c7e8de72aeb4f1f603081603164338e48f", "size": 22522, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/spork.cpp", "max_stars_repo_name": "JSKitty/QuantisNet-Core", "max_stars_repo_head_hexsha": "75c66b11e29ea0597965471505e5da552d900d49", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu... |
"""
Implementation of Machendran's DeSaliNet[1], including Zeiler's deconvolutional visualizing method (DeconvNet)[2],
and Simonyan's Network saliency (SaliNet)[3] as a special case.
This method is based on the back-propagation of the network activation similar to Zeiler's one.
DeSaliNet has a explicitness on its visua... | {"hexsha": "c2e3ada3652f41367f4e60a2973d80badd1b56ae", "size": 7940, "ext": "py", "lang": "Python", "max_stars_repo_path": "dcnn_visualizer/desalinet.py", "max_stars_repo_name": "tochikuji/DNN-Visualizer", "max_stars_repo_head_hexsha": "902eba04463c5c17ba81b85db7184a91d2cb4c49", "max_stars_repo_licenses": ["Apache-2.0"... |
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import torch.nn as nn
class filter1():
def plot_filters_single_channel_big(t, title):
# setting the rows and columns
nrows = t.shape[0] * t.shape[2]
ncols = t.shape[1] * t.shape[3]
npimg = np.array(t.cpu().num... | {"hexsha": "7b91be0884b91b0fc264fe8c81281792475ecd59", "size": 6932, "ext": "py", "lang": "Python", "max_stars_repo_path": "visualize.py", "max_stars_repo_name": "shadimanafi/SCAN-PyTorch", "max_stars_repo_head_hexsha": "f40f621a1d4af66e610f4714d2efd559d531de34", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
\input{../header_basic_util}
%---------- start document ---------- %
\section{compatibility -- Keep compatibility between \python versions}\linkedzero{compatibility}
%
This module should be simply imported:\\
{\tt import nzmath.compatibility}\\
then it will do its tasks.
\subsection{set, frozenset}\linked... | {"hexsha": "e2d884330f368eb879595ae8a4f28f61b6a015e1", "size": 1465, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "manual/en/compatibility.tex", "max_stars_repo_name": "turkeydonkey/nzmath3", "max_stars_repo_head_hexsha": "a48ae9efcf0d9ad1485c2e9863c948a7f1b20311", "max_stars_repo_licenses": ["BSD-3-Clause"], "m... |
# Databricks notebook source
# MAGIC %md
# MAGIC ScaDaMaLe Course [site](https://lamastex.github.io/scalable-data-science/sds/3/x/) and [book](https://lamastex.github.io/ScaDaMaLe/index.html)
# COMMAND ----------
# MAGIC %md
# MAGIC
# MAGIC ## CNN for MNIST
# MAGIC
# MAGIC Let us move to a classic machine learning ... | {"hexsha": "c73eed66e1a8649812a4c702a724ed0e63249e3e", "size": 12071, "ext": "py", "lang": "Python", "max_stars_repo_path": "dbcArchives/2021/000_0-sds-3-x-projects/student-project-20_group-Generalization/03_CNN_MNIST.py", "max_stars_repo_name": "r-e-x-a-g-o-n/scalable-data-science", "max_stars_repo_head_hexsha": "a974... |
#!/usr/bin/python3
# Copyright (C) 2017 Infineon Technologies & pmdtechnologies ag
#
# THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
# KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
# PARTICULAR PURPOSE.
... | {"hexsha": "007fb61146ba0805b64a143cfd042649d9ff6fb8", "size": 5033, "ext": "py", "lang": "Python", "max_stars_repo_path": "pmd_implementation/pauls_files/pmd_implementation/roypy_util/sample_retrieve_data.py", "max_stars_repo_name": "iggy12345/emerson_seed_object_detection", "max_stars_repo_head_hexsha": "121c6fe55fb4... |
/************************************************************************
* Software License Agreement (BSD License)
*
* Copyright (c) 2014, Péter Fankhauser, Christian Gehring, Stelian Coros
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permi... | {"hexsha": "9c5004c179944aa6bad551722fc722ff18a69281", "size": 8294, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/ooqp_eigen_interface/OoqpEigenInterface.hpp", "max_stars_repo_name": "tomlankhorst/ooqp_eigen_interface", "max_stars_repo_head_hexsha": "682bb537946e6ff3bb6d68ed5187bb0f888004c8", "max_stars... |
#Read in the data
cdata <- read.table("german.data", h=F, sep = ' ')
#Add readable column names
colnames(cdata) <- c("chkngAcctStatus", "durationMonths", "creditHistory", "loanPurpose", "creditAmount", "savingsTotal", "crrntEmplmtSince", "instllmtPct", "persnlStatus", "othrDebtorGuaranters", "crrntResidenceSinc... | {"hexsha": "5e7aac0dbf7139b1667a83025edd19fa2fce2ed7", "size": 1896, "ext": "r", "lang": "R", "max_stars_repo_path": "logisticReg.r", "max_stars_repo_name": "siddhaling/User-Credit-Score-Prediction-Naive-Bayes-And-Logistic-Regression", "max_stars_repo_head_hexsha": "96e4a26f7d6b8f4de3f611b34a98358e065a6829", "max_stars... |
# -*- coding: utf-8 -*-
import pickle
import numpy as np
import keras.models as km
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
import os
import sklearn.covariance as skc
import imageutils, flickrutils
import time
import keras.backend as K
import tensorflow as tf
K.set_image_data_format('channels_... | {"hexsha": "415c746e8ea8765170d6af0bb5bf92a38779f6a0", "size": 4402, "ext": "py", "lang": "Python", "max_stars_repo_path": "flickr_getlabel.py", "max_stars_repo_name": "kayvanrad/lablr", "max_stars_repo_head_hexsha": "8ff5928a4a2fdfbd57cd331952815492d4a5820c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count... |
# -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Quantity helpers for the scipy.special ufuncs.
Available ufuncs in this module are at
https://docs.scipy.org/doc/scipy/reference/special.html
"""
import numpy as np
from astropy.units.core import UnitsError, UnitTypeError, dime... | {"hexsha": "869a1c5734b6ae3f2a030e8644582bda299ad832", "size": 3553, "ext": "py", "lang": "Python", "max_stars_repo_path": "astropy/units/quantity_helper/scipy_special.py", "max_stars_repo_name": "zabop/astropy", "max_stars_repo_head_hexsha": "11b3214f18b74aea5e3f8349e50ae1b09c39d30e", "max_stars_repo_licenses": ["BSD-... |
\documentclass[t]{beamer}
\usetheme{Copenhagen}
\setbeamertemplate{headline}{} % remove toc from headers
\beamertemplatenavigationsymbolsempty
\usepackage{amsmath, tikz, pgfplots, tcolorbox, xcolor, marvosym}
\pgfplotsset{compat = 1.16}
\tikzstyle{input} = [circle, text centered, radius = 1cm, draw = black]
\tikzstyl... | {"hexsha": "832a72e312e072b667b50cddb80a03050c0b1c01", "size": 7455, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Intro_to_Functions(BEAMER).tex", "max_stars_repo_name": "BryanBain/HA2_BEAMER", "max_stars_repo_head_hexsha": "a5e021f12d3cdd0541353c9e121ff5e4df7decd1", "max_stars_repo_licenses": ["CC0-1.0"], "max... |
function [loc_assort_pos,loc_assort_neg] = local_assortativity_wu_sign(W)
%LOCAL_ASSORTATIVITY_WU_SIGN Local Assortativity
%
% [loc_assort_pos,loc_assort_neg] = local_assortativity_wu_sign(W);
%
% Local Assortativity measures the extent to which nodes are connected to
% nodes of similar strength (vs. higher o... | {"author": "fieldtrip", "repo": "fieldtrip", "sha": "c2039be598a02d86b39aae76bfa7aaa720f9801c", "save_path": "github-repos/MATLAB/fieldtrip-fieldtrip", "path": "github-repos/MATLAB/fieldtrip-fieldtrip/fieldtrip-c2039be598a02d86b39aae76bfa7aaa720f9801c/external/bct/local_assortativity_wu_sign.m"} |
import numpy as np
import matplotlib.pyplot as plt # 시각화 도구
# a=np.array([[1,2,3],[4,5,6]])
# b = np.ones_like(a) # _like : a 배열과 같은 형태로 1을 채워넣은 배열을 만들어라
# print(b)
#
#
# #데이터 생성 함수
#
# #0~1범위 내에서 균등 간격으로 5개의 수를 생성
# a=np.linspace(0,1,5)
# print(a)
# # a=np.li... | {"hexsha": "bf480fd2e0b13b4c7e7caf5f19e4f75c5debbad4", "size": 4298, "ext": "py", "lang": "Python", "max_stars_repo_path": "14_2.py", "max_stars_repo_name": "yunjung-lee/class_python_numpy", "max_stars_repo_head_hexsha": "589817c8bbca85d70596e4097c0ece093b5353c3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
// Copyright 2020-2022 The Defold Foundation
// Copyright 2014-2020 King
// Copyright 2009-2014 Ragnar Svensson, Christian Murray
// Licensed under the Defold License version 1.0 (the "License"); you may not use
// this file except in compliance with the License.
//
// You may obtain a copy of the License, together wi... | {"hexsha": "9d861670b788a86f5945778f7baefcd5d50eb85c", "size": 2181, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "engine/crash/src/file_posix.cpp", "max_stars_repo_name": "cmarincia/defold", "max_stars_repo_head_hexsha": "2bf9ec3dfa2f59a9e1808f4768ff9a1fbaac61b4", "max_stars_repo_licenses": ["ECL-2.0", "Apache-... |
// Copyright 2013 Cloudera, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to ... | {"hexsha": "1dd23075c8f749a50b7f61483bded0757d8bd9bf", "size": 3104, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/kudu/util/test_graph.cc", "max_stars_repo_name": "kv-zuiwanyuan/kudu", "max_stars_repo_head_hexsha": "251defb69b1a252cedd5d707d9c84b67cf63726d", "max_stars_repo_licenses": ["Apache-2.0", "CC0-1.0... |
from dolfin import *
import sys
from random import gauss, expovariate
import math
from math import atan, pi, atan2, sqrt
import numpy as np
import nanopores as nano
import nanopores.geometries.pughpore as pughpore
from get_F import Force, Current
from get_D import Dx, Dy, Dz, dxDx, dyDy, dzDz, dis
import os
from time i... | {"hexsha": "130b7692074c2260da6453e984e567d035c62d84", "size": 5761, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/pughpore/randomwalk/run.py", "max_stars_repo_name": "jhwnkim/nanopores", "max_stars_repo_head_hexsha": "98b3dbb5d36464fbdc03f59d224d38e4255324ce", "max_stars_repo_licenses": ["MIT"], "max_... |
# -*- coding:utf-8 -*-
"""
python for MSA to slove the static traffic assignment
"""
import networkx as nx
import matplotlib.pyplot as plt
import math
demand = 500
theta = 0.1
walk_link_cap = 9999999999 # very large capacity for the walking link
class path_class():
"""
path class
... | {"hexsha": "4dff3ed18e5fca64da201b42df34724467bff2a1", "size": 5432, "ext": "py", "lang": "Python", "max_stars_repo_path": "MSA.py", "max_stars_repo_name": "mzyKi/nadaLink", "max_stars_repo_head_hexsha": "a328b322ce5920f3a315bfa41ece0b69f0fbb38c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max... |
//
// detail/variadic_templates.hpp
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
... | {"hexsha": "8807a3aae321ae73613ac12a86287b6cc09e9f29", "size": 2299, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "ios/Pods/boost-for-react-native/boost/asio/detail/variadic_templates.hpp", "max_stars_repo_name": "rudylee/expo", "max_stars_repo_head_hexsha": "b3e65a7a5b205f14a3eb6cd6fa8d13c8d663b1cc", "max_stars... |
import torch
from pathlib import Path
import sys
import cv2
sys.path.append("..")
from models.model import get_tsn_model
import numpy as np
import json
import argparse
parser = argparse.ArgumentParser(description='running inference on video')
parser.add_argument("weights", type=Path, help="weights file for model")
par... | {"hexsha": "4a24b140337b2e2f1ba9e2e28a5096fdc57168f0", "size": 2757, "ext": "py", "lang": "Python", "max_stars_repo_path": "exp/taskB/inference.py", "max_stars_repo_name": "temi92/epic-kitchens-55-action-models", "max_stars_repo_head_hexsha": "40e984bbdcf502539b3569774cb6b5526eb71c3c", "max_stars_repo_licenses": ["Apac... |
[STATEMENT]
lemma lms_minus_aref: "(list_remove_all,op_mset_minus) \<in> list_mset_rel \<rightarrow> list_mset_rel \<rightarrow> list_mset_rel"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (list_remove_all, op_mset_minus) \<in> list_mset_rel \<rightarrow> list_mset_rel \<rightarrow> list_mset_rel
[PROOF STEP]
unfo... | {"llama_tokens": 235, "file": "Refine_Imperative_HOL_IICF_Impl_IICF_List_Mset", "length": 2} |
"""
This is a python version of this function:
https://github.com/yeatmanlab/AFQ/blob/master/functions/AFQ_MultiCompCorrection.m
"""
import random
import numpy as np
import scipy.stats
def get_significant_areas(pvals, clusterFWE, alpha=0.05):
"""
Mark clusters of size clusterFWE of consecutive values smaller... | {"hexsha": "f4d54bc8e548dccdfeb5b259cf138e0e6816a38d", "size": 7262, "ext": "py", "lang": "Python", "max_stars_repo_path": "tractseg/libs/AFQ_MultiCompCorrection.py", "max_stars_repo_name": "inaccel/TractSeg", "max_stars_repo_head_hexsha": "cc9feefd71ba9fcfacc4d3a7656f1a77bab9a287", "max_stars_repo_licenses": ["Apache-... |
using SparseUtils
import SparseArrays
import SparseArrays: SparseMatrixCSC
#import SparseUtils: materialize
import SparseUtils: SparseMatrixCOO
import LinearAlgebra
using Serialization
using Test
let # typeof(sparse_array) = SparseMatrixCSC
sparse_array = open("sparse_array.dat", "r") do io
deserialize(io)... | {"hexsha": "c90cb30d7717d670061107545840011cf263bd84", "size": 2422, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "JuliaTagBot/SparseUtils.jl", "max_stars_repo_head_hexsha": "b5469701e8af53c415bb5fb0468de52db8b17a85", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import numpy as np
from PIL import Image
import torch
from torchvision import transforms
class JigsawCrop(object):
"""
The class implements the process of generating jigsaw crops for PIRL. The implementation is based on
https://github.com/HobbitLong/PyContrast
"""
def __init__(self, n_grid=2, img... | {"hexsha": "98f3ad9ddb35ff1f641fb184583f2cd1813e5880", "size": 2597, "ext": "py", "lang": "Python", "max_stars_repo_path": "transforms/pirl.py", "max_stars_repo_name": "mmaaz60/ssl_for_fgvc", "max_stars_repo_head_hexsha": "9a4bf0a112b818caca8794868a903dc736839a43", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
import os
import numpy as np
import pprint
import pdb
import time
import _init_paths
import torch
import torch.nn as nn
from roi_data_layer.roidb import combined_roidb
from roi_data_layer.roibatchLoader import roibatchLoader
from model.utils.config import cfg, cfg_from_file, cfg_from_list, get_output_dir
from model.ut... | {"hexsha": "7640b40ffab37ae6433c25470265fb6d33f8101c", "size": 10859, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_adv.py", "max_stars_repo_name": "strongwolf/CDG", "max_stars_repo_head_hexsha": "a78864ca3519de77deb60a11f68059b76e076b5c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 10, "max_s... |
import os
import shutil
from tqdm import tqdm
import numpy as np
import pandas as pd
from PIL import Image as im
train_csv = "MNIST\/train.csv"
test_csv = "MNIST\/test.csv"
label = []
for _type, csv in [['train', train_csv], ['test', test_csv]]:
# new folder
path = "MNIST\/" + _type
if os.path.isdir(pat... | {"hexsha": "c6e759ac1104414e8703ddf058f3b70a67768f3e", "size": 1175, "ext": "py", "lang": "Python", "max_stars_repo_path": "MNIST/to_img.py", "max_stars_repo_name": "chamhoo/FiaTorch", "max_stars_repo_head_hexsha": "f905255f5f9eccdd58f3693d9db71bd203a2fcf2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
from numpy.lib.function_base import diff
import torch
from torch import nn
from torch.nn import functional as F
from itertools import accumulate
import numpy as np
import os
import importlib
from utils.my_utils import carving_t, carving_t2, FeatExt, get_in_range, idx_cam2img, idx_world2cam, normalize_for_grid... | {"hexsha": "68c9488a495919a38f2ff870419c8d832b14221b", "size": 11909, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/loss.py", "max_stars_repo_name": "arthurlirui/MVSDF", "max_stars_repo_head_hexsha": "0b1014682e9b5cd5a92fea715d26ebc9845da4bf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 76, "m... |
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 26 15:15:55 2018
@author: Madhur Kashyap 2016EEZ8350
"""
import os
import sys
import logging
import numpy as np
from functools import partial
from keras.optimizers import Adadelta
from sklearn.metrics import confusion_matrix
prog = os.path.basename(__file... | {"hexsha": "ae8f6695bbd5479f68722beaaddc25f79b3991ec", "size": 1659, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_ce3.py", "max_stars_repo_name": "madhurkashyap/boundary_detection", "max_stars_repo_head_hexsha": "f7fb98c8bcbc204b1fcd0eb34a8699f16a8725a3", "max_stars_repo_licenses": ["MIT"], "max_st... |
import pandas as pd
import numpy as np
### MULTINDEX
df = pd.DataFrame(np.random.rand(4, 2),
index=[['Temperatura', 'Temperatura', 'Fuente carbono', 'Fuente carbono'],
['30', '35', 'glc', 'ace']],
columns=['Gen1', 'Gen2'])
print(df)
df_inverso = df = ... | {"hexsha": "c5492ef96038be6d7d340f723d691abe4a6a63ac", "size": 3294, "ext": "py", "lang": "Python", "max_stars_repo_path": "ejer/Dia_9_2.py", "max_stars_repo_name": "zara-ms/python_class-2", "max_stars_repo_head_hexsha": "edd5a4b7a3b3f2759f63208bbf42d5f9e7acb45b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# --------------
# Importing header files
import numpy as np
# Path of the file has been stored in variable called 'path'
#New record
new_record=[[50, 9, 4, 1, 0, 0, 40, 0]]
#Code starts here
data=np.genfromtxt(path,delimiter=",",skip_header=1)
census = np.concatenate((data,new_record),axis=0)
# ... | {"hexsha": "4d93519cfc1e5aeb7074c9e7b996fa8ceda88586", "size": 1565, "ext": "py", "lang": "Python", "max_stars_repo_path": "numpybasic/code.py", "max_stars_repo_name": "varunbonagiri/ga-learner-dsb-repo", "max_stars_repo_head_hexsha": "f7055de15287dbd3010bac72458697965a168cd7", "max_stars_repo_licenses": ["MIT"], "max_... |
#########
## map ##
#########
# Single input
@generated function map{T}(f, a1::StaticArray{T})
newtype = :(similar_type($a1, promote_op(f, T)))
exprs = [:(f(a1[$j])) for j = 1:length(a1)]
return quote
$(Expr(:meta, :inline))
$(Expr(:call, newtype, Expr(:tuple, exprs...)))
end
end
# Two... | {"hexsha": "aa3b5e84e206a99ca8a5504d79de3c3c5df2a94a", "size": 9664, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/mapreduce.jl", "max_stars_repo_name": "JuliaPackageMirrors/StaticArrays.jl", "max_stars_repo_head_hexsha": "c453f137c163fa435659b263d8af8e6f87f07d42", "max_stars_repo_licenses": ["MIT"], "max_s... |
# use the tensroflow
try:
from base import layers
except:
print('[%s] no tensorflow.' % __name__)
# do not use the tensorflow
from base import ngram
from base import parser
from base import wblib as wb
from base import matlib as mlib
from base import reader
from base import vocab
from base impor... | {"hexsha": "35d0b62d4439c53fe8d73b6a5e39fe91c154e6a2", "size": 578, "ext": "py", "lang": "Python", "max_stars_repo_path": "base/__init__.py", "max_stars_repo_name": "thu-spmi/semi-EBM", "max_stars_repo_head_hexsha": "393e3ea3566dd60c48872a5c573a335e8e802707", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"... |
import numpy as np
import sklearn.datasets
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
def umatrix(som_model, use_colorbar=True, **kwargs):
"""Plot Self-organizing map U-Matrix
Args:
som_model (minisom.MiniSom): MiniSom Model
use_colorbar (bool): Flag... | {"hexsha": "139227ae06f3fb8ff387b3d323d8bfe0322f4ebe", "size": 4808, "ext": "py", "lang": "Python", "max_stars_repo_path": "minisom_plot/evaluation.py", "max_stars_repo_name": "M3nin0/minisom.plot", "max_stars_repo_head_hexsha": "9922a9652d674ccc0fbc65af39be3a5796f1d83e", "max_stars_repo_licenses": ["BSD-2-Clause"], "m... |
c
c
c ###################################################
c ## COPYRIGHT (C) 1991 by Jay William Ponder ##
c ## All Rights Reserved ##
c ###################################################
c
c ###############################################################
c ## ... | {"hexsha": "8e88522a337b0599b6410cdb9fd345d82b98cbee", "size": 34245, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "HCsbLib/HCsbLib/HTLib2.Bioinfo/External.Tinker/src/tinker-6.2.06/eimptor2.f", "max_stars_repo_name": "htna/HCsbLib", "max_stars_repo_head_hexsha": "dae7f4e3e5e2fbc3b6e619f2ea037f661a8ae097", "max... |
Name = "coname"
DividendYieldPercent = "yie"
LongTermDebtToEquity = "qto"
MarketCapitalizationInMillion = "mkt"
NetProfitMarginPercent = "qpm"
OneDayPriceChangePercent = "prl"
PriceEarningsRatio = "pee"
PriceToBookValue = "pri"
PriceToFreeCashFlow = "prf"
ReturnOnEquityPercent = "ttm" | {"hexsha": "b8ba1ea43895b2844f72f1ba230f7eb64abda478", "size": 285, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/yahoo_finance_api/MarketQuoteProperties.jl", "max_stars_repo_name": "tjolsen/YahooFinanceAPI.jl", "max_stars_repo_head_hexsha": "e828a039357c6766ae6da1a32ec8fd7863eb7e39", "max_stars_repo_licens... |
import sys
from datetime import timedelta, datetime
from pyspark import HiveContext
from pyspark.sql import functions as f, SparkSession
def algo(src, from_dt, to_dt):
res = steps(src, from_dt, to_dt)
return res
def steps(src, from_dt, to_dt):
import sys
MODULES_PATH = '../code/'
... | {"hexsha": "7ce916c555392272957aff619fb0711956545918", "size": 11988, "ext": "py", "lang": "Python", "max_stars_repo_path": "Raif/pyspark/calc_06.py", "max_stars_repo_name": "musicnova/7a_task", "max_stars_repo_head_hexsha": "2e34776de3706aabcac1afe66728b8701068a968", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
from arkouda.pdarrayclass import pdarray
from pandas import Series, Timestamp, Timedelta as pdTimedelta, date_range as pd_date_range, timedelta_range as pd_timedelta_range, to_datetime, to_timedelta # type: ignore
from arkouda.dtypes import int64, isSupportedInt
from arkouda.pdarraycreation import from_series, array as... | {"hexsha": "ab2c1049f98da5ada069bac23a5750a6b8130218", "size": 23318, "ext": "py", "lang": "Python", "max_stars_repo_path": "arkouda/timeclass.py", "max_stars_repo_name": "jackgoodier/arkouda", "max_stars_repo_head_hexsha": "4a3855fd940160355880a5194736500fb896d982", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
# -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import glob
import os
import os.path as osp
import sys
import numpy as np
from PIL import Image
from pdseg.vis import get_color_map_list
def parse_args():
parser = argparse.ArgumentParser(
formatter_class=argparse.ArgumentDefau... | {"hexsha": "b385049172c4b134aca849682cbf76193c569f62", "size": 2500, "ext": "py", "lang": "Python", "max_stars_repo_path": "pdseg/tools/gray2pseudo_color.py", "max_stars_repo_name": "Channingss/PaddleSeg", "max_stars_repo_head_hexsha": "19e89e7f938b75b362aea5fba71ab5b51af00150", "max_stars_repo_licenses": ["Apache-2.0"... |
from sstcam_sandbox.d181023_dc_tf import all_files
from sstcam_sandbox import get_data, HDF5Writer
from CHECLabPy.core.io import TIOReader
import numpy as np
import pandas as pd
from tqdm import trange
from IPython import embed
def get_df(paths, vped_list):
assert (len(paths) == len(vped_list))
readers = [TIO... | {"hexsha": "c9f1f8a76ab14a14c73b76df320365ad28546415", "size": 2048, "ext": "py", "lang": "Python", "max_stars_repo_path": "sstcam_sandbox/d181023_dc_tf/averages.py", "max_stars_repo_name": "watsonjj/CHECLabPySB", "max_stars_repo_head_hexsha": "91330d3a6f510a392f635bd7f4abd2f77871322c", "max_stars_repo_licenses": ["BSD... |
# struct WiderFactor{S<:Unsigned, T<:Unsigned} <: AbstractFactor{T}
# basefactor::AbstractFactor{S}
# end
# Base.length(factor::WiderFactor{S, T}) where {S<:Unsigned} where {T<:Unsigned} = length(factor.basefactor)
# getlevels(factor::WiderFactor{S, T}) where {S<:Unsigned} where {T<:Unsigned} = getlevels(factor.b... | {"hexsha": "82b99eca53e66cc4cce30e985e8dccc4686ba096", "size": 1230, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Factors/widerfactor.jl", "max_stars_repo_name": "Statfactory/JuML", "max_stars_repo_head_hexsha": "fe9de3a2ac2a7ee862e47ed5be72e565d9b01e94", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
import base64
from io import BytesIO
from itertools import product
import pandas as pd
import numpy as np
run_aggs = {
"m": "mean",
"n": "mean",
"j": "mean",
"p_1": "mean",
"p_2": "mean",
"p_3": "mean",
"q_h1": "mean",
"q_h2": "mean",
"q_ml": "mean",
"alpha_ml": "mean",
"p... | {"hexsha": "b0c27ee9876de6d46b108898462b23af4d9abb7e", "size": 2686, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/analysis.py", "max_stars_repo_name": "felixpeters/ai-sim-job", "max_stars_repo_head_hexsha": "d185e91ed153c37bf7ade61a07399ad3f1dbf7b2", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
# This file is a part of FaceCraker. License is MIT
using Documenter, FaceCraker
makedocs(
modules = [FaceCraker],
sitename = "FaceCraker.jl",
pages = Any[
"index.md"
],
versions = ["v#.#", "dev" => "dev"],
assets = [""],
)
deploydocs(
repo = "github.com/fetaxyu/FaceCraker.jl",
)
| {"hexsha": "f2c01f591288f0aeb35418240a2615b61d434053", "size": 294, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "gitter-badger/FaceCracker.jl", "max_stars_repo_head_hexsha": "063933e38fc46df37ad33e976580832c8e9ae2f6", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
# -*- coding: utf-8 -*-
# Computing Persistent Homology and its histogram
import os,glob
import numpy as np
from tqdm import tqdm
import seaborn as sns
import matplotlib.pyplot as plt
from sklearn.neighbors import KernelDensity
from scipy.stats import gaussian_kde
import argparse,json
import cripser
from scipy.ndimage... | {"hexsha": "acfabbad5e237e09517704d2d3a49b4d942ce3ab", "size": 19734, "ext": "py", "lang": "Python", "max_stars_repo_path": "PHdict.py", "max_stars_repo_name": "shizuo-kaji/PretrainCNNwithNoData", "max_stars_repo_head_hexsha": "6d076e4bc2effcd91e9275470db79e0125704087", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
! Test alternate entry points for functions when the result types
! of all entry points match
function f1 (a)
integer a, b, f1, e1
f1 = 15 + a
return
entry e1 (b)
e1 = 42 + b
end function
function f2 ()
real f2, e2
entry e2 ()
e2 = 45
end function
function f3 ()
double precision a, b, f3, e3
entry e3 ()... | {"hexsha": "bef8a98dfd92daabfe52cfee2e3091b78d09a2a2", "size": 1583, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "gcc-gcc-7_3_0-release/gcc/testsuite/gfortran.fortran-torture/execute/entry_1.f90", "max_stars_repo_name": "best08618/asylo", "max_stars_repo_head_hexsha": "5a520a9f5c461ede0f32acc284017b737a4389... |
!! Copyright (C) Stichting Deltares, 2012-2016.
!!
!! This program is free software: you can redistribute it and/or modify
!! it under the terms of the GNU General Public License version 3,
!! as published by the Free Software Foundation.
!!
!! This program is distributed in the hope that it will be useful,
!! b... | {"hexsha": "759f6a51025c54168294930d3912f6c1d0382a42", "size": 5749, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "docker/water/delft3d/tags/v6686/src/engines_gpl/waq/packages/waq_io/src/waq_io/dlwq5h.f", "max_stars_repo_name": "liujiamingustc/phd", "max_stars_repo_head_hexsha": "4f815a738abad43531d02ac66f5bd0... |
import deeptools.bigwigCompare as bwComp
import deeptools.multiBigwigSummary as bwCorr
import numpy as np
import numpy.testing as nt
import os.path
from os import unlink
ROOT = os.path.dirname(os.path.abspath(__file__)) + "/test_data/"
BIGWIG_A = ROOT + "testA_skipNAs.bw"
BIGWIG_B = ROOT + "testB_skipNAs.bw"
BIGWIG_C... | {"hexsha": "8319242779397ed658a588e0e30951cfcd16b1af", "size": 4603, "ext": "py", "lang": "Python", "max_stars_repo_path": "deeptools/test/test_bigwigCompare_and_multiBigwigSummary.py", "max_stars_repo_name": "gartician/deepTools", "max_stars_repo_head_hexsha": "78cbddf3ea038e12b8ff1fc749cfeca3fa5f2f88", "max_stars_rep... |
export LRMat;
struct LRMat{T<:Number}
# variables
height:: Int
width:: Int
UMat:: Array{T,2}
VMat:: Array{T,2}
# global settings
EPS:: Float64
MAXRANK:: Int
function LRMat(D,Eps,MaxRank)
h = size(D,1);
w = size(D,2);
[U,S,V] = svdtru... | {"hexsha": "12511ec77f1e58fe824496af3726959df7ff5853", "size": 401, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "HMat.jl/src/LRMat/LRMat.jl", "max_stars_repo_name": "YingzhouLi/HMat", "max_stars_repo_head_hexsha": "518f497e8140505ea7c69896ac27675ccbe9f3c6", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
using Optim
mutable struct HLT
α::Float64
β::Float64
l₀::Float64
b₀::Float64
HLT() = new(0, 0, 0, 0)
HLT(α::Number, β::Number, l₀::Number, b₀::Number) = new(Float64(α), Float64(β),
Float64(l₀), Float64(b₀))
end
function loss(model::HLT, time_series)
α, β, l₀, b₀ = model.α, model.β, model.l₀, model.b₀
N =... | {"hexsha": "7ddd8caec558e0f412db60e558ad3f67186bedc7", "size": 1892, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "TSeriesForecast/src/holts_trend_method.jl", "max_stars_repo_name": "lambdaclass/julia_time_series_library", "max_stars_repo_head_hexsha": "4e02a71b485f16aff60ce741b0ad3ce2481fed91", "max_stars_repo... |
# ---
# title: 743. Network Delay Time
# id: problem743
# author: Tian Jun
# date: 2020-10-31
# difficulty: Medium
# categories: Heap, Depth-first Search, Breadth-first Search, Graph
# link: <https://leetcode.com/problems/network-delay-time/description/>
# hidden: true
# ---
#
# There are `N` network nodes, labelled `... | {"hexsha": "43102905ed8062441a704d8067e67785703e0041", "size": 1242, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/unresolved/743.network-delay-time.jl", "max_stars_repo_name": "noob-data-analaysis/LeetCode.jl", "max_stars_repo_head_hexsha": "94d91b295e988948e77e737c10d2f0e3ecb7c2b0", "max_stars_repo_licens... |
import torch
import paddle
import os
import numpy as np
from ppgan.models.discriminators.discriminator_styleganv2ada import StyleGANv2ADA_Discriminator
c_dim = 0
w_dim = 512
# img_resolution = 512
# img_resolution = 128
img_resolution = 32
img_channels = 3
channel_base = 32768
channel_max = 512
num_fp16_res = 4
conv_c... | {"hexsha": "b6cc9c16b544494018d7479f15cf368b93c2751c", "size": 2238, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_grad/test2_54_Discriminator_grad_2paddle.py", "max_stars_repo_name": "miemie2013/ppgan", "max_stars_repo_head_hexsha": "48008d85ec6c5fa2e1469acf8507b2614fa550cc", "max_stars_repo_licenses": [... |
import time
import numpy as np
import quaternion
from .coordinatemath import (apply_rotation, pos_quats_to_plot_coords)
from .latency import Latency
from .testpaths import test_paths
# TODO modify actual coordinate generator to send between [-1,1] [-1,1] for x, y
# ensure proper aspect ratio that we expect
class Coo... | {"hexsha": "d145cf0d892ae9e999624115f6618d163f34a1ce", "size": 3238, "ext": "py", "lang": "Python", "max_stars_repo_path": "tracker/coordinategenerator.py", "max_stars_repo_name": "SicariusNoctis/eagle-eye-tracker", "max_stars_repo_head_hexsha": "31e160057f1d2fa2c5fbd94ba4f5e9d064481c77", "max_stars_repo_licenses": ["M... |
# Hello world example, similar to the Boost.Python hello world
using CxxWrap
using Base.Test
using Compat
# Wrap the functions defined in C++
wrap_modules(CxxWrap._l_parametric)
import ParametricTypes.TemplateType, ParametricTypes.NonTypeParam
p1 = TemplateType{ParametricTypes.P1, ParametricTypes.P2}()
p2 = Templat... | {"hexsha": "f21d0c74a525d82259bdc703b4011c9f03cc6e3a", "size": 1254, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/parametric.jl", "max_stars_repo_name": "JuliaPackageMirrors/CxxWrap.jl", "max_stars_repo_head_hexsha": "532498b8157238f765530a1cd7eb1674b9eea738", "max_stars_repo_licenses": ["MIT"], "max_star... |
import cv2
import numpy as np
import matplotlib.pyplot as plt
def sample_test1(img):
#return img[159, 73:393]
return img[159, 73:193]
def sample_test2():
signal = np.sin(np.linspace(0, 60 * np.pi, 1200))
return signal
def divide_4signals(signal):
s1 = signal[0::4]
s2 = signal[1::4]
... | {"hexsha": "bdd0ff3ced1d154546463280ff27ad88cbfaa285", "size": 4324, "ext": "py", "lang": "Python", "max_stars_repo_path": "phase_shift.py", "max_stars_repo_name": "kibekibe/sample_moire_sample", "max_stars_repo_head_hexsha": "7ebd4897baff4866b678cc4c05cc0750ede6c8ba", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
Ordnung und Sauberkeit!!!
Tyrants have not yet discovered any chains with which to fetter the mind.
Andrew Banta is a Violinist, addicted to Coffee, and nothing more. Image(andrewblanche.jpg, Andrew and Users/BlancheNonken Blanche share a meal at a Wiki BBQ Oct 2005 BBQ, right, thumbnail)
was machst du hier? fra... | {"hexsha": "70eef7f6bb885a261d225ffbf4e432d24eccc998", "size": 2555, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/AndrewBanta.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
"""
BiMPM (Bilateral Multi-Perspective Matching) model implementation.
"""
from typing import Dict, Optional, List, Any
from overrides import overrides
import torch
import numpy
from allennlp.common.checks import check_dimensions_match
from allennlp.data import Vocabulary
from allennlp.modules import FeedForward, Se... | {"hexsha": "eb99344481c722824393197e3659c98faf3e5018", "size": 6109, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch_models/model/bert_model.py", "max_stars_repo_name": "codedecde/BiMPM", "max_stars_repo_head_hexsha": "818602fcf7a018632707b8fbfe33200036795731", "max_stars_repo_licenses": ["Apache-2.0"], ... |
import numpy as np
import xlrd
import matplotlib.pyplot as plt
import pandas as pd
from scipy.linalg import svd
from categoric2numeric import categoric2numeric
from matplotlib.pyplot import figure, plot, xlabel, ylabel, legend, show
import sklearn.linear_model as lm
import sklearn.model_selection as skmd
from toolbox.T... | {"hexsha": "ce244ae54b99a26025b67cc72281d099a59bb89f", "size": 25875, "ext": "py", "lang": "Python", "max_stars_repo_path": "02_assignment/regression_part_b_comparrison.py", "max_stars_repo_name": "LukaAvbreht/ML_projects", "max_stars_repo_head_hexsha": "8b36acdeb017ce8a57959c609b96111968852d5f", "max_stars_repo_licens... |
# -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (c) 2019 HERE Europe B.V.
#
# SPDX-License-Identifier: MIT
#
###############################################################################
import json
import random
import numpy as np
f... | {"hexsha": "f9299d570ebf1103970f4bef7454568557c9e8e7", "size": 4742, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/test_fields_similarity.py", "max_stars_repo_name": "deeplook/xyz-qgis-plugin", "max_stars_repo_head_hexsha": "37b7d84992155fe35d9578b58c9d74a198eccb40", "max_stars_repo_licenses": ["MIT"], "m... |
import os
import random
import time
import numpy as np
import torch
import torch.optim as optim
from torch.utils.data import DataLoader
from crossView import PVA_model, Argoverse
from opt import get_args
import tqdm
from datetime import datetime
from utils import mean_IU, mean_precision
import wandb
def readlines(f... | {"hexsha": "f75dad1a908cd9515ec0ceb89ed5c42182cd92e4", "size": 8725, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_argo.py", "max_stars_repo_name": "zzx9636/cross-view", "max_stars_repo_head_hexsha": "9a7e874be607eefa7bd34934e274cc376e99f65f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Functions to plot the NN predictions
"""
from vrmslearn.Trainer import Trainer
from vrmslearn.SeismicGenerator import SeismicGenerator
from vrmslearn.RCNN import RCNN
from vrmslearn.ModelParameters import ModelParameters
from vrmslearn.SeismicGenerator import SeismicGe... | {"hexsha": "81cabe81b10de556097fda893d1927eec7c8c01e", "size": 15553, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_prediction.py", "max_stars_repo_name": "GeoCode-polymtl/Deep_1D_velocity", "max_stars_repo_head_hexsha": "8f42fc4f5c984d0e11b4c93ae7eee99ba3843b4c", "max_stars_repo_licenses": ["MIT"], "max_... |
[STATEMENT]
lemma weakPsiCongTransitive:
fixes \<Psi> :: 'b
and P :: "('a, 'b, 'c) psi"
and Q :: "('a, 'b, 'c) psi"
and R :: "('a, 'b, 'c) psi"
assumes "\<Psi> \<rhd> P \<doteq> Q"
and "\<Psi> \<rhd> Q \<doteq> R"
shows "\<Psi> \<rhd> P \<doteq> R"
[PROOF STATE]
proof (prove)
goal (1 subgoal):... | {"llama_tokens": 5674, "file": "Psi_Calculi_Weak_Psi_Congruence", "length": 38} |
!! Helper Variables
INTEGER :: inner_counter, outer_counter
INTEGER :: elements_per_inner
INTEGER :: total_counter
CALL ConstructEmptyMatrix(dense_matrix, sparse_matrix%rows, &
& sparse_matrix%columns)
!! Loop over elements.
dense_matrix%DATA = 0
total_counter = 1
DO outer_counter = 1, sparse... | {"hexsha": "860a5895eea9f97afa1fc94fe258ef075b39ba45", "size": 866, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Source/Fortran/dense_includes/ConstructMatrixDFromS.f90", "max_stars_repo_name": "Kokookster/NTPoly", "max_stars_repo_head_hexsha": "717b2e344e800ea6c2de7061b96dd51ffd089f36", "max_stars_repo_lic... |
import cv2
import torch
import random
import numpy as np
def flip_horizontal(img, mask):
img = np.flip(img, axis=1)
mask = np.flip(mask, axis=1)
return img, mask
def rotate(img, mask, angle_abs=5):
h, w, _ = img.shape
angle = random.choice([angle_abs, -angle_abs])
M = cv2.getRotationMatrix2... | {"hexsha": "7264f6b633427e9ea9d50f4a8b28c0358370ed27", "size": 1229, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/transforms.py", "max_stars_repo_name": "garvm7/transunet_pytorch", "max_stars_repo_head_hexsha": "277c42d182ab9606607b0db782f0d00b55f06760", "max_stars_repo_licenses": ["MIT"], "max_stars_co... |
#DISCLAIRMER: ESTE CODIGO ES A MODO DE EJEMPLO DIDÁCTICO, NO CONTIENE CONTROL DE ERRORES, NI SOFISTICACIONES, NI MEJORAS DE
# PERFORMANCE. TODOS LOS USOS DE LIBRERIAS EXTERNAS PUEDEN SER MEJORADAS EN SU IMPLEMENTACIÓN.
# ===================================================================================
import matplo... | {"hexsha": "7d0e750d95b39baa0de1be2a2fa6fcd539a08ac8", "size": 2722, "ext": "py", "lang": "Python", "max_stars_repo_path": "ejemplo3.py", "max_stars_repo_name": "InoveAlumnos/desafiosAgTech2020", "max_stars_repo_head_hexsha": "f3cb21db12516dcf53b196ece5e40a3336d1a044", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
"""
This is an implementation of Neural Network Dynamics for Model-Based Deep Reinforcement Learning with Model-Free Fine-Tuning.
See https://arxiv.org/abs/1708.02596
"""
import torch
import torch.nn as nn
import numpy as np
from machina import loss_functional as lf
from machina.utils import detach_tensor_d... | {"hexsha": "5a15c6ed1c7a81fe3b6c9b2516b047a39abe58e9", "size": 2066, "ext": "py", "lang": "Python", "max_stars_repo_path": "machina/algos/mpc.py", "max_stars_repo_name": "krish-dx/machina", "max_stars_repo_head_hexsha": "f93bb6f5aca1feccd71fc509bd6370d2015e2d85", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3... |
From iris.algebra Require Import frac.
From iris.proofmode Require Import tactics monpred.
From iris.base_logic Require Import base_logic lib.fancy_updates.
Section base_logic_tests.
Context {M : ucmra}.
Implicit Types P Q R : uPred M.
(* Test scopes for bupd *)
Definition use_bupd_uPred (n : nat) : uPred M :... | {"author": "amintimany", "repo": "iris", "sha": "03eaffa3b28bffc561b93f30a3ba40bab8ae1fd1", "save_path": "github-repos/coq/amintimany-iris", "path": "github-repos/coq/amintimany-iris/iris-03eaffa3b28bffc561b93f30a3ba40bab8ae1fd1/tests/iris_notation.v"} |
"""Toy environment for testing option learning."""
import logging
from typing import Callable, ClassVar, Dict, List, Optional, Sequence, Set
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
from gym.spaces import Box
from predicators.src import utils
from predicators.src.envs import BaseEnv
from ... | {"hexsha": "33bf3a4f8bb61b675a3837db54d9869796484ee5", "size": 7705, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/envs/touch_point.py", "max_stars_repo_name": "Learning-and-Intelligent-Systems/predicators", "max_stars_repo_head_hexsha": "0b2e71cacf86ba2bfdc1d9059c3a78016d0a4d7e", "max_stars_repo_licenses"... |
\section{Problem Statement}
The hereby \textbf{Report 4} will state an essay for literature knowledge that might support our research. We evaluate several research work. This report will focus on the topic \textbf{Interaction Methods} regarding \textbf{Recommender Systems}. Both topics are of chief importance to our r... | {"hexsha": "a731d1fb30e6008864af4d9aa1edd1dfe3a11408", "size": 363, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "state-of-the-art/report_4/sections/problem_statement.tex", "max_stars_repo_name": "mida-project/reading-reports", "max_stars_repo_head_hexsha": "f65c20947ba85df1f75aa86eab2b622230d8eda7", "max_stars_... |
#!/usr/bin/env python3
import sqlite3
import numpy as np
import altair as alt
import sys
from scipy.spatial import ConvexHull
import os
import pandas as pd
DIR_ENVVAR = 'TOPK_DIR'
try:
BASE_DIR = os.environ[DIR_ENVVAR]
except:
print("You should set the {} environment variable to a directory".format(DIR_ENVVAR... | {"hexsha": "497d3b3cd9f2446d25386e0d624716686e3c8dc8", "size": 3054, "ext": "py", "lang": "Python", "max_stars_repo_path": "join-experiments/plot.py", "max_stars_repo_name": "Cecca/puffinn", "max_stars_repo_head_hexsha": "c613cd2e82ae334b5553099496d075cc16796fbe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
[STATEMENT]
lemma ENR_delete:
fixes S :: "'a::euclidean_space set"
shows "ENR S \<Longrightarrow> ENR(S - {a})"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ENR S \<Longrightarrow> ENR (S - {a})
[PROOF STEP]
by (blast intro: ENR_openin openin_delete openin_subtopology_self) | {"llama_tokens": 114, "file": null, "length": 1} |
C @(#)gettrf.f 20.3 2/13/96
subroutine gettrf (jt, lt, nt, senstl, senstt, pout, dpovld,
1 comp, tx)
C
C This subroutine computes compensation COMP and transfer TX in
C three modes:
C
C 1. JT = 0: No outage occurs, i.e., compute the base case transfe
C 2. LT =... | {"hexsha": "3e22c19041cfb99371c39f2ab5cce83f6d91c383", "size": 3862, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ipf/gettrf.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, "... |
function [ar,e,dc]=v_lpccovar(s,p,t,w)
%V_LPCCOVAR performs covariance LPC analysis [AR,E,DC]=(S,P,T)
%
% Inputs: S(NS) is the input signal
% P is the order (default: 12)
% T(NF,:) specifies the frames size details: each row specifies one frame
% T can be a cell array... | {"author": "ImperialCollegeLondon", "repo": "sap-voicebox", "sha": "28f2654b7584f724277ec81de533debe28ff51ac", "save_path": "github-repos/MATLAB/ImperialCollegeLondon-sap-voicebox", "path": "github-repos/MATLAB/ImperialCollegeLondon-sap-voicebox/sap-voicebox-28f2654b7584f724277ec81de533debe28ff51ac/voicebox/v_lpccovar.... |
#Solving maze with morphological transformation
"""
usage:Solving maze with morphological transformation
needed module:cv2/numpy/sys
ref:
1.http://www.mazegenerator.net/
2.http://blog.leanote.com/post/leeyoung/539a629aab35bc44e2000000
@author:Robin Chen
"""
import cv2
import numpy as np
import sys
def SolvingMaze(image... | {"hexsha": "12436bada3c6b095817ae7e409ad21a63f382b4e", "size": 2045, "ext": "py", "lang": "Python", "max_stars_repo_path": "mazesolvermorph.py", "max_stars_repo_name": "huseyince/Image-Processing-and-Maze-Solving", "max_stars_repo_head_hexsha": "627b0a90b30e58167198f514c574075a85b2430d", "max_stars_repo_licenses": ["MI... |
import sys
import pickle
import json
from pathlib import Path
from typing import Dict, List
from datetime import datetime
import h5py
import pandas as pd
import numpy as np
import scipy as sp
from tqdm import tqdm
from .datasets import LumpedBasin
from .datautils import store_static_attributes
def create_h5_files(d... | {"hexsha": "e50b001ad6c4a3b43bede31e6c087011638c023c", "size": 9212, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlstream/utils.py", "max_stars_repo_name": "gauchm/mlstream", "max_stars_repo_head_hexsha": "37cd59e48a6324f6f96f31416a1e25bab7645e64", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"... |
import numpy as np
import pyqtgraph as pg
from PyQt5 import QtCore
from acconeer_utils.clients.reg.client import RegClient
from acconeer_utils.clients.json.client import JSONClient
from acconeer_utils.clients import configs
from acconeer_utils import example_utils
from acconeer_utils.pg_process import PGProcess, PGPro... | {"hexsha": "76bc8253fe86de1fbb0e0eb1e842cef6a85202d0", "size": 7216, "ext": "py", "lang": "Python", "max_stars_repo_path": "acconeer-python-exploration-master/examples/processing/phase_tracking.py", "max_stars_repo_name": "Kandidatarbete-Chalmers-MCCX02-19-06/RaspberryPiRadarProgram", "max_stars_repo_head_hexsha": "f5d... |
[STATEMENT]
lemma chine_simps [simp]:
shows "arr chine" and "ide chine"
and "src chine = src r\<^sub>0" and "trg chine = src s\<^sub>0"
and "dom chine = chine" and "cod chine = chine"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (arr chine &&& ide chine &&& src chine = src r\<^sub>0) &&& trg chine = sr... | {"llama_tokens": 444, "file": "Bicategory_BicategoryOfSpans", "length": 3} |
# -*- coding: utf-8 -*-
"""
```
"""
# import standard libraries
import os
from itertools import product
# import third-party libraries
import numpy as np
from colour.utilities.array import tstack
from colour import XYZ_to_RGB, xy_to_XYZ, RGB_COLOURSPACES
# import my libraries
import plot_utility as pu
import color_... | {"hexsha": "4576e9e379392d2f0acc897604f87610a2ba4b26", "size": 14629, "ext": "py", "lang": "Python", "max_stars_repo_path": "2021/15_2-pass_gamut_boundary/debug_2_pass_lut.py", "max_stars_repo_name": "toru-ver4/sample_code", "max_stars_repo_head_hexsha": "9165b4cb07a3cb1b3b5a7f6b3a329be081bddabe", "max_stars_repo_licen... |
import os
import pandas as pd
import snscrape
import re
from nltk.corpus import stopwords
import nltk
from nltk.tokenize import word_tokenize
import numpy as np
from tqdm import tqdm
import math
import snscrape.modules.twitter as sntwitter
import itertools
def remove_Punctuations(x):
punctuations = '''!()-[]{};:'"... | {"hexsha": "86aabcb0e3fe2bd05b3afd0cff3383ce27d55247", "size": 1993, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/TLA/Data/Pre_Process_Tweets.py", "max_stars_repo_name": "tusharsarkar3/TLA", "max_stars_repo_head_hexsha": "86957502840218860ddb876643bd5acf76e8957f", "max_stars_repo_licenses": ["MIT"],... |
"""
Script reads the csv file describing the details of people requiring help.
"""
__author__ = "Shameer Sathar"
__license__ = "MIT"
__version__ = "1.0.1"
# imports
import pandas as pd
import numpy as np
class CampDataReader:
def __init__(self, filename):
self.filename = filename
self.df = self... | {"hexsha": "a2bb949d9543fd215792c05f2390b29c74a5b8d5", "size": 1465, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_reader/CampDataReader.py", "max_stars_repo_name": "ssat335/processkeralarescue", "max_stars_repo_head_hexsha": "c0c5a32fd3cf74c9487fcbff1192ef4bb82f3db8", "max_stars_repo_licenses": ["MIT"], ... |
# Implementation of Blendenpik with Gaussian row mixing for the solution of least squares
# problem ||Ax - b||₂ where A has full column rank.
#
# This method for other row mixing strategies is described in
#
# Avron, Haim, Petar Maymounkov, and Sivan Toledo. "Blendenpik: Supercharging LAPACK's
# least-squares solver." ... | {"hexsha": "adcc8354f69a701a8b8c60962217c761ebf0edd7", "size": 1391, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/linear_solver_routines/blendenpik_gauss.jl", "max_stars_repo_name": "numlinalg/RLinearAlgebra.jl", "max_stars_repo_head_hexsha": "757cc7e581303c4fb6db228618f4be5caa02d3b0", "max_stars_repo_lice... |
import numpy as np
import cv2
buffer_size = 10
def nothing(x):
pass
cv2.namedWindow('FUJII_algorithm_demo')
cv2.createTrackbar('FUJII_SCALE','FUJII_algorithm_demo',20,100,nothing)
cap = cv2.VideoCapture(0, cv2.CAP_DSHOW)
cv2.waitKey(1500)
if cap.isOpened() == False:
print("Unable to connec... | {"hexsha": "09f2e95dc9eccb51fb0859be9c50a8e11f1584ac", "size": 2905, "ext": "py", "lang": "Python", "max_stars_repo_path": "FUJII.py", "max_stars_repo_name": "ppieczywek/SpecklePy", "max_stars_repo_head_hexsha": "4f7bcde7a8c38b5e2dda5d9e640ea4698ac0765b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_s... |
import tensorflow as tf
import numpy as np
class seq2seq(object):
def __init__(self,emb_dim=16,vocab_size=101,encoder_size=5,decoder_size=5,lr=0.002,
forward_only=False,cell=tf.contrib.rnn.LSTMCell,num_units=128,name='seq2seq'):
self.name = name
self.vocab_size = vocab_size
... | {"hexsha": "6e1db7cd1f259ff1ea16f03d85825e3efcb43bc4", "size": 5330, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models.py", "max_stars_repo_name": "MaZhiyuanBUAA/textGeneration", "max_stars_repo_head_hexsha": "72986e5c478febadf8f8a4cb068bb4ca28ddc071", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta... |
# Copyright (C) 2020 GreenWaves Technologies, SAS
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
# This progr... | {"hexsha": "2c63eb3acaf6af38d8d5c9dfccb0021fb175e2c7", "size": 3931, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/nntool/quantization/kernels/kernel_function.py", "max_stars_repo_name": "coWorkr-InSights/gap_sdk", "max_stars_repo_head_hexsha": "a934747441481ea3d9c029719d721780cdff9e46", "max_stars_repo_... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.