text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import ase import numpy as np from .helpers import * from toolz.curried import curry, pipe @curry def get_scaled_positions(coords, cell, pbc, wrap=True): """Get positions relative to unit cell. If wrap is True, atoms outside the unit cell will be wrapped into the cell in those directions with periodic bou...
{"hexsha": "8350cc9d8dcee5bb501d42432559bda3d3ded7d8", "size": 3489, "ext": "py", "lang": "Python", "max_stars_repo_path": "poremks/grid_generator.py", "max_stars_repo_name": "auag92/atomMKS", "max_stars_repo_head_hexsha": "60f957379b4acdeb64b7ff5c4e82c49e445a4c28", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
program i integer, dimension(2, 2) :: array array(1, 1) = 1 + 1 array(1, 2) = 1 * 2 array(2, 1) = 1 ** 2 array(2, 2) = array(1, 1) + array(1, 2) * array(2, 1) end program i
{"hexsha": "631aaf248d6ce1ac1fbd601109fc3f74057ccd99", "size": 186, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/expr/arrays/expr_array2d.f90", "max_stars_repo_name": "clementval/fc", "max_stars_repo_head_hexsha": "a5b444963c1b46e4eb34d938d992836d718010f7", "max_stars_repo_licenses": ["BSD-2-Clause"], ...
import numpy as np def getSamples( f, n, xmin=0, dx=1.0, fddx=0.1 ): ddx=dx*fddx xs = np.arange( xmin-dx, xmin+dx*(n+2)+1e-8, dx ) xs[0 ]=xs[ 1]+ddx xs[-1]=xs[-2]-ddx #print xs ys = f(xs) dy0 = (ys[0 ] - ys[1 ])/ddx dy1 = (ys[-2] - ys[-1])/ddx ys[ 0] = ys[2 ] - dy0*2*dx ys[-1]...
{"hexsha": "44811a6e1ce666c556afa65338e50b45d31d15ad", "size": 1355, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/pyGaussAtom/splines.py", "max_stars_repo_name": "ProkopHapala/SimpleSimulationEngine", "max_stars_repo_head_hexsha": "240f9b7e85b3a6eda7a27dc15fe3f7b8c08774c5", "max_stars_repo_licenses": [...
-makelib ies/xil_defaultlib -sv \ "C:/Xilinx/Vivado/2016.2/data/ip/xpm/xpm_cdc/hdl/xpm_cdc.sv" \ -endlib -makelib ies/xpm \ "C:/Xilinx/Vivado/2016.2/data/ip/xpm/xpm_VCOMP.vhd" \ -endlib -makelib ies/xil_defaultlib \ "../../../../Pipeline.srcs/sources_1/ip/clk_div/clk_div_clk_wiz.v" \ "../../../../Pipeline.srcs/...
{"hexsha": "5458b40cb53a6a106f299a063ca162e36eb13d00", "size": 410, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "Pipeline/Pipeline.ip_user_files/sim_scripts/clk_div/ies/run.f", "max_stars_repo_name": "HandsomeBrotherShuaiLi/pipelineCPU", "max_stars_repo_head_hexsha": "06789d4e396895f1be33bfe96abd756eede74da5"...
[STATEMENT] lemma seq_msg_ok: "ptoy i \<TTurnstile>\<^sub>A onll \<Gamma>\<^sub>T\<^sub>O\<^sub>Y (\<lambda>((\<xi>, _), a, _). anycast (\<lambda>m. case m of Pkt num' sid' \<Rightarrow> num' = no \<xi> \<and> sid' = i | _ \<Rightarrow> True) a)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. ptoy ...
{"llama_tokens": 257, "file": "AWN_Toy", "length": 1}
import platform import pyrealsense2 as rs # for realsense api import numpy as np import sys import time from enum import IntEnum from pyaidoop.camera.camera_dev_abc import CameraDev class RealSensePreset(IntEnum): Custom = 0 Default = 1 Hand = 2 HighAccuracy = 3 HighDensity = 4 MediumDensity...
{"hexsha": "5425d3e147341eee55c374ceadf1f1239701694e", "size": 7388, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyaidoop/camera/camera_dev_realsense.py", "max_stars_repo_name": "aidoop/pyaidoop", "max_stars_repo_head_hexsha": "fa42d0010b95b6641227033700f7dc31844cbe3b", "max_stars_repo_licenses": ["MIT"], "m...
c======================================================================= c c SIMSKEW c c This function implements the simulator for the allocation with c skewness. c c----------------------------------------------------------------------- subroutine simskew ( indic, sime...
{"hexsha": "ca99927bdf38afc2673d912b8c91e4eea41a0136", "size": 5372, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/math/optim_portfolio/simskew.f", "max_stars_repo_name": "alpgodev/numx", "max_stars_repo_head_hexsha": "d2d3a0713020e1b83b65d3a661c3801ea256aff9", "max_stars_repo_licenses": ["Apache-2.0"], "m...
% Master file % Documentclass \def\style{0} \if\style0 % My own publication template \documentclass[9pt, twocolumn, lineno]{templates/pi/pi-article} \fi\if\style1 % Elsevier publications \documentclass[12pt, preprint]{elsarticle} \fi\if\style2 % RSC publications \documentclass[9pt, twoside, twocolumn]{...
{"hexsha": "139635d9466944b6bc241b1e894114c81751fd47", "size": 1704, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "manuscript.tex", "max_stars_repo_name": "pauliacomi/paper-2021-d4-sorption", "max_stars_repo_head_hexsha": "52abbc1e84f1314afb58239954a9ee205422e99a", "max_stars_repo_licenses": ["MIT"], "max_stars_...
! { dg-do compile } ! { dg-options "-std=f2003" } ! ! PR fortran/33197 ! ! Check for Fortran 2008's ATAN(Y,X) - which is equivalent ! to Fortran 77's ATAN2(Y,X). ! real(4) :: r4 real(8) :: r8 complex(4) :: c4 complex(8) :: c8 r4 = atan2(r4,r4) r8 = atan2(r8,r8) r4 = atan(r4,r4) ! { dg-error "Too many arguments ...
{"hexsha": "407e83a701d227a3b667024e2645e9fa0b09a6a9", "size": 827, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/atan2_2.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo_licenses...
#!/usr/bin/env python3 import sys import re import json import math import argparse import logging from itertools import count import random from datetime import datetime, timedelta, MINYEAR, MAXYEAR import pathlib import pytz from yattag import Doc import gpxpy from aerofiles.igc.reader import Reader from pykml import...
{"hexsha": "601528a2c77e99085c9957de9567947670f70e64", "size": 70928, "ext": "py", "lang": "Python", "max_stars_repo_path": "genczml.py", "max_stars_repo_name": "mhaberler/gpx2czml", "max_stars_repo_head_hexsha": "9cb657652c941ac7d01d2405bef7e794c4531df0", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count":...
import multiprocessing as mp import numpy as np import subprocess import concurrent.futures import os from integrations import long_integration, short_integration, check_resonance_make_plots, kozai_integration, check_kozai_make_plots # make function needed for multiprocessing def do_integration(intN): """ when r...
{"hexsha": "683da9cede694fe6e1714759cb9607dc7736a2b8", "size": 3873, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/migrate.py", "max_stars_repo_name": "sbalaji718/KBR", "max_stars_repo_head_hexsha": "143c886f7740f4cc44c54e8657098d1381f2d66d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++! !   Futility Development Group    ! !              All rights reserved.           ! !                       ...
{"hexsha": "6c9f8a0bedae9f156fc5f711a4ea58f333881326", "size": 7818, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/Interpolators.f90", "max_stars_repo_name": "picmc/Futility", "max_stars_repo_head_hexsha": "158950c2c3aceffedf547ed4ea777e023035ca6e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
import sys sys.path.append("../") import numpy as np import pandas as pd import networkx as nx import pickle # katz centrlaity: computes the relative influence of a node by measuring the number of # immediate neighbors (first degree nodes) and also all other nodes that # connect to the node under consideration thro...
{"hexsha": "166259672ebd63fedae21c5371818ad599a4cfc9", "size": 3106, "ext": "py", "lang": "Python", "max_stars_repo_path": "static_network.py", "max_stars_repo_name": "ellymeng/Disease-Transmission-Analysis-Toolkit", "max_stars_repo_head_hexsha": "0785db949acba28bb7bcc675e0340006faf4a481", "max_stars_repo_licenses": ["...
""" Tests for callbacks. """ import os import unittest from shutil import rmtree import numpy as np import pytest from gpso import GPSOptimiser, ParameterSpace from gpso.callbacks import ( GPFlowCheckpoints, PostIterationPlotting, PostUpdateLogging, PreFinaliseSave, ) from gpso.optimisation import Cal...
{"hexsha": "7fc39cf3cb2b095fbd28de828fe17160c6b8df70", "size": 5290, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_callbacks.py", "max_stars_repo_name": "jajcayn/pygpso", "max_stars_repo_head_hexsha": "3e769067904a0ed19e77327876386689ae3f8cab", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import os from numpy import sqrt from numpy.random import shuffle from ArmMovementPredictionStudien.PREPROCESSING.smooth import smooth_data_utils import matplotlib.pyplot as plt from ArmMovementPredictionStudien.PREPROCESSING.utils.velocity import calculate_velocity_vector_for_dataset_filename def generate_smooth...
{"hexsha": "f43152f3d5ce0bde8af404580a5434a9d771a9a6", "size": 3809, "ext": "py", "lang": "Python", "max_stars_repo_path": "PREPROCESSING/smooth/check_different_window_sizes.py", "max_stars_repo_name": "MobMonRob/ArmMovementPredictionStudien", "max_stars_repo_head_hexsha": "7086f7b044d54b023c7d40e9413c35178a1ad084", "m...
import numpy as np import logging import config from utils import setup_logger import loggers as lg class Node(): def __init__(self, state): self.state = state self.playerTurn = state.playerTurn self.id = state.id self.edges = [] def isLeaf(self): if len(self.edges) > 0: return False else: retur...
{"hexsha": "602db14313700e328ee0cdd99c58aa127dfc9452", "size": 3177, "ext": "py", "lang": "Python", "max_stars_repo_path": "DeepReinforcementLearning/MCTS.py", "max_stars_repo_name": "Christoper-Harvey/1st-Capstone", "max_stars_repo_head_hexsha": "93630a4d5f4a2d939c8b5f74f11b5b33052e3f72", "max_stars_repo_licenses": ["...
import cv2 as cv import numpy as np import time def surf_image_match(left_image, right_image): gray_left_image = cv.cvtColor(left_image, cv.COLOR_BGR2GRAY) gray_right_image = cv.cvtColor(right_image, cv.COLOR_BGR2GRAY) gpu_gray_left_image = cv.cuda_GpuMat(gray_left_image) gpu_gray_right_image = cv.cud...
{"hexsha": "692a22ce6a6e3b4aca0464defe9e20e53fb9ebbe", "size": 8806, "ext": "py", "lang": "Python", "max_stars_repo_path": "SURF/surf.py", "max_stars_repo_name": "Oumourin/Moving-object-tracking-recognition-and-ranging-in-multi-channel-video", "max_stars_repo_head_hexsha": "201a6b260581f2e38ed4b4c348d6f4506eee549b", "m...
import numpy as np import matplotlib.pyplot as plt import matplotlib.dates as md import datetime as dt from matplotlib.ticker import FormatStrFormatter import cartopy import cartopy.crs as ccrs import cartopy.feature as cfeature import cartopy.io.shapereader as shpreader from matplotlib.axes import Axes from cartopy.m...
{"hexsha": "2f240641f2506cf81d2dd19258ce6d9d9a2b24fb", "size": 18475, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyxlma/plot/xlma.py", "max_stars_repo_name": "Vsalinas91/xlma-python", "max_stars_repo_head_hexsha": "bb95c11954e5b815ad3ee2b63707589a829e4566", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# -*- coding: utf-8 -*- # @Time : 2020/3/20 9:28 # @Author : kanmendashu2020 # @File : news_spider_init.py # @Software: PyCharm # @Description: # 全部代码的视频: # 新闻爬虫系列: # 1、https://www.bilibili.com/video/BV15E411P7ey?p=1 # # 2、https://mp.weixin.qq.com/s/DZb0lw391xkV2tCovCLaPQ # # 3、https://mp.weixin.qq.com/s/7tInLyxpuj5iII...
{"hexsha": "45c2a774e86ca4cd1157eba3c21869d731b2b7be", "size": 1820, "ext": "py", "lang": "Python", "max_stars_repo_path": "B\u7ad9/Python\u722c\u866b\u6848\u4f8b\u5b9e\u6218\uff082020 \u00b7 \u5468\u66f4\uff09/n1-l-\u722c\u53d6\u65b0\u95fb\u7f51\u7ad9\u5e76\u4fdd\u5b58\u5230Excel\u4e2d/news_spider_init.py", "max_stars...
import numpy as np from .optimization_problem import OptimizationProblem class Rosenbrock(OptimizationProblem): """Rosenbrock function .. math:: f(x_1,\\ldots,x_n) = \\sum_{j=1}^{n-1} \ \\left( 100(x_j^2-x_{j+1})^2 + (1-x_j)^2 \\right) subject to .. math:: -2.048 \\leq x_i ...
{"hexsha": "e11353ab36d210023204064c7dc84af303f08a9a", "size": 1434, "ext": "py", "lang": "Python", "max_stars_repo_path": "pySOT/optimization_problems/rosenbrock.py", "max_stars_repo_name": "WY-Wang/pySOT", "max_stars_repo_head_hexsha": "a2de59a0ab00da0465b964e070199fe4773918cd", "max_stars_repo_licenses": ["BSD-3-Cla...
import numpy as np import hashlib import logging try: from mpi4py import MPI comm = MPI.COMM_WORLD mpi_rank = comm.Get_rank() mpi_size = comm.Get_size() barrier = comm.barrier except ImportError: mpi_rank = 0 mpi_size = 1 barrier = lambda: None MPI_fail_params_nonuniform = True # ...
{"hexsha": "600a503456bb83eead5898e4abece00f10a2fba0", "size": 3958, "ext": "py", "lang": "Python", "max_stars_repo_path": "bmtk/builder/builder_utils.py", "max_stars_repo_name": "mjhyman/bmtk", "max_stars_repo_head_hexsha": "42dcce944fe8ff8cab02b19d2d983f73a8cbc0d1", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
Debats du Senat (hansard) 1ere Session, 36 e Legislature, Volume 137, Numero 142 Le mardi 1 er juin 1999 L'honorable Gildas L. Molgat, President Remise d'un doctorat honorifique de l'Universite de Montreal Les effets negatifs des accords de libre-echange Avis de motion d'affirmation et de resolution appuyant leu...
{"hexsha": "52b106e4d1f8a4dc33436018507e6edcfd2ebad3", "size": 26011, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "data/Hansard/Training/hansard.36.1.senate.debates.1999-06-01.142.f", "max_stars_repo_name": "j1ai/Canadian_Hansards_Neural_Machine_Translation", "max_stars_repo_head_hexsha": "554666a89090fc1b1d1...
""" Copyright (c) 2021 Intel Corporation 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 in writin...
{"hexsha": "e06f09bb38d33a24b7faa87bb91cf625378b6b43", "size": 17798, "ext": "py", "lang": "Python", "max_stars_repo_path": "nncf/torch/quantization/metrics.py", "max_stars_repo_name": "evgeniya-egupova/nncf", "max_stars_repo_head_hexsha": "39a3c5b2e5cc7d33723154d2e622d4d7882a99a4", "max_stars_repo_licenses": ["Apache-...
import math import multiprocessing import os import random import re import sys import time import traceback from itertools import chain from multiprocessing import Process, Manager from shutil import copyfile import numpy as np from goprime import Constants from goprime.board import Position from goprime.elo import ...
{"hexsha": "99ab7b8b14f2201508a9290cdf1c75d4a68eb2f8", "size": 26125, "ext": "py", "lang": "Python", "max_stars_repo_path": "goprime/game.py", "max_stars_repo_name": "BenisonSam/goprime", "max_stars_repo_head_hexsha": "3613f643ee765b4ad48ebdc27bd9f1121b1c5298", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
theory ComputeHOL imports Complex_Main "Compute_Oracle/Compute_Oracle" begin lemma Trueprop_eq_eq: "Trueprop X == (X == True)" by (simp add: atomize_eq) lemma meta_eq_trivial: "x == y \<Longrightarrow> x == y" by simp lemma meta_eq_imp_eq: "x == y \<Longrightarrow> x = y" by auto lemma eq_trivial: "x = y \<Longrightar...
{"author": "seL4", "repo": "isabelle", "sha": "e1ab32a3bb41728cd19541063283e37919978a4c", "save_path": "github-repos/isabelle/seL4-isabelle", "path": "github-repos/isabelle/seL4-isabelle/isabelle-e1ab32a3bb41728cd19541063283e37919978a4c/src/HOL/Matrix_LP/ComputeHOL.thy"}
import cv2 import numpy as np import time import requests from utils import helpers import matplotlib.pylab as plt class config(object): def __init__(self): self.width = 352 # 图片宽 self.height = 288 #图片高 self.color = (255,240,0) # 掩模颜色 self.url = "http://127.0.0.1:8500" #请求url 端口8500 self.label...
{"hexsha": "2896d4f89e49bf725032ad32a180789715fd1575", "size": 2960, "ext": "py", "lang": "Python", "max_stars_repo_path": "demo.py", "max_stars_repo_name": "YifengChen94/Track-limit-recognition", "max_stars_repo_head_hexsha": "0be8cc1f3ef34703d3252f8e569d49332d339adf", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
#!/usr/bin/env python3 import numpy as np import json import os import sys import scipy.io as sio import wfdb """ Written by: Xingyao Wang, Chengyu Liu School of Instrument Science and Engineering Southeast University, China chengyu@seu.edu.cn """ R = np.array([[1, -1, -.5], ...
{"hexsha": "37f968aa3679a4db135f400fde59bb7cf033c51d", "size": 6663, "ext": "py", "lang": "Python", "max_stars_repo_path": "score_2021.py", "max_stars_repo_name": "syxiaobai/AF-NEU", "max_stars_repo_head_hexsha": "0cf19f50ce3af53c75bf28564ca74d78fdaf7309", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
Users/WilliamLewis has 500 stickers. Leave a message here if you want one. Also, are there good places to leave any? Places to give them out? 20100103 17:49:00 nbsp Id like two. I also have a few more Wiki Button Wiki Buttons. Users/JasonAller 20100103 19:07:07 nbsp Maybe a few could be placed next to where copie...
{"hexsha": "e9b149cd30b11c5f7af47e7760fe92483537840c", "size": 1287, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Requests.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
''' Author: Dr. Mohamed A. Bouhlel <mbouhlel@umich> Dr. John T. Hwang <hwangjt@umich.edu> This package is distributed under New BSD license. ''' from __future__ import print_function, division import numpy as np from scipy import linalg from smt.utils import compute_rms_error from smt.problems import Sphere,...
{"hexsha": "b2894d475ace6037062550f2fd6d9af359901958", "size": 19674, "ext": "py", "lang": "Python", "max_stars_repo_path": "smt/examples/run_examples.py", "max_stars_repo_name": "meliani09/smt", "max_stars_repo_head_hexsha": "af729143be09b012257bf81dcd3e2c8c40f65c96", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_...
import os import json import html import re from collections import OrderedDict from collections import Counter from string import punctuation import numpy as np import pandas as pd import torch from torch.utils.data import TensorDataset, DataLoader from hparams import hps_data def read_data(dataset, max_count=hps_...
{"hexsha": "030d07899a476dec51a1e28d9dcac1d777f78627", "size": 6667, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/preprocess.py", "max_stars_repo_name": "eugli/news-engagement-prediction", "max_stars_repo_head_hexsha": "192eb166397e1576577a97babfeebae353344123", "max_stars_repo_licenses": ["MIT"], "max_st...
import pandas as pd import numpy as np import os claim_path = '.\\After_Process\\Claim\\' personal_path = '.\\After_Process\\personal_process\\' output_path = '.\\After_Process\\monthly_process\\' multiply = 1000 ''' Create File ''' create_path = '' for i in output_path.split('\\'): if i == '.': create_path += ...
{"hexsha": "44985b3773ae203ce155dd530c80d186db8b8dd8", "size": 2197, "ext": "py", "lang": "Python", "max_stars_repo_path": "monthly_process.py", "max_stars_repo_name": "jui-sheng/Insurance_Reclassifier", "max_stars_repo_head_hexsha": "06c61e3da1af7ec2ac569bfe3d43574ee4611a1a", "max_stars_repo_licenses": ["MIT"], "max_s...
include("rigidbody.jl") using Statistics mass1 = 1.0 # kg force1 = 4.0 # Newton Δt = 0.1 body = RigidBody(mass1, force1) ts = 0:Δt:200 # calculate the approximation using the integration approx = Float64[] for t in ts integrate!(body, Δt) push!(approx, body.position[1]) end # analytic calculation using the...
{"hexsha": "c4c1eefe0ca1e5fba4d732786cd479e8c15df357", "size": 1122, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "rigidbodytest.jl", "max_stars_repo_name": "FourMInfo/JuliaforBeginners", "max_stars_repo_head_hexsha": "4908cd82c777cc9934056bbada36bccd67158906", "max_stars_repo_licenses": ["Unlicense"], "max_sta...
SUBROUTINE RKQC(Y,DYDX,N,X,HTRY,EPS,YSCAL,HDID,HNEXT,DERIVS) PARAMETER (NMAX=10,FCOR=.0666666667, * ONE=1.,SAFETY=0.9,ERRCON=6.E-4) EXTERNAL DERIVS DIMENSION Y(N),DYDX(N),YSCAL(N),YTEMP(NMAX),YSAV(NMAX),DYSAV(NMAX) PGROW=-0.20 PSHRNK=-0.25 XSAV=X DO 11 I=1,N ...
{"hexsha": "d1a5058ac374160d5fc8402f43f67f7bfcbf133a", "size": 1152, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "Math3/NumRec/source/rkqc.for", "max_stars_repo_name": "domijin/MM3", "max_stars_repo_head_hexsha": "cf696d0cf26ea8e8e24c86287cf8856cab7eaf77", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
#!/usr/bin/env python # coding: utf-8 import numpy as np import chess import chess.pgn import random def choosePositions(positions, moves, nExcludeStarting=5, nPositions=10): """ Returns positions that will be used in our model Inputs: positions: List of all chessboard positions of a game in...
{"hexsha": "3fdb5dc638729bee8dae7c5119c01540692913d2", "size": 4429, "ext": "py", "lang": "Python", "max_stars_repo_path": "pgn2bitboard/main.py", "max_stars_repo_name": "anirudhganwal06/pgn2bitboard", "max_stars_repo_head_hexsha": "9a1218bb664ee33d884f52ce9f840d6a7e20dd93", "max_stars_repo_licenses": ["MIT"], "max_sta...
#load the datasets library to access the iris data set library(datasets) #load and view the iris dataset data(iris) head(iris) #load ggplot 2 for plotting #install.packages("ggplot2") library(ggplot2) #install.packages("GGally") library(GGally) ggplot(iris, aes(Petal.Length, Petal.Width, color=Species))...
{"hexsha": "1c70b8f1253f13621cdc41040f23e1a7ee9aa20c", "size": 4359, "ext": "r", "lang": "R", "max_stars_repo_path": "kmeans.r", "max_stars_repo_name": "LizMGagne/Modeling-with-R", "max_stars_repo_head_hexsha": "475da952e359ea5671a0468838134d8e1fcd7ddb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
import numpy as np import matplotlib.pyplot as plt from sklearn.linear_model import LogisticRegression from kutu.logistic_regression import LogisticRegressionNumpy from sklearn.metrics import r2_score from sklearn.datasets import make_classification from sklearn.model_selection import train_test_split from sklearn.metr...
{"hexsha": "9166b0be332fb22056b969fbd8956fe3e76b8c64", "size": 1639, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/logistic_regression.py", "max_stars_repo_name": "bozcani/kutu", "max_stars_repo_head_hexsha": "2bfc8a18ad65baf7ad103e4413211147c75c914c", "max_stars_repo_licenses": ["MIT"], "max_stars...
# Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # 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, including without limitation the rights to # us...
{"hexsha": "4658a3f5cc480b146fa9901d56844425944138c4", "size": 6543, "ext": "py", "lang": "Python", "max_stars_repo_path": "Lab 2/utils/display_utils.py", "max_stars_repo_name": "heber-augusto/aws-deepcomposer-samples", "max_stars_repo_head_hexsha": "f0be9809f8a7e663c3cb0e2a18510d4d931cfd7a", "max_stars_repo_licenses":...
[STATEMENT] lemma Or\<^sub>n_dnf: "finite \<Phi> \<Longrightarrow> dnf (Or\<^sub>n \<Phi>) = Finite_Set.fold (\<lambda>\<phi>. (\<union>) (dnf \<phi>)) {} \<Phi>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. finite \<Phi> \<Longrightarrow> dnf (Or\<^sub>n \<Phi>) = Finite_Set.fold (\<lambda>\<phi>. (\<union>) (d...
{"llama_tokens": 1418, "file": "LTL_Disjunctive_Normal_Form", "length": 11}
#!/usr/bin/env python3 import argparse from pathlib import Path import numpy as np import statsmodels.api as sm from scipy import stats from matplotlib import pyplot as plt parser = argparse.ArgumentParser( description="Train generalized linear model to get coefficient for each variable." ) parser.add_argument( ...
{"hexsha": "561e33ce0c5fe3519ceaa13941cef714b7924fe7", "size": 11548, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/few_image_train.py", "max_stars_repo_name": "tommyfuu/flower_map_new", "max_stars_repo_head_hexsha": "6488b118c2d41c41829f83087761342c81d0ef8c", "max_stars_repo_licenses": ["MIT"], "max_s...
import cv2 import numpy as np yield_Cascade = cv2.CascadeClassifier('haarCascade.xml') fourcc = cv2.VideoWriter_fourcc(*'XVID') out = cv2.VideoWriter('Cedez passage.avi', fourcc, 10.0, (640,480)) cap = cv2.VideoCapture(0) threshold = 150 while True: ret, img = cap.read() gray = cv2.cvtColor(img, ...
{"hexsha": "8690123fb5b095180381ecd4a210e7f947606a11", "size": 896, "ext": "py", "lang": "Python", "max_stars_repo_path": "yieldSign.py", "max_stars_repo_name": "IemProg/Road_Panel_Recognition", "max_stars_repo_head_hexsha": "5acd5e1b82ce2d161243a3e92e2449ebe2bde479", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
from sklearn.datasets import load_boston, load_diabetes from sklearn.linear_model import LinearRegression, Lasso, ElasticNet, TheilSenRegressor, RANSACRegressor, Ridge from sklearn.ensemble import RandomForestRegressor, GradientBoostingRegressor, ExtraTreesRegressor from sklearn.tree import DecisionTreeRegressor from s...
{"hexsha": "eef024b94d75fcd78c3f8885e18f517ba4236e29", "size": 5005, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/regressionPipelineCrossValidation.py", "max_stars_repo_name": "Tiziana-I/project-covid-mask-classifier", "max_stars_repo_head_hexsha": "e1619172656f8de92e8faae5dcb7437686f7ca5e", "max_stars_...
program t implicit none ! io-control-spec write stmt iostat (with error) integer::ierr=0 open (95, status='new', file='tmpfile', access='direct', recl=3) write (95, iostat=ierr) 'hello' if (ierr .ne. 0) then print *,'test successful' endif close (95,status='delete') endprogram t
{"hexsha": "a234b4be21e7a8ffa91c706d08843ca43ee1809f", "size": 302, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "tests/t0292r/t.f90", "max_stars_repo_name": "maddenp/ppp", "max_stars_repo_head_hexsha": "81956c0fc66ff742531817ac9028c4df940cc13e", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
""" Bounded(block, size) <: WrapperBlock A [`WrapperBlock`](#) for annotating spatial data blocks with size information for their spatial bounds. As an example, `Image{2}()` doesn't carry any size information since it supports variable-size images, but sometimes it can be useful to have the exact size as informati...
{"hexsha": "a170961b0e3d7e3c595ed573f33c634d8eba8582", "size": 1434, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Vision/blocks/bounded.jl", "max_stars_repo_name": "manikyabard/FastAI.jl", "max_stars_repo_head_hexsha": "01fcfa93a3c8ae0748c3394692651df66f878f43", "max_stars_repo_licenses": ["MIT"], "max_sta...
import tensorflow as tf import numpy as np from tensorflow import keras import matplotlib.pyplot as plt fashion_mnist = keras.datasets.fashion_mnist #--------------> LOAD THE DATA (train_data, train_labels), (test_data, test_labels) = fashion_mnist.load_data() #since the range of values are from 0 to 25...
{"hexsha": "e6402da131e8e959f4136eda9046e2f216add910", "size": 2572, "ext": "py", "lang": "Python", "max_stars_repo_path": "Deep Learning/Keras/Learning/Fashion/fashion.py", "max_stars_repo_name": "deepaksing/DeepLearning", "max_stars_repo_head_hexsha": "295ac190d92fc6822f16ac781e955ea594ff4dc4", "max_stars_repo_licens...
!> @file classTimeIterator.f90 !! @brief time Iterator !! @detail F03 format !! @date 2017.2.18 !! @date Last Update !! @author MODULE classTimeIterator IMPLICIT NONE PRIVATE TYPE, PUBLIC :: timeIterator DOUBLE PRECISION, PRIVATE :: tend DOUBLE PRECISION, PRIVATE :: now DOUBLE PR...
{"hexsha": "f3bab367d5c02751e4bbc97ba035526281dbfb45", "size": 1898, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "classTimeIterator.f90", "max_stars_repo_name": "computational-sediment-hyd/fakeVOF", "max_stars_repo_head_hexsha": "339c42b4dbc5f7d09d8d098b9bc033616daf34c0", "max_stars_repo_licenses": ["MIT"],...
[STATEMENT] lemma reachable_While: "reachable (WHILE b DO c) \<subseteq> {WHILE b DO c, IF b THEN c ;; WHILE b DO c ELSE SKIP, SKIP} \<union> (\<lambda>c'. c' ;; WHILE b DO c) ` reachable c" [PROOF STATE] proof (prove) goal (1 subgoal): 1. reachable (WHILE b DO c) \<subseteq> {WHILE b DO c, IF b THEN c;; WHILE b D...
{"llama_tokens": 358, "file": null, "length": 2}
import numpy as np import pytest from nvtabular import Dataset, Workflow, WorkflowNode, dispatch from nvtabular.graph.schema import Schema from nvtabular.graph.selector import ColumnSelector from nvtabular.ops import ( Categorify, DifferenceLag, FillMissing, LambdaOp, Operator, Rename, Targ...
{"hexsha": "b92a34003cb208a14f23b13b05c39b8212a74e2a", "size": 11282, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit/workflow/test_workflow_node.py", "max_stars_repo_name": "SimonCW/NVTabular", "max_stars_repo_head_hexsha": "229d6da5cfcf26dece7867ff43a1414b711b07be", "max_stars_repo_licenses": ["Apac...
from functools import lru_cache import json import numpy as np import pims import cv2 as cv import scipy.ndimage import skimage.draw as skdraw import skimage.feature as skfeature import skimage.filters as skfilters import skimage.measure as skmeasure import skimage.morphology as skmorph import skimage.segmentation as s...
{"hexsha": "a3ad4233181aae9df5265c25160d7e05bc69149f", "size": 15581, "ext": "py", "lang": "Python", "max_stars_repo_path": "ant_tracker/tracker/segmenter.py", "max_stars_repo_name": "fd-sturniolo/AntTracker", "max_stars_repo_head_hexsha": "0677ec1757c33aaddd013eb0a65481c3aca25881", "max_stars_repo_licenses": ["MIT"], ...
import os import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt plt.ion() import cPickle as pkl import sys import pdb import h5py class VideoPatchDataHandler(object): def __init__(self,sequence_length=20,batch_size=80,down_sample_rate_=1,dataset_name='train'): stats = pkl.loa...
{"hexsha": "e5d8147a3d311c6ea8360665dc88fdc3e24317a8", "size": 6853, "ext": "py", "lang": "Python", "max_stars_repo_path": "Code/data_handler.py", "max_stars_repo_name": "mjfarooq/Sensor_Array_Prediction", "max_stars_repo_head_hexsha": "42f63e4293ca68e886af813f480d5852c74b58d3", "max_stars_repo_licenses": ["MIT"], "max...
import json import pdb import re import argparse from operator import itemgetter from multiprocessing import Pool from functools import partial from copy import deepcopy import os import numpy as np from skmultilearn.problem_transform import LabelPowerset, \ BinaryRelevance#,...
{"hexsha": "d136d008739f0f5bd33974aa1e85085f9dc2e5e2", "size": 10685, "ext": "py", "lang": "Python", "max_stars_repo_path": "plastering/inferencers/scrabble/naive_baseline.py", "max_stars_repo_name": "MingzheWu418/plastering", "max_stars_repo_head_hexsha": "322531e934c3acf2ecc8f520b37a6d255b9959c2", "max_stars_repo_lic...
#!/usr/bin/env python import numpy as np class stats(object): """ Based on SpectralInfoClass.m """ def __init__(self,S=None,w=None,dw=None): self.M0 = None # [(response units)^2*(rad/s)^0] Zeroth spectral moment self.M1 = None # [(response units)^2*(rad/s)^...
{"hexsha": "e837ec3327ffd9b19fdaca0de684053d050fdaf9", "size": 2690, "ext": "py", "lang": "Python", "max_stars_repo_path": "WDRT/MLER_toolbox/mler/spectrum.py", "max_stars_repo_name": "zmorrell-sand/WDRT", "max_stars_repo_head_hexsha": "5a28ef268a1ea7431bdba5bc2ac02d03f39ab608", "max_stars_repo_licenses": ["Apache-2.0"...
import matplotlib.pyplot as plt import seaborn as sns from numpy import histogram, interp, round, log from numpy import max as npmax sns.axes_style("white") def InvarianceTestKolSmirn(epsi, y1, y2, band_int, cdf_1, cdf_2, up_band, low_band, pos=None, name='Invariance Test', bound=(0, 0)): ...
{"hexsha": "3230a1f7578eda71bba759368ae576e7310aa614", "size": 4235, "ext": "py", "lang": "Python", "max_stars_repo_path": "functions_legacy/InvarianceTestKolSmirn.py", "max_stars_repo_name": "dpopadic/arpmRes", "max_stars_repo_head_hexsha": "ddcc4de713b46e3e9dcb77cc08c502ce4df54f76", "max_stars_repo_licenses": ["MIT"]...
# # Copyright (c) 2021 Tobias Thummerer, Lars Mikelsons, Josef Kircher # Licensed under the MIT license. See LICENSE file in the project root for details. # ############### # Prepare FMU # ############### cd(dirname(@__FILE__)) pathToFMU = joinpath(pwd(), "../model/IO.fmu") myFMU = fmiLoad(pathToFMU) ##############...
{"hexsha": "a899e79a5baf08aca793111cd4571a50e2900ad4", "size": 1928, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/getterSetterTest_fmu.jl", "max_stars_repo_name": "AnHeuermann/FMI.jl", "max_stars_repo_head_hexsha": "f7814f830d38119e4181162be1f5b5fa63c6d4a0", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy from typing import List, Tuple def ngrams(sequence, n: int): """ :return: The ngrams of the message in order """ assert isinstance(n, int) mlen = len(sequence) ngramlist = ( sequence[start:end] for start, end in zip( range(mlen - n + 1), range(n, ml...
{"hexsha": "22abe5d66969d4ad5177da4e9356e42d5f0fc6f3", "size": 5528, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/nemere/utils/baseAlgorithms.py", "max_stars_repo_name": "jaredchandler/nemesys", "max_stars_repo_head_hexsha": "9f8d87ac545748766e58495cd7c2f447ae2bd225", "max_stars_repo_licenses": ["MIT"], "...
# -*- coding: utf-8 -*- """ Created on Sat May 22 00:39:09 2021 @author: whong """ import pathlib import tensorflow as tf import numpy as np import tqdm np.set_printoptions(threshold=5) def AISdata_train(): print ("1") data_root=r"/content/AISda...
{"hexsha": "1875b96930688a32c21e9b7664b95a29c8f3976e", "size": 2194, "ext": "py", "lang": "Python", "max_stars_repo_path": "inputdata.py", "max_stars_repo_name": "whongfeiHK/AIS-curve-prediction-Deep-Learning", "max_stars_repo_head_hexsha": "b1f321c6fa6fbd2c854e7d9d16953ca49519bc1a", "max_stars_repo_licenses": ["Apache...
using NamedDims using NamedDims: names using SparseArrays using Test @testset "get the parent array that was wrapped" begin orig = [1 2; 3 4] @test parent(NamedDimsArray(orig, (:x, :y))) === orig end @testset "get the named array that was wrapped" begin @test names(NamedDimsArray([10 20; 30 40], (:x, :...
{"hexsha": "498772b2c6c9803254b77936962eff1fd37716db", "size": 4305, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/wrapper_array.jl", "max_stars_repo_name": "mcabbott/NamedDims.jl", "max_stars_repo_head_hexsha": "0e74fec43ef969b99118deabff84758644097167", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
[STATEMENT] lemma nth_ucast: "(ucast (w::'a::len word)::'b::len word) !! n = (w !! n \<and> n < min LENGTH('a) LENGTH('b))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. UCAST('a \<rightarrow> 'b) w !! n = (w !! n \<and> n < min LENGTH('a) LENGTH('b)) [PROOF STEP] by (auto simp add: bit_simps not_le dest: bit_...
{"llama_tokens": 158, "file": "Word_Lib_Word_Lib_Sumo", "length": 1}
import flwr as fl import os import argparse from datetime import datetime from typing import Tuple, Optional import torch from torchvision.transforms import transforms import numpy as np from leafdp.utils import model_utils from leafdp.femnist.cnn import FemnistModel from leafdp.vanilla.train import test_model from l...
{"hexsha": "171e5784249836fa0b12163816817a7e36fa9b24", "size": 9722, "ext": "py", "lang": "Python", "max_stars_repo_path": "leafdp/flower/server.py", "max_stars_repo_name": "matturche/fl_dpsgd_strategies", "max_stars_repo_head_hexsha": "81d29edc86be75b9d8cae0db66277b47b81f4db0", "max_stars_repo_licenses": ["Apache-2.0"...
""" This example shows how to use the facade class StratifiedThermalStorage to add a storage to a model that optimizes operation with oemof.solph. """ import os import pandas as pd import numpy as np from oemof.solph import Source, Sink, Bus, Flow, Model, EnergySystem # noqa from oemof.thermal import facades from oe...
{"hexsha": "739a740c32e72ab40931f327ed4406d2940b8d62", "size": 2637, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/stratified_thermal_storage/02_operation_facade.py", "max_stars_repo_name": "oemof/oemof-thermal", "max_stars_repo_head_hexsha": "1c1fb8f6ea6255d854c7a535c8d199a4ba0abc5e", "max_stars_repo...
import numpy as np import tensorflow as tf import random as rn np.random.seed(123) rn.seed(123) #single thread session_conf = tf.ConfigProto( intra_op_parallelism_threads=1, inter_op_parallelism_threads=1) from keras import backend as K tf.set_random_seed(123) sess = tf.Session(graph=tf.get_default_graph(), config=ses...
{"hexsha": "9b107236891b9649f4a6708a913fbc25df5c4ff0", "size": 5554, "ext": "py", "lang": "Python", "max_stars_repo_path": "NN.py", "max_stars_repo_name": "akash13singh/thesis", "max_stars_repo_head_hexsha": "c9c1aae3545e0412a042f5838e81622c82e8668a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 215, "max_sta...
// Copyright (c) 2001-2010 Hartmut Kaiser // // 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) #if !defined(BOOST_SPIRIT_WHAT_MAY_04_2007_0116PM) #define BOOST_SPIRIT_WHAT_MAY_04_2007_0116PM #if defined(_MSC_VE...
{"hexsha": "9c0efe324b4f653c0f5541f355cf885fbbe104fe", "size": 961, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "external/boost_1_44_0/boost/spirit/home/karma/what.hpp", "max_stars_repo_name": "RaptDept/slimtune", "max_stars_repo_head_hexsha": "a9a248a342a51d95b7c833bce5bb91bf3db987f3", "max_stars_repo_licenses...
import os import cv2 as cv import numpy as np import matplotlib.pyplot as plt import pdb import random from add_pieces_mosaic import * from parameters import * def unpickle(file): import pickle with open(file, 'rb') as fo: dict = pickle.load(fo, encoding='bytes') return dict d...
{"hexsha": "32770ce3f523a814dc575733ebfe43dceb54dd77", "size": 4396, "ext": "py", "lang": "Python", "max_stars_repo_path": "build_mosaic.py", "max_stars_repo_name": "bleotiu/Mosaics", "max_stars_repo_head_hexsha": "3ef0fcd9ea37de03c15bc8eac4dd02e80f0cb4f4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
module splay_stuff ! integer, parameter :: bs=4 integer :: bs logical dowrite type abc ! integer high,low integer,allocatable :: bytes(:) end type abc interface operator(<=) module procedure less_equal end interface interface operator(==) module procedure equal end interface ...
{"hexsha": "e310d03ff35962a78c35cf14281b0ef89b2a73a7", "size": 15107, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "darwin19/sep_allocate.f90", "max_stars_repo_name": "timkphd/examples", "max_stars_repo_head_hexsha": "04c162ec890a1c9ba83498b275fbdc81a4704062", "max_stars_repo_licenses": ["Unlicense"], "max_s...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Base class for Mask objects. Contains many common utilities used for accessing masks. The mask itself is represented under the hood as a three dimensional numpy :obj:`ndarray` object. The dimensions are ``[NUM_FREQ, NUM_HOPS, NUM_CHAN]``. Safe accessors for these arra...
{"hexsha": "dd832b3e79306a46388e4fff217d35f408802f61", "size": 10915, "ext": "py", "lang": "Python", "max_stars_repo_path": "nussl/separation/masks/mask_base.py", "max_stars_repo_name": "gomoto/nussl", "max_stars_repo_head_hexsha": "5ff8899d2da3c7704465d5e9ab7969657ed83263", "max_stars_repo_licenses": ["MIT"], "max_sta...
using PlotUtils: zscale using PyCall using SiriusB fits = pyimport("astropy.io.fits") pro = pyimport("proplot") # rcParams pro.rc["image.origin"] = "lower" pro.rc["image.cmap"] = "inferno" pro.rc["grid"] = false data_cube = fits.getdata(datadir("epoch_2020nov21", "processed", "2020nov21_sirius-b_cube_calib.fits")) f...
{"hexsha": "dda4a0a6247bf4573308e735fa61e643aac6ebf1", "size": 562, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "paper/figures/spike.jl", "max_stars_repo_name": "mileslucas/sirius-b", "max_stars_repo_head_hexsha": "eb0bc6fa31836506bf755662677e00842db92358", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_...
""" This script is working demo of our project """ import numpy as np import cv2 from timer import Timer from framesandoflow import frames_downsample, images_crop, frames2flows from videocapture import video_start, frame_show, video_show, video_capture from datagenerator import VideoClasses from model_i3d ...
{"hexsha": "51302395a37a2578563ff00f0046f60c464e659f", "size": 3504, "ext": "py", "lang": "Python", "max_stars_repo_path": "livedemo.py", "max_stars_repo_name": "SocialHelpers/Inception3d_for_Indian_Sign_language", "max_stars_repo_head_hexsha": "c48cd95fd1b87b25ba5aba6da12f9bf7462311bf", "max_stars_repo_licenses": ["MI...
import NetworkLayer import Utils from NetworkConfig import NetworkConfig from NetworkPerformanceTuner import NetworkPerformanceTuner from NeuralNetworkMLP import NeuralNetwork import numpy as np nodes_per_layer = [3,2] weights = 0 def weight_provider(num): return np.arange(num) config = NetworkConfig(nodes_per_...
{"hexsha": "8a086c96fd517496e046d9a953daa6700fc103f5", "size": 1258, "ext": "py", "lang": "Python", "max_stars_repo_path": "smoketest.py", "max_stars_repo_name": "WayEq/NeuralNetworkMLP", "max_stars_repo_head_hexsha": "17f6637c4f12b219a1249c18431b1f81eb14e6ff", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import matplotlib.pyplot as plt import numpy as np from StringUtil import StringUtil as String class GraphUtil: """Contains utility methods used for plotting graphs""" def __init__(self): self.labels = [ "Time (Milliseconds)", "Time" ,"P1", "P2", "P3", "P4", "P5", "P6", "P7", "P8", "P9"] #sa...
{"hexsha": "744025af44412b6d3c08c5faf2c9bf6b4cbfdd6a", "size": 3339, "ext": "py", "lang": "Python", "max_stars_repo_path": "GraphUtil.py", "max_stars_repo_name": "AcerNoobchio/CSCI5957MachineLearningPhase1", "max_stars_repo_head_hexsha": "a90d28b2013f4f94870efd2e160f57e6aac88069", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/bin/env python3 import argparse, os import pandas as pd import numpy as np from tuba_seq.shared import logPrint from pathlib import Path tuba_seq_dir = os.path.dirname(__file__) ############################## Input ######################################### parser = argparse.ArgumentParser( description="Cons...
{"hexsha": "5a6e774f56a903e6764f0f1531d44dcba2e49a13", "size": 3799, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/combine_mutation_tallies.py", "max_stars_repo_name": "petrov-lab/tuba-seq", "max_stars_repo_head_hexsha": "d257988659f79c2fecfec72b1d7fe260c245b7dc", "max_stars_repo_licenses": ["MIT"], "max_s...
# very slow (even on TPU :( ) import os from IPython.display import clear_output !pip install distrax optax dm-haiku clear_output() try: import brax except ImportError: !pip install git+https://github.com/google/brax.git@main clear_output() import brax if 'COLAB_TPU_ADDR' in os.environ: from jax.tools imp...
{"hexsha": "196a64fcadcfd78181ed98b2ac1f3ff3391c0b57", "size": 10363, "ext": "py", "lang": "Python", "max_stars_repo_path": "ppo/ppo_brax.py", "max_stars_repo_name": "gebob19/rl_with_jax", "max_stars_repo_head_hexsha": "a30df06de3035c460e5339611974664a2130ca6e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5,...
# -*- coding:utf-8 -*- # # Import OBJ files # # External dependencies import os import numpy as np import MeshToolkit as mtk # Import a mesh from a OBJ / SMF file def ReadObj( filename ) : # Initialisation vertices = [] faces = [] normals = [] colors = [] texcoords = [] material = "" # Read each line in the ...
{"hexsha": "536094bbd94a3e2ca26e0561a2f968cc1c84141e", "size": 1285, "ext": "py", "lang": "Python", "max_stars_repo_path": "MeshToolkit/File/Obj.py", "max_stars_repo_name": "microy/MeshToolkit", "max_stars_repo_head_hexsha": "df239e73fcd78c726e14c6b92eef7318da5e4297", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np from brancher.standard_variables import DirichletVariable, GeometricVariable, Chi2Variable, \ GumbelVariable, HalfCauchyVariable, HalfNormalVariable, NegativeBinomialVariable, PoissonVariable, StudentTVariable, UniformVariable, BernoulliVariable ## Distributions and samples ## a = DirichletVari...
{"hexsha": "9971a8bb2ab871a7aec394d81495abc76c7f7a88", "size": 1287, "ext": "py", "lang": "Python", "max_stars_repo_path": "development_playgrounds/distributions_test.py", "max_stars_repo_name": "ai-di/Brancher", "max_stars_repo_head_hexsha": "01d51137b0e6fc81512994c21cc3a19287353767", "max_stars_repo_licenses": ["MIT"...
import numpy as np from sklearn.model_selection import train_test_split import funcy from tabulate import tabulate import coloredlogs, logging from glob import glob import itertools, os, json, urllib.request from tqdm import tqdm from os.path import join as opj import cv2 coloredlogs.install() logging.basicConfig(form...
{"hexsha": "1a641e7251a21a4ba61b2d79208e5a0ee17eaef0", "size": 7293, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "jichengYUAN/mmdetectionCust", "max_stars_repo_head_hexsha": "a45bfffc101ed4c901b6c9a07ed67629a3413091", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
## # This software was developed and / or modified by Raytheon Company, # pursuant to Contract DG133W-05-CQ-1067 with the US Government. # # U.S. EXPORT CONTROLLED TECHNICAL DATA # This software product contains export-restricted data whose # export/transfer/disclosure is restricted by U.S. law. Dissemination # to non...
{"hexsha": "6f1f9754bb7f6d41b30e4a4c10cead5e654ca04e", "size": 2743, "ext": "py", "lang": "Python", "max_stars_repo_path": "edexOsgi/com.raytheon.edex.plugin.gfe/utility/cave_static/user/GFETEST/gfe/userPython/smartTools/ExUtil1.py", "max_stars_repo_name": "srcarter3/awips2", "max_stars_repo_head_hexsha": "37f31f5e8851...
SUBROUTINE ssmied c c PROCESS SSMIGR c ------- ------ c c Document date: c c Split-Step Migration c c Reference: Stoffa et al., Split-step Fourier Migration, c Geophysics,55,p.410-421,1990. c c This process ...
{"hexsha": "0ac0e7b940a7a24deccdfc334e6c5febc94f3e0b", "size": 18842, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ssmied.f", "max_stars_repo_name": "apthorpe/sioseis", "max_stars_repo_head_hexsha": "28965a8b4a5b3ffaf169588dd1a385a1f9c9ccce", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 3, ...
from itertools import product from astropy import units as u, constants as const import numpy as np from ..nuclear import (nuclear_binding_energy, nuclear_reaction_energy) import pytest def test_nuclear_binding_energy(): assert nuclear_binding_energy('p') == 0 assert nuclear_binding_energy('n') == 0 asse...
{"hexsha": "b862aca605c65c44b34d1b1c8f8fd983d7089eeb", "size": 2885, "ext": "py", "lang": "Python", "max_stars_repo_path": "plasmapy/atomic/tests/test_nuclear.py", "max_stars_repo_name": "ludoro/PlasmaPy", "max_stars_repo_head_hexsha": "69712cb40b8b588400301edfd6925d41d2f13eac", "max_stars_repo_licenses": ["BSD-2-Claus...
\chapter{Data analytics} In this chapter I propose three hypotheses, each to be supported by analysis in the coming sections. The hypotheses are: \begin{enumerate} \item Skedge's differences from and additions to CDCS are \textbf{usable and have real need}. \item Skedge’s \emph{navigations-per-add} demonstrate ...
{"hexsha": "81317462983fc82f33631c1934a4124689aa3b70", "size": 838, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "analytics.tex", "max_stars_repo_name": "dingbat/skedge-thesis", "max_stars_repo_head_hexsha": "b5c89fe83f59adc0dd389e9712930ce26aa92824", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "ma...
#include "cache.hpp" #include "tools.hpp" #include <yaml-cpp/yaml.h> #include <boost/filesystem/fstream.hpp> #include <boost/filesystem/operations.hpp> #include <sstream> namespace charge { namespace { void write_info( std::string const & hostname, boost::filesystem::path const & script_abspath, boo...
{"hexsha": "e812a42501c79fdfd27b5b106a8f54a398234e4d", "size": 2152, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "charge_engine/src/cache.cpp", "max_stars_repo_name": "philtherobot/quickc", "max_stars_repo_head_hexsha": "9ade79ce22856e968543f3d443d9b13e9d30afcb", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import cv2 import numpy as np def getLocation( min_point: tuple, max_point: tuple ) -> tuple: """Gets the bottom center location from the bounding box of an occupant.""" # Unpack the tuples into min/max values xmin, ymin = min_point xmax, ymax = max_point # Take midpoint of x-coordinate and ymax fo...
{"hexsha": "03ec3f78a35d8ec505e001209f8ad07dc93ed702", "size": 12103, "ext": "py", "lang": "Python", "max_stars_repo_path": "testing/transform/transform_test.py", "max_stars_repo_name": "cac765/ee486-capstone-team10", "max_stars_repo_head_hexsha": "fdc986e12c31df91f59ded40ba5822e629a03dcd", "max_stars_repo_licenses": [...
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # Written by Bin Xiao (Bin.Xiao@microsoft.com) # ------------------------------------------------------------------------------ from __future__...
{"hexsha": "86ada66e46deab1838a537b97e60241d50e4dad5", "size": 4353, "ext": "py", "lang": "Python", "max_stars_repo_path": "pose_estimation/demo.py", "max_stars_repo_name": "padeler/human-pose-estimation.pytorch", "max_stars_repo_head_hexsha": "9093d1a0083ab593ae91d1d36348e501f4181caa", "max_stars_repo_licenses": ["MIT...
import numpy as np import os import json from keras.layers import Input, Lambda, Conv2D, MaxPooling2D, Dropout, Dense, Flatten, RNN, Reshape, Permute, Dot, LSTM, Softmax from keras.layers import LeakyReLU, UpSampling2D, Conv2DTranspose, Multiply, Activation,TimeDistributed from keras.layers.normalization import BatchN...
{"hexsha": "b2f5fc2ec4887433057e7477e8135cb930edfa58", "size": 30197, "ext": "py", "lang": "Python", "max_stars_repo_path": "apnet/model.py", "max_stars_repo_name": "pzinemanas/APNet", "max_stars_repo_head_hexsha": "5b44ced037c94d087befc578a5e922f963074e2d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8, "ma...
import numpy as np def strategy(history, memory): n = history.shape[1] if n == 0: return 1, np.array([0] * 16) elif n >= 2: olderMove = 2 * history[0, -2] + history[1, -2] recentMove = 2 * history[0, -1] + history[1, -1] memory[4 * olderMove + recentMove] += 1 # measure...
{"hexsha": "105d3ffefd4f78ebca6b5a4a5f5c5610cf68758b", "size": 912, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/st3v3nmw/Absolution3679.py", "max_stars_repo_name": "usedToBeTomas/PrisonersDilemmaTournament", "max_stars_repo_head_hexsha": "b5ce72e4e0b943dd2fa8cca35a191bd3b4c4d5aa", "max_stars_repo_licens...
[STATEMENT] lemma fMax_ffilter_less: "x |\<in>| P \<Longrightarrow> x < n \<Longrightarrow> fMax (ffilter (\<lambda>i. i < n) P) < n" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>x |\<in>| P; x < n\<rbrakk> \<Longrightarrow> fMax (ffilter (\<lambda>i. i < n) P) < n [PROOF STEP] by (metis fMax_in ffilter_e...
{"llama_tokens": 153, "file": "Formula_Derivatives_FSet_More", "length": 1}
create table categories ( id integer not null, catname varchar(40) not null, primary key(id) ); create table quotes ( id integer not null, cid integer not null, author varchar(100), quoname varchar(250) not null, primary key(id) );
{"hexsha": "432a7af7cbe2f3b1c50edeb057fedb2125e30baa", "size": 259, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Module 3/Chapter09/apt.jl", "max_stars_repo_name": "PacktPublishing/Julia-High-Performance-Programming", "max_stars_repo_head_hexsha": "861d655d163d8b87bb05478bfd255735b9263d60", "max_stars_repo_lic...
using Documenter, LiveDisplay makedocs(; modules=[LiveDisplay], format=Documenter.HTML(), pages=[ "Home" => "index.md", ], repo="https://github.com/tkf/LiveDisplay.jl/blob/{commit}{path}#L{line}", sitename="LiveDisplay.jl", authors="Takafumi Arakaki", ) deploydocs(; repo="githu...
{"hexsha": "50959ea055dd7816f48d816eb54212fc34d615c5", "size": 349, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "tkf/LiveDisplay.jl", "max_stars_repo_head_hexsha": "73811dc298baad24ecf072747b8e5ef39f321455", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
[STATEMENT] lemma execn_dynCall_Normal_elim: assumes exec: "\<Gamma>\<turnstile>\<langle>dynCall init p return c,Normal s\<rangle> =n\<Rightarrow> t" assumes "\<Gamma>\<turnstile>\<langle>call init (p s) return c,Normal s\<rangle> =n\<Rightarrow> t \<Longrightarrow> P" shows "P" [PROOF STATE] proof (prove) goal...
{"llama_tokens": 403, "file": "Simpl_Semantic", "length": 5}
from pathlib import Path import sys from typing import Tuple import numpy as np # type: ignore def calc_epsilon(gamma_bin: str) -> Tuple[str, int]: """Using XOR operation to invert gamma and return binary and decimal form.""" gamma_dec = int(gamma_bin, base=2) # apply XOR operator inverse_gamma = ga...
{"hexsha": "94f15b4d9f8e7e20a212d2cc115977280ac1b5b8", "size": 2542, "ext": "py", "lang": "Python", "max_stars_repo_path": "03-december/run_diagnostics.py", "max_stars_repo_name": "acatovic/AoC2021", "max_stars_repo_head_hexsha": "aae151c73ab9c21c69e39d95126b9ffdd98e462e", "max_stars_repo_licenses": ["MIT"], "max_stars...
# -*- coding: utf-8 -*- ############################################################################### # Copyright (c), Forschungszentrum Jülich GmbH, IAS-1/PGI-1, Germany. # # All rights reserved. # # This file is part of the Masci-tools package. ...
{"hexsha": "e58ec3a6df4962ab6852ce0d70cb4b2177f83e47", "size": 14472, "ext": "py", "lang": "Python", "max_stars_repo_path": "masci_tools/vis/kkr_plot_dos.py", "max_stars_repo_name": "soumyajyotih/masci-tools", "max_stars_repo_head_hexsha": "e4d9ea2fbf6e16378d0cbfb8828a11bdb09c2139", "max_stars_repo_licenses": ["MIT"], ...
module AllStdLib where -- Ensure that the entire standard library is compiled. import README open import Data.Unit.Polymorphic using (⊤) open import Data.String open import IO using (putStrLn; run) open import IO.Primitive using (IO; _>>=_) import DivMod import HelloWorld import HelloWorldPrim import ShowNat import...
{"hexsha": "92f5e8d2ef197db79b19b6224155c8a5b42fc84d", "size": 608, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Compiler/with-stdlib/AllStdLib.agda", "max_stars_repo_name": "shlevy/agda", "max_stars_repo_head_hexsha": "ed8ac6f4062ea8a20fa0f62d5db82d4e68278338", "max_stars_repo_licenses": ["BSD-3-Clause"...
from functools import partial import os from pathlib import Path import warnings import numpy as np import xarray as xr from . import arakawa_points as akp from .domcfg import open_domain_cfg from .tools import _dir_or_files_to_files def nemo_preprocess(ds, domcfg): """ Preprocess function for the nemo file...
{"hexsha": "983579b6827a1deed0e9958e46040e34d0953cd3", "size": 4094, "ext": "py", "lang": "Python", "max_stars_repo_path": "xnemogcm/nemo.py", "max_stars_repo_name": "rcaneill/xnemogcm", "max_stars_repo_head_hexsha": "3b1c93d2d09c442a4440f47cab956e2ff89d25d8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 5, "...
from __future__ import division from qm.columbus.columbus import Columbus from misc import data, amu_to_au, call_name import os, shutil, re import numpy as np class MRCI(Columbus): """ Class for MRCI method of Columbus program :param object molecule: Molecule object :param string basis_set: Basis ...
{"hexsha": "d742f05b6861bbe8edb22e59bd261c76c0486f50", "size": 19774, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/qm/columbus/mrci.py", "max_stars_repo_name": "hkimaf/unixmd", "max_stars_repo_head_hexsha": "616634c720d0589fd600e3268afab9da957e18bb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# coding=utf-8 from __future__ import print_function import numpy as np import tensorrt as trt import pycuda.driver as cuda import pycuda.autoinit from PIL import ImageDraw import cv2 import math import sys, os import common def load_engine(trt_runtime, plan_path): with open(engine_path, 'rb') as f: engi...
{"hexsha": "9af525c7fd5f9b688f0b7ede6e6332084edbe720", "size": 5150, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorrt_optimize/inference_trt.py", "max_stars_repo_name": "saicoco/SA-Text", "max_stars_repo_head_hexsha": "353a73d84246a54962f3b7ffb7c7ca2e35f235e8", "max_stars_repo_licenses": ["MIT"], "max_st...
\section{Introduction} \label{sec:intro} We consider a food delivery application with three types of users: \begin{itemize}[noitemsep] \item \textbf{Customers}: can place orders and check their status \item \textbf{Administrators}: can insert new products and change their availability \item \textbf{Delive...
{"hexsha": "e46dd933dc99776ea1379c5239db92f8d1811897", "size": 2443, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "report/sections_report/introduction.tex", "max_stars_repo_name": "fuljo/pub-sub-delivered", "max_stars_repo_head_hexsha": "7dfe57bdf7aaaddd7aa069f3581517d7298c8b6d", "max_stars_repo_licenses": ["MIT...
import os import sys import time import torch import torch.nn as nn import random import numpy as np import torchvision.transforms as transforms FILE_DIR = os.path.dirname(os.path.abspath(__file__)) DATA_ROOT = os.path.join(FILE_DIR, '../../../data') sys.path.append(os.path.join(FILE_DIR, '../')) sys.path.append(os.pa...
{"hexsha": "fae76c8d74e47c824e067609790c8f64a424bb8f", "size": 4020, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/cifar/defense/base.py", "max_stars_repo_name": "DingfanChen/RelaxLoss", "max_stars_repo_head_hexsha": "d21c82dee7016cd0cb6688a408104eeb0d832790", "max_stars_repo_licenses": ["MIT"], "max_st...
/- Copyright © 2018 François G. Dorais. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. -/ import .basic .cons fin.extra variables {α : Type*} [dlo : decidable_linear_order α] include dlo open tup definition tup.max : Π {n : ℕ}, α ^ (n+1) → α | 0 xs := xs.head | (n+1) xs := ...
{"author": "fgdorais", "repo": "tup", "sha": "ac4a2f8ca2ccc8aea091498439a0a47d43ac4700", "save_path": "github-repos/lean/fgdorais-tup", "path": "github-repos/lean/fgdorais-tup/tup-ac4a2f8ca2ccc8aea091498439a0a47d43ac4700/src/tup/minmax.lean"}
# coding=utf-8 import time import h5py import numpy as np from util import utils ''' 将线上系统生成的所有视频帧特征转为h5格式,在本系统中只需要对视频库进行处理,不需要对查询视频特征进行转换, 只需要在result_generator.py脚本中直接产生结果。 ''' def bow2h5f(dir_name, file_feature_output): bows = utils.get_all_files_suffix(dir_name, '.bow') img_names = utils.get_all_files_s...
{"hexsha": "6b7d07b3d4bbd27f8b3a2ee6fb0d5655c66e4560", "size": 2189, "ext": "py", "lang": "Python", "max_stars_repo_path": "result_generator/result_feature_db/format_bow2h5f.py", "max_stars_repo_name": "shijack/feature_extract", "max_stars_repo_head_hexsha": "2c45750ea42a30a1f0b5cbe305edc4c8ab0461d7", "max_stars_repo_l...
# Copyright 2018 Xanadu Quantum Technologies 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 agre...
{"hexsha": "6653d97e27767deeca60bfd165fd983fca24fa54", "size": 28712, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_simulator_device.py", "max_stars_repo_name": "kalufinnle/pennylane-cirq", "max_stars_repo_head_hexsha": "c239239a661cd01adb671ad7b7254a2fa3684c6b", "max_stars_repo_licenses": ["Apache-...
# Copyright 2020 The TensorFlow Probability Authors. # # 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 o...
{"hexsha": "92e637b649624848e47501d02d9472e6cc8c2b97", "size": 4071, "ext": "py", "lang": "Python", "max_stars_repo_path": "spinoffs/inference_gym/inference_gym/tools/stan/logistic_regression.py", "max_stars_repo_name": "mederrata/probability", "max_stars_repo_head_hexsha": "bc6c411b0fbd83141f303f91a27343fe3c43a797", "...
import copy import os import sys from collections import defaultdict import numpy as np import pandas as pd from abc import ABC from sklearn.metrics import auc from odin.classes import DatasetLocalization from odin.classes.analyzer_interface import AnalyzerInterface from odin.utils import get_root_logger from odin.u...
{"hexsha": "9a7380069793d183e138b82b12470464c1129e84", "size": 36255, "ext": "py", "lang": "Python", "max_stars_repo_path": "odin/classes/analyzer_localization.py", "max_stars_repo_name": "rnt-pmi/odin", "max_stars_repo_head_hexsha": "8cfddf04f964393ef30217aa5f4aa61229d7e811", "max_stars_repo_licenses": ["Apache-2.0"],...
#!/usr/bin/env python # %!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%# # %!%!% ------------------------------ FPTE_Setup_VASP---- ------------------------------- %!%!%# # %!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%!%...
{"hexsha": "2925f34e1be5fd8fc9b36be18223599ba5b267e3", "size": 24203, "ext": "py", "lang": "Python", "max_stars_repo_path": "build/lib/FPTE/FPTE_Setup_VASP.py", "max_stars_repo_name": "MahdiDavari/Elastic_Constants_Finite_pressures", "max_stars_repo_head_hexsha": "bba28acc7024710a253dd270f11a2e5adb252b3d", "max_stars_r...