text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from scipy import * from pylab import * import numpy as np Pr = 0.7 ro = 1.225 mu = 0.00003 def fNusselt(Re) : if Re > 0.4 and Re <= 4 : return 0.989*(Re**0.33)*(Pr**(1/3)) elif Re > 4 and Re <= 40 : return 0...
{"hexsha": "98134ebebafb1efa39d1f3b98ce134fbd14f5387", "size": 1232, "ext": "py", "lang": "Python", "max_stars_repo_path": "Calcul nombre de Nusselt.py", "max_stars_repo_name": "Baitoven/fire-spread-simulator", "max_stars_repo_head_hexsha": "6ee0ff9f7ed89be57239e4f7df9163c482da5a8c", "max_stars_repo_licenses": ["MIT"],...
import numpy as np from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure from matplotlib import patches, lines, gridspec, text from matplotlib.animation import FFMpegWriter import common PART_NUM = 2 def generate_fig1(): fig = Figure(figsize=(6, 4)) ...
{"hexsha": "748d4bee6e96682267d3fb60e34327dcb020c9be", "size": 14214, "ext": "py", "lang": "Python", "max_stars_repo_path": "graphics/generate_figures_part2.py", "max_stars_repo_name": "jonathanfiat/ApproxiPong", "max_stars_repo_head_hexsha": "5aba59be45cff7f851f24b3cd978e63140b6ce9f", "max_stars_repo_licenses": ["MIT"...
from weather import Weather import pytz import calendar as cal from datetime import date, datetime from dateutil.parser import parse from typing import List, Tuple import numpy as np from PIL import Image, ImageDraw, ImageFont Width, Height = int, int # image size SIZE = (800, 480) MAIN_WIDTH = 334 FONTS = dict( ...
{"hexsha": "66d17fb048179455c6c026667c3b076cf2c695b4", "size": 12525, "ext": "py", "lang": "Python", "max_stars_repo_path": "draw/__init__.py", "max_stars_repo_name": "RyoheiTomiyama/e-paper-calendar", "max_stars_repo_head_hexsha": "d575ee62e96772a83daded2c9afcafcf8cab68c2", "max_stars_repo_licenses": ["MIT"], "max_sta...
import pytest import numpy as np import pandas as pd from converter import Converter conv = Converter() class TestCase: @pytest.mark.parametrize("expected, x, y", [((3, 3), '/home/sedov/repos/4upwork/test_files/file1.csv', '/home/sedov/repos/4upwork/test_files/file1_csv2json.json')]) ...
{"hexsha": "98da71a3b4c5f47bd64d5ffedf184b3c94fa43cc", "size": 1979, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_converter.py", "max_stars_repo_name": "namesjoe/4upwork", "max_stars_repo_head_hexsha": "8dfcbf9a4f2a7b975cf95f13e33b61d5cc70ab86", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
from utils.speech_featurizers import SpeechFeaturizer from utils.text_featurizers import TextFeaturizer import pypinyin import numpy as np from augmentations.augments import Augmentation import random import tensorflow as tf import os class AM_DataLoader(): def __init__(self, config_dict,training=True): ...
{"hexsha": "ea64693cfadb6ce66586648e422c24bc8c092e1c", "size": 16030, "ext": "py", "lang": "Python", "max_stars_repo_path": "dataloaders/am_dataloader.py", "max_stars_repo_name": "phecda-xu/TensorflowASR", "max_stars_repo_head_hexsha": "138fb5ee507a4675a53ff4c50c06a5af0d7bcb12", "max_stars_repo_licenses": ["Apache-2.0"...
(* (c) Copyright Microsoft Corporation and Inria. All rights reserved. *) Require Import ssreflect. Require Import ssrbool. Require Import ssrfun. Require Import eqtype. Require Import ssrnat. Require Import seq. Set Implicit Arguments. Unset Strict Implicit. Import Prenex Implicits. (* The basic theory of paths over...
{"author": "math-comp", "repo": "mathcomp-history-before-github", "sha": "19ef9415e2b509a2327f9ef704268ce8570b607c", "save_path": "github-repos/coq/math-comp-mathcomp-history-before-github", "path": "github-repos/coq/math-comp-mathcomp-history-before-github/mathcomp-history-before-github-19ef9415e2b509a2327f9ef704268ce...
from keras.preprocessing.image import load_img from keras.preprocessing.image import img_to_array from keras.models import load_model from matplotlib import pyplot as plt from keras.utils import plot_model import tensorflow as tf import numpy as np import tflite_runtime.interpreter as tflite import serial import argpa...
{"hexsha": "ae81cb09f929a5bd3c8bb8c210daceb11c2094b8", "size": 3356, "ext": "py", "lang": "Python", "max_stars_repo_path": "training/test_model.py", "max_stars_repo_name": "adokitkat/Gesture-Detecting-Macro-Keyboard", "max_stars_repo_head_hexsha": "91af7c7f4e211e508ed602c33483e5c77b9d9532", "max_stars_repo_licenses": [...
import cv2 from tensorflow.python.lib.io import file_io import numpy as np file = '/home/gavin/scene_data/renders/envmaps/0.hdr' f = file_io.read_file_to_string(file) data = np.asarray(bytearray(f), dtype='uint8') print(data) image_file = cv2.imdecode(data, cv2.IMREAD_UNCHANGED) print(image_file)
{"hexsha": "0fd3b774ecf017715c5fb358389426324d905006", "size": 298, "ext": "py", "lang": "Python", "max_stars_repo_path": "lighting_model/test.py", "max_stars_repo_name": "gavin-parker/Thesis", "max_stars_repo_head_hexsha": "09c6a579206b1d05072e59af72e134ecfed6378c", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Jun 4 17:18:27 2019 @author: Niccolo' Dal Santo @email : niccolo.dalsanto@epfl.ch """ # tensorflow wrappers for PDE-DNN import tensorflow as tf from tensorflow import keras import numpy as np from functools import partial import matplotlib.pyplot as ...
{"hexsha": "a67e8e2ce84f9331d7307bd15adbce7de93ab3a5", "size": 11685, "ext": "py", "lang": "Python", "max_stars_repo_path": "pde_dnn_model.py", "max_stars_repo_name": "ndalsanto/PDE-DNN", "max_stars_repo_head_hexsha": "1d4e612660e90546c6d97f4a6c8c1f498e5bfdf9", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_co...
from __future__ import print_function import numpy as np import matplotlib.pyplot as plt from skimage.draw import ellipse # ------------------------------------------------------------------------- fname = 'projections.npy' print('Reading:', fname) projections = np.load(fname) print('projections:', projections.shap...
{"hexsha": "dba95e1ed47cf26e12ded29f1f8ce196ea0a315b", "size": 4537, "ext": "py", "lang": "Python", "max_stars_repo_path": "reconstructions_mfi.py", "max_stars_repo_name": "diogodcarvalho/isttok-tomography", "max_stars_repo_head_hexsha": "bcabd51ec0b1f60a787bc9450db733cf2f93227c", "max_stars_repo_licenses": ["MIT"], "m...
import os.path import goto import math import numpy as np from goto import with_goto from tqdm.autonotebook import trange, tqdm from BUG.Layers.Layer import * from BUG.function import Optimize from BUG.function.Loss import SoftCategoricalCross_entropy from BUG.function.util import minibatch, decode_captions, data_ite...
{"hexsha": "a7fbc26bd0b365e5ccada5a2e4d308d97c48a674", "size": 25777, "ext": "py", "lang": "Python", "max_stars_repo_path": "BUG/Model/model.py", "max_stars_repo_name": "xdtcssdi/BUG", "max_stars_repo_head_hexsha": "e4766504d60e3b10b38d8c2c6829fe425e66078c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
Diffusion is relatively fast in \aCipher{} and we expect guess-and-determine attack to be infeasible. This section shows several attacks on round-reduced variants of \aead{}. The attacks are summarized in \TabRef{mitm-attacks}. \begin{table}[h!tb] \centering { \TabDef{mitm-attacks}{Guess and determine atta...
{"hexsha": "2e7a422365c0dfdd981cbc13df97cba9bfb93762", "size": 10595, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "thesis-source/9deSPARKLE/guessdetermine0.tex", "max_stars_repo_name": "hellman/thesis", "max_stars_repo_head_hexsha": "6ba1c2b241e63c07cf76108481c1b67f21a50f12", "max_stars_repo_licenses": ["MIT"],...
# The color plan below is better in terminal dark mode """ Print a title. """ function title(msg) !echo_on && return printstyled('\n', msg, '\n', bold = true, color = :cyan) printstyled(repeat('=', length(msg) + 2), '\n', color=31) end """ Print a subtitle. """ function subtitle(msg) !echo_on && return...
{"hexsha": "af1e5d3e7d797f0659636c7d13574b3e8f661172", "size": 1406, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/styled-messages.jl", "max_stars_repo_name": "xijiang/PlayGround.jl", "max_stars_repo_head_hexsha": "b37a22ced95b61fe04381e6ee64a239d827bf4f5", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
using Documenter, GenomeGraphs, Pkg makedocs( modules = [GenomeGraphs, GenomeGraphs.Graphs, GenomeGraphs.GraphIndexes], format = Documenter.HTML(), sitename = "GenomeGraphs.jl", authors = replace(join(Pkg.TOML.parsefile("Project.toml")["authors"], ", "), r" <.*?>" => "" ), pages = [ "Home" ...
{"hexsha": "ab734376bca6f98e17382fe69d6af5f2c3b906fd", "size": 754, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "BioJulia/GenomeGraphs.jl", "max_stars_repo_head_hexsha": "e7f5c51bd028e477fcaae1088c2fe4644d8030f8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 42,...
using Polynomials using TransportBasedInference: derivative, vander @testset "Test probabilistic Hermite polynomials" begin x = randn() P0 = ProPolyHermite(0) @test P0(x) == 1.0 @test derivative(P0,0).coeffs == (1.0,) @test derivative(P0,0).coeffs == (1.0,) @test derivative(P0,1).coeffs == () @test derivative(...
{"hexsha": "5b06440ec613db7298311329198aef1ea7c6519a", "size": 6410, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/hermitefunction/propolyhermite.jl", "max_stars_repo_name": "mleprovost/TransportBasedInference.jl", "max_stars_repo_head_hexsha": "bdcedf72e9ea23c24678fe6af7a00202c5f9d5d7", "max_stars_repo_li...
# License: MIT from typing import List import numpy as np from openbox.acquisition_function.acquisition import AbstractAcquisitionFunction from openbox.surrogate.base.base_model import AbstractModel from openbox.surrogate.base.gp import GaussianProcess class MCEI(AbstractAcquisitionFunction): def __init__(self...
{"hexsha": "6f187a33cef0d7a70cee47104060273aae754aa0", "size": 2601, "ext": "py", "lang": "Python", "max_stars_repo_path": "openbox/acquisition_function/mc_acquisition.py", "max_stars_repo_name": "Dee-Why/lite-bo", "max_stars_repo_head_hexsha": "804e93b950148fb98b7e52bd56c713edacdb9b6c", "max_stars_repo_licenses": ["BS...
# Code from Chapter 10 of Machine Learning: An Algorithmic Perspective # by Stephen Marsland (http://seat.massey.ac.nz/personal/s.r.marsland/MLBook.html) # You are free to use, change, or redistribute the code in any way you wish for # non-commercial purposes, but please maintain the name of the original author. # Th...
{"hexsha": "5c3974d309405a72079a5b58a9e0a00db2d81e02", "size": 2520, "ext": "py", "lang": "Python", "max_stars_repo_path": "MLBook/10 Dimension Reduction/iris.py", "max_stars_repo_name": "AjayKrP/Machine-Learning", "max_stars_repo_head_hexsha": "d039e99bbe09845174a845786099cfdd9a6913cb", "max_stars_repo_licenses": ["MI...
import numpy as np import scipy as sc from scipy import stats import math import scipy.io # only needed if you uncomment testing code to compare with matlab (circumvents differences in random permutation between python and MATLAB) # HELPER FILES REQUIRED import Periphery def FC_Suprise( y, whatPrior='dist', memory...
{"hexsha": "6e1c7f39447d16633e3f78eb92ee5f86792cfd93", "size": 7956, "ext": "py", "lang": "Python", "max_stars_repo_path": "Operations/FC_Suprise.py", "max_stars_repo_name": "ClarkLabUVA/hctsa-py", "max_stars_repo_head_hexsha": "4382a7e852d21cdfefdac1a4a09ea6e11abd9be1", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# Copyright 1999-2021 Alibaba Group Holding Ltd. # # 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 a...
{"hexsha": "a151575a921697abf03eae1e67de8fb40b896701", "size": 2213, "ext": "py", "lang": "Python", "max_stars_repo_path": "mars/dataframe/indexing/at.py", "max_stars_repo_name": "hxri/mars", "max_stars_repo_head_hexsha": "f7864f00911883b94800b63856f0e57648d3d9b4", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
# Copyright 2018 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
{"hexsha": "f03f4efc682ce03087d8c15f9d449e37dd11506c", "size": 3794, "ext": "py", "lang": "Python", "max_stars_repo_path": "pylisten.py", "max_stars_repo_name": "MycroftAI/pylisten", "max_stars_repo_head_hexsha": "469cff17328c4fa16a4d23c313e8e56a72c94169", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 9...
using Test using ForestBiometrics @test typeof(sdi_chart(500,8)) == Plots.Plot{Plots.GRBackend} @test typeof(sdi_chart(500,8;maxsdi=600)) == Plots.Plot{Plots.GRBackend}
{"hexsha": "eeab7271e1e2ba6948b197443ae010a6772b486d", "size": 170, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/SDI_chart_test.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/ForestBiometrics.jl-41a43668-ff68-5e81-b2d7-6ef3c0dd3db1", "max_stars_repo_head_hexsha": "4989646fc11bc724f0941ab0e764...
import sys import numpy as np def tensor_product(ops): """Recursively apply np.kron to construct a tensor product of the operators. Args: ops (List): List of (2, 2) arrays. Returns: np.ndarray(shape=(2 ** nops, 2 ** nops), dtype=np.complex128): Tensor product of ops. """ ...
{"hexsha": "df13a0daa0f39e4817c518fecd2ce24149efa353", "size": 3910, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/utils/hamiltonian.py", "max_stars_repo_name": "yiiyama/qc-workbook", "max_stars_repo_head_hexsha": "69ed031089df7217d0628d8b0a6fc9eeb914a3ec", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This script reads a staout file, station.in file and generate named time series. It can write a timeseries to REFMAR to be used with comodo-tools, or can directly be used with utide. author: Md Jamal Uddin Khan email: jamal.khan@legos.obs-mip.fr """ import numpy as np...
{"hexsha": "ebef0674511f8e5639fbd9acf187d5344ff1a3c1", "size": 4882, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/post_staout.py", "max_stars_repo_name": "jamal919/SCHISMMB", "max_stars_repo_head_hexsha": "f02106ffafeaeee6da5c7382e33f74ca1c327c37", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
import sys import cv2 import matplotlib.pyplot as plt import numpy as np from collections import namedtuple np.set_printoptions(threshold=sys.maxsize) class FitObjects: def __init__(self, img, grid_size, overlap_percent): self.img = img self.grid_size = grid_size self.overlap_percent = ove...
{"hexsha": "a8d2ae6646c9aa075ab1550a9a64ae04a43232a5", "size": 3785, "ext": "py", "lang": "Python", "max_stars_repo_path": "hvtowerdetection/test/tower/fit_objects.py", "max_stars_repo_name": "dkdocs/nextera-demo", "max_stars_repo_head_hexsha": "9881f42c68e96d48ae9c8a33eb11752d62c6e9d8", "max_stars_repo_licenses": ["Ap...
import numpy as np N = 10000 MIN_DEGREE = 2 MEAN_DEGREE = 20 GAMMA = 0.0 STEPS_PER_DAY = 5 MAX_STEPS = 3000 INITIAL_INFECTED_NUM = 10 PROB_INFECT = 0.027 PROB_INFECT_EXPOSED_FACTOR = 0.5 # The same ratio holds for the final contagious part of the incubation period. # Set this to 0 to make the Asymptomatic non-infectiou...
{"hexsha": "0c365a95275b56652aadb0619b3393a37d7d0aff", "size": 4065, "ext": "py", "lang": "Python", "max_stars_repo_path": "config.py", "max_stars_repo_name": "prantik1998/CS768", "max_stars_repo_head_hexsha": "be4e509c7ce63d00fa945a5e08a71cec1d855ce4", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null...
# # This python script converts a sample of the notMNIST dataset into # the same file format used by the MNIST dataset. If you have a program # that uses the MNIST files, you can run this script over notMNIST to # produce a new set of data files that should be compatible with # your program. # # Instructions: # # 1) if...
{"hexsha": "ab0edd652d8fb43e0def0abb6b98817cb5e44bd8", "size": 8266, "ext": "py", "lang": "Python", "max_stars_repo_path": "helpers/convertToMnistFormat/convert_to_mnist_format.py", "max_stars_repo_name": "bartlomiejszozda/handwrittenPairsGenerator", "max_stars_repo_head_hexsha": "d961ba50c7dbd2dca2b927a909ec3a0319b0ef...
import numpy as np from math import * def far(distance): if (distance < 740 and distance > 370): #print "far" return (distance/370)-1 return 0 def close(distance): if (distance > 0 and distance < 370): #print "close" return -(distance/370)+1 return 0 def mid(distance):...
{"hexsha": "558ba5b0ae46495a0f7c9ebd91fc82dca712c809", "size": 2006, "ext": "py", "lang": "Python", "max_stars_repo_path": "fuzzy_logic.py", "max_stars_repo_name": "josejo911/Mini5-Fuzy", "max_stars_repo_head_hexsha": "ad1e0dc5136551a04b883e2352090ac9040a7005", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import numpy as np import torch import torch.utils.data import os import layers from utils import load_wav_to_torch, load_filepaths_and_text # for individual & batch level permuting from utils import permute_filelist, permute_batch_from_filelist # for pre-batching from utils import batching, get_batch_sizes, permute_b...
{"hexsha": "087765c5a5666138755d6e875ae73770787f0915", "size": 12797, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_utils.py", "max_stars_repo_name": "zge/tacotron2-vae", "max_stars_repo_head_hexsha": "f0f5dc69bdbeb5331ee039afdbfdc1dea65ab033", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count...
from pikapi.motion.complimentary_filter import ComplimentaryFilterOrientationEstimator from pikapi.gui.pose_visualization import PoseVisualizer from pikapi.formats.basics import IMUInfo import numpy as np from pikapi.devices.realsense import RGBDWithIMU from pikapi.orientation_estimator import RotationEstimator from sc...
{"hexsha": "0564b4c41106f7ab3aa793a5c7a13d6b8a2ff8fa", "size": 2055, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/recognize_waist_motion.py", "max_stars_repo_name": "xiong-jie-y/pika", "max_stars_repo_head_hexsha": "f570a9df443ed36ecd7313e0747b77a3152e343f", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
import json import numpy as np from player import Player from CNN_agent import CNNAgent from os import getenv, environ import random as rnd import math # Holds all relevant maps that will be processed by the CNN class GameState: # Empty gamestate with two initialization options def __init__(self, previous...
{"hexsha": "a7ad425934b35928e962289a50c1c407d111ae83", "size": 8693, "ext": "py", "lang": "Python", "max_stars_repo_path": "generals_ai/game_state.py", "max_stars_repo_name": "lbhyman/generals_ai", "max_stars_repo_head_hexsha": "b5c0e45c5386ce85aca95db3881cd3ed7c4f115f", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# --------------------------------- # test the algorithm implementation # on a multidimensional XOR problem # > python xor.py # --------------------------------- import tensorflow as tf import argparse parser = argparse.ArgumentParser(description='main') parser.add_argument('--algorithm', default="gradient", type=str...
{"hexsha": "7dfeddf45f8b82243ef575c320ccff4fc0b29489", "size": 2013, "ext": "py", "lang": "Python", "max_stars_repo_path": "xor.py", "max_stars_repo_name": "MI2DataLab/fooling-partial-dependence", "max_stars_repo_head_hexsha": "0bd7ea554769f390cdafeb4fc7ce3b8626112867", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
from sklearn.multioutput import MultiOutputRegressor from sklearn.linear_model import LinearRegression from sklearn.ensemble import GradientBoostingRegressor import numpy as np import sys def get_feature_vectors(encoder, dataloader): num_state_variables = dataloader.dataset.tensors[1].shape[-1] vectors = [] ...
{"hexsha": "efb198773ece4ff520f19d7af996887002877a62", "size": 1832, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/evaluation/probe_modules.py", "max_stars_repo_name": "eracah/Slot-Contrastive-Networks", "max_stars_repo_head_hexsha": "cce84562297c0c61222710299d2c3225a2d4512a", "max_stars_repo_licenses": ["...
From mathcomp Require Import all_ssreflect zify. From Coq Require Import Logic.Eqdep_dec. From hydras Require Import DecPreOrder ON_Generic. From hydras Require Import T1 E0 Hessenberg Hydra_Theorems Hydra_Definitions Hydra_Termination Battle_length Hydra_Examples Epsilon0_Needed_Free Epsilon0_Needed_Std. F...
{"author": "coq-community", "repo": "hydra-battles", "sha": "2d211e0b5030d5f77aaaf6366b01fc64ed998c61", "save_path": "github-repos/coq/coq-community-hydra-battles", "path": "github-repos/coq/coq-community-hydra-battles/hydra-battles-2d211e0b5030d5f77aaaf6366b01fc64ed998c61/theories/gaia/GHydra.v"}
#!/usr/bin/env python """ Author: Adam White, Matthew Schlegel, Mohammad M. Ajallooeian, Sina Ghiassian Purpose: Skeleton code for Monte Carlo Exploring Starts Control Agent for use on A3 of Reinforcement learning course University of Alberta Fall 2017 """ from utils import rand_in_range, rand_un imp...
{"hexsha": "a77a42c70f17be7a909b2be8292dccdd0b0dfbac", "size": 2746, "ext": "py", "lang": "Python", "max_stars_repo_path": "ass3/A_3_Code/A_3_Code/mc_agent.py", "max_stars_repo_name": "pshn111/CMPUT-366", "max_stars_repo_head_hexsha": "fca4316aa8409e3304300f12e3dbdce8b5626d2a", "max_stars_repo_licenses": ["MIT"], "max_...
/** * This file is part of Fast-Planner. * * Copyright 2019 Boyu Zhou, Aerial Robotics Group, Hong Kong University of Science and Technology, <uav.ust.hk> * Developed by Boyu Zhou <bzhouai at connect dot ust dot hk>, <uv dot boyuzhou at gmail dot com> * for more information see <https://github.com/HKUST-Aerial-Robotics...
{"hexsha": "be4728b8b810753d955ed3039d060a01093fe891", "size": 6127, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/TIE_navigation/plan_env/include/plan_env/linear_obj_model.hpp", "max_stars_repo_name": "ZJU-FAST-Lab/Terrestrial-Aerial-Navigation", "max_stars_repo_head_hexsha": "3602623ff8cb9735c6ece8c25772a3...
import sys from random import random from operator import add from datetime import datetime from pyspark import SparkContext from pyspark.mllib.classification import LogisticRegressionWithSGD, LogisticRegressionModel from pyspark.mllib.regression import LabeledPoint, LinearRegressionWithSGD from numpy import array imp...
{"hexsha": "90dc2edbe4b0cda4d03e54567063c1f57c8b4353", "size": 14087, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/spark/spark_prediction.py", "max_stars_repo_name": "mjasek114/w251-Video-Prediction", "max_stars_repo_head_hexsha": "8828c4c8e06fe14afdefd81dea9c08bccbba92f4", "max_stars_repo_licenses": ["M...
import os import sys root_path = os.path.abspath("../../../") if root_path not in sys.path: sys.path.append(root_path) import numpy as np from sklearn.naive_bayes import MultinomialNB from sklearn.tree import _tree, DecisionTreeClassifier from _Dist.NeuralNetworks.c_BasicNN.NN import Basic # Transformation bas...
{"hexsha": "04fa11170f3e72c662892df64c8efe48222f322a", "size": 7750, "ext": "py", "lang": "Python", "max_stars_repo_path": "_Dist/NeuralNetworks/d_Traditional2NN/Toolbox.py", "max_stars_repo_name": "wangjiangtao-NJPI/MachineLearning", "max_stars_repo_head_hexsha": "78124b56a26ec68efb3c517a4a2420860b6e4a75", "max_stars_...
#pragma once #include <boost/asio.hpp> #include <iostream> #include <thread> class service_demo { public: void handleClient(boost::asio::ip::tcp::socket& sock) { try { boost::asio::streambuf request; boost::asio::read_until(sock, request, '\n'); auto revbuf = request.data(); std::string str(boost::asio...
{"hexsha": "13545dc2979dad083d4ec050348342e207b89c07", "size": 1753, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost.asio/chapter04/service.hpp", "max_stars_repo_name": "pvthuyet/books", "max_stars_repo_head_hexsha": "bac5f754a68243e463ec7b0d93610be8807b31ac", "max_stars_repo_licenses": ["BSL-1.0"], "max_sta...
function romberg(f::Function, a::Number, b::Number, nl::Int) #= Numerical Integration of functions using Romberg's method. Keyword arguments: f -- Anonymous functon to integrate a -- Lower limit of integration b -- Upper limit of integration nl -- The level of integration to go to. Returns: The result ...
{"hexsha": "4d7aa873a9cc98da33b19106ca477ded9b088bef", "size": 1663, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Julia/Integration/romberg.jl", "max_stars_repo_name": "alexjohnj/numerical-methods", "max_stars_repo_head_hexsha": "152c24a5ab297cf2e7486e96c3f986dbe536537d", "max_stars_repo_licenses": ["MIT"], "m...
# from reskit import TEST_DATA from reskit.wind.core.design_turbine import onshore_turbine_from_avg_wind_speed import numpy as np import pandas as pd def test_onshore_turbine_from_avg_wind_speed(): output = onshore_turbine_from_avg_wind_speed(11) assert isinstance(output, dict) assert np.isclose(output['c...
{"hexsha": "f018d4a1fe54d96d8b5404c529714f4114b05e68", "size": 1499, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/03_wind/core/test_design_turbine.py", "max_stars_repo_name": "OfficialCodexplosive/RESKit", "max_stars_repo_head_hexsha": "e006e8c9923ddb044dab6951c95a15fa43489398", "max_stars_repo_licenses"...
# Import libraries import sys import pandas as pd import numpy as np from sqlalchemy import create_engine def load_data(messages_filepath, categories_filepath): """ Load messages and categories datasets and merge into a single DataFrame Arguments: messages_filepath (str): path to messages dataset (CSV...
{"hexsha": "9bf4e86a7604862715fd0813ad0b1b0e6cf7365e", "size": 3935, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/process_data.py", "max_stars_repo_name": "guyhth/udacity-dsnd-prj2", "max_stars_repo_head_hexsha": "279d60601eaaa5d3344fb23affda6dac4f49ec00", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import os from collections import OrderedDict import re import scipy.interpolate as itp import numpy as np import pandas as pd import matplotlib.pyplot as plt from pyplanscoring.constraints.metrics import DVHMetrics from pyplanscoring.core.calculation import DVHCalculation from pyplanscoring.core.types import DVHData...
{"hexsha": "59503f29b2d07c707a9977917aa6fb154a19b3ac", "size": 18266, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/tests_validation/test_benchmark_data.py", "max_stars_repo_name": "victorgabr/pps", "max_stars_repo_head_hexsha": "dfe3fae64fd4dedde85204643f9c797c0373f96c", "max_stars_repo_licenses": ["BSD...
[STATEMENT] lemma borel_measurable_Pair[measurable (raw)]: fixes f :: "'a \<Rightarrow> 'b::second_countable_topology" and g :: "'a \<Rightarrow> 'c::second_countable_topology" assumes f[measurable]: "f \<in> borel_measurable M" assumes g[measurable]: "g \<in> borel_measurable M" shows "(\<lambda>x. (f x, g x))...
{"llama_tokens": 4396, "file": null, "length": 28}
from __future__ import print_function import numpy as np import sys import os import glob import random from PIL import Image from random import randrange from tqdm import tqdm from numpy import expand_dims from keras.preprocessing.image import load_img from keras.preprocessing.image import img_to_array from keras.p...
{"hexsha": "8928a16ddf79234d76077c7f69a7718fef9e9daa", "size": 1807, "ext": "py", "lang": "Python", "max_stars_repo_path": "beam_selection_NU/image/uniform.py", "max_stars_repo_name": "Batool-Salehi/beam_selection", "max_stars_repo_head_hexsha": "5b1c4aa75d7e5dbde2f88a7225023cdff89faeea", "max_stars_repo_licenses": ["M...
import logging import string import freetype import numpy as np from ..geometry import Size from .core import TilesSource log = logging.getLogger(__name__) class TrueTypeFont(TilesSource): """Generate tiles from True Type Font.""" DEFAULT_DPI = 96 MONOSPACE_REFERENCE_CHARS = ['@', ] PROPORTION...
{"hexsha": "78426f5fec240908642d9855fe13998c27fe4abf", "size": 6000, "ext": "py", "lang": "Python", "max_stars_repo_path": "rogal/tiles_sources/fonts.py", "max_stars_repo_name": "kosciak/ecs-rogal", "max_stars_repo_head_hexsha": "d553104e0ea350d11272d274a900419620b9389e", "max_stars_repo_licenses": ["MIT"], "max_stars_...
function [caNodeIndices, vResolution_] = ex_CreateIndexCatalog(mCatalog, mPolygon, bMap, nGriddingMode, nNumberEvents, fRadius, fSizeRectHorizontal, fSizeRectDepth) % Creates a cell-array with subcatalogs for every grid node defined by mPolygon % % [caNodeIndices] = ex_CreateIndexCatalog(mCatalog, mPolygon,...
{"author": "CelsoReyes", "repo": "zmap7", "sha": "3895fcb3ca3073608abe22ca71960eb082fd0d9a", "save_path": "github-repos/MATLAB/CelsoReyes-zmap7", "path": "github-repos/MATLAB/CelsoReyes-zmap7/zmap7-3895fcb3ca3073608abe22ca71960eb082fd0d9a/src/thomas/seismicrates/ex_CreateIndexCatalog.m"}
[STATEMENT] lemma soundness: assumes "check_eqv r s" shows "lang r = lang s" [PROOF STATE] proof (prove) goal (1 subgoal): 1. lang r = lang s [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. lang r = lang s [PROOF STEP] let ?nr = "norm r" [PROOF STATE] proof (state) goal (1 subgoal): 1. lang r ...
{"llama_tokens": 907, "file": "Regular-Sets_Equivalence_Checking", "length": 13}
import numpy as np # as in the previous example, load decays.csv into a NumPy array decaydata = np.loadtxt('decays.csv', delimiter=',', skiprows=1) # provide handles for the x and y columns time = decaydata[:,0] decays = decaydata[:,1] # import the matplotlib plotting functionality import pylab as plt plt.plot(time...
{"hexsha": "f724555c65e6b8b852f9d596dad3446f0fbf8099", "size": 448, "ext": "py", "lang": "Python", "max_stars_repo_path": "chap_7/decay_plot.py", "max_stars_repo_name": "jieyanzhu/codes-effective-computation-in-physics", "max_stars_repo_head_hexsha": "0c99f2da9d462229e6b174a010d7c7b08af4482b", "max_stars_repo_licenses"...
import numpy as np class NetworkModuleSettings: def __init__(self, module): self.__dict__ = {k:v for k,v in module.__dict__.items() if not k.startswith('__')} def update(self, settings): for k in settings.keys(): assert k in self.__dict__, "Settings does not exist!" sel...
{"hexsha": "8cfd3f5a325e60f7780fbb87d2b27d5cd5bbf5e7", "size": 3627, "ext": "py", "lang": "Python", "max_stars_repo_path": "eim/models/swta/model_settings_loader.py", "max_stars_repo_name": "zjonke/EImotif-nest", "max_stars_repo_head_hexsha": "ea5da960ccd8ab8bd2171484f37b0189f71308f1", "max_stars_repo_licenses": ["MIT"...
import collections import itertools import math import random import numpy from sklearn.model_selection import KFold from sklearn.model_selection import train_test_split import numpy from sklearn.preprocessing import LabelEncoder from keras.utils import np_utils from sklearn.preprocessing import StandardScaler,MinMaxS...
{"hexsha": "33f63700b5a1aac242c07afc728a008931679ab4", "size": 11520, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tec/ic/ia/p1/g08_kdtrees.py", "max_stars_repo_name": "Fuabioo/Proyecto-Corto-2-3", "max_stars_repo_head_hexsha": "44bdfd5f2774e2d0d8c8af79dc55dac340f6f4b0", "max_stars_repo_licenses": ["MIT"]...
import numpy as np import torch from torchmetrics import Metric, MetricCollection, MetricTracker from torchtyping import TensorType class MeanAbsoluteError(Metric): def __init__(self): super().__init__() self.add_state("error", default=torch.tensor(0.0), dist_reduce_fx="sum") self.add_sta...
{"hexsha": "627eeb09be5346ada177ce0cdab0474afc5291cc", "size": 882, "ext": "py", "lang": "Python", "max_stars_repo_path": "finite_element_networks/lightning/metrics.py", "max_stars_repo_name": "martenlienen/finite-element-networks", "max_stars_repo_head_hexsha": "5e8f6ecc473d1e93ccf366fcc45a47b08492ffde", "max_stars_re...
# Copyright 2019 Prashant Singh, Fredrik Wrede and Andreas Hellander # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{"hexsha": "2c624f4fa162619d7d569b31c7658f38c1081ee8", "size": 2396, "ext": "py", "lang": "Python", "max_stars_repo_path": "sciope/tests/test_sampling.py", "max_stars_repo_name": "rmjiang7/sciope", "max_stars_repo_head_hexsha": "5122107dedcee9c39458e83d853ec35f91268780", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
""" Test of PSO algorithm in combination with XFoil and NURBS Airfoil parametrization. Trying to find high Re low drag airfoil. """ from __future__ import division, print_function from os import remove import numpy as np from copy import copy from string import ascii_uppercase from random import choice import matpl...
{"hexsha": "e08d4619a62128b79e324d332a4c683246555ec8", "size": 5143, "ext": "py", "lang": "Python", "max_stars_repo_path": "optimize_for_cl_nurbs.py", "max_stars_repo_name": "The-Fonz/xfoil-optimization-toolbox", "max_stars_repo_head_hexsha": "cebcd096bba905e9010a80c464693418514a4a86", "max_stars_repo_licenses": ["Unli...
import os from PIL import Image from PIL import ImageDraw from PIL import ImageFont import numpy import itertools import random import cv2 import math import config import tensorflow as tf version = "ABCD" CHARS_W_BLANK = config.CHARS + " " BG_PATH = "/python/chinese_rec/bgs" FONT_HEIGHT = 32 ...
{"hexsha": "ae9f918b1b9694df4fbcf1cf2347bbc65e996cad", "size": 9074, "ext": "py", "lang": "Python", "max_stars_repo_path": "action/zhou_demo/gen.py", "max_stars_repo_name": "pearpai/TensorFlow-action", "max_stars_repo_head_hexsha": "264099d933988532ed59eaf0f2ad495d40ede4d2", "max_stars_repo_licenses": ["Apache-2.0"], "...
import numpy as np import random from copy import deepcopy import math import torch import torch.nn as nn import torch.nn.functional as F import torch.utils.data from .sampler import sampler_ff, sampler_rn # from digideep.agent.samplers.common import check_shape from digideep.utility.toolbox import get_class from di...
{"hexsha": "e0680296cbe68afc8662da3d5035098f1ea6fab7", "size": 11437, "ext": "py", "lang": "Python", "max_stars_repo_path": "log_sessions/cartpole_8_4_05_1/modules/digideep/agent/ppo/agent.py", "max_stars_repo_name": "godnpeter/DMC_Clustering_PICA", "max_stars_repo_head_hexsha": "1b3e14dd4034f3941af1caa06c1d4b6f9d60640...
""" ========================================================= Linear Regression Example (ref: https://scikit-learn.org/stable/auto_examples/linear_model/plot_ols.html#sphx-glr-download-auto-examples-linear-model-plot-ols-py) ========================================================= """ print(__doc__) import matplotlib...
{"hexsha": "435158085b30b316dee68f07500d1e2ba38a6c0d", "size": 1998, "ext": "py", "lang": "Python", "max_stars_repo_path": "lin-reg-diabetes.py", "max_stars_repo_name": "winnie9197/The-Coding-School-projects", "max_stars_repo_head_hexsha": "c9ddac7085d894579452fd0ca3ba0cc9f90f7329", "max_stars_repo_licenses": ["Naumen"...
''' API tasks ''' import numpy as np from abstractor_module import model_utils, abstractor, abstractions from api.utils import logger logger = logger.create_logger(__name__) def get_concrete_example(abstraction): ''' Returns an example given a valid abstraction @abstraction: string abstraction @retu...
{"hexsha": "102aae632a4b25a3e65b55f052ac02d74fe5e347", "size": 1871, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/api/tasks/abstraction_tasks.py", "max_stars_repo_name": "AITestingOrg/abstractor", "max_stars_repo_head_hexsha": "5a2bc84689c651cb80b4c144379fb35756491ad5", "max_stars_repo_licenses": ["MIT"],...
import argparse import os from dec_opt.utils import pickle_it from dec_opt.experiment import run_exp import numpy as np from dec_opt.logistic_regression import LogisticRegression from dec_opt.linear_regression import LinearRegression from dec_opt.non_linear_regression import NonLinearRegression curr_dir = os.path.dir...
{"hexsha": "052970defdcd976444a7d68aedb45ef1c65ada39", "size": 3317, "ext": "py", "lang": "Python", "max_stars_repo_path": "example/driver.py", "max_stars_repo_name": "anishacharya/decentralized-opt", "max_stars_repo_head_hexsha": "ebc7eb14c7209fd27593ef100b225c2bb42de981", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np import pandas as pd import nibabel as nib import nilearn as nl from nilearn.input_data import NiftiMasker import nilearn.plotting as niplot import matplotlib as mlab import matplotlib.pyplot as plt import holoviews as hv import timecorr as tc import os from brainiak.factoranalysis.htfa import HTFA im...
{"hexsha": "87ab3ebff5f75e4e7d343e36d86e18bd82efa371", "size": 12189, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/htfa/helpers.py", "max_stars_repo_name": "paxtonfitzpatrick/brainiak-aperture", "max_stars_repo_head_hexsha": "f0a2a4330594ae6ce923e8788a52746ca9c22162", "max_stars_repo_licenses": ["Ap...
import pandas as pd import sys import os import numpy as np import matplotlib.pyplot as plt from scipy.stats import iqr sys.path.append(os.path.join(os.path.dirname(__file__), '..')) from lib.deep_autoencoder import DeepAutoencoder from modules.utils import create_histogram class Predict: def __init__(self, input...
{"hexsha": "650be96f4883b3ba78da9ba426ababd019bbbfb9", "size": 4820, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyanomaly/modules/predict.py", "max_stars_repo_name": "ralampay/pyanomaly", "max_stars_repo_head_hexsha": "d0e471c1261aadb8834179142ce62b0e1fe066a9", "max_stars_repo_licenses": ["MIT"], "max_stars...
# 集成攻击 general detection coco import sys sys.path.append('/home/huanghao/hhattack/yolov4/eval_code') sys.path.append('/home/huanghao/hhattack/mmdetection') import os from argparse import ArgumentParser import torch from torchvision import transforms from PIL import Image, ImageDraw,ImageFont from PIL import ImageFil...
{"hexsha": "cd87983af1774d41332a1a5c2ea050c1d5d86672", "size": 6024, "ext": "py", "lang": "Python", "max_stars_repo_path": "show_boxes.py", "max_stars_repo_name": "VDIGPKU/RPAttack", "max_stars_repo_head_hexsha": "7e0bc8dfee1f58b4bebd7ab4e88089aaba323184", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 24, "max...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import re import time import logging import logging.handlers import hashlib import pickle import codecs import json import subprocess from collections import defaultdict, Mapping import six try: from urlparse import urlparse except: pass if ...
{"hexsha": "8aa10ab83ccb32b7766d98a26325ee274fb80fb5", "size": 29459, "ext": "py", "lang": "Python", "max_stars_repo_path": "huoutil/util.py", "max_stars_repo_name": "2212168851/huoutil", "max_stars_repo_head_hexsha": "ac00ca4eb7ba23f2fddbce7ce3a8a2c34ce61188", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import numpy as np from numpy import cos, sin, pi import matplotlib.pyplot as plt import matplotlib.animation as animation from numba import jit import time class Acrobot: # Define constants (geometry and mass properties): def __init__(self): self.m1 = 1; self.m2 = 1; self.L1 = 1; self.L2 = ...
{"hexsha": "c1c5e7a77c1ff3d93c39fee89bf46e38511e3d08", "size": 3047, "ext": "py", "lang": "Python", "max_stars_repo_path": "pendubot/pendubot_class.py", "max_stars_repo_name": "mmolnar0/sgillen_research", "max_stars_repo_head_hexsha": "752e09fdf7a996c832e71b0a8296322fe77e9ae3", "max_stars_repo_licenses": ["MIT"], "max_...
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License" # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
{"hexsha": "ff4b7753234dbf5dfee870b478fdfa3796ba66e8", "size": 6478, "ext": "py", "lang": "Python", "max_stars_repo_path": "applications/T2VLAD/train.py", "max_stars_repo_name": "XYZ916829/PaddleVideo", "max_stars_repo_head_hexsha": "8e422ee9fd4e08b711e80b7e9ff627c331f31c30", "max_stars_repo_licenses": ["Apache-2.0"], ...
# shared global variables to be imported from model also import numpy as np import os UNK = "$UNK$" NUM = "$NUM$" NONE = "o" class DataSet(object): def __init__(self, filepath, vocab_words=None, vocab_tags=None, max_iter=None, lower=True, allow_unk=True): self.filepath = filepath self.max_iter =...
{"hexsha": "1a35e0320e3985a2f856aa3e1639437645377398", "size": 10383, "ext": "py", "lang": "Python", "max_stars_repo_path": "model/DataSet.py", "max_stars_repo_name": "ZishuoLi/sequence-tagging", "max_stars_repo_head_hexsha": "2c0298e202bcb423c318605eebd31c0c39a55198", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
""" Created on Thu Oct 25 15:54:19 2018 General function script to load from @author: alexschw """ import itertools import numpy as np def Gaussian2D(Amp, Shape, Sig): """ Computes a 2D gaussian with given amplitude, shape and width (sigma) """ Sig = np.array(Sig) # If one or both of the shape val...
{"hexsha": "13871c2142df0a21532f520c09c540753dd7e6bb", "size": 2669, "ext": "py", "lang": "Python", "max_stars_repo_path": "EffectPFC/functions.py", "max_stars_repo_name": "Olimaol/Cognitive-Learning-Agent", "max_stars_repo_head_hexsha": "c60a6021432eb3d500cb269d6c49c69c3cf5abe7", "max_stars_repo_licenses": ["MIT"], "m...
nparams(m) = (ps = params(m); length(ps) > 0 ? sum(length, ps) : 0) function gradientandvalue(f, ps::Zygote.Params) y, back = Zygote.pullback(f, ps) losscheck(y) gs = back(Zygote.sensitivity(y)) y, gs end #### #### FluxTrainerIterator #### Base.@kwdef struct FluxTrainer{L, O, CB} lossfn::L = not...
{"hexsha": "c79a0a798c5f3f5de23e991335fa725f0bb988de", "size": 5237, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/flux.jl", "max_stars_repo_name": "Lyceum/LyceumAI.jl", "max_stars_repo_head_hexsha": "0e97769255baa65937337c76b6a2cc083ef14009", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 12, "max_...
Load LFindLoad. Load LFindLoad. From adtind Require Import goal31. From lfind Require Import LFind. Lemma lfind_state (n:natural) (x:lst) (y:lst):@eq lst (append (qreva x Nil) (Cons n y)) (append (append (qreva x Nil) (Cons n Nil)) y). Admitted. From QuickChick Require Import QuickChick. QCInclude "/home/yousef/lem...
{"author": "yalhessi", "repo": "lemmaranker", "sha": "53bc2ad63ad7faba0d7fc9af4e1e34216173574a", "save_path": "github-repos/coq/yalhessi-lemmaranker", "path": "github-repos/coq/yalhessi-lemmaranker/lemmaranker-53bc2ad63ad7faba0d7fc9af4e1e34216173574a/benchmark/clam/_lfind_clam_lf_goal31_qreva_nil_50_append_assoc/lfind_...
% % File Skt_and_IT_WSC16.tex % % Contact: apksh@uohyd.ernet.in (ambapradeep@gmail.com) %% %% Based on the style files for COLING2014, which were, in turn, %% Based on the style files for ACL-2014, which were, in turn, %% Based on the style files for ACL-2013, which were, in turn, %% Based on the style files for ACL-20...
{"hexsha": "58e235ed955f752e5d23ee48c69922b7ad9376b5", "size": 74247, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "thesis/wscPaper_Latex/myWork.tex", "max_stars_repo_name": "krishnamrith12/taddhita-generator", "max_stars_repo_head_hexsha": "063ee1672a351b8cfa84f530f4f17c353eb8deae", "max_stars_repo_licenses": [...
struct CoefNotComparable end Base.iszero(::CoefNotComparable) = false @testset "Term" begin Mod.@polyvar x @test convert(Any, 1x) == 1x @test one(1x) == one(1.0x) == 1 @test zero(1x) == zero(1.0x) == 0 @test nvariables(0.0x) == 1 @test nvariables(1x) == 1 #@inferred one(1x) @inferred ze...
{"hexsha": "8864551918b4f23fef8d7623d9e2ef9bcbcd72bc", "size": 2657, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/term.jl", "max_stars_repo_name": "Timeroot/MultivariatePolynomials.jl", "max_stars_repo_head_hexsha": "899791779b9037043be5c80372f9d00a9fe858ed", "max_stars_repo_licenses": ["MIT"], "max_stars...
"""Script containing the DeepLoco environments.""" import gym import numpy as np import os import sys import cv2 try: sys.path.append(os.path.join(os.environ["TERRAINRL_PATH"], "simAdapter")) import terrainRLSim # noqa: F401 except (KeyError, ImportError, ModuleNotFoundError): pass class BipedalSoccer(g...
{"hexsha": "e8c30d54b333286bca5dd921414bc3d23b187ec5", "size": 4236, "ext": "py", "lang": "Python", "max_stars_repo_path": "hbaselines/envs/deeploco/envs.py", "max_stars_repo_name": "reufko/h-baselines", "max_stars_repo_head_hexsha": "5c5522b096ddcf3124ff2fcbfb6eb7fa4fc0fb57", "max_stars_repo_licenses": ["MIT"], "max_s...
#ifndef LIBTRELLIS_DATABASEPATH_H #define LIBTRELLIS_DATABASEPATH_H #include <boost/version.hpp> #include <boost/filesystem.hpp> #if BOOST_VERSION >= 106100 #if defined(__wasm) std::string get_database_path() { return "/share/trellis/database"; } #else #include <boost/dll/runtime_symbol_info.hpp> std::string...
{"hexsha": "288f67006bf78f58e435cc0c56f47b48031e5697", "size": 4846, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "libtrellis/include/DatabasePath.hpp", "max_stars_repo_name": "umarcor/prjtrellis", "max_stars_repo_head_hexsha": "9b3db7ba9a02e7d2f49c52ce062d5b22e320004c", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma Bang: fixes P :: pi and Rs :: residual assumes "P \<parallel> !P \<Longrightarrow>\<^sup>^\<alpha> \<prec> P'" and "P' \<noteq> P \<parallel> !P" shows "!P \<Longrightarrow>\<^sup>^\<alpha> \<prec> P'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. !P \<Longrightarrow>\<^sup>^\...
{"llama_tokens": 264, "file": "Pi_Calculus_Weak_Early_Semantics", "length": 2}
[STATEMENT] lemma Im_Ln_eq: assumes "z\<noteq>0" shows "Im (Ln z) = (if Re z\<noteq>0 then if Re z>0 then arctan (Im z/Re z) else if Im z\<ge>0 then arctan (Im z/Re z) + pi else ...
{"llama_tokens": 11141, "file": "Winding_Number_Eval_Missing_Transcendental", "length": 95}
""" Weightings ========== Use if you have a raw co-occurrence matrix in scipy.sparse.csr_matrix data structure (see the subsection 1.4.2) """ import numpy as np def raising(m, coeff=0.75): m.data **= coeff def log(m): m.data = np.log(1 + m.data) def ppmi(m): all_sum = m.sum() row_sums = np.arra...
{"hexsha": "9ac006f880c0b9f3fbe1482655030130ef137943", "size": 1018, "ext": "py", "lang": "Python", "max_stars_repo_path": "weightings.py", "max_stars_repo_name": "nimcho/dimo", "max_stars_repo_head_hexsha": "eb50ec2ba61b66a8a6ec6614fe97d197adf1221f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
module BarAndSpiralsInterface !GALACTIC POTENTIAL. IT HAS BAR AND SPIRAL ARMS !THE MODELS ARE IN 2D OR 3D. !THE TOTAL FORCE AND POTENTIAL IS MEASURED !WITH RESPECT TO A COROTATING FRAME WITH THE BAR, !THEN POSITIONS AND VELOCITIES HERE ARE ASSUMED TO BE IN THE SAME FRAME IMPLICIT NONE real*8 :: ...
{"hexsha": "02c3acf11b88a0ffaf52804234c3f3fc1c0eaf7c", "size": 88009, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/amuse/community/galaxia/interface.f90", "max_stars_repo_name": "rknop/amuse", "max_stars_repo_head_hexsha": "85d5bdcc29cfc87dc69d91c264101fafd6658aec", "max_stars_repo_licenses": ["Apache-2...
function [data,indices] = bz_GetWidebandData(channels,varargin) % bz_GetWidebandData - Get local field potentials. % % Load wide band data from disk (unlike spikes or positions, raw data is way % too large to keep in memory). % % USAGE % % [data,indices] = bz_GetWidebandData(channels,<options>) % % channels ...
{"author": "buzsakilab", "repo": "buzcode", "sha": "2d700a38b3c2a860ad1333be90f14d7a37a72815", "save_path": "github-repos/MATLAB/buzsakilab-buzcode", "path": "github-repos/MATLAB/buzsakilab-buzcode/buzcode-2d700a38b3c2a860ad1333be90f14d7a37a72815/io/bz_GetWidebandData.m"}
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
{"hexsha": "f80408377426317e802b0dacac665fb06719d2d0", "size": 4076, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/predict.py", "max_stars_repo_name": "mohui37/PaddleVideo", "max_stars_repo_head_hexsha": "511c14f0d80a0b3d3d80274da5d902361a2ac75f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
import typing from contextlib import contextmanager from itertools import product from typing import Mapping from mimic.utils import text as text from nltk.translate.bleu_score import SmoothingFunction, corpus_bleu, sentence_bleu import numpy as np import torch from torch import Tensor from torch.utils.data import Dat...
{"hexsha": "2e0945f45cf72f772f96892044c3c64ca1cb0dc6", "size": 14825, "ext": "py", "lang": "Python", "max_stars_repo_path": "mimic/evaluation/eval_metrics/coherence.py", "max_stars_repo_name": "Jimmy2027/MoPoE-MIMIC", "max_stars_repo_head_hexsha": "d167719b0dc7ba002b7421eb82a83e47d2437795", "max_stars_repo_licenses": [...
/* boost uuid/detail/random_provider_wincrypt implementation * * Copyright Jens Maurer 2000 * Copyright 2007 Andy Tompkins. * Copyright Steven Watanabe 2010-2011 * Copyright 2017 James E. King III * * Distributed under the Boost Software License, Version 1.0. (See * accompanying file LICENSE_1_0.txt or copy at ...
{"hexsha": "095abf941edf31543d5d88a7cd4c121dda662880", "size": 3219, "ext": "ipp", "lang": "C++", "max_stars_repo_path": "deps/boost/include/boost/uuid/detail/random_provider_wincrypt.ipp", "max_stars_repo_name": "kindlychung/mediasoup-sfu-cpp", "max_stars_repo_head_hexsha": "f69d2f48f7edbf4f0c57244280a47bea985f39cf", ...
import argparse from keras.callbacks import ModelCheckpoint import numpy as np import pickle import random from model import model from utils import get_kdd_data, generate_batch np.random.seed(2018) np.random.RandomState(2018) random.seed(2018) # default args DATASET = 'kddcup99' SAMPLES = 50000 COLS = str(['srv_cou...
{"hexsha": "333c1f05012431286d72d840e5e524b55d3982b6", "size": 5531, "ext": "py", "lang": "Python", "max_stars_repo_path": "components/outlier-detection/vae/train.py", "max_stars_repo_name": "jsreid13/seldon-core", "max_stars_repo_head_hexsha": "4197eb65bff5ac40629b717a9d533f0e92160ad2", "max_stars_repo_licenses": ["Ap...
import numpy as np import random from .auth import Auth import oandapyV20 import oandapyV20.endpoints.instruments as instruments from sklearn import preprocessing import csv #import torch import time import cv2 import mss import numpy import re import datetime from .pairs import PairsConfigured # THERE IS A LOT OF CO...
{"hexsha": "d5b464e938595186a3b771a469b7cad29f01f1ea", "size": 24897, "ext": "py", "lang": "Python", "max_stars_repo_path": "shamanai/common/utilities2.py", "max_stars_repo_name": "adaptationio/Shaman-RL", "max_stars_repo_head_hexsha": "548fa847e6ba2105cc0a876b02db3f3d7c179c54", "max_stars_repo_licenses": ["MIT"], "max...
#!python from pitchshifter import * import numpy as np class TestInPlacePhaseVocoder(object): def test_findPeaks_simple(self): res = findPeaks([1,2,3,2,1]) assert len(res) == 1 assert res[0] == 2 def test_findPeaks_earlyPeak(self): res = find...
{"hexsha": "e5a30dd5c5e76380aa7cdb0e3fd8b34a98b5dbeb", "size": 2287, "ext": "py", "lang": "Python", "max_stars_repo_path": "__init__.py", "max_stars_repo_name": "Varsha290100/Audio-Pitch-Shifting", "max_stars_repo_head_hexsha": "fac57428f906ad5a170c09732332516317677dd2", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
import numpy as np import pandas as pd import re from time import sleep import requests from bs4 import BeautifulSoup from tqdm import tqdm def basic_info_list(num_pages): dane_ranking = [] for i, x in enumerate(tqdm(range(1, num_pages + 1))): bs = BeautifulSoup( requests.get( ...
{"hexsha": "99277fe5eba23dd71cbfc82fd7ba1dcfd7614020", "size": 7638, "ext": "py", "lang": "Python", "max_stars_repo_path": "scraper.py", "max_stars_repo_name": "JanAndrosiuk/Movie-Scraper-App", "max_stars_repo_head_hexsha": "1702da1a42c723c1c058ae3455a729a9215ed96c", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
[STATEMENT] lemma sup_apx_left_isotone: assumes "x \<sqsubseteq> y" shows "x \<squnion> z \<sqsubseteq> y \<squnion> z" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x \<squnion> z \<sqsubseteq> y \<squnion> z [PROOF STEP] proof - [PROOF STATE] proof (state) goal (1 subgoal): 1. x \<squnion> z \<sqsubseteq> ...
{"llama_tokens": 1942, "file": "Correctness_Algebras_Domain_Recursion", "length": 20}
# -*- coding: utf-8 -*- """ Created on Sun Jun 6 14:57:46 2021 @author: iseabrook1 """ #This script contains the code required to run experiments to understand how different #components of a network's eigenspectra are relevant to different features in the #network, for a simple barbell network. #Isobel...
{"hexsha": "274c961a2cc70156361a6c1e7f6ad61d3eb14c81", "size": 2810, "ext": "py", "lang": "Python", "max_stars_repo_path": "eigenvectors_and_communities.py", "max_stars_repo_name": "Iseabrook/structural_node_importance", "max_stars_repo_head_hexsha": "c3f0e05d7e9d7597273f951fd5ec111830250b96", "max_stars_repo_licenses"...
import numpy as np def create_board(): return (np.array([[0, 0, 0], [0, 0, 0], [0, 0, 0]])) def possibilities(board): l = [] for i in range(len(board)): for j in range(len(board)): if board[i][j] == 0: l.append((i, j)) ...
{"hexsha": "f1384a8542fc517b1ac39b006b1340f6beb97f87", "size": 3137, "ext": "py", "lang": "Python", "max_stars_repo_path": "tic-tac-toe-game.py", "max_stars_repo_name": "Hemraj183/Python-Practice", "max_stars_repo_head_hexsha": "9e5689d3163c36d2392506f113826681c4278c74", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
""" use cross validation to plot mean ROC curve, show std ref: https://scikit-learn.org/stable/auto_examples/model_selection/plot_roc_crossval.html#sphx-glr-auto-examples-model-selection-plot-roc-crossval-py Note that you have to tune the parameters yourself """ from Bio.Seq import Seq from Bio import SeqIO from s...
{"hexsha": "07ffab9d7066cf28f7a65069ce5fe9f1377c960e", "size": 20525, "ext": "py", "lang": "Python", "max_stars_repo_path": "per_A_base_score/HbF_score_classification/add_more_A/leave_one_chr_out_cv.py", "max_stars_repo_name": "YichaoOU/ABE_NonCoding_functional_score", "max_stars_repo_head_hexsha": "cef8dbbd74e5f9359fe...
def extract_contour(x_list, y_list, z_list, z_value): import matplotlib matplotlib.use('Agg') import pylab import numpy temp = pylab.tricontour(x_list, y_list, z_list, levels=[z_value]) pylab.clf() return numpy.concatenate([itm.vertices for itm in temp.collect...
{"hexsha": "723499c4339f7e7f3de17f8901c6670aa3f3c0e3", "size": 2621, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/SurfacingAlgorithms/huji-rich-Elad3DFast/tests/newtonian/two_dimensional/oblique_shock/test.py", "max_stars_repo_name": "GalaxyHunters/Vivid", "max_stars_repo_head_hexsha": "f724e5671b650433d0...
Yeni is a Second year UC Davis Students student. Undeclared exploratory Program
{"hexsha": "ab02957167d5747404faa4f8c33f2c02c03620dc", "size": 82, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Yeni.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
# Copyright 2019 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
{"hexsha": "e17d8b99e2edbeea0d3fa8de4237e5c2fc12b563", "size": 7223, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/example_act.py", "max_stars_repo_name": "kshithijiyer/qkeras", "max_stars_repo_head_hexsha": "78ac608c6dcd84151792a986d03fe7afb17929cf", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
## code to prepare `ipg` dataset goes here librarian::shelf( tidyverse , readxl , janitor , lubridate , cran_repo = 'https://cran.r-project.org' ) igp_begin <- read_excel("source-data/IGP_datos_sismicos.xlsx") |> clean_names() igp_scrapped <- read_csv( "https://raw.githubusercontent.com/TJhon...
{"hexsha": "4a3355bd91347a6fe47c10aa32d41c1ac243d8cb", "size": 1514, "ext": "r", "lang": "R", "max_stars_repo_path": "data-raw/igp.r", "max_stars_repo_name": "TJhon/PeruData", "max_stars_repo_head_hexsha": "35db82fcce107c90c38dea51fe3dffc8d914f69e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star...
(* Inductive t : Type -> Type := *) (* | Just : forall (A : Type), t A -> t A. *) (* Fixpoint test {A : Type} (x : t A) : t (A + unit) := *) (* match x in t A return t (A + unit) with *) (* | Just T x => @test T x *) (* end. *) Definition Type1 := Type. Definition Type2 := Type. De...
{"author": "princeton-vl", "repo": "CoqGym", "sha": "0c03a6fba3a3ea7e2aecedc1c624ff3885f7267e", "save_path": "github-repos/coq/princeton-vl-CoqGym", "path": "github-repos/coq/princeton-vl-CoqGym/CoqGym-0c03a6fba3a3ea7e2aecedc1c624ff3885f7267e/coq/test-suite/bugs/closed/4161.v"}
from pyalgotrade import technical import numpy as np from scipy.ndimage.interpolation import shift import statsmodels.api as sm class HalfLifeEventWindow(technical.EventWindow): def __init__(self, period,): super(HalfLifeEventWindow, self).__init__(period) def onNewValue(self, dateTime, value): ...
{"hexsha": "604b7a5faeb09aaaddd784f65bb8ed0c20b53b22", "size": 1930, "ext": "py", "lang": "Python", "max_stars_repo_path": "MovingHalfLife.py", "max_stars_repo_name": "vivekvision/TradingStrategy", "max_stars_repo_head_hexsha": "073eb580e22de27f2a9fb6692ab42c0578ce137d", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
# import the opencv library import cv2 import numpy as np # define a video capture object vid = cv2.VideoCapture(0) while(True): # Capture the video frame # by frame ret, frame = vid.read() # Display the resulting frame cv2.imshow('frame', frame) ret, buf = cv2.imencode(".jpg", frame) #print(buf) bufjpg...
{"hexsha": "f91fa29817b34f32e316954a6e5fa3f299d4b2d9", "size": 612, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/utils/OpenCV.py", "max_stars_repo_name": "HeminQadir/RTSP-RTP-Video-Streaming", "max_stars_repo_head_hexsha": "17267520e209a88028d8ff99d341c974f96b9e64", "max_stars_repo_licenses": ["MIT"], "ma...
# Once we drop 0.4 support, we want the following to return depwarns # info("Beginning of tests with deprecation warnings") v = 1 d = Dict{Int,Int}() d[1] = 1 @test Compat.@Dict(1 => 1) == d @test Compat.@Dict(1 => v) == d @test typeof(@compat(Dict(1 => 1))) == Dict{Int,Int} @test @compat(Dict(1 => 1)) == d @test @co...
{"hexsha": "7e2762a2546ba19df2ca8407033716dd24b79db7", "size": 1630, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "public/.julia/v0.5/Compat/test/to-be-deprecated.jl", "max_stars_repo_name": "Giarcr0b/MVO_Tool", "max_stars_repo_head_hexsha": "8f3348b8b56968febca8307acea3ebe1817fccae", "max_stars_repo_licenses":...
# 0902.py import cv2 import numpy as np src = cv2.imread('./data/chessBoard.jpg') gray= cv2.cvtColor(src,cv2.COLOR_BGR2GRAY) #1 fastF = cv2.FastFeatureDetector_create() kp = fastF.detect(gray) dst = cv2.drawKeypoints(gray, kp, None, color=(255,0,0)) print('len(kp)=', len(kp)) #2 kp = sorted(kp, key=l...
{"hexsha": "257b6598abd19e15668adde60242653bad6e7e32", "size": 1503, "ext": "py", "lang": "Python", "max_stars_repo_path": "Chapter09/0902.py", "max_stars_repo_name": "0201shj/Python-OpenCV", "max_stars_repo_head_hexsha": "249f8cc9404e547da0f5c68000f29f2e598562a5", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
Require Import id_and_loc augmented mmemory mimperative language mlattice bridge types bijection Coq.Program.Tactics Arith Omega tactics low_equivalence nibridge_helper decision preservation List. Require Import LibTactics InductionPrinciple Coq.Program.Equality Coq.Program.Basics. Import FunctionalExtensionality. Set ...
{"author": "MathiasVP", "repo": "ni-formal-gc", "sha": "07899c51af76b237d382dc825904fc9158cd905d", "save_path": "github-repos/coq/MathiasVP-ni-formal-gc", "path": "github-repos/coq/MathiasVP-ni-formal-gc/ni-formal-gc-07899c51af76b237d382dc825904fc9158cd905d/nibridge.v"}
Require Import TLC.LibLN. Require Export Env. Set Implicit Arguments. (* ********************************************************************** *) (* ********************************************************************** *) (* ********************************************************************** *) (** * Grammars *)...
{"author": "pleiad", "repo": "Refinements", "sha": "3a4d24329bdbb91b95a352b70db53f10cad094a1", "save_path": "github-repos/coq/pleiad-Refinements", "path": "github-repos/coq/pleiad-Refinements/Refinements-3a4d24329bdbb91b95a352b70db53f10cad094a1/Definitions.v"}
%%%%%%%%%%%%%%%%%%%%%% \section{Geometry of Level Sets} %\section{Quantifying Nonconvexity} \label{sec:QuanNoncon} \subsection{The Greedy Algorithm} \label{sec:GreedyAlg} %%%%%%%%%%%%%%%%%%%%%% The intuition behind our main result is that, for smooth enough loss functions and for sufficient overparameterization, ...
{"hexsha": "9a8e7a09528f8dda978ace658b712bb22641a25b", "size": 5241, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Writeup/iclr/geometry.tex", "max_stars_repo_name": "danielfreeman11/convex-nets", "max_stars_repo_head_hexsha": "252a8230845fb2076221113ac8cabfade5152bfb", "max_stars_repo_licenses": ["MIT"], "max_s...