text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import pandas import numpy from matplotlib import pyplot from sklearn.cluster import KMeans data = pandas.read_csv('xclara.csv') print(data.shape) print(data.head(10)) v1 = data['V1'].values v2 = data['V2'].values x = data.values pyplot.scatter(v1,v2,c='blue', s=5) pyplot.show() k3 = KMeans(n_clusters=3) distribut...
{"hexsha": "e36e6f8c0eaadea416ff1521b44f0db328b65e38", "size": 469, "ext": "py", "lang": "Python", "max_stars_repo_path": "clustering.py", "max_stars_repo_name": "djFooFoo/kmeansExample", "max_stars_repo_head_hexsha": "3c1e11e4ac4bb93aebc46211cffa10e2fd70f62e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
!----------------------------------------------------------------------- ! ! Copyright (c) 2016 Tom L. Underwood ! ! Permission is hereby granted, free of charge, to any person obtaining ! a copy of this software and associated documentation files (the ! "Software"), to deal in the Software without restriction, inclu...
{"hexsha": "005db8b29389da005d456cbf23033fba2defb65a", "size": 35199, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "Interactions/interactions_EAM.f95", "max_stars_repo_name": "tomlunderwood/monteswitch", "max_stars_repo_head_hexsha": "1dd95dd46c0a1301fb4e520d2024e9b70bc71958", "max_stars_repo_licenses": ["MI...
[STATEMENT] lemma A1: "E(x\<cdot>y) \<^bold>\<leftrightarrow> dom x \<simeq> cod y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (E (dom x) \<^bold>\<and> \<^bold>\<not> (\<^bold>\<not> (E (cod y)) \<^bold>\<or> dom x \<noteq> cod y) \<^bold>\<leftarrow> E (x \<cdot> y)) \<^bold>\<and> (E (x \<cdot> y) \<^bold>\<l...
{"llama_tokens": 499, "file": "AxiomaticCategoryTheory_AxiomaticCategoryTheory", "length": 2}
#used to generate the seat graphs. using Gadfly using Colors: RGB using DataFrames #sql connections to come later function graph() Gadfly.with_theme(:dark) do #data = data() names = ["Libs", "NDP", "UCP", "RSP", "Ind"] seats = [5, 13, 5, 2, 1] colours = [RGB(184/255,44/25...
{"hexsha": "ae3b42c673ee682246fcd051537dcc5e7b662e6a", "size": 772, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "botcommands/seatgraph.jl", "max_stars_repo_name": "cmhoc/backbone", "max_stars_repo_head_hexsha": "3b1f08d69e005cf6acb3a9832d8f8d08e7c1efda", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import re import tkinter as tk from threading import Thread from txt_analysis import picturing from txt_analysis.spider import crawl from txt_analysis import spider from snownlp import SnowNLP import json import matplotlib.pyplot as plt # 显示中文 plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签 plt.rcParams['axes.un...
{"hexsha": "52d3b54c0e13cde8095cbae52dfc9634ffc2c818", "size": 20212, "ext": "py", "lang": "Python", "max_stars_repo_path": "UGC_analysis/UGC_Analysis.py", "max_stars_repo_name": "CarryChang/Sentiment_Analysis_elm", "max_stars_repo_head_hexsha": "65f019a79625cc00839ca56451c0d3cc0fa7cbb4", "max_stars_repo_licenses": ["M...
mutable struct Scenario{T} p::Int model::AbstractGameModel roadway::Roadway{T} player::Vector{Player{T}} end function Scenario(model::AbstractGameModel, roadway::Roadway{T}, players::Vector{<:Player}) where {T} p = model.p @assert p == length(players) sort!(players, by = x -> x.id) if [...
{"hexsha": "2095210bd500851ba2b484595631b92765a00ec5", "size": 3606, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/scenario/scenario.jl", "max_stars_repo_name": "simon-lc/AlgamesPlots.jl", "max_stars_repo_head_hexsha": "18851ea53168bbd1ab5c1c7f1116f8194d2c3091", "max_stars_repo_licenses": ["MIT"], "max_star...
#pragma once #include <string> #include <boost/filesystem.hpp> #include <spdlog/spdlog.h> #include "utils.hpp" using namespace boost::filesystem; static const std::string CONFIG_FOLDER = Expand("~/.config/yamp/"); class Config { public: Config(); unsigned getPortNumber() const; std::string getBindAddress() co...
{"hexsha": "5f5202b0a5d42f835eef9b60e76c03f2f093306c", "size": 1004, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "server/include/config.hpp", "max_stars_repo_name": "stkw0/yamp", "max_stars_repo_head_hexsha": "25119f67f10808525e9a4e614155cd74a58983fc", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count"...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # -*- coding: utf-8 -*- """ Implements a set of line profile parameterizations. ---- .. include license and copyright .. include:: ../include/copy.rst ---- .. include common links, assuming primary doc root is up one directory .. include:: ../include/l...
{"hexsha": "ff8f756b681ab2c9671bfa48818371bba144b79c", "size": 6197, "ext": "py", "lang": "Python", "max_stars_repo_path": "enyo/util/lineprofiles.py", "max_stars_repo_name": "Keck-FOBOS/enyo", "max_stars_repo_head_hexsha": "82dd4324083d456c78bcbafdd081bee53f0c7ba9", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
(* File: FinBndEx.thy Time-stamp: <2015-12-20T11:46:36Z> Author: JRF Web: http://jrf.cocolog-nifty.com/software/2016/01/post.html Logic Image: ZF (of Isabelle2015) *) theory FinBndEx imports FinBnd begin definition h_nat :: "i=>i" where "h_nat(X) == {0} Un {succ(x). x: X}" de...
{"author": "JRF-2018", "repo": "isabelle_TheLambda", "sha": "e89eff1cbbf26da9bc6a3af603ae9d099d97c1ad", "save_path": "github-repos/isabelle/JRF-2018-isabelle_TheLambda", "path": "github-repos/isabelle/JRF-2018-isabelle_TheLambda/isabelle_TheLambda-e89eff1cbbf26da9bc6a3af603ae9d099d97c1ad/legacy2015/FinBndEx.thy"}
""" Keep different states of pipeline using rename and name. If we add preprocessing and postprocessing to pipeline steps, we can play with state and capture specific inputs and outputs as separate elements of the state. In this example the final state elements are: - x: initial dataframe with two columns (subject and...
{"hexsha": "2e5a8fd4aedeffbc6e683fb7800a77d34a7a52aa", "size": 3607, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/example_rename.py", "max_stars_repo_name": "ftrojan/e2epipeline", "max_stars_repo_head_hexsha": "e337539010aa3128d021ebcb48a473c712b271b1", "max_stars_repo_licenses": ["BSD-2-Clause"], "m...
"""NeuronUnit abstract Capabilities. The goal is to enumerate all possible capabilities of a model that would be tested using NeuronUnit. These capabilities exchange 'neo' objects. """ import numpy as np import quantities as pq import sciunit import matplotlib.pyplot as plt class ProducesMembranePotential(sciunit.Ca...
{"hexsha": "4d6c10de655cf4688d71804282dc804b050bde6b", "size": 3898, "ext": "py", "lang": "Python", "max_stars_repo_path": "capabilities.py", "max_stars_repo_name": "rgerkin/jit_hub", "max_stars_repo_head_hexsha": "d132225fae29286cf7ac6f08bd4099fd65dcab0f", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count": nul...
import pandas as pd import numpy as np import re def name_normalize(name_series): def f(x): return re.sub('[-\.\$\+>#\}\{\*<&@%;\\\)\(="?!\[\]~\^/:,_\|\s–—]+', '.', str(x).lower().replace("'", "")).strip(".") def find(x): return re.match('^[\w\d\.]+$', x) == None name_series = name_series.apply(f) sm...
{"hexsha": "d46e93814f3bf8029740849dd0f34c05511f5a76", "size": 502, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/name_normalize.py", "max_stars_repo_name": "proto-n/recsys-challenge-2018", "max_stars_repo_head_hexsha": "06eea16a7b91d4bc70cbbc542fc0fb3ecd66498e", "max_stars_repo_licenses": ["Apache-2.0"]...
# noqa: ignore: D101,D102 import os import pandas as pd import pickle import numpy as np from tqdm import trange from src.imputation import (zero_imputation, linear_imputation, forward_fill_imputation, causal_imputation, ...
{"hexsha": "efc30464c27ed025760518627f9eae53099d7b42", "size": 10865, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/datasets/physionet_2012.py", "max_stars_repo_name": "BorgwardtLab/Imputing_Signatures", "max_stars_repo_head_hexsha": "9551e892f71703bde46907c9e2765c01fe4f1b27", "max_stars_repo_licenses": ["...
# positivity_test.py # Original by 솜시좋은장씨 # Editted by Hanna Jeon (전한나), Byeongho Hwang (황병호) # positivity_test.py는 긍정/부정 정도 판별 모델을 직접 이용하는 모듈을 모아놓은 파일이다. # Licensed by # https://somjang.tistory.com/entry/Keras%EA%B8%B0%EC%82%AC-%EC%A0%9C%EB%AA%A9%EC%9D%84-%EA%B0%80%EC%A7%80%EA%B3%A0-%EA%B8%8D%EC%A0%95-%EB%B...
{"hexsha": "2fc9f8c08fb498291caffc9619f34520da6abc20", "size": 2244, "ext": "py", "lang": "Python", "max_stars_repo_path": "factcode/PositivityCheck/positivity_test.py", "max_stars_repo_name": "CrovaS/Fake-news-detector-v0", "max_stars_repo_head_hexsha": "e6ce26609af969fde12f2e178d5e0441a3b5f145", "max_stars_repo_licen...
// // Init.cpp // findscholarships-new // // Created by Minh Dao Tran on 07/09/15. // Copyright (c) 2015 Minh Dao Tran. All rights reserved. // #include <fstream> #include <boost/filesystem.hpp> #include "utilities/Logger.h" #include "init/InitBase.hpp" bool InitBase::exists(const std::string &name) { boost...
{"hexsha": "473eaa0994df2311e0c4843efd692eb1d273a529", "size": 583, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/init/InitBase.cpp", "max_stars_repo_name": "daotranminh/findscholarships-new", "max_stars_repo_head_hexsha": "ac7d5e69d9e1c6d971dfbe25658507a0c0fb0081", "max_stars_repo_licenses": ["Apache-1.1"],...
module fmpi include "mpif.h" end module !**************************************************************** ! This is a simple send/receive program in MPI ! Processor 0 sends an integer to processor 1, ! while processor 1 receives the integer from proc. 0 !******************************************...
{"hexsha": "18d29f279bcddb652af3066f095f9d0f452cb350", "size": 1254, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "mpi/mpi4py/f_ex01.f90", "max_stars_repo_name": "timkphd/examples", "max_stars_repo_head_hexsha": "04c162ec890a1c9ba83498b275fbdc81a4704062", "max_stars_repo_licenses": ["Unlicense"], "max_stars_...
#pragma once #ifndef IDOCK_LIGAND_HPP #define IDOCK_LIGAND_HPP #include <boost/filesystem/fstream.hpp> #include <boost/iostreams/filtering_stream.hpp> #include "atom.hpp" #include "matrix.hpp" #include "scoring_function.hpp" #include "box.hpp" #include "array3d.hpp" #include "result.hpp" #include "conforma...
{"hexsha": "b6a1f0fdee1441b1b0adc21fdac9df809b8f65ce", "size": 5560, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "idock/src/ligand.hpp", "max_stars_repo_name": "kingdavid72/Calici-Nebular", "max_stars_repo_head_hexsha": "6bd51f63c7de37605dcbfbd3669462a997638ffb", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
import numpy as np import smaframework.tool.constants as Constants def kmph2mps(speed): ''' * Coverts a speed from Km/h to m/s. * * @param speed the speed to convert. * @return float the converted speed. ''' return speed / 3.6 def deg2rad(degree): ''' * Coverts an ...
{"hexsha": "f496e8d63f8f2fbbe2995f0848083055dcc80bfb", "size": 1143, "ext": "py", "lang": "Python", "max_stars_repo_path": "smaframework/tool/conversor.py", "max_stars_repo_name": "diegopso/smaframework", "max_stars_repo_head_hexsha": "a49ccd1f035ab257acf734e07f88b4ed17d6cbc3", "max_stars_repo_licenses": ["MIT"], "max_...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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 appl...
{"hexsha": "2981d11ab327978bebf5dd1cadc0f999901fb088", "size": 7199, "ext": "py", "lang": "Python", "max_stars_repo_path": "ppgan/models/gan_model.py", "max_stars_repo_name": "JetHong/PaddleGAN", "max_stars_repo_head_hexsha": "2cc72be9d5d6f2b6ca5c6ab018b750f537280da4", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Plotting functions.""" import logging import logging.config import math import os import warnings from pathlib import Path import cartopy.crs as ccrs import iris import matplotlib as mpl import matplotlib.colors as colors import matplotlib.pyplot as plt import numpy as...
{"hexsha": "241ea74217ee1030f8f863ec6f0ef4e25137d814", "size": 57549, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/wildfires/analysis/plotting.py", "max_stars_repo_name": "akuhnregnier/wildfires", "max_stars_repo_head_hexsha": "4d31cbdd4a1303ecebc391a35c73b8f07d8fe400", "max_stars_repo_licenses": ["MIT"],...
using MethodAnalysis """ is_atrisk_type(tt) Given a Tuple-type signature (e.g., `Tuple{typeof(sum),Vector{Int}}`), determine whether this signature is "at risk" for invalidation. Essentially it returns `true` if one or more arguments are of abstract type, although there are prominent exceptions: - Constructor ca...
{"hexsha": "4267707c900921663e3cf1d3098a6b3bc9d54806", "size": 7618, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "demos/abstract.jl", "max_stars_repo_name": "timholy/MethodAnalysis.jl", "max_stars_repo_head_hexsha": "899ae127b83f40be0aa581abe519cb8a1bfc97aa", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# -*- coding: utf-8 -*- import os import time import random import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import numpy as np from fvcore.nn import sigmoid_focal_loss from datetime import timedelta from sklearn.metrics import precision_recall_curve class AverageMeter(obj...
{"hexsha": "8cc04ce0ed2c5852e0d674531647163ec2a6ad2f", "size": 11197, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/misc.py", "max_stars_repo_name": "BCV-Uniandes/SAMA", "max_stars_repo_head_hexsha": "4c732c71486af17efed17480e363298cb65c851f", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count...
import numpy as np import matplotlib.pyplot as plt def f(x): decay = 10.0 period = decay return (3.0+0.5*np.sin(2.*np.pi*x/period))*x*np.exp(-x/decay) x = np.linspace(0.0, 45., 128) xdata = np.linspace(1., 43., 13) yerr = 0.4 * np.sqrt(f(xdata)) ydata = f(xdata) + 2.0 * yerr * (np.random.rand(len(xdata))-...
{"hexsha": "c4fe4fcf93d0b63c1aec74bc7c32e204aebd5de0", "size": 637, "ext": "py", "lang": "Python", "max_stars_repo_path": "Book/chap5/Supporting Materials/Problems/DecayOcsData_Make.py", "max_stars_repo_name": "lorenghoh/pyman", "max_stars_repo_head_hexsha": "9b4ddd52c5577fc85e2601ae3128f398f0eb673c", "max_stars_repo_l...
# CEDM largest box textures for 51 dataset import csv import fnmatch import os import SimpleITK import numpy #from Mahotas.mahotas.features.texture import haralick_labels from mahotas.features.texture import haralick_labels import ROI_ShapeAnalysis_51 from GLCM import GLCMFeatures from Gabor import ExtendGaborFeatu...
{"hexsha": "0a72e4bf896ad5e9e8fb53f189c78e228363d61c", "size": 11363, "ext": "py", "lang": "Python", "max_stars_repo_path": "CEDM/CEDM_51_TA.py", "max_stars_repo_name": "joshlyman/TextureAnalysis", "max_stars_repo_head_hexsha": "bfbedbd53f62396fdef383408089b37e5ab511d0", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
[STATEMENT] lemma ipurge_tr_rev_aux_nil_sources [rule_format]: "ipurge_tr_rev_aux I D U xs = [] \<longrightarrow> sources_aux I D U xs = U" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ipurge_tr_rev_aux I D U xs = [] \<longrightarrow> sources_aux I D U xs = U [PROOF STEP] by (induction xs, simp_all)
{"llama_tokens": 125, "file": "Noninterference_Ipurge_Unwinding_IpurgeUnwinding", "length": 1}
using Match input = joinpath(@__DIR__, "input") cmds = readlines(input) @enum Opmode direct waypoint mutable struct Ship waypoint::Array{Int,1} location::Array{Int,1} opmode::Opmode end const rturn = [0 -1 ; 1 0] const lturn = [0 1 ; -1 0] function move!(ship, commands) for cmd in commands ...
{"hexsha": "5af47a248194412d0133ee4e6a0da656ace03dca", "size": 1987, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "bin/twelve/run.jl", "max_stars_repo_name": "talentdeficit/aoc2020", "max_stars_repo_head_hexsha": "1bdc06f7428c8e8c59a2748fbd1c2fa0e04e67c5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import csv import math from absl import app, flags import matplotlib matplotlib.use("agg") import matplotlib.pyplot as plt import numpy as np from pylot_utils import ProfileEvent, ProfileEvents, fix_pylot_profile from utils import setup_plot import pandas as pd import seaborn as sns from utils import * from p...
{"hexsha": "37502d4189ffef85d38ae10840bcdc47a016e874", "size": 9526, "ext": "py", "lang": "Python", "max_stars_repo_path": "plotting_scripts/plot_challenge_e2e_response_time.py", "max_stars_repo_name": "erdos-project/erdos-experiments", "max_stars_repo_head_hexsha": "56eea1d52991ada5cc3c4a2e26ddc1da31f1ac2e", "max_star...
import pandas as pd from matplotlib import pyplot as plt import datetime import pickle import matplotlib.dates as mdates # Read the files dfsonde = pd.read_csv('sonde.txt', #skiprows= 10, #header = 11, #use the second row (index 1) as column headings ...
{"hexsha": "e8228b1faf675845aafba1601c36ae96c3f6657a", "size": 12695, "ext": "py", "lang": "Python", "max_stars_repo_path": "ValidationStudy/DeploymentData/2021_April_1_Deployment_plot_not_colocated.py", "max_stars_repo_name": "jwlauer/Conductivity", "max_stars_repo_head_hexsha": "2b412a1d466ab7b860c39da132e64e4247065f...
import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from .preprocess import (get_eventnames, argsort_trials, get_trial_spikes_bytrials, get_conditions, get_rate) def example_trial_raster(file, i_trial=0, n_neurons=50): """Spike raster for an example trial across n...
{"hexsha": "b18047c66658ff36f43fdaaee7fd6959c6a2d46f", "size": 4330, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/singleunit.py", "max_stars_repo_name": "carina-kauf/ngym_usage", "max_stars_repo_head_hexsha": "5b6329ff1e5b8bb87c724e839606dc2fa6744a45", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
\chapter{Introduction} \section{What is Cancer?} Cancer is a collection of diseases that is usually caused by an uncontrolled division of cells with the potential to spread to other parts of the body \cite{cancergov}. Cancer could be caused by extrinsic factors like tobacco usage, excess sun exposure or viral infectio...
{"hexsha": "317398e37684b00b6a2187fc48eb526fc3a2e8ba", "size": 17166, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "writing/MSThesis/chapters/Intro.tex", "max_stars_repo_name": "Harshavardhan-BV/Cancer-compe-strat", "max_stars_repo_head_hexsha": "e4decacd5779e85a68c81d0ce3bedf42dea2964f", "max_stars_repo_license...
import numpy as np def norm2(v): """Compute norm squared of a vector. """ return np.dot(v.conj(),v) def norm(v): """Compute norm of a vector. """ return np.sqrt(norm2(v)) def householder(v): """Computes the Househodler reflector. """ raise NotImplementedError #u = v.copy() ...
{"hexsha": "06d321dd7a91de28c07fd58a97a3663311d7ee96", "size": 2128, "ext": "py", "lang": "Python", "max_stars_repo_path": "pymctdh/linalg.py", "max_stars_repo_name": "addschile/pymctdh", "max_stars_repo_head_hexsha": "20a93ce543526de1919757defceef16f9005f423", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import pandas as pd from scripts.python.routines.manifest import get_manifest from tqdm import tqdm from scripts.python.EWAS.routines.correction import correct_pvalues import statsmodels.formula.api as smf import plotly.graph_objects as go from scripts.python.routines.plot.save import save_figure from scripts.python.ro...
{"hexsha": "06a2da6612993983b4915139e1e1756b41c87566", "size": 4534, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/python/EWAS/from_formula.py", "max_stars_repo_name": "GillianGrayson/dnamvae", "max_stars_repo_head_hexsha": "3956a019f0e9aab5732fa215c5e28448b556de47", "max_stars_repo_licenses": ["MIT"],...
## TODO micro-optimization, reuse buffers, etc. ## TODO write a version that doesn't assume that B is well-conditionned, and doesn't reuse B applications ## TODO it seems there is a lack of orthogonalization immediately after locking, maybe investigate this to save on some choleskys # vprintln(args...) = println(args....
{"hexsha": "40446fcf5be258e5cebc7db8d9eb49f1b7b91369", "size": 15037, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/eigen/lobpcg_hyper_impl.jl", "max_stars_repo_name": "berquist/DFTK.jl", "max_stars_repo_head_hexsha": "3fd574046222e27616a70802ef5f2fb1ecb877f2", "max_stars_repo_licenses": ["MIT"], "max_stars...
import numpy as np def load_surface_obj(file): vertices = [] faces = [] try: f = open(file) for line in f: if line[:2] == "v ": index1 = line.find(" ") + 1 index2 = line.find(" ", index1 + 1) index3 = line.find(" ", index2 + 1) ...
{"hexsha": "fc8fb6c336094f8cd5e75321f44c49e5abf1245c", "size": 982, "ext": "py", "lang": "Python", "max_stars_repo_path": "PAINTeR/utils.py", "max_stars_repo_name": "lejianhuang/RPN-signature_Lejian", "max_stars_repo_head_hexsha": "79f42c19330220a30eb0b7ef14d725274e77d607", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
# -*- coding: utf-8 -*- from __future__ import print_function import utils import torch import time import os import pickle import datetime import torch._utils # maintaining upward compatibility try: torch._utils._rebuild_tensor_v2 except AttributeError: def _rebuild_tensor_v2(storage, storage_offset, size, s...
{"hexsha": "b09e7422fb96d9dc3cc335ea2297b4f09db3e5d2", "size": 62082, "ext": "py", "lang": "Python", "max_stars_repo_path": "VAE_up.py", "max_stars_repo_name": "mjschoeberl/predictive-cvs", "max_stars_repo_head_hexsha": "b2373398e046957a0b3062420a04610759f96a8c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4...
#pragma once #include <Eigen/Dense> #include <iostream> using namespace std; using namespace Eigen; template<class T, unsigned int batch_size, unsigned int input_size, unsigned int output_size> class Layer { private: // matrix to store outputs of neurons after activation sigma(W*X + B) Matrix<T, batch_size, outp...
{"hexsha": "6b87f7526f32cc4aa76072c630d29eab6013ba8b", "size": 5158, "ext": "hh", "lang": "C++", "max_stars_repo_path": "src/nn/layer.hh", "max_stars_repo_name": "stanford-stagecast/nnfun", "max_stars_repo_head_hexsha": "14300c4320b9b90b4f54d8fc49f66166a490c257", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
[STATEMENT] lemma mydivcode1: "mydiv 0 k = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. mydiv 0 k = 0 [PROOF STEP] unfolding mydiv_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. (if k dvd 0 then 0 div k else 0 div k + 1) = 0 [PROOF STEP] by auto
{"llama_tokens": 128, "file": "Hoare_Time_QuantK_VCG", "length": 2}
import os from skimage import io, transform import torch import torchvision from torch.autograd import Variable import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader from torchvision import transforms#, utils # import torch.optim as optim import cv2 import numpy as np fr...
{"hexsha": "ba2297f172a2a36d47f2fb4646c197c946d195e4", "size": 3340, "ext": "py", "lang": "Python", "max_stars_repo_path": "basnet_test.py", "max_stars_repo_name": "DoJing/BASNet", "max_stars_repo_head_hexsha": "46bd3462326e6c7a02c90273c15da6fa71cec0e2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
\section{Transition System}~\label{sec:trans} Describe the transition system Operations on transitions
{"hexsha": "402c5d0a397de373bab3ff0e08c12ed8a209898d", "size": 106, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "co-kind-report/transition.tex", "max_stars_repo_name": "Copilot-Language/copilot-discussion", "max_stars_repo_head_hexsha": "caccad918b23dae991095344a845827ddccd6047", "max_stars_repo_licenses": ["BS...
# python import sys import os import time import importlib import argparse import random import re # numpy import numpy as np # torch import torch from torch import nn, optim # ours from data import MonoTextData from modules import VAE from modules import LSTMEncoder, LSTMDecoder from utils.sample import test_genera...
{"hexsha": "fc2f10827816f7110fc8b716a33ffeb4a4ef6fee", "size": 17434, "ext": "py", "lang": "Python", "max_stars_repo_path": "text.py", "max_stars_repo_name": "sbarham/lv-nlm-he-2019", "max_stars_repo_head_hexsha": "6fd1ce680675759d0a58878ac1fde31122712752", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
#!/usr/bin/python # -*- coding:utf-8 -*- # @author : east # @time : 2021/7/17 10:55 # @file : circle.py # @project : fepy # software : PyCharm import numpy as np import matplotlib.pyplot as plt from fepy.fem.fem2d import TriLinearFEM2D from fepy.mesh.mesh2d import UniformCircleTriMesh from fepy.boundary.bounda...
{"hexsha": "d7c12f06c6d5daf52de07173e10cb146dffd6f38", "size": 1449, "ext": "py", "lang": "Python", "max_stars_repo_path": "example/04. 2D_Laplace Adaptive/circle.py", "max_stars_repo_name": "EastMagica/fepy", "max_stars_repo_head_hexsha": "e5ede0921f887baebde643502f82fceb85a5e9a2", "max_stars_repo_licenses": ["MIT"], ...
[STATEMENT] lemma (in Order) less_asym: "a \<in> carrier D \<Longrightarrow> b \<in> carrier D \<Longrightarrow> a \<prec> b \<Longrightarrow> b \<prec> a \<Longrightarrow> C" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>a \<in> carrier D; b \<in> carrier D; a \<prec> b; b \<prec> a\<rbrakk> \<Longright...
{"llama_tokens": 789, "file": "Group-Ring-Module_Algebra1", "length": 6}
import numpy as np from numpy.testing import assert_equal from sdafile.cell_inserter import ArrayInserter, ListInserter from sdafile.testing import InserterTestCase class TestCellInserter(InserterTestCase): def test_list_inserter_basic(self): data = [3.14, '01', [True, np.array([])]] grp_attrs =...
{"hexsha": "d284bdb6165115aa620083e24e3432752af436e0", "size": 5416, "ext": "py", "lang": "Python", "max_stars_repo_path": "sdafile/tests/test_cell_inserter.py", "max_stars_repo_name": "enthought/sandia-data-archive", "max_stars_repo_head_hexsha": "5923798f61c80771d69ff7500446b711921159a7", "max_stars_repo_licenses": [...
__author__ = 'frodre' # Temporary import until it's turned into a package import sys sys.path.append('../') import pytest import pickle import yaml import LMR_psms as psms import LMR_config import numpy as np from LMR_utils import haversine @pytest.fixture() def psm_dat(request): fname = ('/home/katabatic/wper...
{"hexsha": "82319d8a4cf40b470d19caae9a015a41ce7e125b", "size": 4811, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_psms.py", "max_stars_repo_name": "frodre/LMR", "max_stars_repo_head_hexsha": "4c00d3f9db96447e69bd3f426d59524f7b5f3ef5", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": ...
import io import os import sys import math import json import zipfile import pydub import librosa import typing import librosa.display as disp import soundfile import numpy as np import matplotlib import matplotlib.pyplot as plt from .convert_ogg_to_wav import convert_ogg_to_wav from .spectrogram import spectrogram fr...
{"hexsha": "9a248c69486ce8cb4f809cc357ae3a80b13c38fa", "size": 655, "ext": "py", "lang": "Python", "max_stars_repo_path": "backend/utils/__init__.py", "max_stars_repo_name": "zeraye/rege", "max_stars_repo_head_hexsha": "aa93be8da08fb8faca916f07bb7435cf1a1ed3c3", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_c...
import matplotlib.pyplot as plt from matplotlib.pyplot import cm import numpy as np def plot_data_all_phonemes(X, phoneme_id, ax): """ :param X : 2D array of our dataset :param y : 1D array of the groundtruth labels of the dataset :param ax : existing subplot...
{"hexsha": "d80b772c13b5e04b7ff0b4f6eba376fdf79c0b7d", "size": 1179, "ext": "py", "lang": "Python", "max_stars_repo_path": "ML_CW2/assgn_2/plot_data_all_phonemes.py", "max_stars_repo_name": "ShellySrivastava/Machine-Learning", "max_stars_repo_head_hexsha": "bfdea30c06abe4228c103ae525adcf990015983f", "max_stars_repo_lic...
function neqn = p03_neqn ( ) %*****************************************************************************80 % %% P03_NEQN returns the number of equations for problem P03. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 17 February 2013 % % Author: % % John Burkar...
{"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/test_ode/p03_neqn.m"}
import re import inspect import functools import numpy as np from matplotlib.colors import LinearSegmentedColormap from .palettes import all_colors __all__ = ['extract_palette', 'make_colormap', 'msme_colors'] def extract_palette(color_palette): """ Extract color palette information and return a str/list o...
{"hexsha": "1e95c2cf501b76ad73da8418731ae154b8463361", "size": 4280, "ext": "py", "lang": "Python", "max_stars_repo_path": "msmexplorer/utils.py", "max_stars_repo_name": "msmbuilder/msmexplorer", "max_stars_repo_head_hexsha": "48917617c176762e691f4dc616f3658686031026", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
\documentclass[12pt]{article} \usepackage[intlimits]{amsmath} \usepackage{amssymb} \usepackage{amsfonts,amstext,amsthm} \usepackage{paralist} % {inparaenum} environment \usepackage{mathtools} % {dcases} environment \usepackage{MnSymbol} % \medstar \usepackage[normalem]{ulem} % \sout \usepackage[us...
{"hexsha": "344bd2b8102a7bbf213c0509b116c5070ceaf396", "size": 8882, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "documentation/fuzzy.tex", "max_stars_repo_name": "ropufu/aftermath", "max_stars_repo_head_hexsha": "ab9364c41672a188879d84ebebb5a23f2d6641ec", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
from collections import OrderedDict import numpy as np from evaluators.inception_pytorch import inception_utils from .base_evaluator import BaseEvaluator class ImageEvaluator(BaseEvaluator): def __init__(self, opt, model, dataset): super().__init__(opt, model, dataset) # scores init if ...
{"hexsha": "13b304ed86c64f78b2586a07a7a18d1983e45f70", "size": 4009, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluators/image_evaluator.py", "max_stars_repo_name": "WangYuNeng/EvolutionaryGAN-pytorch", "max_stars_repo_head_hexsha": "b7d8160c651a96f91c73d480f46f9c8a47a319ff", "max_stars_repo_licenses": ["...
#+ term=true y= [2, 5, 12] #+ term=true x = 1:10 d = Dict("Weave" => "testing") y = [2, 4 ,8] #+ x = [12, 10] println(y) println(x) #+ echo=false println("Results without code") println(x) #+ eval=false; tangle=false y = randn(5) println("Don't eval, but show code") #+ y = 1:5 println(y) #+ results...
{"hexsha": "9492c2a98b30544d37530906cdfc9c7aa22881a8", "size": 577, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/documents/chunk_options.jl", "max_stars_repo_name": "UnofficialJuliaMirror/Weave.jl-44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9", "max_stars_repo_head_hexsha": "72e7ccfe8ac68c7dfc1ecd0c77b93de81cd5f3c...
using Destruct using BenchmarkTools function unpack_bc(w::Array{<:Tuple}) Tuple((v->v[i]).(w) for i=1:length(w[1])) end # some transform f(a, b) = a+b, a*b, a-b # some transform with different return types g(a, b) = a+b+1im*(a-b), a*b, convert(Int, round(a-b)) shape = (10,10) a_1 = rand(shape) a_2 = rand(shape) ...
{"hexsha": "18234733f0ea111b6aa8a61b4425e5d03113f0ba", "size": 1081, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/scratch/timing.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Destruct.jl-dde75ccc-4946-507f-85f2-ccadd28c929c", "max_stars_repo_head_hexsha": "ee5deede44e9b998bbc3e3939177160fcf37...
import data_helper import keras import numpy as np import defs import precision_recall import sys import os import shutil import math def sq_error(vector1, vector2): if len(vector1) != len(vector2): raise ValueError("vectors not of the same size") return sum(math.pow(vector1[i] - vector2[i], 2) for i in range(...
{"hexsha": "5b8e2a420e7966d905f740635522f85c7214ea85", "size": 2581, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_run.py", "max_stars_repo_name": "aliostad/deep-learning-lang-detection", "max_stars_repo_head_hexsha": "d6b031f3ebc690cf2ffd0ae1b08ffa8fb3b38a62", "max_stars_repo_licenses": ["MIT"], "max_sta...
#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE InfinityWrapperTests #include <boost/test/unit_test.hpp> #include "math/InfinityWrapper.hpp" namespace pbqppapa { BOOST_AUTO_TEST_CASE(infinityLimitTest) { InfinityWrapper<unsigned int> inful = InfinityWrapper<unsigned int>::getInfinite(); InfinityWrapper<uns...
{"hexsha": "7bc15328e0eb6aecc1cbf13192d228c4afde2c9f", "size": 569, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/math/InfinityWrapperTests.cpp", "max_stars_repo_name": "sgraf812/pbqp-papa", "max_stars_repo_head_hexsha": "b5ae6fcb0842cb66956cccc4663f6fd9e6f6ae07", "max_stars_repo_licenses": ["MIT"], "max_st...
export BrickletMultiTouchIdentity struct BrickletMultiTouchIdentity uid::String connected_uid::String position::Char hardware_version::Vector{Integer} firmware_version::Vector{Integer} device_identifier::Integer end export BrickletMultiTouch """ Capacitive touch sensor for 12 electrodes """ ...
{"hexsha": "d91c21fe2261691b445d430bb2a6a8875b53fb3e", "size": 4910, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/devices/bricklet_multi_touch.jl", "max_stars_repo_name": "jonschumacher/PyTinkerforge.jl", "max_stars_repo_head_hexsha": "a37dfc8141bf86b9298277c66dec24387ccad6db", "max_stars_repo_licenses": [...
import random import numpy as np import torch from tqdm import tqdm import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable from func import constants import datetime import json import platform #使わない #文のリスト(入力と出力の二つ)を取って、id化した物を返す #ここでは非numpy,かつサイズがバラバラ->make_vectorでバッチ...
{"hexsha": "2db3506386b7c8c708eed17a1bce57c41ec0ad4d", "size": 5546, "ext": "py", "lang": "Python", "max_stars_repo_path": "func/utils.py", "max_stars_repo_name": "WERimagin/QuestionGeneration", "max_stars_repo_head_hexsha": "25e53ce2e00d77bbcb1cf2fd38e73c9ab723b3a4", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
from .evaluator import Evaluator from .algorithm import Algorithm import numpy as np import logging logger = logging.getLogger(__name__) class Loop: def __init__(self, evaluator: Evaluator, algorithm: Algorithm, absolute_tolerance = None, relative_tolerance = None, maximum_iterations = None, maximum_evaluations ...
{"hexsha": "d5bd15a54b4b202bcda544f04895d11f64780b8a", "size": 5456, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/boptx/loop.py", "max_stars_repo_name": "sebhoerl/boptx", "max_stars_repo_head_hexsha": "13804868b82947d7544d48fe4481a1f9983d64b9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "ma...
######################################### # # # Julien Clément and Johan Jobin # # University of Fribourg # # 2019 # # Master's thesis # # # ##########################...
{"hexsha": "11156763cc7d744cc0d82656cb2dfe27ddd80dc3", "size": 3827, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/medical_format_to_png/niftitopng.py", "max_stars_repo_name": "eXascaleInfolab/hydra", "max_stars_repo_head_hexsha": "b0e2b7e106d874f5704af49b64d65377202ff374", "max_stars_repo_licenses": ...
""" Test if options can be overwritten in the correct way https://github.com/AxFoundation/strax/pull/392 """ import strax import numpy as np # Initialize. We test both dt time-fields and time time-field _dtype_name = 'variable' _dtype = ('variable 1', _dtype_name) test_dtype = [(_dtype, np.float64)] + strax....
{"hexsha": "d8332f62548757597d1f7790803d62f81eef0326", "size": 2061, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_options.py", "max_stars_repo_name": "JelleAalbers/strax", "max_stars_repo_head_hexsha": "423225e9d07b62ac0c28a5e39d45dbf5e2f62b3d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
##################################################################### # ADOBE CONFIDENTIAL # ___________________ # # Copyright 2017 Adobe # All Rights Reserved. # # NOTICE: All information contained herein is, and remains # the property of Adobe and its suppliers, if any. The intellectual # and technical concepts co...
{"hexsha": "f721754672bebac235baff6704cad30073fc6e3a", "size": 2231, "ext": "py", "lang": "Python", "max_stars_repo_path": "recipes/python/template/template/trainingdataloader.py", "max_stars_repo_name": "tumulurik/acp-data-services-dsw-reference", "max_stars_repo_head_hexsha": "4ec0a161203a1097069bb5c0044eb6df137c5f6d...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
{"hexsha": "672de7ae8e94eceded92dfa0e77621eedac0e3b0", "size": 2915, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle/tests/test_dataset_cifar.py", "max_stars_repo_name": "jiansowa/Paddle", "max_stars_repo_head_hexsha": "488152a6d076eac91ef0921ff6e16c65777f814d", "max_stars_repo_licenses": ["Apache-...
SUBROUTINE beam_mm(mm,fs,ell) ! ! This subroutine forms the consistent mass matrix of a beam element. ! IMPLICIT NONE INTEGER,PARAMETER::iwp=SELECTED_REAL_KIND(15) REAL(iwp),INTENT(IN)::fs,ell REAL(iwp),INTENT(OUT)::mm(:,:) REAL(iwp)::fac fac=(fs*ell)/420.0_iwp mm(1,1)=156.0_iwp*fac mm(3,3)=mm(1,1) ...
{"hexsha": "3099c415c592a0b33d607341721987e1d079b7cb", "size": 660, "ext": "f03", "lang": "FORTRAN", "max_stars_repo_path": "src/libs/main/beam_mm.f03", "max_stars_repo_name": "leemargetts/PoreFEM", "max_stars_repo_head_hexsha": "23be1d3fa3091bcb4ec114a319b402feb5cba7d3", "max_stars_repo_licenses": ["BSD-2-Clause"], "m...
#pragma once #include "spdlog/spdlog.h" #include <boost/asio/buffer.hpp> #include <boost/asio/connect.hpp> #include <boost/asio/io_context.hpp> #include <boost/asio/ip/tcp.hpp> #include <boost/asio/read.hpp> #include <boost/system/system_error.hpp> #include <boost/asio/write.hpp> #include <boost/array.hpp> #include ...
{"hexsha": "4e53a4b6a667d5e680dca46d19e699e05fd24ce9", "size": 1024, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "testo/adb_host_client.hpp", "max_stars_repo_name": "magicsih/testo", "max_stars_repo_head_hexsha": "ed749ce4d4157c75e6a203038d93373c2e1c0ffe", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import matplotlib.pyplot as plt import numpy as np import seaborn as sns from sklearn.linear_model import Perceptron from sklearn.model_selection import cross_val_score from sklearn.preprocessing import StandardScaler from sklearn.utils import shuffle # Set random seed for reproducibility np.random.seed(1...
{"hexsha": "8fb4efe427e083c7c51457ca4c34bb34f8d208b7", "size": 2458, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter10/perceptron.py", "max_stars_repo_name": "PacktPublishing/Mastering-Machine-Learning-Algorithms-Second-Edition", "max_stars_repo_head_hexsha": "706d76fdb91b8c59223879cb236ce2bb6cc7e768", "...
using DifferentialEquations, Flux, DiffEqFlux using Plots, NPZ using IterTools: ncycle using BSON: @save, @load include("./Custom_DataLoader.jl") # using .Custom_DataLoader # Julia starts from 1 true_data = npzread("SWE_RNN_Training_Data.npy") true_data = permutedims(true_data, (1,3,2)) data_len = size(true_data)[3] ...
{"hexsha": "9b88d0087a38116c2264c3e6538d0fdd2d480892", "size": 2606, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "NODE_Julia/Shallow_water/neural_ode_IV.jl", "max_stars_repo_name": "Romit-Maulik/Tutorials-Demos-Practice", "max_stars_repo_head_hexsha": "a58ddc819f24a16f7059e63d7f201fc2cd23e03a", "max_stars_repo...
import sys sys.path.append('../') import numpy as np import tt d = 30 n = 2 ** d b = 1E3 h = b / (n + 1) #x = np.arange(n) #x = np.reshape(x, [2] * d, order = 'F') #x = tt.tensor(x, 1e-12) x = tt.xfun(2, d) e = tt.ones(2, d) x = x + e x = x * h sf = lambda x : np.sin(x) / x #Should be rank 2 y = tt.multifuncrs([x]...
{"hexsha": "82a12ebdf14809677818644038ba067ccbd91713", "size": 474, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/test_cross.py", "max_stars_repo_name": "rballester/ttpy", "max_stars_repo_head_hexsha": "a2fdf08fae9d34cb1e5ba28482e82e04b249911b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2016 Timothy Dozat # # 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 req...
{"hexsha": "f453a591c3b7e76dd76362914fbd414aacbdb7a3", "size": 18081, "ext": "py", "lang": "Python", "max_stars_repo_path": "srl.py", "max_stars_repo_name": "kleag/LISA-v1", "max_stars_repo_head_hexsha": "6cf94cdeafb9539bb199cdc32193d522c080e570", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, "max...
open import Agda.Builtin.Bool open import Agda.Builtin.Nat open import Agda.Builtin.Char renaming (primCharEquality to _==ᶜ_) open import Agda.Builtin.List open import Agda.Builtin.Equality open import Agda.Builtin.String renaming (primStringAppend to _++_) open import Agda.Builtin.IO open import Agda.Builtin.Unit va...
{"hexsha": "b9a1e31b73bf172231b45e08d695ae8d391c5595", "size": 1515, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Compiler/simple/Issue4999.agda", "max_stars_repo_name": "cagix/agda", "max_stars_repo_head_hexsha": "cc026a6a97a3e517bb94bafa9d49233b067c7559", "max_stars_repo_licenses": ["BSD-2-Clause"], "m...
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
{"hexsha": "7c73eda2ca8fbed143f0392ae0d0c6aae11f86c3", "size": 12919, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle/fluid/tests/unittests/mkldnn/test_activation_mkldnn_op.py", "max_stars_repo_name": "huhaibo/Paddle", "max_stars_repo_head_hexsha": "b436e5fa0c202eb3ef8881bc2ff5e04187ac5e2c", "max_s...
import os import pytest import numpy as np import sys #sys.path.append('/home/mts87985/ml-tomo/') # Random seed to ensure that tests are repeatable RANDOM_SEED = 23 np.random.seed(RANDOM_SEED) def test_norm_disc(): from super_tomo_py.data_handeling.tools import normalise_discritise_data img = np.random.rand...
{"hexsha": "c022ca5b3e49a47add10edcdce32974bd44cf51f", "size": 1524, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/tool_tests.py", "max_stars_repo_name": "keeeto/super-resolution-ml", "max_stars_repo_head_hexsha": "59516982e43bb448be3df6608396b13685789cc5", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import copy import sys import logging logger = logging.getLogger('root') import time from scaii.env.sky_rts.env.scenarios.tower_example import TowerExample from scaii.env.explanation import Explanation, BarChart, BarGroup, Bar import tensorflow as tf import numpy as np from abp import DQNAdaptive from abp.utils impo...
{"hexsha": "52502c619f9b7de2216d4141e816b74ab6479d90", "size": 4429, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/abp/examples/scaii/tower_capture/dqn.py", "max_stars_repo_name": "LinearZoetrope/abp", "max_stars_repo_head_hexsha": "2459c1b4d77606c1d70715ce8378d738ba102f37", "max_stars_repo_licenses"...
[STATEMENT] lemma OK_None_bot [iff]: "OK None \<sqsubseteq>\<^bsub>Err.le (le r)\<^esub> x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. OK None \<sqsubseteq>\<^bsub>Err.le (Opt.le r)\<^esub> x [PROOF STEP] (*<*) [PROOF STATE] proof (prove) goal (1 subgoal): 1. OK None \<sqsubseteq>\<^bsub>Err.le (Opt.le r)\<^esu...
{"llama_tokens": 181, "file": "Jinja_DFA_Opt", "length": 2}
# --- # title: 592. Fraction Addition and Subtraction # id: problem592 # author: Indigo # date: 2021-06-26 # difficulty: Medium # categories: Math # link: <https://leetcode.com/problems/fraction-addition-and-subtraction/description/> # hidden: true # --- # # Given a string representing an expression of fraction additi...
{"hexsha": "7581924d5dd8d7fed45520a01a4c800e4cd8efe2", "size": 2010, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/problems/592.fraction-addition-and-subtraction.jl", "max_stars_repo_name": "jmmshn/LeetCode.jl", "max_stars_repo_head_hexsha": "dd2f34af8d253b071e8a36823d390e52ad07ab2e", "max_stars_repo_licens...
/* * PyLoader.cpp * * Created on: 2012-02-27 * Author: leo */ #include <python2.7/Python.h> #include <fruitpunch/Common/Observable.h> #include <fruitpunch/Common/Runtime.h> #include <fruitpunch/Common/RuntimeError.h> #include <fruitpunch/Common/Filesystem.h> #include <fruitpunch/Graphics/Window.h> #include ...
{"hexsha": "04c4748ce6988a1565668563d17b80ecc0b76382", "size": 13943, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "fp_core/src/main/src/Python/PyLoader.cpp", "max_stars_repo_name": "submain/fruitpunch", "max_stars_repo_head_hexsha": "31773128238830d3d335c1915877dc0db56836cd", "max_stars_repo_licenses": ["MIT"],...
''' Created on Feb 17, 2012 @author: robertsj ''' import numpy as np from poropy.coretools import Reactor, Assembly, Reflector, Flare, Laban import plugin class Yamamoto(plugin.Plugin): """ Defines metadata for the large core setup """ def __init__(self,model,parent=None): plugin.Plugin...
{"hexsha": "5daa2cd66ae72ca63e31e734eff9285e324c5b8c", "size": 7147, "ext": "py", "lang": "Python", "max_stars_repo_path": "interface/plugins/reactor/Yamamoto.py", "max_stars_repo_name": "robertsj/poropy", "max_stars_repo_head_hexsha": "481a604339c9fa797817b2b0a55448329685c1d8", "max_stars_repo_licenses": ["MIT"], "max...
using Plots using DSP using FFTW include("RSProject.jl") function write_binary_file(data,filename::String,dtype::DataType=Matrix{ComplexF32}) f = open(filename,"w"); data = convert(dtype,data) write(f,data) close(f) end """ exportAndDisplay(u,a,iter,K,m,name) Exports and displays PCFM algorith results. ...
{"hexsha": "d959fd8e0613ca432e459fc4edd4d679e9f3f1a3", "size": 3087, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "julia/pcfmDriver.jl", "max_stars_repo_name": "ShaneFlandermeyer/ece5523-project", "max_stars_repo_head_hexsha": "1a5fb28e398f92ba0350a327c2c61c2764288842", "max_stars_repo_licenses": ["MIT"], "max_...
import numpy as np import cv2 import os.path as osp import json from human_body_prior.tools.model_loader import load_vposer import torch vposer_ckpt = '/Vol1/dbstore/datasets/a.vakhitov/projects/pykinect_fresh/smplify-x/smplify-x-data/vposer_v1_0/' def load_avakhitov_fits_vposer(vposer, part_path, dev_lbl): po...
{"hexsha": "1368b69e2269d6b7303299c5097db81eca903217", "size": 6708, "ext": "py", "lang": "Python", "max_stars_repo_path": "extern/smplx_kinect/smplx_kinect/common/avakhitov_utils.py", "max_stars_repo_name": "wangxihao/rgbd-kinect-pose", "max_stars_repo_head_hexsha": "03180723c99759ba2500bcd42b5fe7a1d26eb507", "max_sta...
\documentclass{article} \usepackage{style/preamble} \usepackage{style/mytikz} \usepackage{parskip} \newcounter{dip} \begin{document} \title{Problem Set 4 - Points at $\infty$} \date{} \maketitle \begin{mdframed} Corrected Theorem 4.1 from PSet 02: \begin{theorem} Let $f$ be a non-constant holomo...
{"hexsha": "a026aa7acb92b9aae27f6e922f9f3ea97767b276", "size": 8278, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "PSet04.tex", "max_stars_repo_name": "apurvnakade/mc2019-Riemann-surfaces", "max_stars_repo_head_hexsha": "edebdd1c81027b9cedb264eba1eeaa09dd4e311f", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
[STATEMENT] lemma finite_occurrences_val_expr [simp]: fixes v :: "('r,'l,'v) val" and e :: "('r,'l,'v) expr" shows "finite (RID\<^sub>V v)" "finite (RID\<^sub>E e)" "finite (LID\<^sub>V v)" "finite (LID\<^sub>E e)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (finite (RID\<^sub>V v) &&& finite...
{"llama_tokens": 834, "file": "Concurrent_Revisions_Executions", "length": 6}
[STATEMENT] lemma transC_MtransC[simp]: assumes "cf \<rightarrow>c cf'" shows "cf \<rightarrow>*c cf'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. cf \<rightarrow>*c cf' [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: cf \<rightarrow>c cf' goal (1 subgoal): 1. cf \<rightarrow>*c cf' [PROOF STEP...
{"llama_tokens": 227, "file": "Possibilistic_Noninterference_Language_Semantics", "length": 3}
import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from matplotlib.ticker import MaxNLocator import numpy as np import math def plotPsd(ax, psd, axis, *args, **kwargs): line = ax.loglog(psd.f, psd[axis], *args, **kwargs) ax.set_xlabel('f [Hz]') ax.set_ylabel('PSD ' + axis) return l...
{"hexsha": "59cebe30549a4c22b6a94930dd61b77540a4a41e", "size": 12127, "ext": "py", "lang": "Python", "max_stars_repo_path": "tweezers/plot/psd.py", "max_stars_repo_name": "DollSimon/tweezers", "max_stars_repo_head_hexsha": "7c9b3d781c53f7728526a8242aa9e1d671f15688", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_sta...
[STATEMENT] lemma top_injective_inf_complement: assumes "injective x" shows "top * (x \<sqinter> y) \<sqinter> top * (x \<sqinter> -y) = bot" [PROOF STATE] proof (prove) goal (1 subgoal): 1. top * (x \<sqinter> y) \<sqinter> top * (x \<sqinter> - y) = bot [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 su...
{"llama_tokens": 858, "file": "Relational_Forests_Forests", "length": 8}
import numpy as np import dataprocess.PDB_Data_Processing as PDB_Data_Processing ''' This module tests functions in the PDB_Data_Processing module ''' def test_samples_statistics(): ''' This function tests the sample_statistics() function in PDB_Data_Processing.py ''' result = PDB_Data_Processin...
{"hexsha": "899334521fca54ae290a3dbb74d680686035f6b4", "size": 1592, "ext": "py", "lang": "Python", "max_stars_repo_path": "missingdensityprotein/tests/test_PDB_Data_Processing.py", "max_stars_repo_name": "yhchen24/Missing-Density-PDB", "max_stars_repo_head_hexsha": "f0a269596d5a43dca7346ab6765826f5a6b93fb7", "max_star...
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau -/ import algebra.group.defs import logic.equiv.defs import logic.nontrivial /-! # Multiplicative opposite and algebraic operations on it > THIS FILE IS SYNCHRONIZED WITH MATHLI...
{"author": "leanprover-community", "repo": "mathlib", "sha": "5e526d18cea33550268dcbbddcb822d5cde40654", "save_path": "github-repos/lean/leanprover-community-mathlib", "path": "github-repos/lean/leanprover-community-mathlib/mathlib-5e526d18cea33550268dcbbddcb822d5cde40654/src/algebra/opposites.lean"}
""" utils.py """ import ast, re import numpy as np import os, sys, multiprocessing, logging from collections import defaultdict import nltk import spacy import lemminflect import torch from transformers import GPT2Tokenizer, XLNetTokenizer, TransfoXLTokenizer, OpenAIGPTTokenizer from transformers import GPT2LMHeadMod...
{"hexsha": "3a35b7f453e276a67571a68a3d53af99e94e2788", "size": 4462, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils.py", "max_stars_repo_name": "zjiayao/ccr_rock", "max_stars_repo_head_hexsha": "f62e3678a17520feeee8c658266e7e57cd4c7030", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_s...
[STATEMENT] lemma subspace_UNIV[simp]: "subspace UNIV" [PROOF STATE] proof (prove) goal (1 subgoal): 1. subspace UNIV [PROOF STEP] by (simp add: subspace_def)
{"llama_tokens": 67, "file": null, "length": 1}
% $Id: ant32-exc.tex,v 1.4 2002/05/29 18:43:00 ellard Exp $ \chapter{The Ant-32 Exception Architecture} \label{ExceptionArchitecture} When the Ant-32 processor takes an exception, control transfers to the address that has been specified as the {\em exception handler address}, via the {\tt leh} instruction. If an exc...
{"hexsha": "fe6e9ea370c470f2797faf9404718d0b4a17af00", "size": 8748, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Documentation/ant32-exc.tex", "max_stars_repo_name": "geoffthorpe/ant-architecture", "max_stars_repo_head_hexsha": "d85952e3050c352d5d715d9749171a335e6768f7", "max_stars_repo_licenses": ["BSD-3-Clau...
#!/usr/bin/env python # coding: utf-8 # ## Topic model # In[1]: import pandas as pd import numpy as np from test_model import (get_patent_fields_list, get_ml_patents, create_title_abstract_col,trim_data, structure_dataframe, partition_dataframe, ...
{"hexsha": "978f68653bf7659b74a282908549a20f3be8ff84", "size": 27111, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_selection/topic_model.py", "max_stars_repo_name": "glmack/techniche", "max_stars_repo_head_hexsha": "a7923b4cf1039a90f4feb7737622fabb53ef5e52", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests for the isophote module. """ from astropy.io import fits import numpy as np from numpy.testing import assert_allclose import pytest from .make_test_data import make_test_image from ..ellipse import Ellipse from ..fitter import EllipseFitter fro...
{"hexsha": "31dde1382f9edeeb86a88feaa0e58007ab403a2f", "size": 9849, "ext": "py", "lang": "Python", "max_stars_repo_path": "photutils/isophote/tests/test_isophote.py", "max_stars_repo_name": "rosteen/photutils", "max_stars_repo_head_hexsha": "5821bddc2d3fa2709b8de79c18efe99cff1ecb71", "max_stars_repo_licenses": ["BSD-3...
import artm import operator import functools import numpy as np import pandas as pd from collections import Counter, OrderedDict from scipy.optimize import curve_fit from .base_score import BaseScore # change log style lc = artm.messages.ConfigureLoggingArgs() lc.minloglevel = 3 lib = artm.wrapper.LibArtm(logging_co...
{"hexsha": "e133efa321f7cec0427c5e1ae7f2618ef621e752", "size": 6702, "ext": "py", "lang": "Python", "max_stars_repo_path": "topicnet/cooking_machine/models/semantic_radius_score.py", "max_stars_repo_name": "tkhirianov/TopicNet", "max_stars_repo_head_hexsha": "41318897d25b622da16f20d68fe9c315cd177b3c", "max_stars_repo_l...
""" Created on Wed Feb 5 13:04:17 2020 @author: matias """ import numpy as np np.random.seed(42) from scipy.optimize import minimize import emcee import corner from scipy.interpolate import interp1d import sys import os from os.path import join as osjoin from pc_path import definir_path path_git, path_datos_global...
{"hexsha": "48ffbb76c3938829b3f4d24d3fcae3a0c58d33f8", "size": 1367, "ext": "py", "lang": "Python", "max_stars_repo_path": "Software/tests/test_mcmc/old_stuff/LCDM/AGN/1params/MCMC_AGN_1params_valores_medios.py", "max_stars_repo_name": "matiasleize/fR-MCMC", "max_stars_repo_head_hexsha": "820dc6297a63485b1c84a960c042f8...
# import pyro from collections import defaultdict from torch.distributions import normal, poisson, binomial, log_normal, categorical, uniform import random from mpl_toolkits import mplot3d import numpy as np import matplotlib.pyplot as plt import torch as th from torch import nn # physical constants alpha_m = 0.9 alph...
{"hexsha": "77bd27c8c0323109807359a8abb5458d116c3d78", "size": 26111, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/main.py", "max_stars_repo_name": "schroederdewitt/openmalaria-gpu", "max_stars_repo_head_hexsha": "bc49d99caa92ec1d18cea1f48f1902cfadbce66f", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# Arunachal V1 May 25 2020 ##Getting and plotting data """ This code creates, gets and/or updates the data based on the tickers scraped from Wikipedia. Sequence of code execution: stock_get_data.py > stock_data_transformations.py > stock_dashboards.py """ #Importing Modules from __future__ import with_statement imp...
{"hexsha": "b069c5f191e008e03377b92008c884def071f544", "size": 8975, "ext": "py", "lang": "Python", "max_stars_repo_path": "stock_get_data.py", "max_stars_repo_name": "B0Ja/fin_data_eda", "max_stars_repo_head_hexsha": "eec0743a60ccba3d37a83b17996a836361e16177", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
fieldID = '506c2c3e' datapath = '../d/' import numpy as np import matplotlib.pyplot as plt from itertools import product as iterp from PIL import Image import cv2 as cv def getPlanet(fieldID): j17 = plt.imread(f'{datapath}planet-jun17/{fieldID}.png') j18 = plt.imread(f'{datapath}planet-jun18/{fieldID}.png')...
{"hexsha": "a2da91aa7d2b120ebcbeb04ba1b0db8f5e8747db", "size": 1508, "ext": "py", "lang": "Python", "max_stars_repo_path": "media/plt_planet4.py", "max_stars_repo_name": "tuguldurs/lacuna", "max_stars_repo_head_hexsha": "6e81bbd898f852f9af696b3c44e10a97f84d2736", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
[STATEMENT] theorem "{(n, k). n > 0 \<and> k > 0 \<and> fact k = (\<Prod>i<n. 2 ^ n - 2 ^ i :: nat)} = {(1, 1), (2, 3)}" (is "?lhs = ?rhs") [PROOF STATE] proof (prove) goal (1 subgoal): 1. {(n, k). 0 < n \<and> 0 < k \<and> fact k = (\<Prod>i<n. 2 ^ n - 2 ^ i)} = {(1, 1), (2, 3)} [PROOF STEP] proof [PROOF STATE] pro...
{"llama_tokens": 958, "file": "IMO2019_IMO2019_Q4", "length": 7}
import networkx import itertools import collections import numpy as np from scipy.spatial.distance import cdist from ase.geometry.dimensionality.disjoint_set import DisjointSet def build_neighbor_graph(atoms, cutoff=3.7): positions = atoms.get_positions() # Create edges as pairs of atoms whose distance is sm...
{"hexsha": "1a213dec477c2607d6ee5da0bd3a74d9a4bc691b", "size": 1993, "ext": "py", "lang": "Python", "max_stars_repo_path": "structure_analyzer.py", "max_stars_repo_name": "pmla/nanoparticle_optimization", "max_stars_repo_head_hexsha": "9b836c424472c67bb4f66a3c16948ba84d9bb134", "max_stars_repo_licenses": ["MIT"], "max_...
# Autogenerated wrapper script for NCCL_jll for powerpc64le-linux-gnu-cuda+10.2 export libnccl using CUDA_loader_jll JLLWrappers.@generate_wrapper_header("NCCL") JLLWrappers.@declare_library_product(libnccl, "libnccl.so.2") function __init__() JLLWrappers.@generate_init_header(CUDA_loader_jll) JLLWrappers.@ini...
{"hexsha": "e9bdcb31e36c7b6a571908bf35c307380d6465a7", "size": 464, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/wrappers/powerpc64le-linux-gnu-cuda+10.2.jl", "max_stars_repo_name": "JuliaBinaryWrappers/NCCL_jll.jl", "max_stars_repo_head_hexsha": "2295581a1057da2a9e504fdddf64170e0fc55436", "max_stars_repo_...
import numpy as np import math import matplotlib.pyplot as plt from envcopy import Environ import sys env = Environ() # NEED MODIFICATION: combine env with other functions time_delta = 1.5 vehicle_num = 500 RSU_num = 4 content_num = 50 content_size = 200 cache_num_V = 3 cache_num_R = 10 RSUposition = np.array([[250, 0...
{"hexsha": "d4be26234741f1a0846121cecd3529c156bf82b4", "size": 10179, "ext": "py", "lang": "Python", "max_stars_repo_path": "exhaust_1.py", "max_stars_repo_name": "chuiyangmeng96/GNN_DRL_Cache", "max_stars_repo_head_hexsha": "5e34b2933c5fcc428f18d391fc555c38041a53a3", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import argparse import os.path as osp import mmcv import torch import numpy as np from mmcv.runner import load_checkpoint from mmcv.parallel import MMDataParallel from mmcv.parallel import DataContainer as DC from mmdet.datasets import build_dataloader, build_dataset from mmdet.models import build_detector def parse...
{"hexsha": "3ef72ffe153bbea083892c243ea01faceb74add2", "size": 3863, "ext": "py", "lang": "Python", "max_stars_repo_path": "mmdetection/tools/visualize.py", "max_stars_repo_name": "oguzserbetci/anomalydetection4good", "max_stars_repo_head_hexsha": "a04bdb015d253538367963ac6a29619b42c96e3f", "max_stars_repo_licenses": [...
[STATEMENT] lemma CR: "CR R" [PROOF STATE] proof (prove) goal (1 subgoal): 1. CR R [PROOF STEP] by (intro semi_confluence_imp_CR semi_confluence)
{"llama_tokens": 65, "file": "Rewriting_Z_Z", "length": 1}