text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
def min_max(numbers): return min(numbers), max(numbers) class Person: def __init__(self,name): self.name = name pass class Student(Person): def __init__(self, name, id): super().__init__(name) self.id = id pass import numpy as np import pandas as pd def nonpositives(x): ...
{"hexsha": "941bdddcb07fb6d3ea88ad678f3b28577f6cfd29", "size": 3029, "ext": "py", "lang": "Python", "max_stars_repo_path": "module1/src/test.py", "max_stars_repo_name": "gbrsouza/NLP", "max_stars_repo_head_hexsha": "a94f9ab21351b4592725fb4f11c0ed594622fc81", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ...
""" """ import numpy as np __all__ = ["bazin09", "karpenka12", "firth17", "bazin09_listarg", "karpenka12_listarg", "firth17_listarg", "_defined_models"] _defined_models = ["bazin09", "karpenka12", "firth17"] def bazin09(x, a, t_0, t_rise, t_fall): return a * np.exp(-(x - t_0) / t_fall) ...
{"hexsha": "ec076698b4e161ecafbeef71caf5a40ce65c0977", "size": 1428, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycocosn/models.py", "max_stars_repo_name": "RobFirth/pycoco", "max_stars_repo_head_hexsha": "1c9be662b6dd67f8be5423568bb3ecbff2979492", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
/* Copyright (c) 2010-2014, Delft University of Technology * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are * permitted provided that the following conditions are met: * - Redistributions of source code must retain the above copyright ...
{"hexsha": "5942811209d10c7d48666c735b694204f45d2192", "size": 5745, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Tudat/Astrodynamics/Ephemerides/UnitTests/unitTestKeplerEphemeris.cpp", "max_stars_repo_name": "JPelamatti/ThesisTUDAT", "max_stars_repo_head_hexsha": "b94ce35fb7c8fa44ae83238e296a979dfa3adfe8", "ma...
''' 2048 GAME PROJECT: AI Bot. Date created: 03/2022 Date edited: 04/2022 Author: Filip J. Cierkosz ''' import random import numpy as np import pygame from pygame.locals import * from time import sleep, time from graphics import GRID_COLOR, CELL_COLORS, GRID_FONT_COLOR, FONT_BOARD, FONT_SIZES, WINDOW_FO...
{"hexsha": "1005e468dd6ead31f860a1a3571830f7a05689d6", "size": 15092, "ext": "py", "lang": "Python", "max_stars_repo_path": "AI-Implementation/bot.py", "max_stars_repo_name": "chizo4/2048-Project", "max_stars_repo_head_hexsha": "34d062b4b4a5eb9d9ec55d3d8b6e876dcb2967da", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# # This file is part of KwarqsDashboard. # # KwarqsDashboard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3. # # KwarqsDashboard is distributed in the hope that it will be useful, # but...
{"hexsha": "c9cf9bcb0b35a18cc1a5624e7ae8aed236fcdbab", "size": 14404, "ext": "py", "lang": "Python", "max_stars_repo_path": "driver_station/src/common/image_capture.py", "max_stars_repo_name": "frc1418/2014", "max_stars_repo_head_hexsha": "2fc75b13efd5a986522a16e20ff0ccee66938724", "max_stars_repo_licenses": ["BSD-3-Cl...
#!/usr/bin/python # Copyright (C) 2010, 2011 by Eric Brochu # # 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 use, copy, mo...
{"hexsha": "c3e3e527d81ec6b4d050c740a815804ef64a3e81", "size": 18612, "ext": "py", "lang": "Python", "max_stars_repo_path": "ego/gaussianprocess/__init__.py", "max_stars_repo_name": "misterwindupbird/IBO", "max_stars_repo_head_hexsha": "17e502e4fab4b1c20abbe26c6ce8a258c32bf49a", "max_stars_repo_licenses": ["MIT"], "max...
# -*- coding: utf-8 -*- import time import numpy import quantarhei as qr from quantarhei import LabSetup from quantarhei.utils.vectors import X #, Y, Z ############################################################################### # # # PARAMETERS # # ##############################################################...
{"hexsha": "ba5d902553cb3248878f7dc1fa3f626d9823c703", "size": 5698, "ext": "py", "lang": "Python", "max_stars_repo_path": "quantarhei/wizard/examples/ex_035_2D_Vibronic.py", "max_stars_repo_name": "slamavl/quantarhei", "max_stars_repo_head_hexsha": "d822bc2db86152c418e330a9152e7866869776f7", "max_stars_repo_licenses":...
import torch import torch.nn as nn import numpy as np from transforms import * class PlanarFlow(nn.Module): def __init__(self, dim=20, K=16): super().__init__() self.transforms = nn.ModuleList([PlanarTransform(dim) for k in range(K)]) def forward(self, z, logdet=False): zK = z ...
{"hexsha": "245d67b4f2e79a8f5b738dadc8cea71c373b2cc4", "size": 848, "ext": "py", "lang": "Python", "max_stars_repo_path": "flows.py", "max_stars_repo_name": "kaiqi-ken/planar-flow-pytorch", "max_stars_repo_head_hexsha": "3761883bbb53a40f903b5840c18e772bfd3e3d99", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
function voxels = carveall( voxels, cameras ) %CARVEALL carve away voxels using all cameras % % VOXELS = CARVEALL(VOXELS, CAMERAS) simple calls CARVE for each of the % cameras specified % Copyright 2005-2009 The MathWorks, Inc. % $Revision: 1.0 $ $Date: 2006/06/30 00:00:00 $ for ii=1:numel(cameras); v...
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/26160-carving-a-dinosaur/SpaceCarving/+space...
import jieba import pandas as pd # import gensim import pickle as pkl import numpy as np import matplotlib.pyplot as plt train = pd.read_csv('../data/train_first.csv') train_line = train['Discuss'].values dict = {} for idx, line in enumerate(train_line): words = list(jieba.cut(line.strip().replace('\n',''))) ...
{"hexsha": "bde0bf2d94eaa93fdeafed109d58774be8fa56ee", "size": 758, "ext": "py", "lang": "Python", "max_stars_repo_path": "Analyse/process3.py", "max_stars_repo_name": "TwT520Ly/YUN-2020", "max_stars_repo_head_hexsha": "1abdfbe399dc841e64ae546b22eed6c17d58a6e0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
\section{Algorithms} In this section we will describe the randomized algorithms in detail, provide the corresponding computational complexity analysis, and state the main theoretical results that guarantee the accuracy of the approximation. We split this section in three main parts: Stage 1 \ref{sec:stage1} and Stage...
{"hexsha": "57f30c917031213f9c88e42a01fde935b14fe6ec", "size": 21485, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "report/sections/algorithms.tex", "max_stars_repo_name": "alexnowakvila/ProbAlgosProj", "max_stars_repo_head_hexsha": "819251313cb2b9ca4748892ee62f40c602453ddc", "max_stars_repo_licenses": ["MIT"], ...
import gsum as gm import pandas as pd import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.patches import Patch from sklearn.gaussian_process.kernels import RBF, WhiteKernel from stats_utils import * from matter import * import seaborn as sns import time from os import path mpl.r...
{"hexsha": "7c5ad9dd05212ef993942cf8561ad267a4e0e674", "size": 8861, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/populate_fig_database.py", "max_stars_repo_name": "buqeye/nuclear-matter-convergence", "max_stars_repo_head_hexsha": "6500e686c3b0579a1ac7c7570d84ffe8e09ad085", "max_stars_repo_licenses":...
[STATEMENT] lemma subd_0 [simp]: "subd p 0 = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. subd p 0 = 0 [PROOF STEP] by (induction p) auto
{"llama_tokens": 71, "file": null, "length": 1}
\section{Notes} \todo{\begin{enumerate} \item Merge this delta section - use for snippets \item Consider moving Code optimization out of intro \item Optimizable range is only a small part of this part \item Write a clear limitations section \end{enumerate} } \todo{Say how the baseline does not include halts, but h...
{"hexsha": "605e079d4a32d865f9b28725abf788ce6dfcfb1a", "size": 3471, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Paper/shadow.tex", "max_stars_repo_name": "csrhau/Iconoclast", "max_stars_repo_head_hexsha": "a77cf2604ea7687415e12ccae6ee79f57f7c4a57", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
{"hexsha": "ee5e4c058e693ab28ff269e9b5b71abd09b6cfaa", "size": 3309, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/game_example.py", "max_stars_repo_name": "moorugi98/hanabi-learning-environment", "max_stars_repo_head_hexsha": "3c294fe98b6764a5a700b15f1c407dc8c171b593", "max_stars_repo_licenses": ["Ap...
from glob import glob import os import cv2 import numpy as np from tqdm import tqdm from collections import defaultdict colors = [[128, 64, 128], [244, 35, 232], [70, 70, 70], [102, 102, 156], [190, 153, 153], [153, 153, 153], [250, 170, 30], [220, ...
{"hexsha": "8385e64081764db09d886fe8e2fde540879bec7b", "size": 2224, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/translate_labels.py", "max_stars_repo_name": "drkostas/SemiSeg-Contrastive", "max_stars_repo_head_hexsha": "af6b133400368911ef77f401b7673894fe6aa05c", "max_stars_repo_licenses": ["Apache-2.0...
/* * ****************************************************************************** * Copyright 2014-2016 Spectra Logic Corporation. 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. A copy of the License i...
{"hexsha": "1e99ff5c13cc5230f9482f8d24f5296605cd9536", "size": 20888, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/bulk_get.cpp", "max_stars_repo_name": "RachelTucker/ds3_c_sdk", "max_stars_repo_head_hexsha": "b0a32aef4ccc4eb87ed6ce4f08b3b7c01e047234", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
function arcsinh_values_test ( ) %*****************************************************************************80 % %% ARCSINH_VALUES_TEST demonstrates the use of ARCSINH_VALUES. % % Licensing: % % This code is distributed under the GNU LGPL license. % % Modified: % % 23 June 2007 % % Author: % % John Burk...
{"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_values/arcsinh_values_test.m"}
#include "redist.h" #include "../Log.h" #include "../Config.h" #include <map> #include <boost/foreach.hpp> #define foreach BOOST_FOREACH void Redistribution(GameState& state) { static bool redist = Config::Value<bool>("redist"); static bool use_future = Config::Value<bool>("redist.future"); if ( !redist ...
{"hexsha": "c36bf802f0fc5259e3db73998cbfd9eb4a209e49", "size": 4517, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/strategy/redist.cc", "max_stars_repo_name": "sigh/Planet-Wars", "max_stars_repo_head_hexsha": "7855ea11143ac97c32cd13bcac42d212c8ed3c30", "max_stars_repo_licenses": ["Apache-1.1"], "max_stars_cou...
MODULE m_kkintgr !------------------------------------------------------------------------------ ! ! MODULE: m_kkintgr ! !> @author !> Henning Janßen ! ! DESCRIPTION: !> Performs the Kramer-Kronig-Transformation to obtain the Green's function !> in the complex plane from the imaginary p...
{"hexsha": "b3877bdfcb8e0fe738d1adb39bbba91068a99e71", "size": 7883, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "greensf/kkintgr.f90", "max_stars_repo_name": "MRedies/FLEUR", "max_stars_repo_head_hexsha": "84234831c55459a7539e78600e764ff4ca2ec4b6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
from nvidia.dali.pipeline import Pipeline from nvidia.dali import fn import nvidia.dali.ops as ops import nvidia.dali.types as types import scipy.io.wavfile import numpy as np import math import json import librosa import tempfile import os from test_audio_decoder_utils import generate_waveforms, rosa_resample tmp_dir...
{"hexsha": "b52f86cd6353a191a0df54197744c1883a06a6fd", "size": 7168, "ext": "py", "lang": "Python", "max_stars_repo_path": "dali/test/python/test_operator_nemo_asr_reader.py", "max_stars_repo_name": "a-sansanwal/DALI", "max_stars_repo_head_hexsha": "83aeb96792d053f60dd4252b8efa0fc8fdd9012a", "max_stars_repo_licenses": ...
from pathlib import Path import pandas as pd import numpy as np def next_monday(date): return pd.date_range(start=date, end=date + pd.offsets.Day(6), freq='W-MON')[0] def get_relevant_dates(dates): wds = pd.Series(d.day_name() for d in dates) next_mondays = pd.Series(next_monday(d) for d in dates) rel...
{"hexsha": "7f08f62e7b776457185193eda0555588a3260b32", "size": 2136, "ext": "py", "lang": "Python", "max_stars_repo_path": "app_forecasts_de/code/data_preparation.py", "max_stars_repo_name": "QEDHamburg/covid19-forecast-hub-de", "max_stars_repo_head_hexsha": "0fa2daa6ebe4fcb3b91a9c5a852d86d1a36e6d9a", "max_stars_repo_l...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os from tempfile import mkdtemp from shutil import rmtree from nipype.testing import (assert_equal, example_data, skipif, assert_true) from nipype.algorithms.confounds import FramewiseDisplacement, ComputeDVARS import numpy as np nonitime = True try: import ni...
{"hexsha": "c41ed485a19cef6a4c8c42610d69d438a016dcb2", "size": 1375, "ext": "py", "lang": "Python", "max_stars_repo_path": "nipype/algorithms/tests/test_confounds.py", "max_stars_repo_name": "Conxz/nipype", "max_stars_repo_head_hexsha": "1281723ae56eacd103597ff4081a205583706e62", "max_stars_repo_licenses": ["Apache-2.0...
import os import shutil import unittest import numpy as np import bilby_pipe from bilby_pipe.input import Input from bilby_pipe.utils import BilbyPipeError, parse_args class TestParser(unittest.TestCase): def test_parser_defaults(self): example_prior_file = "tests/example_prior.prior" known_arg...
{"hexsha": "98b4b32cf19a7000ec44b68a40f24c0a93ff009c", "size": 8035, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/create_injection_test.py", "max_stars_repo_name": "Samanwaya1301/tidal-heating-bilby-pipe", "max_stars_repo_head_hexsha": "b495d4f3ffe3ef61a46ce5b87c826e10b087e2e1", "max_stars_repo_licenses...
import sys import os import numpy as np from PIL import Image from external_model import load_external_model, pred_by_external_model from PIL import ImageFile ImageFile.LOAD_TRUNCATED_IMAGES = True APS = 100; TileFolder = sys.argv[1] + '/'; CNNModel = sys.argv[2]; #CNNModel = '/home/shahira/quip_classification/NNFr...
{"hexsha": "027b1e467945350f04d7ed170c3a2e2af73f7b39", "size": 4642, "ext": "py", "lang": "Python", "max_stars_repo_path": "u24_lymphocyte/prediction/lymphocyte/pred_by_external_model.py", "max_stars_repo_name": "ShahiraAbousamra/til_classification", "max_stars_repo_head_hexsha": "cede5453cb46b9c168a1f50f76ded43f8ca3fc...
# Copyright (c) 2021, NVIDIA 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 i...
{"hexsha": "b259c2567dcfbc7013f1d5eec7ca924adf753c7e", "size": 2628, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/cugraph/tests/test_egonet.py", "max_stars_repo_name": "mike-wendt/cugraph", "max_stars_repo_head_hexsha": "1f0f14eba2e6253423b1a58ca38989261308df6c", "max_stars_repo_licenses": ["Apache-2.0...
import matplotlib.pyplot as plt import numpy as np from ROOT import TFile,TAxis,TH1,gROOT import os import numpy as np import pickle # from dataclasses import dataclass # @dataclass class PyHist: """ Basic wrapper for ROOT histogram Should contain no ROOT functionality, just a container for the information ...
{"hexsha": "c3ebdf3364e7f00596ee2e40a38828e565bbb24f", "size": 3813, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/heptools/histplot/PyHist_Class.py", "max_stars_repo_name": "ethansimpson285/HEPTools", "max_stars_repo_head_hexsha": "7ccb54d6264e693667d97966ab0cd6a4f815d120", "max_stars_repo_licenses": ["MI...
# Copyright 2020, Battelle Energy Alliance, LLC # ALL RIGHTS RESERVED import numpy as np def run(self,Input): t_shutdown = 10 # days repl_cost = 4.48 # M$ risk_free_rate = 0.03 hard_savings = 0. self.sm_npv_a = Input['sm_p_failure'] * t_shutdown + repl_cost + hard_savings self.sm_npv_b = self.sm_npv_a / (...
{"hexsha": "3ddb29dd25251f4f91fbceee35d7b8e971e888e3", "size": 399, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/MilestoneTestsSeptFY19/use_case_II/MC/seismic_modification.py", "max_stars_repo_name": "dgarrett622/LOGOS", "max_stars_repo_head_hexsha": "7234b8b5e80bc79526b4cbced7efd5ae482f7c44", "max_star...
[STATEMENT] lemma map_values_cong: assumes "\<And>x y. Mapping.lookup t x = Some y \<Longrightarrow> f x y = f' x y" shows "Mapping.map_values f t = Mapping.map_values f' t" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Mapping.map_values f t = Mapping.map_values f' t [PROOF STEP] proof - [PROOF STATE] proof (s...
{"llama_tokens": 689, "file": "Eval_FO_Ailamazyan", "length": 8}
import pandas as pd import numpy as np import yfinance as yf def book_to_market(): """ Calculates the book to market ratio (shareholders equity/ market cap) for every company based on the latest stock price and annual financial statement. :return: DataFrame with ratio for each company. "...
{"hexsha": "d53ef58aa587d920dcd7a992b24a728612323f42", "size": 24014, "ext": "py", "lang": "Python", "max_stars_repo_path": "strategies.py", "max_stars_repo_name": "TimBstn/Fundamental-Trading-Strategies", "max_stars_repo_head_hexsha": "b620c129a8826e3cf99ecf19eb2a32d63058e352", "max_stars_repo_licenses": ["MIT"], "max...
""" Use Gaussian distributions to randomly generate two sets. Then use bhatta_dist() on the sets. Compare the results to the theoretical Bhattacharyya distance for the distributions. The Bhattacharyya distance between two Gaussian distributions is given on this page: https://en.wikipedia.org/wiki/Bhattacharyya...
{"hexsha": "2fdfebe18856dd94f431455f647129433f854060", "size": 3153, "ext": "py", "lang": "Python", "max_stars_repo_path": "verification/bhatta_test.py", "max_stars_repo_name": "EricPWilliamson/bhattacharyya-distance", "max_stars_repo_head_hexsha": "d67498d58bed342151c9d820a520254a503abdc8", "max_stars_repo_licenses": ...
import torch.utils.data as data from torchvision import datasets, models, transforms IN_SIZE = 224 import pickle from PIL import Image import matplotlib.pyplot as plt import os import os.path import sys import numpy as np import torch project_root = os.getcwd() data_root = "%s/data"%project_root def get_image_attribu...
{"hexsha": "ed0a48e2686c7720cd6b7206fc3a55a7eeb6762a", "size": 3470, "ext": "py", "lang": "Python", "max_stars_repo_path": "res/loader/multi_attribute_loader_file_list_ilab.py", "max_stars_repo_name": "GregoryEHunter/generalization_to_OOD_category_viewpoint_combinations", "max_stars_repo_head_hexsha": "52aacbb3420639ca...
## # @file Placer.py # @author Yibo Lin (DREAMPlace), Rachel Selina Rajarathnam (DREAMPlaceFPGA) # @date Sep 2020 # @brief Main file to run the entire placement flow. # import matplotlib matplotlib.use('Agg') import os import sys import time import numpy as np import logging # for consistency between python2...
{"hexsha": "cc17d54c09603aa8a280b2c8ce1048f9611a9171", "size": 8787, "ext": "py", "lang": "Python", "max_stars_repo_path": "dreamplacefpga/Placer.py", "max_stars_repo_name": "rachelselinar/DREAMPlaceFPGA", "max_stars_repo_head_hexsha": "b8dd961718144a7c2471dd670379c3d1923171f9", "max_stars_repo_licenses": ["BSD-3-Claus...
import numpy as np import pandas as pd import importlib from qlib.data.ops import ElemOperator, PairOperator from qlib.config import C from qlib.data.cache import H from qlib.data.data import Cal from qlib.contrib.ops.high_freq import get_calendar_day class DayLast(ElemOperator): """DayLast Operator Paramete...
{"hexsha": "175f4f66be772e35d95ab0e9d4eaec76b66c732c", "size": 4524, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/highfreq/highfreq_ops.py", "max_stars_repo_name": "wan9c9/qlib", "max_stars_repo_head_hexsha": "cc95099d7696ca850205b8ca220a99fba35a637a", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
""" Tonti Diagrams This file includes a framework for constructing and evaluating Tonti diagrams. Tonti diagrams are stored as ACSets, and have an imperative interface for describing physical variables and the relationships between them. This tooling also lets a Tonti diagram be converted to a vectorfield, allowing fo...
{"hexsha": "7c049720c9bf73dd36f55886302992897b0ee06d", "size": 17536, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/TontiDiagrams.jl", "max_stars_repo_name": "mgatlin3-gtri/Decapods.jl", "max_stars_repo_head_hexsha": "793c5992f2219e5d066a437ae9a719a8ed809a23", "max_stars_repo_licenses": ["MIT"], "max_stars_...
""" This file generates the html for the Flood Risk Map. """ # ------- # IMPORTS # ------- import geopandas as gpd # for loading/manipulating vector data from shapely.geometry import Polygon import rasterio # for loading/manipulating raster data import folium # for creating the interactive map import numpy as np ...
{"hexsha": "719429cc1f5c154a111f72aab29c09b625e8ceaf", "size": 15957, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/create_map.py", "max_stars_repo_name": "NatalieThurlby/useful_flood_data", "max_stars_repo_head_hexsha": "66b041ef5176239fd370209afd0bbf910806ffdc", "max_stars_repo_licenses": ["MIT"], "m...
import ccxt import numpy as np import pandas as pd import matplotlib.pyplot as plt from utils.constants import OHLCV_COLS class BinanceAPICallException(Exception): pass class IndicatorNotFoundException(Exception): pass exchange = ccxt.binance() def get_price_by_coin_pair(pair: str = "BTC/USDT") -> floa...
{"hexsha": "b29ad5c9b25680ff1103dfeca85191e4bead9c3d", "size": 3024, "ext": "py", "lang": "Python", "max_stars_repo_path": "technical_analysis/moving_averages.py", "max_stars_repo_name": "elmesaoudee/signarly", "max_stars_repo_head_hexsha": "b642ea3a6d6064e6e9705115880cc93072c4ccb3", "max_stars_repo_licenses": ["MIT"],...
import numpy as np import nimfa V = np.random.rand(40, 100) pmfcc = nimfa.Pmfcc(V, seed="random_vcol", rank=10, max_iter=30, theta=np.random.rand(V.shape[1], V.shape[1])) pmfcc_fit = pmfcc()
{"hexsha": "93703c5327a3dc23e98491211b68f0e72f75163a", "size": 213, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/code/snippet_pmfcc.py", "max_stars_repo_name": "askerdb/nimfa", "max_stars_repo_head_hexsha": "3e3353e60d53fd409b53c46fde23f4f6fef64aaf", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_star...
# 2018-9-10 # 函数 import cv2 import numpy as np def resize(img, scale_factor): """ 缩小图像尺寸 """ return cv2.resize(img, (int(img.shape[1] * (1 / scale_factor)), int(img.shape[0] * (1 / scale_factor))), interpolation=cv2.INTER_AREA) def pyramid(image, scale=1.5, min_size=(200, 80)): """ 图像金字塔 ...
{"hexsha": "e1cd2602900333131ccf54f8a63393b163d018d0", "size": 2406, "ext": "py", "lang": "Python", "max_stars_repo_path": "Image/OpenCV/car_detect/func.py", "max_stars_repo_name": "YangXiaoo/NoteBook", "max_stars_repo_head_hexsha": "37056acad7a05b876832f72ac34d3d1a41e0dd22", "max_stars_repo_licenses": ["CNRI-Python", ...
## ---- load data ---- ## # data df<-read.table("rdata.csv", sep="\t", encoding="UTF-8", header=TRUE) # module names modules<-c("ALP1", "ALP2", "ALP3", "ALP4", "ALP5", "SWP", "MafI1", "MafI2", "MafI3", "GTI", "PS", "DBS", "TI1", "TI2", "TI3", "TI4", "AWS", "SWT") # weeks per sem wps <-c( 17, 13, 17, 13, ...
{"hexsha": "a02b00a666ff10887e84e3f9ffbfe163b5747a59", "size": 40139, "ext": "r", "lang": "R", "max_stars_repo_path": "survey/start.r", "max_stars_repo_name": "xconnect/fub.msc.empirical-evaluation", "max_stars_repo_head_hexsha": "7a995bfc8df23e43ed03b334d6c8bcb186129d78", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
import numpy as np import os import pandas as pd from load_paths import load_box_paths from datetime import date, timedelta, datetime datapath, projectpath, wdir,exe_dir, git_dir = load_box_paths() def load_sim_data(exp_name, region_suffix ='_All', input_wdir=None, fname='trajectoriesDat.csv', inpu...
{"hexsha": "c528aadc832c18f25d5d556c376e3bc7fae80ddc", "size": 22051, "ext": "py", "lang": "Python", "max_stars_repo_path": "processing_helpers.py", "max_stars_repo_name": "reeserich/covid-chicago", "max_stars_repo_head_hexsha": "88bdc556aebdd7e443e4756e7421160d230f5a01", "max_stars_repo_licenses": ["Apache-2.0"], "max...
import os import yaml import glob import numpy as np from hexrd import imageseries from PySide2.QtGui import QCursor from PySide2.QtCore import QObject, Qt, QPersistentModelIndex, QThreadPool, Signal from PySide2.QtWidgets import QTableWidgetItem, QFileDialog, QMenu, QMessageBox from hexrd.ui.async_worker import Asy...
{"hexsha": "6499e3654ac695d909bce9dd12cc93e07f8450b3", "size": 24151, "ext": "py", "lang": "Python", "max_stars_repo_path": "hexrd/ui/load_panel.py", "max_stars_repo_name": "psavery/hexrdgui", "max_stars_repo_head_hexsha": "2a02dff4284bdddc48aa0bb17473cc651e161759", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_sta...
#include <iostream> #include <fstream> #include <vector> #include <string> #include <boost/archive/text_oarchive.hpp> #include <boost/archive/text_iarchive.hpp> #include <boost/archive/binary_oarchive.hpp> #include <boost/archive/binary_iarchive.hpp> #include "featurizer.h" int main() { Featurizer* feat = new Fea...
{"hexsha": "65f491f81bf4e8d314028e088292ea1029eb27e8", "size": 734, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/serializetest.cpp", "max_stars_repo_name": "shurain/codesprint2014r1", "max_stars_repo_head_hexsha": "980b0191e9e90adc54778bdc5dbfbb41538e96f1", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
// Copyright John Maddock 2008. // Use, modification and distribution are subject to 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) // # include <pch.hpp> #ifndef BOOST_MATH_TR1_SOURCE # define BOOST_MATH_TR1_SOURCE #...
{"hexsha": "4f4efaa2ba872131fad2d0838858dc348ce8c3b4", "size": 654, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libs/math/src/tr1/cyl_bessel_if.cpp", "max_stars_repo_name": "zyiacas/boost-doc-zh", "max_stars_repo_head_hexsha": "689e5a3a0a4dbead1a960f7b039e3decda54aa2c", "max_stars_repo_licenses": ["BSL-1.0"], ...
import numpy import pylab import tables import math import matplotlib.transforms as mtransforms pylab.rc('text', usetex=True) # open HDF5 file lcFh = tables.openFile("s34-rte-slab_sol.h5") mu = lcFh.root.mu.read() muM = mu*0.0 for i in range(mu.shape[0]): muM[i] = -mu[mu.shape[0]-i-1] muExtended = numpy.zeros( ...
{"hexsha": "eae2e0407983cb003278ce5e5f73d389b78f7ad4", "size": 2125, "ext": "py", "lang": "Python", "max_stars_repo_path": "sims/s34/s34-mkplots.py", "max_stars_repo_name": "ammarhakim/ammar-simjournal", "max_stars_repo_head_hexsha": "85b64ddc9556f01a4fab37977864a7d878eac637", "max_stars_repo_licenses": ["MIT", "Unlice...
C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * C * * C * copyright (c) 1999 by UCAR * C * * C * UNIVERSITY CORPORA...
{"hexsha": "0287df6a19803891fd9c3aa621e19c139a2d84d1", "size": 7519, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/omuse/community/qgmodel/src/fishpack4.1/test/tpoistg.f", "max_stars_repo_name": "ipelupessy/omuse", "max_stars_repo_head_hexsha": "83850925beb4b8ba6050c7fa8a1ef2371baf6fbb", "max_stars_repo_li...
import matplotlib.pyplot as plt import numpy as np import matplotlib.colors as colors def make_plots(): ''' A dummy function. ''' pass def plot_detected_planet_contrasts(planet_table,wv_index,detected,flux_ratios,instrument,telescope, show=True,save=False,ymin=1e-9,ymax=1e-4,xmin=0.,xmax=1.,...
{"hexsha": "0635b561796402814ff51cd4e08da51d9c081716", "size": 10358, "ext": "py", "lang": "Python", "max_stars_repo_path": "psisim/plots.py", "max_stars_repo_name": "abgibbs/psisim", "max_stars_repo_head_hexsha": "9b0a6ac4f134cabcd2b10a03e20b2fcb58c8afe7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
Require Export SfLib. Require Export HelperFunctions. Inductive bplustree (b: nat) (X:Type) : Type := | bptLeaf : list (nat * X) -> bplustree b X | bptNode : list (nat * (bplustree b X)) -> bplustree b X . Notation "[[ b , X | x , .. , y ]]" := (bptLeaf b X (cons x .. (cons y []) ..)) (at level 100, format ...
{"author": "nicolaidahl", "repo": "BPlusTrees", "sha": "f017e4d3a334f72e1fd1cfb777e5bdd78cd9ca49", "save_path": "github-repos/coq/nicolaidahl-BPlusTrees", "path": "github-repos/coq/nicolaidahl-BPlusTrees/BPlusTrees-f017e4d3a334f72e1fd1cfb777e5bdd78cd9ca49/code/InductiveDataTypes.v"}
%!TEX root = ../../report.tex \subsection{Undiscovered City} % (fold) \label{sub:undiscovered_city} In \cite{Greuter2003} Stefan Greuter et al. presented a system that generates in real-time pseudo infinite virtual cities which can be interactively explored from a first person perspective. In their approach ``all geo...
{"hexsha": "b56a8502a95cbfdbf3b84e7c80b56b20b256e726", "size": 3204, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sections/Works/2-Undiscovered-City.tex", "max_stars_repo_name": "arturalkaim/v2ProceduralGeneration", "max_stars_repo_head_hexsha": "496ecd2bf9885b6fa634cb958b696dad7a2166b7", "max_stars_repo_licens...
import numpy as np import cv2 """使用均值漂移检测目标移动的例子 效果很不好 这种方式存在一个问题,就是窗口的大小不与跟踪帧中的目标大小一起变化 """ cap = cv2.VideoCapture(0) # 获得第一帧图像 ret, frame = cap.read() # 标志 ROI的区域 r, h, c, w = 10, 200, 10, 200 track_window = (c, r, w, h) # 提取roi区域 roi = frame[r:r + h, c:c + w] # 将图片转为HSV格式 hsv_roi = cv2.cvtColor(frame, cv2.COLOR_BGR...
{"hexsha": "4d334a9424fec2560832aa79f7776ad83b3b83af", "size": 1507, "ext": "py", "lang": "Python", "max_stars_repo_path": "my_cv/08/08_04.py", "max_stars_repo_name": "strawsyz/straw", "max_stars_repo_head_hexsha": "db313c78c2e3c0355cd10c70ac25a15bb5632d41", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "ma...
import csv import collections import operator from csv import DictReader from datetime import datetime import argparse import pandas as pd from sklearn.model_selection import StratifiedKFold from itertools import islice import random import numpy as np def setup_seed(seed): np.random.seed(seed) random.seed(se...
{"hexsha": "4d10ef934d657a93e99d031973283906ecbe8345", "size": 11391, "ext": "py", "lang": "Python", "max_stars_repo_path": "ctr/encode/data_.py", "max_stars_repo_name": "JiaXingBinggan/FAB_expr", "max_stars_repo_head_hexsha": "354d274b28f4a9933695b82494d829c87531a772", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
import numpy as np from sklearn.dummy import DummyClassifier ################################################################################ def array2c (array, fmt = None): "Converts an array in a C string. fmt can be a %format, a callable or None" if fmt is None: fmt_ = lambda x: "%.20f" % x elif isins...
{"hexsha": "fd3e311f7300e9bcd79ba02717b49004a2eeb8af", "size": 2703, "ext": "py", "lang": "Python", "max_stars_repo_path": "scikinC/_tools.py", "max_stars_repo_name": "landerlini/scikinC", "max_stars_repo_head_hexsha": "c408e2b63a32eecefc514193a4483b9d95b8d0fa", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
import cv2 import numpy as np from open3d import PointCloud, Vector3dVector, draw_geometries import open3d as o3d import time import random from interaction import opt import sys brush_temp = None points = np.zeros((1, 3)) color = np.zeros((1, 3)) def pc_cube(pt1, pt2): x = np.linspace(pt1[0], pt2[0]) y = n...
{"hexsha": "10080abdeb8e06a358a6409d50ab452d2b648c06", "size": 6446, "ext": "py", "lang": "Python", "max_stars_repo_path": "gen3d.py", "max_stars_repo_name": "HarryXD2018/3DPainter", "max_stars_repo_head_hexsha": "d58e705c203eddd6e46007e6640543f7a4bf44d2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "max_...
# --- # jupyter: # jupytext: # formats: ipynb,py:percent # text_representation: # extension: .py # format_name: percent # format_version: '1.2' # jupytext_version: 1.1.7 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # %% import os import...
{"hexsha": "8b6d0ac15ac6918a33e708c221bec294fcc694a1", "size": 1870, "ext": "py", "lang": "Python", "max_stars_repo_path": "kernels/jpeg_io_test/jpeg_io_test.py", "max_stars_repo_name": "ar90n/siim-acr-pneumothorax-segmentation", "max_stars_repo_head_hexsha": "e9b88f0a023798431dfd76704047388ba81a86e3", "max_stars_repo_...
program persist implicit none ! Explicit types for blas calls integer, parameter :: i32 = 4 integer, parameter :: i64 = 8 integer, parameter :: f32 = kind(1.e0) integer, parameter :: f64 = kind(1.d0) real(f64) :: ddot ! Iteration variables integer(i32) i, j ! Physi...
{"hexsha": "5a643cd6514751b65f971effd4c4dc0b956c2481", "size": 2515, "ext": "f95", "lang": "FORTRAN", "max_stars_repo_path": "persist/persist.f95", "max_stars_repo_name": "jasondark/dissertation", "max_stars_repo_head_hexsha": "3e1117ef0d14aa8d659f80df3edde1c266815856", "max_stars_repo_licenses": ["Unlicense"], "max_st...
[STATEMENT] lemma Macaulay_list_Nil [simp]: "Macaulay_list [] = ([]::('t \<Rightarrow>\<^sub>0 'b::field) list)" (is "?l = _") [PROOF STATE] proof (prove) goal (1 subgoal): 1. Macaulay_list [] = [] [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. Macaulay_list [] = [] [PROOF STEP] have "length ?l...
{"llama_tokens": 912, "file": "Groebner_Bases_Macaulay_Matrix", "length": 11}
REBOL [ Title: "Builds a set of Red/System Float Tests to run on an ARM host" File: %build-arm-float-tests.r Author: "Peter W A Wood" Version: 0.1.0 License: "BSD-3 - https://github.com/dockimbel/Red/blob/master/BSD-3-License.txt" ] ;; This script must be run from the Red/system/tests dir ;; supress script...
{"hexsha": "d34fa8845227e262936e5700882f30fa199340b2", "size": 1655, "ext": "r", "lang": "R", "max_stars_repo_path": "system/tests/build-arm-float-tests.r", "max_stars_repo_name": "7hi4g0/red", "max_stars_repo_head_hexsha": "a9f561552696d9922198bb41a19b2f9fc0052adc", "max_stars_repo_licenses": ["BSL-1.0", "BSD-3-Clause...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Jan 19 09:55:36 2017 @author: cheers """ import scipy.io as sio import matplotlib.pyplot as plt import numpy as np image_size = 32 num_labels = 10 def display_data(): print 'loading Matlab data...' train = sio.loadmat('train_32x32.mat') d...
{"hexsha": "989114d5e7ea12a03c96522b5a640b3dd6d2221f", "size": 1669, "ext": "py", "lang": "Python", "max_stars_repo_path": "svhn_data.py", "max_stars_repo_name": "Yisongsong/TFlearn-SVHN", "max_stars_repo_head_hexsha": "fd655853a0d8a495cebb35b035f2007581120332", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
#%% print(__doc__) import numpy as np import matplotlib.pyplot as plt from itertools import cycle from sklearn import svm, datasets from sklearn.metrics import roc_curve, auc from sklearn.model_selection import train_test_split from sklearn.preprocessing import label_binarize from sklearn.multiclass import OneVsRest...
{"hexsha": "7c66ce7f899f2c972f26f73fa13fd390b3f90e01", "size": 7184, "ext": "py", "lang": "Python", "max_stars_repo_path": "WR/WR_LASSO.py", "max_stars_repo_name": "mutazag/ilab1", "max_stars_repo_head_hexsha": "c37ae969d0fa13029ee08e7c0e102990e98e65b9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max...
# Script to replicate figure 4 and 5 using StatsBase, Statistics, LinearAlgebra, StatsPlots, XLSX, PrettyTables, GLM # -------------- Figure 4 -------------------------------------------------------------------------------------------------------------------------------- t_fig_4 = DataFrame(XLSX.readtable("clean/t_f...
{"hexsha": "8909334194c4a82f286e03941cc2c5f5717c2210", "size": 3960, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/figure_4_5_6.jl", "max_stars_repo_name": "forsthuber92/antras_chor_2018.jl", "max_stars_repo_head_hexsha": "7c520db82566fa75a6b2eb41ae0cab3ca26f522f", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np from research import wrappers from collections import defaultdict from torch.utils.tensorboard import SummaryWriter from research.define_config import env_fn import gym from gym.vector.async_vector_env import AsyncVectorEnv import torch as th from research.nets import net_map from jax.tree_util impor...
{"hexsha": "7b8e48cc38ef616416d6f26dfb023f9a162cb65a", "size": 6987, "ext": "py", "lang": "Python", "max_stars_repo_path": "research/rl/_base.py", "max_stars_repo_name": "matwilso/boxLCD", "max_stars_repo_head_hexsha": "7505e27f47e6694026303aa6cf12477959fc9fba", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2,...
# -*- coding: utf-8 -*- """ _____________________________________________________________________________ This file contain code for converting pretrain Pytorch model into TensorRT engine _____________________________________________________________________________ """ from icecream import ic import sys import os from...
{"hexsha": "b750d7a0aa7cb01b60126a174c02a9280320c80b", "size": 3259, "ext": "py", "lang": "Python", "max_stars_repo_path": "converters/torch2trt.py", "max_stars_repo_name": "k9ele7en/torch2tensorRT-dynamic-CRAFT-pytorch", "max_stars_repo_head_hexsha": "40191e9ac0d6f3a8d2763ab11d02d391f4880944", "max_stars_repo_licenses...
import os from tqdm import tqdm import numpy as np from PIL import Image, ImageDraw, ImageFont import cv2 import torch from torchvision import transforms from models.model_with_tcn_big import Model from utils.hwdb2_0_chars import char_set from utils.get_dgrl_data import get_pred_data from utils.pred_utils import get_a...
{"hexsha": "fe644e89a72d4bf2d85db3d724b66fedcc34674e", "size": 5641, "ext": "py", "lang": "Python", "max_stars_repo_path": "eval_hwdb_with_center_line.py", "max_stars_repo_name": "BruceHan98/OCHTPS", "max_stars_repo_head_hexsha": "5bee02bcbff36029cd47b4802178216f980a4298", "max_stars_repo_licenses": ["MIT"], "max_stars...
import numpy as np from scipy import interpolate import os import shutil import cv2 import argparse import _init_paths from datasets.json_dataset import JsonDataset from six.moves import cPickle as pickle import pdb np.seterr(divide='ignore',invalid='ignore') # windows: origin and multi-window 1,2,3 windows = [[-1024...
{"hexsha": "56e9761352fb5a83eaa38450dafcda33200d2220", "size": 5439, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/case_study.py", "max_stars_repo_name": "xixiobba/MVP-Net", "max_stars_repo_head_hexsha": "07bf00390080670b5d9a643b99f633419322a1ec", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 18...
import numpy as np import tensorflow as tf #import cv2 import matplotlib.pyplot as plt from PIL import Image import csv import math import os from keras.layers import Dense, Flatten, Lambda, Activation, MaxPooling2D, ELU, Dropout from keras.layers.convolutional import Conv2D from keras.models import Sequential, model_f...
{"hexsha": "08dd50406111d9a6ed28cdff4de6c4d01b250235", "size": 6420, "ext": "py", "lang": "Python", "max_stars_repo_path": "experimental/model.py", "max_stars_repo_name": "tho15/tfplusplus", "max_stars_repo_head_hexsha": "e151986f7d449ee5ccb440fbb947fbc64fd62f49", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import AnalysisFunctions as af import pandas as pd #defaultdict to use nested dictionaries from collections import defaultdict import matplotlib.pyplot as plt import statsmodels.api as sm import numpy as np import dill """ -------------------------------------------------------------------------------------------...
{"hexsha": "30a2c28ddb8c1fce4d3f3a6e587c15218c9e8515", "size": 16940, "ext": "py", "lang": "Python", "max_stars_repo_path": "AnalysisScriptNEW.py", "max_stars_repo_name": "Ciccuz/ensemble-flood-forecasting", "max_stars_repo_head_hexsha": "a3e1eb5cb3625bd4228513c73a7188c9cfafc3ef", "max_stars_repo_licenses": ["BSD-3-Cla...
#!/usr/bin/env python import unittest import numpy as np from plico.utils.decorator import override from plico.rpc.dummy_remote_procedure_call import DummyRpcHandler from plico.rpc.dummy_sockets import DummySockets from plico_dm.client.deformable_mirror_client import DeformableMirrorClient from plico_dm.utils.timeout i...
{"hexsha": "8ebf6336f72b5460565e8a9817db5a0b49af588f", "size": 5661, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/client/deformable_mirror_client_test.py", "max_stars_repo_name": "lbusoni/palpao", "max_stars_repo_head_hexsha": "95ffeb3733437ab9d96ea47c4a266f73142acca6", "max_stars_repo_licenses": ["MIT"]...
''' Pan_X tracker ==================== Made by: Jan-Jaap van de Velde Keys ---- ESC - exit ''' import numpy as np import cv2 import datetime lk_params = dict( winSize = (10, 10), maxLevel = 2, criteria = (cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 10, ...
{"hexsha": "b68ad1d4104abc88397659ce1b8876d1962a8dec", "size": 6889, "ext": "py", "lang": "Python", "max_stars_repo_path": "process_video.py", "max_stars_repo_name": "Jan-Jaap/gps_video_sync", "max_stars_repo_head_hexsha": "dcdbce948a1e37a15fbc497b8fcc8dae831a8b5b", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
const Vec2 = Vec{2, Float32} const Vec3 = Vec{3, Float32} const Vec4 = Vec{4, Float32} const iVec2 = Vec{2, Cint} const iVec3 = Vec{3, Cint} const iVec4 = Vec{4, Cint} const uVec2 = Vec{2, Cuint} const uVec3 = Vec{3, Cuint} const uVec4 = Vec{4, Cuint} function test_textures() N = 100 t1 = Texture(RGBA{N0f8}...
{"hexsha": "ce5262246f9399857f7c6d4376ba81f1973142da", "size": 1372, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/texture.jl", "max_stars_repo_name": "Tuebel/GLAbstraction.jl", "max_stars_repo_head_hexsha": "5dd969f1d1313d4ff3fc423de90feaa532d5f608", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
(* Author: Alexander Bentkamp, Universität des Saarlandes *) section \<open>Matrix Rank\<close> theory DL_Rank imports VS_Connect DL_Missing_List Determinant Missing_VectorSpace begin lemma (in vectorspace) full_dim_span: assumes "S \<subseteq> carrier V" and "finite S" and "vectorspace.dim K (span_vs S) = card S" ...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Evaluation/Jordan_Normal_Form/DL_Rank.thy"}
# -*- coding: utf-8 -*- """ Helper functions to visualize the data in plotly """ import plotly.graph_objs as go import numpy as np """Visualizaiton functions do the scatter plots in plotly since it seems to be more efficient.""" def get_plotly_scatter_plot( data_in: np.ndarray, lat_mat: np.ndarray, skip...
{"hexsha": "2467ce2f52a85b3063ff76cb21746cd18dd90592", "size": 2951, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pyrho/vis/plotly.py", "max_stars_repo_name": "mattmcdermott/pyrho", "max_stars_repo_head_hexsha": "7ab3bd893a8b310b8be61f33a1105b090a46cd32", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL"], ...
\section{Moves in Detail} \section{Multiclass Moves} \section{Multiclass Dabbler} \section{Multiclass Initiate} \section{Multiclass Master} For the purposes of these multiclass moves the cleric's commune and cast a spell count as one move. Likewise for the wizard's spellbook, prepare Spells, and cast a Spell. Whe...
{"hexsha": "0f15b67febb612633ff99459fec42fa5fc0b8132", "size": 6990, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex/Class_Moves_Discussion.tex", "max_stars_repo_name": "Hegz/DW-Latex", "max_stars_repo_head_hexsha": "49a230f82fdeab7faa7c736ef81ef13266ac399d", "max_stars_repo_licenses": ["CC-BY-3.0"], "max_star...
import numpy as np from Utils.Data.DatasetUtils import is_test_or_val_set, get_train_set_id_from_test_or_val_set, \ get_test_or_val_set_id_from_train from Utils.Data.Dictionary.TweetTextFeaturesDictArray import TweetTokenLengthFeatureDictArray, \ TweetTokenLengthUniqueFeatureDictArray from Utils.Data.Features....
{"hexsha": "7e52ebc151d6aff155b7245a742b18311eaaabe7", "size": 5593, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utils/Data/Features/Generated/CreatorFeature/CreatorFrequencyUniqueTokens.py", "max_stars_repo_name": "MaurizioFD/recsys-challenge-2020-twitter", "max_stars_repo_head_hexsha": "95dc024fb4f8777aa62...
[STATEMENT] lemma InvariantWatchesElNotifyWatchesLoop: fixes literal :: Literal and Wl :: "nat list" and newWl :: "nat list" and state :: State assumes "InvariantWatchesEl (getF state) (getWatch1 state) (getWatch2 state)" and "\<forall> (c::nat). c \<in> set Wl \<longrightarrow> 0 \<le> c \<and> c < length (getF...
{"llama_tokens": 60965, "file": "SATSolverVerification_AssertLiteral", "length": 232}
import numpy as np import scipy as sp import openmdao.api as om import random from . import VariableType def hyperplane_coefficients(points): A = np.c_[points[:, :-1], np.ones(points.shape[0])] B = points[:, -1] coeff, _, _, _ = sp.linalg.lstsq(A, B) return coeff def is_assertion_error(err, *args):...
{"hexsha": "e7ad3830bdb61702b4b8538d6abce23f65e4562f", "size": 1558, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/openmdao_omt/testing.py", "max_stars_repo_name": "ovidner/openmdao-utils", "max_stars_repo_head_hexsha": "dfc4041cac48bf7d1d4537c23a6d18c29339f6f3", "max_stars_repo_licenses": ["MIT"], "max_st...
"""Methods for computing, reading, and writing occlusion maps.""" import numpy import netCDF4 from gewittergefahr.gg_utils import file_system_utils from gewittergefahr.gg_utils import error_checking from ml4tc.machine_learning import neural_net from ml4tc.machine_learning import gradcam NUM_EXAMPLES_PER_BATCH = 32 E...
{"hexsha": "333ed325682e2682481bc098cdaccb1e3fee3957", "size": 15608, "ext": "py", "lang": "Python", "max_stars_repo_path": "ml4tc/machine_learning/occlusion.py", "max_stars_repo_name": "NOAA-GSL/ml4tc", "max_stars_repo_head_hexsha": "e9f8faa51e5bfb86b2a78648d7b1d0e61d09b6c0", "max_stars_repo_licenses": ["MIT"], "max_s...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jan 29 16:30:36 2020 @author: aparravi """ import seaborn as sns import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec import os import matplotlib.lines as lines import pandas as pd import numpy as np import scipy.stats as st from mat...
{"hexsha": "47104339ad9a180f917bb6bdcd546e859db0c97b", "size": 24781, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/resources/python/plotting/plot_errors.py", "max_stars_repo_name": "AlbertoParravicini/approximate-spmv-topk", "max_stars_repo_head_hexsha": "f98dd1846d81a5c21faa9af48bb5b531543424c7", "max_st...
"Update the header bounding box and count based on point data" function update!(h::LasHeader, pvec::Vector{T}) where T <: LasPoint x_min, y_min, z_min = Inf, Inf, Inf x_max, y_max, z_max = -Inf, -Inf, -Inf for p in pvec x, y, z = xcoord(p, h), ycoord(p, h), zcoord(p, h) if x < x_min ...
{"hexsha": "098dd6dee516e084703810f38109d567ca5ee747", "size": 800, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/util.jl", "max_stars_repo_name": "vernimmen/LasIO.jl", "max_stars_repo_head_hexsha": "bf4ae3f87c77fa2628da36c47e9bbdc049d2687e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 17, "max_s...
import numpy as np from sigmoid import sigmoid def predict(Theta1, Theta2, X): """ outputs the predicted label of X given the trained weights of a neural network (Theta1, Theta2) """ if X.ndim == 1: X = X.reshape(1, -1) # Useful values m = len(X) # ====================== YOUR CO...
{"hexsha": "2bdf2fc934208963eb168970500b5c921c3b8f4c", "size": 1320, "ext": "py", "lang": "Python", "max_stars_repo_path": "ex3/predict.py", "max_stars_repo_name": "junwon1994/Coursera-ML", "max_stars_repo_head_hexsha": "91e96c3c14c058cd6d745a4fada1baf40d91458f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3...
from sage.matrix.constructor import matrix from sage.matrix.matrix import is_Matrix from sage.rings.arith import legendre_symbol from sage.rings.integer_ring import ZZ def is_triangular_number(n): """ Determines if the integer n is a triangular number. (I.e. determine if n = a*(a+1)/2 for some natural num...
{"hexsha": "5d145b7688666198fa9ccc2f0dcf4576ea2b870f", "size": 5301, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sage/quadratic_forms/extras.py", "max_stars_repo_name": "bopopescu/classic_diff_geom", "max_stars_repo_head_hexsha": "2b1d88becbc8cb30962e0995cc78e429e0f5589f", "max_stars_repo_licenses": ["BS...
\documentclass[8pt]{beamer} \usepackage[utf8]{inputenc} \usetheme{default} \fontfamily{ppl} \usetheme{Antibes} \usecolortheme{spruce} \usefonttheme{serif} \title{APC Project: SimpleQuadTree} \author{Thomas Bellotti} \date{24 - 05 - 2019} %\usepackage{mathpazo} % add possibly `sc` and `osf` options \begin{documen...
{"hexsha": "b9a3b6ed69fd98bfd928a77ef16a48216f75733e", "size": 22159, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "presentation/slides.tex", "max_stars_repo_name": "tbellotti/SimpleQuadTree", "max_stars_repo_head_hexsha": "227b0ed368ca71849f9cdc0a58788d5b0dcfd2a0", "max_stars_repo_licenses": ["MIT"], "max_stars...
"""Scarf Algotihm util functions.""" import numpy as np def check_single_preflist(s, pair_list): assert(np.all([len(p) == 2 and p[0] == s for p in pair_list])) assert(pair_list[-1] == (s, -1)) def check_couple_preflist(c, pair_list): assert(np.all([len(p) == 3 and p[0] == c for p in pair_list])) assert(pai...
{"hexsha": "061d1f7a3ad6bd582a627a3b8030780a704907e4", "size": 3980, "ext": "py", "lang": "Python", "max_stars_repo_path": "scarf/utils.py", "max_stars_repo_name": "dwtang/scarf", "max_stars_repo_head_hexsha": "62b58c62b2bca0552aec95500fad2c6d9555a0d4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_...
/* BSD 3-Clause License Copyright (c) 2017, Alibaba Cloud All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditi...
{"hexsha": "17c716e8cc87f22fde9446aa5518712c4f2df168", "size": 3745, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/tablestore/util/random.cpp", "max_stars_repo_name": "TimeExceed/aliyun-tablestore-cpp-sdk", "max_stars_repo_head_hexsha": "f8d2fdf500badf70073dff4e21a5d2d7aa7d3853", "max_stars_repo_licenses": [...
\section{Performance Notes}
{"hexsha": "cc7f0ab35eacafd27440606861e7035bb0b1a31a", "size": 27, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "day-4/trio_score/trio_score/builds/assets/performance-notes.tex", "max_stars_repo_name": "DaviRaubach/intensive", "max_stars_repo_head_hexsha": "f2abce0f888f1231d0f8da6f24d41c921ea6aca1", "max_stars_r...
||| ported from https://github.com/pepijnkokke/FirstOrderUnificationInAgda module Unification import Data.Fin %default total %access public export ||| An identifier data Name = MkName String Eq Name where (MkName x) == (MkName y) = x == y ||| A term in an untyped lambda-calculus with variables indexed by `v`. ...
{"hexsha": "45e1bd5f7bc9b301080e069c7045b0e343afbfa9", "size": 6629, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "Unification.idr", "max_stars_repo_name": "sammthomson/IdrisUnification", "max_stars_repo_head_hexsha": "c3f2a8b63d4d57f0668f18caf505baf632e9b363", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
/***************************************************************************** * Licensed to Qualys, Inc. (QUALYS) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * QUALYS licenses this file to You under ...
{"hexsha": "778c620c8edf54dcd141f5f2119a7acdacc522e1", "size": 2418, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "predicate/validate_graph.cpp", "max_stars_repo_name": "crustymonkey/ironbee", "max_stars_repo_head_hexsha": "8350b383244e33b18c7a7b6ba989f67ffcbd945a", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 22 13:13:26 2017 @author: wd """ import io import matplotlib.pyplot as plt import matplotlib.lines as mlines import math import tensorflow as tf import numpy as np class CNN_SL: def __init__(self, sess, input_size, output_size, name='main'): ...
{"hexsha": "852fdec407bba33173502a37cf55fa3f6eac9ae4", "size": 5014, "ext": "py", "lang": "Python", "max_stars_repo_path": "PG_supervised_CNN_action_class.py", "max_stars_repo_name": "blackpigg/RL_landmark_finder_scale_action", "max_stars_repo_head_hexsha": "2005741bc0d54d4361331342d522859231ad1955", "max_stars_repo_li...
# -*- coding: utf-8 -*- """ Deep Learning with Python by Francois Chollet 4. Fundamentals of machine learning 4.4 Overfitting and underfitting """ from keras.datasets import imdb from keras.models import Sequential from keras.layers import Dense from keras.layers import Dropout from keras.regularizers import l2 import ...
{"hexsha": "0f465a43dafca4730f6b979607782409bb607bea", "size": 5294, "ext": "py", "lang": "Python", "max_stars_repo_path": "4_fundamentals_of_machine_learning/overfitting_and_underfitting.py", "max_stars_repo_name": "agaitanis/deep_learning_with_python", "max_stars_repo_head_hexsha": "590e4171c4e4e83136a8633665586e07f0...
from ast import Mod import numpy as np import scipy from multiprocessing import Pool from enum import Enum class Direction(Enum): N = 0 NE = 1 E = 2 SE = 3 S = 4 SW = 5 W = 6 NW = 7 transform = { 'N': (-1,0), 'NE': (-1,1), 'E': (0,1), 'SE': (1,1), 'S': (1,0), '...
{"hexsha": "f5ffc2ccc7aed4db119be4e39e6c925fdd5f7d69", "size": 1789, "ext": "py", "lang": "Python", "max_stars_repo_path": "boundary_refinement.py", "max_stars_repo_name": "Yusoi/mmdetection", "max_stars_repo_head_hexsha": "cbb5fb00f6e124fbb2c15e7e3438d7fa76b8850a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
#include <huaweicloud/eip/v2/EipClient.h> #include <huaweicloud/core/utils/MultipartFormData.h> #include <unordered_set> #include <boost/algorithm/string/replace.hpp> template <typename T> std::string toString(const T value) { std::ostringstream out; out << std::setprecision(std::numeric_limits<T>::digits10)...
{"hexsha": "99f10ca0c0be0b2bf0d1e4c6a90870074167307b", "size": 51440, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "eip/src/v2/EipClient.cpp", "max_stars_repo_name": "huaweicloud/huaweicloud-sdk-cpp-v3", "max_stars_repo_head_hexsha": "d3b5e07b0ee8367d1c7f6dad17be0212166d959c", "max_stars_repo_licenses": ["Apache...
import os, sys from csv import DictReader import numpy as np from cupcake.io.BioReaders import GMAPSAMReader REF_LENGTH = 29903 def process_sam_to_wig(sam_filename, output_wig, cov_threshold=200, meta_info=None): cov = np.zeros(REF_LENGTH) reader = GMAPSAMReader(sam_filename, True) f_sam = open(sam_filen...
{"hexsha": "6a46def310fa45132982b11000a1623fe140ef33", "size": 1970, "ext": "py", "lang": "Python", "max_stars_repo_path": "cosa/utils/process_sam_to_wig.py", "max_stars_repo_name": "Zuhayr-PacBio/CoSA", "max_stars_repo_head_hexsha": "a8bfccd301a367aac2858b48f13ca708833f6c8f", "max_stars_repo_licenses": ["BSD-3-Clause-...
#!/usr/bin/env python3 import numpy as np import h5py as h5 import argparse import os import subprocess import matplotlib.pyplot as plt parser = argparse.ArgumentParser() parser.add_argument('--npts', type=int, default=201, help='Number of gridpoints per dimension.') parser.add_argument('--target'...
{"hexsha": "17e7efd7f4fc01716cdf2e6e2bb61659678e5793", "size": 1345, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/scripts/eikonal2d_periodic.py", "max_stars_repo_name": "mcpca/fsm", "max_stars_repo_head_hexsha": "df4081fa0e595284ddbb1f30f20c5fb2063aa41f", "max_stars_repo_licenses": ["MIT"], "max_star...
# Testcase from example given in Mocking.jl's README @testset "readme" begin # Note: Function only works in UNIX environments. function randdev(n::Integer) @mock open("/dev/urandom") do fp reverse(read(fp, n)) end end n = 10 if Sys.isunix() result = randdev(n) #...
{"hexsha": "c6ad21d2610bf5868e5c7cd5026b3ab135b9beeb", "size": 1065, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/readme.jl", "max_stars_repo_name": "invenia/Patchwork.jl", "max_stars_repo_head_hexsha": "1eb1e7fb3783c0a78900d6880bcac368905a464f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 41, ...
import pyrtools as pyr import numpy class FakeSFPyr(pyr.SFpyr): def __init__(self, pyr, pind): self.pyr = list() self.pyrSize = pind # decompose pyr vector into each bands start = 0 for shape in pind: ind = numpy.prod(shape) self.pyr.append(pyr[star...
{"hexsha": "3167f427e2164b14ca66b2d26c2992f16cad2225", "size": 377, "ext": "py", "lang": "Python", "max_stars_repo_path": "texturesynth/fakesfpyr.py", "max_stars_repo_name": "tochikuji/pyTextureSynth", "max_stars_repo_head_hexsha": "6e1746fa1cc931ea083e3f04004a42a4894c762e", "max_stars_repo_licenses": ["MIT"], "max_sta...
import numpy as np import gym from gym import wrappers n_states = 40 max_episodes = 10000 initial_lr = 1.0 #Initial Learning rate min_lr = 0.003 discount_factor = 1.0 max_iterations = 10000 eps = 0.02 env_name = 'MountainCar-v0' env = gym.make(env_name) env.seed(0) np.random.seed(0) q_table = np.zeros((n_states, n_sta...
{"hexsha": "cbe170ff2c5dd74b0db866aaf5a0e6be34700e3b", "size": 2733, "ext": "py", "lang": "Python", "max_stars_repo_path": "MountainCar-v0/mountainCar-v0.py", "max_stars_repo_name": "spirosbax/HittingTheGym", "max_stars_repo_head_hexsha": "9bac19cb159d8e62d9518ee3703e6f18d32e5cb3", "max_stars_repo_licenses": ["MIT"], "...
%\documentclass[ebook,12pt,openany]{memoir} %ebook \documentclass[ebook,12pt,openany,onesided]{memoir} %physical book \usepackage[utf8x]{inputenc} \usepackage[english]{babel} \usepackage{url} \usepackage{graphicx} \usepackage{imakeidx} % for how to use the index see https://www.sharelatex.com/learn/Indices \usepackage...
{"hexsha": "89180b261c73205cbbb89ccf1a38953fd5bf544c", "size": 1113, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "book6x9.tex", "max_stars_repo_name": "LafeLabs/trashmagic", "max_stars_repo_head_hexsha": "2eb29db9e29c6f90ac7cc7a0b477b0e00fec5eab", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count": null,...
import TimeZones: TimeZone, localzone import Compat: is_linux # Ensure that the current system's local time zone is supported. If this test fails make # sure to report it as an issue. @test isa(localzone(), TimeZone) if is_linux() # Bad TZ environmental variables withenv("TZ" => "") do @test_throws E...
{"hexsha": "2178c48ee033c733781997acd9334558dadcf863", "size": 1647, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/local.jl", "max_stars_repo_name": "JuliaPackageMirrors/TimeZones.jl", "max_stars_repo_head_hexsha": "d997abb7398ca8514007d1cbc77a031f721c727b", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# Copyright 2016-2019 David Robillard <d@drobilla.net> # Copyright 2013 Kaspar Emanuel <kaspar.emanuel@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in ...
{"hexsha": "3db89182ac4d77a0c5252df3aa6111b3e90c9d90", "size": 16224, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib-src/lv2/lilv/bindings/test/python/test_api.py", "max_stars_repo_name": "ECSE437-Audacity/audacity", "max_stars_repo_head_hexsha": "eff572509488f2df25f244f71cf45564b62027c0", "max_stars_repo_l...
\documentclass[Physics.tex]{subfiles} \begin{document} \chapter{Lasers and Semiconductors} \section{Lasers} The word `\sldef{laser}' is an acronym meaning light amplification by stimulated emission of radiation. Light emitted from a laser is monochromatic, coherent, unidirectional and focused. \subsection{Principl...
{"hexsha": "3f9e054c661218c9b5c5a2a2633ca0774f160846", "size": 10456, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "TeX/Physics/ch19_materials.tex", "max_stars_repo_name": "oliverli/A-Level-Notes", "max_stars_repo_head_hexsha": "5afdc9a71c37736aacf3ae1db9d0384cdb6a0348", "max_stars_repo_licenses": ["CC0-1.0"], "...
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: load-cpm.py # Author: Yuxin Wu import argparse import numpy as np import cv2 import tensorflow as tf from tensorpack import * from tensorpack.utils import viz from tensorpack.utils.argtools import memoized """ 15 channels: 0-1 head, neck 2-4 right shoulder, righ...
{"hexsha": "0a5dd42e9266d4c405aea8ed1df2ec534d452c8b", "size": 3989, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/CaffeModels/load-cpm.py", "max_stars_repo_name": "Neovairis/tensorpack", "max_stars_repo_head_hexsha": "ca0969089847c37a893a8e99317214c5899278db", "max_stars_repo_licenses": ["Apache-2.0"...